Helper Class Reference  1.3
HomeGenie - Automation Programs' Engine API
Public Member Functions | Properties | List of all members
ModuleParameter Class Reference

Module parameter. More...

Public Member Functions

object GetData ()
 Gets the data object. More...
 
GetData< T > ()
 If data is stored as a JSON serialized string, use this method to get the object instance specifying its type T. More...
 
void SetData (object dataObject)
 Sets the data of this parameter. More...
 
bool Is (string name)
 Determines whether this instance has the given name. More...
 
bool WaitUpdate (double timeoutSeconds)
 Waits until this parameter is updated. More...
 

Properties

ValueStatistics Statistics [get]
 Gets the statistics. More...
 
string Name [get, set]
 Gets the name. More...
 
string Value [get, set]
 Gets or sets the data of this parameter as string. If the value is a non-primitive object, set using the setData method, then the getter of Value will return the JSON serialized data. More...
 
string Description [get, set]
 Gets or sets the description. More...
 
string FieldType [get, set]
 Gets or sets the type of the field. More...
 
DateTime UpdateTime [get, set]
 Gets the update time. More...
 
double DecimalValue [get]
 Gets the decimal value. More...
 
double IdleTime [get]
 Gets the idle time (time elapsed since last update). More...
 

Detailed Description

Module parameter.

Member Function Documentation

◆ GetData()

object GetData ( )

Gets the data object.

Returns

◆ GetData< T >()

T GetData< T > ( )

If data is stored as a JSON serialized string, use this method to get the object instance specifying its type T.

Template Parameters
T
Returns
The data object as type T.

Example:

// Sets the data as JSON serialized object
parameter.Value = "{ \"foo\": \"bar\", \"pippo\": \"pluto\" }";
var data = parameter.GetData<Dictionary<string,string>>();
foreach(var item in data) {
// ...
}

◆ SetData()

void SetData ( object  dataObject)

Sets the data of this parameter.

Parameters
dataObject

◆ Is()

bool Is ( string  name)

Determines whether this instance has the given name.

Returns
true if this instance is name; otherwise, false.
Parameters
nameName.

◆ WaitUpdate()

bool WaitUpdate ( double  timeoutSeconds)

Waits until this parameter is updated.

Returns
true, if it was updated, false otherwise.
Parameters
timeoutSecondsTimeout seconds.

Property Documentation

◆ Statistics

ValueStatistics Statistics
get

Gets the statistics.

The statistics.

◆ Name

string Name
getset

Gets the name.

The name.

◆ Value

string Value
getset

Gets or sets the data of this parameter as string. If the value is a non-primitive object, set using the setData method, then the getter of Value will return the JSON serialized data.

The string value.

◆ Description

string Description
getset

Gets or sets the description.

The description.

◆ FieldType

string FieldType
getset

Gets or sets the type of the field.

The type of the field.

◆ UpdateTime

DateTime UpdateTime
getset

Gets the update time.

The update time.

◆ DecimalValue

double DecimalValue
get

Gets the decimal value.

The decimal value.

◆ IdleTime

double IdleTime
get

Gets the idle time (time elapsed since last update).

The idle time.


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