| 
    rippled
    
   | 
 
A group of simulation Peers. More...
#include <PeerGroup.h>

Public Types | |
| using | iterator = peers_type::iterator | 
| using | const_iterator = peers_type::const_iterator | 
| using | reference = peers_type::reference | 
| using | const_reference = peers_type::const_reference | 
Public Member Functions | |
| PeerGroup ()=default | |
| PeerGroup (Peer *peer) | |
| PeerGroup (std::vector< Peer * > &&peers) | |
| PeerGroup (std::vector< Peer * > const &peers) | |
| PeerGroup (std::set< Peer * > const &peers) | |
| iterator | begin () | 
| iterator | end () | 
| const_iterator | begin () const | 
| const_iterator | end () const | 
| const_reference | operator[] (std::size_t i) const | 
| bool | contains (Peer const *p) | 
| bool | contains (PeerID id) | 
| std::size_t | size () const | 
| void | trust (PeerGroup const &o) | 
| Establish trust.   | |
| void | untrust (PeerGroup const &o) | 
| Revoke trust.   | |
| void | connect (PeerGroup const &o, SimDuration delay) | 
| Establish network connection.   | |
| void | disconnect (PeerGroup const &o) | 
| Destroy network connection.   | |
| void | trustAndConnect (PeerGroup const &o, SimDuration delay) | 
| Establish trust and network connection.   | |
| void | connectFromTrust (SimDuration delay) | 
| Establish network connections based on trust relations.   | |
Private Types | |
| using | peers_type = std::vector< Peer * > | 
Private Attributes | |
| peers_type | peers_ | 
Friends | |
| PeerGroup | operator+ (PeerGroup const &a, PeerGroup const &b) | 
| PeerGroup | operator- (PeerGroup const &a, PeerGroup const &b) | 
| std::ostream & | operator<< (std::ostream &o, PeerGroup const &t) | 
A group of simulation Peers.
A PeerGroup is a convenient handle for logically grouping peers together, and then creating trust or network relations for the group at large. Peer groups may also be combined to build out more complex structures.
The PeerGroup provides random access style iterators and operator[]
Definition at line 22 of file PeerGroup.h.
      
  | 
  private | 
Definition at line 24 of file PeerGroup.h.
| using ripple::test::csf::PeerGroup::iterator = peers_type::iterator | 
Definition at line 28 of file PeerGroup.h.
| using ripple::test::csf::PeerGroup::const_iterator = peers_type::const_iterator | 
Definition at line 29 of file PeerGroup.h.
| using ripple::test::csf::PeerGroup::reference = peers_type::reference | 
Definition at line 30 of file PeerGroup.h.
| using ripple::test::csf::PeerGroup::const_reference = peers_type::const_reference | 
Definition at line 31 of file PeerGroup.h.
      
  | 
  default | 
| ripple::test::csf::PeerGroup::PeerGroup | ( | Peer * | peer | ) | 
Definition at line 34 of file PeerGroup.h.
| ripple::test::csf::PeerGroup::PeerGroup | ( | std::vector< Peer * > && | peers | ) | 
Definition at line 37 of file PeerGroup.h.
| ripple::test::csf::PeerGroup::PeerGroup | ( | std::vector< Peer * > const & | peers | ) | 
Definition at line 41 of file PeerGroup.h.
Definition at line 46 of file PeerGroup.h.
| iterator ripple::test::csf::PeerGroup::begin | ( | ) | 
Definition at line 51 of file PeerGroup.h.
| iterator ripple::test::csf::PeerGroup::end | ( | ) | 
Definition at line 57 of file PeerGroup.h.
| const_iterator ripple::test::csf::PeerGroup::begin | ( | ) | const | 
Definition at line 63 of file PeerGroup.h.
| const_iterator ripple::test::csf::PeerGroup::end | ( | ) | const | 
Definition at line 69 of file PeerGroup.h.
| const_reference ripple::test::csf::PeerGroup::operator[] | ( | std::size_t | i | ) | const | 
Definition at line 75 of file PeerGroup.h.
| bool ripple::test::csf::PeerGroup::contains | ( | Peer const * | p | ) | 
Definition at line 81 of file PeerGroup.h.
| bool ripple::test::csf::PeerGroup::contains | ( | PeerID | id | ) | 
Definition at line 87 of file PeerGroup.h.
| std::size_t ripple::test::csf::PeerGroup::size | ( | ) | const | 
Definition at line 95 of file PeerGroup.h.
| void ripple::test::csf::PeerGroup::trust | ( | PeerGroup const & | o | ) | 
Establish trust.
Establish trust from all peers in this group to all peers in o
| o | The group of peers to trust | 
Definition at line 107 of file PeerGroup.h.
| void ripple::test::csf::PeerGroup::untrust | ( | PeerGroup const & | o | ) | 
Revoke trust.
Revoke trust from all peers in this group to all peers in o
| o | The group of peers to untrust | 
Definition at line 125 of file PeerGroup.h.
| void ripple::test::csf::PeerGroup::connect | ( | PeerGroup const & | o, | 
| SimDuration | delay | ||
| ) | 
Establish network connection.
Establish outbound connections from all peers in this group to all peers in o. If a connection already exists, no new connection is established.
| o | The group of peers to connect to (will get inbound connections) | 
| delay | The fixed messaging delay for all established connections | 
Definition at line 147 of file PeerGroup.h.
| void ripple::test::csf::PeerGroup::disconnect | ( | PeerGroup const & | o | ) | 
Destroy network connection.
Destroy connections from all peers in this group to all peers in o
| o | The group of peers to disconnect from | 
Definition at line 167 of file PeerGroup.h.
| void ripple::test::csf::PeerGroup::trustAndConnect | ( | PeerGroup const & | o, | 
| SimDuration | delay | ||
| ) | 
Establish trust and network connection.
Establish trust and create a network connection with fixed delay from all peers in this group to all peers in o
| o | The group of peers to trust and connect to | 
| delay | The fixed messaging delay for all established connections | 
Definition at line 187 of file PeerGroup.h.
| void ripple::test::csf::PeerGroup::connectFromTrust | ( | SimDuration | delay | ) | 
Establish network connections based on trust relations.
For each peers in this group, create outbound network connection to the set of peers it trusts. If a coonnection already exists, it is not recreated.
| delay | The fixed messaging delay for all established connections | 
Definition at line 203 of file PeerGroup.h.
Definition at line 216 of file PeerGroup.h.
Definition at line 230 of file PeerGroup.h.
      
  | 
  friend | 
Definition at line 244 of file PeerGroup.h.
      
  | 
  private | 
Definition at line 25 of file PeerGroup.h.