Sensor Server#

Used to support the reporting functionality of a node with a set of sensors whose data is available on the network. It also has a corresponding Sensor Setup Server model which is present on the same element. This component implements temperature, people count, and illuminance measurements. It provides callback functions for each property. This component is prepared for integration into SOC applications. This is a No-Code component if using a Silicon Labs device and the relevant components for their respective hardware.

Macros#

#define
SL_BTMESH_SENSOR_POWER_CONSUMPTION_VALUE_UNKNOWN (0xFFFFFFFF)

Represents an unknown value for power consumption sensor data.

#define
SL_BTMESH_SENSOR_POWER_CONSUMPTION_VALUE_INVALID (0xFFFFFFFE)

Represents an invalid value for power consumption sensor data.

#define
SL_BTMESH_SENSOR_LIGHT_VALUE_UNKNOWN (0xFFFFFFFF)

Represents an unknown light measurement value for the light sensor.

#define
SL_BTMESH_SENSOR_TEMPERATURE_VALUE_UNKNOWN (0x7F)

Represents an unknown temperature value for the temperature sensor.

Function Documentation#

sl_btmesh_sensor_server_node_init#

void sl_btmesh_sensor_server_node_init (void )
Parameters
TypeDirectionArgument NameDescription
voidN/A

Initialize Sensor Server.

This function is called automatically after enabling the component.


sl_btmesh_handle_sensor_server_events#

void sl_btmesh_handle_sensor_server_events (sl_btmesh_msg_t * pEvt)
Parameters
TypeDirectionArgument NameDescription
sl_btmesh_msg_t *[in]pEvt

Sensor server event to handle

Handle Sensor Server events.

This function is called automatically after enabling the component.


sl_btmesh_sensor_server_on_temperature_measurement#

void sl_btmesh_sensor_server_on_temperature_measurement (temperature_8_t temperature)
Parameters
TypeDirectionArgument NameDescription
temperature_8_t[in]temperature

Temperature value in 0.5 degree Celsius steps

Called when a temperature measurement is done Note

  • If no implementation is provided in the application then a default weak implementation if provided which is a no-operation. (empty function)


sl_btmesh_sensor_server_on_light_measurement#

void sl_btmesh_sensor_server_on_light_measurement (illuminance_t light)
Parameters
TypeDirectionArgument NameDescription
illuminance_t[in]light

Lightness value in lux

Called when a light measurement is done Note

  • If no implementation is provided in the application then a default weak implementation if provided which is a no-operation. (empty function)


sl_btmesh_sensor_server_on_people_count_measurement#

void sl_btmesh_sensor_server_on_people_count_measurement (count16_t people)
Parameters
TypeDirectionArgument NameDescription
count16_t[in]people

People count sensor value

Called when a people count sensor measurement is done Note

  • If no implementation is provided in the application then a default weak implementation if provided which is a no-operation. (empty function)


sl_btmesh_sensor_server_on_energy_monitor_measurement#

void sl_btmesh_sensor_server_on_energy_monitor_measurement (energy32_t power_consumption)
Parameters
TypeDirectionArgument NameDescription
energy32_t[in]power_consumption

Power consumption measured by the energy monitor

Called when an energy monitor measurement is done Note

  • If no implementation is provided in the application then a default weak implementation if provided which is a no-operation. (empty function)