Serial Comms: Connect to, send structured packets to, and receive responses from the hardware is completed.
A packet structure class was defined that allows for easily creating correctly formed messages to send to the hardware A small wrapper class that uses the Microsoft serial port library takes care of sending and receiving messages. providing a method to send and wait for a response, or send and provide a call-back for later processing of response. serial receive occurring in a separate thread.
Serial Messages: Create all required message types has been completed.
A base class that defines how messages are formed and responded to. Also providing base functionality for xmlSerialisation for saving configuration.
Each message type that is sent to the hardware implements the base class, overriding the data component of the message and adjusts its parameters to suit.
Plugin framework: Allow alerts to be pulled from any source is completed.
Using .net MEF, loading a folder full of dll's was actually quite a straightforward task.
An interface is defined requiring:
methods to read and write the plugins configuration to a byte array, perform a check for if the alert should fire, and provide a small data structure for use in the alert.
Configuration storage: Reading and writing configuration data to xml has been 70% completed.
A class storing all of the applications configuration was created.
this stores:
- Which Com port to use
- The alert polling Frequency
A list o f:
Which Plugins to use, that plugins configuration byte array, a list of messages to send to the hardware once the alert fires. each alerts configuration details.
Using xmlSerialisation, the above structure is read and written to/from an xml file. The functionality to do the serialisation was completed, however only half of the rest of the code was modified to be correctly serialised.
Plugins: very little completion. A pop3 plugin was written, but not tested or completed.
Glue: Indeterminate.
The above code was unit tested to as great an extent as was possible.
A basic routine was written to perform serial initialisation, load config and begin polling for updates. a lot of error handling and tweaking is required before I would call this complete.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.