...
At the time of writing this tutorial Atomiton TQLEngine does not provide specific language constructs to implement simulation. But the existing Atomic domain languages capabilities can be exploited to achieve simple to complex simulation. The simulation design patterns can be classified as follows:
Pattern # | Name | Description | Use Cases | Implementation Flow |
---|---|---|---|---|
1 | @ThingFacet Level | Seamless integration within the attribute's associate action |
|
|
2 | @ThingFacet Level | Separate Action to start the simulation |
|
|
3 | @Protocol Handler Level | Push the simulation logic down into protocol handler level |
|
|
4 | @Behavior Tree | Simulation logic is driven primarily by Behavior Trees. |
|
|
Simulating Temperature Sensor
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<Query> <Find> <Greenhouse> <GreenhouseID ne=""/> </Greenhouse> </Find> </Query> <!-- Custom container --> <Query as="Khans.GreenDen"> <Find> <Greenhouse> <GreenhouseID ne=""/> </Greenhouse> </Find> </Query> <!-- Filter the result --> <Query as="Khans.GreenDen"> <Find only="Greenhouse:ExternalEnv"> <Greenhouse> <GreenhouseID ne=""/> </Greenhouse> </Find> </Query> |
Source Code
Import into TQLStudio
ProjectName | Import Link |
---|---|
Temp Sensor Serial | SimulateTempSensor |