TQL Model grammar
Example
<Macro name="RetryQuery">
<Argument>
<!-- XML Content -->
</Argument>
<Result>
<!-- XML Content -->
</Result>
</Macro>
Referenced by:
Namespace, TQL model content, Macro
TmContent.TmNamespace: nested namespace
Example
<DataModel Name="Region">
<Sid name="RegionID" />
<!-- List of TmDataAttribute -->
</DataModel>
<ThingModel Name="Sensor">
<Sid name="SensorID" />
<!-- List of TmThingAttribute and TmAction -->
</ThingModel>
<AppModel Name="PesticideCalculator">
<!-- List of TmThingAttribute and TmAction -->
</AppModel>
Referenced by:
TmDataContent
Inherits: Inheritance descriptor.
Combine:
TmDataAttribute: TQL data model attribute definition.
StandAloneConstraint: Stand-alone constraint definition.
TmUnique: Unique constraint definition.
Example
<ThingFacet Name="GPSFacet">
<!-- List of TmThingAttribute and TmAction -->
</ThingFacet>
Referenced by:
TmThingContent
Inherits: Inheritance descriptor.
Combine:
TmThingAttribute: TQL thing model attribute definition.
StandAloneConstraint: Stand-alone constraint definition.
TmUnique: Unique constraint definition.
TmAction: Thing action definition
Example
<AppFacet name="OptimumValueAlgorithm">
<!-- List of TmThingAttribute and TmAction -->
</AppFacet>
Referenced by:
TmAppContent
Inherits: Inheritance descriptor.
Combine:
TmThingAttribute: TQL thing model attribute definition.
StandAloneConstraint: Stand-alone constraint definition.
TmUnique: Unique constraint definition.
TmAction: Thing action definition.
Example
<ThingFacet Name="PhidgetRFID">
...<String Name="InterfaceIndex" />
<Unique Name="RFIDIndex" Value="InterfaceIndex" />
...
</ThngFacet>
Referenced by:
Unique constraint definition
Name: Name is optional.
Value: List of attribute names.
Example
<DataModel Name="Region">
...
<String name="regionName" />
...
</DataModel>
Referenced by:
Example
<DataModel name="SensorModel">
...
<DataModel name="Device">
<String name="Name" />
<String name="Type" />
</DataModel>
...
</DataModel>
Referenced by:
Ad-hoc/untyped composite attribute
Example
<Def name="StudentType" inherits="Person">
<String name="Occupation" default="student" eq="student" cardinality="1"/>
</Def>
Referenced by:
TmAttributeBase
Name: Model attribute name.
Cardinality: Nested cardinalities are not yet supported.
Format: Attribute value format specifier.
Codec: Attribute value coder/decoder specifier.
InlineConstraint: Inline constraint.
Referenced by:
TmThingAttribute
Attribute: Cherry-picked attribute definition.
Example
<ThingFacet name="Actuator">
<String name="deviceState" knownBy="deviceListener"/>
</ThingFacet>
Referenced by:
TmThingAtom
Update: Currently only 'auto' value is supported.
KnownBy: Associated action[s] name[s], comma-separated list.
Example
<ThingModel name="MySensorModel" combines="SensorFacet">
<SensorModel Name="sensorModel"/>
</ThingModel>
Referenced by:
TmThingComposite
Update: Currently only 'auto' value is supported.
KnownBy: Associated action[s] name[s], comma-separated list.
Example
<ThingModel name="SensorModel" combines="SensorFacet">
...
<DataModel name="Device">
<String name="Name" />
<String name="Type" />
</DataModel>
...
</ThingModel>
Referenced by:
Ad-hoc/untyped composite attribute
Example
<Action Name="PhidgetReadRFIDTagAc" Documentation="Read the Tag Automatically in the vicinity">
<Workflow Limit="1" Live="1" Timeout="-1">
<Task name="Main" while="true">
...</Task>
</Workflow>
</Action>
Referenced by:
TQL model action
WorkflowGrammar: see Workflow grammar
Example
<Def name="CompanyJanitor" inherits="Employee">
<And>
<Constraint target="Employment.BusinnesRole" eq="janitor"/>
<Constraint target="Employment.Organization" eq="MyCompany"/>
</And>
</Def>
Referenced by:
Example
<Def name="PartnerEmployee" inherits="Employee">
<Constraint target="Employment.Organization" ne="MyCompany"/>
</Def>
Referenced by:
Example
<Def name="Janitor" inherits="Employee">
<Constraint target="Employment.BusinnesRole" eq="janitor"/>
</Def>
Referenced by:
Example
<Def name="CompanyVIP" inherits="Employee">
<Or>
<And>
<Constraint target="Employment.BusinnesRole" ne=""/>
<Constraint target="Employment.Organization" eq="MyCompany"/>
</And>
<Constraint target="Employment.BusinnesRole" eq="BoardMember"/>
</Or>
</Def>
Referenced by:
Example
<Def name="Manager" inherits="Employee">
<String name="Employment.BusinnesRole" default="manager" eq="manager" cardinality="1" modifiers="hidden,readonly"/>
</Def>
Referenced by: