CLS now depends on PROTOS for central type & enum defention

This commit is contained in:
2024-04-30 02:35:38 +02:00
parent 581ffc9ed9
commit bcfcba5bb9
3 changed files with 7 additions and 39 deletions

32
CLS.h
View File

@@ -2,37 +2,15 @@
#define CLS_HEARTBEAT_INTERVAL_MS 1000
#include "cls_device.pb.h"
typedef enum CLS_Type {
CLS_TYPE_LIGHT = 0x00,
CLS_TYPE_SWITCH = 0x01,
CLS_TYPE_SWITCHED_LIGHT = 0x02,
CLS_TYPE_SENSOR = 0x03,
CLS_TYPE_DISPLAY = 0x04,
CLS_TYPE_MASTER = 0x0F,
}CLS_Type_t;
typedef cls_device_Type CLS_Type_t;
typedef enum CLS_Position_Type {
CLS_POSITION_TOP = 0x00,
CLS_POSITION_BOTTOM = 0x01,
CLS_POSITION_LEFT = 0x02,
CLS_POSITION_RIGHT = 0x03,
CLS_POSITION_CENTER = 0x04,
CLS_POSITION_FRONT = 0x05,
CLS_POSITION_REAR = 0x06,
CLS_POSITION_BACK = 0x07,
CLS_POSITION_FLOOR = 0x08,
CLS_POSITION_CEILING = 0x09,
CLS_POSITION_ENGINE = 0x0A,
CLS_POSITION_TRUNK = 0x0B,
// more TBD
CLS_POSITION_INSIDE = 0x0E,
CLS_POSITION_OUTSIDE = 0x0F,
} CLS_Position_Type_t;
typedef cls_device_Position CLS_Position_Option_t;
typedef struct CLS_Position {
CLS_Position_Type_t p0:4;
CLS_Position_Type_t p1:4;
CLS_Position_Option_t p0:4;
CLS_Position_Option_t p1:4;
} CLS_Position_t;