Beispiel #1
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);
 }
Beispiel #2
0
 public Receiver(Header header)
 {
     sourceGuidPrefix = header.guidPrefix;
     sourceVersion = header.version;
     sourceVendorId = header.vendorId;
     haveTimestamp = false;
 }
Beispiel #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();
 }
Beispiel #4
0
 public static Header GetHeader(this IoBuffer buffer)
 {
     Header obj = new Header();
     buffer.GetHeader(ref obj);
     return obj;
 }