Leosac  0.8.0
Open Source Access Control
Leosac::Test::RplethTest Class Reference
+ Inheritance diagram for Leosac::Test::RplethTest:
+ Collaboration diagram for Leosac::Test::RplethTest:

Public Member Functions

virtual bool run_module (zmqpp::socket *pipe)
 Called in the module's actor's thread. More...
 
 RplethTest ()
 
virtual ~RplethTest ()
 
RplethPacket extract_packet (const std::string &data)
 
zmqpp::socket connect_to_rpleth ()
 
void check_rpleth_card_msg (zmqpp::socket &source, const std::vector< uint8_t > card_binary)
 Check that we can read a rpleth from the socket and check that its valid. More...
 
- Public Member Functions inherited from Leosac::Test::Helper::TestHelper
 TestHelper ()
 
virtual ~TestHelper ()
 
virtual void SetUp () override final
 We need this 2-step initialization to prevent calling virtual method (run_module) in constructor. More...
 

Public Attributes

CircularBuffer ciruclar_buf_
 Simulate client buffer. More...
 
FakeWiegandReader w1
 
zmqpp::actor w1_actor
 
- Public Attributes inherited from Leosac::Test::Helper::TestHelper
zmqpp::context ctx_
 A context for the test case. More...
 
MessageBus bus_
 A BUS identical to the one spawned by core. More...
 
zmqpp::socket bus_sub_
 A SUB socket connected to the previous bus. More...
 
zmqpp::socket bus_push_
 A PUSH socket to write on the bus. More...
 
std::unique_ptr< zmqpp::actor > module_actor_
 An actor, to run the module code the same way it would be run by the core. More...
 

Detailed Description

Definition at line 37 of file Rpleth.cpp.

Constructor & Destructor Documentation

◆ RplethTest()

Leosac::Test::RplethTest::RplethTest ( )
inline

Definition at line 53 of file Rpleth.cpp.

◆ ~RplethTest()

virtual Leosac::Test::RplethTest::~RplethTest ( )
inlinevirtual

Definition at line 59 of file Rpleth.cpp.

Member Function Documentation

◆ check_rpleth_card_msg()

void Leosac::Test::RplethTest::check_rpleth_card_msg ( zmqpp::socket &  source,
const std::vector< uint8_t >  card_binary 
)
inline

Check that we can read a rpleth from the socket and check that its valid.

Definition at line 95 of file Rpleth.cpp.

◆ connect_to_rpleth()

zmqpp::socket Leosac::Test::RplethTest::connect_to_rpleth ( )
inline

Definition at line 77 of file Rpleth.cpp.

◆ extract_packet()

RplethPacket Leosac::Test::RplethTest::extract_packet ( const std::string &  data)
inline

Definition at line 63 of file Rpleth.cpp.

◆ run_module()

virtual bool Leosac::Test::RplethTest::run_module ( zmqpp::socket *  pipe)
inlinevirtual

Called in the module's actor's thread.

Override this: Construct configuration for the module then run_test_module() with appropriate parameters.

Implements Leosac::Test::Helper::TestHelper.

Definition at line 40 of file Rpleth.cpp.

Member Data Documentation

◆ ciruclar_buf_

CircularBuffer Leosac::Test::RplethTest::ciruclar_buf_

Simulate client buffer.

Definition at line 75 of file Rpleth.cpp.

◆ w1

FakeWiegandReader Leosac::Test::RplethTest::w1

Definition at line 113 of file Rpleth.cpp.

◆ w1_actor

zmqpp::actor Leosac::Test::RplethTest::w1_actor

Definition at line 115 of file Rpleth.cpp.


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