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

Location Service. More...

Data Structures

struct  a_ipc_dyn_array_enum_location_result
 Dynamic-length array of a_ipc_enum_location_result. More...
 
struct  a_ipc_msg_location_request_req
 Request the location service to be on. More...
 
struct  a_ipc_msg_location_request_rsp
 Location request response. More...
 
struct  a_ipc_msg_location_release_req_norsp
 Release any requested location service for given user user. More...
 
struct  a_ipc_msg_location_publish_ind
 This message contains the latest known location data. More...
 
struct  a_ipc_msg_location_trigger_gnss_cold_start_req
 Trigger gnss cold start request. More...
 
struct  a_ipc_msg_location_trigger_gnss_cold_start_rsp
 Trigger gnss cold start response. More...
 
struct  a_ipc_msg_location_unsubscribe_req_norsp
 Unsubscribe from updates for location. More...
 

Enumerations

enum  a_ipc_enum_location_result { A_IPC_ENUM_LOCATION_RESULT_OK , A_IPC_ENUM_LOCATION_RESULT_ERROR , A_IPC_ENUM_LOCATION_RESULT_ERROR_NAD_IS_BOOTING }
 Location result. More...
 

Functions

A_IPC_RESULT a_ipc_init_location_request_req (a_ipc_msg *msg, uint32_t user_maxlength)
 Initialize the message buffer to contain a_ipc_msg_location_request_req. More...
 
A_IPC_RESULT a_ipc_init_location_request_rsp (a_ipc_msg *msg)
 Initialize the message buffer to contain a_ipc_msg_location_request_rsp. More...
 
A_IPC_RESULT a_ipc_init_location_release_req_norsp (a_ipc_msg *msg, uint32_t user_maxlength)
 Initialize the message buffer to contain a_ipc_msg_location_release_req_norsp. More...
 
A_IPC_RESULT a_ipc_init_location_publish_ind (a_ipc_msg *msg)
 Initialize the message buffer to contain a_ipc_msg_location_publish_ind. More...
 
A_IPC_RESULT a_ipc_init_location_trigger_gnss_cold_start_req (a_ipc_msg *msg)
 Initialize the message buffer to contain a_ipc_msg_location_trigger_gnss_cold_start_req. More...
 
A_IPC_RESULT a_ipc_init_location_trigger_gnss_cold_start_rsp (a_ipc_msg *msg)
 Initialize the message buffer to contain a_ipc_msg_location_trigger_gnss_cold_start_rsp. More...
 
A_IPC_RESULT a_ipc_init_location_subscribe_req (a_ipc_msg *msg)
 Initialize the message buffer to contain a_ipc_msg_location_subscribe_req. More...
 
A_IPC_RESULT a_ipc_init_location_subscribe_rsp (a_ipc_msg *msg)
 Initialize the message buffer to contain a_ipc_msg_location_subscribe_rsp. More...
 
A_IPC_RESULT a_ipc_init_location_unsubscribe_req_norsp (a_ipc_msg *msg)
 Initialize the message buffer to contain a_ipc_msg_location_unsubscribe_req_norsp. More...
 

Detailed Description

Location Service.

This page contains documentation of the Location Service API.


Data Structure Documentation

◆ a_ipc_dyn_array_enum_location_result

struct a_ipc_dyn_array_enum_location_result

Dynamic-length array of a_ipc_enum_location_result.

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

◆ a_ipc_msg_location_request_req

struct a_ipc_msg_location_request_req

Request the location service to be on.

It is on if one or more users requests it. user is the requesters system wide unique name.

Response is delivered in a_ipc_msg_location_request_rsp.

Create using a_ipc_init_location_request_req().

Message type is A_IPC_MSG_LOCATION_REQUEST_REQ.

Data Fields
a_ipc_dyn_string user User identifier, max 15 characters long.

◆ a_ipc_msg_location_request_rsp

struct a_ipc_msg_location_request_rsp

Location request response.

Sent in response to a_ipc_msg_location_request_req.

Create using a_ipc_init_location_request_rsp().

Message type is A_IPC_MSG_LOCATION_REQUEST_RSP.

Data Fields
a_ipc_enum_location_result result Result of the operation.

◆ a_ipc_msg_location_release_req_norsp

struct a_ipc_msg_location_release_req_norsp

Release any requested location service for given user user.

Create using a_ipc_init_location_release_req_norsp().

Message type is A_IPC_MSG_LOCATION_RELEASE_REQ_NORSP.

Data Fields
a_ipc_dyn_string user User identifier, max 15 characters long.

◆ a_ipc_msg_location_publish_ind

struct a_ipc_msg_location_publish_ind

This message contains the latest known location data.

It is published periodically if any user has requested the location service. It is also possible to get the raw NMEA sentences by connecting to IP: 198.18.2.1, tcp-port: 1001. The NMEA stream can be used as input for gpsd.

Subscribe using a_ipc_msg_location_subscribe_req and unsubscribe using a_ipc_msg_location_unsubscribe_req_norsp.

Create using a_ipc_init_location_publish_ind().

Message type is A_IPC_MSG_LOCATION_PUBLISH_IND.

Data Fields
int32_t altitude Altitude in decimeter.
int32_t bearing Track angle in degrees * 10.

This is the "Track angle in degrees" field in the NMEA 0183 RMC sentence.

Example: 844 => 84.4 degrees

int32_t latitude Latitude in degrees * 10^6.

Example 1: 59293555 => 59.293555 degrees Example 2: -22973457 => -22.973457 degrees

int32_t longitude Longitude in degrees * 10^6.

Example 1: 18083011 => 18.083011 degrees Example 2: -43185185 => -43.185185 degrees

uint32_t time Time in seconds since Epoch (January 1, 1970).

◆ a_ipc_msg_location_trigger_gnss_cold_start_req

struct a_ipc_msg_location_trigger_gnss_cold_start_req

Trigger gnss cold start request.

Stops gnss engine, clears gnss data and restarts gnss engine if location is requested

Response is delivered in a_ipc_msg_location_trigger_gnss_cold_start_rsp.

Create using a_ipc_init_location_trigger_gnss_cold_start_req().

Message type is A_IPC_MSG_LOCATION_TRIGGER_GNSS_COLD_START_REQ.

◆ a_ipc_msg_location_trigger_gnss_cold_start_rsp

struct a_ipc_msg_location_trigger_gnss_cold_start_rsp
Data Fields
a_ipc_enum_location_result result Result of the operation.

◆ a_ipc_msg_location_subscribe_req

struct a_ipc_msg_location_subscribe_req

Subscribe to updates for location.

a_ipc_msg_location_publish_ind will be received until a_ipc_msg_location_unsubscribe_req_norsp is sent.

Response is delivered in a_ipc_msg_location_subscribe_rsp.

Create using a_ipc_init_location_subscribe_req().

Message type is A_IPC_MSG_LOCATION_SUBSCRIBE_REQ.

◆ a_ipc_msg_location_subscribe_rsp

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

◆ a_ipc_msg_location_unsubscribe_req_norsp

struct a_ipc_msg_location_unsubscribe_req_norsp

Unsubscribe from updates for location.

a_ipc_msg_location_publish_ind will no longer be received.

Create using a_ipc_init_location_unsubscribe_req_norsp().

Message type is A_IPC_MSG_LOCATION_UNSUBSCRIBE_REQ_NORSP.

Enumeration Type Documentation

◆ a_ipc_enum_location_result

Location result.

Enumerator
A_IPC_ENUM_LOCATION_RESULT_OK 

OK.

A_IPC_ENUM_LOCATION_RESULT_ERROR 

Error.

A_IPC_ENUM_LOCATION_RESULT_ERROR_NAD_IS_BOOTING 

Nad is booting.

Function Documentation

◆ a_ipc_init_location_publish_ind()

A_IPC_RESULT a_ipc_init_location_publish_ind ( a_ipc_msg msg)

Initialize the message buffer to contain a_ipc_msg_location_publish_ind.

msg->info.type will be A_IPC_MSG_LOCATION_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_location_release_req_norsp()

A_IPC_RESULT a_ipc_init_location_release_req_norsp ( a_ipc_msg msg,
uint32_t  user_maxlength 
)

Initialize the message buffer to contain a_ipc_msg_location_release_req_norsp.

msg->info.type will be A_IPC_MSG_LOCATION_RELEASE_REQ_NORSP.

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

Parameters
msgThe message buffer to initialize
user_maxlengthThe maximum string length for user in the message.

◆ a_ipc_init_location_request_req()

A_IPC_RESULT a_ipc_init_location_request_req ( a_ipc_msg msg,
uint32_t  user_maxlength 
)

Initialize the message buffer to contain a_ipc_msg_location_request_req.

msg->info.type will be A_IPC_MSG_LOCATION_REQUEST_REQ.

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

Parameters
msgThe message buffer to initialize
user_maxlengthThe maximum string length for user in the message.

◆ a_ipc_init_location_request_rsp()

A_IPC_RESULT a_ipc_init_location_request_rsp ( a_ipc_msg msg)

Initialize the message buffer to contain a_ipc_msg_location_request_rsp.

msg->info.type will be A_IPC_MSG_LOCATION_REQUEST_RSP.

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

Parameters
msgThe message buffer to initialize

◆ a_ipc_init_location_subscribe_req()

A_IPC_RESULT a_ipc_init_location_subscribe_req ( a_ipc_msg msg)

Initialize the message buffer to contain a_ipc_msg_location_subscribe_req.

msg->info.type will be A_IPC_MSG_LOCATION_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_location_subscribe_rsp()

A_IPC_RESULT a_ipc_init_location_subscribe_rsp ( a_ipc_msg msg)

Initialize the message buffer to contain a_ipc_msg_location_subscribe_rsp.

msg->info.type will be A_IPC_MSG_LOCATION_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_location_trigger_gnss_cold_start_req()

A_IPC_RESULT a_ipc_init_location_trigger_gnss_cold_start_req ( a_ipc_msg msg)

Initialize the message buffer to contain a_ipc_msg_location_trigger_gnss_cold_start_req.

msg->info.type will be A_IPC_MSG_LOCATION_TRIGGER_GNSS_COLD_START_REQ.

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

Parameters
msgThe message buffer to initialize

◆ a_ipc_init_location_trigger_gnss_cold_start_rsp()

A_IPC_RESULT a_ipc_init_location_trigger_gnss_cold_start_rsp ( a_ipc_msg msg)

Initialize the message buffer to contain a_ipc_msg_location_trigger_gnss_cold_start_rsp.

msg->info.type will be A_IPC_MSG_LOCATION_TRIGGER_GNSS_COLD_START_RSP.

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

Parameters
msgThe message buffer to initialize

◆ a_ipc_init_location_unsubscribe_req_norsp()

A_IPC_RESULT a_ipc_init_location_unsubscribe_req_norsp ( a_ipc_msg msg)

Initialize the message buffer to contain a_ipc_msg_location_unsubscribe_req_norsp.

msg->info.type will be A_IPC_MSG_LOCATION_UNSUBSCRIBE_REQ_NORSP.

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

Parameters
msgThe message buffer to initialize

Variable Documentation

◆ altitude

int32_t a_ipc_msg_location_publish_ind::altitude

Altitude in decimeter.

◆ bearing

int32_t a_ipc_msg_location_publish_ind::bearing

Track angle in degrees * 10.

This is the "Track angle in degrees" field in the NMEA 0183 RMC sentence.

Example: 844 => 84.4 degrees

◆ latitude

int32_t a_ipc_msg_location_publish_ind::latitude

Latitude in degrees * 10^6.

Example 1: 59293555 => 59.293555 degrees Example 2: -22973457 => -22.973457 degrees

◆ longitude

int32_t a_ipc_msg_location_publish_ind::longitude

Longitude in degrees * 10^6.

Example 1: 18083011 => 18.083011 degrees Example 2: -43185185 => -43.185185 degrees

◆ result [1/3]

a_ipc_enum_location_result a_ipc_msg_location_request_rsp::result

Result of the operation.

◆ result [2/3]

a_ipc_enum_location_result a_ipc_msg_location_trigger_gnss_cold_start_rsp::result

Result of the operation.

◆ result [3/3]

a_ipc_enum_ipc_subscribe_result a_ipc_msg_location_subscribe_rsp::result

The result of the subscription request.

◆ time

uint32_t a_ipc_msg_location_publish_ind::time

Time in seconds since Epoch (January 1, 1970).

◆ user [1/2]

a_ipc_dyn_string a_ipc_msg_location_request_req::user

User identifier, max 15 characters long.

◆ user [2/2]

a_ipc_dyn_string a_ipc_msg_location_release_req_norsp::user

User identifier, max 15 characters long.