# SpecTalk: Conforming IoT Implementations to Sensor Specifications
## 4 The SpecTalk Acceptance Tests
### Self-Test  
Hsinchu County is developing the Hsinchu International AI Smart Park (Figure 11), which is managed by Acton. SpecTalk will be used by Acton to verify all smart applications in the park. Most of them will be achieved through self-tests. Another example is the smart campus of China Medical University (CMU) in the Shuinan Trade and Economic Park, Taichung (Figure 12). In this subsection, we use the generator and the water-cooled chiller of the CMU smart campus as examples to show how to conduct a self-test.  
In the IoTtalk window, we create a project \"Self-Test\". Besides the three IDFs we created in Figure 6 (see Figure 13 (5),(7),(9)), we also create two output device features (ODFs): the power switch of the generator \"Gen-Switch-O\" (Figure 13 (2)) and the power switch of the smoke exhaust ventilator \"Vent-Switch-O\" (Figure 13 (4)). In the emulation mode, SpecTalk automatically generates the control signals through IDFs Switch-I1 and Switch-I2 (Figure 1 (1),(3)) to turn Gen-Switch-O and Vent-Switch-O on and off. Switch-I1 turns on the generator to see if both the battery level and oil consumption increase. The validation is performed by Test Output through battSts-O, oilSts-O and Switch-O1 (Figure 13 (6),(8),(11)). Switch-I2 tests if ventSts-I correctly indicates the ventilator operation. The validation is performed by Test Output through ventSts-O and Switch-O2 (Figure 13 (10),(12)). In the SpecTalk emulation, \"Test Inputs\" automatically generates sequences of test signals through random number generators. We can also use pre-stored test vectors as inputs sent  
Figure 11: Hsinchu International AI Smart Park.  
Figure 12: The generator units in the smart buildings of China Medical University in the Shuinan Trade and Economic Park, Taichung.  
to the Test Engine. The test procedure is developed manually through the GUI (which minimizes the programing effort) the first time. Then, the procedure is saved in SpecTalk to be reused for similar test cases in the future. Suppose that the oil consumption rate is given in the vendor's datasheet. If the tank is full, then it will be consumed below the threshold in, for example, 50 min. Then, the test procedure will check if oilSts-I gives an alert after 50 min.  
Another example is the self-test configuration for a water-cooled chiller. In the TAICS specification, there is a two-parameter IDF \"chWF-I\" to indicate the water flow of the chiller. The IDF chWF-I is created through the Device Feature Management, like what we conducted in Figure 3 except that we set the parameter number to be 2 (Figure 14 (1)). The first parameter is chWQ (Figure 14 (2)), a sensor to measure the water flow rate in liters per minute (LPM). The second parameter is chSVPos (Figure 14 (3)), a sensor to measure the position of the water supply valve in percent. The ODF is chSVCtrl-O (Figure 14 (4)), the position control switch of the water supply valve. In our test, the values of chSVPos and chSVCtrl should be the same in the normal operation.  
The test procedure for the water-cooled chiller is configured through the WCchillerTest project. In this project, SpecTalk automatically generates the control signals through the  
Figure 14: The IDF and the ODF for the water-cooled chiller.  
Figure 13: Self-test configuration for the generator.  
test input TESTchSVCtrl-I (Figure 15 (1)) to turn chSVCtrl-O (Figure 15 (2)) on and off. In Figure 15 (4),(5), we check if the position of the water level and the water flow rate measured by chWF-I (Figure 15 (3)) are consistent.