for each request, the code places a transactionIdentifierInternal (For synchronization between messages of server and client) which it then doesn't check in the responses
for example:
public int[] ReadHoldingRegisters(int startingAddress, int quantity)
{
.
.
.
Byte[] data = new byte[]{ this.transactionIdentifier[1],
this.transactionIdentifier[0],
this.protocolIdentifier[1],
this.protocolIdentifier[0],
this.length[1],
this.length[0],
this.unitIdentifier,
this.functionCode,
this.startingAddress[1],
this.startingAddress[0],
this.quantity[1],
this.quantity[0],
this.crc[0],
this.crc[1]
.
.
.
}
I think it would be necessary to check that the Transaction identifier of the response matches that of the request, I am having problems with responses that are coming to me after timeouts and retries
Hi,
for each request, the code places a transactionIdentifierInternal (For synchronization between messages of server and client) which it then doesn't check in the responses
for example:
public int[] ReadHoldingRegisters(int startingAddress, int quantity) { . . . Byte[] data = new byte[]{ this.transactionIdentifier[1], this.transactionIdentifier[0], this.protocolIdentifier[1], this.protocolIdentifier[0], this.length[1], this.length[0], this.unitIdentifier, this.functionCode, this.startingAddress[1], this.startingAddress[0], this.quantity[1], this.quantity[0], this.crc[0], this.crc[1]
. . . }
I think it would be necessary to check that the Transaction identifier of the response matches that of the request, I am having problems with responses that are coming to me after timeouts and retries
regards