ACU6 Device API
actia.h
Go to the documentation of this file.
1 // Copyright (C) 2019 Actia Nordic AB. All rights reserved.
3 #ifndef LIBS_ACTIA_INCLUDE_ACTIA_H_
4 #define LIBS_ACTIA_INCLUDE_ACTIA_H_
5 
6 #include <stdint.h>
7 #include <sys/timerfd.h>
8 
9 #include "ipc.h"
10 #include "ipc_generated.h"
11 #include "log.h"
12 
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16 
19 enum {
22  A_SERVICE_ID_RESERVED = 0,
25  /* Public services, accessible by the Guest VMs */
26 
61 };
62 
67 #define A_SERVICE_ID_DIGITAL_OUTPUTS A_SERVICE_ID_DIGITAL_INPUT_OUTPUT
68 
80 #define a_membersof(arr) (sizeof(arr) / sizeof((arr)[0]))
81 
91 /* clang-format off */
92 __attribute__((deprecated("DEPR0001 - will be removed in 2024, please use timerfd_create + timerfd_settime"))) int
93 a_timer_create(struct itimerspec ts);
94 /* clang-format on */
95 
110 __attribute__((deprecated("DEPR0001 - will be removed in 2024, please use epoll_ctl"))) void
111 a_loop_add_fd(int epfd, int fd, uint32_t events);
112 
124 __attribute__((deprecated("DEPR0001 - will be removed in 2024, please use epoll_ctl"))) void
125 a_loop_del_fd(int epfd, int fd);
126 
141 __attribute__((deprecated("DEPR0001 - will be removed in 2024, please use epoll_ctl"))) void
142 a_loop_mod_fd(int epfd, int fd, uint32_t events);
143 
144 /* End of utility group */
166 
167 #ifdef __cplusplus
168 }
169 #endif
170 
171 #endif // LIBS_ACTIA_INCLUDE_ACTIA_H_
@ A_SERVICE_ID_IMU
IMU service.
Definition: actia.h:40
@ A_SERVICE_ID_CAN
CAN configuration service.
Definition: actia.h:38
@ A_SERVICE_ID_RTC
RTC manager.
Definition: actia.h:52
@ A_SERVICE_ID_POWER
Power manager.
Definition: actia.h:44
@ A_SERVICE_ID_ETHERNET
Ethernet manager.
Definition: actia.h:54
@ A_SERVICE_ID_WIFI
WIFI.
Definition: actia.h:46
@ A_SERVICE_ID_BTMGR
BT manager.
Definition: actia.h:58
@ A_SERVICE_ID_CONNECTIVITY
Connectivity service.
Definition: actia.h:60
@ A_SERVICE_ID_LOCATION
Location service.
Definition: actia.h:36
@ A_SERVICE_ID_DIGITAL_INPUT_OUTPUT
DIGITAL_INPUT_OUTPUT service.
Definition: actia.h:48
@ A_SERVICE_ID_SOFTWARE_UPDATE
Software Update Service.
Definition: actia.h:30
@ A_SERVICE_ID_MQTT_HANDLER
MQTT manager.
Definition: actia.h:56
@ A_SERVICE_ID_ANALOG_INPUTS
ANALOG_INPUTS service.
Definition: actia.h:42
@ A_SERVICE_ID_CELLULAR
Cellular service.
Definition: actia.h:34
@ A_SERVICE_ID_LOG
Logging control service.
Definition: actia.h:32
@ A_SERVICE_ID_SYSTEM
System Service.
Definition: actia.h:28
@ A_SERVICE_ID_BUB
BUB service.
Definition: actia.h:50
int a_open_software_update_stream(void)
Open a stream for sending update packages to Software Update.
void a_loop_del_fd(int epfd, int fd)
Remove a file descriptor from an epoll file descriptor.
int a_timer_create(struct itimerspec ts)
Create a timerfd with a given time specification.
void a_loop_add_fd(int epfd, int fd, uint32_t events)
Add a file descriptor to an epoll file descriptor.
void a_loop_mod_fd(int epfd, int fd, uint32_t events)
Change the events listened for on a file descriptor added to epoll.