App Entity¶
- group AppEntity
AppClass: 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. Don’t wait for a return value from the execute call; this call returns immediately upon execution of the module’s reflex.
- Parameters:
id – The id assigned by the create stem vi.
result – Object containing aErrNone on success. Non-zero error code on failure.
index – The index of the entity in question.
appParam – The app parameter handed to the reflex.
- Returns:
::aErrNone - success.
- Returns:
::aErrTimeout - The request timed out waiting to start execution.
- Returns:
::aErrConnection - No active link connection.
- Returns:
::aErrNotFound - the app reflex was not found or not enabled on the module.
-
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. Wait for a return from the reflex execution for msTimoue milliseconds. This method will block for up to msTimeout.
- Parameters:
id – The id assigned by the create stem vi.
result – Object containing aErrNone and the requested value on success. Non-zero error code on failure.
index – The index of the entity in question.
returnVal – The return value filled in from the result of executing the reflex routine.
msTimeout – The amount of time to wait for the return value from the reflex routine. The default value is 1000 milliseconds if not specified.
- Returns:
::aErrNone - success.
- Returns:
::aErrTimeout - The request timed out waiting for a response.
- Returns:
::aErrConnection - No active link connection.
- Returns:
::aErrNotFound - the app reflex was not found or not enabled on the module.