77 lines
3.1 KiB
C
Executable File
77 lines
3.1 KiB
C
Executable File
#ifndef INCLUDE_DI_CONSTANTS_RPC_ZKLRC_H_
|
|
#define INCLUDE_DI_CONSTANTS_RPC_ZKLRC_H_
|
|
|
|
#include <di/constants/rpc/structures.h>
|
|
|
|
#define DI_RPC_ZKL_DEVICE_TYPE_ENUM 4U
|
|
#define DI_RPC_ZKL_DEVICE_TYPE_LABEL "zkl-3000"
|
|
#define DI_RPC_ZKL_DEVICE_API_REVISION 0U
|
|
|
|
#define DI_RPC_ZKLRC_DEVICE_TYPE_ENUM 5U
|
|
#define DI_RPC_ZKLRC_DEVICE_TYPE_LABEL "zkl-3000-rc"
|
|
#define DI_RPC_ZKLRC_DEVICE_API_REVISION 0U
|
|
|
|
/*
|
|
* The switchbox is a ZKL 3000 RC actually, having its parameters here is
|
|
* okay for now, since it doens't provide any more either.
|
|
*/
|
|
#define DI_RPC_SWITCHBOX_DEVICE_TYPE_ENUM 7U
|
|
#define DI_RPC_SWITCHBOX_DEVICE_TYPE_LABEL "switchbox-3000"
|
|
#define DI_RPC_SWITCHBOX_DEVICE_API_REVISION 0U
|
|
|
|
enum di_rpc_uid_zklrc_sensor {
|
|
DI_RPC_UID_ZKLRC_SENSOR_DETECTION_QUALITY = 100,
|
|
DI_RPC_UID_ZKLRC_SENSOR_DETECTION = 101,
|
|
DI_RPC_UID_ZKLRC_SENSOR_MEASUREMENT = 102,
|
|
DI_RPC_UID_ZKLRC_SENSOR_BA = 103,
|
|
DI_RPC_UID_ZKLRC_SENSOR_FREQUENCY = 104,
|
|
DI_RPC_UID_ZKLRC_SENSOR_SECTIONS_SHORT = 105,
|
|
DI_RPC_UID_ZKLRC_SENSOR_SECTIONS_BATTERY = 106,
|
|
DI_RPC_UID_ZKLRC_SENSOR_RMS = 107,
|
|
DI_RPC_UID_ZKLRC_SENSOR_BA_CAL = 109,
|
|
DI_RPC_UID_ZKLRC_SENSOR_TEMPERATURE = 154,
|
|
DI_RPC_UID_ZKLRC_SENSOR_SWITCH_SHORT = 150,
|
|
DI_RPC_UID_ZKLRC_SENSOR_KEYSWITCH = 151,
|
|
};
|
|
|
|
#define DI_RPC_ZKLRC_SENSOR_LABEL_DETECTION_QUALITY "detection-quality"
|
|
#define DI_RPC_ZKLRC_SENSOR_LABEL_DETECTION "detection-status"
|
|
#define DI_RPC_ZKLRC_SENSOR_LABEL_MEASUREMENT "measurement"
|
|
#define DI_RPC_ZKLRC_SENSOR_LABEL_BA "ba"
|
|
#define DI_RPC_ZKLRC_SENSOR_LABEL_FREQUENCY "frequency"
|
|
#define DI_RPC_ZKLRC_SENSOR_LABEL_SECTIONS_SHORT "sw-short"
|
|
#define DI_RPC_ZKLRC_SENSOR_LABEL_SECTIONS_BATTERY "sw-battery"
|
|
#define DI_RPC_ZKLRC_SENSOR_LABEL_SWITCH_SHORT "switch-state"
|
|
#define DI_RPC_ZKLRC_SENSOR_LABEL_KEYSWITCH "keyswitch"
|
|
#define DI_RPC_ZKLRC_SENSOR_LABEL_RMS "rms"
|
|
#define DI_RPC_ZKLRC_SENSOR_LABEL_BA_CAL "ba-cal"
|
|
#define DI_RPC_ZKLRC_SENSOR_LABEL_TEMPERATURE "temperature"
|
|
|
|
enum di_rpc_uid_zkl_config {
|
|
DI_RPC_UID_ZKL_MEAS_DATA_BA = 100,
|
|
DI_RPC_UID_ZKL_MEAS_DATA_FREQUENCY = 101,
|
|
DI_RPC_UID_ZKL_TCP_ENDPOINT = 102, // legacy
|
|
DI_RPC_UID_ZKL_MEAS_DATA_AMPLITUDE = 103
|
|
};
|
|
|
|
#define DI_RPC_LABEL_ZKL_CONFIG_MEAS_DATA_BA "ba-value"
|
|
#define DI_RPC_LABEL_ZKL_CONFIG_MEAS_DATA_FREQUENCY "frequency"
|
|
#define DI_RPC_LABEL_ZKL_CONFIG_TCP_ENDPOINT "endpoint"
|
|
#define DI_RPC_LABEL_ZKL_CONFIG_MEAS_DATA_AMPLITUDE "amplitude"
|
|
|
|
enum di_rpc_zklrc_keyswitch_state {
|
|
DI_RPC_ZKLRC_KEYSWITCH_STATE_UNKNOWN = 0,
|
|
DI_RPC_ZKLRC_KEYSWITCH_STATE_OPERATIONAL = 1,
|
|
DI_RPC_ZKLRC_KEYSWITCH_STATE_ON = 2,
|
|
DI_RPC_ZKLRC_KEYSWITCH_STATE_OFF = 3,
|
|
};
|
|
|
|
static const struct di_rpc_enum di_rpc_zklrc_keyswitch_state_list[] = {
|
|
{ "unknown", DI_RPC_ZKLRC_KEYSWITCH_STATE_UNKNOWN },
|
|
{ "operational", DI_RPC_ZKLRC_KEYSWITCH_STATE_OPERATIONAL },
|
|
{ "on", DI_RPC_ZKLRC_KEYSWITCH_STATE_ON },
|
|
{ "off", DI_RPC_ZKLRC_KEYSWITCH_STATE_OFF }
|
|
};
|
|
|
|
#endif /* INCLUDE_DI_CONSTANTS_RPC_ZKLRC_H_ */
|