private void Topic_PrivateOnInconsistentTopic(IntPtr entityData, IntPtr topicPtr, InconsistentTopicStatus status) { if (listener != null) { ITopic topic = (ITopic)OpenSplice.SacsSuperClass.fromUserData(topicPtr); listener.OnInconsistentTopic(topic, status); } }
public ReturnCode GetInconsistentTopicStatus(ref InconsistentTopicStatus status) { if (status == null) { status = new InconsistentTopicStatus(); } return(Gapi.Topic.get_inconsistent_topic_status(GapiPeer, status)); }
// ITopicListener private void Topic_PrivateOnInconsistentTopic( IntPtr entityData, IntPtr topicPtr, InconsistentTopicStatus status) { if (listener != null) { ITopic topic = (ITopic)OpenSplice.SacsSuperClass.fromUserData(topicPtr); listener.OnInconsistentTopic(topic, status); } }
internal static V_RESULT CopyOut(IntPtr fromPtr, IntPtr toPtr) { v_inconsistentTopicInfo from = (v_inconsistentTopicInfo)Marshal.PtrToStructure(fromPtr, type); GCHandle toGCHandle = GCHandle.FromIntPtr(toPtr); InconsistentTopicStatus to = toGCHandle.Target as InconsistentTopicStatus; V_RESULT result = CopyOut(ref from, to); toGCHandle.Target = to; return(result); }
public ReturnCode GetInconsistentTopicStatus(ref InconsistentTopicStatus status) { ReturnCode result = DDS.ReturnCode.AlreadyDeleted; ReportStack.Start(); if (this.rlReq_isAlive) { if (status == null) { status = new InconsistentTopicStatus(); } GCHandle statusGCHandle = GCHandle.Alloc(status, GCHandleType.Normal); result = uResultToReturnCode( User.Topic.GetInconsistentTopicStatus( rlReq_UserPeer, 1, InconsistentTopicStatusMarshaler.CopyOut, GCHandle.ToIntPtr(statusGCHandle))); status = statusGCHandle.Target as InconsistentTopicStatus; statusGCHandle.Free(); } ReportStack.Flush(this, result != ReturnCode.Ok); return(result); }
public void TestGetInconsistentTopicStatus() { // Create a new Topic and call GetInconsistentTopicStatus TestStructTypeSupport support = new TestStructTypeSupport(); string typeName = support.GetTypeName(); ReturnCode result = support.RegisterType(_participant, typeName); Assert.AreEqual(ReturnCode.Ok, result); Topic topic = _participant.CreateTopic(nameof(TestGetInconsistentTopicStatus), typeName); Assert.IsNotNull(topic); Assert.AreEqual(nameof(TestGetInconsistentTopicStatus), topic.Name); Assert.AreEqual(typeName, topic.TypeName); Assert.AreEqual(_participant, topic.Participant); InconsistentTopicStatus status = new InconsistentTopicStatus(); result = topic.GetInconsistentTopicStatus(ref status); Assert.AreEqual(ReturnCode.Ok, result); Assert.AreEqual(0, status.TotalCount); Assert.AreEqual(0, status.TotalCountChange); }
public override void OnInconsistentTopic(Topic topic, InconsistentTopicStatus status) { InconsistentTopic?.Invoke(topic, status); }
public override void OnInconsistentTopic(ITopic entityInterface, InconsistentTopicStatus status) { // Test the listener... This class is an TopicListener -- we can listen for an InconsistenTopic // by overriding the OnInconsistentTopic method of the TopicListener. Console.WriteLine("Received Inconsistent Topic"); }
public static extern ReturnCode get_inconsistent_topic_status( IntPtr _this, InconsistentTopicStatus status );
internal static V_RESULT CopyOut(ref v_inconsistentTopicInfo from, InconsistentTopicStatus to) { to.TotalCount = from.totalCount; to.TotalCountChange = from.totalChanged; return(V_RESULT.OK); }