|
Myriota UltraLite SDK 2.4.0
|
Update or get system information. More...
Enumerations | |
| enum | SystemUpdateID { SYSTEM_UPDATE_ID_WRITE_START = 0 , SYSTEM_UPDATE_ID_NETWORK = SYSTEM_UPDATE_ID_WRITE_START , SYSTEM_GET_ID_START = (1 << 4) , SYSTEM_GET_ID_NETWORK = SYSTEM_GET_ID_START , SYSTEM_GET_ID_DIAGNOSTICS } |
| System update or get operation IDs. More... | |
Functions | |
| MYRIOTA_USER_API int | SystemUpdateStart (uint8_t ID, uint32_t Size, uint32_t Timeout) |
| Initiate a system update or get request. | |
| MYRIOTA_USER_API int | SystemUpdateXfer (uint32_t Offset, uint8_t *Buf, size_t BufSize) |
| System update or get data transfer. | |
| MYRIOTA_USER_API int | SystemUpdateFinish (void) |
| Indicates the finish of the content transfer. | |
Update or get system information.
Interface for user to update or retrieve selected system information. i.e. to update network information. It is recommended that the entire process done in a single task window.
| enum SystemUpdateID |
| MYRIOTA_USER_API int SystemUpdateStart | ( | uint8_t | ID, |
| uint32_t | Size, | ||
| uint32_t | Timeout | ||
| ) |
Initiate a system update or get request.
Pass 0 to Size for get operation. Update or get will be cancelled automatically when the Timeout expires.
| ID | The ID of the system update or get operation SystemUpdateID. |
| Size | The size of the data to be transferred. |
| Timeout | The maximum time in seconds for the entire operation. |
ID is unknown, Size is too big or there is an ongoing operation. For get operation: returns number of bytes to transfer if it starts successfully and -1 if ID is unknown, or there is an ongoing operation. | MYRIOTA_USER_API int SystemUpdateXfer | ( | uint32_t | Offset, |
| uint8_t * | Buf, | ||
| size_t | BufSize | ||
| ) |
System update or get data transfer.
For the best transfer speed, it is recommended that Offset and BufSize are set to multiple of 2048 bytes where possible.
| Offset | The offset in the data buffer. |
| Buf[out] | The data buffer. |
| BufSize | The size of the data buffer. |
Buf if the transfer succeeds and -1 if it fails. | MYRIOTA_USER_API int SystemUpdateFinish | ( | void | ) |
Indicates the finish of the content transfer.
For update operation, actual update will be performed if the transferred data are validated.