CARMA C++
carma::ui::rtd::ConnectionBase Class Reference

Base class for the connection objects. More...

#include <carma/ui/rtd/common/Connections.h>

Inheritance diagram for carma::ui::rtd::ConnectionBase:
carma::ui::rtd::ConnectionRO carma::ui::rtd::ConnectionRW

Public Member Functions

 ConnectionBase (int pid, const std::string &filename, MemoryMappedFile::Protection_t p)
 Constructor. More...
 
int getMaxConnections ()
 Return the maximum number of connections possible. More...
 
int getSerialNumber ()
 Get the serial number of this data set (debugging) More...
 
void lockRead ()
 Lock connection database shared memory for read access. More...
 
void lockWrite ()
 Lock connection database shared memory for read access. More...
 
virtual std::string toString ()
 Dump status of all connections to a string. More...
 
void unlock ()
 Release lock on connection database shared memory. More...
 
virtual ~ConnectionBase ()
 Destructor. More...
 

Protected Attributes

ConnectionDataconnection
 Pointer to a copy of connect database. More...
 
MemoryMappedFilememMap
 Pointer to the memory mapped file that contains connection database. More...
 
std::string memoryMappedFilename
 Filename of connection database. More...
 
int pid_
 Process id for this connection. More...
 

Detailed Description

Base class for the connection objects.

Implementation is on a memory mapped file with full locking capabilities.

Parameters
pidProgram id
filenameFull filename for the memory mapped file
pFile protection (readonly or read/write)

Definition at line 107 of file Connections.h.

Constructor & Destructor Documentation

carma::ui::rtd::ConnectionBase::ConnectionBase ( int  pid,
const std::string &  filename,
MemoryMappedFile::Protection_t  p 
)

Constructor.

virtual carma::ui::rtd::ConnectionBase::~ConnectionBase ( )
virtual

Destructor.

Member Function Documentation

int carma::ui::rtd::ConnectionBase::getMaxConnections ( )

Return the maximum number of connections possible.

int carma::ui::rtd::ConnectionBase::getSerialNumber ( )

Get the serial number of this data set (debugging)

void carma::ui::rtd::ConnectionBase::lockRead ( )

Lock connection database shared memory for read access.

void carma::ui::rtd::ConnectionBase::lockWrite ( )

Lock connection database shared memory for read access.

virtual std::string carma::ui::rtd::ConnectionBase::toString ( )
virtual

Dump status of all connections to a string.

Reimplemented in carma::ui::rtd::ConnectionRO.

void carma::ui::rtd::ConnectionBase::unlock ( )

Release lock on connection database shared memory.

Member Data Documentation

ConnectionData* carma::ui::rtd::ConnectionBase::connection
protected

Pointer to a copy of connect database.

Definition at line 131 of file Connections.h.

MemoryMappedFile* carma::ui::rtd::ConnectionBase::memMap
protected

Pointer to the memory mapped file that contains connection database.

Definition at line 133 of file Connections.h.

std::string carma::ui::rtd::ConnectionBase::memoryMappedFilename
protected

Filename of connection database.

Definition at line 135 of file Connections.h.

int carma::ui::rtd::ConnectionBase::pid_
protected

Process id for this connection.

Definition at line 129 of file Connections.h.


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