![]() |
Helper Class Reference
1.1
HomeGenie - Automation Programs' Engine SDK
|
Modules Manager Helper class.
Offers methods for filtering, selecting and operate on a group of modules.
Class instance accessor: Modules
More...
Public Member Functions | |
| 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 | |
| Func< ModulesManager, TsList< Module > > | ModulesListCallback [get, set] |
| Gets or sets the modules set on which this helper class will be working on. More... | |
| TsList< Module > | Modules [get] |
| Gets the complete modules list. More... | |
| virtual TsList< Module > | SelectedModules [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... | |
Modules Manager Helper class.
Offers methods for filtering, selecting and operate on a group of modules.
Class instance accessor: Modules
| ModulesManager InDomain | ( | string | domains | ) |
Select modules belonging to specified domains.
| domains | A string containing comma seperated domain names. |
Example:
| ModulesManager WithAddress | ( | string | addresses | ) |
Select modules with specified address.
| addresses | A string containing comma seperated address values. |
Example:
| ModulesManager WithName | ( | string | moduleNames | ) |
Select modules matching specified names.
| moduleNames | A string containing comma seperated module names. |
Example:
| ModulesManager OfDeviceType | ( | string | deviceTypes | ) |
Select modules of specified device types.
| deviceTypes | A string containing comma seperated type names. |
Example:
| ModulesManager InGroup | ( | string | groups | ) |
Select modules included in specified groups.
| groups | A string containing comma seperated group names. |
Example:
| ModulesManager WithParameter | ( | string | parameters | ) |
Select all modules having specified parameters.
| parameters | A string containing comma seperated parameter names. |
Example:
| ModulesManager WithFeature | ( | string | features | ) |
Select all modules having specified features.
| feature | A string containing comma seperated feature names. |
Example:
| ModulesManager WithoutFeature | ( | string | features | ) |
Select all modules NOT having specified features.
| feature | A string containing comma seperated feature names. |
Example:
| 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.
| callback | Callback function to call for each iteration. |
Example:
| ModuleHelper Get | ( | ) |
Returns the module in the current selection. If the current selection contains more than one element, the first element will be returned.
Example:
| 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.
| command | API command to be performed. |
Example:
| 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.
| delaySeconds | Delay seconds. |
Example:
| object GetValue | ( | string | options = "" | ) |
Execute current command on first selected module and return the response value.
| options | Options. |
| ModulesManager Execute | ( | ) |
Execute current command for all selected modules.
| ModulesManager Execute | ( | string | options | ) |
Execute current command with specified options.
| options | A string containing options to be passed to the selected command. |
| ModulesManager Set | ( | ) |
Alias for Execute()
| ModulesManager Set | ( | string | options | ) |
Alias for Execute(options)
| options | A string containing options to be passed to the selected command. |
| ModulesManager On | ( | ) |
Turn on all selected modules.
| ModulesManager Off | ( | ) |
Turn off all selected modules.
| ModulesManager Toggle | ( | ) |
Toggle all selected modules.
|
getset |
Gets or sets the modules set on which this helper class will be working on.
The modules list callback.
|
get |
Gets the complete modules list.
The modules.
|
get |
Return the list of selected modules.
|
get |
Return the list of control groups.
|
getset |
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.
The level (percentage value 0-100).
Example:
|
get |
Gets "on" status ("Status.Level" > 0).
true if at least one module in the current selection is on; otherwise, false.
|
get |
Gets "off" status ("Status.Level" == 0).
true if at least one module in the current selection is off; otherwise, false.
|
get |
Gets "alarm" status ("Sensor.Alarm" > 0).
true if at least one module in the current is alarmed; otherwise, false.
|
get |
Gets "motion detection" status ("Sensor.MotionDetect" > 0).
true if at least one module in the current detected motion; otherwise, false.
|
get |
Gets temperature value ("Sensor.Temperature").
The temperature parameter of selected module (average value is returned when more than one module is selected).
|
get |
Gets luminance value ("Sensor.Luminance").
The luminance parameter of selected module (average value is returned when more than one module is selected).
|
get |
Gets humidity value ("Sensor.Humidity").
The humidity parameter of selected module (average value is returned when more than one module is selected).
1.8.11