diff --git a/.vscode/settings.json b/.vscode/settings.json index 02e8314..662cb84 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -4,5 +4,5 @@ "editor.formatOnSave": true, "modulename": "${workspaceFolderBasename}", "distname": "${workspaceFolderBasename}", - "moduleversion": "1.1.1" + "moduleversion": "1.1.2" } \ No newline at end of file diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index a337fe5..83b787f 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,5 +1,12 @@ # pyrtcm Release Notes +### RELEASE 1.1.2 + +CHANGES: + +1. Sphinx documentation and docstrings enhanced to include global constants and decodes. +1. `socket_stream.SocketStream` class renamed to `socket_wrapper.SocketWrapper` class for clarity. + ### RELEASE 1.1.1 ENHANCEMENTS: diff --git a/docs/pyrtcm.rst b/docs/pyrtcm.rst index e59969f..7a2e6a3 100644 --- a/docs/pyrtcm.rst +++ b/docs/pyrtcm.rst @@ -76,10 +76,10 @@ pyrtcm.rtcmtypes\_get\_msm module :undoc-members: :show-inheritance: -pyrtcm.socket\_stream module ----------------------------- +pyrtcm.socket\_wrapper module +----------------------------- -.. automodule:: pyrtcm.socket_stream +.. automodule:: pyrtcm.socket_wrapper :members: :undoc-members: :show-inheritance: diff --git a/pyproject.toml b/pyproject.toml index 041bc27..b4bd250 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ name = "pyrtcm" authors = [{ name = "semuadmin", email = "semuadmin@semuconsulting.com" }] maintainers = [{ name = "semuadmin", email = "semuadmin@semuconsulting.com" }] description = "RTCM3 protocol parser" -version = "1.1.1" +version = "1.1.2" license = { file = "LICENSE" } readme = "README.md" requires-python = ">=3.8" diff --git a/src/pyrtcm/__init__.py b/src/pyrtcm/__init__.py index 1abe753..1bfac59 100644 --- a/src/pyrtcm/__init__.py +++ b/src/pyrtcm/__init__.py @@ -21,6 +21,6 @@ from pyrtcm.rtcmtypes_get import * from pyrtcm.rtcmtypes_get_igs import * from pyrtcm.rtcmtypes_get_msm import * -from pyrtcm.socket_stream import SocketStream +from pyrtcm.socket_wrapper import SocketWrapper version = __version__ # pylint: disable=invalid-name diff --git a/src/pyrtcm/_version.py b/src/pyrtcm/_version.py index e1547a9..536026e 100644 --- a/src/pyrtcm/_version.py +++ b/src/pyrtcm/_version.py @@ -8,4 +8,4 @@ :license: BSD 3-Clause """ -__version__ = "1.1.1" +__version__ = "1.1.2" diff --git a/src/pyrtcm/rtcmreader.py b/src/pyrtcm/rtcmreader.py index aad02e7..1986557 100644 --- a/src/pyrtcm/rtcmreader.py +++ b/src/pyrtcm/rtcmreader.py @@ -36,7 +36,7 @@ from pyrtcm.rtcmhelpers import calc_crc24q from pyrtcm.rtcmmessage import RTCMMessage from pyrtcm.rtcmtypes_core import ERR_LOG, ERR_RAISE, NMEA_HDR, UBX_HDR, VALCKSUM -from pyrtcm.socket_stream import SocketStream +from pyrtcm.socket_wrapper import SocketWrapper class RTCMReader: @@ -66,7 +66,7 @@ def __init__( """ if isinstance(datastream, socket): - self._stream = SocketStream(datastream, bufsize=bufsize) + self._stream = SocketWrapper(datastream, bufsize=bufsize) else: self._stream = datastream self._quitonerror = quitonerror diff --git a/src/pyrtcm/rtcmtypes_core.py b/src/pyrtcm/rtcmtypes_core.py index 29a2bd4..9ac355e 100644 --- a/src/pyrtcm/rtcmtypes_core.py +++ b/src/pyrtcm/rtcmtypes_core.py @@ -34,18 +34,34 @@ b"$W", ] UBX_HDR = b"\xb5\x62" +"""UBX message header""" RTCM_HDR = b"\xd3" -NMEA_PROTOCOL = 1 -UBX_PROTOCOL = 2 -RTCM3_PROTOCOL = 4 +"""RTCM3 message header""" GET = 0 +"""GET (receive, response) message types""" SET = 1 +"""SET (command) message types""" POLL = 2 +"""POLL (query) message types""" +SETPOLL = 3 +"""SETPOLL (SET or POLL) message types""" VALNONE = 0 +"""Do not validate checksum""" VALCKSUM = 1 +"""Validate checksum""" +NMEA_PROTOCOL = 1 +"""NMEA Protocol""" +UBX_PROTOCOL = 2 +"""UBX Protocol""" +RTCM3_PROTOCOL = 4 +"""RTCM3 Protocol""" ERR_RAISE = 2 +"""Raise error and quit""" ERR_LOG = 1 +"""Log errors""" ERR_IGNORE = 0 +"""Ignore errors""" + NA = "N/A" NSAT = "NSat" @@ -892,9 +908,11 @@ "112": ("BEIDOU", "DF427"), "113": ("NAVIC", "DF546"), } +"""Map of MSM message identity prefix to GNSS name & epoch attribute name""" # map of 4076_201 coefficients COEFFS = { 0: ("IDF039", "Cosine Coefficients"), 1: ("IDF040", "Sine Coefficients"), } +"""Map of 4076_01 message coefficient data attributes""" diff --git a/src/pyrtcm/socket_stream.py b/src/pyrtcm/socket_wrapper.py similarity index 98% rename from src/pyrtcm/socket_stream.py rename to src/pyrtcm/socket_wrapper.py index 8edcc64..48d8252 100644 --- a/src/pyrtcm/socket_stream.py +++ b/src/pyrtcm/socket_wrapper.py @@ -1,5 +1,5 @@ """ -socket_stream class. +socket_wrapper class. A skeleton socket wrapper which provides basic stream-like read(bytes) and readline() methods. @@ -19,7 +19,7 @@ from socket import socket -class SocketStream: +class SocketWrapper: """ socket stream class. """