Software Requirements¶
This document defines the formal software requirements for
ezsnmp_data_logger. All requirements follow a [CATEGORY-NN] identifier
convention and use normative Shall statements to ensure traceability across
C++17 implementation, SWIG bindings, CLI commands, cross-platform GUIs,
automated tests, and CI/CD pipelines.
General & Architectural Requirements¶
[GEN-01] The core telemetry engine, JSON configuration parser and validator, storage sinks, and CLI dispatcher Shall be implemented in portable ISO C++17.
[GEN-02]
ezsnmp_data_loggerShall depend directly on theezsnmpC++17SessionBase,Result, andGenericErrorBaselayers to perform all live SNMPv1, SNMPv2c, and SNMPv3get,getnext,walk,bulkget,bulkwalk, andsetoperations against end devices, and Shall normalize and store returnedResultpayloads in thedata_loggerstorage layer.[GEN-03] 100% of runtime, Device Under Test (DUT),
ezsnmpsession, storage sink, CLI, and GUI settings Shall be represented and persisted in RFC-8259 JSON.[GEN-04] Package
__init__.pyfiles Shall contain only symbol imports,__version__, and__all__exports, with zero executable side effects at import time.[GEN-05] All C++17 core libraries, CLI binaries, Python bindings, and Graphical User Interfaces Shall operate across Linux, macOS, and Windows.
CalSemVer Versioning Requirements¶
[VER-01]
ezsnmp_data_loggerShall use CalSemVer (Calendar Semantic Versioning) for all releases of this project:YYYY.M.D(4-digit year, non-zero-padded month1-12, non-zero-padded day1-31, with an optional.PATCHhotfix segmentYYYY.M.D.P) for stable releases, PEP-440 pre-release suffixes (aN,bN,rcN, e.g.,2026.11.3a0) for Python, C++17, Meson, and Doxygen artifacts, SemVer-2.0 pre-release suffixes (-alpha.N,-beta.N,-rc.N, e.g.,2026.11.3-alpha.0) where target ecosystems (npmpackage.json, .NET.csproj) mandate hyphenated pre-releases, andv-prefixed tags (e.g.,v2026.11.3) for Git releases, Sphinx documentation archives, and Go modules.[VER-02]
ezsnmp_data_logger::is_valid_calsemverShall validate CalSemVer identifiers programmatically across C++17 and all 4 SWIG target languages, rejecting zero-padded calendar segments (such as2026.01.05) or legacy non-calendar versions.[VER-03] All version declarations across C++17 (
src/version.cpp,meson.build,CMakeLists.txt), Python (pyproject.toml,ezsnmp_data_logger/__init__.py), documentation (.doxygen,sphinx_docs_build/source/conf.py), and multi-language package manifests (bindings/javascript/package.json,bindings/csharp/EzSnmpDataLogger.csproj,bindings/csharp/CMakeLists.txt) Shall remain synchronized on the active project CalSemVer identifier and be verified by automated tests.[VER-04]
ezsnmp_data_loggerShall expose its active CalSemVer version viaezsnmp_data_logger::version(),ezsnmp_data_logger.__version__, andezsnmp-data-logger version [--json], and Shall standardize onezsnmp’s CalSemVer release line (ezsnmp>=2026.10.28a0, git tagv2026.10.28a0) until a stable CalSemVerezsnmprelease is published.
JSON Configuration & Validation Requirements¶
[CFG-01] The C++17 library Shall include a self-contained, order-preserving RFC-8259 JSON parser and serializer with line-and-column syntax diagnostics and zero external header-only JSON library dependencies.
[CFG-02]
validate_configandvalidate_config_fileShall validatelogger,duts,sinks, andguisections and return a structuredValidationReportcontainingvalid,errors,warnings,enabled_duts,total_metrics, andenabled_sinks.[CFG-03] Configuration validation Shall reject protocol-invalid combinations, including
bulkgetorbulkwalkwith SNMPv1, and SNMPv3authNoPriv/authPrivconfigurations missing USM credentials or passphrases shorter than 8 characters.[CFG-04]
generate_template_config_jsonShall generate valid starter JSON documents forminimal,demo,enterprise, andsnmpv3profiles, andconfig_json_schemaShall output a Draft 2020-12 JSON Schema covering all configuration keys.
Engine, Queue & Storage Sink Requirements¶
[ENG-01]
EzSnmpPollerShall map allSnmpConfigfields toezsnmp::SessionBase, coalesce scalargetmetrics per DUT into multi-OIDSessionBase::getcalls, scope-Cr<N>max-repeaters strictly tobulkgetandbulkwalkPDUs, and captureezsnmpexceptions as structured errorSamplerecords without crashing worker threads.[ENG-02]
StubSnmpPollerShall provide deterministic synthetic SNMPpoll,request, andset_oidresponses whensnmp.modeis set to"stub"for offline testing, demos, and CI validation.[ENG-03]
DataLoggerShall decouple multi-DUT polling worker threads from sink persistence using a thread-safeBoundedQueue<Batch>that enforces bounded memory under back-pressure and drains all queued batches prior to shutdown.[ENG-04]
Sampleand persistent storage sinks Shall preserve fullezsnmp::Resultmetadata (oid,oid_index,snmp_type,raw_value) alongside normalized typed values (type_tag,i64,f64,str_val,status) and Shall acceptezsnmpResult.to_dict()JSON objects directly viaSample::from_json.[ENG-05]
SqliteSinkShall operate in SQLite3 WAL mode with normalizedseriesandsamplestables, prepared statements, in-memoryseries_idcaching, and configurable batch/time transaction commits.[ENG-06]
CsvSinkandJsonlSinkShall write per-DUT RFC-4180 CSV and newline-delimited JSON files with configurable flush thresholds.[ENG-07]
PsqlSinkShall support PostgreSQL and optional TimescaleDB hypertables vialibpqwhen compiled withEZSNMP_DL_HAVE_LIBPQ=1, and Shall raise a descriptiveSinkErrorwhenlibpqwas not compiled into the binary.[ENG-08]
PrometheusSinkShall expose latest numeric SNMP readings and scrape counters over an embedded cross-platform HTTP/metricsendpoint supporting ephemeral port0binding on POSIX and Winsock2.[ENG-09]
inspect_configured_sinksShall query recent stored telemetry rows across SQLite3, JSONL, and CSV sinks with optional DUT and metric filters.
Multi-Language SWIG 4.x Distribution Requirements¶
[SWIG-01] Modular SWIG 4.x interface files in
interface/(ezsnmp_data_logger.i,exceptions.i,datatypes.i,config.i,data_logger.i) Shall exposeDataLogger(via copyable PIMPL),CliRunner, configuration structs, telemetry datatypes, and C++ exceptions cleanly to target languages.[SWIG-02]
interface/ezsnmp_data_logger.i,tools/generate_swig_bindings.py, andbindings/Shall generate and package clean SWIG 4.x bindings exclusively for the 4 supported target languages:python,javascript(Node.js N-API),csharp(.NET P/Invoke), andgo(cgo).[SWIG-03] In Python bindings, blocking C++ operations (
run,run_once,stop,probe,request_json,set_json,CliRunner::run,CliRunner::execute) Shall release Python’s GIL via%thread.
Self-Contained Multi-Language Packaging Requirements¶
[PKG-01] Every language package built from
ezsnmp_data_loggeracrosspython,javascript(Node.js N-API),csharp, andgoShall be self-contained so end users never need to install external native libraries (Net-SNMP, OpenSSL, SQLite3, or SWIG) at runtime, while publishing under the project’s CalSemVer release identifiers ([VER-01]-[VER-04]).[PKG-02]
tools/prepare_sqlite3_amalgamation.pyShall provision a SHA-256-verified public-domain SQLite3 C amalgamation (third_party/sqlite3/sqlite3.candsqlite3.h) thatsetup.py,meson.build,CMakeLists.txt, andbindings/{javascript,csharp,go}compile directly into the native binary, eliminating runtimelibsqlite3shared-library dependencies across Linux, macOS, and Windows.[PKG-03] Standalone dependency scripts (
tools/prepare_linux_netsnmp.sh,tools/prepare_macos_netsnmp.sh,tools/prepare_windows_netsnmp.ps1, andtools/prepare_ezsnmp_source.py) Shall provisionezsnmpv2026.10.28a0and build minimal SHA-256-verified Net-SNMP5.10.pre2libraries with OpenSSL and Blumenthal-AES support.[PKG-04]
pyproject.tomlShall declareswig>=4.3.0in[build-system] requires,ezsnmp>=2026.10.28a0independencies, and configurecibuildwheelwithauditwheel repair(Linuxmanylinux/musllinux),delocate-wheel(macOS), anddelvewheel repair(WindowsAMD64/x86/ARM64) to produce standalone Python wheels.[PKG-05]
tools/bundle_native_package.pyShall inspect compiled native extensions/libraries acrosspython,javascript(.node),csharp(runtimes/<rid>/native/), andgo(bindings/go/lib/), bundle non-OS shared libraries into a package-local runtime directory, rewrite dynamic loader search paths ($ORIGINviapatchelfon Linux,@loader_pathviainstall_name_toolon macOS, and side-by-side DLLs on Windows), and verify zero external non-OS runtime library dependencies remain.
Command-Line Interface (CLI) Requirements¶
[CLI-01] The
ezsnmp-data-loggerCLI Shall providerun,validate,probe,request,set,inspect,init-config,gui,schema,version, andhelpsubcommands, while remaining backward-compatible with legacyezsnmp_loggerd --config <file>invocations.[CLI-02] Every operational CLI subcommand Shall support
--jsonto emit machine-readable JSON documents (and newline-delimitedstarted,batch,stats, andstoppedJSON events duringrun --json).[CLI-03]
CliRunner::executeShall allow any SWIG target language to invoke CLI commands in-process and captureexit_code,stdout_text, andstderr_textin aCliResultstructure.
Cross-Platform GUI Requirements¶
[GUI-01] All Graphical User Interfaces Shall act strictly as frontends driving the
ezsnmp-data-loggerCLI behind the scenes via subprocess execution and JSON payloads (CliSubprocessBridge), without duplicating SNMP or storage engine logic.[GUI-02] Every GUI library and runtime component Shall work across Linux, macOS, and Windows using Python standard-library
tkinter.ttk(Native Desktop Studio) andhttp.server.ThreadingHTTPServer+ HTML5/SVG (Browser Web Studio), selectable viagui.frontend("auto","tk", or"web") in the JSON configuration.[GUI-03] Both GUI frontends Shall display a live Behind-the-Scenes CLI Command Audit Trail recording the exact CLI command, exit code, and execution time (ms) of every user action.
[GUI-04] Both GUI frontends Shall support starting and stopping live CLI polling with real-time numeric telemetry charts, executing ad-hoc
ezsnmpget,getnext,walk,bulkget,bulkwalk, andsetoperations, inspecting stored sink rows, editing, validating, and saving JSON configurations, and Shall allow users to interactively select one or many plotted fields to view at a time with automatic Y-axis rescaling, “Select All”, “Clear All”, and clickable canvas legend hitboxes.[GUI-05] All user-facing UI strings (window and header titles, button labels, tabs, cards, sections, table headers, form labels, status bars, and dialogs) across both Desktop (Tkinter) and Web (Browser) frontends Shall be externalized into a
locale.jsondefinition file formatted as{"LOCALE_KEY_NAME": {"en": "...", ...}}with per-language definitions as needed (defaulting to English"en"inezsnmp_data_logger/gui/locale.json), managed byLocaleManager, exposed via theGET /api/localeandPOST /api/localeendpoints, configurable viagui.localeandgui.locale_filein the unified JSON configuration or CLI--locale/--locale-fileflags, and provide automatic fallback to English when keys or translations are omitted.[GUI-06] Both GUI frontends and operating system application launchers Shall include custom branding icon suites replacing generic Python or browser tab icons: Browser Web Studio supplies modern vector SVG favicons (
favicon.svg), standard ICO (favicon.ico), multi-resolution PNGs (favicon-32x32.png,favicon-16x16.png,apple-touch-icon.png), and top bar brand badges; Desktop Tkinter Studio applies custom window titlebar icons (app_icon.png/app_icon.ico) and dynamically configures the macOS Dock application icon using standard Cocoa/AppKit integration viactypes; and desktop application launchers can be installed on macOS (.appbundle with Retinaapp_icon.icns), Linux (.desktopentry withapp_icon.png), and Windows viaezsnmp-data-logger-gui --install-launcherandtools/install_desktop_launcher.py.
Testing, Documentation & CI/CD Requirements¶
[C++T-01] C++17 GoogleTest suites in
cpp_tests/Shall test JSON parsing, configuration validation, bounded queues, all local/HTTP sinks,DataLogger,CliRunner,StubSnmpPoller, and liveEzSnmpPollerUDPget/setround-trips, usingEZSNMP_SKIP_TEST_AND_RETURNfor older GoogleTest compatibility.[PYT-01] Python
pytestsuites inpython_tests/Shall verify Python SWIG bindings,[GEN-04]__init__.pypurity, CalSemVer version alignment, self-contained native library bundling,CliSubprocessBridgestreaming, Browser Studio HTTP endpoints,tkinter.ttkDesktop Studio instantiation, repository JSON configs, and 4-language SWIG code generation (python,javascript,csharp,go).[DOC-01] Documentation in
sphinx_docs_build/Shall use Sphinx +furo+sphinx.ext.autodoc+sphinx.ext.githubpages+ Doxygen XML +breathealongsidesphinx_docs_build/landing/withVERSION_LIST_START/VERSION_LIST_ENDmarkers matching siblingcarlkidcryptorepositories, maintaining a.nojekyllsentinel file indocs/to disable Jekyll processing on GitHub Pages, building cleanly withSPHINXOPTS="-W".[DOC-02] Documentation Shall provide a dedicated multi-OS installation guide (
installation.rst) for macOS, Windows, Linux, and Alpine Linux, an exhaustive CLI command reference (cli_guide.rst) covering all 9 subcommands, flags, ASN.1 type codes, and JSON contracts, and a thorough GUI user guide (gui_guide.rst) detailing Tabs 1-6, the CLI audit trail, real-time charting with series selection, and OS launchers.[FMT-01] All hand-written C++17 files Shall conform to
.clang-formatand all hand-written Python files Shall conform toblack --line-length 100.[CICD-01] GitHub Actions workflows in
.github/workflows/Shall keep matrix job counts strictly under 256, scopeconcurrency.groupby${{ github.workflow }}, and passyamllintandactionlint.[CICD-02] Automated release publishing workflows Shall support distributing multi-platform binary wheels and source distributions to PyPI and TestPyPI (
build_and_publish_to_pypi.yml,build_and_publish_to_test_pypi.yml) usingcibuildwheelandcarlkidcrypto/os-specific-runneracross Linux, macOS, and Windows, pre-provisioning embedded C++17 dependencies (third_party/ezsnmp) with retry resilience, skipping existing distribution artifacts idempotently, and publishing self-contained Node.js packages to npm (build_and_publish_to_npm.yml) with automatic prerelease tag resolution.[CICD-03] Automated release publishing workflows Shall support building and packaging multi-runtime C# (.NET 8) packages to NuGet and GitHub Packages (
build_and_publish_to_nuget.yml), and generating validated WinGet community manifests with automated repository submission (build_and_publish_to_winget.yml,tools/generate_winget_manifest.py).[CICD-04] Automated dependency maintenance Shall be configured via
.github/dependabot.ymlwith weekly updates across GitHub Actions, Python (root and Sphinx docs), npm (bindings/javascript), NuGet (bindings/csharp), and Go (bindings/go), grouping package updates and respecting agentic workflow exclusions.[CICD-05] SonarQube Cloud automatic analysis Shall be configured via root
.sonarcloud.propertiestargeting an A rating across security, reliability, and maintainability, excluding documentation (docs/**,sphinx_docs_build/**), workflows (.github/**), vendored dependencies (third_party/**), and generated SWIG artifacts from code smells and copy-paste duplication metrics.[CICD-06] Continuous integration workflows Shall incorporate smart file-change detection via
tj-actions/changed-filesto skip redundant multi-platform matrix runner executions when pull requests only touch unrelated subsystems, and Shall consolidate multi-OS conditionals usingcarlkidcrypto/os-specific-runneracross Ubuntu, macOS, and Windows.[CICD-07] Python wheel packaging Shall utilize parallel multi-core compilation (via
EZSNMP_BUILD_JOBSandThreadPoolExecutor), fast dependency isolation viabuild[uv], and cross-version deterministic C++ object caching (viaEZSNMP_OBJECT_CACHE_DIR) across matrix runners.[CICD-08] Test deployment workflows (
build_and_publish_to_test_pypi.yml) Shall automatically trigger on pushes tomainguarded by smart change detection (tj-actions/changed-files) over source and packaging files, ensuring distribution packaging regressions fail prior to production release.