Jump to content

Component: Injector (File) (Test Injectors)

From Flowcode Help
Revision as of 14:36, 13 July 2026 by SteveT (talk | contribs) (Text replacement - "style="background-color:#EAE1EA;"" to "class="mtx-class-propfolder"")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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.

Component Source Code

Please click here to download the component source project: FC_Comp_Source_InjectorFile.fcfx

Please click here to view the component source code (Beta): FC_Comp_Source_InjectorFile.fcfx

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. LogToFile Contents of the file in the Flowcode project directory after running the simulation.






Macro reference

SPIInitialise

SPIInitialise
Initialsie the SPI module ready for communications 
- BYTE Channel
Channel Index: Range 0 - SPI Bus Count - 1 
- VOID Return


SPIPrescaler

SPIPrescaler
Modify the speed of the SPI bus 
- BYTE Channel
Channel Index: Range 0 - SPI Bus Count - 1 
- BYTE Prescaler
Range: 0-2 
- VOID Return


SPITransfer

SPITransfer
Transfer a byte using the SPI bus 
- BYTE Channel
Channel Index: Range 0 - SPI Bus Count - 1 
- BYTE DataOut
 
- BYTE Return


SPITransferTrans

SPITransferTrans
Transfer an array of bytes using the SPI bus 
- BYTE Channel
Channel Index: Range 0 - SPI Bus Count - 1 
- UINT Count
Number of bytes to send and receive 
- BYTE DataOut
Outgoing data 
- BYTE DataIn
Incoming data 
- VOID Return


UARTBaud

UARTBaud
 
- BYTE Channel
 
- BYTE Rate
 
- VOID Return


UARTCheckRX

UARTCheckRX
 
- BYTE Channel
 
- BYTE Return


UARTInitialise

UARTInitialise
 
- BYTE Channel
 
- VOID Return


UARTReceive

UARTReceive
 
- BYTE Channel
 
- BYTE Return


UARTSend

UARTSend
 
- BYTE Channel
 
- BYTE Data
 
- VOID Return


Property reference

Properties
Show Console
 
Incoming File Settings (Rx)
Incoming File
File to stream incoming data from. File -> Communications component. 
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, " 
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, " 
Values Per Line
Number of values to display on a single line of the data console. 0 = Infinite number of characters 
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. 
Outgoing File Settings (Tx)
Outgoing File
File to store outgoing data. Communications component -> File 
Clear On Init
No - Append to the end of the file. Yes - Empty file on initialise and start from the beginning of the file. 
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, " 
Values Per Line
Number of values to display on a single line, applies to the file and data console. 0 = Infinite number of characters 
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 - "