7.9.1.11. File I/O Functions

The new File I/O GEL functions provide the ability to add and remove File I/O objects through GEL. The File I/O GEL functions abstract the concept of File I/O and separate it from the idea of a breakpoint; thus there is no mention of breakpoints in the GEL function headers. Rather, the function definitions refer to program addresses.

The File I/O GEL functions are a temporary measure until more complete functionality is implemented through the external File I/O server in a future release of Code Composer Studio. At that time, this functionality will be exposed through the SDK and GEL functions. For now, these GEL functions allow you to perform File I/O in an automated manner, both directly through GEL and by way of the APIs (by requesting GEL expression evaluations).

The File I/O GEL functions should continue to function correctly in the future even after the File I/O implementation has been moved to the external server.

Adding a File I/O object puts it into the Playing state, after opening the corresponding file.

  • You can add a File I/O object that is linked to a specific program address. When the program encounters this address, the File I/O transfer is triggered by way of a breakpoint with a File I/O action (Read Data from File or Write Data to File). If there is no breakpoint at this address, one is added; if a breakpoint exists, the new File I/O item is connected to the existing breakpoint.
  • You can add a File I/O object that is linked to a specific source line in a specific source file. When the program executes past this line, the File I/O transfer is triggered by way of a breakpoint with a File I/O action (Read Data from File or Write Data to File). If there is no breakpoint at this source line, one is added; if a breakpoint exists, the new File I/O item is connected to the existing breakpoint.
  • You can add a File I/O object of either Input or Output type (Read Data from File or Write Data to File).

Removing a File I/O object first puts the File I/O object into the Stopped state. It then removes the connection between the File I/O object and the connected breakpoint. Finally, it closes the associated file.

  • You can remove a File I/O object by referring to the corresponding program address and the full path of the File I/O file.
  • You can remove a File I/O object by referring to the corresponding source file, line number, and full path of the File I/O file.

By default, file I/O files that use relative paths are placed inside the same directory as the most recently loaded .out file. To modify the location of these files, you can specify a default File I/O directory through the Option → Customize dialog.

Related Topics

GEL_AddInputFile()

GEL_AddOutputFile()

GEL_RemoveInputFile

GEL_RemoveOutputFile