int8_t otaParser_parseJobDocFile( const char * jobDoc,
const size_t jobDocLength,
const uint8_t fileIndex,
struct containing the fields of an AFR OTA Job Document
Definition: job_parser.h:23
Signals if the job document provided is an AWS IoT Core OTA update document.
- Parameters
-
jobDoc | The job document contained in the AWS IoT Job |
jobDocLength | The length of the job document |
fields | A pointer to an job document fields structure populated by call |
- Returns
- int8_t The next file index in the job. Returns 0 if no additional files are available. Returns -1 if error.
Example
const char * jobDoc;
size_t jobDocLength;
int8_t fileIndex = 0;
do
{
fileIndex = otaParser_parseJobDocFile(jobDoc,
jobDocLength,
fileIndex,
&fields);
} while(fileIndex > 0)