hueplusplus  1.0.0
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
hueplusplus::CreateGroup Class Reference

Parameters necessary for creating a new Group. More...

#include <hueplusplus/Group.h>

Public Member Functions

nlohmann::json getRequest () const
 Get request to create the group. More...
 

Static Public Member Functions

static CreateGroup LightGroup (const std::vector< int > &lights, const std::string &name="")
 Create a LightGroup. More...
 
static CreateGroup Room (const std::vector< int > &lights, const std::string &name="", const std::string &roomType="")
 Create a Room group. More...
 
static CreateGroup Entertainment (const std::vector< int > &lights, const std::string &name="")
 Create an Entertainment group. More...
 
static CreateGroup Zone (const std::vector< int > &lights, const std::string &name="")
 Create a Zone. More...
 

Protected Member Functions

 CreateGroup (const std::vector< int > &lights, const std::string &name, const std::string &type, const std::string &roomType)
 Protected constructor, should not be called directly. More...
 

Detailed Description

Parameters necessary for creating a new Group.

Provides static functions for each group type that can be created by the user.

Note
These are not all types that Group::getType() can return, because some types cannot be created manually.

Constructor & Destructor Documentation

◆ CreateGroup()

hueplusplus::CreateGroup::CreateGroup ( const std::vector< int > &  lights,
const std::string &  name,
const std::string &  type,
const std::string &  roomType 
)
protected

Protected constructor, should not be called directly.

Parameters
lightsList of light ids for the group.
nameName of the group, empty for default name.
typeType of the group, empty for default type.
roomTypeRoom class if type is room, empty for default class or if type is not room.

Member Function Documentation

◆ Entertainment()

CreateGroup hueplusplus::CreateGroup::Entertainment ( const std::vector< int > &  lights,
const std::string &  name = "" 
)
static

Create an Entertainment group.

The lights are used in an entertainment setup and can have relative positions. The group can be empty.

Parameters
lightsList of light ids, may be empty.
nameName of the group, optional.

◆ getRequest()

nlohmann::json hueplusplus::CreateGroup::getRequest ( ) const

Get request to create the group.

Returns
JSON request for a POST to create the new group

◆ LightGroup()

CreateGroup hueplusplus::CreateGroup::LightGroup ( const std::vector< int > &  lights,
const std::string &  name = "" 
)
static

Create a LightGroup.

LightGroup is the default type for groups. Empty LightGroups will be deleted.

Parameters
lightsList of light ids, must not be empty.
nameName of the new group, optional.

◆ Room()

CreateGroup hueplusplus::CreateGroup::Room ( const std::vector< int > &  lights,
const std::string &  name = "",
const std::string &  roomType = "" 
)
static

Create a Room group.

Rooms can have a room class and can be empty. Every light can only be in one room.

Parameters
lightsList of light ids, may be empty.
nameName of the room, optional.
roomTypeClass of the room (case sensitive), optional. Refer to Hue developer documentation for a list of possible room classes.

◆ Zone()

CreateGroup hueplusplus::CreateGroup::Zone ( const std::vector< int > &  lights,
const std::string &  name = "" 
)
static

Create a Zone.

Zones can be empty, a light can be in multiple zones.

Parameters
lightsList of light ids, may be empty.
nameName of the Zone, optional.

The documentation for this class was generated from the following files: