Eris Linux A.P.I. 0.1
API to access Eris Linux system from a custom container
Loading...
Searching...
No Matches
SYSTEM

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.

Detailed Description

Functions to access system identifiers.

Function Documentation

◆ eris_get_system_model()

int eris_get_system_model ( char * buffer,
size_t size )

Read Eris Linux system model.

Parameters
bufferThe buffer to fill with the device model.
sizeThe size of the buffer.
Returns
0 on success, -1 on error and errno is set appropriately.

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.

◆ eris_get_system_type()

int eris_get_system_type ( char * buffer,
size_t size )

Read Eris Linux system image type.

Parameters
bufferThe buffer to fill with the system image type.
sizeThe size of the buffer.
Returns
0 on success, -1 on error and errno is set appropriately.

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.

◆ eris_get_system_update_status()

int eris_get_system_update_status ( void )

Get the current update status of the system.

Return values
1System is OK, no update is pending.
2System update install in progress.
3System update install Ok. Ready to reboot.
4System update install failed.
5System reboot in progress.
-1An 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.

◆ eris_get_system_uuid()

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.

Parameters
bufferthe buffer to fill with the UUID string.
sizethe size of the buffer.

The buffer must be at least 37 bytes long (36 chars + NUL char).

Returns
0 on success, -1 on error and errno is set appropriately.