各位兄弟, 在wincc的 c脚本程序里面有段代码,但return返回值一直没有找到是在哪里定义的, 希望大家帮帮忙帮我解答一下:
if (isPLCConnected(dwObjectStatus) == FALSE)
{
return COLOR_UNKNOWN;
}
else if ((*(pszStatusBytes)&1) == 1)
{
return COLOR_RED;
}
else if ((*(pszStatusBytes)&4) == 4)
{
return COLOR_RED;
}
else if ((*(pszStatusBytes)&8) == 8)
{
return COLOR_UNKNOWN;
}
else if ((*(pszStatusBytes)&16) == 16)
{
return COLOR_WHITE;
}
else if ((*(pszStatusBytes)&32) == 32)
{
return COLOR_GRAY;
}
else if ((*(pszStatusBytes)&64) == 64)
{
return COLOR_LIGHTGREEN;
}
else if ((*(pszStatusBytes)&2) == 2)
{
return COLOR_GRAY;
}
else if ((*(pszStatusBytes)&128) == 128)
{
return COLOR_YELLOW;
}
else if ((*(pszStatusBytes+1)&1) == 1)
{
return COLOR_LIGHTGREEN;
}
else if ((*(pszStatusBytes+1)&2) == 2)
{
return COLOR_UNKNOWN;
}
else if ((*(pszStatusBytes+1)&4) == 4)
{
return COLOR_UNKNOWN;
}
else if ((*(pszStatusBytes+1)&8) == 8)
{
return COLOR_UNKNOWN;
}
else if ((*(pszStatusBytes+1)&16) == 16)
{
return COLOR_UNKNOWN;
}
else if ((*(pszStatusBytes+1)&32) == 32)
{
return COLOR_UNKNOWN;
}
else if ((*(pszStatusBytes+1)&64) == 64)
{
return COLOR_UNKNOWN;
}
else if ((*(pszStatusBytes+1)&128) == 128)
{
return COLOR_UNKNOWN;
}
else if ((*(pszStatusBytes+2)&1) == 1)
{
return COLOR_GREEN;
}
else if ((*(pszStatusBytes+2)&2) == 2)
{
return COLOR_GREEN;
}
else if ((*(pszStatusBytes+2)&4) == 4)
{
return COLOR_GREEN;
}
else if ((*(pszStatusBytes+2)&8) == 8)
{
return COLOR_GRAY;
}
else if ((*(pszStatusBytes+2)&16) == 16)
{
return COLOR_GREEN;
}
else if ((*(pszStatusBytes+2)&32) == 32)
{
return COLOR_GREEN;
}
else if ((*(pszStatusBytes+2)&64) == 64)
{
return COLOR_UNKNOWN;
}
else if ((*(pszStatusBytes+2)&128) == 128)
{
return COLOR_YELLOW;
}
else if ((*(pszStatusBytes+3)&4) == 4)
{
return COLOR_YELLOW;
}
else if ((*(pszStatusBytes+3)&1) == 1)
{
return COLOR_GRAY;
}
else if ((*(pszStatusBytes+3)&2) == 2)
{
return COLOR_GRAY;
}
else if ((*(pszStatusBytes+3)&8) == 8)
{
return COLOR_YELLOW;
}
else if ((*(pszStatusBytes+3)&16) == 16)
{
return COLOR_GREEN;
}
else if ((*(pszStatusBytes+3)&32) == 32)
{
return COLOR_YELLOW;
}
else if ((*(pszStatusBytes+3)&64) == 64)
{
return COLOR_LIGHTGREEN;
}
else if ((*(pszStatusBytes+3)&128) == 128)
{
return COLOR_LIGHTGREEN;
}
这里对return返回值的设定我在wincc里面都没找到 不知是在哪里定义的