ACU6 Device API
Data Structures | Enumerations | Enumerator | Functions
ipc_rtc

RTC Service. More...

Data Structures

struct  a_ipc_dyn_array_enum_rtc_result
 Dynamic-length array of a_ipc_enum_rtc_result. More...
 
struct  a_ipc_msg_rtc_get_time_req
 Get the RTC time, in UTC. More...
 
struct  a_ipc_msg_rtc_get_time_rsp
 Sent in response to a_ipc_msg_rtc_get_time_req. More...
 
struct  a_ipc_msg_rtc_allocate_alarm_req
 Allocate RTC alarm ID. More...
 
struct  a_ipc_msg_rtc_allocate_alarm_rsp
 Allocate RTC alarm response. More...
 
struct  a_ipc_msg_rtc_set_alarm_req
 Set RTC alarm request. More...
 
struct  a_ipc_msg_rtc_set_alarm_rsp
 Create RTC alarm response. More...
 
struct  a_ipc_msg_rtc_cancel_alarm_req
 Cancel RTC alarm request. More...
 
struct  a_ipc_msg_rtc_cancel_alarm_rsp
 Cancel RTC alarm response. More...
 
struct  a_ipc_msg_rtc_free_alarm_req_norsp
 Free RTC alarm ID. More...
 
struct  a_ipc_msg_rtc_alarm_notification_publish_ind
 RTC alarm notification event. More...
 
struct  a_ipc_msg_rtc_alarm_notification_unsubscribe_req_norsp
 Unsubscribe from updates for rtc_alarm_notification. More...
 

Enumerations

enum  a_ipc_enum_rtc_result { A_IPC_ENUM_RTC_RESULT_OK , A_IPC_ENUM_RTC_RESULT_MAX_ALARMS_EXCEEDED , A_IPC_ENUM_RTC_RESULT_INVALID_ALARM_ID , A_IPC_ENUM_RTC_RESULT_ERROR_UNKNOWN }
 Result codes. More...
 

Functions

A_IPC_RESULT a_ipc_init_rtc_get_time_req (a_ipc_msg *msg)
 Initialize the message buffer to contain a_ipc_msg_rtc_get_time_req. More...
 
A_IPC_RESULT a_ipc_init_rtc_get_time_rsp (a_ipc_msg *msg)
 Initialize the message buffer to contain a_ipc_msg_rtc_get_time_rsp. More...
 
A_IPC_RESULT a_ipc_init_rtc_allocate_alarm_req (a_ipc_msg *msg)
 Initialize the message buffer to contain a_ipc_msg_rtc_allocate_alarm_req. More...
 
A_IPC_RESULT a_ipc_init_rtc_allocate_alarm_rsp (a_ipc_msg *msg)
 Initialize the message buffer to contain a_ipc_msg_rtc_allocate_alarm_rsp. More...
 
A_IPC_RESULT a_ipc_init_rtc_set_alarm_req (a_ipc_msg *msg)
 Initialize the message buffer to contain a_ipc_msg_rtc_set_alarm_req. More...
 
A_IPC_RESULT a_ipc_init_rtc_set_alarm_rsp (a_ipc_msg *msg)
 Initialize the message buffer to contain a_ipc_msg_rtc_set_alarm_rsp. More...
 
A_IPC_RESULT a_ipc_init_rtc_cancel_alarm_req (a_ipc_msg *msg)
 Initialize the message buffer to contain a_ipc_msg_rtc_cancel_alarm_req. More...
 
A_IPC_RESULT a_ipc_init_rtc_cancel_alarm_rsp (a_ipc_msg *msg)
 Initialize the message buffer to contain a_ipc_msg_rtc_cancel_alarm_rsp. More...
 
A_IPC_RESULT a_ipc_init_rtc_free_alarm_req_norsp (a_ipc_msg *msg)
 Initialize the message buffer to contain a_ipc_msg_rtc_free_alarm_req_norsp. More...
 
A_IPC_RESULT a_ipc_init_rtc_alarm_notification_publish_ind (a_ipc_msg *msg)
 Initialize the message buffer to contain a_ipc_msg_rtc_alarm_notification_publish_ind. More...
 
A_IPC_RESULT a_ipc_init_rtc_alarm_notification_subscribe_req (a_ipc_msg *msg)
 Initialize the message buffer to contain a_ipc_msg_rtc_alarm_notification_subscribe_req. More...
 
A_IPC_RESULT a_ipc_init_rtc_alarm_notification_subscribe_rsp (a_ipc_msg *msg)
 Initialize the message buffer to contain a_ipc_msg_rtc_alarm_notification_subscribe_rsp. More...
 
A_IPC_RESULT a_ipc_init_rtc_alarm_notification_unsubscribe_req_norsp (a_ipc_msg *msg)
 Initialize the message buffer to contain a_ipc_msg_rtc_alarm_notification_unsubscribe_req_norsp. More...
 

Detailed Description

RTC Service.

This page contains documentation of the RTC Service API.


Data Structure Documentation

◆ a_ipc_dyn_array_enum_rtc_result

struct a_ipc_dyn_array_enum_rtc_result

Dynamic-length array of a_ipc_enum_rtc_result.

Data Fields
uint32_t length Length of the array (number of elements)
a_ipc_enum_rtc_result * value The contents of the array.

◆ a_ipc_msg_rtc_get_time_req

struct a_ipc_msg_rtc_get_time_req

Get the RTC time, in UTC.

Response is delivered in a_ipc_msg_rtc_get_time_rsp.

Create using a_ipc_init_rtc_get_time_req().

Message type is A_IPC_MSG_RTC_GET_TIME_REQ.

◆ a_ipc_msg_rtc_get_time_rsp

struct a_ipc_msg_rtc_get_time_rsp

Sent in response to a_ipc_msg_rtc_get_time_req.

Create using a_ipc_init_rtc_get_time_rsp().

Message type is A_IPC_MSG_RTC_GET_TIME_RSP.

Data Fields
a_ipc_enum_rtc_result result Result of the operation.
uint32_t time Unix epoch time.

◆ a_ipc_msg_rtc_allocate_alarm_req

struct a_ipc_msg_rtc_allocate_alarm_req

Allocate RTC alarm ID.

All allocated alarm IDs are stored until shutdown / restart and will need to be re-allocated on startup.

Must be freed with rtc_free_alarm_req_norsp

See also
a_ipc_msg_rtc_free_alarm_req_norsp

Response is delivered in a_ipc_msg_rtc_allocate_alarm_rsp.

Create using a_ipc_init_rtc_allocate_alarm_req().

Message type is A_IPC_MSG_RTC_ALLOCATE_ALARM_REQ.

◆ a_ipc_msg_rtc_allocate_alarm_rsp

struct a_ipc_msg_rtc_allocate_alarm_rsp

Allocate RTC alarm response.

Sent in response to a_ipc_msg_rtc_allocate_alarm_req.

Create using a_ipc_init_rtc_allocate_alarm_rsp().

Message type is A_IPC_MSG_RTC_ALLOCATE_ALARM_RSP.

Data Fields
uint8_t alarm_id Alarm ID, valid values are: 0-19.
a_ipc_enum_rtc_result result Result of the operation.

◆ a_ipc_msg_rtc_set_alarm_req

struct a_ipc_msg_rtc_set_alarm_req

Set RTC alarm request.

All set alarms are stored until shutdown / restart and will need to be re-requested on startup.

Note that the alarm programmed into the RTC will still wake the system.

Response is delivered in a_ipc_msg_rtc_set_alarm_rsp.

Create using a_ipc_init_rtc_set_alarm_req().

Message type is A_IPC_MSG_RTC_SET_ALARM_REQ.

Data Fields
uint8_t alarm_id The ID to set alarm for, must be allocated with 'rtc_allocate_alarm'.
uint32_t time Unix epoch time.

◆ a_ipc_msg_rtc_set_alarm_rsp

struct a_ipc_msg_rtc_set_alarm_rsp

Create RTC alarm response.

Sent in response to a_ipc_msg_rtc_set_alarm_req.

Create using a_ipc_init_rtc_set_alarm_rsp().

Message type is A_IPC_MSG_RTC_SET_ALARM_RSP.

Data Fields
a_ipc_enum_rtc_result result Result of the operation.

◆ a_ipc_msg_rtc_cancel_alarm_req

struct a_ipc_msg_rtc_cancel_alarm_req

Cancel RTC alarm request.

Response is delivered in a_ipc_msg_rtc_cancel_alarm_rsp.

Create using a_ipc_init_rtc_cancel_alarm_req().

Message type is A_IPC_MSG_RTC_CANCEL_ALARM_REQ.

Data Fields
uint8_t alarm_id Alarm ID.

◆ a_ipc_msg_rtc_cancel_alarm_rsp

struct a_ipc_msg_rtc_cancel_alarm_rsp

Cancel RTC alarm response.

Sent in response to a_ipc_msg_rtc_cancel_alarm_req.

Create using a_ipc_init_rtc_cancel_alarm_rsp().

Message type is A_IPC_MSG_RTC_CANCEL_ALARM_RSP.

Data Fields
a_ipc_enum_rtc_result result Result of the operation.

◆ a_ipc_msg_rtc_free_alarm_req_norsp

struct a_ipc_msg_rtc_free_alarm_req_norsp

Free RTC alarm ID.

This will also cancel an outstanding alarm tied to the ID.

Create using a_ipc_init_rtc_free_alarm_req_norsp().

Message type is A_IPC_MSG_RTC_FREE_ALARM_REQ_NORSP.

Data Fields
uint8_t alarm_id Alarm ID.

◆ a_ipc_msg_rtc_alarm_notification_publish_ind

struct a_ipc_msg_rtc_alarm_notification_publish_ind

RTC alarm notification event.

Sent when an alarm has been expired.

Alarms notifications will be sent when the system is running and when the system is in suspend-to-RAM mode.

Subscribe using a_ipc_msg_rtc_alarm_notification_subscribe_req and unsubscribe using a_ipc_msg_rtc_alarm_notification_unsubscribe_req_norsp.

Create using a_ipc_init_rtc_alarm_notification_publish_ind().

Message type is A_IPC_MSG_RTC_ALARM_NOTIFICATION_PUBLISH_IND.

Data Fields
uint8_t alarm_id Alarm ID.

◆ a_ipc_msg_rtc_alarm_notification_subscribe_req

struct a_ipc_msg_rtc_alarm_notification_subscribe_req

◆ a_ipc_msg_rtc_alarm_notification_subscribe_rsp

struct a_ipc_msg_rtc_alarm_notification_subscribe_rsp
Data Fields
a_ipc_enum_ipc_subscribe_result result The result of the subscription request.

◆ a_ipc_msg_rtc_alarm_notification_unsubscribe_req_norsp

struct a_ipc_msg_rtc_alarm_notification_unsubscribe_req_norsp

Unsubscribe from updates for rtc_alarm_notification.

a_ipc_msg_rtc_alarm_notification_publish_ind will no longer be received.

Create using a_ipc_init_rtc_alarm_notification_unsubscribe_req_norsp().

Message type is A_IPC_MSG_RTC_ALARM_NOTIFICATION_UNSUBSCRIBE_REQ_NORSP.

Enumeration Type Documentation

◆ a_ipc_enum_rtc_result

Result codes.

Enumerator
A_IPC_ENUM_RTC_RESULT_OK 

OK.

A_IPC_ENUM_RTC_RESULT_MAX_ALARMS_EXCEEDED 

Max alarms exceeded.

A_IPC_ENUM_RTC_RESULT_INVALID_ALARM_ID 

Invalid alarm id.

A_IPC_ENUM_RTC_RESULT_ERROR_UNKNOWN 

Unknown error.

Function Documentation

◆ a_ipc_init_rtc_alarm_notification_publish_ind()

A_IPC_RESULT a_ipc_init_rtc_alarm_notification_publish_ind ( a_ipc_msg msg)

Initialize the message buffer to contain a_ipc_msg_rtc_alarm_notification_publish_ind.

msg->info.type will be A_IPC_MSG_RTC_ALARM_NOTIFICATION_PUBLISH_IND.

This function can be called on an already initialized message to change its type.

Parameters
msgThe message buffer to initialize

◆ a_ipc_init_rtc_alarm_notification_subscribe_req()

A_IPC_RESULT a_ipc_init_rtc_alarm_notification_subscribe_req ( a_ipc_msg msg)

Initialize the message buffer to contain a_ipc_msg_rtc_alarm_notification_subscribe_req.

msg->info.type will be A_IPC_MSG_RTC_ALARM_NOTIFICATION_SUBSCRIBE_REQ.

This function can be called on an already initialized message to change its type.

Parameters
msgThe message buffer to initialize

◆ a_ipc_init_rtc_alarm_notification_subscribe_rsp()

A_IPC_RESULT a_ipc_init_rtc_alarm_notification_subscribe_rsp ( a_ipc_msg msg)

Initialize the message buffer to contain a_ipc_msg_rtc_alarm_notification_subscribe_rsp.

msg->info.type will be A_IPC_MSG_RTC_ALARM_NOTIFICATION_SUBSCRIBE_RSP.

This function can be called on an already initialized message to change its type.

Parameters
msgThe message buffer to initialize

◆ a_ipc_init_rtc_alarm_notification_unsubscribe_req_norsp()

A_IPC_RESULT a_ipc_init_rtc_alarm_notification_unsubscribe_req_norsp ( a_ipc_msg msg)

Initialize the message buffer to contain a_ipc_msg_rtc_alarm_notification_unsubscribe_req_norsp.

msg->info.type will be A_IPC_MSG_RTC_ALARM_NOTIFICATION_UNSUBSCRIBE_REQ_NORSP.

This function can be called on an already initialized message to change its type.

Parameters
msgThe message buffer to initialize

◆ a_ipc_init_rtc_allocate_alarm_req()

A_IPC_RESULT a_ipc_init_rtc_allocate_alarm_req ( a_ipc_msg msg)

Initialize the message buffer to contain a_ipc_msg_rtc_allocate_alarm_req.

msg->info.type will be A_IPC_MSG_RTC_ALLOCATE_ALARM_REQ.

This function can be called on an already initialized message to change its type.

Parameters
msgThe message buffer to initialize

◆ a_ipc_init_rtc_allocate_alarm_rsp()

A_IPC_RESULT a_ipc_init_rtc_allocate_alarm_rsp ( a_ipc_msg msg)

Initialize the message buffer to contain a_ipc_msg_rtc_allocate_alarm_rsp.

msg->info.type will be A_IPC_MSG_RTC_ALLOCATE_ALARM_RSP.

This function can be called on an already initialized message to change its type.

Parameters
msgThe message buffer to initialize

◆ a_ipc_init_rtc_cancel_alarm_req()

A_IPC_RESULT a_ipc_init_rtc_cancel_alarm_req ( a_ipc_msg msg)

Initialize the message buffer to contain a_ipc_msg_rtc_cancel_alarm_req.

msg->info.type will be A_IPC_MSG_RTC_CANCEL_ALARM_REQ.

This function can be called on an already initialized message to change its type.

Parameters
msgThe message buffer to initialize

◆ a_ipc_init_rtc_cancel_alarm_rsp()

A_IPC_RESULT a_ipc_init_rtc_cancel_alarm_rsp ( a_ipc_msg msg)

Initialize the message buffer to contain a_ipc_msg_rtc_cancel_alarm_rsp.

msg->info.type will be A_IPC_MSG_RTC_CANCEL_ALARM_RSP.

This function can be called on an already initialized message to change its type.

Parameters
msgThe message buffer to initialize

◆ a_ipc_init_rtc_free_alarm_req_norsp()

A_IPC_RESULT a_ipc_init_rtc_free_alarm_req_norsp ( a_ipc_msg msg)

Initialize the message buffer to contain a_ipc_msg_rtc_free_alarm_req_norsp.

msg->info.type will be A_IPC_MSG_RTC_FREE_ALARM_REQ_NORSP.

This function can be called on an already initialized message to change its type.

Parameters
msgThe message buffer to initialize

◆ a_ipc_init_rtc_get_time_req()

A_IPC_RESULT a_ipc_init_rtc_get_time_req ( a_ipc_msg msg)

Initialize the message buffer to contain a_ipc_msg_rtc_get_time_req.

msg->info.type will be A_IPC_MSG_RTC_GET_TIME_REQ.

This function can be called on an already initialized message to change its type.

Parameters
msgThe message buffer to initialize

◆ a_ipc_init_rtc_get_time_rsp()

A_IPC_RESULT a_ipc_init_rtc_get_time_rsp ( a_ipc_msg msg)

Initialize the message buffer to contain a_ipc_msg_rtc_get_time_rsp.

msg->info.type will be A_IPC_MSG_RTC_GET_TIME_RSP.

This function can be called on an already initialized message to change its type.

Parameters
msgThe message buffer to initialize

◆ a_ipc_init_rtc_set_alarm_req()

A_IPC_RESULT a_ipc_init_rtc_set_alarm_req ( a_ipc_msg msg)

Initialize the message buffer to contain a_ipc_msg_rtc_set_alarm_req.

msg->info.type will be A_IPC_MSG_RTC_SET_ALARM_REQ.

This function can be called on an already initialized message to change its type.

Parameters
msgThe message buffer to initialize

◆ a_ipc_init_rtc_set_alarm_rsp()

A_IPC_RESULT a_ipc_init_rtc_set_alarm_rsp ( a_ipc_msg msg)

Initialize the message buffer to contain a_ipc_msg_rtc_set_alarm_rsp.

msg->info.type will be A_IPC_MSG_RTC_SET_ALARM_RSP.

This function can be called on an already initialized message to change its type.

Parameters
msgThe message buffer to initialize

Variable Documentation

◆ alarm_id [1/5]

uint8_t a_ipc_msg_rtc_allocate_alarm_rsp::alarm_id

Alarm ID, valid values are: 0-19.

◆ alarm_id [2/5]

uint8_t a_ipc_msg_rtc_set_alarm_req::alarm_id

The ID to set alarm for, must be allocated with 'rtc_allocate_alarm'.

◆ alarm_id [3/5]

uint8_t a_ipc_msg_rtc_cancel_alarm_req::alarm_id

Alarm ID.

◆ alarm_id [4/5]

uint8_t a_ipc_msg_rtc_free_alarm_req_norsp::alarm_id

Alarm ID.

◆ alarm_id [5/5]

uint8_t a_ipc_msg_rtc_alarm_notification_publish_ind::alarm_id

Alarm ID.

◆ result [1/5]

a_ipc_enum_rtc_result a_ipc_msg_rtc_get_time_rsp::result

Result of the operation.

◆ result [2/5]

a_ipc_enum_rtc_result a_ipc_msg_rtc_allocate_alarm_rsp::result

Result of the operation.

◆ result [3/5]

a_ipc_enum_rtc_result a_ipc_msg_rtc_set_alarm_rsp::result

Result of the operation.

◆ result [4/5]

a_ipc_enum_rtc_result a_ipc_msg_rtc_cancel_alarm_rsp::result

Result of the operation.

◆ result [5/5]

a_ipc_enum_ipc_subscribe_result a_ipc_msg_rtc_alarm_notification_subscribe_rsp::result

The result of the subscription request.

◆ time [1/2]

uint32_t a_ipc_msg_rtc_get_time_rsp::time

Unix epoch time.

◆ time [2/2]

uint32_t a_ipc_msg_rtc_set_alarm_req::time

Unix epoch time.