Developer World
Spresense SDK Library release-v1.2.0-627f51e
Classes | Typedefs | Enumerations | Functions
Sensor Manager

Classes

struct  sensor_command_header_t
 Sensor Commnad Header. All sensor command has this header. More...
 
struct  sensor_command_data_t
 The command of send some sensor data without MemHandle to the sensor manager. More...
 
struct  sensor_command_register_t
 The command of resister a sensor. More...
 
struct  sensor_command_release_t
 The command of release the sensor. More...
 
struct  sensor_command_change_subscription_t
 The command of change subscription of client. More...
 
struct  sensor_command_result_t
 The command of release the sensor. More...
 

Typedefs

typedef bool(* sensor_data_callback_t) (sensor_command_data_t &)
 A function pointer for sensor data (without mem handle) callback.
 
typedef bool(* sensor_data_mh_callback_t) (sensor_command_data_mh_t &)
 A function pointer for sensor data with MemHandle callback.
 
typedef void(* api_response_callback_t) (unsigned int code, unsigned int ercd, unsigned int self_id)
 A function pointer for API response callback.
 

Enumerations

enum  SensorCommandCode {
  ResisterClient = 0, ReleaseClient, ChangeSubscription, SendData,
  SendDataMH, SendResult, SensorCommandMum
}
 Sensor Command Code for each sensors. More...
 

Functions

bool SS_ActivateSensorSubSystem (MsgQueId selfMId, api_response_callback_t callback)
 Activation function for sensor manager. Before using a sensor manager, it is necessary to call this API. More...
 
bool SS_DeactivateSensorSubSystem ()
 Deativation function for sensor manager. More...
 
void SS_SendSensorData (FAR sensor_command_data_t *packet)
 Sender function to Sensor Manager without MemHandle. Send data is publish to own subscriber. More...
 
void SS_SendSensorResult (FAR sensor_command_result_t *packet)
 Sender function to Sensor Manager without MemHandle. Send result data is publish to own subscriber. More...
 
void SS_SendSensorResister (FAR sensor_command_register_t *packet)
 Resister a sensor client to Sensor Manager as subscriber. Registed sensor can recieve a "publish data" from required sensors. When data is published, a registed callback function will be called. More...
 
void SS_SendSensorRelease (FAR sensor_command_release_t *packet)
 Unresister the sensor client from Sensor Manager. More...
 
void SS_SendSensorChangeSubscription (FAR sensor_command_change_subscription_t *packet)
 Change subscriptions of sensor client. More...
 

Detailed Description

Enumeration Type Documentation

◆ SensorCommandCode

Sensor Command Code for each sensors.

Enumerator
ResisterClient 

Resister sensor client

ReleaseClient 

Reales sensor client

ChangeSubscription 

Change subscriptions

SendData 

Sensing Data send

SendDataMH 

Sensing Data send

SendResult 

Logical sensing result send

SensorCommandMum 

Number of sensor commands

Function Documentation

◆ SS_ActivateSensorSubSystem()

bool SS_ActivateSensorSubSystem ( MsgQueId  selfMId,
api_response_callback_t  callback 
)

Activation function for sensor manager. Before using a sensor manager, it is necessary to call this API.

Returns
true: success

◆ SS_DeactivateSensorSubSystem()

bool SS_DeactivateSensorSubSystem ( )

Deativation function for sensor manager.

Returns
sucess true

◆ SS_SendSensorChangeSubscription()

void SS_SendSensorChangeSubscription ( FAR sensor_command_change_subscription_t packet)

Change subscriptions of sensor client.

Note
Only change subscription. Effective to registered sensors.
Parameters
[in]packet
Returns
void

◆ SS_SendSensorData()

void SS_SendSensorData ( FAR sensor_command_data_t packet)

Sender function to Sensor Manager without MemHandle. Send data is publish to own subscriber.

Note
This API send address of publish data.
Parameters
[in]packet
Returns
void

◆ SS_SendSensorRelease()

void SS_SendSensorRelease ( FAR sensor_command_release_t packet)

Unresister the sensor client from Sensor Manager.

Note
If any sensors sbsribing own, then error occurs.
Parameters
[in]packet
Returns
void

◆ SS_SendSensorResister()

void SS_SendSensorResister ( FAR sensor_command_register_t packet)

Resister a sensor client to Sensor Manager as subscriber. Registed sensor can recieve a "publish data" from required sensors. When data is published, a registed callback function will be called.

Note
If there is not required sensor, then error occurs.
Parameters
[in]packet
Returns
void

◆ SS_SendSensorResult()

void SS_SendSensorResult ( FAR sensor_command_result_t packet)

Sender function to Sensor Manager without MemHandle. Send result data is publish to own subscriber.

Note
This API send result data of sensor process.
Parameters
[in]packet
Returns
void