Example #1
0
        public ReturnCode GetSampleLostStatus(ref SampleLostStatus status)
        {
            ReturnCode result;

            ReportStack.Start();
            if (this.rlReq_isAlive)
            {
                if (status == null)
                {
                    status = new SampleLostStatus();
                }
                GCHandle statusGCHandle = GCHandle.Alloc(status, GCHandleType.Normal);
                result = uResultToReturnCode(
                    User.Reader.GetSampleLostStatus(
                        rlReq_UserPeer, 1, SampleLostStatusMarshaler.CopyOut, GCHandle.ToIntPtr(statusGCHandle)));
                status = statusGCHandle.Target as SampleLostStatus;
                statusGCHandle.Free();
            }
            else
            {
                result = DDS.ReturnCode.AlreadyDeleted;
            }
            ReportStack.Flush(this, result != ReturnCode.Ok);
            return(result);
        }
 private void OnSampleLost(AnyDataReader reader, SampleLostStatus status)
 {
     if (status.LastReason == SampleLostStatusKind.LostByIncompleteCoherentSet)
     {
         Console.WriteLine(
             $"Lost {status.TotalCount.Change} samples of topic {reader.TopicDescription.Name} in an incomplete coherent set.");
     }
 }
Example #3
0
 private void PrivateSampleLost(IntPtr entityData, IntPtr enityPtr, SampleLostStatus status)
 {
     if (listener != null)
     {
         IDataReader dataReader = (IDataReader)OpenSplice.SacsSuperClass.fromUserData(enityPtr);
         listener.OnSampleLost(dataReader, status);
     }
 }
Example #4
0
 public ReturnCode GetSampleLostStatus(ref SampleLostStatus status)
 {
     if (status == null)
     {
         status = new SampleLostStatus();
     }
     return(Gapi.DataReader.get_sample_lost_status(GapiPeer, status));
 }
        internal static V_RESULT CopyOut(IntPtr fromPtr, IntPtr toPtr)
        {
            v_sampleLostInfo from = (v_sampleLostInfo)Marshal.PtrToStructure(fromPtr, type);

            GCHandle         toGCHandle = GCHandle.FromIntPtr(toPtr);
            SampleLostStatus to         = toGCHandle.Target as SampleLostStatus;

            V_RESULT result = CopyOut(ref from, to);

            toGCHandle.Target = to;
            return(result);
        }
 public void OnSampleLost(
     IDataReader the_reader, SampleLostStatus status)
 {
 }
Example #7
0
 public static extern ReturnCode get_sample_lost_status(
     IntPtr _this,
     SampleLostStatus status
     );
Example #8
0
 /*! This event is raised when one or more samples received from the DataWriter
  * have failed to be received */
 public void OnSampleLostEventHendler(DataReader dataReader, SampleLostStatus status)
 {
     Console.WriteLine("\n" + status.TotalCountChanged + " Sample lost on DataReader: " + dataReader.Name +
                       "\n until now " + status.TotalCount + " samples lost" +
                       "\n samples were lost. Usually this happens when DataWriter writes faster than DataReader reads.");
 }
Example #9
0
 public static extern ReturnCode get_sample_lost_status(
     IntPtr _this,
     SampleLostStatus status
     );
 private void PrivateSampleLost(
         IntPtr entityData, 
         IntPtr enityPtr, 
         SampleLostStatus status)
 {
     if (listener != null)
     {
         IDataReader dataReader = (IDataReader)OpenSplice.SacsSuperClass.fromUserData(enityPtr);
         listener.OnSampleLost(dataReader, status);
     }
 }
 public void OnSampleLost(IDataReader entityInterface, SampleLostStatus status)
 {
 }
Example #12
0
 public override void OnSampleLost(DataReader reader, SampleLostStatus status)
 {
     Console.WriteLine(nameof(OnSampleLost));
 }
 public void OnSampleLost(IDataReader entityInterface, SampleLostStatus status)
 {
     Console.WriteLine("=== [ListenerDataListener::OnRequestedIncompatibleQos] : triggered");
 }
 internal static V_RESULT CopyOut(ref v_sampleLostInfo from, SampleLostStatus to)
 {
     to.TotalCount       = from.totalCount;
     to.TotalCountChange = from.totalChanged;
     return(V_RESULT.OK);
 }
Example #15
0
 public override void OnSampleLost(DataReader reader, SampleLostStatus status)
 {
     SampleLost?.Invoke(reader, status);
 }