[RESOLVED] Behaviour and signification of field valid_data

5 posts / 0 new
Last post
Offline
Last seen: 10 years 7 months ago
Joined: 08/28/2013
Posts: 66
[RESOLVED] Behaviour and signification of field valid_data

Hi,

I got following conf:
1/ HW A with 1 pub topic T and 1 sub topic T (sub filters out pub data)
2/ HW B with 1 pub Topic T and 1 sub topic T (idem for filtering)

In fact HW A is publishing data to HW B which responds to HW A ( always same topic)

*So first of all, is there a way to tell the publisher of HW A that it should not care about the subscriber of HW A ?
In this way, i don t have to filter incoming data based on key.
I don t want to disable "_intra" nor specify a specific peer.

*With some condition, i stop the publication of the topic on HW A.
Because of that, HW B dont publish data (my normal behaviour).

And here comes the strange thing, HW A process is going in ondata_available (why ?) and sample->valid_data is false (why?)

I got a history QoS of one sample.
I use RTI ME 2.2.3 on vxWorks.

Regards,

Rodolf

rose's picture
Offline
Last seen: 3 years 4 months ago
Joined: 08/22/2011
Posts: 148

Hello Rodolf,

It is not currently possible to ignore data other than filter it out, as Micro Edition does not support the ignore API.

It is likely that you are being called back in the on_data_available because your instance state has changed to "NOT_ALIVE_NO_WRITERS" due to the DataWriter losing liveliness.  Since the valid_data flag is false, you should check the instance_state and view_state to determine what is happening to cause the callback.

Thank you!

Rose

Offline
Last seen: 10 years 7 months ago
Joined: 08/28/2013
Posts: 66

Thanks Rose.

Im not sure to understand the liveliness concept.
With wireshark i can see heartbeats and ack, so why do i have lost of liveliness ?

Do I have to understand liveliness of the data (instance), i.e. data is a bit old and no more refreshed ?

Or is it more, i think that liveliness is well handle but it is not the case.
Im looking at the UserManual and i can see this for DDS_MANUAL_BY_TOPIC_LIVELINESS_QOS (mandatory for micro edition)

Your application must explicitly assert the liveliness of the DataWriter within the lease_duration.

How should i do that ?

[EDIT]
I didn t read far enough : ) -> call assert_liveliness() or write() in a DataWriter.

I will do that



Regards,

Rodolf

Offline
Last seen: 10 years 7 months ago
Joined: 08/28/2013
Posts: 66

Thanks again Rose, i understand better the behaviour.

I added assert_liveliness, i.e. DDS_DataWriter_assert_liveliness() with micro edition.

I do not have anymore this callback with invalid_data.

Great.

Regards,

Rodolf

rose's picture
Offline
Last seen: 3 years 4 months ago
Joined: 08/22/2011
Posts: 148

Glad to help!