Class o80::Burster

class o80::Burster

Class managing the bursting mode of BackEnd and Standalone. Expected usage:

Burster burster(segment_id);
while(true) {
    std::cout << "iterate!" << std::endl;
    burster.pulse()
}
The code above will wait until the method “burst” of a related FrontEnd is called, which triggers one iteration to occur.

Public Functions

Burster(std::string segment_id)
~Burster()
bool pulse()
Burster(std::segment_id)
~Burster()
void pulse()

Public Static Functions

static void clear_memory(std::string segment_id)

If an instance of Burster has not been cleanly exited (i.e. destructor not called), wipe the related shared memory (hanging at startup may otherwise occuring)

static void turn_on(std::string segment_id)

Turn on the bursting mode of the burster, i.e. it will iterate only when receiving a signal from the frontend.

static void turn_off(std::string segment_id)

Disable the bursting mode, i.e. the pulse method will always return immediately.

static void clear_memory(std::segment_id)

Private Functions

long int get_nb_bursts() const
void reset_nb_bursts()
bool should_run() const
void update_nb_bursts()
void reset_nb_bursts()

Private Members

std::string segment_id_
long int nb_bursts_
long int nb_iterated_
bool running_
std::shared_ptr<synchronizer::Follower> follower_
std::string object_id_
uint nb_bursts_
uint nb_iterated_
synchronizer::Follower follower_