Add data attribute to Alarm object used in Notification messages

Aperta
#655 18 commenti 1 reazione 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
javascript, typescript
Ambito
api

Direzione di ricerca

Start by locating the Alarm object definition in the specification and reading how notification objects and standard alarms are currently described. The proposal calls for adding a data attribute and defining minimum required attributes for the listed standard alarms, so the work is complete when those requirements are specified consistently; the issue does not name files or tests.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement

Current state:
Currently the alarm object used in notification messages lacks the ability to convey values (other than in the message text).
Consider the standard alarm MOB (man overboard), one would expect that the position at which the alarm was raised is included in the alarm object. instead the position can only be added as text in the message which is likely to vary from implementation to implementation and making it more difficult to parse.

{
    "method": ["visual", "sound"],    
    "state": "emergency",    // enum string value
    "message": "Man Overboard!  latitude: 60.2345, longitude: 14.1234"   // position included in message text
}

Proposal:

  • Add an attribute to the Alarm object used in notifications to hold data relevant to an alarm
  • Define minimum required attributes for the standard alarms.

STANDARD ALARMS:

  • 'mob'
  • 'fire'
  • 'sinking'
  • 'flooding'
  • 'collision'
  • 'grounding'
  • 'listing'
  • 'adrift'
  • 'piracy'
  • 'abandon'

Example: vessels.self.notifications.mob

{
    "method": ["visual", "sound"],    
    "state": "emergency",   
    "message": "Man Overboard!",
    "data": {      // optional object to hold addiditonal alarm information
        "position": {"latitude": 60.2345, "longitude": 14.1234}
    }
}
Lingua principale
JavaScript
Stelle
105
Fork
72
Merge medio
11h 49m
PR unite (30g)
5

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di SignalK/specification

Tutte le issue di SignalK/specification

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.