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

Functions to contact the Device Manager. More...

Functions

int eris_contact_server (void)
 Ask the device to contact the server immediately.
int eris_get_server_contact_period (void)
 Get the period in seconds that the device waits between contacts with the server.
int eris_set_server_contact_period (int period)
 Set the period in seconds that the device waits between contacts with the server.

Detailed Description

Functions to contact the Device Manager.

Function Documentation

◆ eris_contact_server()

int eris_contact_server ( void )

Ask the device to contact the server immediately.

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

Asking to explicitly contact the server is especially usefull when the period of contact is zero. Another use case is to report a new condition on a container for example.

◆ eris_get_server_contact_period()

int eris_get_server_contact_period ( void )

Get the period in seconds that the device waits between contacts with the server.

Returns
the period in seconds, or -1 on error and errno is set appropriately.

If the period is 0, the device will contact the server only when explicitly asked by eris_contact_server() method.

◆ eris_set_server_contact_period()

int eris_set_server_contact_period ( int period)

Set the period in seconds that the device waits between contacts with the server.

Parameters
peridothe period between contact in seconds.
Returns
0 on success or -1 on error and errno is set appropriately.

If period is 0, the device will contact the server only when explicitly asked by eris_contact_server().