Activity 9: Check the specified interfaces by monitoring
-
Extend the project file VendingMachine.prj with an import of ICoinCheck.interface.
-
Add a monitoring task as follows:
Generate Monitors {
monitoringIService for interface IService {
trace directories "VendingMachineEventsFiles"
}
monitoringICoinCheck for interface ICoinCheck {
trace directories "VendingMachineEventsFiles"
}
}
-
Use the GUI to generate a few .event files using commands from the service interface and the possibility to generate coin check problem using the coin checker interface. Observe that the Reset operation of the service interface requires the selection of a result.
-
Apply monitoring (right-click on VendingMachine.prj and choose "Run As > Generate and execute monitoring") to check all .event files. Inspect the result in folder comma-gen. When there are any monitoring errors, improve the state machine.