Open Model Railroad Network (OpenMRN)
Loading...
Searching...
No Matches
openlcb::MultiTcpIfTest Class Reference
Inheritance diagram for openlcb::MultiTcpIfTest:
openlcb::TcpIfTest

Classes

struct  ClientIf
 

Protected Member Functions

void add_client (NodeID node_id)
 
- Protected Member Functions inherited from openlcb::TcpIfTest
void wait ()
 
void capture_next_packet ()
 Instructs the mock device to save the next sent packet.
 
void ignore_all_packets ()
 Instructs the mock device to ignore all sent packets.
 
void capture_all_packets ()
 Instructs the mock device to ignore all sent packets.
 
template<typename... Args>
void generate_input_message (Args &&... args)
 Creates a GenMessage, renders it to binary format, and injects it as if it came as an input from the network.
 
template<typename... Args>
void generate_output_message (Args &&... args)
 Creates a GenMessage and sends it out via the IfTcp.
 
template<typename... Args>
void generate_output_message (IfTcp *iface, Args &&... args)
 Creates a GenMessage and sends it out via the IfTcp.
 
template<class NodeType = DefaultNode>
Nodecreate_new_node (std::unique_ptr< NodeType > *p, NodeID node_id, IfTcp *iface=nullptr)
 Helper function to create a new virtual node.
 
BarrierNotifiableget_notifiable ()
 
void wait_for_notification ()
 

Protected Attributes

vector< std::unique_ptr< ClientIf > > clients_
 
- Protected Attributes inherited from openlcb::TcpIfTest
SyncNotifiable n_
 
BarrierNotifiable bn_
 
HubFlow device_ {&g_service}
 
::testing::StrictMock< MockHubPortlistenPort_
 
string lastPacket_
 Stores the data from capture_next_packet.
 
vector< string > allPackets_
 Stores data from capture all packets.
 
IfTcp ifTcp_ {GW_NODE_ID, &device_, local_node_count}
 

Friends

struct ClientIf
 

Additional Inherited Members

- Static Protected Attributes inherited from openlcb::TcpIfTest
static int local_node_count = 9
 
static constexpr NodeID TEST_NODE_ID = 0x101212231225ULL
 
static constexpr NodeID REMOTE_NODE_ID = 0x050902030405ULL
 
static constexpr NodeID INPUT_GW_NODE_ID = 0x101112131415ULL
 
static constexpr NodeID GW_NODE_ID = 0x101112131415ULL
 

Detailed Description

Definition at line 206 of file if_tcp_test_helper.hxx.

Constructor & Destructor Documentation

◆ MultiTcpIfTest()

openlcb::MultiTcpIfTest::MultiTcpIfTest ( )
inlineprotected

Definition at line 209 of file if_tcp_test_helper.hxx.

◆ ~MultiTcpIfTest()

openlcb::MultiTcpIfTest::~MultiTcpIfTest ( )
inlineprotected

Definition at line 218 of file if_tcp_test_helper.hxx.

Member Function Documentation

◆ add_client()

void openlcb::MultiTcpIfTest::add_client ( NodeID  node_id)
inlineprotected

Definition at line 246 of file if_tcp_test_helper.hxx.

Friends And Related Symbol Documentation

◆ ClientIf

friend struct ClientIf
friend

Definition at line 223 of file if_tcp_test_helper.hxx.

Member Data Documentation

◆ clients_

vector<std::unique_ptr<ClientIf> > openlcb::MultiTcpIfTest::clients_
protected

Definition at line 251 of file if_tcp_test_helper.hxx.


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