/// <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); }
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); }
public static extern ReturnCode GetLivelinessChangedStatus(IntPtr dr, [MarshalAs(UnmanagedType.Struct), In, Out] ref LivelinessChangedStatus status);
/// <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);