This PR adds code to support the case when an outgoing message addresses a Node for which we do not have a valid alias in the AliasMap. This can happen in multiple cases, some more frequent than others:
There was a network partition thus we did not see that node at the time when we pre-filled the alias map after startup.
The node purposefully released its alias using an AMR frame (this is standards compliant).
The target node is a virtual node that does not yet exist, such as a train node operated by a command station.
The mechanism to do this is the following:
The AliasMap has a new API to listen to all(...) calls. The MessageBuilder sings up for getting notifications like this.
The MessageBuilder class, when seeing a miss in the AliasMap lookup for an outgoing addressed message, will put this message into a queue by destination ID. It emits a global verify node ID for the given target node ID instead of the specific message.
Normally, the target node answers this, and that answer initializes its entry in the AliasMap.
When this new alias is added to the AliasMap, the MessageBuilder is invoked and takes the pending messages out of the queue ("unblocked messages").
Upon sending any outgoing message, the MessageBuilder first flushes any unblocked messages it has in the queue.
An additional mechanism is added to MessageBuilder and CanInterface that allows waking up the output message processing thread when an unblocked message is found ("trigger message"). This is needed because the openlcb library does not make an assumption on what the threading model of the application is.
This PR adds code to support the case when an outgoing message addresses a Node for which we do not have a valid alias in the AliasMap. This can happen in multiple cases, some more frequent than others:
The mechanism to do this is the following:
Misc fixes: