source insight 如何展开宏

linhaisong1978 2011-02-12 11:15:58
typedef char Bool;
typedef unsigned char UByte;
typedef unsigned int UInt32_t;
typedef unsigned short UInt16_t;
typedef UByte tXGState;
typedef UByte tXGNetworkAddress;
typedef UByte Timer;
typedef UInt32_t tXGUnitSysCtrl;
typedef UByte tXGCapEvt;
typedef void (*tXGLogicProc)();
typedef void (*tXGModelProc)();

typedef UInt16_t tXGCktSt;
typedef UInt16_t LongTimer;

#define XG_MAX_RECV_BUF 8 //!< Max length in byte of user message received.
#define XG_MAX_SEND_BUF 32 //!< Max length in byte of user message replied.
#define XG_MAX_ERRORS (4) //!< Max length of error list.
#define MAX_CIRCUITS 2
#define XG_MAX_LOGICS ((UByte)14) //!< Max number of logics registered.
#define XG_MAX_MODELS ((UByte)10) //!< Max number of models bound to unit.




typedef struct _tagCXGAHUnit {





struct _tagCXGAHLogic {
struct {
tXGCapEvt capEvt;
} lCapacityCtrl;
struct {
Bool needDry;
Bool isActualDefrost[MAX_CIRCUITS];
} lDefrostCtrl;
struct {
Bool isReseted;
UByte compSnap[MAX_CIRCUITS];
} lEvapProc;
#if 0
struct {
UByte compSnap[MAX_CIRCUITS];
} lHotwtProc;
#endif
struct {
Bool isReseted;
} lLowAtProc;
struct {
UByte compSnap[MAX_CIRCUITS];
Bool isReseted[MAX_CIRCUITS];
UByte NbrOfProcOccured[MAX_CIRCUITS];
} lLowRfgProc;
struct {
UByte compSnap[MAX_CIRCUITS];
Bool isReseted[MAX_CIRCUITS];
} lHPressProc;
struct {
Bool isReseted[MAX_CIRCUITS];
} lLPressCut;
struct {
UByte compSnap[MAX_CIRCUITS];
Bool isReseted[MAX_CIRCUITS];
UByte NbrOfProcOccured[MAX_CIRCUITS];
} lSphtProc;

//! Unit control logic function pointers.
tXGLogicProc runLogic[XG_MAX_LOGICS];
//! Number of the logics registered on the unit.
UByte NbrOfLogics;
} logic;



//! Timer pool
struct _tagTimer {
Timer tDelay;
Timer tUpdateSample;
Timer tAlarmFlash;
Timer tUnitInit;
Timer tCompLoadInterval;
Timer tMinCompLoadInterval;
Timer tCompUnloadInterval;
Timer tMinCompUnloadInterval;
Timer tFanLoadInterval;
Timer tMinFanLoadInterval;
Timer tFanUnloadInterval;
Timer tMinFanUnloadInterval;
Timer tFanLrtcOffInterval;
Timer tAntiFrozenProcEnterLimt;
Timer tAntiFrozenProcEnterProc;
Timer tEvaporatorLimtExit;
Timer tEvaporatorIntegral;
Timer tHotwaterLimtEnter;
Timer tHotwaterLimtExit;
Timer tLowAmbientTempLimtEnter;
Timer tLowAmbientTempProcEnter;
Timer tLowAmbientTempLimtExit;
Timer tLowAmbientTempProcExit;
Timer tWSIgnore;
Timer tMinPumpdown;
Timer tDefrostDry;
Timer tCompHeaterOn;
Timer tCompHeaterOff;
Timer tCapacityOn;
Timer tCapacityOff;
Timer tLrtcDurationCompOff[MAX_CIRCUITS];
Timer tLrtcDurationFanOff[MAX_CIRCUITS];
Timer tLrtcDurationFanOffPlus[MAX_CIRCUITS];
Timer tLrtcIgnore[MAX_CIRCUITS];
Timer tCoolFanControlOn[MAX_CIRCUITS];
Timer tCoolFanControlOff[MAX_CIRCUITS];
Timer tValveMinOn[MAX_CIRCUITS];
Timer t4WVInterval[MAX_CIRCUITS];
Timer tValveInterval[MAX_CIRCUITS];
Timer tValveTimeout[MAX_CIRCUITS];
Timer tLowRfgLimtOccure[MAX_CIRCUITS];
Timer tLowRfgLimtRelease[MAX_CIRCUITS];
Timer tLowRfgProcOccure[MAX_CIRCUITS];
Timer tLowRfgProcRelease[MAX_CIRCUITS];
Timer tLowRfgIntegral[MAX_CIRCUITS];
Timer tLowPressCutOccure[MAX_CIRCUITS];
Timer tSphtLimtOccure[MAX_CIRCUITS];
Timer tSphtLimtRelease[MAX_CIRCUITS];
Timer tSphtProcOccure[MAX_CIRCUITS];
Timer tSphtProcRelease[MAX_CIRCUITS];
Timer tHPLimtOccure[MAX_CIRCUITS];
Timer tHPLimtRelease[MAX_CIRCUITS];
Timer tHPProcOccure[MAX_CIRCUITS];
Timer tHPProcRelease[MAX_CIRCUITS];
Timer tHPTurnoffComp[MAX_CIRCUITS];
Timer tEnterDefrost[MAX_CIRCUITS];
Timer tMinDefrostTime[MAX_CIRCUITS];
Timer tExitDefrost[MAX_CIRCUITS];
LongTimer tEvaporatorProcExit;
LongTimer tLowPressIgnore[MAX_CIRCUITS];
LongTimer tSphtIgnore[MAX_CIRCUITS];
LongTimer tDefrostCycle[MAX_CIRCUITS];
LongTimer tMaxDefrostTime[MAX_CIRCUITS];
LongTimer tWarmupTimeout[MAX_CIRCUITS];
LongTimer tSphtProcInterval[MAX_CIRCUITS];
LongTimer tPumpdown;
LongTimer tLPCutoutIgnoreDefrost[MAX_CIRCUITS];
LongTimer tLPCutoutIgnoreWarmup[MAX_CIRCUITS];
} timers;

tXGModelProc models[XG_MAX_MODELS];
//! Number of models.
/*!
*/
UByte NbrOfModel;

// tXGDipSelector Dip;
} CXGAH_Unit;

CXGAH_Unit gCXGAHUnit;

#define theUNIT() \
(gCXGAHUnit)

#define CXGAH_TRAVERSE_MODEL() \
{ \
UByte itor = 0; \
for (; itor < theUNIT().NbrOfModel; itor++) { \
(theUNIT().models[itor])(); \
} \
}

int main()
{
{
UByte itor = 0;
theUNIT().NbrOfModel=20;
for (; itor < theUNIT().NbrOfModel; itor++) { //这些宏怎么用source insight 直接展开啊
(theUNIT().models[itor])(); //这些宏怎么用source insight 直接展开啊
}
}
// CXGAH_TRAVERSE_MODEL();
while(1);
}
...全文
464 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
Crystal___Plane 2011-10-17
  • 打赏
  • 举报
回复
别人刚给安装的,还不知道是干什么用的呢
wyfwx 2011-02-12
  • 打赏
  • 举报
回复
si是文本编辑器
ischarles 2011-02-12
  • 打赏
  • 举报
回复
无法自动展开,需要自己展
justkk 2011-02-12
  • 打赏
  • 举报
回复
si又不是编译器,不会直接展开吧
在si中用鼠标点击那个宏,在relation window会显示其定义
C4Fun 2011-02-12
  • 打赏
  • 举报
回复
source insight 不会自动展开,只是代码编辑!选中后,会在,(view->context window)中有提示

69,382

社区成员

发帖
与我相关
我的任务
社区描述
C语言相关问题讨论
社区管理员
  • C语言
  • 花神庙码农
  • 架构师李肯
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧