Ocean
Ocean::Maintenance::Connector Class Reference

This class is the base class for all maintenance connectors. More...

Inheritance diagram for Ocean::Maintenance::Connector:

Protected Member Functions

 Connector ()
 Creates a new connector. More...
 

Static Protected Member Functions

static bool place (const std::string &name, const unsigned long long id, const std::string &tag, Buffer &&buffer, const Timestamp timestamp)
 Explicitly places a maintenance data, information, message into the local maintenance manager. More...
 
static void encodeData (const std::string &name, const unsigned long long id, const std::string &tag, const Buffer &buffer, const Timestamp timestamp, const size_t reservedHeaderSize, Buffer &encodedBuffer)
 Encodes a maintenance data to one combined package. More...
 
static bool decodeData (const void *encodedBuffer, const size_t encodedBufferSize, std::string &name, unsigned long long &id, std::string &tag, Buffer &buffer, Timestamp &timestamp)
 Decodes a package buffer to maintenance data with corresponding information. More...
 

Detailed Description

This class is the base class for all maintenance connectors.

A maintenance connector connects a local maintenance manager with a remote maintenance manager to transmit the information.
The actual implementation of any maintenance connector must be done in a derived class, thus individual connectors with individual capabilities can be implemented.

Constructor & Destructor Documentation

◆ Connector()

Ocean::Maintenance::Connector::Connector ( )
inlineprotected

Creates a new connector.

Member Function Documentation

◆ decodeData()

static bool Ocean::Maintenance::Connector::decodeData ( const void *  encodedBuffer,
const size_t  encodedBufferSize,
std::string &  name,
unsigned long long &  id,
std::string &  tag,
Buffer buffer,
Timestamp timestamp 
)
staticprotected

Decodes a package buffer to maintenance data with corresponding information.

Parameters
encodedBufferThe encoded network package buffer
encodedBufferSizeThe size of the encoded buffer in bytes
nameThe resulting name of the maintenance manager to which the data has been sent originally
idThe result id of the maintenance manager to which the data has been sent originally
tagThe tag of the maintenance data
bufferThe buffer of the maintenance data
timestampThe timestamp of the maintenance data
Returns
True, if succeeded

◆ encodeData()

static void Ocean::Maintenance::Connector::encodeData ( const std::string &  name,
const unsigned long long  id,
const std::string &  tag,
const Buffer buffer,
const Timestamp  timestamp,
const size_t  reservedHeaderSize,
Buffer encodedBuffer 
)
staticprotected

Encodes a maintenance data to one combined package.

Parameters
nameThe name of the maintenance manager providing the data
idThe id of the maintenance manager providing the data
tagThe tag of the maintenance data
bufferThe maintenance data as buffer
timestampThe timestamp of the maintenance data
reservedHeaderSizeThe number of bytes which will be reserved for the header, so that the resulting buffer has an optional header followed by the payload data
encodedBufferThe resulting encoded package

◆ place()

static bool Ocean::Maintenance::Connector::place ( const std::string &  name,
const unsigned long long  id,
const std::string &  tag,
Buffer &&  buffer,
const Timestamp  timestamp 
)
staticprotected

Explicitly places a maintenance data, information, message into the local maintenance manager.

Explicit maintenance data can be set even if the manager is not active.

Parameters
nameThe name of the maintenance manager belonging to the data which will be placed
idThe id of the maintenance manager belonging to the data which will be placed
tagThe tag of the maintenance data
bufferThe buffer of the maintenance data, which will be moved
timestampThe timestamp of the maintenance data
Returns
True, if succeeded
See also
Maintenance::place().

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