MNE-CPP  beta 1.0
Public Slots | Signals | Public Member Functions | Public Attributes | List of all members
BabyMEGClient Class Reference

The BabyMEGClient class provides a TCP/IP communication between Qt and Labview. More...

#include <babymegclient.h>

Inheritance diagram for BabyMEGClient:

Public Slots

void ConnectToBabyMEG ()
 
void DisConnectBabyMEG ()
 
void SendCommandToBabyMEG ()
 
void DisplayError (int socketError, const QString &message)
 
void ReadToBuffer ()
 
void run ()
 
void SendCommandToBabyMEGShortConnection (QByteArray s)
 
void ConnectToBabyMEG ()
 
void DisConnectBabyMEG ()
 
void SendCommandToBabyMEG ()
 
void DisplayError (int socketError, const QString &message)
 
void ReadToBuffer ()
 
void run ()
 
void SendCommandToBabyMEGShortConnection (QByteArray s)
 

Signals

void DataAcq ()
 
void error (int socketError, const QString &message)
 
void DataAcq ()
 
void error (int socketError, const QString &message)
 

Public Member Functions

 BabyMEGClient (int myPort, QObject *parent=0)
 
QByteArray MGH_LM_Int2Byte (int a)
 
int MGH_LM_Byte2Int (QByteArray InByte)
 
double MGH_LM_Byte2Double (QByteArray InByte)
 
void HexDisplay (double a)
 
void SetInfo (BabyMEGInfo *pInfo)
 
void DispatchDataPackage (int tmp)
 
void ReadNextBlock (int tmp)
 
void SendCommand (QString s)
 
void handleBuffer ()
 
 BabyMEGClient (int myPort, QObject *parent=0)
 
QByteArray MGH_LM_Int2Byte (int a)
 
int MGH_LM_Byte2Int (QByteArray InByte)
 
double MGH_LM_Byte2Double (QByteArray InByte)
 
void HexDisplay (double a)
 
void SetInfo (QSharedPointer< BabyMEGInfo > pInfo)
 
void DispatchDataPackage (int tmp)
 
void ReadNextBlock (int tmp)
 
void SendCommand (QString s)
 
void handleBuffer ()
 
bool isConnected () const
 

Public Attributes

QString name
 
int port
 
bool SocketIsConnected
 
bool SkipLoop
 
bool DataAcqStartFlag
 
BabyMEGInfomyBabyMEGInfo
 
QByteArray buffer
 
int numBlock
 
bool DataACK
 
QSharedPointer< BabyMEGInfomyBabyMEGInfo
 

Detailed Description

The BabyMEGClient class provides a TCP/IP communication between Qt and Labview.

DECLARE CLASS BabyMEGClient

Definition at line 70 of file babymegclient.h.

Constructor & Destructor Documentation

BabyMEGClient::BabyMEGClient ( int  myPort,
QObject *  parent = 0 
)
explicit

Constructs a BabyMEG.

Definition at line 55 of file babymegclient.cpp.

BabyMEGClient::BabyMEGClient ( int  myPort,
QObject *  parent = 0 
)
explicit

Constructs a BabyMEG.

Member Function Documentation

void BabyMEGClient::ConnectToBabyMEG ( )
slot

Connect to BabyMEG server

Parameters
[in]void.

Definition at line 181 of file babymegclient.cpp.

void BabyMEGClient::ConnectToBabyMEG ( )
slot

Connect to BabyMEG server

Parameters
[in]void.
void BabyMEGClient::DisConnectBabyMEG ( )
slot

DisConnect to BabyMEG server

Parameters
[in]void.

Definition at line 222 of file babymegclient.cpp.

void BabyMEGClient::DisConnectBabyMEG ( )
slot

DisConnect to BabyMEG server

Parameters
[in]void.
void BabyMEGClient::DispatchDataPackage ( int  tmp)

Dispatch the data package

Parameters
[in]tmp– block size
void BabyMEGClient::DispatchDataPackage ( int  tmp)

Dispatch the data package

Parameters
[in]tmp– block size

Definition at line 413 of file babymegclient.cpp.

void BabyMEGClient::handleBuffer ( )

Handle the data buffer connecting to the TCP socket

Parameters
[in]void
void BabyMEGClient::handleBuffer ( )

Handle the data buffer connecting to the TCP socket

Parameters
[in]void

Definition at line 308 of file babymegclient.cpp.

void BabyMEGClient::HexDisplay ( double  a)

Hex display

Parameters
[in]a– double number
void BabyMEGClient::HexDisplay ( double  a)

Hex display

Parameters
[in]a– double number

Definition at line 172 of file babymegclient.cpp.

double BabyMEGClient::MGH_LM_Byte2Double ( QByteArray  InByte)

Convert one 8-byte array to a double

Parameters
[in]InByte– Byte array
[out]<double>.
double BabyMEGClient::MGH_LM_Byte2Double ( QByteArray  InByte)

Convert one 8-byte array to a double

Parameters
[in]InByte– Byte array
[out]<double>.

Definition at line 153 of file babymegclient.cpp.

int BabyMEGClient::MGH_LM_Byte2Int ( QByteArray  InByte)

Convert a 4-byte array to an integer

Parameters
[in]InByte– Byte array
[out]<int>.
int BabyMEGClient::MGH_LM_Byte2Int ( QByteArray  InByte)

Convert a 4-byte array to an integer

Parameters
[in]InByte– Byte array
[out]<int>.

Definition at line 119 of file babymegclient.cpp.

QByteArray BabyMEGClient::MGH_LM_Int2Byte ( int  a)

Convert an integer (4 bytes) to a 4-byte array

Parameters
[in]a– <int>.
[out]Bytearray
QByteArray BabyMEGClient::MGH_LM_Int2Byte ( int  a)

Convert an integer (4 bytes) to a 4-byte array

Parameters
[in]a– <int>.
[out]Bytearray

Definition at line 136 of file babymegclient.cpp.

void BabyMEGClient::ReadNextBlock ( int  tmp)

Read next data block

Parameters
[in]tmp– block size
void BabyMEGClient::ReadNextBlock ( int  tmp)

Read next data block

Parameters
[in]tmp– block size

Definition at line 432 of file babymegclient.cpp.

void BabyMEGClient::ReadToBuffer ( )
slot

Read data from socket to a buffer

Parameters
[in]void.

Definition at line 281 of file babymegclient.cpp.

void BabyMEGClient::ReadToBuffer ( )
slot

Read data from socket to a buffer

Parameters
[in]void.
void BabyMEGClient::SendCommand ( QString  s)

Send command with command format as string

Parameters
[in]s– string
void BabyMEGClient::SendCommand ( QString  s)

Send command with command format as string

Parameters
[in]s– string

Definition at line 474 of file babymegclient.cpp.

void BabyMEGClient::SendCommandToBabyMEG ( )
slot

Send Command to BabyMEG server

Parameters
[in]void.

Definition at line 258 of file babymegclient.cpp.

void BabyMEGClient::SendCommandToBabyMEG ( )
slot

Send Command to BabyMEG server

Parameters
[in]void.
void BabyMEGClient::SendCommandToBabyMEGShortConnection ( QByteArray  s)
slot

Send Command to BabyMEG command server with short sync connection

Parameters
[in]Strings - the string will be sent to server.

Definition at line 231 of file babymegclient.cpp.

void BabyMEGClient::SendCommandToBabyMEGShortConnection ( QByteArray  s)
slot

Send Command to BabyMEG command server with short sync connection

Parameters
[in]Strings - the string will be sent to server.
void BabyMEGClient::SetInfo ( QSharedPointer< BabyMEGInfo pInfo)

Set Head Info

Parameters
[in]pInfo– struct of header information

Definition at line 100 of file babymegclient.cpp.

void BabyMEGClient::SetInfo ( BabyMEGInfo pInfo)

Set Head Info

Parameters
[in]pInfo– struct of header information

Definition at line 94 of file babymegclient.cpp.


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