Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
panaaj opened this issue Apr 24, 2023 · 0 comments
Open

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

panaaj opened this issue Apr 24, 2023 · 0 comments

Comments

@panaaj
Copy link
Member

panaaj commented Apr 24, 2023

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}
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant