internal static void CopyOut(v_livelinessPolicyI_s from, ref LivelinessQosPolicy to)
        {
            if (to == null)
            {
                to = new LivelinessQosPolicy();
            }

            to.Kind = (LivelinessQosPolicyKind)from.v.kind;
            DurationMarshaler.CopyOut(from.v.lease_duration, ref to.LeaseDuration);
        }
        internal static int countErrors(LivelinessQosPolicy o)
        {
            int errorCount = 0;

            if (o.Kind > LivelinessQosPolicyKind.ManualByTopicLivelinessQos)
            {
                errorCount++;
            }
            errorCount += countErrors(o.LeaseDuration);
            return(errorCount);
        }
 internal static DDS.ReturnCode CopyIn(LivelinessQosPolicy from, ref v_livelinessPolicyI_s to)
 {
     DDS.ReturnCode result = DDS.ReturnCode.Ok;
     if (from != null)
     {
         to.v.kind = (V_LIVELINESSKIND)from.Kind;
         result    = DurationMarshaler.CopyIn(from.LeaseDuration, ref to.v.lease_duration);
     }
     else
     {
         result = DDS.ReturnCode.BadParameter;
         ReportStack.Report(result, "LivelinessQosPolicy attribute may not be a null pointer.");
     }
     return(result);
 }
        internal static void CopyOut(IntPtr from, ref LivelinessQosPolicy to, int offset)
        {
        	if (to == null) to = new LivelinessQosPolicy();
        	
            to.Kind = (LivelinessQosPolicyKind)
                BaseMarshaler.ReadInt32(from, offset + offset_kind);

            to.LeaseDuration = BaseMarshaler.ReadDuration(from, offset + offset_lease_duration);
        }
 internal void CopyOut(ref LivelinessQosPolicy to)
 {
     CopyOut(GapiPtr, ref to, 0);
 }
 internal static DDS.ReturnCode CopyIn(LivelinessQosPolicy from, IntPtr to, int offset)
 {
     DDS.ReturnCode result = DDS.ReturnCode.Ok;
     if (from != null) {
         BaseMarshaler.Write(to, offset + offset_kind, (int)from.Kind);
         BaseMarshaler.Write(to, offset + offset_lease_duration, from.LeaseDuration);
     } else {
         result = DDS.ReturnCode.BadParameter;
         DDS.OpenSplice.OS.Report(
                 DDS.OpenSplice.ReportType.OS_ERROR,
                 "DDS.OpenSplice.CustomMarshalers.LivelinessQosPolicyMarshaler.CopyIn",
                 "DDS/OpenSplice/CustomMarshalers/QosContainedMarshalers.cs",
                 DDS.ErrorCode.InvalidValue,
                 "LivelinessQosPolicy attribute may not be a null pointer.");
     }
     return result; 
 }
 internal DDS.ReturnCode CopyIn(LivelinessQosPolicy from)
 {
     cleanupRequired = true;
     return CopyIn(from, GapiPtr, 0);
 }
示例#8
0
 public ModifiableLivelinessQosPolicy CopyFrom(LivelinessQosPolicy other)
 {
     return new ModifiableLivelinessQosPolicyImpl (other.GetKind(),other.GetLeaseDuration()
         ,other.GetBootstrap());
 }
示例#9
0
 public ModifiableLivelinessQosPolicyImpl(LivelinessQosPolicy qos)
     : base(qos.GetKind(),qos.GetLeaseDuration(),qos.GetBootstrap())
 {
 }