Code: Select all
#define printf1( _x, _y, _format1, _value1) { \
string sval1 = FormatNum(_format1, _value1); \
TextOut(_x, _y, sval1); \
}
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
inline void ParseBTResponseMsg(char ID, string str) // slaveID=0...2
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
{
string pstr, rstr, vstr, sp, sn;
int i, p, n, len, v;
len=StrLen(str); //
for (i=0; i<11; i++)
{
sp=SubStr(str,0,1); p=StrToNum(sp);
printf1(0,48,"%2d",i); printf1(24,48,"%2d",p); // <<<<<<<<<< out-commented: nor error !
p=i;
// <<<<<<<<< = line 335
sn=SubStr(str,1,1); // dec
n=StrToNum(sn);
vstr=SubStr(str, 2, n); // n= length of value string
v=StrToNum(vstr);
SensorRemoteArray[ID][p]=v;
rstr=SubStr(str, 2+n, len);
str=rstr;
len=StrLen(str);
}
}
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
task ReceiveSlaveData() // NOS = Number of Slaves
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
{
string _msg;
while(true)
{
if (_NOS_>=1) {
until(ReceiveRemoteString(INBOX_11, true, _msg) == NO_ERR);
ParseBTResponseMsg(0, _msg) ; // <<<<<<<<< = line 360
Wait(10);
}
if (_NOS_>=2) {
until(ReceiveRemoteString(INBOX_21, true, _msg) == NO_ERR);
ParseBTResponseMsg(1, _msg) ;
Wait(10);
}
if (_NOS_==3) {
until(ReceiveRemoteString(INBOX_31, true, _msg) == NO_ERR);
ParseBTResponseMsg(2, _msg) ;
Wait(10);
}
Wait(10);
}
}
# Error: Duplicate variable declaration (__ParseBTResponseMsg_7qG2_sval1_7qG2_003_inline_ReceiveSlaveData)
File "c:\Temp\temp.nxc" ; line 360
# __ParseBTResponseMsg_7qG2_sval1_7qG2_003_inline_ReceiveSlaveData byte[] {0x00}
#----------------------------------------------------------
# Error: Invalid variable argument: __ParseBTResponseMsg_7qG2_sval1_7qG2_003_inline_ReceiveSlaveData_inline_ReceiveSlaveData
File "c:\Temp\temp.nxc" ; line 335
# mov __ParseBTResponseMsg_7qG2_sval1_7qG2_003_inline_ReceiveSlaveData_inline_ReceiveSlaveData, __strbufParseBTResponseMsg_inline_ReceiveSlaveData
#----------------------------------------------------------
# Error: Error parsing expression: __ParseBTResponseMsg_7qG2_sval1_7qG2_003_inline_ReceiveSlaveData_inline_ReceiveSlaveData
File "c:\Temp\temp.nxc" ; line 335
#
#----------------------------------------------------------
# Error: Invalid string argument: __constVal0
File "c:\Temp\temp.nxc" ; line 335
# strcat __strbufParseBTResponseMsg_inline_ReceiveSlaveData, __constVal0
#----------------------------------------------------------
# Error: Invalid variable argument: __ParseBTResponseMsg_7qG2_sval1_7qG2_003_inline_ReceiveSlaveData_inline_ReceiveSlaveData
File "c:\Temp\temp.nxc" ; line 336
# mov __ParseBTResponseMsg_7qG2_sval1_7qG2_003_inline_ReceiveSlaveData_inline_ReceiveSlaveData, __strbufParseBTResponseMsg_inline_ReceiveSlaveData
#----------------------------------------------------------
# Error: Error parsing expression: __ParseBTResponseMsg_7qG2_sval1_7qG2_003_inline_ReceiveSlaveData_inline_ReceiveSlaveData
File "c:\Temp\temp.nxc" ; line 336
#
#----------------------------------------------------------
# Error: Invalid string argument: __constVal0
File "c:\Temp\temp.nxc" ; line 336
# strcat __strbufParseBTResponseMsg_inline_ReceiveSlaveData, __constVal0
#----------------------------------------------------------
# Error: Invalid variable argument: __ParseBTResponseMsg_7qG2_sval1_7qG2_003_inline_ReceiveSlaveData_inline_ReceiveSlaveData
File "c:\Temp\temp.nxc" ; line 335
# mov __ParseBTResponseMsg_7qG2_sval1_7qG2_003_inline_ReceiveSlaveData_inline_ReceiveSlaveData, __strbufParseBTResponseMsg_inline_ReceiveSlaveData
#----------------------------------------------------------
# Error: Error parsing expression: __ParseBTResponseMsg_7qG2_sval1_7qG2_003_inline_ReceiveSlaveData_inline_ReceiveSlaveData
File "c:\Temp\temp.nxc" ; line 335
#
#----------------------------------------------------------
# Error: Invalid string argument: __constVal0
File "c:\Temp\temp.nxc" ; line 335
# strcat __strbufParseBTResponseMsg_inline_ReceiveSlaveData, __constVal0
#----------------------------------------------------------
# Error: Invalid variable argument: __ParseBTResponseMsg_7qG2_sval1_7qG2_003_inline_ReceiveSlaveData_inline_ReceiveSlaveData
File "c:\Temp\temp.nxc" ; line 336
# mov __ParseBTResponseMsg_7qG2_sval1_7qG2_003_inline_ReceiveSlaveData_inline_ReceiveSlaveData, __strbufParseBTResponseMsg_inline_ReceiveSlaveData
#----------------------------------------------------------
# Error: Error parsing expression: __ParseBTResponseMsg_7qG2_sval1_7qG2_003_inline_ReceiveSlaveData_inline_ReceiveSlaveData
File "c:\Temp\temp.nxc" ; line 336
#
#----------------------------------------------------------
# Error: Invalid string argument: __constVal0
File "c:\Temp\temp.nxc" ; line 336
# strcat __strbufParseBTResponseMsg_inline_ReceiveSlaveData, __constVal0
#----------------------------------------------------------
# Error: Invalid variable argument: __ParseBTResponseMsg_7qG2_sval1_7qG2_003_inline_ReceiveSlaveData_inline_ReceiveSlaveData
File "c:\Temp\temp.nxc" ; line 335
# mov __ParseBTResponseMsg_7qG2_sval1_7qG2_003_inline_ReceiveSlaveData_inline_ReceiveSlaveData, __strbufParseBTResponseMsg_inline_ReceiveSlaveData
#----------------------------------------------------------
# Error: Error parsing expression: __ParseBTResponseMsg_7qG2_sval1_7qG2_003_inline_ReceiveSlaveData_inline_ReceiveSlaveData
File "c:\Temp\temp.nxc" ; line 335
#
#----------------------------------------------------------
# Error: Invalid string argument: __constVal0
File "c:\Temp\temp.nxc" ; line 335
# strcat __strbufParseBTResponseMsg_inline_ReceiveSlaveData, __constVal0
#----------------------------------------------------------
# Error: Invalid variable argument: __ParseBTResponseMsg_7qG2_sval1_7qG2_003_inline_ReceiveSlaveData_inline_ReceiveSlaveData
File "c:\Temp\temp.nxc" ; line 336
# mov __ParseBTResponseMsg_7qG2_sval1_7qG2_003_inline_ReceiveSlaveData_inline_ReceiveSlaveData, __strbufParseBTResponseMsg_inline_ReceiveSlaveData
#----------------------------------------------------------
# Error: Error parsing expression: __ParseBTResponseMsg_7qG2_sval1_7qG2_003_inline_ReceiveSlaveData_inline_ReceiveSlaveData
File "c:\Temp\temp.nxc" ; line 336
#
#----------------------------------------------------------
# Error: Invalid string argument: __constVal0
File "c:\Temp\temp.nxc" ; line 336
# strcat __strbufParseBTResponseMsg_inline_ReceiveSlaveData, __constVal0
#----------------------------------------------------------
19 errors during compilation