External Code Interface (ECI)
 All Data Structures Files Functions Variables Typedefs Groups Pages
ECI Macros

This page details macros intended to be defined in 'eci_interface.h' or any file in the include tree. Each macro specifies whether it is required for operation of the ECI. Failure to specify a macro will lead to a compilation error. These macros serve as a means to define the behavior of the ECI.

Function Macros

Required Macro Description
ECI_APP_MAIN Name of the main function defined by ECI. Serves as an entry point for the app.
ECI_FUNC_CODE_START ??
ECI_FUNC_CODE_END ??

Information Macros

Required Macro Description
ECI_APP_REVISION_NUMBER Version number for the app, echoed into into event messages.
ECI_APP_NAME_UPPER Name of the app in upper case.
ECI_APP_NAME_LOWER Name of the app in lower case.
ECI_CMD_PIPE_NAME Name of the app's command pipe. The command pipe is used to receive software bus command messages.
This value must be unique across all apps.
ECI_DATA_PIPE_NAME Name of the app's telemetry pipe.
This value must be unique across all apps.

Table Macros

Required Macro Description
ECI_PARAM_TBL_DEFINED Indicates the app requires the use of the ECI's table services interface.
If this is defined, ECI will expect an array of ECI_Tbl_t objects with the name
'ECI_ParamTable' to be declared.
ECI_STATE_TBL_DEFINED Indicates the app is intending to use a state table.
Declaring this macro also requires defining:
Macro Description
ECI_STATE_TABLE_NAME Name of the registered state table.
ECI_STATE_TABLE Name of the declared structure in the associated .tbl file.
ECI_CDS_TABLE_DEFINED Indicates this app requires the use of the ECI's critical data store interface.
ECI_EVENT_TABLE_DEFINED Indicates this app requires the use of the ECI's event services interface.
If this is defined, ECI will expect an array of ECI_Evs_t objects with the name
'ECI_Events' to be declared.
ECI_FLAG_TABLE_DEFINED Indicates this app requires the use to the ECI's status reporting functionality.
If this is defined, ECI will expect an array of ECI_Flag_t objects with the name
'ECI_Flags' to be defined.

Message ID Macros

Each one of the message IDs listed below must be unique across all apps (including the CFE core) and extra care should be taken to avoid collisions. A message ID collision is difficult to diagnose but can usually be found by strange commands or telemetry being relayed to event services.

According to the CCSDS standard, message IDs should be represented by 8 byte integers. Commonly these IDs are written as hex values (ie. 0xAAAA) even though any value that fits within those 8 bytes will be valid. The 4th bit (0b...[0|1]) represents the type of message the ID is associated with; 0 being telemetry and 1 being a command. In the table below, we've identified each macro's internal type with either TLM or CMD accordingly. In general, its important these be set correctly for proper handling of the message, and ECI allocates a queue for each command message defined. A third distinction will be made in this table for performance IDs which will be denoted by PERF. Performance IDs are used to track an apps system usage but aren't reference in the CCSDS standard. The CCSDS standard can be referenced here.

Required Macro Type Description
ECI_CMD_MID CMD MID via which ECI recieves all commands to interact with the app.
ECI_FLAG_MID TLM MID used for ECI-generated status reporting message containing the state of the registered flags. Only required if ECI_FLAG_TABLE_DEFINED is defined.
ECI_HK_MID TLM MID used for the ECI-generated app house-keeping message.
ECI_PERF_ID PERF PERF ID to track the execution of the app. This ID will be used before and after the run loop once the ECI recieves the app's tick message.
ECI_SEND_HK_MID TLM MID which triggers ECI to emit a new house-keeping packet.
ECI_TICK_MID TLM MID which triggers ECI to execute the external code's step function. Typically this message is generated by the scheduler, but it can also be the MID of another packet with the system. If your app is not running, check to see if this message has been included in your scheduler app.
ECI_TBL_MANAGE_MID TLM MID which triggers ECI to manage its tables via table services. This message ID will trigger a table load and update all state/param information accordingly.