36#ifndef __INCLUDE_SENSING_SENSOR_API_H
37#define __INCLUDE_SENSING_SENSOR_API_H
48#include <sdk/config.h>
57#include "memutils/message/MsgPacket.h"
104 unsigned int fs : 16;
138 unsigned int fs : 16;
145 unsigned int get_self(
void)
169#ifdef CONFIG_SENSING_MANAGER_POWERCTRL
184 unsigned int self_id);
200#ifdef CONFIG_SENSING_MANAGER_POWERCTRL
204 unsigned int get_self(
void)
209 unsigned int get_subscriptions(
void)
211 return subscriptions;
225 unsigned int get_self(
void)
243 unsigned int get_self(
void)
248 unsigned int get_subscriptions(
void)
250 return subscriptions;
267 unsigned int get_self(
void)
274#ifdef CONFIG_SENSING_MANAGER_POWERCTRL
286 unsigned int get_self(
void)
291 unsigned int get_subscriptions(
void)
293 return subscriptions;
314#ifdef CONFIG_SENSING_MANAGER_POWERCTRL
395#ifdef CONFIG_SENSING_MANAGER_POWERCTRL
Memory Handler Class for "Memory Manager Lite". This is only wrapper class for convert project-specif...
Definition: MemManager.h:107
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...
void SS_SendSensorRelease(FAR sensor_command_release_t *packet)
Unresister the sensor client from Sensor Manager.
bool(* sensor_data_callback_t)(sensor_command_data_t &)
A function pointer for sensor data (without mem handle) callback.
Definition: sensor_api.h:158
SensorCommandCode
Sensor Command Code for each sensors.
Definition: sensor_api.h:309
void SS_SendSensorChangeSubscription(FAR sensor_command_change_subscription_t *packet)
Change subscriptions of sensor client.
void SS_SendSensorSetPower(FAR sensor_command_power_t *packet)
When sensor power mode are controlled, this function can set. (If you enable CONFIG_SENSING_MANAGER_P...
bool(* sensor_data_mh_callback_t)(sensor_command_data_mh_t &)
A function pointer for sensor data with MemHandle callback.
Definition: sensor_api.h:165
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 A...
void SS_SendSensorDataMH(FAR sensor_command_data_mh_t *packet)
Sender function to Sensor Manager with MemHandle Send data is publish to own subscriber.
void(* api_response_callback_t)(unsigned int code, unsigned int ercd, unsigned int self_id)
A function pointer for API response callback.
Definition: sensor_api.h:182
bool(* sensor_power_callback_t)(bool)
A function pointer for power control callback.
Definition: sensor_api.h:174
void SS_SendSensorData(FAR sensor_command_data_t *packet)
Sender function to Sensor Manager without MemHandle. Send data is publish to own subscriber.
void SS_SendSensorResult(FAR sensor_command_result_t *packet)
Sender function to Sensor Manager without MemHandle. Send result data is publish to own subscriber.
bool SS_DeactivateSensorSubSystem()
Deativation function for sensor manager.
@ SensorCommandMum
Definition: sensor_api.h:338
@ SetPower
Definition: sensor_api.h:317
@ ResisterClient
Definition: sensor_api.h:310
@ SendData
Definition: sensor_api.h:326
@ ClearPower
Definition: sensor_api.h:321
@ ReleaseClient
Definition: sensor_api.h:311
@ ChangeSubscription
Definition: sensor_api.h:312
@ SendResult
Definition: sensor_api.h:334
@ SendDataMH
Definition: sensor_api.h:330
The command of change subscription of client.
Definition: sensor_api.h:237
bool add
Definition: sensor_api.h:241
sensor_command_header_t header
Definition: sensor_api.h:238
unsigned int subscriptions
Definition: sensor_api.h:240
unsigned int self
Definition: sensor_api.h:239
The command of send some sensor data with MemHandle to the sensor manager. This function only can cal...
Definition: sensor_api.h:134
sensor_command_header_t header
Definition: sensor_api.h:135
unsigned int time
Definition: sensor_api.h:137
unsigned int fs
Definition: sensor_api.h:138
unsigned int size
Definition: sensor_api.h:139
MemMgrLite::MemHandle mh
Definition: sensor_api.h:143
unsigned int self
Definition: sensor_api.h:136
The command of send some sensor data without MemHandle to the sensor manager.
Definition: sensor_api.h:99
uint32_t data
Definition: sensor_api.h:111
unsigned int get_self(void)
Definition: sensor_api.h:117
sensor_command_header_t header
Definition: sensor_api.h:100
unsigned int time
Definition: sensor_api.h:103
unsigned int fs
Definition: sensor_api.h:104
void * adr
Definition: sensor_api.h:112
bool is_ptr
Definition: sensor_api.h:107
unsigned int size
Definition: sensor_api.h:105
unsigned int self
Definition: sensor_api.h:102
Sensor Commnad Header. All sensor command has this header.
Definition: sensor_api.h:77
unsigned int reserve
Definition: sensor_api.h:80
unsigned int get_code(void)
Definition: sensor_api.h:84
unsigned int size
Definition: sensor_api.h:78
unsigned int code
Definition: sensor_api.h:79
The command of setting sleep mode to sensor.
Definition: sensor_api.h:280
sensor_command_header_t header
Definition: sensor_api.h:281
unsigned int subscriptions
Definition: sensor_api.h:284
unsigned int self
Definition: sensor_api.h:283
The command of resister a sensor.
Definition: sensor_api.h:192
sensor_power_callback_t callback_pw
Definition: sensor_api.h:201
sensor_command_header_t header
Definition: sensor_api.h:193
sensor_data_mh_callback_t callback_mh
Definition: sensor_api.h:198
unsigned int subscriptions
Definition: sensor_api.h:196
sensor_data_callback_t callback
Definition: sensor_api.h:197
unsigned int self
Definition: sensor_api.h:195
The command of release the sensor.
Definition: sensor_api.h:221
sensor_command_header_t header
Definition: sensor_api.h:222
unsigned int self
Definition: sensor_api.h:223
The command of release the sensor.
Definition: sensor_api.h:260
sensor_command_header_t header
Definition: sensor_api.h:261
unsigned int data
Definition: sensor_api.h:265
unsigned int time
Definition: sensor_api.h:264
unsigned int self
Definition: sensor_api.h:263