|
AWS IoT Device SDK C:
Jobs
AWS IoT Jobs library
|
| Return to main page ↑ |
Set a callback to be invoked when the list of pending Jobs changes.
The Jobs service publishes a JobExecutionsChanged message to the jobs/notify topic whenever a Job execution is added to or removed from the list of pending Job executions for a Thing. The message sent is useful for monitoring the list of pending Job executions.
A NOTIFY PENDING callback may be invoked whenever a message is published to jobs/notify. Each Thing may have up to AWS_IOT_JOBS_NOTIFY_CALLBACKS NOTIFY PENDING callbacks set. This function modifies the NOTIFY PENDING callback for a specific Thing depending on the pNotifyPendingCallback parameter and the presence of any existing NOTIFY PENDING callback.
pNotifyPendingCallback is not NULL, then the existing callback function and parameter are replaced with pNotifyPendingCallback.pNotifyPendingCallback is NULL, then the callback is removed.The member AwsIotJobsCallbackInfo_t::oldFunction must be used to select an already-registered callback function for replacement or removal when AWS_IOT_JOBS_NOTIFY_CALLBACKS is greater than 1. When multiple callbacks are set, all of them will be invoked when a message is received.
| [in] | mqttConnection | The MQTT connection to use for the subscription to jobs/notify. |
| [in] | pThingName | The subscription to jobs/notify will be added for this Thing Name. |
| [in] | thingNameLength | The length of pThingName. |
| [in] | flags | This parameter is for future-compatibility. Currently, flags are not supported for this function and this parameter is ignored. |
| [in] | pNotifyPendingCallback | Callback function to invoke for incoming messages. |
Example: