Component: Injector (File) (Simulation)

From Flowcode Help
Revision as of 11:25, 13 February 2015 by MartinB (talk | contribs) (XML import)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search


Author Matrix Ltd
Version 1.0 (Release)
Category Simulation
This inherits from Data Injector


Image 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.

Examples

No additional examples


Downloadable macro reference

This component does not contain any downloadable macros

Simulation macro reference

This component inherits simulation macros from Data Injector

InitialiseInjector

Sets up the injector ready to receive commands or send data

Parameters

<- STRING InjectorName
Name of the console that will be created
This parameter may be returned back to the caller


Return value

BYTE


TxByte

Puts a byte onto the comms channel.

Parameters

BYTE DataByte


Return value

This call does not return a value


RxByte

Gets a byte from the comms channel - 255 signifies no more data available

Parameters

This macro has no parameters


Return value

BYTE


GetTxConsoleHandle

Gets the handle to the console allowing data displaying on the panel etc.

This call is provided by Data Injector

Parameters

This macro has no parameters


Return value

HANDLE


ChangeState

Changes the state for I2C or SPI type comms where the data bytes along are not enough to go on.

This call is provided by Data Injector

Parameters

BYTE NewState
Assigns new state, 0=default


Return value

This call does not return a value


GetRxConsoleHandle

Gets the handle to the console allowing data displaying on the panel etc.

This call is provided by Data Injector

Parameters

This macro has no parameters


Return value

HANDLE


GetConsoleHandle

Gets the handle to the console allowing data displaying on the panel etc.

Parameters

This macro has no parameters


Return value

HANDLE



Property reference

Incoming File

This property is of type Filename and can be referenced with the variable name Incoming.

File to stream incoming data from.

File -> Communications component.

Parse Mode

This property is of type Fixed list of ints and can be referenced with the variable name ParseMode.

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

This property is of type Fixed list of ints and can be referenced with the variable name DisplayMode.

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

This property is of type Unsigned integer and can be referenced with the variable name ValsPerLineI.

Number of values to display on a single line of the data console.

0 = Infinite number of characters

Skip Timestamp

This property is of type True or false and can be referenced with the variable name SkipTimestamp.

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

This property is of type Filename and can be referenced with the variable name Outgoing.

File to store outgoing data.

Communications component -> File

Clear On Init

This property is of type True or false and can be referenced with the variable name ResetOutgoing.

No - Append to the end of the file.

Yes - Empty file on initialise and start from the beginning of the file.

Data Mode

This property is of type Fixed list of ints and can be referenced with the variable name DataMode.

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

This property is of type Unsigned integer and can be referenced with the variable name ValsPerLine.

Number of values to display on a single line, applies to the file and data console.

0 = Infinite number of characters

Append Timestamp

This property is of type True or false and can be referenced with the variable name 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 - "