[
https://issues.apache.org/jira/browse/PLC4X-302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17372564#comment-17372564
]
Ćukasz Dywicki commented on PLC4X-302:
--------------------------------------
Hey Chris,
If you expect multiple answers from remote party maybe a better way is to use
subscription api? I don't know KNX very well and have no idea if you get any
information about segmentation.
Anyhow, if you would like to separate discovery/browse requests from the rest
then I made a `PhaseLock` I use with canopen protocol which could support that
case. In principle it works through propagation of a phase through callbacks
and times outs when no additional requests are made within X seconds, then
waits X seconds to close phase and notify listeners about that. Request from
other phases or not associated with any phase are blocked until earlier phase
completion.
> [KNX][Go] Possible isolation issue in KNX driver
> ------------------------------------------------
>
> Key: PLC4X-302
> URL: https://issues.apache.org/jira/browse/PLC4X-302
> Project: Apache PLC4X
> Issue Type: Bug
> Components: Driver-KNX, Language-Go
> Affects Versions: 0.9.0
> Reporter: Christofer Dutz
> Priority: Major
>
> When executing a "discovery" (SearchRequest to the Broadcast address)
> multiple responses can come back. In the case of some code we use at Mapped,
> however I have encountered that the second SearchResponse coming in is being
> discarded as it seems to go to the defaultHandler of the connection.
> So in this case the time between the response of the gateway and that of the
> second KNXNet/IP device is enough for the application to login with the
> gateway and the second response seems to go to that UDP Port and hereby is
> handled by the defaultHandler of that connection, which discards the
> SearchResponse as it doesn't know what to do with it.
> Also later on in the application, if a new discovery is initiated while the
> Browse operation is stills scanning the KNX network (Situation only occuring
> during testing) it seems the connections are sort of messed up as the
> ConnectionRequests for the new connection go to the handlers of the first
> connection and get discarded.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)