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 | ||||||
---|---|---|---|---|---|---|
| ||||||
<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 | ||||||
---|---|---|---|---|---|---|
| ||||||
<Query> <Create> <PhidgetServoModel> <ServoProtocolURL> phid:// </ServoProtocolURL> <PhidgetDeviceType> PhidgetAdvancedServo </PhidgetDeviceType> <DeviceInterfaceIndex> 0 </DeviceInterfaceIndex> <ServoAngle> 110 </ServoAngle> </PhidgetServoModel> </Create> </Query> |
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<Query> <Find> <PhidgetServoModel> <PhidServoId ne="" /> </PhidgetServoModel> </Find> </Query> |
...
Find Result is:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<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.
...