12 #include "Programmer.h"
16 namespace ShowControl{
91 bool addLayer(shared_ptr<Layer> layer);
98 shared_ptr<Layer>
getLayer(
string name);
112 bool addTimeline(
string id, shared_ptr<Timeline> tl);
161 bool save(
string filename,
bool overwrite =
false);
300 bool addCueListToLayer(
string cueListId,
string layerName,
bool resetCurrentCue =
true);
361 bool load(
string filename);
vector< string > getCueListNames()
Returns a list of the cue list names contained in the Playback.
Definition: Playback.cpp:567
void deleteTimeline(string id)
Deletes a Timeline from the Playback.
Definition: Playback.cpp:172
Include file for all of LumiverseCore in one conveninent location.
map< string, shared_ptr< Timeline > > & getTimelines()
Returns the map of all Timelines contained in the Playback.
Definition: Playback.cpp:184
bool attachToRig(int pid=1)
Binds the update function for this playback to the Rig's update function.
Definition: Playback.cpp:188
bool addLayer(shared_ptr< Layer > layer)
Adds a layer to the playback.
Definition: Playback.cpp:138
void setGrandmaster(float val)
Definition: Playback.cpp:521
bool addCueListToLayer(string cueListId, string layerName, bool resetCurrentCue=true)
Assigns a cue list to a layer If one of the specified items doesn't exist, nothing will happen and th...
Definition: Playback.cpp:552
bool dynamicGroupExists(string name)
Checks if a dynamic group with the given name exists.
Definition: Playback.cpp:517
const map< string, DynamicDeviceSet > & getDynamicGroups()
Get the map of dynamic groups in the Playback.
Definition: Playback.h:260
bool storeDynamicGroup(string name, DynamicDeviceSet group, bool overwrite=false)
Saves a user-specified DynamicDeviceSet as a group in the Playback.
Definition: Playback.cpp:477
bool isRunning()
Returns the status of the playback update loop.
Definition: Playback.h:71
map< string, DeviceSet > m_groups
Stores named groups (DeviceSets) created by the user.
Definition: Playback.h:325
int m_funcId
ID of the attached function in the rig update loop.
Definition: Playback.h:343
bool addTimeline(string id, shared_ptr< Timeline > tl)
Add a Timeline to the Playback.
Definition: Playback.cpp:163
Rig * getRig()
Returns a pointer to the rig.
Definition: Playback.h:173
int getNumCueLists()
Returns the number of cue lists contained in this Playback object.
Definition: Playback.cpp:577
map< string, Device * > m_state
Copy of all devices in the rig. Current state of the playback.
Definition: Playback.h:322
void deleteLayer(string name)
Deletes a layer from the playback.
Definition: Playback.cpp:157
A DeviceSet is a set of devices.
Definition: DeviceSet.h:41
A playback object manages layers, timelines, and coordinates their actions and updates.
Definition: Playback.h:32
bool m_running
True when the update loop is running.
Definition: Playback.h:340
map< string, DynamicDeviceSet > m_dynGroups
Stores named dynamic groups (DynamicDeviceSets) created by the user.
Definition: Playback.h:328
shared_ptr< Timeline > getTimeline(string id)
Gets a timeline from the Playback.
Definition: Playback.cpp:176
map< string, shared_ptr< Timeline > > m_timelines
Map of.
Definition: Playback.h:331
void deleteCueList(string id)
Deletes a cue list from the Playback.
Definition: Playback.cpp:546
bool groupExists(string name)
Checks if a group with the given name exists.
Definition: Playback.cpp:513
const map< string, shared_ptr< Layer > > & getLayers()
Returns a reference to the layers in the Playback.
Definition: Playback.h:186
bool detachFromRig()
Unbinds the update function for this playback from the Rig.
Definition: Playback.cpp:198
Playback(Rig *rig, float gm=1.0f)
Initializes a playback object.
Definition: Playback.cpp:7
JSONNode toJSON()
Returns the JSON representation of this playback object.
Definition: Playback.cpp:221
bool loadJSON(JSONNode node)
Loads data from a JSON object.
Definition: Playback.cpp:336
const map< string, DeviceSet > & getGroups()
Get the map of groups in the Playback.
Definition: Playback.h:255
void update()
Sets the playback update rate.
Definition: Playback.cpp:69
shared_ptr< CueList > getCueList(string id)
Retrieves a cue list from the Playback.
Definition: Playback.cpp:538
void removeCueListFromLayer(string layerName)
Removes a cue list assigned to a particular layer.
Definition: Playback.cpp:561
DeviceSet getGroup(string name)
Gets a saved group.
Definition: Playback.cpp:495
shared_ptr< Layer > getLayer(string name)
Retrieves a pointer to the layer with the specified name.
Definition: Playback.cpp:149
unique_ptr< Programmer > m_prog
Programmer object owned by the Playback.
Definition: Playback.h:358
Contains all core Lumiverse functions and variables.
Definition: Device.cpp:2
vector< string > getTimelineNames()
Returns a list of Timeline ids contained in the Playback.
Definition: Playback.cpp:296
const unique_ptr< Programmer > & getProgrammer()
Gets a reference to the programmer object stored by the playback.
Definition: Playback.h:148
A DynamicDeviceSet is a set of devices specified by a query string.
Definition: DynamicDeviceSet.h:34
DynamicDeviceSet getDynamicGroup(string name)
Gets a saved Dynamic group.
Definition: Playback.cpp:504
map< string, shared_ptr< Layer > > m_layers
Map of layer names to layers.
Definition: Playback.h:319
bool save(string filename, bool overwrite=false)
Saves a JSON file containing all information stored by the playback, including the Rig...
Definition: Playback.cpp:206
bool deleteGroup(string name)
Deletes a group.
Definition: Playback.cpp:487
bool addCueList(shared_ptr< CueList > cueList)
Adds a cue list to the Playback If a list already exists with the same name, this function will retur...
Definition: Playback.cpp:525
Rig * m_rig
Pointer to the rig that this playback runs on.
Definition: Playback.h:355
bool storeGroup(string name, DeviceSet group, bool overwrite=false)
Saves a user-specified DeviceSet as a group in the Playback.
Definition: Playback.cpp:466
void start()
Starts the playback loop in a separate thread.
Definition: Playback.cpp:52
The Rig contains information about the state of the lighting system.
Definition: Rig.h:58
vector< string > getLayerNames()
Returns a list of the layer names contained in the Playback.
Definition: Playback.cpp:286
float m_grandmaster
Controls the overall level of parameters in the rig.
Definition: Playback.h:346
int getNumLayers()
Returns the number of layers contained in this Playback object.
Definition: Playback.cpp:462
void stop()
Stops the playback loop in a separate thread.
Definition: Playback.cpp:57
bool deleteDynamicGroup(string name)
Deletes a dynamic group.
Definition: Playback.cpp:491
bool load(string filename)
Load Playback data from a file.
Definition: Playback.cpp:306
map< string, shared_ptr< CueList > > m_cueLists
Map of CueList ids to CueList objects.
Definition: Playback.h:334
float getGrandmaster()
Gets the value of the grandmaster.
Definition: Playback.h:271