Пример #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();
 }