Open Model Railroad Network (OpenMRN)
Loading...
Searching...
No Matches
openlcb::MockMessageHandler Class Reference

Test handler for receiving incoming openlcb Message objects from a bus. More...

#include <async_if_test_helper.hxx>

Inheritance diagram for openlcb::MockMessageHandler:
FlowInterface< Buffer< GenMessage > >

Public Member Functions

 MOCK_METHOD2 (handle_message, void(GenMessage *message, unsigned priority))
 
virtual void send (Buffer< GenMessage > *message, unsigned priority)
 
- Public Member Functions inherited from FlowInterface< Buffer< GenMessage > >
virtual Poolpool ()
 
virtual void send (Buffer< GenMessage > *message, unsigned priority=UINT_MAX)=0
 Entry point to the flow.
 
virtual Buffer< GenMessage > * type_helper ()
 This function is never user in the code, but GDB can use it to infer the correct message types.
 
Buffer< GenMessage > * alloc ()
 Synchronously allocates a message buffer from the pool of this flow.
 
void alloc_async (Executable *target)
 Asynchronously allocates a message buffer from the pool of this flow.
 

Additional Inherited Members

- Public Types inherited from FlowInterface< Buffer< GenMessage > >
typedef Buffer< GenMessage > message_type
 Stores the message template type for external reference.
 
- Static Public Member Functions inherited from FlowInterface< Buffer< GenMessage > >
static Buffer< GenMessage > * cast_alloc (QMember *entry)
 Down casts and initializes an asynchronous allocation result to the appropriate flow's buffer type.
 

Detailed Description

Test handler for receiving incoming openlcb Message objects from a bus.

The incoming messages need GoogleMock expectations.

Usage: see file src/openlcb/IfCan.cxxtest

Definition at line 518 of file async_if_test_helper.hxx.

Member Function Documentation

◆ send()

virtual void openlcb::MockMessageHandler::send ( Buffer< GenMessage > *  message,
unsigned  priority 
)
inlinevirtual

Definition at line 523 of file async_if_test_helper.hxx.


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