Skip to content

S08.03: UDP syslog from FreeRTOS reaches the oracle #268

Description

@DavidCozens

Parent epic: #10 (E08: RTOS Examples)

Scope

Wire FreeRTOS-Plus-TCP UDP into the SolidSyslog UDP path so the existing UDP-side BDD scenarios pass against the FreeRTOS-on-QEMU target — using the same stdin contract that the Linux examples (Example/SingleTask, Example/Threaded) use to receive scenario commands.

Deliverables:

  • FreeRTOS example application under Example/FreeRtos/ that:
    • Initialises FreeRTOS-Plus-TCP with a static IP suitable for QEMU networking.
    • Reads scenario commands from a stdin contract identical to the existing examples.
    • Sends them via SolidSyslogUdpSender.
  • A new SolidSyslogFreeRtosDatagram implementation of the SolidSyslogDatagram extension point, wrapping the FreeRTOS-Plus-TCP socket API.
  • BDD harness updated so the target (Linux example vs FreeRTOS-on-QEMU) is parameterised; existing UDP scenarios run unchanged against the QEMU target.
  • Oracle wiring: the existing syslog-ng oracle is reused; only the QEMU networking glue is new (e.g. -netdev user with port forwarding, or a TAP device).

Sliced as: #299 (slice 1) → #290 (slice 2) → #292 (slice 3a) → #295 (slice 3b.1) → #298 (slice 3b.1.5) → #296 (slice 3b.2) → #302 (slice 4) → #304 (slice 5). Slice 5 landed the BDD harness; the per-feature acceptance below is the work of follow-up slices that remove the @freertoswip tags one by one.

Acceptance criteria — BDD scenarios pass against QEMU

  • syslog.feature — walking-skeleton end-to-end. (Tagged @freertoswip: composite assertion includes system hostname, current timestamp, and PID of example program — FreeRTOS uses literal FreeRtosExample, the RFC 5424 publication-date placeholder, and PROCID 1.)
  • header_fields.feature — RFC 5424 header fields. (1 of 3 scenarios passing today: App name matches the example program. Hostname and PID scenarios tagged @freertoswip for the same hardcoded-values reason.)
  • message_fields.feature — message body / MSG field. (Tagged @freertoswip: scenarios use --message-id / --message cmdline args; FreeRTOS has no getopt port — needs cmdline-flag → set NAME VALUE translation in the driver.)
  • timestamp.feature — timestamp formatting and accuracy. (Tagged @freertoswip: FreeRTOS example uses the RFC 5424 publication-date placeholder; needs a real RTC-backed clock callback.)
  • prival.feature — facility / severity encoding. (Tagged @freertoswip: cmdline-args reason as above.)
  • structured_data.feature — SD-element formatting. (Tagged @freertoswip: FreeRTOS example wires no meta SD — sequenceId, sysUpTime, language all absent.)
  • origin.feature — origin SD parameters. (Tagged @freertoswip: no origin SD wired in the FreeRTOS example.)
  • time_quality.feature — timeQuality SD. (Tagged @freertoswip: no timeQuality SD wired.)

Docs and header surface

Out of scope

  • Concurrent emission — covered by S08.04.
  • Store-and-forward — covered by S08.05.
  • TCP / TLS — covered by S08.06 / S08.07.

References

  • Parent epic E08 E08: FreeRTOS example #10 — UDP scenario list under "Story decomposition" item 3.
  • Existing UDP path: SolidSyslogUdpSender + SolidSyslogPosixDatagram (POSIX) — FreeRTOS gets a parallel SolidSyslogFreeRtosDatagram.
  • Predecessor S08.02 — provides the CI plumbing this builds on.

Metadata

Metadata

Assignees

No one assigned

    Labels

    storyStory issue

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions