Eclipse SUMO - Simulation of Urban MObility
sumo2fmi_bridge.h File Reference
#include <stdio.h>
#include <stdbool.h>
#include <stdarg.h>
Include dependency graph for sumo2fmi_bridge.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  ModelInstance
 

Typedefs

typedef void *(* allocateMemoryType) (size_t nobj, size_t size)
 
typedef void(* freeMemoryType) (void *obj)
 
typedef void(* loggerType) (void *componentEnvironment, const char *instanceName, int status, const char *category, const char *message,...)
 

Functions

fmi2Status sumo2fmi_getInteger (ModelInstance *comp, const fmi2ValueReference vr, int *value)
 
fmi2Status sumo2fmi_getString (ModelInstance *comp, const fmi2ValueReference vr, const char *value)
 
void sumo2fmi_logError (ModelInstance *comp, const char *message,...)
 
void sumo2fmi_logMessage (ModelInstance *comp, int status, const char *category, const char *message, va_list args)
 
void sumo2fmi_set_startValues (ModelInstance *comp)
 
fmi2Status sumo2fmi_setString (ModelInstance *comp, fmi2ValueReference vr, const char *value)
 
fmi2Status sumo2fmi_step (ModelInstance *comp, double tNext)
 

Detailed Description

Author
Robert Hilbrich
Date
Mon, 24 Aug 2020

Definition in file sumo2fmi_bridge.h.

Typedef Documentation

◆ allocateMemoryType

typedef void*(* allocateMemoryType) (size_t nobj, size_t size)

Definition at line 29 of file sumo2fmi_bridge.h.

◆ freeMemoryType

typedef void(* freeMemoryType) (void *obj)

Definition at line 31 of file sumo2fmi_bridge.h.

◆ loggerType

typedef void(* loggerType) (void *componentEnvironment, const char *instanceName, int status, const char *category, const char *message,...)

Definition at line 30 of file sumo2fmi_bridge.h.

Function Documentation

◆ sumo2fmi_getInteger()

fmi2Status sumo2fmi_getInteger ( ModelInstance comp,
const fmi2ValueReference  vr,
int *  value 
)

Definition at line 76 of file sumo2fmi_bridge.c.

References fmi2Error, fmi2OK, libsumo_vehicle_getIDCount(), and UNREFERENCED_PARAMETER.

Referenced by fmi2GetInteger().

Here is the caller graph for this function:

◆ sumo2fmi_getString()

fmi2Status sumo2fmi_getString ( ModelInstance comp,
const fmi2ValueReference  vr,
const char *  value 
)

Definition at line 90 of file sumo2fmi_bridge.c.

References fmi2Error, fmi2OK, and ModelInstance::libsumoCallOptions.

Referenced by fmi2GetString().

Here is the caller graph for this function:

◆ sumo2fmi_logError()

void sumo2fmi_logError ( ModelInstance comp,
const char *  message,
  ... 
)

Definition at line 45 of file sumo2fmi_bridge.c.

References fmi2Error, ModelInstance::logErrors, and sumo2fmi_logMessage().

Referenced by fmi2SetDebugLogging().

Here is the caller graph for this function:

◆ sumo2fmi_logMessage()

void sumo2fmi_logMessage ( ModelInstance comp,
int  status,
const char *  category,
const char *  message,
va_list  args 
)

Definition at line 55 of file sumo2fmi_bridge.c.

References ModelInstance::allocateMemory, ModelInstance::componentEnvironment, ModelInstance::freeMemory, ModelInstance::instanceName, and ModelInstance::logger.

Referenced by sumo2fmi_logError().

Here is the caller graph for this function:

◆ sumo2fmi_set_startValues()

void sumo2fmi_set_startValues ( ModelInstance comp)

Definition at line 36 of file sumo2fmi_bridge.c.

References ModelInstance::allocateMemory, ModelInstance::freeMemory, and ModelInstance::libsumoCallOptions.

Referenced by fmi2Instantiate().

Here is the caller graph for this function:

◆ sumo2fmi_setString()

fmi2Status sumo2fmi_setString ( ModelInstance comp,
fmi2ValueReference  vr,
const char *  value 
)

Definition at line 101 of file sumo2fmi_bridge.c.

References ModelInstance::allocateMemory, fmi2Error, fmi2OK, ModelInstance::freeMemory, and ModelInstance::libsumoCallOptions.

Referenced by fmi2SetString().

Here is the caller graph for this function:

◆ sumo2fmi_step()

fmi2Status sumo2fmi_step ( ModelInstance comp,
double  tNext 
)

Definition at line 114 of file sumo2fmi_bridge.c.

References fmi2OK, libsumo_step(), and UNREFERENCED_PARAMETER.

Referenced by fmi2DoStep().

Here is the caller graph for this function: