Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better support for the reply-ack mechanism #89

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ericmoritz
Copy link

The reply-ack mechanism is intended to be backwards compatible with APRS 1.01. The current implementation of reply-ack parsing makes it difficult to ack messages sent from clients that support reply-ack.

There are three rules in reply-ack that require the entire string after the { to be accessible.

http://www.aprs.org/aprs11/replyacks.txt

  1. RECEIVE messages and Strip off the AA from the end of the message text
    before you store it. THis is necessary so that your DUPE checker will
    still work. Since the AA may be different for multiple copies of the
    same incoming MM...
  2. When you receive a message line XXX.., send the normal existing
    "ackXXX..". This algoirithm is unchanged. Even if XXX.. is MM}AA
    then the ack is just the exact copy as before "ackMM}AA".
  3. When you receive a message line MM}AA, do 4 above as normal, but
    also then save the incoming MM number as now it is your "latest ACK"
    for that station. Now then this becomes the AA REPLY-ACK number for
    your next outgoing message to that station. (Step 1 above).

If we look at the parsed data, we will see that following rule 4 is a little difficult. Aside from looking at the raw value, there's nothing that indicates that I should send ackMU} instead of ackMU when acknowledging this message according to rule 4.

{'addresse': 'K3FNB-1',
 'format': 'message',
 'from': 'K3FNB-2',
 'message_text': 'from aprsis32',
 'msgNo': 'MU',
 'path': ['TCPIP*', 'qAC', 'T2CSNGRAD'],
 'raw': 'K3FNB-2>APWW11,TCPIP*,qAC,T2CSNGRAD::K3FNB-1  :from aprsis32{MU}AA',
 'to': 'APWW11',
 'via': 'T2CSNGRAD'}

This change modifies the parsed data in the following way:

 'msgNo': 'MU',
+ 'msgNo101': 'MU}AA',
+ 'isReplyAck': true,
 'raw': 'K3FNB-2>APWW11,TCPIP*,qAC,T2CSNGRAD::K3FNB-1  :from aprsis32{MU}',

msgNo101 is the full string of the message number as if it was parsed by an APRS 1.01 client. This allows us to easily ack the message by just following rule 4 with the msgNo101 value.

isReplyAck tells us that the client that sent the message supports reply-ack. This tells an application to follow rule 3 for deduping and that the application can use the reply-ack mechanism for acknowledgments.

The reply-ack mechanism is intended to be backwards compatible with
APRS 1.01. The current implementation of reply-ack parsing makes it
difficult to ack messages sent from clients that support reply-ack.

There are three rules in `reply-ack` that require the entire string after the `{` to be accessible.

http://www.aprs.org/aprs11/replyacks.txt

> 3) RECEIVE messages and Strip off the AA from the end of the message text
>    before you store it.  THis is necessary so that your DUPE checker will
>    still work.  Since the AA may be different for multiple copies of the
>    same incoming MM...
> 4) When you receive a message line XXX.., send the normal existing
>    "ackXXX..". This algoirithm is unchanged.  Even if XXX.. is MM}AA
>    then the ack is just the exact copy as before "ackMM}AA".
> 5) When you receive a message line MM}AA, do rossengeorgiev#4 above as normal, but
>    also then save the incoming MM number as now it is your "latest ACK"
>    for that station.  Now then this becomes the AA REPLY-ACK number for
>    your next outgoing message to that station. (Step rossengeorgiev#1 above).

If we look at the parsed data, we will see that following rule 4 is a
little difficult. Aside from looking at the `raw` value, there's
nothing that indicates that I should send `ackMU}` instead of `ackMU`
when acknowledging this message according to rule 4.

```py
{'addresse': 'K3FNB-1',
 'format': 'message',
 'from': 'K3FNB-2',
 'message_text': 'from aprsis32',
 'msgNo': 'MU',
 'path': ['TCPIP*', 'qAC', 'T2CSNGRAD'],
 'raw': 'K3FNB-2>APWW11,TCPIP*,qAC,T2CSNGRAD::K3FNB-1  :from aprsis32{MU}AA',
 'to': 'APWW11',
 'via': 'T2CSNGRAD'}
```

This change modifies the parsed data in the following way:

```
 'msgNo': 'MU',
+ 'msgNo101': 'MU}AA',
+ 'isReplyAck': true,
 'raw': 'K3FNB-2>APWW11,TCPIP*,qAC,T2CSNGRAD::K3FNB-1  :from aprsis32{MU}',
```

`msgNo101` is the full string of the message number as if it was
parsed by an APRS 1.01 client. This allows us to easily ack the
message by just following rule 4 with the `msgNo101` value.

`isReplyAck` tells us that the client that sent the message supports
reply-ack. This tells an application to follow rule 3 for deduping and
that the application can use the reply-ack mechanism for
acknowledgments.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant