Exemplo n.º 1
0
        /// <summary>
        /// Allows access to the <see cref="LivelinessChangedStatus" /> communication status.
        /// </summary>
        /// <param name="status">The <see cref="LivelinessChangedStatus" /> to be filled up.</param>
        /// <returns>The <see cref="ReturnCode" /> that indicates the operation result.</returns>
        public ReturnCode GetLivelinessChangedStatus(ref LivelinessChangedStatus status)
        {
            LivelinessChangedStatus s = default;

            ReturnCode ret = UnsafeNativeMethods.GetLivelinessChangedStatus(_native, ref s);

            status = s;

            return(ret);
        }
Exemplo n.º 2
0
        private void OnLivelinessChangedHandler(IntPtr reader, ref LivelinessChangedStatus status)
        {
            Entity entity = EntityManager.Instance.Find(reader);

            DataReader dataReader = null;

            if (entity != null)
            {
                dataReader = entity as DataReader;
            }

            OnLivelinessChanged(dataReader, status);
        }
Exemplo n.º 3
0
 public static extern ReturnCode GetLivelinessChangedStatus(IntPtr dr, [MarshalAs(UnmanagedType.Struct), In, Out] ref LivelinessChangedStatus status);
Exemplo n.º 4
0
 /// <summary>
 /// <para>Handles the <see cref="StatusKind.LivelinessChangedStatus" /> communication status.</para>
 /// <para>The <see cref="StatusKind.LivelinessChangedStatus" /> indicates that there have been liveliness changes for one or
 /// more <see cref="DataWriter" />s that are publishing instances for this <see cref="DataReader" />.</para>
 /// </summary>
 /// <param name="reader">The <see cref="DataReader" /> that triggered the event.</param>
 /// <param name="status">The current <see cref="LivelinessChangedStatus" />.</param>
 public abstract void OnLivelinessChanged(DataReader reader, LivelinessChangedStatus status);