If you want to experiment with the code in this book, you will require an implementation of the ICP API we used for our hypothetical instrument control protocol. The following two sections list source code to simulate the ICP network in your server.
Section A.2 shows source code for an in-memory implementation. This implementation keeps a map of the network devices in memory and provides access to the state of devices via the ICP API shown in Section 10.3. The state of the simulated network is not written to disk in this implementation, so when your server shuts down all state changes are lost.
Section A.3 augments the implementation with a very simple persistence mechanism.