FREEDM DGI
|
Broker Architecture Namespace.
Namespaces | |
device | |
gm | |
lb | |
sc | |
Classes | |
class | CBroker |
Scheduler for the DGI modules. More... | |
class | CClockSynchronizer |
class | CConnection |
Represents a single outgoing connection to a client. More... | |
class | CConnectionManager |
Manages open connections so that they may be cleanly stopped. More... | |
class | CDispatcher |
Handles applying read handlers to incoming messages. More... | |
class | CGlobalConfiguration |
A singleton class which tracks commonly used configuration options. More... | |
class | CGlobalLogger |
Tracks the global logging configuration. More... | |
class | CGlobalPeerList |
class | CListener |
Represents a single CListener from a client. More... | |
class | CLocalLogger |
class | CLog |
Logging Output Software. More... | |
class | CPeerNode |
Base interface for agents/broker modules. More... | |
class | CPhysicalTopology |
Provides the Physical Topology Architecture. More... | |
class | CProtocolSR |
A reliable connection protocol with sweet as expirations. More... | |
class | CTimings |
struct | EConnectionError |
Used for errors communicating with peers. More... | |
struct | EDgiConfigError |
Used when the DGI has been misconfigured. More... | |
struct | EDgiNoSuchPeerError |
class | IDGIModule |
An interface for an object which can handle recieving incoming messages. More... | |
class | IProtocol |
A connection protocol. More... | |
struct | SRemoteHost |
A container which lists the hostname and and port of a peer. More... | |
Typedefs | |
typedef CLocalLogger * | CLoggerPointer |
Boost requires this to be a raw pointer. More... | |
typedef boost::shared_ptr < CConnection > | ConnectionPtr |
typedef std::map< std::string, CPeerNode > | PeerSet |
Provides a PeerSet type for a module templated on T. More... | |
typedef PeerSet::iterator | PeerSetIterator |
Provides a PeerSet iterator templated on T. More... | |
typedef std::map< std::string, std::pair< CPeerNode, boost::posix_time::ptime > > | TimedPeerSet |
Similar to a PeerSet, but also tracks the time a peer was inserted. More... | |
typedef TimedPeerSet::iterator | TimedPeerSetIterator |
Provides a TimedPeerSet iterator templated on T. More... | |
Functions | |
std::string | basename (const std::string s) |
Turns a qualified path into just a filename. More... | |
google::protobuf::uint64 | ComputeMessageHash (const ModuleMessage &msg) |
Hash a message. More... | |
int | CountInPeerSet (PeerSet &ps, const CPeerNode &m) |
Provides count() for a PeerSet. More... | |
int | CountInTimedPeerSet (TimedPeerSet &tps, const CPeerNode &m) |
Provides count() for a TimedPeerSet. More... | |
void | EraseInPeerSet (PeerSet &ps, const CPeerNode &m) |
Provides erase() for a PeerSet. More... | |
void | EraseInTimedPeerSet (TimedPeerSet &tps, const CPeerNode &m) |
Provides erase() for a TimedPeerSet. More... | |
PeerSetIterator | FindInPeerSet (PeerSet &ps, const CPeerNode &m) |
Provides find() for a PeerSet. More... | |
boost::posix_time::ptime | GetTimeFromPeerSet (TimedPeerSet &tps, const CPeerNode &m) |
Get the time a peer was placed into the TimedPeerSet; only sensible if the peer is in the set exactly once. More... | |
void | InsertInPeerSet (PeerSet &ps, const CPeerNode &m) |
Provides insert() for a PeerSet. More... | |
void | InsertInTimedPeerSet (TimedPeerSet &tps, const CPeerNode &m, boost::posix_time::ptime time) |
Provides insert() for a TimedPeerSet. More... | |
bool | IsValidPort (std::string port) |
bool | MessageIsExpired (const ProtocolMessage &msg) |
Determines whether the message has expired. More... | |
bool | operator< (const CPeerNode &a, const CPeerNode &b) |
bool | operator== (const CPeerNode &a, const CPeerNode &b) |
void | SetExpirationTimeFromNow (ProtocolMessage &msg, const boost::posix_time::time_duration &expires_in) |
Set the expiration time for this message. More... | |
void | StampMessageSendtime (ProtocolMessageWindow &msg) |
Sets the message's timestamp to the current time. More... | |
Variables | |
const unsigned int | ALIGNMENT_DURATION = 250 |
How often the scheduler should verify the schedule is being followed. More... | |
typedef boost::shared_ptr<CConnection> freedm::broker::ConnectionPtr |
typedef std::map<std::string, CPeerNode> freedm::broker::PeerSet |
typedef PeerSet::iterator freedm::broker::PeerSetIterator |
typedef std::map<std::string, std::pair<CPeerNode, boost::posix_time::ptime> > freedm::broker::TimedPeerSet |
typedef TimedPeerSet::iterator freedm::broker::TimedPeerSetIterator |
std::string freedm::broker::basename | ( | const std::string | s | ) |
basename
s | The path to extract from. |
google::protobuf::uint64 freedm::broker::ComputeMessageHash | ( | const ModuleMessage & | msg | ) |
ComputeMessageHash
msg | the message to hash |
int freedm::broker::CountInPeerSet | ( | PeerSet & | ps, |
const CPeerNode & | m | ||
) |
CountInPeerSet
ps | The peerset to search |
m | The peer to search for. |
int freedm::broker::CountInTimedPeerSet | ( | TimedPeerSet & | tps, |
const CPeerNode & | m | ||
) |
CountInPeerSet
tps | The peerset to search |
m | The peer to search for. |
void freedm::broker::EraseInPeerSet | ( | PeerSet & | ps, |
const CPeerNode & | m | ||
) |
EraseInPeerSet
ps | The peerset to erase from |
m | The peer to erase. |
void freedm::broker::EraseInTimedPeerSet | ( | TimedPeerSet & | tps, |
const CPeerNode & | m | ||
) |
EraseInTimedPeerSet
tps | The peerset to erase from |
m | The peer to erase. |
PeerSetIterator freedm::broker::FindInPeerSet | ( | PeerSet & | ps, |
const CPeerNode & | m | ||
) |
FindInPeerSet
ps | The peerset to search |
m | the peer to search for. |
boost::posix_time::ptime freedm::broker::GetTimeFromPeerSet | ( | TimedPeerSet & | tps, |
const CPeerNode & | m | ||
) |
GetTimeFromPeerSet
tps | The timed peer set to search. |
m | The peer to search for. |
void freedm::broker::InsertInPeerSet | ( | PeerSet & | ps, |
const CPeerNode & | m | ||
) |
InsertInPeerSet
ps | The peerset to search |
m | the peer to add to the set |
void freedm::broker::InsertInTimedPeerSet | ( | TimedPeerSet & | tps, |
const CPeerNode & | m, | ||
boost::posix_time::ptime | time | ||
) |
InsertInTimedPeerSet
tps | The TimedPeerSet to insert into |
m | The peer to add to the set. |
time | The time the peer was added to the TimedPeerSet |
|
inline |
IsValidPort
port | the string to checkt |
bool freedm::broker::MessageIsExpired | ( | const ProtocolMessage & | msg | ) |
MessageIsExpired
msg | the message to check |
bool freedm::broker::operator< | ( | const CPeerNode & | a, |
const CPeerNode & | b | ||
) |
bool freedm::broker::operator== | ( | const CPeerNode & | a, |
const CPeerNode & | b | ||
) |
void freedm::broker::SetExpirationTimeFromNow | ( | ProtocolMessage & | msg, |
const boost::posix_time::time_duration & | expires_in | ||
) |
SetExpirationTimeFromNow
msg | the message to modify |
expires_in | how long from now to set the expiration time |
void freedm::broker::StampMessageSendtime | ( | ProtocolMessageWindow & | msg | ) |
StampMessageSendtime
msg | the message to stamp, transfer-none |
const unsigned int freedm::broker::ALIGNMENT_DURATION = 250 |