salsa 0.7.1
Loading...
Searching...
No Matches
Salsa::Actor Class Referenceabstract

Base salsa actor class. More...

#include <Actor.hh>

Inheritance diagram for Salsa::Actor:
Salsa::Object Salsa::ActorZmq Salsa::NodeZyre

Public Member Functions

 Actor ()
 
virtual ~Actor ()
 
virtual void pipe (void *)=0
 Setter for pipe.
 
virtual int init ()=0
 First function.
 
virtual int exec ()=0
 Main function.
 
virtual int finish ()=0
 Last function.
 

Static Public Member Functions

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.
 
static std::shared_ptr< spdlog::logger > getConsoleOutput ()
 Get console output.
 
static void setConsoleLevel (spdlog::level::level_enum level)
 Sets console log level.
 

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.
 

Detailed Description

Base salsa actor class.

Author
Matej Fedor matej.nosp@m..fed.nosp@m.or.mf.nosp@m.@gma.nosp@m.il.co.nosp@m.m
Martin Vala mvala.nosp@m.@cer.nosp@m.n.ch
Branislav Beke bbeke.nosp@m.@bad.nosp@m.haven.nosp@m..dev

Definition at line 17 of file Actor.hh.

Constructor & Destructor Documentation

◆ Actor()

Salsa::Actor::Actor ( )

Constructor

Definition at line 6 of file Actor.cc.

References Salsa::Object::Object().

Referenced by Salsa::ActorZmq::ActorZmq().

◆ ~Actor()

Salsa::Actor::~Actor ( )
virtual

Destructor

Definition at line 12 of file Actor.cc.

Member Function Documentation

◆ exec()

virtual int Salsa::Actor::exec ( )
pure virtual

Main function.

Implemented in Salsa::ActorZmq, and Salsa::NodeZyre.

◆ finish()

virtual int Salsa::Actor::finish ( )
pure virtual

Last function.

Implemented in Salsa::ActorZmq, and Salsa::NodeZyre.

◆ getConsoleOutput()

static std::shared_ptr< spdlog::logger > Salsa::Object::getConsoleOutput ( )
inlinestaticinherited

Get console output.

Definition at line 21 of file Object.hh.

References mspConsoleLogger.

Referenced by Salsa::ConfigZyre::apply().

◆ init()

virtual int Salsa::Actor::init ( )
pure virtual

First function.

Implemented in Salsa::ActorZmq, and Salsa::NodeZyre.

◆ interrupted() [1/2]

static std::sig_atomic_t Salsa::Actor::interrupted ( )
inlinestatic

Returns if salsa is interrupted.

Definition at line 35 of file Actor.hh.

References msInterrupted.

Referenced by Salsa::ActorZmq::exec(), Salsa::NodeZyre::exec(), Salsa::ActorZmq::SalsaActorFn(), and signalHandler().

◆ interrupted() [2/2]

static void Salsa::Actor::interrupted ( std::sig_atomic_t sig)
inlinestatic

Setter salsa interruption.

Definition at line 38 of file Actor.hh.

References msInterrupted.

◆ pipe()

virtual void Salsa::Actor::pipe ( void * )
pure virtual

Setter for pipe.

Implemented in Salsa::ActorZmq.

◆ setConsoleLevel()

static void Salsa::Object::setConsoleLevel ( spdlog::level::level_enum level)
inlinestaticinherited

Sets console log level.

Definition at line 29 of file Object.hh.

References mspConsoleLogger.

◆ signalHandler()

void Salsa::Actor::signalHandler ( int signalNumber)
static

Setter salsa interruption.

Function for handling signals

Definition at line 19 of file Actor.cc.

References interrupted(), and msInterrupted.

Referenced by Salsa::ActorZmq::init().

Member Data Documentation

◆ msInterrupted

std::sig_atomic_t Salsa::Actor::msInterrupted = 0
staticprivate

flag if salsa is interrupted

Definition at line 44 of file Actor.hh.

Referenced by interrupted(), interrupted(), and signalHandler().

◆ mspConsoleLogger

std::shared_ptr< spdlog::logger > Salsa::Object::mspConsoleLogger = spdlog::stdout_color_mt("salsa")
staticprivateinherited

Pointer to spd logger.

Definition at line 32 of file Object.hh.

Referenced by getConsoleOutput(), and setConsoleLevel().


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