Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

SystemId or Sid is a unique identifier automatically assigned by TQLEngine A-Stack to every newly created Model Instance. It is of type "String" and is defined as the following in TQL.

...

Code Block
languagexml
titlePhidServoId defined as System ID
linenumberstrue
<ThingModel Name="PhidgetServoModel" Combines="PhidgetServoFacet">
  <Sid Name="PhidServoId"/>
</ThingModel>

...


When the Model Instance is created, using Create TQL Query, System ID value is automatically generated by TQLEngineA-Stack.

Code Block
languagexml
titleCreate Phidget Servo Thing Model Instance
linenumberstrue
<Query>
  <Create>
    <PhidgetServoModel>
      <ServoProtocolURL>
        phid://
      </ServoProtocolURL>
      <PhidgetDeviceType>
        PhidgetAdvancedServo
      </PhidgetDeviceType>
      <DeviceInterfaceIndex>
        0
      </DeviceInterfaceIndex>
      <ServoAngle>
        110
      </ServoAngle>
    </PhidgetServoModel>
  </Create>
</Query>

...

Code Block
languagexml
titleFind Phidget Servo Model
linenumberstrue
<Query>
  <Find>
    <PhidgetServoModel>
      <PhidServoId ne="" />
    </PhidgetServoModel>
  </Find>
</Query>

...


Find Result is:

Code Block
languagexml
titleFind Result Phidget Servo Model
linenumberstrue
<Find Status="Success">
  <Result>
    <PhidgetServoModel>
      <PhidServoId>KNI5JYVPAAAAUAABA4ONNHF2</PhidServoId>
      <PhidgetDeviceType>PhidgetAdvancedServo</PhidgetDeviceType>
      <ServoAngle>110</ServoAngle>
      <DeviceInterfaceIndex>0</DeviceInterfaceIndex>
      <ServoProtocolURL>phid://</ServoProtocolURL>
    </PhidgetServoModel>
  </Result>
</Find>

...


Note that the PhidServoId value is automatically generated even though it is NOT specified at the time of Create Query

...

  • Have unique values per Installation of TQLEngineA-Stack: System ID Values are guaranteed to be Unique for a given Installation of TQLEngineA-Stack.
  • Value can neither be given or modified by user: If an attribute is defined of type Sid or SystemId, their values can neither be specified or updated by the user.
  • New values are generated each time for same model: Each time an instance is deleted and created again new value System ID value.

...