Hi,
I’ve got an mdot sending simple packets to an AEP conduit. The conduit is setup to simply echo the packet back to the node.
The mdot code is basically running this in a loop with a small delay:
if ((ret = _dot->send(txdata)) == mDot::MDOT_OK) {
logInfo("Successfully sent data to gateway");
rxData.clear();
if ((ret = _dot->recv(rxData)) != mDot::MDOT_OK) {
logError("Failed to receive: [%d][%s]", ret, mDot::getReturnCodeString(ret).c_str());
} else {
logInfo("Received data: %s", Text::bin2hexString(rxData).c_str());
}
}
What I’m seeing is a lag/offset in the echo’d replies. For testing I’m incrementing a number for each packet sent, and I obviously expect this same packet to come back in reply each time. What’s actually coming back is the reply from 3-10 iterations ago, the reply number is consistently lagging the sent.
It appears like messages are being queued to be sent back and stored waiting for the next incoming packet before they are being transmitted and then the newly received packets are getting added to the back of that queue.
Does anyone have any thoughts/comments that might help me get them in sync?
Thanks!
Paul