关于网友提出的“ source insight 如何展开宏”问题疑问,本网通过在网上对“ source insight 如何展开宏”有关的相关答案进行了整理,供用户进行参考,详细问题解答如下:
问题: source insight 如何展开宏
描述: 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);
}
解决方案1: source insight 不会自动展开,只是代码编辑!选中后,会在,(view->context window)中有提示
解决方案2: si是文本编辑器
解决方案3: 无法自动展开,需要自己展
解决方案4: si又不是编译器,不会直接展开吧
在si中用鼠标点击那个宏,在relation window会显示其定义
以上介绍了“ source insight 如何展开宏”的问题解答,希望对有需要的网友有所帮助。
本文网址链接:http://www.codes51.com/itwd/2708908.html