typedef enum {
PORT2 = 2, /* RS485 port2 */
PORT3, /* RS485 port3 */
PORT4, /* RS485 port4 */
} SBUPORT;
typedef enum
{
a1,
a2,
}SUBTYPE ;
typedef struct {
uint8_t exAlarmID : 8;
uint8_t exAlarmPort : 2;
uint8_t alarmCH : 5;
uint8_t alarmSW : 1;
} alarm_cfg_t;
alarm_cfg_t uk;
typedef struct {
uint8_t exAlarmID ;
uint8_t exAlarmPort ;
uint8_t alarmCH ;
uint8_t alarmSW ;
} cb;
typedef struct {
/* 采集子设备通用配置 */
SUBTYPE type;
uint16_t vendor; /* 设备供应商, 0为默认设备 */
SBUPORT port;
uint16_t devID;
alarm_cfg_t alarm; /* 报警配置 */
/* 采集子设备私有配置参数 */
struct {
uint16_t cfg[MAX_PRIVATE_PRARS];
} priv;
} subdev_cfg_t;
subdev_cfg_t number[5]=
{
{.type=1 },
[3]={.type=2,1,PORT3,3,5},
[4]={.type=2,1,PORT3,3,5},
};
|