|
Eris Linux A.P.I. 0.1
API to access Eris Linux system from a custom container
|
Functions to access system identifiers. More...
Functions | |
| int | eris_get_system_type (char *buffer, size_t size) |
| Read Eris Linux system image type. | |
| int | eris_get_system_model (char *buffer, size_t size) |
| Read Eris Linux system model. | |
| int | eris_get_system_uuid (char *buffer, size_t size) |
| Get the Universally Unique Identifier (UUID) of the machine. | |
| int | eris_get_system_update_status (void) |
| Get the current update status of the system. | |
Functions to access system identifiers.
| int eris_get_system_model | ( | char * | buffer, |
| size_t | size ) |
Read Eris Linux system model.
| buffer | The buffer to fill with the device model. |
| size | The size of the buffer. |
This function fills the buffer with model name of the device hosting the API server.
Some example of device models: "Raspberry-Pi-4", "Qemu-x86", "Beagle-Bone-Black"...
The device model is written during image production and can't be modified.
| int eris_get_system_type | ( | char * | buffer, |
| size_t | size ) |
Read Eris Linux system image type.
| buffer | The buffer to fill with the system image type. |
| size | The size of the buffer. |
This function fills the buffer with the "type" of the image installed.
Some type of images: "Base"", "Graphical", "Realtime", "Realtime-Graphical". And there are specific image types to handle customers-specific boards.
The type of the image is written during image production and can not be modified.
| int eris_get_system_update_status | ( | void | ) |
Get the current update status of the system.
| 1 | System is OK, no update is pending. |
| 2 | System update install in progress. |
| 3 | System update install Ok. Ready to reboot. |
| 4 | System update install failed. |
| 5 | System reboot in progress. |
| -1 | An error has occured during the request, errno is set appropriately. |
This function shows if the device's system is up to date, if an update is pending, or if an update is ready.
| int eris_get_system_uuid | ( | char * | buffer, |
| size_t | size ) |
Get the Universally Unique Identifier (UUID) of the machine.
This function fills the provided buffer with the UUID of the machine.
A UUID (Universally Unique Identifier) is a 128-bits number usually represented by a string of the form dddddddd-dddd-dddd-dddd-dddddddddddd (d being an hexadecimal digit).
The UUID is randomly generated but the probablity to generate two identical UUID is extremly low.
| buffer | the buffer to fill with the UUID string. |
| size | the size of the buffer. |
The buffer must be at least 37 bytes long (36 chars + NUL char).