MNE-CPP  beta 1.0
Classes | Signals | Public Member Functions | Public Attributes | List of all members
TriggerControlPlugin::SerialPort Class Reference

The SerialPort is a class which holds all properties and methods necesarry to open, communicate and close a serial port. In most cases you want to open the port, encode your output information (digital, analog or retrieve) and decode input information (digital or analog). When you are done, close the serial port. More...

#include <serialport.h>

Inheritance diagram for TriggerControlPlugin::SerialPort:

Classes

struct  Settings
 

Signals

void dataAvailable (const QByteArray)
 
void byteReceived ()
 

Public Member Functions

 SerialPort ()
 
 ~SerialPort ()
 
void initSettings ()
 
void initPort ()
 
bool open ()
 
void close ()
 
void encodedig ()
 
void encodeana ()
 
void encoderetr ()
 
void decodedig (QByteArray &t_incomingArray)
 
void decodeana (QByteArray &t_incomingArray)
 
void sendData (const QByteArray &data)
 
void readData ()
 
Settingssettings ()
 

Public Attributes

QByteArray m_data
 
QVector< int > m_digchannel
 
int m_motor
 
int m_analval
 
QVector< int > m_InAnChannelVal
 
QVector< int > m_InActiveDig
 
int m_retrievetyp
 
int m_retrievechan
 
int m_wiredChannel
 

Detailed Description

The SerialPort is a class which holds all properties and methods necesarry to open, communicate and close a serial port. In most cases you want to open the port, encode your output information (digital, analog or retrieve) and decode input information (digital or analog). When you are done, close the serial port.

DECLARE CLASS SerialPort

Definition at line 89 of file serialport.h.

Constructor & Destructor Documentation

SerialPort::SerialPort ( )

Constructs a SerialPort.

Definition at line 71 of file serialport.cpp.

SerialPort::~SerialPort ( )

Destroys the SerialPort.

Definition at line 107 of file serialport.cpp.

Member Function Documentation

void TriggerControlPlugin::SerialPort::byteReceived ( )
signal

[...] .

void SerialPort::close ( )

Closes the channel to the serial port.

Definition at line 115 of file serialport.cpp.

void TriggerControlPlugin::SerialPort::dataAvailable ( const QByteArray  )
signal

[...] .

void SerialPort::decodeana ( QByteArray &  t_incomingArray)

Decodes the analog input information according to a data transfer protocol (see manual).

Parameters
[in]QByteArrayinput byte array according to transfer protocol (see manual).

Definition at line 123 of file serialport.cpp.

void SerialPort::decodedig ( QByteArray &  t_incomingArray)

Decodes the digital input information according to a data transfer protocol (see manual).

Parameters
[in]QByteArrayinput byte array according to transfer protocol (see manual). *

Definition at line 208 of file serialport.cpp.

void SerialPort::encodeana ( )

Encodes the selected analog output channel according to a data transfer protocol (see manual).

Definition at line 232 of file serialport.cpp.

void SerialPort::encodedig ( )

Encodes the selected digital output channels according to a data transfer protocol (see manual).

Definition at line 315 of file serialport.cpp.

void SerialPort::encoderetr ( )

Encodes a retrieve byte array according to a data transfer protocol (see manual).

Definition at line 365 of file serialport.cpp.

void SerialPort::initPort ( )

Checks all available serial ports for the one desired and initializes to that.

Definition at line 417 of file serialport.cpp.

void SerialPort::initSettings ( )

Initializes Settings as data bits or baud rate, parity, stop bits and flow control.

Definition at line 400 of file serialport.cpp.

bool SerialPort::open ( )

Opens a channel to the serial port.

Definition at line 465 of file serialport.cpp.

void SerialPort::readData ( )

Reads the input information after checking whether it is formally correct.

Definition at line 444 of file serialport.cpp.

void SerialPort::sendData ( const QByteArray &  data)

Sends a byte array to the configured serial port

Parameters
[in]QByteArrayoutput byte array according to transfer protocol (see manual).

Definition at line 522 of file serialport.cpp.

Settings& TriggerControlPlugin::SerialPort::settings ( )
inline

returns the current settings

Definition at line 233 of file serialport.h.

Member Data Documentation

int TriggerControlPlugin::SerialPort::m_analval

Holds the current analog output value.

Definition at line 188 of file serialport.h.

QByteArray TriggerControlPlugin::SerialPort::m_data

Holds the byte array.

Definition at line 185 of file serialport.h.

QVector<int> TriggerControlPlugin::SerialPort::m_digchannel

Holds the currently selected digital output channel.

Definition at line 186 of file serialport.h.

QVector<int> TriggerControlPlugin::SerialPort::m_InActiveDig

Lists the digital states of the input channels.

Definition at line 191 of file serialport.h.

QVector<int> TriggerControlPlugin::SerialPort::m_InAnChannelVal

Lists the analog values of the input channels .

Definition at line 190 of file serialport.h.

int TriggerControlPlugin::SerialPort::m_motor

Holds the currently selected analog output channel.

Definition at line 187 of file serialport.h.

int TriggerControlPlugin::SerialPort::m_retrievechan

Holds the desired analog input channel.

Definition at line 194 of file serialport.h.

int TriggerControlPlugin::SerialPort::m_retrievetyp

Holds the desired input mode (analog or digital).

Definition at line 193 of file serialport.h.

int TriggerControlPlugin::SerialPort::m_wiredChannel

Holds the channel which is connected to the TriggerControl Run Method.

Definition at line 196 of file serialport.h.


The documentation for this class was generated from the following files: