MultilevelSensor#
Modules#
Enumerations#
Defined possible sensor types.
Defined possible sensor read size.
Defined possible sensor read precision.
Defined sensor interface return values.
Defined Multilevel Sensor return values.
Typedefs#
Defined possible sensor types.
Structure that holds the attributes of a sensor type.
Structure that holds a read result from the read interface.
Structure that administrate all of the registered sensors.
Functions#
This function will report the registered sensor's measured datas to the Lifeline group.
Calls the init function for all of the registered sensor interfaces.
Checks if the wanted scale is a legal one for an interface.
Checks if the wanted sensor type has a registered interface or not.
Registers an interface to a specific sensor type.
Fills an input buffer with flags where each flag represents a supported sensor.
Fills an input buffer with flags where each flag represents a supported scale.
Getter function for a sensor type's interface.
Gets the default sensor type value.
Initialize an iterator struct for the registered sensor interfaces.
Moves the iterator reference forward to the next registered interface, if the current is the last one then NULL If there is any registered interface the iterator will be NULL.
Returns the number of registered sensor interfaces.
Removes all of the registered sensor interfaces from the administration.
Returns a sensor_type_t struct from the sensor_types config table.
Initialize a sensor interface instance.
Adds a new scale to an existing interface.
Macros#
Structure that holds a read result from the read interface.
Enumeration Documentation#
sensor_name#
sensor_name
Defined possible sensor types.
Enumerator | |
---|---|
SENSOR_NAME_AIR_TEMPERATURE | |
SENSOR_NAME_GENERAL_PURPOSE | |
SENSOR_NAME_ILLUMINANCE | |
SENSOR_NAME_POWER | |
SENSOR_NAME_HUMIDITY | |
SENSOR_NAME_ACCELERATION_X | |
SENSOR_NAME_ACCELERATION_Y | |
SENSOR_NAME_ACCELERATION_Z | |
SENSOR_NAME_MAX_COUNT |
51
of file /mnt/raid/workspaces/ws.T7KR5OZRo/overlay/gsdk/protocol/z-wave/ZAF/CommandClasses/MultilevelSensor/src/CC_MultilevelSensor_SensorHandlerTypes.h
sensor_read_result_size_t#
sensor_read_result_size_t
Defined possible sensor read size.
Enumerator | |
---|---|
SENSOR_READ_RESULT_SIZE_1 | |
SENSOR_READ_RESULT_SIZE_2 | |
SENSOR_READ_RESULT_SIZE_4 | |
SENSOR_READ_RESULT_SIZE_END |
76
of file /mnt/raid/workspaces/ws.T7KR5OZRo/overlay/gsdk/protocol/z-wave/ZAF/CommandClasses/MultilevelSensor/src/CC_MultilevelSensor_SensorHandlerTypes.h
sensor_read_result_precision#
sensor_read_result_precision
Defined possible sensor read precision.
Enumerator | |
---|---|
SENSOR_READ_RESULT_PRECISION_1 | |
SENSOR_READ_RESULT_PRECISION_2 | |
SENSOR_READ_RESULT_PRECISION_3 | |
SENSOR_READ_RESULT_PRECISION_END |
86
of file /mnt/raid/workspaces/ws.T7KR5OZRo/overlay/gsdk/protocol/z-wave/ZAF/CommandClasses/MultilevelSensor/src/CC_MultilevelSensor_SensorHandlerTypes.h
sensor_interface_return_value_t#
sensor_interface_return_value_t
Defined sensor interface return values.
Enumerator | |
---|---|
SENSOR_INTERFACE_RETURN_VALUE_OK | |
SENSOR_INTERFACE_RETURN_VALUE_ALREADY_SET | |
SENSOR_INTERFACE_RETURN_VALUE_INVALID_SCALE_VALUE | |
SENSOR_INTERFACE_RETURN_VALUE_ERROR | |
SENSOR_INTERFACE_RETURN_VALUE_END |
117
of file /mnt/raid/workspaces/ws.T7KR5OZRo/overlay/gsdk/protocol/z-wave/ZAF/CommandClasses/MultilevelSensor/src/CC_MultilevelSensor_SensorHandlerTypes.h
cc_multilevel_sensor_return_value#
cc_multilevel_sensor_return_value
Defined Multilevel Sensor return values.
Enumerator | |
---|---|
CC_MULTILEVEL_SENSOR_RETURN_VALUE_OK | |
CC_MULTILEVEL_SENSOR_RETURN_VALUE_ERROR | |
CC_MULTILEVEL_SENSOR_RETURN_VALUE_NOT_FOUND | |
CC_MULTILEVEL_SENSOR_RETURN_VALUE_ALREADY_REGISTRATED | |
CC_MULTILEVEL_SENSOR_RETURN_VALUE_REGISTRATION_LIMIT_REACHED | |
CC_MULTILEVEL_SENSOR_RETURN_VALUE_END |
128
of file /mnt/raid/workspaces/ws.T7KR5OZRo/overlay/gsdk/protocol/z-wave/ZAF/CommandClasses/MultilevelSensor/src/CC_MultilevelSensor_SensorHandlerTypes.h
Typedef Documentation#
sensor_name_t#
typedef enum sensor_name sensor_name_t
Defined possible sensor types.
61
of file /mnt/raid/workspaces/ws.T7KR5OZRo/overlay/gsdk/protocol/z-wave/ZAF/CommandClasses/MultilevelSensor/src/CC_MultilevelSensor_SensorHandlerTypes.h
sensor_type_t#
typedef struct _sensor_type sensor_type_t
Structure that holds the attributes of a sensor type.
71
of file /mnt/raid/workspaces/ws.T7KR5OZRo/overlay/gsdk/protocol/z-wave/ZAF/CommandClasses/MultilevelSensor/src/CC_MultilevelSensor_SensorHandlerTypes.h
sensor_read_result_t#
typedef struct _sensor_read_result sensor_read_result_t
101
of file /mnt/raid/workspaces/ws.T7KR5OZRo/overlay/gsdk/protocol/z-wave/ZAF/CommandClasses/MultilevelSensor/src/CC_MultilevelSensor_SensorHandlerTypes.h
sensor_interface_t#
typedef struct _sensor_interface sensor_interface_t
Structure that holds a read result from the read interface.
112
of file /mnt/raid/workspaces/ws.T7KR5OZRo/overlay/gsdk/protocol/z-wave/ZAF/CommandClasses/MultilevelSensor/src/CC_MultilevelSensor_SensorHandlerTypes.h
sensor_interface_iterator_t#
typedef struct _sensor_interface sensor_interface_iterator_t
112
of file /mnt/raid/workspaces/ws.T7KR5OZRo/overlay/gsdk/protocol/z-wave/ZAF/CommandClasses/MultilevelSensor/src/CC_MultilevelSensor_SensorHandlerTypes.h
sensor_administration_t#
typedef struct _sensor_administration sensor_administration_t
Structure that administrate all of the registered sensors.
144
of file /mnt/raid/workspaces/ws.T7KR5OZRo/overlay/gsdk/protocol/z-wave/ZAF/CommandClasses/MultilevelSensor/src/CC_MultilevelSensor_SensorHandlerTypes.h
Function Documentation#
cc_multilevel_sensor_send_sensor_data#
void cc_multilevel_sensor_send_sensor_data (void )
This function will report the registered sensor's measured datas to the Lifeline group.
N/A |
49
of file /mnt/raid/workspaces/ws.T7KR5OZRo/overlay/gsdk/protocol/z-wave/ZAF/CommandClasses/MultilevelSensor/inc/CC_MultilevelSensor_Support.h
cc_multilevel_sensor_config_register_instances#
void cc_multilevel_sensor_config_register_instances (void )
N/A |
21
of file /mnt/raid/workspaces/ws.T7KR5OZRo/overlay/gsdk/protocol/z-wave/ZAF/CommandClasses/MultilevelSensor/src/cc_multilevel_sensor_config_api.h
cc_multilevel_sensor_init_all_sensor#
void cc_multilevel_sensor_init_all_sensor (void )
Calls the init function for all of the registered sensor interfaces.
N/A |
48
of file /mnt/raid/workspaces/ws.T7KR5OZRo/overlay/gsdk/protocol/z-wave/ZAF/CommandClasses/MultilevelSensor/src/CC_MultilevelSensor_SensorHandler.h
cc_multilevel_sensor_check_scale#
uint8_t cc_multilevel_sensor_check_scale (const sensor_interface_t * i_interface, uint8_t i_scale)
Checks if the wanted scale is a legal one for an interface.
[in] | i_interface | Pointer to an existing sensor interface |
[in] | i_scale | Scale value to check |
If the scale is not set the function will return with the first available scale. The function will iterate from bit 0 to 7 to look for the first scale which is supported. That will be the default scale. Returns
a usable scale value, if the input i_scale is valid that will be return, else the default one.
60
of file /mnt/raid/workspaces/ws.T7KR5OZRo/overlay/gsdk/protocol/z-wave/ZAF/CommandClasses/MultilevelSensor/src/CC_MultilevelSensor_SensorHandler.h
cc_multilevel_sensor_check_sensor_type_registered#
cc_multilevel_sensor_return_value cc_multilevel_sensor_check_sensor_type_registered (uint8_t sensor_type_value)
Checks if the wanted sensor type has a registered interface or not.
[in] | sensor_type_value | Sensor type value to check, this is the value in sensor_type_t struct's value |
Returns
CC_MULTILEVEL_SENSOR_RETURN_VALUE_OK if interface is registered for a sensor, else CC_MULTILEVEL_SENSOR_RETURN_VALUE_NOT_FOUND.
68
of file /mnt/raid/workspaces/ws.T7KR5OZRo/overlay/gsdk/protocol/z-wave/ZAF/CommandClasses/MultilevelSensor/src/CC_MultilevelSensor_SensorHandler.h
cc_multilevel_sensor_registration#
cc_multilevel_sensor_return_value cc_multilevel_sensor_registration (sensor_interface_t * i_new_sensor)
Registers an interface to a specific sensor type.
[in] | i_new_sensor | Pointer to a filled sensor interface struct |
The number of registered sensor types is maximized with REGISTERED_SENSOR_NUMBER_LIMIT Returns
CC_MULTILEVEL_SENSOR_RETURN_VALUE_OK if interface is registered for a sensor.
77
of file /mnt/raid/workspaces/ws.T7KR5OZRo/overlay/gsdk/protocol/z-wave/ZAF/CommandClasses/MultilevelSensor/src/CC_MultilevelSensor_SensorHandler.h
cc_multilevel_sensor_get_supported_sensors#
cc_multilevel_sensor_return_value cc_multilevel_sensor_get_supported_sensors (uint8_t * o_supported_sensor_buffer)
Fills an input buffer with flags where each flag represents a supported sensor.
[out] | o_supported_sensor_buffer | Pointer to a buffer where the supported sensors' are represented as flags in a byte array. The position of each flag is calculated based on SDS13812. The buffer must be 11 byte long at least. |
Returns
CC_MULTILEVEL_SENSOR_RETURN_VALUE_OK if success, else CC_MULTILEVEL_SENSOR_RETURN_VALUE_ERROR.
86
of file /mnt/raid/workspaces/ws.T7KR5OZRo/overlay/gsdk/protocol/z-wave/ZAF/CommandClasses/MultilevelSensor/src/CC_MultilevelSensor_SensorHandler.h
cc_multilevel_sensor_get_supported_scale#
cc_multilevel_sensor_return_value cc_multilevel_sensor_get_supported_scale (uint8_t sensor_type_value, uint8_t * o_supported_scale)
Fills an input buffer with flags where each flag represents a supported scale.
[in] | sensor_type_value | Sensor type value to check, this is the value in sensor_type_t struct's value |
[out] | o_supported_scale | Pointer to a buffer where the supported scales will be represented for a sensor type |
Returns
CC_MULTILEVEL_SENSOR_RETURN_VALUE_OK if interface is registered for a sensor.
95
of file /mnt/raid/workspaces/ws.T7KR5OZRo/overlay/gsdk/protocol/z-wave/ZAF/CommandClasses/MultilevelSensor/src/CC_MultilevelSensor_SensorHandler.h
cc_multilevel_sensor_get_interface#
cc_multilevel_sensor_return_value cc_multilevel_sensor_get_interface (uint8_t sensor_type_value, sensor_interface_t ** o_interface)
Getter function for a sensor type's interface.
[in] | sensor_type_value | Sensor type value to check, this is the value in sensor_type_t struct's value |
[out] | o_interface | This is a double pointer which will hold an interface reference |
Returns
CC_MULTILEVEL_SENSOR_RETURN_VALUE_OK if interface is registered for a sensor, else CC_MULTILEVEL_SENSOR_RETURN_VALUE_NOT_FOUND.
104
of file /mnt/raid/workspaces/ws.T7KR5OZRo/overlay/gsdk/protocol/z-wave/ZAF/CommandClasses/MultilevelSensor/src/CC_MultilevelSensor_SensorHandler.h
cc_multilevel_sensor_get_default_sensor_type#
cc_multilevel_sensor_return_value cc_multilevel_sensor_get_default_sensor_type (uint8_t * o_default_sensor_type)
Gets the default sensor type value.
[in] | o_default_sensor_type | Pointer to a byte buffer which will hold the default sensor type value |
Basically the first registered sensor interface' type is the default one. Returns
CC_MULTILEVEL_SENSOR_RETURN_VALUE_OK if there is any registered interface, else CC_MULTILEVEL_SENSOR_RETURN_VALUE_ERROR.
112
of file /mnt/raid/workspaces/ws.T7KR5OZRo/overlay/gsdk/protocol/z-wave/ZAF/CommandClasses/MultilevelSensor/src/CC_MultilevelSensor_SensorHandler.h
cc_multilevel_sensor_init_iterator#
cc_multilevel_sensor_return_value cc_multilevel_sensor_init_iterator (sensor_interface_iterator_t ** i_iterator)
Initialize an iterator struct for the registered sensor interfaces.
[out] | i_iterator | This is a double pointer which will hold an interface reference to the first registered interface |
If there is any registered interface the iterator will be NULL. Returns
CC_MULTILEVEL_SENSOR_RETURN_VALUE_OK if success, else CC_MULTILEVEL_SENSOR_RETURN_VALUE_ERROR..
121
of file /mnt/raid/workspaces/ws.T7KR5OZRo/overlay/gsdk/protocol/z-wave/ZAF/CommandClasses/MultilevelSensor/src/CC_MultilevelSensor_SensorHandler.h
cc_multilevel_sensor_next_iterator#
void cc_multilevel_sensor_next_iterator (sensor_interface_iterator_t ** i_iterator)
Moves the iterator reference forward to the next registered interface, if the current is the last one then NULL If there is any registered interface the iterator will be NULL.
[out] | i_iterator | This is a double pointer which will hold an interface reference |
129
of file /mnt/raid/workspaces/ws.T7KR5OZRo/overlay/gsdk/protocol/z-wave/ZAF/CommandClasses/MultilevelSensor/src/CC_MultilevelSensor_SensorHandler.h
cc_multilevel_sensor_get_number_of_registered_sensors#
uint8_t cc_multilevel_sensor_get_number_of_registered_sensors (void )
Returns the number of registered sensor interfaces.
N/A |
Returns
Number of registered sensor interfaces.
136
of file /mnt/raid/workspaces/ws.T7KR5OZRo/overlay/gsdk/protocol/z-wave/ZAF/CommandClasses/MultilevelSensor/src/CC_MultilevelSensor_SensorHandler.h
cc_multilevel_sensor_reset_administration#
void cc_multilevel_sensor_reset_administration (void )
Removes all of the registered sensor interfaces from the administration.
N/A |
142
of file /mnt/raid/workspaces/ws.T7KR5OZRo/overlay/gsdk/protocol/z-wave/ZAF/CommandClasses/MultilevelSensor/src/CC_MultilevelSensor_SensorHandler.h
cc_multilevel_sensor_get_sensor_type#
const sensor_type_t * cc_multilevel_sensor_get_sensor_type (sensor_name_t i_sensor_name)
Returns a sensor_type_t struct from the sensor_types config table.
[in] | i_sensor_name | The name of the sensor type, the sensor type attributes' reference will be look for based on this value |
Returns
sensor_type_t struct which includes the type attributes.
161
of file /mnt/raid/workspaces/ws.T7KR5OZRo/overlay/gsdk/protocol/z-wave/ZAF/CommandClasses/MultilevelSensor/src/CC_MultilevelSensor_SensorHandlerTypes.h
cc_multilevel_sensor_init_interface#
sensor_interface_return_value_t cc_multilevel_sensor_init_interface (sensor_interface_t * i_instance, sensor_name_t i_name)
Initialize a sensor interface instance.
[in] | i_instance | Pointer to an existing sensor interface to init |
[in] | i_name | The name of the sensor type, the sensor type attributes' reference will be look for based on this value |
Sets the whole struct to zero and sets the reference to the appropiate sensor_type_t struct. Returns
Status of the initialization.
173
of file /mnt/raid/workspaces/ws.T7KR5OZRo/overlay/gsdk/protocol/z-wave/ZAF/CommandClasses/MultilevelSensor/src/CC_MultilevelSensor_SensorHandlerTypes.h
cc_multilevel_sensor_add_supported_scale_interface#
sensor_interface_return_value_t cc_multilevel_sensor_add_supported_scale_interface (sensor_interface_t * i_instance, uint8_t i_scale)
Adds a new scale to an existing interface.
[in] | i_instance | Pointer to an existing sensor interface which the new scale will be registered to |
[in] | i_scale | The new scale which will be registered |
Supported scales must be set by this function during initialization. Returns
Status of the new scale value registration.
183
of file /mnt/raid/workspaces/ws.T7KR5OZRo/overlay/gsdk/protocol/z-wave/ZAF/CommandClasses/MultilevelSensor/src/CC_MultilevelSensor_SensorHandlerTypes.h
Macro Definition Documentation#
MULTILEVEL_SENSOR_DEFAULT_AUTOREPORT_PEDIOD_SEC#
#define MULTILEVEL_SENSOR_DEFAULT_AUTOREPORT_PEDIOD_SECValue:
(MULTILEVEL_SENSOR_DEFAULT_AUTOREPORT_PEDIOD_MIN*60)
35
of file /mnt/raid/workspaces/ws.T7KR5OZRo/overlay/gsdk/protocol/z-wave/ZAF/CommandClasses/MultilevelSensor/inc/CC_MultilevelSensor_Support.h
MULTILEVEL_SENSOR_DEFAULT_AUTOREPORT_PEDIOD_MS#
#define MULTILEVEL_SENSOR_DEFAULT_AUTOREPORT_PEDIOD_MSValue:
(MULTILEVEL_SENSOR_DEFAULT_AUTOREPORT_PEDIOD_SEC*1000)
36
of file /mnt/raid/workspaces/ws.T7KR5OZRo/overlay/gsdk/protocol/z-wave/ZAF/CommandClasses/MultilevelSensor/inc/CC_MultilevelSensor_Support.h
SENSOR_SCALE_DEFAULT#
#define SENSOR_SCALE_DEFAULTValue:
0x00
37
of file /mnt/raid/workspaces/ws.T7KR5OZRo/overlay/gsdk/protocol/z-wave/ZAF/CommandClasses/MultilevelSensor/src/CC_MultilevelSensor_SensorHandlerTypes.h
SENSOR_SCALE_CELSIUS#
#define SENSOR_SCALE_CELSIUSValue:
0x00
38
of file /mnt/raid/workspaces/ws.T7KR5OZRo/overlay/gsdk/protocol/z-wave/ZAF/CommandClasses/MultilevelSensor/src/CC_MultilevelSensor_SensorHandlerTypes.h
SENSOR_SCALE_FAHRENHEIT#
#define SENSOR_SCALE_FAHRENHEITValue:
0x01
39
of file /mnt/raid/workspaces/ws.T7KR5OZRo/overlay/gsdk/protocol/z-wave/ZAF/CommandClasses/MultilevelSensor/src/CC_MultilevelSensor_SensorHandlerTypes.h
SENSOR_SCALE_PERCENTAGE#
#define SENSOR_SCALE_PERCENTAGEValue:
0x00
40
of file /mnt/raid/workspaces/ws.T7KR5OZRo/overlay/gsdk/protocol/z-wave/ZAF/CommandClasses/MultilevelSensor/src/CC_MultilevelSensor_SensorHandlerTypes.h
SENSOR_SCALE_DIMENSIONLESS#
#define SENSOR_SCALE_DIMENSIONLESSValue:
0x01
41
of file /mnt/raid/workspaces/ws.T7KR5OZRo/overlay/gsdk/protocol/z-wave/ZAF/CommandClasses/MultilevelSensor/src/CC_MultilevelSensor_SensorHandlerTypes.h
SENSOR_SCALE_LUX#
#define SENSOR_SCALE_LUXValue:
0x01
42
of file /mnt/raid/workspaces/ws.T7KR5OZRo/overlay/gsdk/protocol/z-wave/ZAF/CommandClasses/MultilevelSensor/src/CC_MultilevelSensor_SensorHandlerTypes.h
SENSOR_SCALE_WATT#
#define SENSOR_SCALE_WATTValue:
0x00
43
of file /mnt/raid/workspaces/ws.T7KR5OZRo/overlay/gsdk/protocol/z-wave/ZAF/CommandClasses/MultilevelSensor/src/CC_MultilevelSensor_SensorHandlerTypes.h
SENSOR_SCALE_BTU_H#
#define SENSOR_SCALE_BTU_HValue:
0x01 /*Btu/h*/
44
of file /mnt/raid/workspaces/ws.T7KR5OZRo/overlay/gsdk/protocol/z-wave/ZAF/CommandClasses/MultilevelSensor/src/CC_MultilevelSensor_SensorHandlerTypes.h
SENSOR_SCALE_ABSOLUTE_HUMIDITY#
#define SENSOR_SCALE_ABSOLUTE_HUMIDITYValue:
0x01 /*g/m3*/
45
of file /mnt/raid/workspaces/ws.T7KR5OZRo/overlay/gsdk/protocol/z-wave/ZAF/CommandClasses/MultilevelSensor/src/CC_MultilevelSensor_SensorHandlerTypes.h
SENSOR_SCALE_METER_SQUARE_SECOND#
#define SENSOR_SCALE_METER_SQUARE_SECONDValue:
0x00 /*m/s^2*/
46
of file /mnt/raid/workspaces/ws.T7KR5OZRo/overlay/gsdk/protocol/z-wave/ZAF/CommandClasses/MultilevelSensor/src/CC_MultilevelSensor_SensorHandlerTypes.h
SLI_MAX_RAW_RESULT_BYTES#
#define SLI_MAX_RAW_RESULT_BYTESValue:
4
Structure that holds a read result from the read interface.
96
of file /mnt/raid/workspaces/ws.T7KR5OZRo/overlay/gsdk/protocol/z-wave/ZAF/CommandClasses/MultilevelSensor/src/CC_MultilevelSensor_SensorHandlerTypes.h