예제 #1
0
 internal static DDS.ReturnCode CopyIn(
     DDS.OfferedIncompatibleQosStatus from,
     IntPtr to,
     int offset)
 {
     DDS.ReturnCode result = DDS.ReturnCode.Ok;
     if (from != null)
     {
         Write(to, offset_total_count, from.TotalCount);
         Write(to, offset_total_count_change, from.TotalCountChange);
         Write(to, offset_last_policy_id, (int)from.LastPolicyId);
         result = QosPolicyCountSequenceMarshaler.CopyIn(from.Policies, to, offset_policies);
     }
     else
     {
         result = DDS.ReturnCode.BadParameter;
         DDS.OpenSplice.OS.Report(
             DDS.OpenSplice.ReportType.OS_ERROR,
             "DDS.OpenSplice.CustomMarshalers.OfferedIncompatibleQosStatusMarshaler.CopyIn",
             "DDS/OpenSplice/CustomMarshalers/StatusMarshalers.cs",
             DDS.ErrorCode.InvalidValue,
             "OfferedIncompatibleQosStatus attribute may not be a null pointer.");
     }
     return(result);
 }
예제 #2
0
        internal static void CopyOut(
            IntPtr from,
            ref DDS.OfferedIncompatibleQosStatus to,
            int offset)
        {
            // Initialize managed array to the correct size.
            if (to == null)
            {
                to = new DDS.OfferedIncompatibleQosStatus();
            }

            to.TotalCount       = ReadInt32(from, offset + offset_total_count);
            to.TotalCountChange = ReadInt32(from, offset + offset_total_count_change);
            to.LastPolicyId     = (QosPolicyId)ReadInt32(from, offset + offset_last_policy_id);
            QosPolicyCount[] policies = to.Policies;
            QosPolicyCountSequenceMarshaler.CopyOut(from, ref to.Policies, offset + offset_policies);
            if (policies != to.Policies)
            {
                to.Policies = policies;
            }
        }
예제 #3
0
 internal static void CleanupIn(IntPtr nativePtr, int offset)
 {
     QosPolicyCountSequenceMarshaler.CleanupIn(nativePtr, offset + offset_policies);
 }