1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
"""
schemas: Alert message sent on fault detection
"""
alert_schema = {
"type": "object",
"properties": {
"message_type": {
"type": "string",
"description": "Type of message",
"example": "alert",
"enum": ["alert"],
},
"code": {
"type": "integer",
"description": "Alert code",
"example": 345,
},
"platform_ID": {
"type": "string",
"description": "Unique identifier for this platform",
"example": "usvdecibel",
},
"platform_timestamp": {
"type": "string",
"format": "date-time",
"description": "Timestamp for onboard platform status message",
"example": "2022-12-21T00:00:00Z",
},
"subsystem": {
"type": "string",
"description": "System that generated the alert",
"example": "Onboard Fault Monitor",
},
"summary": {
"type": "string",
"description": "High level description of the alert",
"example": "Steering Damage - Port Side",
},
"details": {
"type": "string",
"description": "Detailed reason for the alert ",
"example": "Discrepancy between rudder and actuator positions"
+ " : Rudder Pos=10.31°, Steering Actuator Pos=28.65°, Discrepancy=18.33°",
},
"severity": {
"type": "string",
"description": "Severity level of alert",
"example": "Alarm",
"enum": ["Emergency", "Alarm", "Warning", "Caution"],
},
},
"required": [
"message_type",
"platform_ID",
"code",
"severity",
],
}