|
salsa
0.4.15
|
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... | |
| void | timeout (int t) |
| Sets timeout. | |
| int | timeout () const |
| Returns timeout. | |
| virtual void * | wait () |
| zpoller_t * | poller () const |
| PollerZmq * | pollerZmq () const |
| bool | terminated () const |
| Flag if actor should be terminated. | |
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) | |
Static Private Attributes | |
| static std::sig_atomic_t | msInterrupted = 0 |
| flag if salsa is interrupted | |
| static std::shared_ptr< spdlog::logger > | mspConsoleLogger = spdlog::stdout_color_mt("salsa") |
| Pointer to spd logger. | |
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 393 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 415 of file ActorZmq.cc.
Referenced by SalsaActorFn().
|
virtual |
First function.
Init
Implements Salsa::Actor.
Reimplemented in Salsa::NodeZyre.
Definition at line 378 of file ActorZmq.cc.
References Salsa::Actor::signalHandler().
Referenced by Salsa::NodeZyre::init(), and SalsaActorFn().
|
virtual |
Setter for pipe.
Setting pipe socket
Implements Salsa::Actor.
Definition at line 359 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 473 of file ActorZmq.cc.
References mpPoller, and Salsa::PollerZmq::poller().
| PollerZmq * Salsa::ActorZmq::pollerZmq | ( | ) | const |
Returns PollerZmq
Definition at line 480 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(), pipe(), and terminated().
|
staticinherited |
Setter salsa interruption.
Function for handling signals
Definition at line 19 of file Actor.cc.
References Salsa::Actor::interrupted(), and Salsa::Actor::msInterrupted.
Referenced by init().
|
virtual |
Waiting for event
Definition at line 426 of file ActorZmq.cc.
References mpPipe, mpPoller, mTerminated, mTimeout, Salsa::PollerZmq::poller(), and Salsa::PollerZmq::wait().
Referenced by exec(), and Salsa::NodeZyre::exec().