Get/Wait for matched messages
Proposal:
The latest Connector introduced new functions including:
- RTI_Connector_wait_for_matched_publication
- RTI_Connector_wait_for_matched_subscription
- RTI_Connector_get_matched_subscriptions
- RTI_Connector_get_matched_publications
Current behavior:
No support on the listed functions
Desired behavior:
Support the listed functions
Use case:
- Wait for matched publication/subscription
- Get matched publication/subscription
@kyoungho I will pick up these 4, please assign to me.
Should these go to master or develop?
@metarsit I assigned it to you. I made develop as the default branch, so it can go to develop. Thanks!
@kyoungho I am looking to implement this but I think I need some help from you..
So for example, this function:
int RTI_Connector_wait_for_matched_publication(
void *reader,
int ms_timeout,
int *current_count_change);
What is the *reader and what is *current_count_change?
My guess is something like this?
func (instance *Instance) WaitForMatchedPublication(timeout time.Duration) error {
var count C.int // Probably a channel?
retcode := int(C.RTI_Connector_wait_for_matched_publication(
unsafe.Pointer(instance.output), C.int(timeout.Milliseconds()), &count),
)
return checkRetcode(retcode)
}
And is there a document I can read up a little more about these functions?
@metarsit The following Python Connector documentation/code would help you to understand how it works.
https://community.rti.com/static/documentation/connector/current/api/python/input.html#matching-with-a-publication
https://github.com/rticommunity/rticonnextdds-connector-py/blob/master/rticonnextdds_connector/rticonnextdds_connector.py#L829
Completed
https://github.com/rticommunity/rticonnextdds-connector-go/commit/343331f95fb1f3c5b228e050e6c30e6d165e2fcb