Fawkes API  Fawkes Development Version
fawkes::InterfaceInfo Class Reference

#include <>>

Public Member Functions

 InterfaceInfo (const char *type, const char *id, const unsigned char *hash, unsigned int serial, bool has_writer, unsigned int num_readers, const std::list< std::string > &readers, const std::string &writer, const Time *timestamp)
 Constructor. More...
 
 InterfaceInfo (const InterfaceInfo &i)
 Copy constructor. More...
 
 ~InterfaceInfo ()
 Destructor. More...
 
const char * type () const
 Get interface type. More...
 
const char * id () const
 Get interface ID. More...
 
const unsigned char * hash () const
 Get interface version hash. More...
 
std::string hash_printable () const
 Get interface version hash in printable format. More...
 
bool has_writer () const
 Check if there is a writer. More...
 
unsigned int num_readers () const
 Get number of readers. More...
 
const std::list< std::string > & readers () const
 Get readers of interface. More...
 
const std::string & writer () const
 Get name of writer on interface. More...
 
unsigned int serial () const
 Get interface instance serial. More...
 
const Timetimestamp () const
 Get interface timestamp. More...
 
InterfaceInfooperator= (const InterfaceInfo &i)
 Assignment operator. More...
 
bool operator< (const InterfaceInfo &ii) const
 < operator This compares two interface infos with respect to the less than (<) relation considering the type and id of an interface. More...
 

Detailed Description

Interface info. This class holds information about a specific interface.

Author
Tim Niemueller

Definition at line 40 of file interface_info.h.

Constructor & Destructor Documentation

◆ InterfaceInfo() [1/2]

InterfaceInfo::InterfaceInfo ( const char *  type,
const char *  id,
const unsigned char *  hash,
unsigned int  serial,
bool  has_writer,
unsigned int  num_readers,
const std::list< std::string > &  readers,
const std::string &  writer,
const Time timestamp 
)

Constructor.

Parameters
typetype of the interface
idid of the interface
hashversion hash
has_writertrue if there is a writer, false otherwise
num_readersnumber of readers
serialinstance serial
readersname of readers of interface
writername of writer of interface
timestampinterface timestamp (time of last write or data timestamp)

Definition at line 58 of file interface_info.cpp.

References has_writer(), hash(), num_readers(), readers(), serial(), timestamp(), type(), and writer().

◆ InterfaceInfo() [2/2]

InterfaceInfo::InterfaceInfo ( const InterfaceInfo i)

Copy constructor.

Parameters
iinfo to copy

Definition at line 83 of file interface_info.cpp.

◆ ~InterfaceInfo()

InterfaceInfo::~InterfaceInfo ( )

Destructor.

Definition at line 98 of file interface_info.cpp.

Member Function Documentation

◆ has_writer()

bool InterfaceInfo::has_writer ( ) const

Check if there is a writer.

Returns
true if there is a writer, false otherwise

Definition at line 177 of file interface_info.cpp.

Referenced by InterfaceInfo().

◆ hash()

const unsigned char * InterfaceInfo::hash ( ) const

Get interface version hash.

Returns
interface version hash

Definition at line 154 of file interface_info.cpp.

Referenced by InterfaceInfo().

◆ hash_printable()

std::string InterfaceInfo::hash_printable ( ) const

Get interface version hash in printable format.

Returns
interface version hash printable string

Definition at line 163 of file interface_info.cpp.

◆ id()

const char * InterfaceInfo::id ( ) const

Get interface ID.

Returns
ID string

Definition at line 145 of file interface_info.cpp.

◆ num_readers()

unsigned int InterfaceInfo::num_readers ( ) const

Get number of readers.

Returns
number of readers

Definition at line 186 of file interface_info.cpp.

Referenced by InterfaceInfo().

◆ operator<()

bool InterfaceInfo::operator< ( const InterfaceInfo ii) const

< operator This compares two interface infos with respect to the less than (<) relation considering the type and id of an interface.

An interface info A is less than an interface info B (A < B) iff (A.type < B.type) or ((A.type == B.type) && A.id < B.id).

Parameters
iiinterface info to compare this to
Returns
true if this instance is considered less than ii, false otherwise

Definition at line 236 of file interface_info.cpp.

◆ operator=()

InterfaceInfo & InterfaceInfo::operator= ( const InterfaceInfo i)

Assignment operator.

Parameters
iinfo to copy from
Returns
reference to this instance

Definition at line 111 of file interface_info.cpp.

◆ readers()

const std::list< std::string > & InterfaceInfo::readers ( ) const

Get readers of interface.

Returns
string of names of readers of this interface

Definition at line 195 of file interface_info.cpp.

Referenced by InterfaceInfo().

◆ serial()

unsigned int InterfaceInfo::serial ( ) const

Get interface instance serial.

Returns
type string

Definition at line 213 of file interface_info.cpp.

Referenced by InterfaceInfo().

◆ timestamp()

const Time * InterfaceInfo::timestamp ( ) const

Get interface timestamp.

Returns
point to interface last update time

Definition at line 222 of file interface_info.cpp.

Referenced by InterfaceInfo().

◆ type()

const char * InterfaceInfo::type ( ) const

Get interface type.

Returns
type string

Definition at line 136 of file interface_info.cpp.

Referenced by InterfaceInfo().

◆ writer()

const std::string & InterfaceInfo::writer ( ) const

Get name of writer on interface.

Returns
name of writer owner or empty string of no writer or unknown

Definition at line 204 of file interface_info.cpp.

Referenced by InterfaceInfo().


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