Component: Injector (Human Interface) (Simulation)

From Flowcode Help
Revision as of 12:13, 21 July 2016 by BenR (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 (Human Interface) component

Comms data injector to allow typed data values to be inserted into a component. Allows data to be input in raw ASCII form or as numeric byte data 0-255.

Examples

This example receives a character and outputs it to the LCD, an injector has been added to allow you to type data into the console. FC6 Icon.png RS232_Example2 The Console window has tabs for the human interface data injector allowing you to type in data that will be received by the component.

RS2322.jpg

Again the RS232 console tabs reflect the data as it is sent and received.

RS2323.jpg

LCD showing received data.

RS2324.jpg

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

Buffer Size

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

Max number of bytes that can be stored in the components circular buffer

Data Mode

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

Sets the console data to interperete the data as ASCII or as Numbers 0-255