Better support for the reply-ack mechanism#89
Open
ericmoritz wants to merge 1 commit intorossengeorgiev:masterfrom
Open
Better support for the reply-ack mechanism#89ericmoritz wants to merge 1 commit intorossengeorgiev:masterfrom
ericmoritz wants to merge 1 commit intorossengeorgiev:masterfrom
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-ackthat require the entire string after the{to be accessible.http://www.aprs.org/aprs11/replyacks.txt
If we look at the parsed data, we will see that following rule 4 is a little difficult. Aside from looking at the
rawvalue, there's nothing that indicates that I should sendackMU}instead ofackMUwhen 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:
msgNo101is 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 themsgNo101value.isReplyAcktells 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.