Helper Class Reference  1.1
HomeGenie - Automation Programs' Engine SDK
Public Member Functions | Properties | List of all members
ModuleHelper Class Reference

Module Helper class.
This class is a module instance wrapper and it is used as return value of ModulesManager.Get() method. More...

Inheritance diagram for ModuleHelper:
ModulesManager

Public Member Functions

bool Is (string name)
 Determines whether this module has the given name. More...
 
bool IsInDomain (string domain)
 Determines whether this module belongs to the specified domain. More...
 
bool IsInGroup (string groupList)
 Determines whether this module is in the specified groupList. More...
 
bool IsOfDeviceType (string typeList)
 Determines whether this module is of one of the types specified in typeList. More...
 
bool HasFeature (string feature)
 Determines whether this module has the specified feature active. More...
 
bool HasParameter (string parameter)
 Determines whether this module has the specified parameter. More...
 
ModuleParameter Parameter (string parameter)
 Gets the specified module parameter. More...
 
ModuleHelper RaiseEvent (string parameter, string value, string description)
 Raise a module parameter event and set the parameter with the specified value. More...
 
- Public Member Functions inherited from ModulesManager
ModulesManager InDomain (string domains)
 Select modules belonging to specified domains. More...
 
ModulesManager WithAddress (string addresses)
 Select modules with specified address. More...
 
ModulesManager WithName (string moduleNames)
 Select modules matching specified names. More...
 
ModulesManager OfDeviceType (string deviceTypes)
 Select modules of specified device types. More...
 
ModulesManager InGroup (string groups)
 Select modules included in specified groups. More...
 
ModulesManager WithParameter (string parameters)
 Select all modules having specified parameters. More...
 
ModulesManager WithFeature (string features)
 Select all modules having specified features. More...
 
ModulesManager WithoutFeature (string features)
 Select all modules NOT having specified features. More...
 
ModulesManager Each (Func< ModuleHelper, bool > callback)
 Iterate through each module in the current selection and pass it to the specified <callback>. To break the iteration, the callback must return true, otherwise false. More...
 
ModuleHelper Get ()
 Returns the module in the current selection. If the current selection contains more than one element, the first element will be returned. More...
 
ModulesManager Command (string command)
 Select an API command to be executed for selected modules. To perform the selected command, Execute or Set method must be invoked. More...
 
ModulesManager IterationDelay (double delaySeconds)
 Used before a command (Set, Execute, On, Off, Toggle, ...), it will put a pause after performing the command for each module in the current selection. More...
 
object GetValue (string options="")
 Execute current command on first selected module and return the response value. More...
 
ModulesManager Execute ()
 Execute current command for all selected modules. More...
 
ModulesManager Execute (string options)
 Execute current command with specified options. More...
 
ModulesManager Set ()
 Alias for Execute() More...
 
ModulesManager Set (string options)
 Alias for Execute(options) More...
 
ModulesManager On ()
 Turn on all selected modules. More...
 
ModulesManager Off ()
 Turn off all selected modules. More...
 
ModulesManager Toggle ()
 Toggle all selected modules. More...
 

Properties

bool Exists [get]
 Gets a value indicating whether this HomeGenie.Automation.Scripting.ModuleHelper has a valid module instance. More...
 
Module Instance [get]
 Gets the underlying module instance. More...
 
- Properties inherited from ModulesManager
Func< ModulesManager, TsList< Module > > ModulesListCallback [get, set]
 Gets or sets the modules set on which this helper class will be working on. More...
 
TsList< ModuleModules [get]
 Gets the complete modules list. More...
 
virtual TsList< ModuleSelectedModules [get]
 Return the list of selected modules. More...
 
List< string > Groups [get]
 Return the list of control groups. More...
 
double Level [get, set]
 Gets or sets "Status.Level" parameter of selected modules. If more than one module is selected, when reading this property the average level value is returned. More...
 
bool IsOn [get]
 Gets "on" status ("Status.Level" > 0). More...
 
bool IsOff [get]
 Gets "off" status ("Status.Level" == 0). More...
 
bool Alarmed [get]
 Gets "alarm" status ("Sensor.Alarm" > 0). More...
 
bool MotionDetected [get]
 Gets "motion detection" status ("Sensor.MotionDetect" > 0). More...
 
double Temperature [get]
 Gets temperature value ("Sensor.Temperature"). More...
 
double Luminance [get]
 Gets luminance value ("Sensor.Luminance"). More...
 
double Humidity [get]
 Gets humidity value ("Sensor.Humidity"). More...
 

Detailed Description

Module Helper class.
This class is a module instance wrapper and it is used as return value of ModulesManager.Get() method.

Member Function Documentation

bool Is ( string  name)

Determines whether this module has the given name.

Returns
true if this module has the given name; otherwise, false.
Parameters
nameName.
bool IsInDomain ( string  domain)

Determines whether this module belongs to the specified domain.

Returns
true if this module belongs to the specified domain; otherwise, false.
Parameters
domainDomain.
bool IsInGroup ( string  groupList)

Determines whether this module is in the specified groupList.

Returns
true if this instance is the specified groupList; otherwise, false.
Parameters
groupListComma separated group names.
bool IsOfDeviceType ( string  typeList)

Determines whether this module is of one of the types specified in typeList.

Returns
true if this module is of one of device types specified in typeList; otherwise, false.
Parameters
typeListComma seprated type list.
bool HasFeature ( string  feature)

Determines whether this module has the specified feature active.

Returns
true if this module has the specified feature active; otherwise, false.
Parameters
featureFeature.
bool HasParameter ( string  parameter)

Determines whether this module has the specified parameter.

Returns
true if this module has the specified parameter; otherwise, false.
Parameters
parameterParameter.
ModuleParameter Parameter ( string  parameter)

Gets the specified module parameter.

Parameters
parameterParameter.
ModuleHelper RaiseEvent ( string  parameter,
string  value,
string  description 
)

Raise a module parameter event and set the parameter with the specified value.

Returns
ModuleHelper.
Parameters
parameterParameter name.
valueThe new parameter value to set.
descriptionEvent description.

Property Documentation

bool Exists
get

Gets a value indicating whether this HomeGenie.Automation.Scripting.ModuleHelper has a valid module instance.

true if module instance is valid; otherwise, false.

Module Instance
get

Gets the underlying module instance.

The instance.


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