27 , push_(ctx,
zmqpp::socket_type::push)
28 , rep_(ctx,
zmqpp::socket_type::rep)
31 push_.connect(
"inproc://zmq-bus-pull");
32 rep_.bind(
"inproc://" + name);
47 pipe->send(zmqpp::signal::ok);
52 if (poller.has_input(*pipe))
55 if (poller.has_input(
rep_))
72 else if (frame1 ==
"OFF")
74 else if (frame1 ==
"TOGGLE")
76 else if (frame1 ==
"STATE")
void interrupt()
Emulate an interrupt by writing to the message bus.
Unit testing utility class that helps writing test.
zmqpp::socket rep_
Receive command here.
bool run(zmqpp::socket *pipe)
if you want the GPIO in "passive" mode (ie to watch event generated BY the device), run this with a zmqpp::actor.
FakeGPIO(zmqpp::context &ctx, const std::string &name)