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
103 changes: 103 additions & 0 deletions schemas/groups/propulsion.json
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,109 @@
"description": "Exhaust temperature",
"$ref": "../definitions.json#/definitions/numberValue",
"units": "K"
},
"diagnostics": {
"type": "object",
"description": "Diagnostics reported by the engine controller: fault lamp states and active diagnostic trouble codes (e.g. J1939 DM1)",
"properties": {
"malfunctionLamp": {
"type": "object",
"description": "Malfunction indicator lamp (emissions-related fault). True when the lamp is commanded on, steady or flashing",
"allOf": [
{
"$ref": "../definitions.json#/definitions/commonValueFields"
},
{
"properties": {
"value": {
"type": "boolean"
}
}
}
]
},
"redStopLamp": {
"type": "object",
"description": "Red stop lamp (fault severe enough to stop the engine). True when the lamp is commanded on, steady or flashing",
"allOf": [
{
"$ref": "../definitions.json#/definitions/commonValueFields"
},
{
"properties": {
"value": {
"type": "boolean"
}
}
}
]
},
"amberWarningLamp": {
"type": "object",
"description": "Amber warning lamp (fault that does not require an immediate stop). True when the lamp is commanded on, steady or flashing",
"allOf": [
{
"$ref": "../definitions.json#/definitions/commonValueFields"
},
{
"properties": {
"value": {
"type": "boolean"
}
}
}
]
},
"protectLamp": {
"type": "object",
"description": "Protect lamp (problem with an engine system, e.g. high coolant temperature). True when the lamp is commanded on, steady or flashing",
"allOf": [
{
"$ref": "../definitions.json#/definitions/commonValueFields"
},
{
"properties": {
"value": {
"type": "boolean"
}
}
}
]
},
"activeCodes": {
"type": "object",
"description": "Active diagnostic trouble codes. Each entry identifies the faulting parameter (SPN), the failure mode (FMI) and how often it has occurred",
"allOf": [
{
"$ref": "../definitions.json#/definitions/commonValueFields"
},
{
"properties": {
"value": {
"type": "array",
"items": {
"type": "object",
"properties": {
"spn": {
"type": "number",
"description": "Suspect Parameter Number identifying the faulting parameter"
},
"fmi": {
"type": "number",
"description": "Failure Mode Identifier describing how the parameter failed"
},
"occurrenceCount": {
"type": "number",
"description": "How many times this fault has occurred"
}
}
}
}
}
}
]
}
}
}
}
}
Expand Down
90 changes: 64 additions & 26 deletions test/data/vessel-valid/propulsion-sample.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
"value": 1100,
"timestamp": "2014-08-15T19:00:15.402Z",
"$source": "foo.bar"

}
},
"state": {
Expand All @@ -59,29 +58,37 @@
"units": "Hz",
"displayName": "Tachometer",
"shortName": "RPM",
"warnMethod": ["visual"],
"alarmMethod": ["sound"],
"zones": [{
"upper": 8,
"state": "warn",
"message": "Engine stopped or rpm very slow!"
}, {
"lower": 50,
"upper": 58.33333333333,
"state": "warn",
"message": "Engine near maximum rpm!"
}, {
"lower": 58.33333333333,
"upper": 66.66666666666667,
"state": "alarm",
"message": "Engine exceeds maximum rpm!"
}, {
"lower": 66.66666666666667,
"state": "alarm",
"message": "Engine exceeds maximum rpm!"
}]
"warnMethod": [
"visual"
],
"alarmMethod": [
"sound"
],
"zones": [
{
"upper": 8,
"state": "warn",
"message": "Engine stopped or rpm very slow!"
},
{
"lower": 50,
"upper": 58.33333333333,
"state": "warn",
"message": "Engine near maximum rpm!"
},
{
"lower": 58.33333333333,
"upper": 66.66666666666667,
"state": "alarm",
"message": "Engine exceeds maximum rpm!"
},
{
"lower": 66.66666666666667,
"state": "alarm",
"message": "Engine exceeds maximum rpm!"
}
]
}

},
"oilPressure": {
"value": 110,
Expand All @@ -102,13 +109,11 @@
"value": 200,
"timestamp": "2014-08-15T19:00:15.402Z",
"$source": "foo.bar"

},
"engineTorque": {
"value": 200,
"timestamp": "2014-08-15T19:00:15.402Z",
"$source": "foo.bar"

},
"oilTemperature": {
"value": 345,
Expand Down Expand Up @@ -156,7 +161,40 @@
"timestamp": "2014-08-15T19:00:15.402Z",
"$source": "foo.bar"
}
},
"diagnostics": {
"malfunctionLamp": {
"value": false,
"timestamp": "2014-08-15T19:00:15.402Z",
"$source": "foo.bar"
},
"redStopLamp": {
"value": true,
"timestamp": "2014-08-15T19:00:15.402Z",
"$source": "foo.bar"
},
"amberWarningLamp": {
"value": false,
"timestamp": "2014-08-15T19:00:15.402Z",
"$source": "foo.bar"
},
"protectLamp": {
"value": false,
"timestamp": "2014-08-15T19:00:15.402Z",
"$source": "foo.bar"
},
"activeCodes": {
"value": [
{
"spn": 100,
"fmi": 1,
"occurrenceCount": 3
}
],
"timestamp": "2014-08-15T19:00:15.402Z",
"$source": "foo.bar"
}
}
}
}
}
}