Add data attribute to Alarm object used in Notification messages

Open
#655 18 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Domain
api

Research direction

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.

Written by the indexing model from the issue text.

Description

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}
    }
}
Dominant language
JavaScript
Stars
105
Forks
72
Avg merge
11h 49m
Merged PRs (30d)
5

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from SignalK/specification

All issues in SignalK/specification

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.