Class Show

Class Documentation

class Show

Public Types

enum TimingMode

The method used to measure time between Events.

Values:

Absolute

Counts time since the start of the Show.

Relative

Counts time since the last Event.

Public Functions

Show(CueController &controller, Event *events, uint16_t num_events)

Constructor. Specifies an initial set of Events to run.

Parameters
  • controller: The controller that will run the Events.

  • events: Array of Events to queue.

  • num_events: The number of Events in the queue.

uint16_t get_current_index() const

Returns the index of the next Event to run.

Return

Current Event index.

Event *get_event_at_index(uint16_t index) const

Returns the Event at the specified index, or nullptr if it doesn’t exist.

Return

Event.

Parameters
  • index: Index of desired Event.

Event *get_events() const

Returns the current Event set.

Return

Events.

uint32_t get_last_time() const

Returns the time that the last Event ran.

Return

Last Event time.

bool get_looping() const

Returns whether the Show loops back over its Events, or if it just ends.

Return

Whether or not the Show loops.

uint16_t get_num_events() const

Returns the number of Events.

Return

Event count.

Show::TimingMode get_timing() const

Returns the timing method used to run the Show.

Return

Timing method.

void set_events(Event *events, uint16_t num_events, bool preserve_current_index = true)

Sets the Events in the Show.

Parameters
  • events: Array of Events to queue.

  • num_events: The number of Events in the queue.

  • preserve_current_index: If true, continue from the same Event index. Otherwise, start over.

void set_looping(bool loop)

Sets whether to loop when the Events are done running.

Parameters
  • loop: If true, events will loop over from the beginning.

void set_timing_mode(TimingMode timing_mode)

Sets the timing mode.

Parameters
  • timing: Timing mode used.

void sync(const uint32_t &new_time)

Changes the Show’s last refresh time.

Parameters
  • new_time: The new refresh time.

void update(const uint32_t &current_time)

Main update routine.

Parameters
  • current_time: Program runtime.