Skip to content

mbtcpclient.c #6

@chengzt-git

Description

@chengzt-git

/生成预置服务器对象的命令,功能码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);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions