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

 

NAME

Oorb::Master - Master object for constructing programs with the oorb library

SYNOPSIS

-loorb $(ORBLIBS)

#include "oorb.h"

namespace Oorb

class Master

std::shared_ptr<ConfigMgrTask> config =
                 std::make_shared<ConfigMgrTask>( argc, argv );
Om = std::make_shared<Oorb::Master>( config );

DESCRIPTION

This page describes the Master class which is used within the Oorb(3) library to create orb(3)-based programs. There may only be one Master object within a given program. This single object controls the launching and management of all threads based on the Oorb::Task(3) class of tasks. The oorb.h file declares an external variable of name Om as follows:

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

The user must instantiate this Om object within the program. Instantiating the object requires handing the Master constructor an instance of a subclass of the Oorb::ConfigMgrTask(3). It is the job of that configuration object to set up the Master object such that it runs the components necessary for the program being launched. See the Oorb(3) man-page for a simple example. Once the main program has instantiated the Master object, the main program should then call the Master object's run method to start all processing. Necessary Oorb::Queue(3) instances are automatically generated based on the configuration inputs of the Oorb::OrbConnectionTask(3) objects and do not need to be separately created by the application programmer.

CONSTRUCTORS

METHODS

OBJECT CONFIGURATION PARAMETERS

The Master object contains a public member struct of name m_masterParams which is defined as follows:

typedef struct masterParamsStruct {
    double             internal_timeout_sec;
    double             acq_starttime_program;
    double             acq_endtime_program;
    char*              match_program;
    char*              reject_program;
    char*              target_name;
    LogMsg::Severity   verbosity_program;
    bool               acknowledge_program;
} masterParamsStruct;

The BUConfigure(3) names for these parameters are actually slightly simplified versions, to avoid confusing end-users of programs built on the Oorb(3) library (which, admittedly, puts directly onto the application programmer the burden of disentangling configuration details). In particular, the _program suffix on many of the above variables is an attempt to distinguish program-wide configuration settings from similarly named settings for individual Oorb::Task(3)s, which may override the program settings, or vice versa.

EXAMPLE

See the Oorb(3) man-page for an example of using the Master class.

LIBRARY

-loorb $(ORBLIBS)

ATTRIBUTES

MT-Safe

SEE ALSO

Oorb(3), Oorb::Task(3), Oorb::ConfigMgrTask(3)

BUGS AND CAVEATS

Attempts to set the run state of the Master to false will be ignored.

AUTHOR

Kent Lindquist
Printer icon