Skip to content

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

@panaaj

Description

@panaaj

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions