src.dualinventive.com/dinet/libdipp/libdi_constants/include/di/constants/rpc/du.h

56 lines
1.7 KiB
C

#ifndef INCLUDE_DI_CONSTANTS_RPC_DU_H_
#define INCLUDE_DI_CONSTANTS_RPC_DU_H_
#include <di/constants/rpc/structures.h>
enum di_rpc_du_uid_action {
DI_RPC_DU_UID_ACTION_TRAIN_COUNTER = 100,
DI_RPC_DU_UID_ACTION_STRIKE_ROLE = 101
};
#define DI_RPC_DU_LABEL_ACTION_TRAIN_COUNTER "du-train-counter"
#define DI_RPC_DU_LABEL_ACTION_STRIKE_ROLE "du-strike-role"
enum di_rpc_du_uid_sensor {
DI_RPC_DU_UID_SENSOR_COUNTER = 102
};
#define DI_RPC_DU_LABEL_SENSOR_COUNTER "du-counter"
enum di_rpc_du_strike_role {
DI_RPC_DU_STRIKE_ROLE_UNKNOWN = 0,
DI_RPC_DU_STRIKE_ROLE_STRIKE_IN = 1,
DI_RPC_DU_STRIKE_ROLE_STRIKE_OUT = 2,
};
static const struct di_rpc_enum di_rpc_du_strike_role_enum[] = {
{ "unknown", DI_RPC_DU_STRIKE_ROLE_UNKNOWN },
{ "strike_in", DI_RPC_DU_STRIKE_ROLE_STRIKE_IN },
{ "strike_out", DI_RPC_DU_STRIKE_ROLE_STRIKE_OUT },
};
#define DI_RPC_DU_TRAIN_COUNTER_SENSOR_INFO_ITEM \
{ \
.uid = DI_RPC_DU_UID_SENSOR_COUNTER, \
.label = DI_RPC_DU_LABEL_SENSOR_COUNTER, \
.data_type = DI_RPC_DATA_TYPE_NUMBER, \
}
#define DI_RPC_DU_TRAIN_COUNTER_ACTION_INFO_ITEM \
{ \
.uid = DI_RPC_DU_UID_ACTION_TRAIN_COUNTER, \
.label = DI_RPC_DU_LABEL_ACTION_TRAIN_COUNTER, \
.data_type = DI_RPC_DATA_TYPE_NUMBER \
}
#define DI_RPC_DU_STRIKE_ROLE_COUNTER_ACTION_INFO_ITEM \
{ \
.uid = DI_RPC_DU_UID_ACTION_STRIKE_ROLE, \
.label = DI_RPC_DU_LABEL_ACTION_STRIKE_ROLE, \
.data_type = DI_RPC_DATA_TYPE_ENUM, \
.enumerator.size = DI_ARRAY_SIZE(di_rpc_du_strike_role_enum), \
.enumerator.begin = (struct di_rpc_enum *)di_rpc_du_strike_role_enum \
}
#endif /* INCLUDE_DI_CONSTANTS_RPC_DU_H_ */