Notify with MbInfo of received data
This commit is contained in:
parent
4e40928ff9
commit
7716a32185
1 changed files with 8 additions and 8 deletions
|
@ -81,7 +81,7 @@ void OnModbusReceiveBits(struct ModbusApHeader mbap, byte buffer[])
|
|||
memcpy_n2h(mbres, buffer);
|
||||
memcpy_n2h(mbreq, gQueueAck[mbap.TxID].Buffer);
|
||||
|
||||
writeDbg(MbDebug, "Received %d bits from 0x%04X", mbreq.Count, mbreq.Address);
|
||||
writeDbg(MbInfo, "Received %d bits from 0x%04X", mbreq.Count, mbreq.Address);
|
||||
|
||||
for (i = 0; i < mbres.ByteCount; i++)
|
||||
{
|
||||
|
@ -132,7 +132,7 @@ void OnModbusReceiveRegisters(struct ModbusApHeader mbap, byte buffer[])
|
|||
memcpy_n2h(mbres, buffer);
|
||||
memcpy_n2h(mbreq, gQueueAck[mbap.TxID].Buffer);
|
||||
|
||||
writeDbg(MbDebug, "Received %d registers from 0x%04X", mbreq.Count, mbreq.Address);
|
||||
writeDbg(MbInfo, "Received %d registers from 0x%04X", mbreq.Count, mbreq.Address);
|
||||
|
||||
OnModbusReadRegistersSuccess(mbres, mbreq);
|
||||
}
|
||||
|
@ -176,7 +176,7 @@ void OnModbusConfirmBit(struct ModbusApHeader mbap, byte buffer[])
|
|||
|
||||
memcpy_n2h(mbc, buffer);
|
||||
|
||||
writeDbg(MbDebug, "Set bit at 0x%04X to %d", mbc.Address, mbc.Value);
|
||||
writeDbg(MbInfo, "Set bit at 0x%04X to %d", mbc.Address, mbc.Value);
|
||||
|
||||
OnModbusWriteBitSuccess(mbc);
|
||||
}
|
||||
|
@ -217,7 +217,7 @@ void OnModbusConfirmRegister(struct ModbusApHeader mbap, byte buffer[])
|
|||
|
||||
memcpy_n2h(mbc, buffer);
|
||||
|
||||
writeDbg(MbDebug, "Set register at 0x%04X to %d", mbc.Address, mbc.Value);
|
||||
writeDbg(MbInfo, "Set register at 0x%04X to %d", mbc.Address, mbc.Value);
|
||||
|
||||
OnModbusWriteRegisterSuccess(mbc);
|
||||
}
|
||||
|
@ -307,7 +307,7 @@ void OnModbusConfirmBits(struct ModbusApHeader mbap, byte buffer[])
|
|||
|
||||
memcpy_n2h(mbc, buffer);
|
||||
|
||||
writeDbg(MbDebug, "Updated &d bits at 0x%04X", mbc.Count, mbc.Address);
|
||||
writeDbg(MbInfo, "Updated &d bits at 0x%04X", mbc.Count, mbc.Address);
|
||||
|
||||
OnModbusWriteBitsSuccess(mbc);
|
||||
}
|
||||
|
@ -357,7 +357,7 @@ void OnModbusConfirmRegisters(struct ModbusApHeader mbap, byte buffer[])
|
|||
|
||||
memcpy_n2h(mbc, buffer);
|
||||
|
||||
writeDbg(MbDebug, "Updated &d registers at 0x%04X", mbc.Count, mbc.Address);
|
||||
writeDbg(MbInfo, "Updated %d registers at 0x%04X", mbc.Count, mbc.Address);
|
||||
|
||||
OnModbusWriteRegistersSuccess(mbc);
|
||||
}
|
||||
|
@ -398,7 +398,7 @@ void OnModbusConfirmMasks(struct ModbusApHeader mbap, byte buffer[])
|
|||
|
||||
memcpy_n2h(mbc, buffer);
|
||||
|
||||
writeDbg(MbDebug, "Applied masks at 0x%04X", mbc.Address);
|
||||
writeDbg(MbInfo, "Applied masks at 0x%04X", mbc.Address);
|
||||
|
||||
OnModbusWriteMasksSuccess(mbc);
|
||||
}
|
||||
|
@ -451,7 +451,7 @@ void OnModbusReceiveConfirmRegisters(struct ModbusApHeader mbap, byte buffer[])
|
|||
memcpy_n2h(mbres, buffer);
|
||||
memcpy_n2h(mbreq, gQueueAck[mbap.TxID].Buffer);
|
||||
|
||||
writeDbg(MbDebug, "Wrote some registers and received %d registers from 0x%04X", mbreq.Count, mbreq.Address);
|
||||
writeDbg(MbInfo, "Wrote some registers and received %d registers from 0x%04X", mbreq.Count, mbreq.Address);
|
||||
|
||||
OnModbusReadRegistersSuccess(mbres, mbreq);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue