Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions schemas/aton.json
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,15 @@
}
]
},
"virtual": {
"$ref": "./definitions.json#/definitions/booleanValue",
"description": "Virtual AtoN flag"
},

"offPosition": {
"$ref": "./definitions.json#/definitions/booleanValue",
"description": "Off position flag"
},
"name": {
"type": "string",
"description": "The aton name",
Expand Down
39 changes: 39 additions & 0 deletions schemas/definitions.json
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,45 @@
}
},

"booleanValue": {
"type": "object",
"description": "Data should be of type boolean.",
"allOf": [{
"$ref": "#/definitions/commonValueFields"
}, {
"properties": {
"value": {
"type": "boolean"
},
"values": {
"type": "object",
"patternProperties": {
".*": {
"$ref": "#/definitions/valuesBooleanValue"
}
}
}
}
}]
},

"valuesBooleanValue": {
"type": "object",
"properties": {
"value": {
"type": "boolean"
},
"timestamp": {
"$ref": "#/definitions/timestamp"
},
"pgn": {
"type": "number"
},
"sentence": {
"type": "string"
}
}
},

"datetimeValue": {
"type": "object",
Expand Down
4 changes: 2 additions & 2 deletions schemas/groups/sensors.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@

"class": {
"$ref": "../definitions.json#/definitions/stringValue",
"pattern_": "^[AB]\\Z",
"description": "AIS transponder class in sensors.ais.class, A or B"
"pattern_": "^[AB]$|^ATON$|^SAR$|^BASE$",
"description": "AIS transponder class in sensors.ais.class"
}
}
}
48 changes: 48 additions & 0 deletions test/data/full-valid/ais.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,54 @@
}
}
},
"aton": {
"urn:mrn:imo:mmsi:993672315": {
"mmsi": "993672315",
"name": "SW @",
"navigation": {
"position": {
"value": {
"longitude": -76.3847132,
"latitude": 38.99384
},
"$source": ".43",
"timestamp": "2017-03-14T19:02:40.451Z",
"pgn": 129041
}
},
"atonType": {
"value": {
"id": 13,
"name": "Beacon, Port Hand"
},
"$source": ".43",
"timestamp": "2017-03-14T19:02:40.451Z",
"pgn": 129041
},
"virtual": {
"value": true,
"$source": ".43",
"timestamp": "2017-03-14T19:02:40.451Z",
"pgn": 129041
},
"offPosition": {
"value": false,
"$source": ".43",
"timestamp": "2017-03-14T19:02:40.451Z",
"pgn": 129041
},
"sensors": {
"ais": {
"class": {
"value": "ATON",
"$source": ".43",
"timestamp": "2017-03-14T19:02:40.451Z",
"pgn": 129041
}
}
}
}
},
"self": "urn:mrn:imo:mmsi:246326000",
"version": "0.1.0",
"sources": {
Expand Down