size_t length,
const char * thingName,
uint16_t thingNameLength,
size_t * outLength );
JobsStatus_t
Return codes from jobs functions.
Definition: jobs.h:258
JobsStatus_t Jobs_GetPending(char *buffer, size_t length, const char *thingName, uint16_t thingNameLength, size_t *outLength)
Populate a topic string for a GetPendingJobExecutions request.
Definition: jobs.c:666
Populate a topic string for a GetPendingJobExecutions request.
- Parameters
-
[in] | buffer | The buffer to contain the topic string. |
[in] | length | The size of the buffer. |
[in] | thingName | The device's thingName as registered with AWS IoT. |
[in] | thingNameLength | The length of the thingName. |
[out] | outLength | The length of the topic string written to the buffer. |
- Returns
- JobsSuccess if the topic was written to the buffer; JobsBadParameter if invalid parameters are passed; JobsBufferTooSmall if the buffer cannot hold the full topic string.
When all parameters are valid, the topic string is written to the buffer up to one less than the buffer size. The topic is ended with a NUL character.
- Note
- The thingName parameter does not need a NUL terminator.
-
The AWS IoT Jobs service does not require clients to subscribe to the "/accepted" and "/rejected" response topics of the GetPendingJobExecutions API. The Jobs service will send responses to requests published to the API from clients irrespective of whether they have subscribed to response topics or not. For more information, refer to the AWS docs here: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-mqtt-api.html
Example
#define THING_NAME "11223445566"
#define THING_NAME_LENGTH ( sizeof( THING_NAME ) - 1U )
uint16_t topicLength = 0U;
sizeof( topicBuffer ),
THING_NAME,
THING_NAME_LENGTH,
&( topicLength ) );
{
}
#define JOBS_API_MAX_LENGTH(thingNameLength)
The size needed to hold the longest topic for a given thing name length.
Definition: jobs.h:248
@ JobsSuccess
The buffer was properly written or a match was found.
Definition: jobs.h:260
See jobs.h for docs.