Debugging - PyramidTechnologies/netPyramid-RS-232 GitHub Wiki

Debugging your application

Debugging serial comms can be tough so we thought we'd include some tools to make it a little less painful. There is an event that you can subscribe to that will forward neatly packaged summary of every byte stream sent and received through the API.

To use it, simply add a handler to the OnSerialData EventHandler and process the arguments accordingly. The data includes the raw byte array, the translated RS-232 message, the direction of the message, and some timing information.