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

Protected Attributes

std::unique_ptr< DefaultNodeownedNode_
 
Nodenode_
 
- 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}
 

Additional Inherited Members

- 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 ()
 
- 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 194 of file if_tcp_test_helper.hxx.

Constructor & Destructor Documentation

◆ TcpNodeTest()

openlcb::TcpNodeTest::TcpNodeTest ( )
inlineprotected

Definition at line 197 of file if_tcp_test_helper.hxx.

Member Data Documentation

◆ node_

Node* openlcb::TcpNodeTest::node_
protected

Definition at line 203 of file if_tcp_test_helper.hxx.

◆ ownedNode_

std::unique_ptr<DefaultNode> openlcb::TcpNodeTest::ownedNode_
protected

Definition at line 202 of file if_tcp_test_helper.hxx.


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