CARMA C++
|
Base class for the connection objects. More...
#include <carma/ui/rtd/common/Connections.h>
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 | |
ConnectionData * | connection |
Pointer to a copy of connect database. More... | |
MemoryMappedFile * | memMap |
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... | |
Base class for the connection objects.
Implementation is on a memory mapped file with full locking capabilities.
pid | Program id |
filename | Full filename for the memory mapped file |
p | File protection (readonly or read/write) |
Definition at line 107 of file Connections.h.
carma::ui::rtd::ConnectionBase::ConnectionBase | ( | int | pid, |
const std::string & | filename, | ||
MemoryMappedFile::Protection_t | p | ||
) |
Constructor.
|
virtual |
Destructor.
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 |
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.
|
protected |
Pointer to a copy of connect database.
Definition at line 131 of file Connections.h.
|
protected |
Pointer to the memory mapped file that contains connection database.
Definition at line 133 of file Connections.h.
|
protected |
Filename of connection database.
Definition at line 135 of file Connections.h.
|
protected |
Process id for this connection.
Definition at line 129 of file Connections.h.