26 lines
745 B
C#
26 lines
745 B
C#
namespace RoboidControl {
|
|
|
|
/// <summary>
|
|
/// Root structure for all communcation messages
|
|
/// </summary>
|
|
public class IMessage {
|
|
public IMessage() { }
|
|
|
|
/// <summary>
|
|
/// Create a message for receiving
|
|
/// </summary>
|
|
/// <param name="buffer">The byte array to parse</param>
|
|
public IMessage(byte[] buffer) {
|
|
//Deserialize(buffer);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Serialize the message into a byte array for sending
|
|
/// </summary>
|
|
/// <param name="buffer">The buffer to serilize into</param>
|
|
/// <returns>The length of the message in the buffer</returns>
|
|
public virtual byte Serialize(ref byte[] buffer) { return 0; }
|
|
}
|
|
|
|
}
|