Classes Files

Wombat::MamaSourceGroup

More…

#include <MamaSourceGroup.h>

Public Classes

  Name
class iterator

Public Types

  Name
typedef const iterator const_iterator

Public Functions

  Name
  MamaSourceGroup(const char * name)
  ~MamaSourceGroup()
const char * getName() const
MamaSource * find(const char * sourceName)
const MamaSource * find(const char * sourceName) const
void add(MamaSource * source, mama_u32_t weight)
void add(const char * sourceName, mama_u32_t weight, MamaSource * source)
void setWeight(const char * sourceName, mama_u32_t weight)
mama_u32_t getWeight(const char * sourceName) const
mama_size_t size() const
void registerStateChangeCallback(MamaSourceStateChangeCallback & cb)
void unregisterStateChangeCallback(MamaSourceStateChangeCallback & cb)
bool reevaluate()
iterator begin()
const_iterator begin() const
iterator end()
const_iterator end() const

Detailed Description

class Wombat::MamaSourceGroup;

A MAMA source group monitors a set of MAMA sources that presumably provide a duplicate set of data. Each member of the group is given a priority and the member with the highest priority is given the mamaSourceState, MAMA_SOURCE_STATE_OK; the other members of the group are given the state, MAMA_SOURCE_STATE_OFF.

Public Types Documentation

typedef const_iterator

typedef const iterator Wombat::MamaSourceGroup::const_iterator;

Public Functions Documentation

function MamaSourceGroup

MamaSourceGroup(
    const char * name
)

function ~MamaSourceGroup

~MamaSourceGroup()

function getName

const char * getName() const

function find

MamaSource * find(
    const char * sourceName
)

function find

const MamaSource * find(
    const char * sourceName
) const

function add

void add(
    MamaSource * source,
    mama_u32_t weight
)

function add

void add(
    const char * sourceName,
    mama_u32_t weight,
    MamaSource * source
)

function setWeight

void setWeight(
    const char * sourceName,
    mama_u32_t weight
)

function getWeight

mama_u32_t getWeight(
    const char * sourceName
) const

function size

mama_size_t size() const

function registerStateChangeCallback

void registerStateChangeCallback(
    MamaSourceStateChangeCallback & cb
)

Parameters:

  • cb callback to register

Applications interested in event notifications can register for events.

function unregisterStateChangeCallback

void unregisterStateChangeCallback(
    MamaSourceStateChangeCallback & cb
)

Parameters:

  • cb callback to unregister

Applications interested in event notifications can unregister for events.

function reevaluate

bool reevaluate()

Re-evaluate the group by checking all of the relative weights and changing the state of each MamaSource in the group as appropriate. Returns true if any states were changed; otherwise false.

function begin

iterator begin()

function begin

const_iterator begin() const

function end

iterator end()

function end

const_iterator end() const

Updated on 2023-03-31 at 15:29:25 +0100