App Entity¶
See the App Entity for generic information.
- group AppEntity
Used to send a cmdAPP packet to the BrainStem network. These commands are used for either host-to-stem or stem-to-stem interactions. BrainStem modules can implement a reflex origin to complete an action when a cmdAPP packet is addressed to the module.
-
void app_execute(unsigned int *id, struct Result *result, const int index, const unsigned int appParam)¶
Execute the app reflex on the module. Doesn’t wait for a return value from the execute call; this call returns immediately upon execution of the module’s reflex.
The result parameter will output the following fields:
error: Common EntityClass Return Values common entity return value
- Parameters:
id – ID assigned through “module_createStem”
result – Output object containing result code.
index – The index of the entity in question.
appParam – The app parameter handed to the reflex.
-
void app_executeAndReturn(unsigned int *id, struct Result *result, const int index, const unsigned int appParam, const unsigned int msTimeout)¶
Execute the app reflex on the module. Waits for a return from the reflex execution for msTimeout milliseconds. This method will block for up to msTimeout.
The result parameter will output the following fields:
error: Common EntityClass Return Values common entity return value
value: The return value filled in from the result of executing the reflex routine.
- Parameters:
id – ID assigned through “module_createStem”
result – Output object containing result code and the requested value if successful.
index – The index of the entity in question.
appParam – The app parameter handed to the reflex.
msTimeout – The amount of time to wait for the return value from the reflex routine. The default value is 1000 milliseconds if not specified.