示例#1
0
 public Receiver(Header header)
     : this()
 {
     sourceGuidPrefix = header.GuidPrefix;
     sourceVersion = header.Version;
     throw new KeyNotFoundException("See page 35, unicast and multicast initialization");
 }
示例#2
0
 public static void PutHeader(this IoBuffer buffer, Header msg)
 {
     buffer.PutProtocolId(msg.Protocol);
     buffer.PutProtocolVersion(msg.Version);
     buffer.PutVendorId(msg.VendorId);
     buffer.PutGuidPrefix(msg.GuidPrefix);
 }
示例#3
0
 public static void GetHeader(this IoBuffer buffer, ref Header obj)
 {
     ProtocolId protocol = buffer.GetProtocolId();
     if (!protocol.Equals(ProtocolId.PROTOCOL_RTPS))
     {
         throw new ApplicationException("Wrong Protocol ID. Expected RTPS");
     }
     ProtocolVersion version = buffer.GetProtocolVersion();
     if (!version.Equals(ProtocolVersion.PROTOCOLVERSION))
     {
         throw new ApplicationException("Wrong Protocol version. Expected " + ProtocolVersion.PROTOCOLVERSION);
     }
     obj.VendorId = buffer.GetVendorId();
     obj.GuidPrefix = buffer.GetGuidPrefix();
 }
示例#4
0
 public static Header GetHeader(this IoBuffer buffer)
 {
     Header obj = new Header();
     buffer.GetHeader(ref obj);
     return obj;
 }
示例#5
0
 public Message()
 {
     header = new Header();
 }