App Class¶
See the App Entity for generic information.
-
class AppClass : public Acroname::BrainStem2CLI::EntityClass¶
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.
Public Functions
-
AppClass()¶
Constructors.
-
~AppClass()¶
Destructor.
- !AppClass ()
Finalizer.
- void init (BrainStem2CLI::ModuleClass^ module, const unsigned char index)
Initializes the class. Should only be called when manually creating classes.
- Parameters:
pModule – The module.
index – The cmdAPP index to be addressed.
-
aErr execute(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.
- Parameters:
appParam – The app parameter handed to the reflex.
- Return values:
aErrNone – success.
aErrTimeout – The request timed out waiting to start execution.
aErrConnection – No active link connection.
aErrNotFound – the app reflex was not found or not enabled on the module.
-
aErr execute(const unsigned int appParam, unsigned int %returnVal)¶
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.
- Parameters:
appParam – The app parameter handed to the reflex.
returnVal – The return value filled in from the result of executing the reflex routine.
- Return values:
aErrNone – - success.
aErrTimeout – - The request timed out waiting for a response.
aErrConnection – - No active link connection.
aErrNotFound – - the app reflex was not found or not enabled on the module.
-
aErr execute(const unsigned int appParam, unsigned int %returnVal, 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.
- Parameters:
appParam – The app parameter handed to the reflex.
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.
- Return values:
aErrNone – - success.
aErrTimeout – - The request timed out waiting for a response.
aErrConnection – - No active link connection.
aErrNotFound – - the app reflex was not found or not enabled on the module.
-
AppClass()¶