![]() |
lingua-franca 0.10.1
Lingua Franca code generator
|
Utility class for the C extension. More...
Static Public Member Functions | |
| static void | addClockSyncCompileDefinitions (FederateInstance federate) |
| Initialize clock synchronization (if enabled) and its related options for a given federate. | |
| static void | addDisableClockSyncCompileDefinitions (FederateInstance federate) |
| static String | createPortStatusFieldForInput (Input input) |
| Create a port status field variable for a network input port "input" in the self struct of a reactor. | |
| static void | generateCMakeInclude (FederateInstance federate, FederationFileConfig fileConfig) throws IOException |
| Generate a file to be included by CMake. | |
| static String | generateFederateNeighborStructure (FederateInstance federate) |
| Generate code that sends the neighbor structure message to the RTI. | |
| static String | generateSerializationCMakeExtension (FederateInstance federate) |
| Generate cmake-include code needed for enabled serializers of the federate. | |
| static String | generateSerializationIncludes (FederateInstance federate) |
| Generate preamble code needed for enabled serializers of the federate. | |
| static String | getNetworkDelayLiteral (Expression delay) |
| Given a connection 'delay' expression, return a string that represents the interval_t value of the additional delay that needs to be applied to the outgoing message. | |
| static void | handleCompileDefinitions (FederateInstance federate, List< String > federateNames, RtiConfig rtiConfig, MessageReporter messageReporter) |
| static void | initializeClockSynchronization (FederateInstance federate, RtiConfig rtiConfig, MessageReporter messageReporter) |
| Initialize clock synchronization (if enabled) and its related options for a given federate. | |
| static String | initializeTriggersForNetworkActions (FederateInstance federate, ReactorInstance main) |
| Generate C code that initializes network actions. | |
| static String | stpStructs (FederateInstance federate) |
| Generate C code that holds a sorted list of STAA structs by time. | |
| static String | surroundWithIfElseFederated (String insideIf, String insideElse) |
| static String | surroundWithIfElseFederatedCentralized (String insideIf, String insideElse) |
| static String | surroundWithIfFederated (String code) |
| Surround code with blocks to ensure that code only executes if the program is federated. | |
| static String | surroundWithIfFederatedCentralized (String code) |
| Surround code with blocks to ensure that code only executes if the program is federated and has a centralized coordination. | |
| static String | surroundWithIfFederatedDecentralized (String code) |
| Surround code with blocks to ensure that code only executes if the program is federated and has a decentralized coordination. | |
Static Package Functions | |
| static boolean | clockSyncIsOn (FederateInstance federate, RtiConfig rtiConfig) |
| static boolean | isSharedPtrType (InferredType type, CTypes types) |
Static Package Attributes | |
| static final Pattern | sharedPointerVariable |
Utility class for the C extension.
|
static |
Initialize clock synchronization (if enabled) and its related options for a given federate.
Clock synchronization can be enabled using the clock-sync target property.
|
static |
|
staticpackage |
|
static |
Create a port status field variable for a network input port "input" in the self struct of a reactor.
| input | The network input port |
|
static |
Generate a file to be included by CMake.
|
static |
Generate code that sends the neighbor structure message to the RTI.
See MSG_TYPE_NEIGHBOR_STRUCTURE in federated/net_common.h.
| federate | The federate that is sending its neighbor structure |
|
static |
Generate cmake-include code needed for enabled serializers of the federate.
|
static |
Generate preamble code needed for enabled serializers of the federate.
|
static |
Given a connection 'delay' expression, return a string that represents the interval_t value of the additional delay that needs to be applied to the outgoing message.
The returned additional delay in absence of after on network connection (i.e., if delay is passed as a null) is NEVER. This has a special meaning in C library functions that send network messages that carry timestamps (
| delay | The delay associated with a connection. |
|
static |
|
static |
Initialize clock synchronization (if enabled) and its related options for a given federate.
Clock synchronization can be enabled using the clock-sync target property.
|
static |
Generate C code that initializes network actions.
These network actions will be triggered by federate.c whenever a message is received from the network.
| federate | The federate. |
| main | The main reactor that contains the federate (used to lookup references). |
|
staticpackage |
|
static |
Generate C code that holds a sorted list of STAA structs by time.
For decentralized execution, on every logical timestep, a thread will iterate through each staa struct, wait for the designated offset time, and set the associated port status to absent if it isn't known.
| federate | The federate. |
|
static |
|
static |
|
static |
Surround code with blocks to ensure that code only executes if the program is federated.
|
static |
Surround code with blocks to ensure that code only executes if the program is federated and has a centralized coordination.
|
static |
Surround code with blocks to ensure that code only executes if the program is federated and has a decentralized coordination.
|
staticpackage |