Component: Injector (File) (Test Injectors)

From Flowcode Help
Revision as of 11:04, 17 November 2021 by Wiki bot (talk | contribs)
Jump to navigationJump to search
Author Matrix Ltd
Version 1.0
Category Test Injectors


Injector (File) component

Comms data injector to allow data to be streamed to and from a file during simulation. The component will read data from the incoming file and write data to the outgoing file.

Detailed description

No detailed description exists yet for this component

Examples

Example to log the bytes sent via the UART RS232 component to a file as comma separated decimal numbers. FC6 Icon.png LogToFile Contents of the file in the Flowcode project directory after running the simulation.

FileWrite.jpg

Downloadable macro reference

Fc9-comp-macro.png SPITransferTrans
Transfer an array of bytes using the SPI bus 
Fc9-u8-icon.png - BYTE Channel
Channel Index: Range 0 - SPI Bus Count - 1 
Fc9-u16-icon.png - UINT Count
Number of bytes to send and receive 
Fc9-u8-icon.png - BYTE DataOut
Outgoing data 
Fc9-u8-icon.png - BYTE DataIn
Incoming data 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png UARTBaud
 
Fc9-u8-icon.png - BYTE Channel
 
Fc9-u8-icon.png - BYTE Rate
 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png UARTCheckRX
 
Fc9-u8-icon.png - BYTE Channel
 
Fc9-u8-icon.png - BYTE Return


Fc9-comp-macro.png UARTInitialise
 
Fc9-u8-icon.png - BYTE Channel
 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png SPITransfer
Transfer a byte using the SPI bus 
Fc9-u8-icon.png - BYTE Channel
Channel Index: Range 0 - SPI Bus Count - 1 
Fc9-u8-icon.png - BYTE DataOut
 
Fc9-u8-icon.png - BYTE Return


Fc9-comp-macro.png GetConsoleHandle
Gets the handle to the console allowing data displaying on the panel etc. 
[[File:]] - Return


Fc9-comp-macro.png SPIPrescaler
Modify the speed of the SPI bus 
Fc9-u8-icon.png - BYTE Channel
Channel Index: Range 0 - SPI Bus Count - 1 
Fc9-u8-icon.png - BYTE Prescaler
Range: 0-2 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png UARTReceive
 
Fc9-u8-icon.png - BYTE Channel
 
Fc9-u8-icon.png - BYTE Return


Fc9-comp-macro.png SPIInitialise
Initialsie the SPI module ready for communications 
Fc9-u8-icon.png - BYTE Channel
Channel Index: Range 0 - SPI Bus Count - 1 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png UARTSend
 
Fc9-u8-icon.png - BYTE Channel
 
Fc9-u8-icon.png - BYTE Data
 
Fc9-void-icon.png - VOID Return



Property reference

Fc9-prop-icon.png Properties
Fc9-type-7-icon.png Show Console
 
Fc9-type-13-icon.png Incoming File
File to stream incoming data from. File -> Communications component. 
Fc9-type-16-icon.png Parse Mode
Specifies the way we read in the data from the file. Detailed Byte : "z - 122 - 0x7a" Raw : "z" CSV Decimal : "122, " CSV Hex : "0x7a, " 
Fc9-type-16-icon.png Display Mode
Specifies the way we show the data on the console. Detailed Byte : "z - 122 - 0x7a" Raw : "z" CSV Decimal : "122, " CSV Hex : "0x7a, " 
Fc9-type-21-icon.png Values Per Line
Number of values to display on a single line of the data console. 0 = Infinite number of characters 
Fc9-type-7-icon.png Skip Timestamp
A file populated with data from an injector may have a timestamp built in which we may not want to receive. Yes: Skip first 22 characters of each line of data so we don't receive any of the timestamp info. No: Read data normally. 
Fc9-type-13-icon.png Outgoing File
File to store outgoing data. Communications component -> File 
Fc9-type-7-icon.png Clear On Init
No - Append to the end of the file. Yes - Empty file on initialise and start from the beginning of the file. 
Fc9-type-16-icon.png Data Mode
Specifies how the data is represented in the outgoing file. Detailed Byte : "z - 122 - 0x7a" Raw : "z" CSV Decimal : "122, " CSV Hex : "0x7a, " 
Fc9-type-21-icon.png Values Per Line
Number of values to display on a single line, applies to the file and data console. 0 = Infinite number of characters 
Fc9-type-7-icon.png Append Timestamp
Appends a timestamp to the beginning of every line relating to the time the first byte in the line was received. Based on the PC system time. Timestamp in the format "YY/MM/DD - HH:MM:SS - " 
Fc9-conn-icon.png Connections
Fc9-conn-icon.png Simulations