NorMIT-nav  16.5
An IGT application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
cx::NetworkConnection Class Reference

The NetworkConnection class handles incoming OpenIGTLink packages. More...

#include <cxNetworkConnection.h>

Inheritance diagram for cx::NetworkConnection:
cx::SocketConnection

Signals

void transform (QString devicename, Transform3D transform, double timestamp)
 
void calibration (QString devicename, Transform3D calibration)
 
void image (ImagePtr image)
 
void mesh (MeshPtr image)
 
void probedefinition (QString devicename, ProbeDefinitionPtr definition)
 
- Signals inherited from cx::SocketConnection
void connectionInfoChanged ()
 
void stateChanged (CX_SOCKETCONNECTION_STATE status)
 
void connected ()
 
void disconnected ()
 
void error ()
 

Public Member Functions

 NetworkConnection (QString uid, QObject *parent=0)
 
virtual ~NetworkConnection ()
 
QString getUid () const
 
QStringList getAvailableDialects () const
 
void invoke (boost::function< void()> func)
 
void sendImage (ImagePtr image)
 not thread-safe: use invoke More...
 
void sendMesh (MeshPtr image)
 not thread-safe: use invoke More...
 
void streamImage (ImagePtr image)
 not thread-safe: use invoke More...
 
- Public Member Functions inherited from cx::SocketConnection
 SocketConnection (QObject *parent=0)
 
ConnectionInfo getConnectionInfo ()
 thread-safe More...
 
CX_SOCKETCONNECTION_STATE getState ()
 thread-safe More...
 
virtual void setConnectionInfo (ConnectionInfo info)
 thread-safe More...
 
virtual void requestConnect ()
 not thread-safe: use invoke More...
 
virtual void requestDisconnect ()
 not thread-safe: use invoke More...
 

Protected Member Functions

virtual void setProtocol (QString protocolname)
 
- Protected Member Functions inherited from cx::SocketConnection
SocketConnectorPtr createConnector (ConnectionInfo info)
 
bool socketIsConnected ()
 
bool enoughBytesAvailableOnSocket (int bytes) const
 
bool socketReceive (void *packPointer, int packSize) const
 
QStringList getAllServerHostnames ()
 
void setCurrentConnectionInfo ()
 
void stateChange (CX_SOCKETCONNECTION_STATE newState)
 
CX_SOCKETCONNECTION_STATE computeState ()
 

Additional Inherited Members

- Public Slots inherited from cx::SocketConnection
bool sendData (const char *data, qint64 maxSize)
 not thread-safe More...
 
- Protected Attributes inherited from cx::SocketConnection
QTcpSocket * mSocket
 
CX_SOCKETCONNECTION_STATE mCurrentState
 
QMutex mNextConnectionInfoMutex
 
ConnectionInfo mNextConnectionInfo
 info to be used for the next connect(), mutexed. More...
 
SocketConnectorPtr mConnector
 

Detailed Description

The NetworkConnection class handles incoming OpenIGTLink packages.

To specify how packages should be handled you can specify different kind of supported dialects, which are a way to handle the way different OpenIGTLink servers send packages.

Definition at line 67 of file cxNetworkConnection.h.

Constructor & Destructor Documentation

cx::NetworkConnection::NetworkConnection ( QString  uid,
QObject *  parent = 0 
)
explicit

Definition at line 58 of file cxNetworkConnection.cpp.

cx::NetworkConnection::~NetworkConnection ( )
virtual

Definition at line 80 of file cxNetworkConnection.cpp.

Member Function Documentation

void cx::NetworkConnection::calibration ( QString  devicename,
Transform3D  calibration 
)
signal
QStringList cx::NetworkConnection::getAvailableDialects ( ) const

Definition at line 103 of file cxNetworkConnection.cpp.

QString cx::NetworkConnection::getUid ( ) const
inline

Definition at line 79 of file cxNetworkConnection.h.

void cx::NetworkConnection::image ( ImagePtr  image)
signal
void cx::NetworkConnection::invoke ( boost::function< void()>  func)

Definition at line 90 of file cxNetworkConnection.cpp.

void cx::NetworkConnection::mesh ( MeshPtr  image)
signal
void cx::NetworkConnection::probedefinition ( QString  devicename,
ProbeDefinitionPtr  definition 
)
signal
void cx::NetworkConnection::sendImage ( ImagePtr  image)

not thread-safe: use invoke

Definition at line 198 of file cxNetworkConnection.cpp.

void cx::NetworkConnection::sendMesh ( MeshPtr  image)

not thread-safe: use invoke

Definition at line 207 of file cxNetworkConnection.cpp.

void cx::NetworkConnection::setProtocol ( QString  protocolname)
protectedvirtual

Implements cx::SocketConnection.

Definition at line 114 of file cxNetworkConnection.cpp.

void cx::NetworkConnection::streamImage ( ImagePtr  image)

not thread-safe: use invoke

Definition at line 158 of file cxNetworkConnection.cpp.

void cx::NetworkConnection::transform ( QString  devicename,
Transform3D  transform,
double  timestamp 
)
signal

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