Class: Interpreter

Interpreter

The Widget handles the access to sensors.

abstractnew Interpreter()

Generates the id and initializes the (in and out) types and values.

Members

protected,nullable_lastInterpretationDate

Last interpretation time.

protecteddiscovererDiscoverer

Associated Discoverer.

idstring

Id of the Interpreter. Will be generated.

namestring

Name of the Interpreter.

Methods

protected_canHandleInAttributes(attributeListOrArray)

Checks whether the specified data match the expected.

Name Type Description
attributeListOrArray AttributeList | Array.<Attribute>

Data that should be verified.

protected_canHandleOutAttributes(attributeListOrArray)

Checks whether the specified data match the expected.

Name Type Description
attributeListOrArray AttributeList | Array.<Attribute>

Data that should be verified.

abstract,protected_initInAttributes()

Initializes the inAttributes.

abstract,protected_initOutAttributes()

Initializes the outAttributes.

abstract,protected_interpretData(inAttributes, outAttributes, callback)

Interprets the data.

Name Type Description
inAttributes AttributeList
outAttributes AttributeList
callback function

protected_isInAttribute(attribute){boolean}

Verifies whether the specified attribute is contained in inAttributeList.

Name Type Description
attribute Attribute

Attribute that should be verified.

Returns:
Type Description
boolean

protected_isOutAttribute(attribute){boolean}

Verifies whether the specified attribute is contained in outAttributeList.

Name Type Description
attribute Attribute

Attribute that should be verified.

Returns:
Type Description
boolean

Registers the component to the associated Discoverer.

protected_setInAttribute(attribute)

Sets an inAttribute.

Name Type Description
attribute Attribute

protected_setInAttributes(attributesOrArray)

Sets an inAttributes.

Name Type Description
attributesOrArray AttributeList | Array

Attributes to set.

protected_setOutAttribute(attribute)

Adds an outAttribute.

Name Type Description
attribute Attribute

protected_setOutAttributes(attributesOrArray)

Sets an outAttributes.

Name Type Description
attributesOrArray AttributeList | Array

Attributes to set.

callInterpreter(inAttributes, outAttributes, callback)

Validates the data and calls interpretData.

Name Type Description
inAttributes AttributeList

Data that should be interpreted.

outAttributes AttributeList
callback function nullable

For additional actions, if an asynchronous function is used.

doesSatisfyTypeOf(attribute){boolean}

Name Type Description
attribute Attribute
Returns:
Type Description
boolean

Returns the id of the interpreter.

Returns:
Type Description
string

Returns the expected inAttributeTypes.

Returns:
Type Description
AttributeList

getLastInterpretionTime(){Date}

Returns the time of the last interpretation.

Returns:
Type Description
Date

getName(){string}

Returns the name of the interpreter.

Returns:
Type Description
string

Returns the provided outAttributeTypes.

Returns:
Type Description
AttributeList

getOutAttributesWithInputParameters(){AttributeList}

Returns:
Type Description
AttributeList

getType(){string}

Returns the type of this class, in this case "Interpreter".

Returns:
Type Description
string

hasOutAttributesWithInputParameters(){boolean}

Returns:
Type Description
boolean

setDiscoverer(discoverer)

Sets and registers to the associated Discoverer.

Name Type Description
discoverer Discoverer

Discoverer