From a03b41291ba2afc13b7b64ceaee42d41f29363e7 Mon Sep 17 00:00:00 2001 From: raiden00pl Date: Mon, 23 Oct 2023 09:53:59 +0200 Subject: [PATCH] Documentation: migrate apps/logging doc --- .../applications/logging/embedlog/index.rst | 6 +++ Documentation/applications/logging/index.rst | 7 +++ .../applications/logging/nxscope/index.rst | 43 +++++++++++++++++++ 3 files changed, 56 insertions(+) create mode 100644 Documentation/applications/logging/embedlog/index.rst create mode 100644 Documentation/applications/logging/nxscope/index.rst diff --git a/Documentation/applications/logging/embedlog/index.rst b/Documentation/applications/logging/embedlog/index.rst new file mode 100644 index 0000000000..186de02b00 --- /dev/null +++ b/Documentation/applications/logging/embedlog/index.rst @@ -0,0 +1,6 @@ +================ +Embedlog Library +================ + +Highly configurable logger for embedded devices. Documentation and +more info available on: https://embedlog.bofc.pl diff --git a/Documentation/applications/logging/index.rst b/Documentation/applications/logging/index.rst index fdfe1ec418..bd79b7ca98 100644 --- a/Documentation/applications/logging/index.rst +++ b/Documentation/applications/logging/index.rst @@ -1,3 +1,10 @@ ================= Logging Utilities ================= + +.. toctree:: + :glob: + :maxdepth: 3 + :titlesonly: + + */* diff --git a/Documentation/applications/logging/nxscope/index.rst b/Documentation/applications/logging/nxscope/index.rst new file mode 100644 index 0000000000..db36877b4c --- /dev/null +++ b/Documentation/applications/logging/nxscope/index.rst @@ -0,0 +1,43 @@ +=============== +NxScope Library +=============== + +This library provides real-time data logging functionality for NuttX. + +The principle of action is to accumulate data gathered in virtual channels +and periodically send buffered data through a dedicated interface packed +with a custom protocol. + +Supported features: + +- up to 255 channels possible +- support for standard data types and user-specific data (``enum nxscope_sample_dtype_e``) +- support for vector data or point data +- support for character-based channels (text messages) +- support for channel metadata - can be used to enumerate samples or timestamp +- stream buffer overflow detection (``NXSCOPE_STREAM_FLAGS_OVERFLOW``) +- remote control with commands (``enum nxscope_hdr_id_e``) +- protocol and interface implementation can be different for control commands and stream data +- (optional) support for user-specific commands (``NXSCOPE_HDRID_USER`` and ``struct nxscope_callbacks_s``) +- (optional) support for samples divider (``CONFIG_LOGGING_NXSCOPE_DIVIDER``) +- (optional) support for ACK frames (``CONFIG_LOGGING_NXSCOPE_ACKFRAMES``) +- (optional) support for user-defined types (``CONFIG_LOGGING_NXSCOPE_USERTYPES``) +- (optional) support for non-buffered critical channels (``CONFIG_LOGGING_NXSCOPE_CRICHANNELS``) + +A custom interface and a custom protocol can be implemented with +``struct nxscope_intf_s`` and ``struct nxscope_proto_s`` structures. + +Supported interfaces: + +1. a serial port: ``logging/nxscope/nxscope_iser.c`` +2. a dummy interface for debug purposes: ``logging/nxscope/nxscope_idummy.c`` + +A default serial protocol is implemented in ``apps/logging/nxscope/nxscope_pser.c`` +It just packs NxScope data into simple frames with a CRC-16 checksum. + +External tools +-------------- + +- `Nxslib `_ - a Python (3.10+) client library for NxScope devices, +- `Nxscli `_ - a Python (3.10+) command-line interface for NxScope, + supporting data capture and visualization