关于结构体的理解
有一段代码不是很理解 期望高手不吝赐教typedef struct ALR_STRUCT {
unsigned short usErrorMonitoringEnable;
unsigned short usErrorConditionEnable;
unsigned short usOccurred;
unsigned short ausCondition[MAX_NUM_ALARM];
long ausDelayTime[MAX_NUM_ALARM];
unsigned short ausIsActive[MAX_NUM_ALARM];
unsigned short ausToSendCome[MAX_NUM_ALARM];
unsigned short ausToSendGone[MAX_NUM_ALARM];
unsigned short ausDelayRunCome[MAX_NUM_ALARM];
unsigned short ausDelayRunGone[MAX_NUM_ALARM];
long ausDelayEndCome[MAX_NUM_ALARM];
long ausDelayEndGone[MAX_NUM_ALARM];
unsigned short ausWasSentCome[MAX_NUM_ALARM];
unsigned short ausWasSentGone[MAX_NUM_ALARM];
} ALR_STRUCT;
typedef struct ALARM_STRUCT {
unsigned short usAlarmAcknowledgeFlag;
ALR_STRUCT rFault;
} ALARM_STRUCT;
static ALARM_STRUCT rAlr = {0};
上面是相关的申明部分, 然后rAlr.rFault.ausIsActive[CMN_FAULT_VACC_REQUEST_DATA_INCONSISTEND] 这个是什么意思呢 这里CMN_FAULT_VACC_REQUEST_DATA_INCONSISTEND 是一个常数 比如30 这样。 还有上面的申明也不是很明白 谢谢解答哈