Power consumption mock sensor#

The power consumption mock sensor is an application-level software module that simulates power consumption measurements. This module provides interface for setting and getting the simulated power consumption. This component is prepared for integration into SOC applications. This is a No-Code component, if it is used with Sensor Server to broadcast power consumption data to sensor clients.

Functions#

void
sl_btmesh_set_power_consumption(energy32_t energy_usage)

Function Documentation#

sl_btmesh_set_power_consumption#

void sl_btmesh_set_power_consumption (energy32_t energy_usage)
Parameters
TypeDirectionArgument NameDescription
energy32_t[in]energy_usage

Power consumption value to set

Set the power consumption value. It could be used to initialize the sensor.


sl_btmesh_get_power_consumption#

energy32_t sl_btmesh_get_power_consumption (void )
Parameters
TypeDirectionArgument NameDescription
voidN/A

Get the current power consumption value measured by sensor.

Returns

  • Current value of power consumption.