filestream - c# - reading from binary log file that is updated every 6 seconds with 12k of data -
I have a binary log file with streaming data from a sensor (int16).
Every 6 seconds, until the 6000 sample sensor is not cut, the int 16 type is added.
I need to vote on this file at regular intervals, which continues from reading the previous state. Is it better to have a filestream and binary reader open between the readings and keep the institute better? I) Every time I need to read (and to read the previous position to read the external variable) P> < P> Edit: Need to add some great tips so far that the "server" app is provided by an external source vendor and can not be modified.
If it always adds the same amount of data, then it may mean reopening. You want to find out the length before opening it, and then the whole number of "sample set" can be round, just when you hold it, it is still writing data, this could mean that you read less (if you write that ends between reading length and checking), but you will catch next time.
You need to make sure that you use the appropriate sharing options so that the author can still write while you are reading. (The author should also bear in mind.)
Comments
Post a Comment