aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.PMR/ITangoMessage.cs
blob: 90b33a6bb81a3502f3a07af31e53f55513f2d622 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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();
    }
}