YANE-Framework 1.1.0
Public Member Functions | Static Public Attributes | Protected Attributes

yane::NetworkedControl::IOInterface Class Reference

Class for connecting components in a distributed plant - sensor - controller - actuator setting.

Inheritance diagram for yane::NetworkedControl::IOInterface:
[legend]
Collaboration diagram for yane::NetworkedControl::IOInterface:
[legend]

List of all members.

Public Member Functions

 IOInterface ()
 Constructor.
virtual bool isConnected ()=0
 Function to return whether network connection has been established.
yane::Model::Modelmodel ()
 Function to return the used class yane::Model::Model pointer.
virtual void readActor (T_ACTORPACKET *response)=0
 Function to read actuator responds from network connection.
virtual void readInput (T_INPUTPACKET *indata, double *data)=0
 Function to read sensor input from network connection.
virtual double samplingTime ()=0
 Function to return the sampling period.
virtual int sequenceLength ()=0
 Function to return the length of the sent control sequence.
virtual void writeOutput (T_OUTPUTPACKET *outdata, double *data)=0
 Function to send output from controller to network connection.
virtual ~IOInterface ()
 Destructor.

Static Public Attributes

static const int ACTORERRORCODE = 0x2EE878B8
 Actuator error code.
static const int ACTORSUCCESSCODE = 0x7E004BC2
 Actuator success code.
static const int INPUTCODE = 0x9A10092F
 Input error code.
static const int OUTPUTCODE = 0xF02891C2
 Output error code.

Protected Attributes

yane::Model::Model_model
 Pointer of the used class yane::Model::Model model.
double _samplingTime
 Sampling period.
int _sequenceLength
 Length of the control sequence.

Member Function Documentation

virtual bool yane::NetworkedControl::IOInterface::isConnected ( ) [pure virtual]

Function to return whether network connection has been established

Implemented in yane::NetworkedControl::IOInterfaceLocal, and yane::NetworkedControl::IOInterfaceTCP.

LIB_EXPORT yane::Model::Model * yane::NetworkedControl::IOInterface::model ( )

Function to return the used class yane::Model::Model pointer

virtual void yane::NetworkedControl::IOInterface::readActor ( T_ACTORPACKET response) [pure virtual]

Function to read actuator responds from network connection

Parameters:
responseActuator responds packet

Implemented in yane::NetworkedControl::IOInterfaceLocal, and yane::NetworkedControl::IOInterfaceTCP.

virtual void yane::NetworkedControl::IOInterface::readInput ( T_INPUTPACKET indata,
double *  data 
) [pure virtual]

Function to read sensor input from network connection

Parameters:
indataSensor input packet
dataAdditional data information

Implemented in yane::NetworkedControl::IOInterfaceLocal, and yane::NetworkedControl::IOInterfaceTCP.

virtual double yane::NetworkedControl::IOInterface::samplingTime ( ) [pure virtual]

Function to return the sampling period

Implemented in yane::NetworkedControl::IOInterfaceLocal, and yane::NetworkedControl::IOInterfaceTCP.

virtual int yane::NetworkedControl::IOInterface::sequenceLength ( ) [pure virtual]

Function to return the length of the sent control sequence

Implemented in yane::NetworkedControl::IOInterfaceLocal, and yane::NetworkedControl::IOInterfaceTCP.

virtual void yane::NetworkedControl::IOInterface::writeOutput ( T_OUTPUTPACKET outdata,
double *  data 
) [pure virtual]

Function to send output from controller to network connection

Parameters:
outdataOutput data package
dataAdditional data information

Implemented in yane::NetworkedControl::IOInterfaceLocal, and yane::NetworkedControl::IOInterfaceTCP.