RFC: one notification per person overboard under notifications.mob
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 45/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- javascript, json
- Ambito
- api
Direzione di ricerca
Start with the schema rules for notifications.mob and the cited invalid test, test/data/full-invalid/alarms-must_not_have_sub_trees_beneath_well_defined_notifications.json. Check how the schema represents notification fields and add coverage for the flat form and the proposed keyed forms, including rejection of navigation. Done means the schema accepts the listed valid examples while preserving the invalid case; the issue names no implementation files beyond that test.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
Allow notifications.mob to hold one notification per person overboard, keyed by an id, as notifications.mob.<id>, and describe the optional position, createdAt, id and data fields such a notification carries.
Motivation
The schema allows a single flat notifications.mob, and explicitly rejects anything beneath it (test/data/full-invalid/alarms-must_not_have_sub_trees_beneath_well_defined_notifications.json). With two people in the water, or two MOB emitters, the second alarm overwrites the first, and clearing one clears both.
Practice has already moved on:
- The server's Notifications API raises a MOB at
notifications.mob.<uuid>, withid,position(own position when raised, ornull),createdAtand optionaldatain the value. - n2k-signalk maps PGN 127233 (MOB Notification, sent by MFD MOB buttons and AIS MOB emitters) to
notifications.mob.<mobEmitterId>, ornotifications.mob.unsetwhen the emitter sends no id, with the emitter's position and the PGN's fields indata(SignalK/n2k-signalk#434).
Both fail schema validation today; n2k-signalk lists them in its schema baseline under SignalK/n2k-signalk#442.
Proposal
notifications.mobis either a notification (as now) or an object whose keys name one MOB each, every value a notification. The key is a whole number (an emitter id), a UUID (raised through the Notifications API) orunset(an emitter without an id). Other keys stay invalid, sonotifications.mob.navigationis still rejected and the existing invalid test keeps its meaning.- The notification value may carry, in addition to
method,stateandmessage:position:{ latitude, longitude }of the person or emitter, ornullwhen not known;createdAt: when the alarm was raised (RFC 3339);id: the notification's id, matching the key;data: an object with source-specific details (for 127233: emitter id, status, battery, MMSI of origin, COG/SOG).
These are optional for every notification, not only MOB;positionmatters most for MOB.
The flat notifications.mob stays valid, so existing producers and consumers are unaffected. A consumer that reads only the flat path misses per-person MOBs; a consumer that wants all of them reads every child of notifications.mob.
Tests
- valid:
notifications.mob.<uuid>andnotifications.mob.1026834withpositionanddata,notifications.mob.unset, the flatnotifications.mob. - invalid:
notifications.mob.navigation(existing test, unchanged).
Alternatives
- Keep one flat
notifications.moband fold several MOBs into itsdata. This breaks clearing one person independently and does not match what the server already emits. - Use any key under
mob. Simpler, butmobwould then be a branch like any other, and the rule that the well-known emergencies are leaves would go.
Refs SignalK/n2k-signalk#442, SignalK/n2k-signalk#434.
- Lingua principale
- JavaScript
- Stelle
- 105
- Fork
- 72
- Merge medio
- 11h 49m
- PR unite (30g)
- 5
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di SignalK/specification
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
SignalK/specification#694 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 54/100
SignalK/specification#691 ·
-
RFC: depth transducer offsets: one sign convention, transducer position, server-derived depthsForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 10/100
SignalK/specification#688 · 3 commenti · 1 reazione ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
SignalK/specification#685 · 2 commenti ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
SignalK/specification#681 ·
Tutte le issue di SignalK/specification
Issue simili
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 83/100
TheOdinProject/curriculum#31596 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
mailcow/mailcow-dockerized#7725 ·
I maintainer di solito rispondono entro 1 giorno
-
bug need-fix
Difficoltà 2/5 1-3 ore Idoneità per principianti 73/100
hoverkraft-tech/ci-github-common#694 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 94/100
solana-foundation/solana-com#2579 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 85/100
vercel-labs/agent-skills#385 ·