The Powerhouse-Dynamics ConnectWare repo GitHub repository includes software simulators that are highly recommended tools for developing OKE (Open Kitchen Equipment) ports of the CWL (ConnectWare Library). The simulations can be used for debugging a new CWL port since they minimize the number of "moving parts" required to exercise an OKE system.
There are three independent simulators that can be run out of the box or modified to suit the needs of the developer. The compiled simulators are text-based Windows programs and are run from a command prompt. All three simulators can be run on different command terminals on the same computer.
...
okc.exe is a software simulation of the cloud server that runs on a local computer using a terminal. This simulator provides a means of monitoring OKM traffic, sending commands and data back to the OKE through the CWM simulator(Open Kitchen Message) traffic to and from the cloud.
The simulated CWM and OKC communicate to each other via inter-process communication that simulates a network connection between them. The OKC simulator can only interface with the CWM simulator.
OKC Sim Use Cases
This simulator is quite useful for validating data integrity of messages sent through the communications network chain. Use of this tool can be expanded to include unit testing for future firmware developments, ensuring that changes made in firmware do not break the OKM protocol.
CWM (ConnectWare Module) Simulator
...
The CWM simulation opens a serial comport on the Windows PC. This serial comport is used to connect to the developer’s equipment in the same manner that the physical CWM would connect.
CWM Sim Use Cases
The OKE typically provides the user interface for the equipment. The UI is responsible for providing access to network settings which reside in the CWM. The CWM Simulator provides the interaction with the OKE necessary to validate commands and messages used for network status and configuration changes necessary for installations. Using the CWM simulator, the developer can see the interaction of communications from both sides.
OKE (Open Kitchen Equipment) Simulator
This is a software simulation of a Kitchen appliance. The purpose of this from a developer point of view is for demonstration purposes. To show how the OKE should be communicating with the rest of the simulators. This can be a helpful starting place to guide a developer on what heartbeat messages are meant for and to follow along with the API porting guide.
There are two typical simulation scenarios:
...
Expand | ||
---|---|---|
| ||
An off the shelf Null Modem cable from FTDI Model USB NMC-2.5M has a convenient USB-A connector at each end. https://www.digikey.com/short/8mtn047d OR Use two separate USB to Serial cables wired together in null modem configuration. https://www.digikey.com/short/vc37mvzv
|
Simulator Software Location
All the simulation software cane be found at the https://github.com/Powerhouse-Dynamics/connectware. If you have not requested access, please see the QuickStart page for details on gaining access for your integration.https://sitesage.atlassian.net/wiki/x/AwDqFw
The Powerhouse-Dynamics ConnectWare GitHub repository contains a folder called sim. These are the compiled for Windows simulators.
CWM Simulation Instructions
...
The simulators were built using Microsoft Visual Studio Community 2019 with the C/C++ tools. At the top level ConnectWare directory https://github.com/Powerhouse-Dynamics/connectware there is a solution file called ConnectWare.sln that contains projects for the three simulators.
...
Normally implementors will not need to rebuild the OKC or CWM simulators since precompiled versions are included in the sim directory. However, some implementors may find it useful to use and extend the OKE simulator as a way to prototype and debug parts of their application code.
...