-
Notifications
You must be signed in to change notification settings - Fork 164
Description
/生成预置服务器对象的命令,功能码0x05,0x0F,命令长度随发送数据而变/
if((objInfo.functionCode==WriteSingleCoil)&&(objInfo.functionCode==WriteMultipleCoil))
{
bool statusList=(bool)dataList;
commandLength=SyntheticReadWriteTCPServerCommand(objInfo,statusList,NULL,commandBytes);
}
/生成预置服务器对象的命令,功能码0x06,0x10,命令长度随发送数据而变/
if((objInfo.functionCode==WriteSingleRegister)&&(objInfo.functionCode==WriteMultipleRegister))
{
uint16_t registerList=(uint16_t)dataList;
commandLength=SyntheticReadWriteTCPServerCommand(objInfo,NULL,registerList,commandBytes);
}
是不是应该改为:
/生成预置服务器对象的命令,功能码0x05,0x0F,命令长度随发送数据而变/
if((objInfo.functionCode==WriteSingleCoil)||(objInfo.functionCode==WriteMultipleCoil))
{
bool statusList=(bool)dataList;
commandLength=SyntheticReadWriteTCPServerCommand(objInfo,statusList,NULL,commandBytes);
}
/生成预置服务器对象的命令,功能码0x06,0x10,命令长度随发送数据而变/
if((objInfo.functionCode==WriteSingleRegister)||(objInfo.functionCode==WriteMultipleRegister))
{
uint16_t registerList=(uint16_t)dataList;
commandLength=SyntheticReadWriteTCPServerCommand(objInfo,NULL,registerList,commandBytes);
}