rx.to_me only works with the TCP connection

Issue #5 on hold
Rick MacDonald created an issue

I really like this feature and maybe it is too difficult to implement with the UDP connection in which case it is just a documentation issue.

Comments (5)

  1. Trippnology repo owner

    There is actually an official RX.DIRECTED.ME message type, but it is currently disabled in the source for some reason. I implemented RX.DIRECTED.TO_ME before I found it, so once the proper event works, it will be removed.

    If you’re doing manual processing, you can check if a message is to you with:

    if (packet.type === 'RX.DIRECTED' && js8.utils.messageIsToMe(packet)) {
      // Message was addressed to the station callsign
    }
    

    …which is all the RX.DIRECTED.TO_ME emitter is doing. It should work with the UDP connection too, I will have to check that.

  2. Trippnology repo owner

    Tested this and it will work with UDP , but only if you have seen a STATION.CALLSIGN packet first (unlikely). We need one of those to determine the station callsign - when using TCP, we can make a request for one via js8.station.getCallsign() or js8.station.getMetadata(), but we don’t have that benefit with UDP.

  3. Rick MacDonald reporter

    I may be off base here but with UDP you should be able to send a STATION.GET_CALLSIGN message and then the STATION.CALLSIGN reply will come back asynchronously. I think this only needs to happen once when there is a connection to the UDP server.

  4. Log in to comment