예제 #1
0
 /// <summary>
 /// Manually asserts the liveliness of the <see cref="DataWriter" />. This is used in combination with the liveliness QoS
 /// policy to indicate to DDS that the entity remains active.
 /// </summary>
 /// <remarks>
 /// <para>This operation need only be used if the <see cref="LivelinessQosPolicy" /> setting is either <see cref="LivelinessQosPolicyKind.ManualByParticipantLivelinessQos" />
 /// or <see cref="LivelinessQosPolicyKind.ManualByTopicLivelinessQos" />. Otherwise, it has no effect.</para>
 /// <para>NOTE: Writing data via the write operation on a <see cref="DataWriter" /> asserts liveliness on the <see cref="DataWriter" /> itself and its
 /// <see cref="DomainParticipant" />. Consequently the use of AssertLiveliness is only needed if the application is not writing data regularly.</para>
 /// </remarks>
 /// <returns>The <see cref="ReturnCode" /> that indicates the operation result.</returns>
 public ReturnCode AssertLiveliness()
 {
     return(UnsafeNativeMethods.AssertLiveliness(_native));
 }