• Antelope Release 5.10 Linux CentOS release 7.6.1810 (Core) 3.10.0 2020-05-12

 

NAME

Oorb::Task - base class for Task classes in the oorb library

SYNOPSIS

-loorb $(ORBLIBS)

#include "oorb.h"

namespace Oorb

class Task

DESCRIPTION

The Oorb(3) Task class is an abstract base class, which can be sub-classed to represent specific tasks run by programs based on the Oorb(3) library. Each Task is intended to be run in a separate thread. Instances of the Task class do not exist in isolation. They are launched by an instance of Oorb::Master(3), and expect access to that instance via an external variable Om declared as

extern std::shared_ptr<Oorb::Master> Om;

by oorb.h and which should be instantiated by the enclosing program. See Oorb::Master(3) for further details. Each Task has a member std::mutex called m_taskMutex which may be used for data-protection operations internal to the sub-class.

CONSTRUCTORS

METHODS

public methods

protected methods

OBJECT CONFIGURATION PARAMETERS

This class inherits from Oorb::Configure(3). It has a public struct with two members. The Oorb::LogMsg::Severity(3) enum named verbosity_task controls the verbosity of log messages emitted by the task. The boolean value run indicates whether or not the task should run. In BQConfigure(3) configure calls, the verbosity_task variable should be referred to via the string key verbose. The default setting of verbose is notify. The default setting of run is true. Since Task is a direct sub-class of Oorb::Configure(3), it has a public member named m_params holding one of these structs.

typedef struct taskParamsStruct {
    LogMsg::Severity    verbosity_task;
    bool                run;
} taskParamsStruct;

Sub-classes of Task may be enhanced with further BUConfigure(3)-style configuration parameters as explained in Oorb::Configure(3).

LIBRARY

-loorb $(ORBLIBS)

ATTRIBUTES

MT-Safe

SEE ALSO

Oorb(3), OorbBasics(3), Oorb::Configure(3), Oorb::Master(3)

AUTHOR

Kent Lindquist
Printer icon