StarlingX PTP Notification App
Go to file
Cole Walker 04bbd6f0ff Add CguHandler, DmesgWatcher, GnssMonitor classes
The CguHandler class reads a given ts2phc config file and uses this to
derive the nmea_serialport, pci address and cgu path. These values can
be short-circuited if they are known in advance.
From there, the cgu is read and parsed into a dict in order to
easily derive the status of the various pins on the NIC.

DmesgWatcher and GnssMonitor use an observer pattern. DmesgWatcher is
the subject and follows entries in a dmesg log for patterns that
GnssMonitor observers care about. It then updates the GnssMonitor
observers with the matched entry allowing GnssMonitor to parse and
handle the update as required. The DmesgWatcher can be extended to
support other observer types in the future.

GnssMonitor attaches to DmesgWatcher and performs the handling for
changes in GNSS status. This includes sending the status change to a
publisher which will be implemented in a future review.

Unit tests are included for CguHandler and DmesgWatcher. GnssMonitor is
covered by the tests as it is built off the functionality of
CguHandler.

Tox has been updated to automatically run the unit tests.

Testing:

Pass: Unit tests pass

Story: 2010056
Task: 45500

Signed-off-by: Cole Walker <cole.walker@windriver.com>
Change-Id: I4be477aa0fce8baa418a3ff450c6b998683ec10b
2022-06-23 17:08:37 -04:00
api-ref/source Fix endpoint for pulling PTP current state 2022-04-25 14:08:19 -03:00
doc api-ref html builds 2021-03-11 13:11:54 -05:00
locationservice-base/centos Update License Statement for locationservice 2021-02-24 09:58:36 +08:00
notificationclient-base/centos Fix issue of lost of broker location due to registration service migration 2021-04-29 14:35:15 +08:00
notificationservice-base/centos Add CguHandler, DmesgWatcher, GnssMonitor classes 2022-06-23 17:08:37 -04:00
python-k8sapp-ptp-notification Add Debian packaging for ptp-notification app 2021-12-02 12:06:28 -06:00
stx-ptp-notification-helm Debian: Add fluxcd app for ptp-notification 2022-05-23 18:21:48 -03:00
.gitignore api-ref html builds 2021-03-11 13:11:54 -05:00
.gitreview Added .gitreview 2021-01-19 18:53:24 +00:00
.zuul.yaml Add CguHandler, DmesgWatcher, GnssMonitor classes 2022-06-23 17:08:37 -04:00
centos_build_layer.cfg Added armada manifest and required build files 2021-02-03 17:41:00 -05:00
centos_iso_image.inc Use fluxcd app by default for ptp-notification 2022-05-13 20:15:22 +00:00
centos_pkg_dirs Added armada manifest and required build files 2021-02-03 17:41:00 -05:00
centos_pkg_dirs_containers Added armada manifest and required build files 2021-02-03 17:41:00 -05:00
centos_stable_docker_images.inc Add Notification Services and Notification Client Sidecar 2021-02-01 11:10:51 +08:00
CONTRIBUTING.rst Added armada manifest and required build files 2021-02-03 17:41:00 -05:00
debian_build_layer.cfg Add debian_build_layer.cfg file 2021-10-05 14:12:32 -04:00
debian_pkg_dirs Add Debian packaging for ptp-notification app 2021-12-02 12:06:28 -06:00
HACKING.rst Added armada manifest and required build files 2021-02-03 17:41:00 -05:00
requirements.txt Add CguHandler, DmesgWatcher, GnssMonitor classes 2022-06-23 17:08:37 -04:00
test-requirements.txt Add CguHandler, DmesgWatcher, GnssMonitor classes 2022-06-23 17:08:37 -04:00
tox.ini Add CguHandler, DmesgWatcher, GnssMonitor classes 2022-06-23 17:08:37 -04:00