salsa
0.3.0
|
ZeroMQ implementation of salsa actor class. More...
#include <ActorZmq.hh>
Public Member Functions | |
ActorZmq () | |
virtual | ~ActorZmq () |
virtual void | pipe (void *pipe) |
Setter for pipe. More... | |
virtual int | init () |
First function. More... | |
virtual int | exec () |
Main function. More... | |
virtual int | finish () |
Last function. More... | |
virtual void * | wait () |
zpoller_t * | poller () const |
PollerZmq * | pollerZmq () const |
Static Public Member Functions | |
static void | SalsaActorFn (zsock_t *pPipe, void *pArgv) |
static void | SalsaActorForkFn (zsock_t *pPipe, void *pArgv) |
Actor function with fork capability. | |
static std::sig_atomic_t | interrupted () |
Returns if salsa is interrupted. | |
static void | interrupted (std::sig_atomic_t sig) |
Setter salsa interruption. | |
static void | signalHandler (int signalNumber) |
Setter salsa interruption. More... | |
static std::shared_ptr < spdlog::logger > | getConsoleOutput () |
Get console output. | |
static void | setConsoleLevel (spdlog::level::level_enum level) |
Sets console log level. | |
Protected Attributes | |
zsock_t * | mpPipe = nullptr |
Zmq pipe socket. | |
PollerZmq * | mpPoller = nullptr |
Internal poller. | |
bool | mTerminated = false |
Flag if actor should be terminated. | |
int | mTimeout = -1 |
Poller timeout. | |
Static Private Member Functions | |
static void | actorProcwaitSupport_ (zsock_t *pipe, void *argv) |
Support actor method (used for PID waiting) | |
ZeroMQ implementation of salsa actor class.
Definition at line 19 of file ActorZmq.hh.
Salsa::ActorZmq::ActorZmq | ( | ) |
|
virtual |
|
virtual |
Main function.
Exec
Implements Salsa::Actor.
Reimplemented in Salsa::NodeZyre.
Definition at line 345 of file ActorZmq.cc.
References Salsa::Actor::interrupted(), mTerminated, and wait().
Referenced by SalsaActorFn().
|
virtual |
Last function.
Finish
Implements Salsa::Actor.
Reimplemented in Salsa::NodeZyre.
Definition at line 367 of file ActorZmq.cc.
Referenced by SalsaActorFn().
|
virtual |
First function.
Init
Implements Salsa::Actor.
Reimplemented in Salsa::NodeZyre.
Definition at line 334 of file ActorZmq.cc.
Referenced by SalsaActorFn().
|
virtual |
Setter for pipe.
Setting pipe socket
Implements Salsa::Actor.
Definition at line 315 of file ActorZmq.cc.
References Salsa::PollerZmq::add(), mpPipe, and mpPoller.
Referenced by SalsaActorFn().
zpoller_t * Salsa::ActorZmq::poller | ( | ) | const |
Returns zpoller
Definition at line 425 of file ActorZmq.cc.
References mpPoller, and Salsa::PollerZmq::poller().
PollerZmq * Salsa::ActorZmq::pollerZmq | ( | ) | const |
Returns PollerZmq
Definition at line 432 of file ActorZmq.cc.
References mpPoller.
Referenced by Salsa::NodeManagerZyre::addTaskSlot().
|
static |
Actor function engine
Definition at line 22 of file ActorZmq.cc.
References exec(), finish(), init(), Salsa::Actor::interrupted(), and pipe().
|
staticinherited |
Setter salsa interruption.
Function for handling signals
Definition at line 19 of file Actor.cc.
References Salsa::Actor::interrupted(), and Salsa::Actor::msInterrupted.
|
virtual |
Waiting for event
Definition at line 378 of file ActorZmq.cc.
References mpPipe, mpPoller, mTerminated, mTimeout, Salsa::PollerZmq::poller(), and Salsa::PollerZmq::wait().
Referenced by exec(), and Salsa::NodeZyre::exec().