Exemplo n.º 1
0
        internal void FromNative(PublicationBuiltinTopicDataWrapper wrapper)
        {
            Deadline          = wrapper.Deadline;
            DestinationOrder  = wrapper.DestinationOrder;
            Durability        = wrapper.Durability;
            DurabilityService = wrapper.DurabilityService;
            Key               = wrapper.Key;
            LatencyBudget     = wrapper.LatencyBudget;
            Lifespan          = wrapper.Lifespan;
            Liveliness        = wrapper.Liveliness;
            Ownership         = wrapper.Ownership;
            OwnershipStrength = wrapper.OwnershipStrength;
            ParticipantKey    = wrapper.ParticipantKey;
            Presentation      = wrapper.Presentation;
            Reliability       = wrapper.Reliability;

            if (Partition == null)
            {
                Partition = new PartitionQosPolicy();
            }
            Partition.FromNative(wrapper.Partition);

            if (GroupData == null)
            {
                GroupData = new GroupDataQosPolicy();
            }
            GroupData.FromNative(wrapper.GroupData);

            if (TopicData == null)
            {
                TopicData = new TopicDataQosPolicy();
            }
            TopicData.FromNative(wrapper.TopicData);

            if (UserData == null)
            {
                UserData = new UserDataQosPolicy();
            }
            UserData.FromNative(wrapper.UserData);

            if (wrapper.TopicName != IntPtr.Zero)
            {
                TopicName = Marshal.PtrToStringAnsi(wrapper.TopicName);
            }
            else
            {
                TopicName = null;
            }

            if (wrapper.TypeName != IntPtr.Zero)
            {
                TypeName = Marshal.PtrToStringAnsi(wrapper.TypeName);
            }
            else
            {
                TypeName = null;
            }
        }
Exemplo n.º 2
0
        internal void FromNative(TopicQosWrapper wrapper)
        {
            Durability        = wrapper.Durability;
            DurabilityService = wrapper.DurabilityService;
            Deadline          = wrapper.Deadline;
            LatencyBudget     = wrapper.LatencyBudget;
            Liveliness        = wrapper.Liveliness;
            Reliability       = wrapper.Reliability;
            DestinationOrder  = wrapper.DestinationOrder;
            History           = wrapper.History;
            ResourceLimits    = wrapper.ResourceLimits;
            TransportPriority = wrapper.TransportPriority;
            Lifespan          = wrapper.Lifespan;
            Ownership         = wrapper.Ownership;

            if (TopicData == null)
            {
                TopicData = new TopicDataQosPolicy();
            }
            TopicData.FromNative(wrapper.TopicData);
        }