Skip to content
Browse files

RealTimeEvents updated in ServerComponents solution

  • Loading branch information...
2 parents 40e4e09 + 3050c06 commit a6956561fe6cfb3a3da2a5affae8b0d263a6a39c @ashawnbandy committed Nov 4, 2012
Showing with 1,505 additions and 2,240 deletions.
  1. +14 −0 .gitignore
  2. BIN Modules/ConsoleLogger/bin/Release/ConsoleLogger.dll
  3. BIN Modules/ConsoleLogger/bin/Release/EventSlice.dll
  4. BIN Modules/ConsoleLogger/obj/Release/ConsoleLogger.dll
  5. +18 −16 Modules/Database/Database.cs
  6. +3 −3 Modules/Decoder/RealTimeEvents/DatabaseResponse.cs
  7. +1 −1 Modules/Decoder/RealTimeEvents/RealTimeEventDecoded.cs
  8. BIN Modules/Decoder/bin/Release/Decoder.dll
  9. BIN Modules/Decoder/bin/Release/EventSlice.dll
  10. BIN Modules/Decoder/obj/Release/Decoder.dll
  11. BIN Modules/Modules.v11.suo
  12. +3 −0 SerialPortComponents/EventSlice/Intefaces/Module.cs
  13. BIN SerialPortComponents/EventSlice/bin/Release/EventSlice.dll
  14. BIN SerialPortComponents/EventSlice/bin/Release/EventSlice.pdb
  15. BIN SerialPortComponents/EventSlice/obj/Release/EventSlice.dll
  16. BIN SerialPortComponents/EventSlice/obj/Release/EventSlice.pdb
  17. +9 −2 SerialPortComponents/Receiver/Encoder.cs
  18. +107 −45 SerialPortComponents/Receiver/RealTimeEvents.cs
  19. +53 −27 SerialPortComponents/Receiver/Receiver.cs
  20. +60 −2 SerialPortComponents/Receiver/ReceiverExceptions.cs
  21. BIN SerialPortComponents/Receiver/bin/Release/EventSlice.dll
  22. BIN SerialPortComponents/Receiver/bin/Release/EventSlice.pdb
  23. +204 −1 SerialPortComponents/Receiver/bin/Release/Receiver.XML
  24. BIN SerialPortComponents/Receiver/bin/Release/Receiver.dll
  25. BIN SerialPortComponents/Receiver/bin/Release/Receiver.pdb
  26. BIN SerialPortComponents/Receiver/obj/Release/Receiver.dll
  27. BIN SerialPortComponents/Receiver/obj/Release/ReceiverSlice.csprojResolveAssemblyReference.cache
  28. +76 −3 SerialPortComponents/SerialPortSlice/RealTimeEvents.cs
  29. +33 −7 SerialPortComponents/SerialPortSlice/SerialPortService.cs
  30. +3 −0 SerialPortComponents/SerialPortSlice/SerialPortSlice.csproj
  31. BIN SerialPortComponents/SerialPortSlice/bin/Release/EventSlice.dll
  32. BIN SerialPortComponents/SerialPortSlice/bin/Release/EventSlice.pdb
  33. BIN SerialPortComponents/SerialPortSlice/bin/Release/Receiver.dll
  34. BIN SerialPortComponents/SerialPortSlice/bin/Release/Receiver.pdb
  35. +99 −0 SerialPortComponents/SerialPortSlice/bin/Release/SerialPortSlice.XML
  36. BIN SerialPortComponents/SerialPortSlice/bin/Release/SerialPortSlice.dll
  37. BIN SerialPortComponents/SerialPortSlice/bin/Release/SerialPortSlice.pdb
  38. BIN SerialPortComponents/SerialPortSlice/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache
  39. +2 −5 SerialPortComponents/SerialPortSlice/obj/Release/SerialPortSlice.csproj.FileListAbsolute.txt
  40. BIN ...alPortComponents/SerialPortSlice/obj/Release/SerialPortSlice.csprojResolveAssemblyReference.cache
  41. BIN SerialPortComponents/SerialPortSlice/obj/Release/SerialPortSlice.dll
  42. BIN SerialPortComponents/ServerComponents.v11.suo
  43. BIN docs/Help/Documentation.chm
  44. +256 −15 docs/Help/Index.html
  45. +290 −138 docs/Help/LastBuild.log
  46. +140 −16 docs/Help/WebKI.xml
  47. +134 −50 docs/Help/WebTOC.xml
  48. +0 −38 docs/Help/Working/BuildReferenceTopics.proj
  49. +0 −36 docs/Help/Working/EventSlice.XML
  50. +0 −46 docs/Help/Working/GenerateIntermediateTOC.proj
  51. +0 −55 docs/Help/Working/GenerateRefInfo.proj
  52. +0 −131 docs/Help/Working/MRefBuilder.config
  53. +0 −6 docs/Help/Working/MRefBuilder.rsp
  54. +0 −22 docs/Help/Working/Output/HtmlHelp1/html/00df2515-344f-720c-4d40-470038c5177f.htm
  55. +0 −22 docs/Help/Working/Output/HtmlHelp1/html/044dada6-f7e2-0e9b-9306-6b28bdb340b3.htm
  56. +0 −12 docs/Help/Working/Output/HtmlHelp1/html/08696295-7666-eb8e-db19-598d63bdff3b.htm
  57. +0 −16 docs/Help/Working/Output/HtmlHelp1/html/0996ce0e-cae2-dcdd-2d2f-e5950185fab6.htm
  58. +0 −10 docs/Help/Working/Output/HtmlHelp1/html/0b564395-f74b-aa49-d178-6f5a2c98b041.htm
  59. +0 −14 docs/Help/Working/Output/HtmlHelp1/html/0cbfe11a-a292-d661-8acb-fe8d777638a6.htm
  60. +0 −10 docs/Help/Working/Output/HtmlHelp1/html/0dfaaac6-3e29-bf63-566b-31e22bb73bd1.htm
  61. +0 −22 docs/Help/Working/Output/HtmlHelp1/html/0ea08034-9b4d-3507-2a33-1f6636b35686.htm
  62. +0 −10 docs/Help/Working/Output/HtmlHelp1/html/0fc22645-1ab9-bceb-9b0c-ccf8221807b5.htm
  63. +0 −44 docs/Help/Working/Output/HtmlHelp1/html/128ff223-4694-e606-52c0-05e2a06b812c.htm
  64. +0 −22 docs/Help/Working/Output/HtmlHelp1/html/12d53d94-3039-17c6-13a8-69b0ae4a4bb4.htm
  65. +0 −12 docs/Help/Working/Output/HtmlHelp1/html/13453879-9c3c-754f-0973-c6afa54df60e.htm
  66. +0 −32 docs/Help/Working/Output/HtmlHelp1/html/1563e253-e201-0ee8-ba1c-886835b50413.htm
  67. +0 −14 docs/Help/Working/Output/HtmlHelp1/html/171a2441-77cb-5416-56f8-396b4ebecadb.htm
  68. +0 −22 docs/Help/Working/Output/HtmlHelp1/html/1a1938a3-da02-9227-2937-b8e003402b48.htm
  69. +0 −10 docs/Help/Working/Output/HtmlHelp1/html/1ddde719-aee3-22b6-4f8e-cbcb6d013eaf.htm
  70. +0 −12 docs/Help/Working/Output/HtmlHelp1/html/1f144c87-87ed-a3a7-d1b6-f2fa68fbea9e.htm
  71. +0 −10 docs/Help/Working/Output/HtmlHelp1/html/1f8cf854-0de3-c33b-97b8-dd720310e68d.htm
  72. +0 −32 docs/Help/Working/Output/HtmlHelp1/html/218a5403-11b6-f889-5181-d5d30036b1c0.htm
  73. +0 −10 docs/Help/Working/Output/HtmlHelp1/html/218ba5e2-fe5c-f35c-ae39-fb64a114129a.htm
  74. +0 −44 docs/Help/Working/Output/HtmlHelp1/html/2529976b-5605-3440-8429-5f4f3de289a5.htm
  75. +0 −20 docs/Help/Working/Output/HtmlHelp1/html/2d85b6b1-f240-bafc-03c8-d1d01ed2d85d.htm
  76. +0 −40 docs/Help/Working/Output/HtmlHelp1/html/2e30ca23-9598-b902-49e0-90486b7f7b06.htm
  77. +0 −12 docs/Help/Working/Output/HtmlHelp1/html/33f5a2cc-80bd-3d29-7fc9-6de07954a621.htm
  78. +0 −12 docs/Help/Working/Output/HtmlHelp1/html/370c8c1a-6a10-525a-8ce4-05764d62a870.htm
  79. +0 −26 docs/Help/Working/Output/HtmlHelp1/html/3729c5b9-7cbd-fcf3-af81-0857316e8d9b.htm
  80. +0 −24 docs/Help/Working/Output/HtmlHelp1/html/3b1b3dfb-c96a-92e5-84f6-405cf76145a9.htm
  81. +0 −48 docs/Help/Working/Output/HtmlHelp1/html/44e7ea6c-ab59-339a-d7fd-a6bb4c1aac43.htm
  82. +0 −22 docs/Help/Working/Output/HtmlHelp1/html/4ca1a3d5-f517-28c4-44c2-982deb917238.htm
  83. +0 −10 docs/Help/Working/Output/HtmlHelp1/html/4d36520e-6a29-a571-ec4d-2241ccfad121.htm
  84. +0 −15 docs/Help/Working/Output/HtmlHelp1/html/4de49e37-7e6b-b398-3e9f-48a5a36b10ec.htm
  85. +0 −10 docs/Help/Working/Output/HtmlHelp1/html/5235dc9b-b1ae-42d3-8275-8738114f02fb.htm
  86. +0 −10 docs/Help/Working/Output/HtmlHelp1/html/53f0b588-417e-3002-274a-a3972af71320.htm
  87. +0 −16 docs/Help/Working/Output/HtmlHelp1/html/57d68b62-5cd4-d8d5-637d-d2bc7b5eb208.htm
  88. +0 −22 docs/Help/Working/Output/HtmlHelp1/html/5d85c86c-b488-1f74-ecf5-d6888cb64c5c.htm
  89. +0 −16 docs/Help/Working/Output/HtmlHelp1/html/60c72379-4403-5a25-5813-36ff7d3539af.htm
  90. +0 −26 docs/Help/Working/Output/HtmlHelp1/html/62d4b7b8-f6d7-13a8-5a55-40ea2dcd3c88.htm
  91. +0 −18 docs/Help/Working/Output/HtmlHelp1/html/63b56877-13cb-c35e-cdc4-f94f3a8459e9.htm
  92. +0 −10 docs/Help/Working/Output/HtmlHelp1/html/64218f43-ed81-2fa2-a98b-74dd6f15a790.htm
  93. +0 −10 docs/Help/Working/Output/HtmlHelp1/html/690c0dfc-ce35-0066-4d1f-7e5cf1758b48.htm
  94. +0 −15 docs/Help/Working/Output/HtmlHelp1/html/6a443fac-886c-c0f2-ed9e-1b31ced2b2dc.htm
  95. +0 −40 docs/Help/Working/Output/HtmlHelp1/html/6c5c1a44-11b1-97b0-08e8-9f6135a60719.htm
  96. +0 −40 docs/Help/Working/Output/HtmlHelp1/html/6dbf36e8-1606-6a53-525b-cb4598891944.htm
  97. +0 −22 docs/Help/Working/Output/HtmlHelp1/html/6edfe233-8aa6-96a9-de1b-40765efca7ed.htm
  98. +0 −16 docs/Help/Working/Output/HtmlHelp1/html/71379f9e-edde-d6c7-38b6-17bb7c92bc53.htm
  99. +0 −20 docs/Help/Working/Output/HtmlHelp1/html/7335078f-c86a-4896-d350-777e70849b2c.htm
  100. +0 −29 docs/Help/Working/Output/HtmlHelp1/html/74609002-2537-f785-52c2-42c0241d5d7e.htm
  101. +0 −26 docs/Help/Working/Output/HtmlHelp1/html/76df8720-7031-7646-cb0f-50716bad95d8.htm
  102. +0 −16 docs/Help/Working/Output/HtmlHelp1/html/7d3a4c54-4fd5-5b04-add3-5d691bfcbff7.htm
  103. +0 −16 docs/Help/Working/Output/HtmlHelp1/html/7da170a2-a935-c09b-bb29-9098de2e7ce3.htm
  104. +0 −10 docs/Help/Working/Output/HtmlHelp1/html/80003358-22c1-3f1f-b557-28ff5becec75.htm
  105. +0 −13 docs/Help/Working/Output/HtmlHelp1/html/807d9a38-cb16-d2bb-3ca0-35f6217be8d6.htm
  106. +0 −19 docs/Help/Working/Output/HtmlHelp1/html/81077d8c-7f3b-b821-0658-64df42701cc1.htm
  107. +0 −22 docs/Help/Working/Output/HtmlHelp1/html/85be1681-cbc3-de54-6bcf-2e2b608c9a73.htm
  108. +0 −24 docs/Help/Working/Output/HtmlHelp1/html/87ab173e-f838-c13b-46c6-5ce916220980.htm
  109. +0 −16 docs/Help/Working/Output/HtmlHelp1/html/88521c07-ac69-d841-b16c-b75f1e1428a2.htm
  110. +0 −10 docs/Help/Working/Output/HtmlHelp1/html/92390cb8-47e2-4274-c3b5-800373941f1f.htm
  111. +0 −24 docs/Help/Working/Output/HtmlHelp1/html/9542adb5-a90f-14e0-8ed9-a11bcd4e591f.htm
  112. +0 −15 docs/Help/Working/Output/HtmlHelp1/html/96e17908-5b5b-70ed-ee27-1425aa783bd3.htm
  113. +0 −10 docs/Help/Working/Output/HtmlHelp1/html/9a97add8-4a99-7b0a-ca22-1b3b6e8e5537.htm
  114. +0 −10 docs/Help/Working/Output/HtmlHelp1/html/9be18cae-7a79-2cd2-1033-be880d8b92f9.htm
  115. +0 −12 docs/Help/Working/Output/HtmlHelp1/html/9dffc7e5-c99b-3d03-6ef4-53bd379110d0.htm
  116. +0 −27 docs/Help/Working/Output/HtmlHelp1/html/a2932d0a-fe31-cec8-96dc-3b495940b609.htm
  117. +0 −10 docs/Help/Working/Output/HtmlHelp1/html/a4b07f74-b774-5a58-e012-9bea0fb0dc05.htm
  118. +0 −32 docs/Help/Working/Output/HtmlHelp1/html/a51f9a06-2661-f28a-fb6e-bace708f6b2b.htm
  119. +0 −26 docs/Help/Working/Output/HtmlHelp1/html/a5282c5e-9391-4eaf-aea5-88ead50d1d4a.htm
  120. +0 −12 docs/Help/Working/Output/HtmlHelp1/html/a5d1fdfb-d761-7d28-2a00-45f25e4ba61d.htm
  121. +0 −36 docs/Help/Working/Output/HtmlHelp1/html/a78855f1-bb2e-8542-ff0d-f16955e606ad.htm
  122. +0 −26 docs/Help/Working/Output/HtmlHelp1/html/a9f6cfe3-6818-d8a9-0d3e-83f24d92a748.htm
  123. +0 −16 docs/Help/Working/Output/HtmlHelp1/html/ab98d068-6009-0019-a77e-929a93fcafb2.htm
  124. +0 −17 docs/Help/Working/Output/HtmlHelp1/html/ab9dcafa-88c8-30da-0a53-c4ac8ce37884.htm
  125. +0 −16 docs/Help/Working/Output/HtmlHelp1/html/ac12ad37-b6ba-0619-3839-8548c37a8f5f.htm
  126. +0 −22 docs/Help/Working/Output/HtmlHelp1/html/ac5f79a7-a357-9db5-7d2a-a2a1f71c85bc.htm
  127. +0 −10 docs/Help/Working/Output/HtmlHelp1/html/ad6080f0-b9d4-ad86-9aa5-fea1835c8480.htm
  128. +0 −16 docs/Help/Working/Output/HtmlHelp1/html/ae468b2b-3b71-15bc-e285-ceb12f8906ee.htm
  129. +0 −20 docs/Help/Working/Output/HtmlHelp1/html/ae83c066-b23d-6ed2-0d92-1dc3a4c0853a.htm
  130. +0 −39 docs/Help/Working/Output/HtmlHelp1/html/b27984e7-ee1f-06ac-e027-0bebf4e409f5.htm
  131. +0 −10 docs/Help/Working/Output/HtmlHelp1/html/b2dd4a26-c793-1573-21d1-676df94d0ccf.htm
  132. +0 −22 docs/Help/Working/Output/HtmlHelp1/html/b5577089-1a34-c454-53b7-80d4aed1611f.htm
  133. +0 −14 docs/Help/Working/Output/HtmlHelp1/html/b5d960a5-7b46-0170-4189-f0fcf2074d31.htm
  134. +0 −32 docs/Help/Working/Output/HtmlHelp1/html/bbd55b5e-c242-cb18-3a69-cca926fc7d48.htm
Sorry, we could not display the entire diff because too many files (764) changed.
View
14 .gitignore
@@ -0,0 +1,14 @@
+*.dll
+*.exe
+*.~*
+[Oo]bj
+[Bb]in
+*.user
+*.suo
+*.[Cc]ache
+*.bak
+*.ncb
+*.log
+*.DS_Store
+[Tt]humbs.db
+Ankh.NoLoad
View
BIN Modules/ConsoleLogger/bin/Release/ConsoleLogger.dll
Binary file not shown.
View
BIN Modules/ConsoleLogger/bin/Release/EventSlice.dll
Binary file not shown.
View
BIN Modules/ConsoleLogger/obj/Release/ConsoleLogger.dll
Binary file not shown.
View
34 Modules/Database/Database.cs
@@ -7,6 +7,8 @@
using EventSlice;
using MySql.Data.MySqlClient;
using System.Data;
+using ReceiverSlice.RealTimeEvents;
+using Decoder.RealTimeEvents;
namespace Database
{
@@ -17,33 +19,33 @@ public class Database : Module
public Database(Dispatcher dispatcher, string host = "localhost", string db = "csulbsha_sharktopus", string user = "testuser", string pass = "testpass")
:base(dispatcher)
{
- connectionString = "Server=" + host + ";Databse=" + db + ";Uid=" + user + ";Pwd=" + pass + ";";
+ connectionString = "Server=" + host + ";Database=" + db + ";Uid=" + user + ";Pwd=" + pass + ";";
}
public override string getModuleName()
{ return "Database"; }
-
+
public override void onRealTimeEvent(RealTimeEvent realTimeEvent)
{
-
- }
-
- public override void onRealTimeEvent(RealTimeEventDecoded realTimeEvent)
- {
- string eventType = realTimeEvent.messageType;
- string result;
- if (eventType == "detection_event")
- result = detectionInsert(realTimeEvent);
-
+ if(realTimeEvent.GetType() == typeof(Decoder.RealTimeEvents.RealTimeEventDecoded))
+ {
+ RealTimeEventDecoded rte = (RealTimeEventDecoded)realTimeEvent;
+ string eventType = rte.messageType;
+ if (eventType == "detection_event")
+ detectionInsert(rte);
+ }
+ else if(realTimeEvent.GetType() == typeof(ReceiverSlice.RealTimeEvents.NewReceiver))
+ receiverInsert((NewReceiver)realTimeEvent);
}
- private DatabaseResponse receiverInsert(NewReceiver newReceiver)
+ private void receiverInsert(NewReceiver newReceiver)
{
string statement = "INSERT INTO receivers (id) VALUES ('" + newReceiver.serialorsomething + "');");
- return new DatabaseResponse(statement, response);
+ int response = doInsert(statement);
+ dispatcher.enqueueEvent(new DatabaseResponse(statement, response));
}
- private DatabseResponse detectionInsert(RealTimeEventDecoded detection)
+ private void detectionInsert(RealTimeEventDecoded detection)
{
string statement;
if(detection.payload["sensor_value"] == null)
@@ -53,7 +55,7 @@ private DatabseResponse detectionInsert(RealTimeEventDecoded detection)
statement = "INSERT INTO vue (date, time, frequency_codespace, transmitter_id, sensor_value, sensor_unit, receivers_id) VALUES ('" +
detection.payload["date"] + "', '" + detection.payload["time"] + "', '" + detection.payload["frequency_codespace"] + "', " + detection.payload["transmitter_id"] + ", " + detection.payload["sensor_value"] + ", 'm', '" + detection.payload["receivers_id"] + "');";
int response = doInsert(statement);
- return new DatabseResponse(statement, response);
+ dispatcher.enqueueEvent(new DatabaseResponse(statement, response));
}
private int doInsert(string statement)
View
6 Modules/Decoder/RealTimeEvents/DatabaseResponse.cs
@@ -7,10 +7,10 @@
namespace Decoder.RealTimeEvents
{
- class DatabaseResponse: RealTimeEvent
+ public class DatabaseResponse: RealTimeEvent
{
- string sql { get; private set; }
- int response { get; private set; }
+ public string sql { get; private set; }
+ public int response { get; private set; }
public DatabaseResponse(string message, int response)
:base(message)
View
2 Modules/Decoder/RealTimeEvents/RealTimeEventDecoded.cs
@@ -7,7 +7,7 @@
namespace Decoder.RealTimeEvents
{
- class RealTimeEventDecoded: RealTimeEvent
+ public class RealTimeEventDecoded: RealTimeEvent
{
public String undecoded {get; private set;}
public dynamic config {get; private set;}
View
BIN Modules/Decoder/bin/Release/Decoder.dll
Binary file not shown.
View
BIN Modules/Decoder/bin/Release/EventSlice.dll
Binary file not shown.
View
BIN Modules/Decoder/obj/Release/Decoder.dll
Binary file not shown.
View
BIN Modules/Modules.v11.suo
Binary file not shown.
View
3 SerialPortComponents/EventSlice/Intefaces/Module.cs
@@ -17,6 +17,9 @@ public abstract class Module
public abstract string getModuleName();
public virtual void onRealTimeEvent(Interfaces.RealTimeEvent realTimeEvent) { }
+
+ public Module(Dispatcher dispatcher)
+ { this.dispatcher = dispatcher; }
}
View
BIN SerialPortComponents/EventSlice/bin/Release/EventSlice.dll
Binary file not shown.
View
BIN SerialPortComponents/EventSlice/bin/Release/EventSlice.pdb
Binary file not shown.
View
BIN SerialPortComponents/EventSlice/obj/Release/EventSlice.dll
Binary file not shown.
View
BIN SerialPortComponents/EventSlice/obj/Release/EventSlice.pdb
Binary file not shown.
View
11 SerialPortComponents/Receiver/Encoder.cs
@@ -15,10 +15,13 @@ namespace ReceiverSlice
public class Encoder
{
private String prefix; //Will be made to be SSSSSS.P#CC,
+ /// <summary>
+ /// The json configuration object.
+ /// </summary>
public dynamic encoderConfig { get; private set; }
/// <summary>
- /// This constructor uses the command prefix and encoder.<see cref="RealTimeSlice.Receiver"/>
+ /// This constructor uses the command prefix and encoder.
/// </summary>
/// <param name="prefix"> SSSSSS.P#CC where SSSSSS is the serial number of the receiver.</param>
/// <param name="encoderConfig">Configuration containing 'encoder' entries.</param>
@@ -72,7 +75,11 @@ public String build(string command, object[] arguments)
}
}
-
+ /// <summary>
+ /// Determines whether the processed command is valid for the current json configuration (by firmware version)
+ /// </summary>
+ /// <param name="processed_commmand">The command that is being validated</param>
+ /// <returns>True if the processed command is valid for the current json configuration</returns>
public Boolean valid(String processed_commmand)
{
//regexp magic
View
152 SerialPortComponents/Receiver/RealTimeEvents.cs
@@ -4,95 +4,157 @@
using System.Text;
using System.Threading.Tasks;
using EventSlice.Interfaces;
-
+using FridayThe13th;
namespace ReceiverSlice.RealTimeEvents
{
- public class ReceiverEvent
/// <summary>
- /// This event is generated when a VEMCO receiver is configured on a serial port.
- /// As with all RealTime Events, the data is accessible dynamically.
+ /// This abstract class provides the plumbing that every event generated by the Receiver class should
+ /// include... the receiver object, the portName, the serialNumber, the model and the json configuration object
/// </summary>
- public class NewReceiver : RealTimeEvent
+ public abstract class ReceiverEvent : RealTimeEvent
{
/// <summary>
- /// Default constructor.
+ ///
/// </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>
- public NewReceiver(Receiver receiver, string portName, string serialNumber, string model)
- : base("Receiver on " + receiver.portName, null)
+ /// <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;
+ }
+ }
+ /// <summary>
+ /// This event is generated when a VEMCO receiver is configured on a serial port.
+ /// As with all RealTime Events, the data is accessible dynamically.
+ /// </summary>
+ public class NewReceiver : ReceiverEvent
+ {
+ /// <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>
/// This event is generated when a message is received from the VEMCO hardware.
/// </summary>
- public class UnparsedMessage : RealTimeEvent
+ public class UnparsedMessage : ReceiverEvent
{
- private Receiver receiver;
- public String unparsedMessage { get; private set; }
- public dynamic config { get; private set; }
-
- public UnparsedMessage(Receiver receiver, String unparsedMessage, dynamic config)
- : base(unparsedMessage + " from receiver on " + receiver.portName)
+ /// <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.receiver = receiver;
- this.unparsedMessage = unparsedMessage;
- this.config = config;
+ this["unparsedmessage"] = unparsedMessage;
+
}
}
- public class DelReceiver : RealTimeEvent
+ /// <summary>
+ /// Fired when a receiver has been removed from its serial port connnection.
+ /// </summary>
+ public class DelReceiver : ReceiverEvent
{
- Receiver receiver;
- public DelReceiver(Receiver receiver)
- : base("Receiver on " + receiver.portName + " removed.")
+ /// <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 DelReceiver(Receiver receiver, string portName, string serialNumber, string model, FridayThe13th.JsonObject config)
+ : base("Receiver on " + receiver.portName + " unmounted.", receiver, portName, serialNumber, model, config)
{
- this.receiver = receiver;
+
}
}
- public class ExcepReceiver : RealTimeEvent
+ /// <summary>
+ /// This event is generated when the receiver enters into a failure mode. It may or not include an Exception object
+ /// thrown in conjunction.
+ /// </summary>
+ public class ExcepReceiver : ReceiverEvent
{
- Receiver receiver;
- Boolean fatal;
- String text = "";
- public ExcepReceiver(Receiver receiver, Boolean fatal)
- : base("Receiver o " + receiver.portName + " entered exceptional condition. Fatal: " + fatal)
+ /// <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.receiver = receiver;
- this.fatal = fatal;
+ this["fatal"] = fatal;
+ this["note"] = text;
}
- public ExcepReceiver(ReceiverExceptions re)
- : base("Receiver o " + re.receiver.portName + "entered exception condition. Fatal? " + re.fatal +
- " Exception text: " + re.text)
+ /// <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.receiver = re.receiver;
- this.fatal = re.fatal;
- this.text = re.text;
+ this["exception"] = re;
+ this["fatal"] = fatal;
+ this["note"] = re.ToString();
}
}
- public class NoteReceiver : RealTimeEvent
+ /// <summary>
+ /// This class reports an event that may be of interest to the user but for which there is no need to alter
+ /// the flow of the program.
+ /// </summary>
+ public class NoteReceiver : ReceiverEvent
{
- Receiver receiver;
-
- public NoteReceiver(Receiver receiver, String text)
- : base("(" + receiver.portName + ")" + text)
+ /// <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.receiver = receiver;
+ this["note"] = text;
}
}
}
View
80 SerialPortComponents/Receiver/Receiver.cs
@@ -47,7 +47,8 @@ public class Receiver
private TextReader textReader { get; set; }
private int goState = 1;
private int write_wait = 100;
-
+ private String VEMCO_SerialNumber { get; set; }
+ private String VEMCO_Model { get; set; }
/// <summary>
/// Public constructor for the Receiver class.
/// </summary>
@@ -69,6 +70,8 @@ public Receiver(SerialPort serialPort, String portName, Dispatcher dispatcher)
this.portName = portName;
this.dispatcher = dispatcher;
+
+
serialPort.Open();
encoder = null;
init();
@@ -82,15 +85,17 @@ public Receiver(SerialPort serialPort, String portName, Dispatcher dispatcher)
Thread.Sleep(500);
while (serialPort.BytesToRead > 0)
{
- dispatcher.enqueueEvent(new RealTimeEvents.NoteReceiver(this, "(receiver note) Read: " + serialPort.ReadExisting()));
+ dispatcher.enqueueEvent(new RealTimeEvents.NoteReceiver("Read: " + serialPort.ReadExisting(),
+ this, this.portName, this.VEMCO_SerialNumber, this.VEMCO_Model, this.encoder.encoderConfig));
}
run();
- dispatcher.enqueueEvent(new RealTimeEvents.NewReceiver(this));
+ dispatcher.enqueueEvent(new RealTimeEvents.NewReceiver(this, this.portName, this.VEMCO_SerialNumber, this.VEMCO_Model, this.encoder.encoderConfig));
}
else
{
- ReceiverExceptions re = new ReceiverExceptions(this, "(receiver fatal) Failed to configure encoder during init().", true);
- dispatcher.enqueueEvent(new RealTimeEvents.ExcepReceiver(re));
+ ReceiverExceptions re = new ReceiverExceptions(this, "(FATAL) Failed to configure encoder during init().", true);
+ dispatcher.enqueueEvent(new RealTimeEvents.ExcepReceiver(re,re.fatal,
+ this, this.portName, this.VEMCO_SerialNumber, this.VEMCO_Model, this.encoder.encoderConfig));
serialPort.Close();
throw re;
}
@@ -126,13 +131,10 @@ public void init()
Dictionary<Int32, String> infoMethods = new Dictionary<Int32, String>();
String discoveryReturns = "";
-
var jsonParser = new JsonParser() { CamelizeProperties = false };
foreach (string filename in System.IO.Directory.GetFiles(VR2C_COMMAND_FOLDER))
{
-
-
dynamic config = jsonParser.Parse(System.IO.File.ReadAllText(filename));
var dc = config.discovery_commands;
var fwver = config.firmware_version;
@@ -142,6 +144,12 @@ public void init()
}
catch(Exception e)
{
+ ReceiverExceptions re = new ReceiverExceptions(this, "INFO command not found in " +
+ "configuration file: " + filename + ". This is normally not fatal on its own but " +
+ "indicates a serious problem with the format/content of the config file.",
+ false,e);
+ dispatcher.enqueueEvent(new RealTimeEvents.ExcepReceiver(re.fatal, re.ToString(),
+ this, this.portName, null, null, null));
}
try
@@ -150,7 +158,12 @@ public void init()
}
catch (Exception e)
{
-
+ ReceiverExceptions re = new ReceiverExceptions(this, "Discovery commands not found in " +
+ "configuration file: " + filename + ". This is normally not fatal on its own but " +
+ "indicates a serious problem with the format/content of the config file.",
+ false, e);
+ dispatcher.enqueueEvent(new RealTimeEvents.ExcepReceiver(re.fatal, re.text,
+ this, this.portName, null, null, null));
}
@@ -179,8 +192,9 @@ public void init()
}
if (discovery_attempts >= 5)
{
- ReceiverExceptions re = new ReceiverExceptions(this, "(receiver note) Not able to discover VEMCO receiver attached on this port.", true);
- dispatcher.enqueueEvent(new RealTimeEvents.ExcepReceiver(re));
+ ReceiverExceptions re = new ReceiverExceptions(this, "Not able to discover VEMCO receiver attached on this port.", true);
+ dispatcher.enqueueEvent(new RealTimeEvents.ExcepReceiver(re,re.fatal,
+ this, this.portName, null,null, null));
serialPort.Close();
throw re;
}
@@ -192,8 +206,11 @@ public void init()
string commandPreamble = discoveryReturns.Substring(0, 12) + ",";
- dispatcher.enqueueEvent(new RealTimeEvents.NoteReceiver(this, "(receiver note) command preamble: " + discoveryReturns.Substring(0,12) + ","));
- dispatcher.enqueueEvent(new RealTimeEvents.NoteReceiver(this, "(receiver note) read: " + discoveryReturns));
+ this.VEMCO_SerialNumber = discoveryReturns.Substring(1,6);
+ dispatcher.enqueueEvent(new RealTimeEvents.NoteReceiver("command preamble: " + discoveryReturns.Substring(0,12) + ",",
+ this, this.portName, this.VEMCO_SerialNumber, null, null));
+ dispatcher.enqueueEvent(new RealTimeEvents.NoteReceiver("read: " + discoveryReturns,
+ this, this.portName, this.VEMCO_SerialNumber, null, null));
infoMethods.Add(-1, commandPreamble + "INFO");
int info_attempts = 0;
@@ -210,7 +227,8 @@ public void init()
{
foreach (String infoc in infoMethods.Values)
{
- dispatcher.enqueueEvent(new RealTimeEvents.NoteReceiver(this, "(receiver note) attempting INFO command with " + infoc));
+ dispatcher.enqueueEvent(new RealTimeEvents.NoteReceiver("(receiver note) attempting INFO command with " + infoc,
+ this, this.portName, this.VEMCO_SerialNumber, null, null));
_write(infoc);
Thread.Sleep(500);
}
@@ -240,16 +258,18 @@ public void init()
}
if (read_attempts >= 5)
{
- ReceiverExceptions re = new ReceiverExceptions(this, "(receiver fatal) Not able to get INFO from the VEMCO receiver attached on this port.", true);
- dispatcher.enqueueEvent(new RealTimeEvents.ExcepReceiver(re));
+ ReceiverExceptions re = new ReceiverExceptions(this, "(FATAL) Not able to get INFO from the VEMCO receiver attached on this port.", true);
+ dispatcher.enqueueEvent(new RealTimeEvents.ExcepReceiver(re, re.fatal,
+ this, this.portName, this.VEMCO_SerialNumber, null, null));
serialPort.Close();
throw re;
}
int RECEIVER_FW_VERSION = -1;
if (infoReturns != "")
{
-
+ //!!! Need a method to read the model.
+ this.VEMCO_Model = null;
int fw_start = infoReturns.IndexOf("FW=");
int fw_end = infoReturns.IndexOf(",", fw_start);
string fw_ver = infoReturns.Substring((fw_start + 3), (fw_end - fw_start - 3));
@@ -260,7 +280,8 @@ public void init()
string release = fw_ver.Substring(fw_ver_secondperiod + 1, (fw_ver.Length - fw_ver_secondperiod - 1));
RECEIVER_FW_VERSION = (Int32.Parse(major) * 10000) + (Int32.Parse(minor) * 100) + (Int32.Parse(release));
}
- dispatcher.enqueueEvent(new RealTimeEvents.NoteReceiver(this,"(receiver note) detected firmware version: " + RECEIVER_FW_VERSION));
+ dispatcher.enqueueEvent(new RealTimeEvents.NoteReceiver("Detected firmware version: " + RECEIVER_FW_VERSION,
+ this, this.portName, this.VEMCO_SerialNumber, this.VEMCO_Model, null));
if (RECEIVER_FW_VERSION >= 0)
{
int fw_use = -1;
@@ -280,20 +301,23 @@ public void init()
}
if (fw_use < 0 || encoder == null)
{
- ReceiverExceptions re = new ReceiverExceptions(this, "(receiver fatal) Unable to parse out FW version from return from INFO command.", true);
- dispatcher.enqueueEvent(new RealTimeEvents.ExcepReceiver(re));
+ ReceiverExceptions re = new ReceiverExceptions(this, "(FATAL) Unable to parse out FW version from return from INFO command.", true);
+ dispatcher.enqueueEvent(new RealTimeEvents.ExcepReceiver(re, re.fatal,
+ this, this.portName, this.VEMCO_SerialNumber, null, null));
serialPort.Close();
throw re;
}
}
else
{
- ReceiverExceptions re = new ReceiverExceptions(this, "(receiver fatal) Unable to parse out FW version from return from INFO command.", true);
- dispatcher.enqueueEvent(new RealTimeEvents.ExcepReceiver(re));
+ ReceiverExceptions re = new ReceiverExceptions(this, "(FATAL) Unable to parse out FW version from return from INFO command.", true);
+ dispatcher.enqueueEvent(new RealTimeEvents.ExcepReceiver(re,re.fatal,
+ this, this.portName, this.VEMCO_SerialNumber, null, null));
serialPort.Close();
throw re;
}
- dispatcher.enqueueEvent(new RealTimeEvents.NoteReceiver(this, "(receiver note) Successfully configured encoder with fw version = " + encoder.encoderConfig.firmware_version));
+ dispatcher.enqueueEvent(new RealTimeEvents.NoteReceiver("(receiver note) Successfully configured encoder with fw version = " + encoder.encoderConfig.firmware_version,
+ this, this.portName, this.VEMCO_SerialNumber, this.VEMCO_Model, this.encoder.encoderConfig));
}
/// <summary>
@@ -351,13 +375,13 @@ public void shutdown()
if (goState == -1)
{
- dispatcher.enqueueEvent(new RealTimeEvents.DelReceiver(this));
+ dispatcher.enqueueEvent(new RealTimeEvents.DelReceiver(this, this.portName, this.VEMCO_SerialNumber, this.VEMCO_Model, this.encoder.encoderConfig));
serialPort.Close();
return;
}
Thread.Sleep(500);
}
- dispatcher.enqueueEvent(new RealTimeEvents.DelReceiver(this));
+ dispatcher.enqueueEvent(new RealTimeEvents.DelReceiver(this, this.portName, this.VEMCO_SerialNumber, this.VEMCO_Model, this.encoder.encoderConfig));
serialPort.Close();
}
@@ -383,15 +407,17 @@ public void shutdown()
{
EndOfStreamException eose = new EndOfStreamException();
ReceiverExceptions re = new ReceiverExceptions(this,"End of stream reached on serial port.",true,eose);
- dispatcher.enqueueEvent(new RealTimeEvents.ExcepReceiver(re));
+ dispatcher.enqueueEvent(new RealTimeEvents.ExcepReceiver(re, re.fatal,
+ this, this.portName, this.VEMCO_SerialNumber, this.VEMCO_Model, this.encoder.encoderConfig));
throw re;
}
ret += buffer[0];
}
if (ret.Length > 1)
{
- dispatcher.enqueueEvent(new RealTimeEvents.UnparsedMessage(this, ret, encoder.encoderConfig));
+ dispatcher.enqueueEvent(new RealTimeEvents.UnparsedMessage(ret,
+ this, this.portName, this.VEMCO_SerialNumber, this.VEMCO_Model, this.encoder.encoderConfig));
}
}
goState = -1;
View
62 SerialPortComponents/Receiver/ReceiverExceptions.cs
@@ -6,13 +6,34 @@
namespace ReceiverSlice
{
+ /// <summary>
+ /// Faults occuring in the Receiver may create and throw this class.
+ /// </summary>
public class ReceiverExceptions: Exception
{
+ /// <summary>
+ /// Set to true if the fault requires the serial port to be closed.
+ /// </summary>
public Boolean fatal {get; private set;}
+ /// <summary>
+ /// Reason for failure (human readable)
+ /// </summary>
public string text { get; private set; }
+ /// <summary>
+ /// The Receiver object associated with the VEMCO hardware.
+ /// </summary>
public Receiver receiver { get; private set; }
+ /// <summary>
+ /// The Exception precding this exception.
+ /// </summary>
public Exception originatingException { get; private set; }
+ /// <summary>
+ /// Generated for faults that occur without a prior exception being generated.
+ /// </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>
public ReceiverExceptions(Receiver receiver, string text, Boolean fatal)
{
this.fatal = fatal;
@@ -21,6 +42,13 @@ public ReceiverExceptions(Receiver receiver, string text, Boolean fatal)
this.originatingException = null;
}
+ /// <summary>
+ /// Generated for faults that occur with an associating exception.
+ /// </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="originatingException">The Exception precding this exception.</param>
public ReceiverExceptions(Receiver receiver, string text, Boolean fatal, Exception originatingException)
{
this.fatal = fatal;
@@ -29,22 +57,52 @@ public ReceiverExceptions(Receiver receiver, string text, Boolean fatal, Excepti
this.originatingException = originatingException;
}
-
+ /// <summary>
+ /// stringifys the event
+ /// </summary>
+ /// <returns>string</returns>
+ public override string ToString()
+ {
+ return "(FATAL? " + fatal + ")" + this.text;
+ }
}
+ /// <summary>
+ /// Generated when an encoder object enters a fault mode.
+ /// </summary>
public class EncoderExceptions : Exception
{
+ /// <summary>
+ /// Reason for the error.
+ /// </summary>
public string text { get; private set; }
+ /// <summary>
+ /// Exception resulting from fault (may or may not be present)
+ /// </summary>
public Exception e { get; private set; }
+ /// <summary>
+ /// The serial number of the device generating this exception.
+ /// </summary>
public string deviceSerial { get; private set; }
+ /// <summary>
+ /// Error without exception.
+ /// </summary>
+ /// <param name="commandPrefix">The prefix that incudes the serial number of the device.</param>
+ /// <param name="text">The reason this event is being generated.</param>
public EncoderExceptions(string commandPrefix, string text)
{
this.deviceSerial = commandPrefix.Substring(1, 8);
- this.text = text;
+ this.text = "Encoder error: " + text;
this.e = null;
}
+ /// <summary>
+ /// error with exception
+ /// </summary>
+ /// <param name="commandPrefix">The prefix that incudes the serial number of the device.</param>
+ /// <param name="text">The reason this event is being generated.</param>
+ /// <param name="e">Exception preceding this exception.</param>
public EncoderExceptions(string commandPrefix, string text, Exception e)
{
this.deviceSerial = commandPrefix.Substring(1, 8);
View
BIN SerialPortComponents/Receiver/bin/Release/EventSlice.dll
Binary file not shown.
View
BIN SerialPortComponents/Receiver/bin/Release/EventSlice.pdb
Binary file not shown.
View
205 SerialPortComponents/Receiver/bin/Release/Receiver.XML
@@ -14,7 +14,7 @@
</member>
<member name="M:ReceiverSlice.Encoder.#ctor(System.String,System.Object)">
<summary>
- This constructor uses the command prefix and encoder.<see cref="!:RealTimeSlice.Receiver"/>
+ This constructor uses the command prefix and encoder.
</summary>
<param name="prefix"> SSSSSS.P#CC where SSSSSS is the serial number of the receiver.</param>
<param name="encoderConfig">Configuration containing 'encoder' entries.</param>
@@ -36,6 +36,209 @@
<param name="arguments">The parameters required to complete the build.</param>
<returns>This is a wrapper to the build(string,object) method.</returns>
</member>
+ <member name="M:ReceiverSlice.Encoder.valid(System.String)">
+ <summary>
+ Determines whether the processed command is valid for the current json configuration (by firmware version)
+ </summary>
+ <param name="processed_commmand">The command that is being validated</param>
+ <returns>True if the processed command is valid for the current json configuration</returns>
+ </member>
+ <member name="P:ReceiverSlice.Encoder.encoderConfig">
+ <summary>
+ The json configuration object.
+ </summary>
+ </member>
+ <member name="T:ReceiverSlice.RealTimeEvents.ReceiverEvent">
+ <summary>
+ This abstract class provides the plumbing that every event generated by the Receiver class should
+ include... the receiver object, the portName, the serialNumber, the model and the json configuration object
+ </summary>
+ </member>
+ <member name="M:ReceiverSlice.RealTimeEvents.ReceiverEvent.#ctor(System.String,ReceiverSlice.Receiver,System.String,System.String,System.String,FridayThe13th.JsonObject)">
+ <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>
+ </member>
+ <member name="T:ReceiverSlice.RealTimeEvents.NewReceiver">
+ <summary>
+ This event is generated when a VEMCO receiver is configured on a serial port.
+ As with all RealTime Events, the data is accessible dynamically.
+ </summary>
+ </member>
+ <member name="M:ReceiverSlice.RealTimeEvents.NewReceiver.#ctor(ReceiverSlice.Receiver,System.String,System.String,System.String,FridayThe13th.JsonObject)">
+ <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>
+ </member>
+ <member name="T:ReceiverSlice.RealTimeEvents.UnparsedMessage">
+ <summary>
+ This event is generated when a message is received from the VEMCO hardware.
+ </summary>
+ </member>
+ <member name="M:ReceiverSlice.RealTimeEvents.UnparsedMessage.#ctor(System.String,ReceiverSlice.Receiver,System.String,System.String,System.String,FridayThe13th.JsonObject)">
+ <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>
+ </member>
+ <member name="T:ReceiverSlice.RealTimeEvents.DelReceiver">
+ <summary>
+ Fired when a receiver has been removed from its serial port connnection.
+ </summary>
+ </member>
+ <member name="M:ReceiverSlice.RealTimeEvents.DelReceiver.#ctor(ReceiverSlice.Receiver,System.String,System.String,System.String,FridayThe13th.JsonObject)">
+ <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>
+ </member>
+ <member name="T:ReceiverSlice.RealTimeEvents.ExcepReceiver">
+ <summary>
+ This event is generated when the receiver enters into a failure mode. It may or not include an Exception object
+ thrown in conjunction.
+ </summary>
+ </member>
+ <member name="M:ReceiverSlice.RealTimeEvents.ExcepReceiver.#ctor(System.Boolean,System.String,ReceiverSlice.Receiver,System.String,System.String,System.String,FridayThe13th.JsonObject)">
+ <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>
+ </member>
+ <member name="M:ReceiverSlice.RealTimeEvents.ExcepReceiver.#ctor(System.Exception,System.Boolean,ReceiverSlice.Receiver,System.String,System.String,System.String,FridayThe13th.JsonObject)">
+ <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>
+ </member>
+ <member name="T:ReceiverSlice.RealTimeEvents.NoteReceiver">
+ <summary>
+ This class reports an event that may be of interest to the user but for which there is no need to alter
+ the flow of the program.
+ </summary>
+ </member>
+ <member name="M:ReceiverSlice.RealTimeEvents.NoteReceiver.#ctor(System.String,ReceiverSlice.Receiver,System.String,System.String,System.String,FridayThe13th.JsonObject)">
+ <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>
+ </member>
+ <member name="T:ReceiverSlice.ReceiverExceptions">
+ <summary>
+ Faults occuring in the Receiver may create and throw this class.
+ </summary>
+ </member>
+ <member name="M:ReceiverSlice.ReceiverExceptions.#ctor(ReceiverSlice.Receiver,System.String,System.Boolean)">
+ <summary>
+ Generated for faults that occur without a prior exception being generated.
+ </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>
+ </member>
+ <member name="M:ReceiverSlice.ReceiverExceptions.#ctor(ReceiverSlice.Receiver,System.String,System.Boolean,System.Exception)">
+ <summary>
+ Generated for faults that occur with an associating exception.
+ </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="originatingException">The Exception precding this exception.</param>
+ </member>
+ <member name="M:ReceiverSlice.ReceiverExceptions.ToString">
+ <summary>
+ stringifys the event
+ </summary>
+ <returns>string</returns>
+ </member>
+ <member name="P:ReceiverSlice.ReceiverExceptions.fatal">
+ <summary>
+ Set to true if the fault requires the serial port to be closed.
+ </summary>
+ </member>
+ <member name="P:ReceiverSlice.ReceiverExceptions.text">
+ <summary>
+ Reason for failure (human readable)
+ </summary>
+ </member>
+ <member name="P:ReceiverSlice.ReceiverExceptions.receiver">
+ <summary>
+ The Receiver object associated with the VEMCO hardware.
+ </summary>
+ </member>
+ <member name="P:ReceiverSlice.ReceiverExceptions.originatingException">
+ <summary>
+ The Exception precding this exception.
+ </summary>
+ </member>
+ <member name="T:ReceiverSlice.EncoderExceptions">
+ <summary>
+ Generated when an encoder object enters a fault mode.
+ </summary>
+ </member>
+ <member name="M:ReceiverSlice.EncoderExceptions.#ctor(System.String,System.String)">
+ <summary>
+ Error without exception.
+ </summary>
+ <param name="commandPrefix">The prefix that incudes the serial number of the device.</param>
+ <param name="text">The reason this event is being generated.</param>
+ </member>
+ <member name="M:ReceiverSlice.EncoderExceptions.#ctor(System.String,System.String,System.Exception)">
+ <summary>
+ error with exception
+ </summary>
+ <param name="commandPrefix">The prefix that incudes the serial number of the device.</param>
+ <param name="text">The reason this event is being generated.</param>
+ <param name="e">Exception preceding this exception.</param>
+ </member>
+ <member name="P:ReceiverSlice.EncoderExceptions.text">
+ <summary>
+ Reason for the error.
+ </summary>
+ </member>
+ <member name="P:ReceiverSlice.EncoderExceptions.e">
+ <summary>
+ Exception resulting from fault (may or may not be present)
+ </summary>
+ </member>
+ <member name="P:ReceiverSlice.EncoderExceptions.deviceSerial">
+ <summary>
+ The serial number of the device generating this exception.
+ </summary>
+ </member>
<member name="T:ReceiverSlice.Receiver">
<summary>
This class encompasses the functionality required to connect to and communicate with a VR2C
View
BIN SerialPortComponents/Receiver/bin/Release/Receiver.dll
Binary file not shown.
View
BIN SerialPortComponents/Receiver/bin/Release/Receiver.pdb
Binary file not shown.
View
BIN SerialPortComponents/Receiver/obj/Release/Receiver.dll
Binary file not shown.
View
BIN SerialPortComponents/Receiver/obj/Release/ReceiverSlice.csprojResolveAssemblyReference.cache
Binary file not shown.
View
79 SerialPortComponents/SerialPortSlice/RealTimeEvents.cs
@@ -6,27 +6,100 @@
using EventSlice.Interfaces;
namespace SerialPortSlice.RealTimeEvents
{
- class ServerStartUp : RealTimeEvent
+ /// <summary>
+ /// This provides a convenient base class for events generated by the Serial Port Manager.
+ /// </summary>
+ /// <remarks>
+ /// At the time of writing, this class simply passes null as the originating event as
+ /// all events from this manager will be original with no preceding event that needs
+ /// to be registered.
+ /// </remarks>
+ public abstract class ServerRealTimeEvents : RealTimeEvent
{
+ /// <summary>
+ /// Default constructor.
+ /// </summary>
+ /// <param name="message">The human readable reason for the event being generated.</param>
+ public ServerRealTimeEvents(string message)
+ :base(message, null)
+ {
+ }
+ }
+
+ /// <summary>
+ /// ServerStartUp fires when... well the server starts up and is ready to look for VEMCO receivers attached
+ /// via a serial port.
+ /// </summary>
+ public class ServerStartUp : ServerRealTimeEvents
+ {
+ /// <summary>
+ /// Default constructor.
+ /// </summary>
public ServerStartUp()
: base("Serial port servicer starting.")
{
}
}
- class ServerStop : RealTimeEvent
+ /// <summary>
+ /// ServerStop fires when the server is no longer looking for receivers but may still have configured
+ /// receivers that have not been removed (and may still be reading data).
+ /// </summary>
+ public class ServerStop : ServerRealTimeEvents
{
+ /// <summary>
+ /// Default constructor.
+ /// </summary>
public ServerStop()
: base("Serial port servicer stopping.")
{
}
}
- class ServerStopped : RealTimeEvent
+ /// <summary>
+ /// This event fires when the server has stopped listening for new receivers and has
+ /// also removed all configured receivers from the service (no more data is being read from the hardware)
+ /// </summary>
+ /// <remarks>
+ /// At the time of writing, we anticipate that this should be the last event that the system sends before
+ /// the process dies.
+ /// </remarks>
+ public class ServerStopped : ServerRealTimeEvents
{
+ /// <summary>
+ /// Default constructor.
+ /// </summary>
public ServerStopped()
: base("Serial port servicer stopped.")
{
}
}
+
+ /// <summary>
+ /// Server Exceptions are generated by the Serial Port Servicer when a fault mode is entered.
+ /// </summary>
+ public class ServerException : ServerRealTimeEvents
+ {
+ /// <summary>
+ /// Constructor for server error occuring without a corresponding exception.
+ /// </summary>
+ /// <param name="reason">The reason this exception was generated.</param>
+ /// <param name="fatal">Set to true if the error forces the server to shutdown or restart.</param>
+ public ServerException(string reason, Boolean fatal)
+ :base("Server Error (fatal?" + fatal + "): " + reason)
+ {
+ this["fatal"] = fatal;
+ }
+
+ /// <summary>
+ ///Constructor for server exception with the corresponding exception available.
+ /// </summary>
+ /// <param name="originatingException">The corresponding exception</param>
+ /// <param name="fatal">Set to true if the error forces the server to shutdown or restart</param>
+ public ServerException(Exception originatingException, Boolean fatal)
+ :base("Server Exception (fatal?" + fatal + "): " + originatingException.ToString())
+ {
+ this["fatal"] = fatal;
+ }
+ }
}
View
40 SerialPortComponents/SerialPortSlice/SerialPortService.cs
@@ -33,6 +33,10 @@ private SerialPortService()
}
+ /// <summary>
+ /// The Serial Port Service is a singleton.
+ /// </summary>
+ /// <returns>A static reference to the singleton SerialPortService</returns>
public static SerialPortService getServicer()
{
if (iam == null)
@@ -43,6 +47,9 @@ public static SerialPortService getServicer()
return iam;
}
+ /// <summary>
+ /// Instructs the service to begin listening for VEMCO receivers attached to serial ports.
+ /// </summary>
public void run()
{
if (serviceThread == null)
@@ -55,9 +62,23 @@ public void run()
dispatcher.enqueueEvent(new RealTimeEvents.ServerStartUp());
}
+ /// <summary>
+ /// Instructs the service to stop listening for receivers and to unmount any receivers running.
+ /// </summary>
+ /// <remarks>
+ /// This method allows each receiver several seconds (2.5 at the time of writing) to shutdown before
+ /// simply being forced off. In the intervening period, data may be received from the serial port
+ /// and events subsequently dispatched.
+ /// </remarks>
public void stop()
{
+
dispatcher.enqueueEvent(new RealTimeEvents.ServerStop());
+
+ foreach (Receiver r in receivers.Values.ToList<Receiver>())
+ {
+ r.shutdown();
+ }
if (serviceThread != null && serviceThread.IsAlive)
{
int waitTimeForShutdown = receivers.Count;
@@ -75,10 +96,16 @@ public void stop()
serviceThread.Abort();
serviceThread = null;
}
+
dispatcher.enqueueEvent(new RealTimeEvents.ServerStopped());
dispatcher.stop();
}
+
+ /// <summary>
+ /// This is the primary service loop which executes in its own thread. It is started by run()
+ /// and is destroyed by shutdown().
+ /// </summary>
private void serialPortsService()
{
serviceTime = 1000;
@@ -95,13 +122,10 @@ private void serialPortsService()
Receiver r = new Receiver(availableCOMPort, c, dispatcher);
receivers.Add(c, r);
}
- catch (ReceiverExceptions re)
- {
- //!!!TODO
- }
+
catch (Exception e)
{
-
+ dispatcher.enqueueEvent(new RealTimeEvents.ServerException(e, false));
}
}
@@ -118,7 +142,8 @@ private void serialPortsService()
Receiver tbr;
if (receivers.TryGetValue(r, out tbr))
{
- dispatcher.enqueueEvent(new ReceiverSlice.RealTimeEvents.DelReceiver(tbr));
+ dispatcher.enqueueEvent(new ReceiverSlice.RealTimeEvents.DelReceiver(
+ tbr, tbr.portName, null, null, null));
}
receivers.Remove(r);
}
@@ -133,7 +158,8 @@ private void serialPortsService()
if (r.TTL <= 0)
{
receivers.Remove(r.portName);
- dispatcher.enqueueEvent(new ReceiverSlice.RealTimeEvents.DelReceiver(r));
+ dispatcher.enqueueEvent(new ReceiverSlice.RealTimeEvents.DelReceiver(
+ r, r.portName, null, null, null));
}
}
Thread.Sleep(serviceTime);
View
3 SerialPortComponents/SerialPortSlice/SerialPortSlice.csproj
@@ -34,6 +34,9 @@
<Reference Include="EventSlice">
<HintPath>F:\cecs491\SerialPortComponents\EventSlice\obj\Release\EventSlice.dll</HintPath>
</Reference>
+ <Reference Include="FridayThe13th">
+ <HintPath>F:\FridayThe13th\FridayThe13th\obj\Debug\FridayThe13th.dll</HintPath>
+ </Reference>
<Reference Include="Receiver">
<HintPath>..\Receiver\obj\Release\Receiver.dll</HintPath>
</Reference>
View
BIN SerialPortComponents/SerialPortSlice/bin/Release/EventSlice.dll
Binary file not shown.
View
BIN SerialPortComponents/SerialPortSlice/bin/Release/EventSlice.pdb
Binary file not shown.
View
BIN SerialPortComponents/SerialPortSlice/bin/Release/Receiver.dll
Binary file not shown.
View
BIN SerialPortComponents/SerialPortSlice/bin/Release/Receiver.pdb
Binary file not shown.
View
99 SerialPortComponents/SerialPortSlice/bin/Release/SerialPortSlice.XML
@@ -4,6 +4,78 @@
<name>SerialPortSlice</name>
</assembly>
<members>
+ <member name="T:SerialPortSlice.RealTimeEvents.ServerRealTimeEvents">
+ <summary>
+ This provides a convenient base class for events generated by the Serial Port Manager.
+ </summary>
+ <remarks>
+ At the time of writing, this class simply passes null as the originating event as
+ all events from this manager will be original with no preceding event that needs
+ to be registered.
+ </remarks>
+ </member>
+ <member name="M:SerialPortSlice.RealTimeEvents.ServerRealTimeEvents.#ctor(System.String)">
+ <summary>
+ Default constructor.
+ </summary>
+ <param name="message">The human readable reason for the event being generated.</param>
+ </member>
+ <member name="T:SerialPortSlice.RealTimeEvents.ServerStartUp">
+ <summary>
+ ServerStartUp fires when... well the server starts up and is ready to look for VEMCO receivers attached
+ via a serial port.
+ </summary>
+ </member>
+ <member name="M:SerialPortSlice.RealTimeEvents.ServerStartUp.#ctor">
+ <summary>
+ Default constructor.
+ </summary>
+ </member>
+ <member name="T:SerialPortSlice.RealTimeEvents.ServerStop">
+ <summary>
+ ServerStop fires when the server is no longer looking for receivers but may still have configured
+ receivers that have not been removed (and may still be reading data).
+ </summary>
+ </member>
+ <member name="M:SerialPortSlice.RealTimeEvents.ServerStop.#ctor">
+ <summary>
+ Default constructor.
+ </summary>
+ </member>
+ <member name="T:SerialPortSlice.RealTimeEvents.ServerStopped">
+ <summary>
+ This event fires when the server has stopped listening for new receivers and has
+ also removed all configured receivers from the service (no more data is being read from the hardware)
+ </summary>
+ <remarks>
+ At the time of writing, we anticipate that this should be the last event that the system sends before
+ the process dies.
+ </remarks>
+ </member>
+ <member name="M:SerialPortSlice.RealTimeEvents.ServerStopped.#ctor">
+ <summary>
+ Default constructor.
+ </summary>
+ </member>
+ <member name="T:SerialPortSlice.RealTimeEvents.ServerException">
+ <summary>
+ Server Exceptions are generated by the Serial Port Servicer when a fault mode is entered.
+ </summary>
+ </member>
+ <member name="M:SerialPortSlice.RealTimeEvents.ServerException.#ctor(System.String,System.Boolean)">
+ <summary>
+ Constructor for server error occuring without a corresponding exception.
+ </summary>
+ <param name="reason">The reason this exception was generated.</param>
+ <param name="fatal">Set to true if the error forces the server to shutdown or restart.</param>
+ </member>
+ <member name="M:SerialPortSlice.RealTimeEvents.ServerException.#ctor(System.Exception,System.Boolean)">
+ <summary>
+ Constructor for server exception with the corresponding exception available.
+ </summary>
+ <param name="originatingException">The corresponding exception</param>
+ <param name="fatal">Set to true if the error forces the server to shutdown or restart</param>
+ </member>
<member name="T:SerialPortSlice.SerialPortService">
<summary>
This class monitors the system for changes in the serial port enumeration (new or removed serial ports).
@@ -12,5 +84,32 @@
is removed from the service.
</summary>
</member>
+ <member name="M:SerialPortSlice.SerialPortService.getServicer">
+ <summary>
+ The Serial Port Service is a singleton.
+ </summary>
+ <returns>A static reference to the singleton SerialPortService</returns>
+ </member>
+ <member name="M:SerialPortSlice.SerialPortService.run">
+ <summary>
+ Instructs the service to begin listening for VEMCO receivers attached to serial ports.
+ </summary>
+ </member>
+ <member name="M:SerialPortSlice.SerialPortService.stop">
+ <summary>
+ Instructs the service to stop listening for receivers and to unmount any receivers running.
+ </summary>
+ <remarks>
+ This method allows each receiver several seconds (2.5 at the time of writing) to shutdown before
+ simply being forced off. In the intervening period, data may be received from the serial port
+ and events subsequently dispatched.
+ </remarks>
+ </member>
+ <member name="M:SerialPortSlice.SerialPortService.serialPortsService">
+ <summary>
+ This is the primary service loop which executes in its own thread. It is started by run()
+ and is destroyed by shutdown().
+ </summary>
+ </member>
</members>
</doc>
View
BIN SerialPortComponents/SerialPortSlice/bin/Release/SerialPortSlice.dll
Binary file not shown.
View
BIN SerialPortComponents/SerialPortSlice/bin/Release/SerialPortSlice.pdb
Binary file not shown.
View
BIN ...PortComponents/SerialPortSlice/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache
Binary file not shown.
View
7 SerialPortComponents/SerialPortSlice/obj/Release/SerialPortSlice.csproj.FileListAbsolute.txt
@@ -13,10 +13,7 @@ C:\Users\Derek\cecs491\SerialPortComponents\SerialPortSlice\bin\Release\Receiver
C:\Users\Derek\cecs491\SerialPortComponents\SerialPortSlice\obj\Release\SerialPortSlice.csprojResolveAssemblyReference.cache
C:\Users\Derek\cecs491\SerialPortComponents\SerialPortSlice\obj\Release\SerialPortSlice.dll
C:\Users\Derek\cecs491\SerialPortComponents\SerialPortSlice\obj\Release\SerialPortSlice.pdb
-<<<<<<< HEAD
C:\Users\Derek\cecs491\SerialPortComponents\SerialPortSlice\bin\Release\Receiver.pdb
-=======
-<<<<<<< .merge_file_IOnjn4
+\\VBOXSVR\src\cecs491\SerialPortComponents\SerialPortSlice\bin\Release\FridayThe13th.dll
+\\VBOXSVR\src\cecs491\SerialPortComponents\SerialPortSlice\bin\Release\FridayThe13th.pdb
\\VBOXSVR\src\cecs491\SerialPortComponents\SerialPortSlice\bin\Release\SerialPortSlice.XML
->>>>>>> .merge_file_dE5PVX
->>>>>>> service
View
BIN ...mponents/SerialPortSlice/obj/Release/SerialPortSlice.csprojResolveAssemblyReference.cache
Binary file not shown.
View
BIN SerialPortComponents/SerialPortSlice/obj/Release/SerialPortSlice.dll
Binary file not shown.
View
BIN SerialPortComponents/ServerComponents.v11.suo
Binary file not shown.
View
BIN docs/Help/Documentation.chm
Binary file not shown.
View
271 docs/Help/Index.html
@@ -96,7 +96,7 @@
<img src="Item.gif"/><a class="UnselectedNode" onclick="javascript: return SelectNode(this);" href="html/171a2441-77cb-5416-56f8-396b4ebecadb.htm" target="TopicContent">Module Members</a>
</div>
<div class="TreeItem">
-<img src="Item.gif"/><a class="UnselectedNode" onclick="javascript: return SelectNode(this);" href="html/64218f43-ed81-2fa2-a98b-74dd6f15a790.htm" target="TopicContent">Module Constructor </a>
+<img src="Item.gif"/><a class="UnselectedNode" onclick="javascript: return SelectNode(this);" href="html/2368f824-8ee6-7836-ccc6-635cee12fc01.htm" target="TopicContent">Module Constructor </a>
</div>
<div class="TreeNode">
<img class="TreeNodeImg" onclick="javascript: Toggle(this);" src="Collapsed.gif"/><a class="UnselectedNode" onclick="javascript: return Expand(this);" href="html/bfd1985f-bbf0-745c-f15d-1a980156979b.htm" target="TopicContent">Module Methods</a>
@@ -165,14 +165,65 @@
<img src="Item.gif"/><a class="UnselectedNode" onclick="javascript: return SelectNode(this);" href="html/ab98d068-6009-0019-a77e-929a93fcafb2.htm" target="TopicContent">RealTimeEvent Members</a>
</div>
<div class="TreeItem">
-<img src="Item.gif"/><a class="UnselectedNode" onclick="javascript: return SelectNode(this);" href="html/f7858f15-bbba-8aa2-eaf2-7d124ebc2594.htm" target="TopicContent">RealTimeEvent Constructor </a>
+<img src="Item.gif"/><a class="UnselectedNode" onclick="javascript: return SelectNode(this);" href="html/81fb4ea5-1ec8-3a9d-8325-670585bb7508.htm" target="TopicContent">RealTimeEvent Constructor </a>
+</div>
+<div class="TreeNode">
+<img class="TreeNodeImg" onclick="javascript: Toggle(this);" src="Collapsed.gif"/><a class="UnselectedNode" onclick="javascript: return Expand(this);" href="html/c8081fbd-e8fa-aed5-aace-58e6c6bed551.htm" target="TopicContent">RealTimeEvent Fields</a>
+<div class="Hidden">
+<div class="TreeItem">
+<img src="Item.gif"/><a class="UnselectedNode" onclick="javascript: return SelectNode(this);" href="html/77c9249f-a206-be03-4d2a-bf9dec1dcb09.htm" target="TopicContent">_thisDict Field</a>
+</div>
+</div>
</div>
<div class="TreeNode">
<img class="TreeNodeImg" onclick="javascript: Toggle(this);" src="Collapsed.gif"/><a class="UnselectedNode" onclick="javascript: return Expand(this);" href="html/cbfad7d2-9d31-7df1-b3d9-dbbdd08f2103.htm" target="TopicContent">RealTimeEvent Methods</a>
<div class="Hidden">
<div class="TreeItem">
+<img src="Item.gif"/><a class="UnselectedNode" onclick="javascript: return SelectNode(this);" href="html/2aef3627-e138-da91-7f17-83ac26511aff.htm" target="TopicContent">Add Method </a>
+</div>
+<div class="TreeItem">
+<img src="Item.gif"/><a class="UnselectedNode" onclick="javascript: return SelectNode(this);" href="html/7993b4a9-7cf6-744d-db09-b062a0326ed4.htm" target="TopicContent">NotifyPropertyChanged Method </a>
+</div>
+<div class="TreeItem">
+<img src="Item.gif"/><a class="UnselectedNode" onclick="javascript: return SelectNode(this);" href="html/0254e664-3e62-f1cc-e958-1afdcd4a6d60.htm" target="TopicContent">Remove Method </a>
+</div>
+<div class="TreeItem">
+<img src="Item.gif"/><a class="UnselectedNode" onclick="javascript: return SelectNode(this);" href="html/6d53a436-367b-7979-9dbc-6328cfc5a907.htm" target="TopicContent">RemoveAll Method </a>
+</div>
+<div class="TreeItem">
<img src="Item.gif"/><a class="UnselectedNode" onclick="javascript: return SelectNode(this);" href="html/08696295-7666-eb8e-db19-598d63bdff3b.htm" target="TopicContent">ToString Method </a>
</div>
+<div class="TreeItem">
+<img src="Item.gif"/><a class="UnselectedNode" onclick="javascript: return SelectNode(this);" href="html/03815229-8f0a-f000-faa4-6d73e6a42088.htm" target="TopicContent">TryGetMember Method </a>
+</div>
+<div class="TreeItem">
+<img src="Item.gif"/><a class="UnselectedNode" onclick="javascript: return SelectNode(this);" href="html/b3160879-b36b-2d82-f0d7-588dbcfaefa8.htm" target="TopicContent">TrySetMember Method </a>
+</div>
+</div>
+</div>
+<div class="TreeNode">
+<img class="TreeNodeImg" onclick="javascript: Toggle(this);" src="Collapsed.gif"/><a class="UnselectedNode" onclick="javascript: return Expand(this);" href="html/48c15c1a-fc56-19ed-df8d-7e9a1bc2a132.htm" target="TopicContent">RealTimeEvent Properties</a>
+<div class="Hidden">
+<div class="TreeItem">
+<img src="Item.gif"/><a class="UnselectedNode" onclick="javascript: return SelectNode(this);" href="html/e754ebbf-3a10-e26b-d0bd-e615bbe0ff19.htm" target="TopicContent">IsEmpty Property </a>
+</div>
+<div class="TreeItem">
+<img src="Item.gif"/><a class="UnselectedNode" onclick="javascript: return SelectNode(this);" href="html/53e0b016-ce3d-174b-1489-16cf4fdbb6bb.htm" target="TopicContent">Item Property </a>
+</div>
+<div class="TreeItem">
+<img src="Item.gif"/><a class="UnselectedNode" onclick="javascript: return SelectNode(this);" href="html/6c00a09b-3390-126e-046f-8a485693ad46.htm" target="TopicContent">Keys Property </a>
+</div>
+<div class="TreeItem">
+<img src="Item.gif"/><a class="UnselectedNode" onclick="javascript: return SelectNode(this);" href="html/007b5d14-abb3-6995-5960-2ea70b4272b0.htm" target="TopicContent">Values Property </a>
+</div>
+</div>
+</div>
+<div class="TreeNode">
+<img class="TreeNodeImg" onclick="javascript: Toggle(this);" src="Collapsed.gif"/><a class="UnselectedNode" onclick="javascript: return Expand(this);" href="html/bc95fae1-7007-ccb3-1b68-158288d7871c.htm" target="TopicContent">RealTimeEvent Events</a>
+<div class="Hidden">
+<div class="TreeItem">
+<img src="Item.gif"/><a class="UnselectedNode" onclick="javascript: return SelectNode(this);" href="html/b961a391-0699-2829-5c04-c708b1b72277.htm" target="TopicContent">PropertyChanged Event</a>
+</div>
</div>
</div>
</div>
@@ -323,8 +374,13 @@
</div>
</div>
</div>
+<div class="TreeNode">
+<img class="TreeNodeImg" onclick="javascript: Toggle(this);" src="Collapsed.gif"/><a class="UnselectedNode" onclick="javascript: return Expand(this);" href="html/690c0dfc-ce35-0066-4d1f-7e5cf1758b48.htm" target="TopicContent">ReceiverExceptions Methods</a>
+<div class="Hidden">
<div class="TreeItem">
-<img src="Item.gif"/><a class="UnselectedNode" onclick="javascript: return SelectNode(this);" href="html/690c0dfc-ce35-0066-4d1f-7e5cf1758b48.htm" target="TopicContent">ReceiverExceptions Methods</a>
+<img src="Item.gif"/><a class="UnselectedNode" onclick="javascript: return SelectNode(this);" href="html/8dd30aee-5214-9ffa-1ded-d854d3d7ab81.htm" target="TopicContent">ToString Method </a>
+</div>
+</div>
</div>
<div class="TreeNode">
<img class="TreeNodeImg" onclick="javascript: Toggle(this);" src="Collapsed.gif"/><a class="UnselectedNode" onclick="javascript: return Expand(this);" href="html/ec1d7ed4-9c32-847f-3943-c06af6dd7df6.htm" target="TopicContent">ReceiverExceptions Properties</a>
@@ -360,11 +416,20 @@
<img src="Item.gif"/><a class="UnselectedNode" onclick="javascript: return SelectNode(this);" href="html/33f5a2cc-80bd-3d29-7fc9-6de07954a621.htm" target="TopicContent">DelReceiver Members</a>
</div>
<div class="TreeItem">
-<img src="Item.gif"/><a class="UnselectedNode" onclick="javascript: return SelectNode(this);" href="html/3b1b3dfb-c96a-92e5-84f6-405cf76145a9.htm" target="TopicContent">DelReceiver Constructor </a>
+<img src="Item.gif"/><a class="UnselectedNode" onclick="javascript: return SelectNode(this);" href="html/014b9c13-b94d-fa65-bca4-b66783c8afea.htm" target="TopicContent">DelReceiver Constructor </a>
+</div>
+<div class="TreeItem">
+<img src="Item.gif"/><a class="UnselectedNode" onclick="javascript: return SelectNode(this);" href="html/33f05717-44b9-b1ad-4a01-9ce524c7cb00.htm" target="TopicContent">DelReceiver Fields</a>
</div>
<div class="TreeItem">
<img src="Item.gif"/><a class="UnselectedNode" onclick="javascript: return SelectNode(this);" href="html/5235dc9b-b1ae-42d3-8275-8738114f02fb.htm" target="TopicContent">DelReceiver Methods</a>
</div>
+<div class="TreeItem">
+<img src="Item.gif"/><a class="UnselectedNode" onclick="javascript: return SelectNode(this);" href="html/fedfb5ac-8887-f323-1dda-bade0e3795e6.htm" target="TopicContent">DelReceiver Properties</a>
+</div>
+<div class="TreeItem">
+<img src="Item.gif"/><a class="UnselectedNode" onclick="javascript: return SelectNode(this);" href="html/91486cb6-d3f3-d711-b120-47455ec66c43.htm" target="TopicContent">DelReceiver Events</a>
+</div>
</div>
</div>
<div class="TreeNode">
@@ -377,16 +442,25 @@
<img class="TreeNodeImg" onclick="javascript: Toggle(this);" src="Collapsed.gif"/><a class="UnselectedNode" onclick="javascript: return Expand(this);" href="html/f701503a-f73c-316f-339c-39d10cdfadd1.htm" target="TopicContent">ExcepReceiver Constructor </a>
<div class="Hidden">
<div class="TreeItem">
-<img src="Item.gif"/><a class="UnselectedNode" onclick="javascript: return SelectNode(this);" href="html/9542adb5-a90f-14e0-8ed9-a11bcd4e591f.htm" target="TopicContent">ExcepReceiver Constructor (ReceiverExceptions)</a>
+<img src="Item.gif"/><a class="UnselectedNode" onclick="javascript: return SelectNode(this);" href="html/21efd8db-bf20-4b13-5980-6f72c772fe79.htm" target="TopicContent">ExcepReceiver Constructor (Boolean, String, Receiver, String, String, String, )</a>
</div>
<div class="TreeItem">
-<img src="Item.gif"/><a class="UnselectedNode" onclick="javascript: return SelectNode(this);" href="html/218a5403-11b6-f889-5181-d5d30036b1c0.htm" target="TopicContent">ExcepReceiver Constructor (Receiver, Boolean)</a>
+<img src="Item.gif"/><a class="UnselectedNode" onclick="javascript: return SelectNode(this);" href="html/338cf9e4-c68d-9b81-2752-70383497d0a8.htm" target="TopicContent">ExcepReceiver Constructor (Exception, Boolean, Receiver, String, String, String, )</a>
+</div>
</div>
</div>
+<div class="TreeItem">
+<img src="Item.gif"/><a class="UnselectedNode" onclick="javascript: return SelectNode(this);" href="html/2df14b8a-66bd-597a-7f97-b48fe53b2ad8.htm" target="TopicContent">ExcepReceiver Fields</a>
</div>
<div class="TreeItem">
<img src="Item.gif"/><a class="UnselectedNode" onclick="javascript: return SelectNode(this);" href="html/a4b07f74-b774-5a58-e012-9bea0fb0dc05.htm" target="TopicContent">ExcepReceiver Methods</a>
</div>
+<div class="TreeItem">
+<img src="Item.gif"/><a class="UnselectedNode" onclick="javascript: return SelectNode(this);" href="html/a3b0ccb3-cd76-8c48-9f37-50ce91d7798d.htm" target="TopicContent">ExcepReceiver Properties</a>
+</div>
+<div class="TreeItem">
+<img src="Item.gif"/><a class="UnselectedNode" onclick="javascript: return SelectNode(this);" href="html/da3c2173-93a2-3ed1-9958-8d4df15e0760.htm" target="TopicContent">ExcepReceiver Events</a>
+</div>
</div>
</div>
<div class="TreeNode">
@@ -396,11 +470,20 @@
<img src="Item.gif"/><a class="UnselectedNode" onclick="javascript: return SelectNode(this);" href="html/9dffc7e5-c99b-3d03-6ef4-53bd379110d0.htm" target="TopicContent">NewReceiver Members</a>
</div>
<div class="TreeItem">
-<img src="Item.gif"/><a class="UnselectedNode" onclick="javascript: return SelectNode(this);" href="html/bfa86faf-0d01-61ed-454c-6e199f3dcbb1.htm" target="TopicContent">NewReceiver Constructor </a>
+<img src="Item.gif"/><a class="UnselectedNode" onclick="javascript: return SelectNode(this);" href="html/fdb9c5ce-fdf8-3c6b-9d7b-c43584b3495d.htm" target="TopicContent">NewReceiver Constructor </a>
+</div>
+<div class="TreeItem">
+<img src="Item.gif"/><a class="UnselectedNode" onclick="javascript: return SelectNode(this);" href="html/ce56d796-78dd-acf2-8876-25649a1f2360.htm" target="TopicContent">NewReceiver Fields</a>
</div>
<div class="TreeItem">
<img src="Item.gif"/><a class="UnselectedNode" onclick="javascript: return SelectNode(this);" href="html/0dfaaac6-3e29-bf63-566b-31e22bb73bd1.htm" target="TopicContent">NewReceiver Methods</a>
</div>
+<div class="TreeItem">
+<img src="Item.gif"/><a class="UnselectedNode" onclick="javascript: return SelectNode(this);" href="html/dc5db16b-f6c2-e8c0-6246-c1b73c53665e.htm" target="TopicContent">NewReceiver Properties</a>
+</div>
+<div class="TreeItem">
+<img src="Item.gif"/><a class="UnselectedNode" onclick="javascript: return SelectNode(this);" href="html/b830754a-664f-45f6-06db-52491b98def4.htm" target="TopicContent">NewReceiver Events</a>
+</div>
</div>
</div>
<div class="TreeNode">
@@ -410,35 +493,65 @@
<img src="Item.gif"/><a class="UnselectedNode" onclick="javascript: return SelectNode(this);" href="html/13453879-9c3c-754f-0973-c6afa54df60e.htm" target="TopicContent">NoteReceiver Members</a>
</div>
<div class="TreeItem">
-<img src="Item.gif"/><a class="UnselectedNode" onclick="javascript: return SelectNode(this);" href="html/a51f9a06-2661-f28a-fb6e-bace708f6b2b.htm" target="TopicContent">NoteReceiver Constructor </a>
+<img src="Item.gif"/><a class="UnselectedNode" onclick="javascript: return SelectNode(this);" href="html/ce196767-90c7-5985-5c14-3d14cfa2ba2e.htm" target="TopicContent">NoteReceiver Constructor </a>
+</div>
+<div class="TreeItem">
+<img src="Item.gif"/><a class="UnselectedNode" onclick="javascript: return SelectNode(this);" href="html/cf8a0232-716d-0b36-5e21-0d5520af011e.htm" target="TopicContent">NoteReceiver Fields</a>
</div>
<div class="TreeItem">
<img src="Item.gif"/><a class="UnselectedNode" onclick="javascript: return SelectNode(this);" href="html/0b564395-f74b-aa49-d178-6f5a2c98b041.htm" target="TopicContent">NoteReceiver Methods</a>
</div>
+<div class="TreeItem">
+<img src="Item.gif"/><a class="UnselectedNode" onclick="javascript: return SelectNode(this);" href="html/dfb12127-c987-4a9c-d1d5-5556889d7f36.htm" target="TopicContent">NoteReceiver Properties</a>
+</div>
+<div class="TreeItem">
+<img src="Item.gif"/><a class="UnselectedNode" onclick="javascript: return SelectNode(this);" href="html/c5d8de08-3b9c-e616-720e-c790c278db5b.htm" target="TopicContent">NoteReceiver Events</a>
+</div>
</div>
</div>
<div class="TreeNode">
-<img class="TreeNodeImg" onclick="javascript: Toggle(this);" src="Collapsed.gif"/><a class="UnselectedNode" onclick="javascript: return Expand(this);" href="html/dfdb2de3-4307-5ba9-af34-1953f8d8219a.htm" target="TopicContent">UnparsedMessage Class</a>
+<img class="TreeNodeImg" onclick="javascript: Toggle(this);" src="Collapsed.gif"/><a class="UnselectedNode" onclick="javascript: return Expand(this);" href="html/752d4e1f-09f1-1e5e-b443-57b49ea269ad.htm" target="TopicContent">ReceiverEvent Class</a>
<div class="Hidden">
<div class="TreeItem">
-<img src="Item.gif"/><a class="UnselectedNode" onclick="javascript: return SelectNode(this);" href="html/b5d960a5-7b46-0170-4189-f0fcf2074d31.htm" target="TopicContent">UnparsedMessage Members</a>
+<img src="Item.gif"/><a class="UnselectedNode" onclick="javascript: return SelectNode(this);" href="html/27805f30-cf8c-bba2-55a2-d58b2f428778.htm" target="TopicContent">ReceiverEvent Members</a>
</div>
<div class="TreeItem">
-<img src="Item.gif"/><a class="UnselectedNode" onclick="javascript: return SelectNode(this);" href="html/cd5e9d6e-c349-7eef-43e5-f6bba2421245.htm" target="TopicContent">UnparsedMessage Constructor </a>
+<img src="Item.gif"/><a class="UnselectedNode" onclick="javascript: return SelectNode(this);" href="html/dffaefe5-9340-26d0-68e7-b1f42ebbe5ac.htm" target="TopicContent">ReceiverEvent Constructor </a>
</div>
<div class="TreeItem">
-<img src="Item.gif"/><a class="UnselectedNode" onclick="javascript: return SelectNode(this);" href="html/dc0854f3-41d4-4536-a040-4f5f8c2f5a27.htm" target="TopicContent">UnparsedMessage Methods</a>
+<img src="Item.gif"/><a class="UnselectedNode" onclick="javascript: return SelectNode(this);" href="html/ca370d8f-d74e-d507-19fe-a2c6e4890986.htm" target="TopicContent">ReceiverEvent Fields</a>
+</div>
+<div class="TreeItem">
+<img src="Item.gif"/><a class="UnselectedNode" onclick="javascript: return SelectNode(this);" href="html/fe1dbec2-d2a5-380c-ef6d-892e59444e59.htm" target="TopicContent">ReceiverEvent Methods</a>
+</div>
+<div class="TreeItem">
+<img src="Item.gif"/><a class="UnselectedNode" onclick="javascript: return SelectNode(this);" href="html/e7f245cb-d4d9-51ba-cb3c-7e35f81f3927.htm" target="TopicContent">ReceiverEvent Properties</a>
+</div>
+<div class="TreeItem">
+<img src="Item.gif"/><a class="UnselectedNode" onclick="javascript: return SelectNode(this);" href="html/6f4565b1-226a-12c6-0d72-05bebc257b0e.htm" target="TopicContent">ReceiverEvent Events</a>
+</div>
+</div>
</div>
<div class="TreeNode">
-<img class="TreeNodeImg" onclick="javascript: Toggle(this);" src="Collapsed.gif"/><a class="UnselectedNode" onclick="javascript: return Expand(this);" href="html/1ddde719-aee3-22b6-4f8e-cbcb6d013eaf.htm" target="TopicContent">UnparsedMessage Properties</a>
+<img class="TreeNodeImg" onclick="javascript: Toggle(this);" src="Collapsed.gif"/><a class="UnselectedNode" onclick="javascript: return Expand(this);" href="html/dfdb2de3-4307-5ba9-af34-1953f8d8219a.htm" target="TopicContent">UnparsedMessage Class</a>
<div class="Hidden">
<div class="TreeItem">
-<img src="Item.gif"/><a class="UnselectedNode" onclick="javascript: return SelectNode(this);" href="html/044dada6-f7e2-0e9b-9306-6b28bdb340b3.htm" target="TopicContent">config Property </a>
+<img src="Item.gif"/><a class="UnselectedNode" onclick="javascript: return SelectNode(this);" href="html/b5d960a5-7b46-0170-4189-f0fcf2074d31.htm" target="TopicContent">UnparsedMessage Members</a>
</div>
<div class="TreeItem">
-<img src="Item.gif"/><a class="UnselectedNode" onclick="javascript: return SelectNode(this);" href="html/eccd74c0-86d2-8476-5200-0d8990305716.htm" target="TopicContent">unparsedMessage Property </a>
+<img src="Item.gif"/><a class="UnselectedNode" onclick="javascript: return SelectNode(this);" href="html/1aa8575d-376e-0f57-af63-2e29452f966c.htm" target="TopicContent">UnparsedMessage Constructor </a>
</div>
+<div class="TreeItem">
+<img src="Item.gif"/><a class="UnselectedNode" onclick="javascript: return SelectNode(this);" href="html/eddf50d8-aee3-b6c1-fe8a-ebdbc671c32d.htm" target="TopicContent">UnparsedMessage Fields</a>
+</div>
+<div class="TreeItem">
+<img src="Item.gif"/><a class="UnselectedNode" onclick="javascript: return SelectNode(this);" href="html/dc0854f3-41d4-4536-a040-4f5f8c2f5a27.htm" target="TopicContent">UnparsedMessage Methods</a>
+</div>
+<div class="TreeItem">
+<img src="Item.gif"/><a class="UnselectedNode" onclick="javascript: return SelectNode(this);" href="html/1ddde719-aee3-22b6-4f8e-cbcb6d013eaf.htm" target="TopicContent">UnparsedMessage Properties</a>
</div>
+<div class="TreeItem">
+<img src="Item.gif"/><a class="UnselectedNode" onclick="javascript: return SelectNode(this);" href="html/19cddf9f-9f32-e5bc-1ac2-36cee8dd6bc6.htm" target="TopicContent">UnparsedMessage Events</a>
</div>
</div>
</div>
@@ -471,6 +584,134 @@
</div>
</div>
</div>
+<div class="TreeNode">
+<img class="TreeNodeImg" onclick="javascript: Toggle(this);" src="Collapsed.gif"/><a class="UnselectedNode" onclick="javascript: return Expand(this);" href="html/eb538cf3-efb4-5fe0-7eab-cd01f531ee8e.htm" target="TopicContent">SerialPortSlice.RealTimeEvents Namespace</a>
+<div class="Hidden">
+<div class="TreeNode">
+<img class="TreeNodeImg" onclick="javascript: Toggle(this);" src="Collapsed.gif"/><a class="UnselectedNode" onclick="javascript: return Expand(this);" href="html/15091cc6-856b-a255-35d0-232acef45d58.htm" target="TopicContent">ServerException Class</a>
+<div class="Hidden">
+<div class="TreeItem">
+<img src="Item.gif"/><a class="UnselectedNode" onclick="javascript: return SelectNode(this);" href="html/ae07ecd1-b35f-be81-d109-efe328b03946.htm" target="TopicContent">ServerException Members</a>
+</div>
+<div class="TreeNode">
+<img class="TreeNodeImg" onclick="javascript: Toggle(this);" src="Collapsed.gif"/><a class="UnselectedNode" onclick="javascript: return Expand(this);" href="html/749197f4-348a-5f40-f13d-e55253f9937e.htm" target="TopicContent">ServerException Constructor </a>
+<div class="Hidden">
+<div class="TreeItem">
+<img src="Item.gif"/><a class="UnselectedNode" onclick="javascript: return SelectNode(this);" href="html/b778dc69-0806-2d5c-e78f-1d98c30131ba.htm" target="TopicContent">ServerException Constructor (Exception, Boolean)</a>
+</div>
+<div class="TreeItem">
+<img src="Item.gif"/><a class="UnselectedNode" onclick="javascript: return SelectNode(this);" href="html/6c558ed6-d469-ccbf-a660-9c674f47c257.htm" target="TopicContent">ServerException Constructor (String, Boolean)</a>
+</div>
+</div>
+</div>
+<div class="TreeItem">
+<img src="Item.gif"/><a class="UnselectedNode" onclick="javascript: return SelectNode(this);" href="html/4bd9cab2-b930-be3d-d791-c17d51201036.htm" target="TopicContent">ServerException Fields</a>
+</div>
+<div class="TreeItem">
+<img src="Item.gif"/><a class="UnselectedNode" onclick="javascript: return SelectNode(this);" href="html/4dfb557f-22c5-efac-9a47-e4f5328b2919.htm" target="TopicContent">ServerException Methods</a>
+</div>
+<div class="TreeItem">
+<img src="Item.gif"/><a class="UnselectedNode" onclick="javascript: return SelectNode(this);" href="html/c32d0250-81d9-03b8-0103-0d75f488cd4b.htm" target="TopicContent">ServerException Properties</a>
+</div>
+<div class="TreeItem">
+<img src="Item.gif"/><a class="UnselectedNode" onclick="javascript: return SelectNode(this);" href="html/ca2c2379-c924-f9a0-6769-6c2ae0fe5bf2.htm" targe