SignalK / specification

Signal K is a JSON-based format for storing and sharing marine data from different sources (e.g. nmea 0183, 2000, seatalk, etc)
Other
93 stars 69 forks source link

Add data attribute to Alarm object used in Notification messages #655

Open panaaj opened 1 year ago

panaaj commented 1 year ago

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:

STANDARD ALARMS:

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}
    }
}