okFilePipe (Pipe In, Pipe Out, Trigger In)

This component provides simple binary file transfer capability through the use of Pipe In or Pipe Outs.  The type (In or Out) is automatically determined by the endpoint address.  The component appears as a pushbutton on your panel that can be clicked to initiate the transfer.

If no filename is provided, the user will be prompted with a File Dialog to select an appropriate input or output file.  If a filename is provided for Pipe In, but the file does not exist, the user will also be prompted.

In the case of a Pipe In, the filename parameter provides an input file.  The entire contents of the file are transferred to the Pipe In.  The transfer proceeds in chunks of 64kB until the entire file has been transferred.

In the case of a Pipe Out, a length parameter must be provided to tell FrontPanel how many bytes to read from the FPGA.  The transfer proceeds in chunks of 64kB until the full length has been read and stored.

In both cases, an optional Start Trigger and optional Done Trigger are available.  The Start Trigger will be activated just before the transfer initiates.  The Done Trigger is activated after the transfer completes.  These triggers can be used as notification events within your hardware.

For better performance, the chunksize parameter can be used to specify the maximum length of each transfer.

To use a BlockPipeIn or BlockPipeOut, specify the blocksize parameter appropriately.  Please refer to the FrontPanel API Reference for blocksize limitations depending on the interface type.

ELEMENTTYPEDESCRIPTION
positionPOSITIONPosition of the top left corner.
sizeSIZESize in pixels.
labelTEXTLabel text, shown inside the button.
tooltipTEXTTooltip text.
endpointHEX BYTEEndpoint address for the corresponding Pipe In or Pipe Out.
filenameTEXTOptional filename to read or write.  If not provided, the user will be prompted.
lengthNUMBERFor Pipe Out transfers, the length (in bytes) to read from the Pipe Out and store in the file. Must follow the pipe in/out length requirements specified in the API documentation.
blocksizeNUMBEROptionally specifies a block size to be used for Block Pipes.  If unspecified, standard Pipes will be used.  If specified, Block Pipes will be used. Must follow the block pipe in/out block size requirements specified in the API documentation.
chunksizeNUMBEROptionally specifies a maximum length to be used for Pipes and Block Pipes. If unspecified, 64KiB will be used. Must follow the pipe in/out length requirements specified in the API documentation.
appendIf present, an output file will be appended if it already exists.
starttriggerXMLDescribes the parameters of an optional Start Trigger (endpoint and bit).
donetriggerXMLDescribes the parameters of an optional Done Trigger (endpoint and bit).

XML Example

<object class="okFilePipe"> <label>Pipe Out</label> <position>20,53</position> <size>60,20</size> <endpoint>0xa0</endpoint> <length>1024</length> <tooltip>Read a file from Pipe 0xA0</tooltip> <append /> <filename>pipeout.bin</filename> <starttrigger><endpoint>0x40</endpoint><bit>0</bit></starttrigger> <donetrigger><endpoint>0x40</endpoint><bit>1</bit></donetrigger> </object>
Code language: HTML, XML (xml)