The CWL includes software simulations of the CWM and the OKC. 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.
The simulations are text-based Windows programs and are run from a command prompt. cwm.exe is the simulation for the CWM, and okc.exe is the simulation for the OKC. The simulated CWM and OKC communicate to each other via inter-process communication that simulates a network connection between them. The CWM simulation opens a serial comport on the Windows PC. An OKE system can connect their controller to the Windows PC serial port and communicate to the simulated CWM. The serial communication protocol used by the CWM and OKE simulators is the same that would run on real controller hardware.
There are two typical simulation scenarios:
Run the OKC and CWM simulators on a PC and connect the PC with a serial connection to a controller board.
Run the OKC, CWM, and OKE simulators all on the same PC. The PC requires 2 serial ports connected with a NULL modem cable.
CWM Simulation
OKC Simulation
OKE Simulation
Building Simulators on Windows
The simulators were built using Microsoft Visual Studio Community 2019 with the C/C++ tools. At the top level ConnectWare directory 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.
To build the OKE simulator right click on the _OpenKitchenEquipment_OKE project in the Solution Explorer pane and click Set as StartUp Project. To change the default command line parameters, go to Project->Properties->Debugging and modify the Command Arguments field. On the toolbar you can launch the debugger by clicking the Local Windows Debugger option.