aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.PMR/ITangoMessage.cs
diff options
context:
space:
mode:
authorRoy <roy.mail.net@gmail.com>2018-01-03 01:57:58 +0200
committerRoy <roy.mail.net@gmail.com>2018-01-03 01:57:58 +0200
commit63b2a192ba12f8239668b6818db4ad02db68dbbc (patch)
treec9c1de011b38fbff94ce87ac2771667b9a3e773d /Software/Visual_Studio/Tango.PMR/ITangoMessage.cs
parentf917366c405a4308b4b60e30eb1bd0dcf880532c (diff)
downloadTango-63b2a192ba12f8239668b6818db4ad02db68dbbc.tar.gz
Tango-63b2a192ba12f8239668b6818db4ad02db68dbbc.zip
Implemented abstraction of message encoding/decoding by adding another layer of "Encoders" to Transporters.
Diffstat (limited to 'Software/Visual_Studio/Tango.PMR/ITangoMessage.cs')
-rw-r--r--Software/Visual_Studio/Tango.PMR/ITangoMessage.cs34
1 files changed, 34 insertions, 0 deletions
diff --git a/Software/Visual_Studio/Tango.PMR/ITangoMessage.cs b/Software/Visual_Studio/Tango.PMR/ITangoMessage.cs
new file mode 100644
index 000000000..90b33a6bb
--- /dev/null
+++ b/Software/Visual_Studio/Tango.PMR/ITangoMessage.cs
@@ -0,0 +1,34 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.PMR.Common;
+
+namespace Tango.PMR
+{
+ public interface ITangoMessage
+ {
+ /// <summary>
+ /// Gets the container that will encapsulate the actual PMR message.
+ /// </summary>
+ MessageContainer Container { get; }
+
+ /// <summary>
+ /// Gets or sets the PMR message type.
+ /// </summary>
+ MessageType Type { get; set; }
+
+ /// <summary>
+ /// Serializes the Tango message to byte array.
+ /// </summary>
+ /// <returns></returns>
+ byte[] ToBytes();
+
+ /// <summary>
+ /// Serializes the Tango message to byte array representing a serialized JSON object of this Tango message.
+ /// </summary>
+ /// <returns></returns>
+ byte[] ToJsonBytes();
+ }
+}