Raptor:Data Logging File Sync

From NewEagleWiki
Jump to navigation Jump to search

Return to the main Raptor page

Return to File IO page

Raptor™ Data Logging File Sync

Description

This block flushes pending data into the file provided on its specified hardware resource. This ensures all data will make it to the desired file location.

Datalogging file write operations performed on VeeCAN display modules will write log data to temporary file buffers stored in the modules volatile memory. Periodically, these buffers need to be sycronized out to the actual log file kept in non-volatile memory on the connected USB storage device. Triggering the execution of this block will force this sync operation. Note that this file syncronization is a blocking operation and will affect the performance and task-timing of real-time systems.

This block returns the file handle, as well as an indication of whether or not it was successful in flushing the data.

Ensure that the log file is syncronized out to disk frequently enough to maintain log data integrity, if the USB device is removed without first being ejected, any data logged since the previous sync operation will be lost. Additionally, ensure that the file sysnc operation is not performed so frequently that the timing of the application is adversely affected due to the blocking nature of the file sync operation.

As with many of the other datalogging and file I/O Raptor blocks, this block takes a file handle as an input, and propagates the same file handle through the block logic to an output of the block. By connecting the File Handle output of file I/O block 'X' to the File Handle input of file I/O block 'Y', application designers can ensure that the logic executed by block Y will be performed after the logic executed by block X.

Inputs

Input Type Description
File Handle File Handle Specifies the file to sync.

Outputs

Output Type Description
File Handle File Handle Outputs the File Handle provided on the input.
Success boolean Output indicates if the file was successfully synced.

Parameters

Parameter Type Description
Resource Specify the resource which contains the file to sync.