Raptor:Data Logging File IO: Difference between revisions

From NewEagleWiki
Jump to navigation Jump to search
(Created page with 'Return to the main Raptor page Return to Data Logging Libraries page [[File:RaptorDataLoggingFileIO.png|right|frame|Raptor™ D…')
 
No edit summary
 
(7 intermediate revisions by the same user not shown)
Line 4: Line 4:


[[File:RaptorDataLoggingFileIO.png|right|frame|Raptor™ Data Logging File IO]]
[[File:RaptorDataLoggingFileIO.png|right|frame|Raptor™ Data Logging File IO]]
<p>The blocks in this subsystem...</p>
<p>The blocks in this subsystem are used for file I/O on an available file system, such as a USB stick.</p>


<h1>Blocks</h1>
<h1>Blocks</h1>
Line 14: Line 14:
! scope="col" style="width: 25%;"| Appearance
! scope="col" style="width: 25%;"| Appearance
|-  
|-  
! <h5>[[Raptor:Data Logging Close|Close]]</h5>
! <h5>[[Raptor:Data Logging File Close|File Close]]</h5>
| <p>This block draws an image in the screen.</p>
| <p>This block closes an open file and flushes all data written to the file system.  All files should be closed before the module powers off to ensure data is not lost.</p>
| [[file:RaptorDataLoggingClose.png|frameless|border|Close block|center]]
| [[file:RaptorDataLoggingFileClose.png|frameless|border|File Close block|center]]
|-  
|-  
! <h5>[[Raptor:Data Logging EOF|EOF]]</h5>
! <h5>[[Raptor:Data Logging File EOF|File EOF]]</h5>
| <p>This block draws a line on the screen.</p>
| <p>This block is used to determine if the current file position is at the end of the file.</p>
| [[file:RaptorDataLoggingEOF.png|frameless|border|EOF block|center]]
| [[file:RaptorDataLoggingFileEOF.png|frameless|border|File EOF block|center]]
|-  
|-  
! <h5>[[Raptor:Data Logging Exists|Exists]]</h5>
! <h5>[[Raptor:Data Logging File Exists|File Exists]]</h5>
| <p>This block draws a polygon on the screen. The points of the polygon are in X,Y pairs.</p>
| <p>This block can be used to detect if a file exists on the specified resource.</p>
| [[file:RaptorDisplayExists.png|frameless|border|Exists block|center]]
| [[file:RaptorDataLoggingFileExists.png|frameless|border|File Exists block|center]]
|-  
|-  
! <h5>[[Raptor:Data Logging Get Free Space|Get Free Space]]</h5>
! <h5>[[Raptor:Data Logging File Get Free Space|File Get Free Space]]</h5>
| <p>This block draws a rectangle on the screen.</p>
| <p>This block returns the free space on the specified resource.</p>
| [[file:RaptorDisplayGetFreeSpace.png|frameless|border|Get Free Space block|center]]
| [[file:RaptorDataLoggingFileGetFreeSpace.png|frameless|border|File Get Free Space block|center]]
|-  
|-  
! <h5>[[Raptor:Data Logging Open|Open]]</h5>
! <h5>[[Raptor:Data Logging File Open|File Open]]</h5>
| <p>This block draws text on the screen.</p>
| <p>This block opens a file for read and/or write.  It outputs a File Handle which is used with other blocks to read, write and seek within the file.</p>
| [[file:RaptorDataLoggingOpen.png|frameless|border|Open block|center]]
| [[file:RaptorDataLoggingFileOpen.png|frameless|border|File Open block|center]]
|-  
|-  
! <h5>[[Raptor:Data Logging Position|Position]]</h5>
! <h5>[[Raptor:Data Logging File Position|File Position]]</h5>
| <p>This block automatically clears the portions of the screen drawn by the blocks in its FnCall output during the previous time step. It can be used in the draw foreground function to avoid the need to explicitely clear the screen. This block has some specific settings requirements for the model.</p>
| <p>This block is used to get the current file position measured in bytes from start of file.</p>
| [[file:RaptorDataLoggingPosition.png|frameless|border|Position block|center]]
| [[file:RaptorDataLoggingFilePosition.png|frameless|border|File Position block|center]]
|-  
|-  
! <h5>[[Raptor:Data Logging File Read|Read]]</h5>
! <h5>[[Raptor:Data Logging File Read|File Read]]</h5>
| <p>This block draws a filled circle on the screen.</p>
| <p>This block is used to read the contents of a file.</p>
| [[file:RaptorDataLoggingFileRead.png|frameless|border|Read block|center]]
| [[file:RaptorDataLoggingFileRead.png|frameless|border|File Read block|center]]
|-  
|-  
! <h5>[[Raptor:Data Logging Remove|Remove]]</h5>
! <h5>[[Raptor:Data Logging File Remove|File Remove]]</h5>
| <p>This block draws a filled ellipse on the screen.</p>
| <p>This block removes a file from the specified resource.</p>
| [[file:RaptorDataLoggingRemove.png|frameless|border|Remove block|center]]
| [[file:RaptorDataLoggingFileRemove.png|frameless|border|File Remove block|center]]
|-  
|-  
! <h5>[[Raptor:Data Logging Rename|Rename]]</h5>
! <h5>[[Raptor:Data Logging File Rename|File Rename]]</h5>
| <p>This block draws a filled polygon on the screen.</p>
| <p>This block is used to rename a file on a resource.  It cannot be used to move a file between resources.</p>
| [[file:RaptorDataLoggingRename.png|frameless|border|Rename block|center]]
| [[file:RaptorDataLoggingFileRename.png|frameless|border|File Rename block|center]]
|-  
|-  
! <h5>[[Raptor:Data Logging Remove|Remove]]</h5>
! <h5>[[Raptor:Data Logging File Seek|File Seek]]</h5>
| <p>This block draws a filled rectangle on the screen.</p>
| <p>This block is used to move the current position in a file where the next read or write operation will occur.</p>
| [[file:RaptorDataLoggingRemove.png|frameless|border|Remove block|center]]
| [[file:RaptorDataLoggingFileSeek.png|frameless|border|File Seek block|center]]
|-  
|-  
! <h5>[[Raptor:Data Logging Seek|Seek]]</h5>
! <h5>[[Raptor:Data Logging File Size|File Size]]</h5>
| <p>This block outputs an image reference which can be used with the [[Raptor:Display Draw Image|Draw Image]] or [[Raptor:Display Button Bar Setup Button|Button Bar Setup Button]] blocks.</p>
| <p>This block returns the size of the specified file in bytes.</p>
| [[file:RaptorDataLoggingSeek.png|frameless|border|Seek block|center]]
| [[file:RaptorDataLoggingFileSize.png|frameless|border|File Size block|center]]
|-  
|-  
! <h5>[[Raptor:Data Logging Size|Size]]</h5>
! <h5>[[Raptor:Data Logging File Sync|File Sync]]</h5>
| <p>This block outputs an image reference which can be used with the [[Raptor:Display Draw Image|Draw Image]] or [[Raptor:Display Button Bar Setup Button|Button Bar Setup Button]] blocks.</p>
| <p>This block flushes all pending data writes to the flash file system.</p>
| [[file:RaptorDataLoggingSize.png|frameless|border|Size block|center]]
| [[file:RaptorDataLoggingFileSync.png|frameless|border|File Sync block|center]]
|-  
|-  
! <h5>[[Raptor:Data Logging Sync|Sync]]</h5>
! <h5>[[Raptor:Data Logging File Write|File Write]]</h5>
| <p>This block outputs an image reference which can be used with the [[Raptor:Display Draw Image|Draw Image]] or [[Raptor:Display Button Bar Setup Button|Button Bar Setup Button]] blocks.</p>
| <p>This block is used to write data to a file. The block accepts uint8[] or string data types.</p>
| [[file:RaptorDisplaySync.png|frameless|border|Sync block|center]]
| [[file:RaptorDataLoggingFileWrite.png|frameless|border|File Write block|center]]
|-
! <h5>[[Raptor:Data Logging File Write|Write]]</h5>
| <p>This block outputs an image reference which can be used with the [[Raptor:Display Draw Image|Draw Image]] or [[Raptor:Display Button Bar Setup Button|Button Bar Setup Button]] blocks.</p>
| [[file:RaptorDisplayWrite.png|frameless|border|Write block|center]]
|}
|}

Latest revision as of 21:54, 7 July 2014

Return to the main Raptor page

Return to Data Logging Libraries page

Raptor™ Data Logging File IO

The blocks in this subsystem are used for file I/O on an available file system, such as a USB stick.

Blocks

Block Description Appearance
File Close

This block closes an open file and flushes all data written to the file system. All files should be closed before the module powers off to ensure data is not lost.

File Close block
File Close block
File EOF

This block is used to determine if the current file position is at the end of the file.

File EOF block
File EOF block
File Exists

This block can be used to detect if a file exists on the specified resource.

File Exists block
File Exists block
File Get Free Space

This block returns the free space on the specified resource.

File Get Free Space block
File Get Free Space block
File Open

This block opens a file for read and/or write. It outputs a File Handle which is used with other blocks to read, write and seek within the file.

File Open block
File Open block
File Position

This block is used to get the current file position measured in bytes from start of file.

File Position block
File Position block
File Read

This block is used to read the contents of a file.

File Read block
File Read block
File Remove

This block removes a file from the specified resource.

File Remove block
File Remove block
File Rename

This block is used to rename a file on a resource. It cannot be used to move a file between resources.

File Rename block
File Rename block
File Seek

This block is used to move the current position in a file where the next read or write operation will occur.

File Seek block
File Seek block
File Size

This block returns the size of the specified file in bytes.

File Size block
File Size block
File Sync

This block flushes all pending data writes to the flash file system.

File Sync block
File Sync block
File Write

This block is used to write data to a file. The block accepts uint8[] or string data types.

File Write block
File Write block