290 DeviceSet remove(
unsigned int lower,
unsigned int upper);
304 DeviceSet remove(
string key,
string val,
bool isEqual);
321 DeviceSet remove(
string key, regex val,
bool isEqual);
375 void setParam(
string param,
float val);
387 void setParam(
string param,
string val,
float val2 = -1.0f);
400 void setParam(
string param,
string channel,
double val);
420 void setParam(
string param,
double x,
double y,
double weight = 1.0);
429 void setColorRGBRaw(
string param,
double r,
double g,
double b,
double weight = 1.0);
436 void setRGBRaw(
double r,
double g,
double b,
double weight = 1.0);
453 void setColorHSV(
string param,
double H,
double S,
double V,
double weight = 1.0);
558 JSONNode
toJSON(
string name);
Represents a physical lighting Device in Lumiverse.
bool hasSameIds(DeviceSet &devices)
Returns true if the device sets have the same number of devices and contain the same set of IDs...
Definition: DeviceSet.cpp:655
vector< string > getIds()
Gets a copy of the list of the IDs contained by this DeviceSet.
Definition: DeviceSet.cpp:593
void setColorRGB(string param, double r, double g, double b, double weight=1.0, RGBColorSpace cs=sRGB)
Sets the value of a LumiverseColor parameter.
Definition: DeviceSet.cpp:565
The Rig contains information about the state of the lighting system.
This class is a wapper around a variety of different possible data types that might be needed by a De...
Definition: LumiverseType.h:33
string info()
Returns a string containing info about the DeviceSet.
Definition: DeviceSet.cpp:640
DeviceSet parseChannelSelector(string selector, bool filter)
Processes a channel selector.
Definition: DeviceSet.cpp:191
void setParam(string param, float val)
Sets the value of a LumiverseFloat parameter on every device in the group.
Definition: DeviceSet.cpp:511
void setColorRGBRaw(string param, double r, double g, double b, double weight=1.0)
Sets the value of a LumiverseColor parameter.
Definition: DeviceSet.cpp:551
void clear()
Removes all devices from the device set.
Definition: DeviceSet.h:533
const set< Device * > & getDevices()
Gets the devices managed by this set.
Definition: DeviceSet.h:473
Definition: LumiverseColorLib.h:30
void setColorHSV(string param, double H, double S, double V, double weight=1.0)
Sets the value of a LumiverseColor parameter using HSV.
Definition: DeviceSet.cpp:573
RGBColorSpace
Selects a RGB color space to use in color conversion functions.
Definition: LumiverseColorLib.h:29
A DeviceSet is a set of devices.
Definition: DeviceSet.h:41
bool hasSameDevices(DeviceSet &devices)
Returns true if the device sets have the same number of devices and point to the same Devices...
Definition: DeviceSet.cpp:668
DeviceSet parseMetadataSelector(string selector, bool filter)
Processes a metadata selector.
Definition: DeviceSet.cpp:142
DeviceSet add(Device *device)
Adds a Device to the set.
Definition: DeviceSet.cpp:318
Rig * m_rig
Pointer to the rig for accessing indexes and devices.
Definition: DeviceSet.h:601
InterpolationMode
Sets the interpolation mode when transitioning between two LumiverseEnums.
Definition: LumiverseEnum.h:71
DeviceSet parseParameterSelector(string selector, bool filter)
Processes a parameter selector.
Definition: DeviceSet.cpp:250
void addSet(DeviceSet otherSet)
Adds a set to the current set.
Definition: DeviceSet.cpp:501
void reset()
Resets all the parameters in each Device in the device set.
Definition: DeviceSet.cpp:485
void removeDevice(Device *device)
Removes from the set without returning a new copy.
Definition: DeviceSet.cpp:497
set< string > getAllParams()
Gets a copy of the set of all the parameters used by devices in this set.
Definition: DeviceSet.cpp:603
Contains functions for logging information to console or file.
DeviceSet parseFloatParameter(string param, string op, float val, bool filter, bool eq)
Processes a float parameter selector.
Definition: DeviceSet.cpp:285
set< string > getAllMetadata()
Gets a copy of the set of all the metadata keys used by devices in this set.
Definition: DeviceSet.cpp:615
int cmp(LumiverseType *lhs, LumiverseType *rhs)
Compares two LumiverseType objects.
Definition: LumiverseTypeUtils.cpp:60
Mode
When you select an enumeration, mode determines where in the range the calculated value will fall...
Definition: LumiverseEnum.h:56
void setRGBRaw(double r, double g, double b, double weight=1.0)
Sets the value of a LumiverseColor paramter.
Definition: DeviceSet.cpp:559
std::ostream & operator<<(std::ostream &str)
Override for steam output.
Definition: DeviceSet.h:96
~DeviceSet()
Destructor for the DeviceSet.
Definition: DeviceSet.cpp:27
DeviceSet()
Constructs a DeviceSet unassociated with a Rig.
Definition: DeviceSet.h:52
set< Device * > m_workingSet
Set of devices currently contained in the Deviceset.
Definition: DeviceSet.h:596
bool contains(Device *d)
Checks to see if a device is in the device set.
Definition: DeviceSet.cpp:680
void setColorWeight(string param, double weight)
Sets the weight of a LumiverseColor parameter.
Definition: DeviceSet.cpp:580
DeviceSet select(string selector)
Get devices matching a query from the Rig.
Definition: DeviceSet.cpp:31
JSONNode toJSON(string name)
Saves the device set as a JSON object with the given name.
Definition: DeviceSet.cpp:693
Contains all core Lumiverse functions and variables.
Definition: Device.cpp:2
The Rig contains information about the state of the lighting system.
Definition: Rig.h:58
void removeSet(DeviceSet otherSet)
Removes a set from the current set.
Definition: DeviceSet.cpp:505
A Device in Lumiverse maintains information about a lighting device.
Definition: Device.h:55
set< string > getAllMetadataForKey(string key)
Gets a copy of the set of all metadata values used by a particular key.
Definition: DeviceSet.cpp:627
void addDevice(Device *device)
Adds to the set without returning a new copy.
Definition: DeviceSet.cpp:491
size_t size()
Returns the number of devices in the DeviceSet.
Definition: DeviceSet.h:509
void setIntensity(float val)
Proxy for setParam("intensity", val). Assumes the existence of an "intensity" parameter.
Definition: DeviceSet.h:441
DeviceSet parseSelector(string selector, bool filter)
Parses a single selector.
Definition: DeviceSet.cpp:109
void setMetadata(string key, string val)
Sets the metadata for the given key-value pair for all devices in the DeviceSet.
Definition: DeviceSet.cpp:587