Re: [Bacnet-developers] MS/TP - how to ensure that pdu data have actually sent?
Brought to you by:
skarg
From: Steve K. <st...@ka...> - 2011-02-24 17:49:39
|
Hello Sergei, > I faced with the following problem: > The "Atomic Write File" demo issues last > Send_Atomic_Write_File_Stream() and exits, however, the Trasmit_Packet > buffer in the data link layer is still not empty, i.e. the Master Node > FSM on the demo side had no chance to send the last octets. > > How to handle this efficiently? May be introduce an on_exit() > function and wait here for actual completion of the data sending? An AtomicWriteFile is supposed to receive a SimpleACK reply, so the demo should wait for the SimpleACK (the invokeID freeing or timing out) before exiting. Moving the test of End_Of_File_Detected test into the scope of tsm_invoke_id_free() test in demo/writefile/main.c should solve it. Can you test it? Best Regards, Steve -- http://steve.kargs.net/ |