Skip to content

Commit

Permalink
Upgrade to aprslib 0.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
joergschultzelutter committed Dec 21, 2021
1 parent 75eed9d commit 62fe302
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -132,3 +132,4 @@ log.html
output.xml
report.html
.DS_Store
.idea
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,11 @@ My first test case

- When you need to define strings which contain multiple spaces, escaping these strings won't work as Robot will try to interpret these as list values. You need to construct them as Robot-conform strings with ``${SPACE}``. Example: ``ABCD${SPACE}${SPACE}${SPACE}${SPACE}EFGH`` results in ``ABCD____EFGH`` (four blanks between the variable's value).

- Apart from minor helper methods for the connection setup and field check/retrieval, this Robot Framework library does not offer any additional keywords for exchanging data in a proper way. (Almost) every feature that the original [aprslib](https://github.com/rossengeorgiev/aprs-python) offers is supported by this Robot library - nothing more and nothing less. As aprslib does not [support the more recent replyack scheme](http://www.aprs.org/aprs11/replyacks.txt), this keyword library will also not decode these messages in a proper way and you may need to decode them manually. I was thinking about introducing a workaround to this library (the one that [mpad](https://github.com/joergschultzelutter/mpad) uses), but in the end this decoding should rather be done by aprslib itself.
- Apart from minor helper methods for the connection setup and field check/retrieval, this Robot Framework library does not offer any additional keywords for exchanging data in a proper way. (Almost) every feature that the original [aprslib](https://github.com/rossengeorgiev/aprs-python) offers is supported by this Robot library - nothing more and nothing less.

- The current version of the Robot Framework does not support WHILE loops (planned for RF 5.x) which would permit the Robot script to run endlessly (when needed). Loops can only be triggered with the help of finite FOR loops. This should be enough for testing but unless a real WHILE loop is made available for the Robot Framework, you can't build an APRS messaging server which will not terminate after a certain point in time.

- The ```Receive APRS Packet``` keyword has no timeout which means that it will only return back from this code if it has found a message that is to be returned back to Robot. If you depend on timeout, you may need to amend your APRS-IS filter settings and handle the filter process in your code.
- The ```Receive APRS Packet``` keyword has no timeout which means that it will only return from its code if it has found a message that is to be returned to Robot. If you depend on timeout, you may need to amend your APRS-IS filter settings and handle the filter process in your code.

- The keyword ``Send APRS Packet`` will __not__ check whether the APRS-IS connection has been establised read-only (``N0CALL`` call sign) or read-write.

Expand Down
2 changes: 1 addition & 1 deletion dependencies.txt → requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
aprs-python>=0.6.47
aprslib>=0.7.0
robotframework>=3.2
14 changes: 13 additions & 1 deletion src/AprsLibrary.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
)
logger = logging.getLogger(__name__)

__version__ = "0.5.0"
__version__ = "0.6.0"
__author__ = "Joerg Schultze-Lutter"


Expand Down Expand Up @@ -454,6 +454,12 @@ def get_msgno(self, aprs_packet):
aprs_packet=aprs_packet, field_name="msgNo"
)

@keyword("Get Ack Message Number Value from APRS Packet")
def get_ackmsgno(self, aprs_packet):
return self.get_value_from_aprs_packet(
aprs_packet=aprs_packet, field_name="ackMsgNo"
)

# This is the core function which will extract the requested
# field name from our packet(s). The packet can either be in
# raw format (str or bytes) OR decoded. If you try to access
Expand Down Expand Up @@ -542,6 +548,12 @@ def check_packet_msgno(self, aprs_packet):
aprs_packet=aprs_packet, field_name="msgNo"
)

@keyword("Check If APRS Packet Contains Ack Message Number")
def check_packet_ackmsgno(self, aprs_packet):
return self.check_if_field_exists_in_packet(
aprs_packet=aprs_packet, field_name="ackMsgNo"
)

# This is the core function which will check if a field exists
# in our packet(s). The packet can either be in
# raw format (str or bytes) OR decoded.
Expand Down

0 comments on commit 62fe302

Please sign in to comment.