/// <summary>
 /// Constructor when an Exception has been or will be thrown.
 /// </summary>
 /// <param name="re">The corresponding Exception</param>
 /// <param name="fatal">Set to true if the fault requires the serial port to be closed.</param>
 /// <param name="receiver">The Receiver object associated with the VEMCO hardware.</param>
 /// <param name="portName">The name of the serial port it is connected to (i.e. COM1)</param>
 /// <param name="serialNumber">The serial number of the receiver.</param>
 /// <param name="model">The model of the receiver.</param>
 /// <param name="config">The json object for the configration file.</param>
 public ExcepReceiver(Exception re, Boolean fatal, Receiver receiver, string portName, string serialNumber, string model, FridayThe13th.JsonObject config)
     : base("Receiver Exception: " + receiver + "entered exception condition. Fatal? " + fatal + 
      " Exception text: " + re.ToString(), receiver, portName, serialNumber, model, config)
 {
     this["exception"] = re;
     this["fatal"] = fatal;
     this["note"] = re.ToString();
 }
 /// <summary>
 /// Default constructor.
 /// </summary>
 /// <param name="receiver">The Receiver object associated with the VEMCO hardware.</param>
 /// <param name="portName">The name of the serial port it is connected to (i.e. COM1)</param>
 /// <param name="serialNumber">The serial number of the receiver.</param>
 /// <param name="model">The model of the receiver.</param>
 /// <param name="config">The json object for the configration file.</param>
 public NewReceiver(Receiver receiver, string portName, string serialNumber, string model, FridayThe13th.JsonObject config)
     : base("Receiver mounted on " + receiver.portName, receiver, portName, serialNumber, model,config)
 {
 }
 /// <summary>
 /// Constructor when no Exception has been or will be thrown.
 /// </summary>
 /// <param name="fatal">Set to true if the fault requires the serial port to be closed.</param>
 /// <param name="text">Reason for failure (human readable)</param>
 /// <param name="receiver">The Receiver object associated with the VEMCO hardware.</param>
 /// <param name="portName">The name of the serial port it is connected to (i.e. COM1)</param>
 /// <param name="serialNumber">The serial number of the receiver.</param>
 /// <param name="model">The model of the receiver.</param>
 /// <param name="config">The json object for the configration file.</param>
 public ExcepReceiver(Boolean fatal, string text, Receiver receiver, string portName, string serialNumber, string model, FridayThe13th.JsonObject config)
     : base("Receiver Error: " + receiver.portName + " entered exceptional condition. Fatal: " + fatal, receiver, portName, serialNumber, model, config)
 {
     this["fatal"] = fatal;
     this["note"] = text;
 }
 /// <summary>
 /// Default constructor.
 /// </summary>
 /// <param name="receiver">The Receiver object associated with the VEMCO hardware.</param>
 /// <param name="portName">The name of the serial port it is connected to (i.e. COM1)</param>
 /// <param name="serialNumber">The serial number of the receiver.</param>
 /// <param name="model">The model of the receiver.</param>
 /// <param name="config">The json object for the configration file.</param>
 /// <param name="unparsedMessage">The String of the unparsed message.</param>
 public UnparsedMessage( String unparsedMessage, Receiver receiver, string portName, string serialNumber, string model, FridayThe13th.JsonObject config)
     : base(unparsedMessage + " from receiver on " + receiver.portName, receiver, portName, serialNumber, model, config)
 {
     this["unparsedmessage"] = unparsedMessage;
 }
 public RunStateChangedReceiver(ReceiverSlice.RunState r, Receiver receiver, string portName, string serialNumber, string model, FridayThe13th.JsonObject config)
     : base("Receiver " + serialNumber + "on " + portName + " changed to run state " + r, receiver, portName, serialNumber, model, config)
 {
     this["runstate"] = r;
 }
 /// <summary>
 /// 
 /// </summary>
 /// <param name="message">This should be some human readable text about why the event is being generated.</param>
 /// <param name="receiver">The Receiver object associated with the VEMCO hardware.</param>
 /// <param name="portName">The name of the serial port it is connected to (i.e. COM1)</param>
 /// <param name="serialNumber">The serial number of the receiver.</param>
 /// <param name="model">The model of the receiver.</param>
 /// <param name="config">The json object for the configration file.</param>
 public ReceiverEvent(string message, Receiver receiver, string portName, string serialNumber, string model, FridayThe13th.JsonObject config)
     : base(message, null)
 {
     this["receiver"] = receiver;
     this["portname"] = portName;
     this["serialnumber"] = serialNumber;
     this["model"] = model;
     this["configuration"] = config;
 }
 /// <param name="text">Human readable string of noteworthy information.</param>
 /// <param name="receiver">The Receiver object associated with the VEMCO hardware.</param>
 /// <param name="portName">The name of the serial port it is connected to (i.e. COM1)</param>
 /// <param name="serialNumber">The serial number of the receiver.</param>
 /// <param name="model">The model of the receiver.</param>
 /// <param name="config">The json object for the configration file.</param>
 public NoteReceiver(string text, Receiver receiver, string portName, string serialNumber, string model, FridayThe13th.JsonObject config)
     : base("NOTE[" + "PORT: " + receiver.portName + " SERIAL NUMBER: " + serialNumber + "MODEL: " + model + "] " + text, receiver, portName, serialNumber, model, config)
 {
     this["note"] = text;
 }