|
Eris Linux A.P.I. 0.1
API to access Eris Linux system from a custom container
|
Functions to get informations about containers. More...
Functions | |
| int | eris_get_number_of_slots (void) |
| Return the maximal number of containers allowed. | |
| int | eris_get_container_name (int slot, char *buffer, size_t size) |
| Read the name of the container in a given slot. | |
| int | eris_get_container_presence (int slot) |
| Check if a container is present in a given slot. | |
| int | eris_get_container_status (int container, char *buffer, size_t size) |
| Get the status of the container in a given slot. | |
| int | eris_get_container_version (int container, char *buffer, size_t size) |
| Read the version number of the container in a given slot. | |
| int | eris_get_container_update_policy (void) |
| Read the container update policy. | |
| int | eris_set_container_update_policy (int policy) |
| Write the container update policy. | |
Functions to get informations about containers.
| int eris_get_container_name | ( | int | slot, |
| char * | buffer, | ||
| size_t | size ) |
Read the name of the container in a given slot.
| slot | The number of the slot hosting the container. |
| buffer | The buffer to fill with the name. |
| size | The size of the buffer. |
This function fills the buffer with the name of the container currently hosted in the indicated slot. If the slot doesn't host any container, the buffer will be empty.
The name of the container is remotely set by the device manager and can not be modified on the target device.
| int eris_get_container_presence | ( | int | slot | ) |
Check if a container is present in a given slot.
| slot | The number of the slot to check. |
| int eris_get_container_status | ( | int | container, |
| char * | buffer, | ||
| size_t | size ) |
Get the status of the container in a given slot.
| slot | The number of the slot hosting the container. |
| buffer | The buffer to fill with the status. |
| size | The size of the buffer. |
This function fills the buffer with the status of the container currently hosted in the indicated slot. If the slot doesn't host any container, the buffer will be empty.
The status is one of the following strings: running or stopped.
| int eris_get_container_update_policy | ( | void | ) |
Read the container update policy.
| 0 | Update container content only after system reboot. |
| 1 | Immediate restart of container after content update. |
| -1 | An error has occured during the request, errno is set appropriately. |
When an update is available for the content of a container, the new content can be installed immediately and the container can be restarted as soon as possible. Alternatively, we can keep the current container running until the system is rebooted.
| int eris_get_container_version | ( | int | container, |
| char * | buffer, | ||
| size_t | size ) |
Read the version number of the container in a given slot.
| slot | The number of the slot hosting the container. |
| buffer | The buffer to fill with the version number. |
| size | The size of the buffer. |
This function fills the buffer with the version number of the container currently hosted in the indicated slot. If the slot doesn't host any container, the buffer will be empty.
The version of the container is remotely set by the device manager and can not be modified from the target.
| int eris_get_number_of_slots | ( | void | ) |
Return the maximal number of containers allowed.
A slot, numbered from 0 to number-of-slots - 1, can receive a container.
| int eris_set_container_update_policy | ( | int | policy | ) |
Write the container update policy.
| policy | 1 (immediate update and restart), 0 (update at system reboot). |
When an update is available for the content of a container, the new content can be installed immediately and the container can be restarted as soon as possible. Alternatively, we can keep the current container running until the system is rebooted.