ApparatusFramework::Connection Class Reference
[Communication Services]

#include <CommunicationServices/current/include/Connection.h>

Inheritance diagram for ApparatusFramework::Connection:
ApparatusFramework::KernelMultipleObservable ApparatusFramework::MultipleObservable< Msg * > ApparatusFramework::Observable< Msg * > ApparatusFramework::CanConnection

List of all members.

Public Member Functions

 Connection ()
virtual ~Connection ()
virtual bool send (ConnectionMsg *pMsg)
void setSynchronisation (Mutex *pMutex)

Protected Attributes


Detailed Description

Connection belongs - together with the Protocol and the CharDevice - to the "Connection" pattern. This pattern helps its user in implementing a multi connection communication mechanism over standard interfaces. The mechanism is thought for network & transport layer protocols but can also be used on application level.

As multiple connections over the same protocol are possible, the connection itself contains the logic of the protocol. It implements the state machine, timing and all the stuff necessary to realize a communication channel to the partner.

The protocol itself returns a handle to one or more connections. This handle is the interface over which the client communicates. The communication is message based, the ConnectionMsg is the carrier of the information. So the connections contains only a send method. The connection itself notifies its clients over the observer pattern. To the physical layer, the communication happens with the application of char devices.

Definition at line 99 of file Connection.h.

Constructor & Destructor Documentation

ApparatusFramework::Connection::Connection (  )  [inline]

constructors, destructors Default constructor, initializes the synchronization mutex.

Definition at line 104 of file Connection.h.

References m_pSynchronisationMutex.

virtual ApparatusFramework::Connection::~Connection (  )  [inline, virtual]

Destructs the connection and frees its resources.

Definition at line 108 of file Connection.h.

Member Function Documentation

virtual bool ApparatusFramework::Connection::send ( ConnectionMsg pMsg  )  [inline, virtual]

communication methods Sends a message over the connection.

pMsg Pointer to the message to be sent.
bool true: message sent, false: failure.

Definition at line 115 of file Connection.h.

References BBV_UNUSED_ARG.

void ApparatusFramework::Connection::setSynchronisation ( Mutex pMutex  )  [inline]

Sets the mutex for the communication synchronization.

pMutex pointer to a mutex.

Definition at line 120 of file Connection.h.

References m_pSynchronisationMutex.

Member Data Documentation

fields Communication mutex is used that only one instance has write access to the device.

Definition at line 120 of file Connection.h.

Referenced by Connection(), and setSynchronisation().

© 2004-2010 bbv Software Services AG / Apparatus Services