0

Here is my flow graph:

File source > Throttle > Packet encoder > Packed to unpacked > Packet decoder > File sink.

No matter what i do, the final 1 or 2 packets (depending upon the number of bytes from file source) don't get written to file sink. The problem is the same if i replace file source and file sink with TCP source and TCP sink. I think it is an issue with Packet encoder and decoder. Any idea on how to fix this?

Ali Iqbal
  • 87
  • 1
  • 9

1 Answers1

0

Probably this issue is related with the internal buffering of each block, or the buffering of the file sink. Try to decrease the amount of buffered items in each block and/or set the unbuffered option at the file sink to On.

Another solution would be to choose from the flowgraph's options the No-GUI option and the Run to completion. With this way when the file source block reaches the end of file, it sends a special value to the following blocks indicating that the flowgraph is stopping. Perhaps with this way all buffered items in the flowgraph blocks will eventually be flushed.

Manos
  • 2,136
  • 17
  • 28
  • Doesn't work. It appears that the packet encoder block is waiting for bytes to arrive to fill up a packet. when that doesn't happen, the packet isn't forwarded. – Ali Iqbal Jul 14 '15 at 07:24
  • Perhaps the `run to completion` option will help you. See my updated answer. – Manos Jul 17 '15 at 09:44
  • i tried that. still gives the same result. last one or two packets not transmitted. – Ali Iqbal Jul 23 '15 at 11:13
  • Ok, then the only "solution" would be to pad a number of zero bytes at the end of the file in order to allow valid data to be processed by the decoder. – Manos Jul 24 '15 at 11:46