Class IoEventInput

Nested Relationships

Nested Types

Inheritance Relationships

Base Type

Class Documentation

class IoEventInput : public EventInput

This class defines event input functions that can be processed by the Io module. Also see I/O Inputs.

Public Types

enum IoEventInputType

This enumerator class enumerates the types of event input functions that can be processed by this module.

Values:

enumerator IOBit

The input function triggers the event when the specified I/O bit is 1.

The parameters for this input function are specified in the IOBit structure of input.

enumerator NotIOBit

The input function triggers the event when the specified I/O bit is 0.

The parameters for this input function are specified in the NotIOBit structure of input.

enumerator OrIOBit

The input function triggers the event when either of the two specified I/O bits is 1.

The parameters for this input function are specified in the OrIOBit structure of input.

enumerator AndIOBit

The input function triggers the event when both of the two specified I/O bits is 1.

The parameters for this input function are specified in the AndIOBit structure of input.

enumerator XorIOBit

The input function triggers the event when one but not both of the specified I/O bits is 1 (this input function implements an exclusive-or logic).

The parameters for this input function are specified in the XorIOBit structure of input.

enumerator NandIOBit

The input function triggers the event when not both of the two specified I/O bits is 1.

The parameters for this input function are specified in the NandIOBit structure of input.

enumerator NorIOBit

The input function triggers the event when neither of the two specified I/O bits is 1.

The parameters for this input function are specified in the NorIOBit structure of input.

enumerator XnorIOBit

The input function triggers the event when both of the specified I/O bits are 1 or both of the specified I/O bits are 0 (this input function implements a not exclusive-or logic).

The parameters for this input function are specified in the XnorIOBit structure of input.

enumerator DelayIOBit

The input function triggers the event after the specified I/O bit remains 1 continuously for the specified time.

The parameters for this input function are specified in the DelayIOBit structure of input.

enumerator EqualIOBytes

The input function triggers the event when the specified I/O data is equal to the specified value.

The parameters for this input function are specified in the EqualIOBytes structure of input.

enumerator GreaterIOBytes

The input function triggers the event when the specified I/O data is greater than the specified value.

The parameters for this input function are specified in the GreaterIOBytes structure of input.

enumerator LessIOBytes

The input function triggers the event when the specified I/O data is less than the specified value.

The parameters for this input function are specified in the LessIOBytes structure of input.

Public Functions

IoEventInput()
virtual int GetInputModuleId()

Return the ModuleId of the Io module.

virtual WMX3APIFUNC GetInputData(unsigned char *buff, int buffSize, int *dataSize, char *initialState)

Convert the values specified in other member variables of the class inheriting this class to a binary representation that can be sent to the engine.

Convert the values specified in other member variables of the class inheriting this class to a binary representation that can be sent to the engine.

Parameters:
  • buff[out] A pointer to a buffer that will contain the binary representation of the member variables.

  • buffSize[in] The size of the buffer in bytes.

  • dataSize[out] A pointer to an int that will contain the size of the binary representation of the member variables, in bytes. This size of the buffer will be occupied.

  • initialState[out] A pointer to a char that will contain the initialState (triggered or untriggered) of the input function. This determines whether the event can trigger when the event is enabled.

virtual WMX3APIFUNC SetInputData(int moduleId, unsigned char *data, int dataSize)

Convert the binary representation of the values specified in other members of the class inheriting this class and copies them back to the other members.

Convert the binary representation of the values specified in other members of the class inheriting this class and copies them back to the other members.

Parameters:
  • moduleId[in] The ID of the module that defines the binary representation of the member variables.

  • data[in] A pointer to a buffer that contains the binary representation of the member variables.

  • dataSize[in] The size of the buffer in bytes.

Public Members

IoEventInputType inputFunction

Specifies the event input function.

union wmx3Api::IoEventInput::InputFunctionArguments input

Specifies the arguments for the event input function.

union InputFunctionArguments

This union defines the structs containing arguments for each input function.

Public Functions

InputFunctionArguments()

Public Members

struct wmx3Api::IoEventInput::InputFunctionArguments::IOBit ioBit
struct wmx3Api::IoEventInput::InputFunctionArguments::NotIOBit notIOBit
struct wmx3Api::IoEventInput::InputFunctionArguments::OrIOBit orIOBit
struct wmx3Api::IoEventInput::InputFunctionArguments::AndIOBit andIOBit
struct wmx3Api::IoEventInput::InputFunctionArguments::XorIOBit xorIOBit
struct wmx3Api::IoEventInput::InputFunctionArguments::NandIOBit nandIOBit
struct wmx3Api::IoEventInput::InputFunctionArguments::NorIOBit norIOBit
struct wmx3Api::IoEventInput::InputFunctionArguments::XnorIOBit xnorIOBit
struct wmx3Api::IoEventInput::InputFunctionArguments::DelayIOBit delayIOBit
struct wmx3Api::IoEventInput::InputFunctionArguments::EqualIOBytes equalIOBytes
struct wmx3Api::IoEventInput::InputFunctionArguments::GreaterIOBytes greaterIOBytes
struct wmx3Api::IoEventInput::InputFunctionArguments::LessIOBytes lessIOBytes
struct AndIOBit

This structure contains arguments for the AndIOBit input function.

Public Members

unsigned int byteAddress[2]

The byte addresses of the two I/O bits.

unsigned char bitAddress[2]

The bit addresses of the two I/O bits.

unsigned char invert[2]

If set to 1, the value of the I/O bit corresponding to that index will be inverted. If set to 0, that I/O bit is processed normally.

IOSourceType::T ioSourceType[2]

Determines the source of the I/O (input or output) for the I/O bit corresponding to that index.

struct DelayIOBit

This structure contains arguments for the DelayIOBit input function.

Public Members

unsigned int byteAddress

The byte address of the I/O bit.

unsigned char bitAddress

The bit address of the I/O bit.

unsigned char invert

If set to 1, the value of the I/O bit will be inverted. If set to 0, the I/O bit is processed normally.

IOSourceType::T ioSourceType

Determines the source of the I/O (input or output).

unsigned int delayTime

The delay time in units of milliseconds.

struct EqualIOBytes

This structure contains arguments for the EqualIOBytes input function.

Public Members

unsigned int byteAddress

The byte address of the I/O data.

unsigned char size

The size of the I/O data in bytes. 1, 2, or 4 may be specified.

unsigned int value

The value to compare the I/O data against.

unsigned char invert

If set to 1, the result of the comparison will be inverted. If set to 0, the comparison is processed normally.

IOSourceType::T ioSourceType

Determines the source of the I/O (input or output).

struct GreaterIOBytes

This structure contains arguments for the GreaterIOBytes input function.

Public Members

unsigned int byteAddress

The byte address of the I/O data.

unsigned char size

The size of the I/O data in bytes. 1, 2, or 4 may be specified.

unsigned char isSigned

If set to 1, the I/O data and value are considered signed values. For example, if size is 1, then 0xFF is considered as -1. value is considered to be 4 bytes regardless of size (for example, 0xFFFFFFFF is considered as -1). If set to 0, the I/O data and value are considered unsigned values. For example, if size is 1, then 0xFF is considered as 255. value is considered to be 4 bytes regardless of size (for example, 0xFFFFFFFF is considered as 4294967295).

unsigned int value

The value to compare the I/O data against.

unsigned char invert

If set to 1, the result of the comparison will be inverted. If set to 0, the comparison is processed normally.

IOSourceType::T ioSourceType

Determines the source of the I/O (input or output).

struct IOBit

This structure contains arguments for the IOBit input function.

Public Members

unsigned int byteAddress

The byte address of the I/O bit.

unsigned char bitAddress

The bit address of the I/O bit.

unsigned char invert

If set to 1, the value of the I/O bit will be inverted. If set to 0, the I/O bit is processed normally.

IOSourceType::T ioSourceType

Determines the source of the I/O (input or output).

struct LessIOBytes

This structure contains arguments for the LessIOBytes input function.

Public Members

unsigned int byteAddress

The byte address of the I/O data.

unsigned char size

The size of the I/O data in bytes. 1, 2, or 4 may be specified.

unsigned char isSigned

If set to 1, the I/O data and value are considered signed values. For example, if size is 1, then 0xFF is considered as -1. value is considered to be 4 bytes regardless of size (for example, 0xFFFFFFFF is considered as -1). If set to 0, the I/O data and value are considered unsigned values. For example, if size is 1, then 0xFF is considered as 255. value is considered to be 4 bytes regardless of size (for example, 0xFFFFFFFF is considered as 4294967295).

unsigned int value

The value to compare the I/O data against.

unsigned char invert

If set to 1, the result of the comparison will be inverted. If set to 0, the comparison is processed normally.

IOSourceType::T ioSourceType

Determines the source of the I/O (input or output).

struct NandIOBit

This structure contains arguments for the NandIOBit input function.

Public Members

unsigned int byteAddress[2]

The byte addresses of the two I/O bits.

unsigned char bitAddress[2]

The bit addresses of the two I/O bits.

unsigned char invert[2]

If set to 1, the value of the I/O bit corresponding to that index will be inverted. If set to 0, that I/O bit is processed normally.

IOSourceType::T ioSourceType[2]

Determines the source of the I/O (input or output) for the I/O bit corresponding to that index.

struct NorIOBit

This structure contains arguments for the NorIOBit input function.

Public Members

unsigned int byteAddress[2]

The byte addresses of the two I/O bits.

unsigned char bitAddress[2]

The bit addresses of the two I/O bits.

unsigned char invert[2]

If set to 1, the value of the I/O bit corresponding to that index will be inverted. If set to 0, that I/O bit is processed normally.

IOSourceType::T ioSourceType[2]

Determines the source of the I/O (input or output) for the I/O bit corresponding to that index.

struct NotIOBit

This structure contains arguments for the NotIOBit input function.

Public Members

unsigned int byteAddress

The byte address of the I/O bit.

unsigned char bitAddress

The bit address of the I/O bit.

unsigned char invert

If set to 1, the value of the I/O bit will be inverted. If set to 0, the I/O bit is processed normally.

IOSourceType::T ioSourceType

Determines the source of the I/O (input or output).

struct OrIOBit

This structure contains arguments for the OrIOBit input function.

Public Members

unsigned int byteAddress[2]

The byte addresses of the two I/O bits.

unsigned char bitAddress[2]

The bit addresses of the two I/O bits.

unsigned char invert[2]

If set to 1, the value of the I/O bit corresponding to that index will be inverted. If set to 0, that I/O bit is processed normally.

IOSourceType::T ioSourceType[2]

Determines the source of the I/O (input or output) for the I/O bit corresponding to that index.

struct XnorIOBit

This structure contains arguments for the XnorIOBit input function.

Public Members

unsigned int byteAddress[2]

The byte addresses of the two I/O bits.

unsigned char bitAddress[2]

The bit addresses of the two I/O bits.

unsigned char invert[2]

If set to 1, the value of the I/O bit corresponding to that index will be inverted. If set to 0, that I/O bit is processed normally.

IOSourceType::T ioSourceType[2]

Determines the source of the I/O (input or output) for the I/O bit corresponding to that index.

struct XorIOBit

This structure contains arguments for the XorIOBit input function.

Public Members

unsigned int byteAddress[2]

The byte addresses of the two I/O bits.

unsigned char bitAddress[2]

The bit addresses of the two I/O bits.

unsigned char invert[2]

If set to 1, the value of the I/O bit corresponding to that index will be inverted. If set to 0, that I/O bit is processed normally.

IOSourceType::T ioSourceType[2]

Determines the source of the I/O (input or output) for the I/O bit corresponding to that index.