...
.activateFn
-typedef bool (*schedActivateFunc) (int appID);
Called on activation; you may return
false
to cancel any given activation.NOTEWARNING: that this This method must NOT send messages to the gateway; it's only allowed to do local operations are allowed.
.interruptFn
-typedef void (*schedInterruptFunc) (int appID, uint16_t pins);
A shared ISR that is called for ANY interrupt on ALL applications; the
pins
parameter indicatesexti
lines (https://wiki.st.com/stm32mcu/wiki/EXTI_feature_overview ) that changed. Due to the shared nature of the pin, you must filter to the pin you are expecting to handle in your application.Example: Filtering on the
PAIR
buttonCode Block language c if (!(pins & BUTTON1_Pin)) { return; }
.pollFn
-typedef void (*schedPollFunc) (int appID, int state);
Called repeatedly while activated. This function implements the application's state machine, where negative states are reserved. Only when this function sends a message using the
noteSendToGatewayAsync()
function, or manually submitsSTATE_DEACTIVATE
to the scheduler, will the application will be deactivated..responseFn
-typedef void (*schedResponseFunc) (int appID, J *rsp);
Called after an application sent a Notecard request and is asynchronously receiving a reply. This will be called when a response comes back or when it times out; if timeout the
rsp
field will beNULL
.
...