Skip to content

Commit

Permalink
Update RTC's Type (#29)
Browse files Browse the repository at this point in the history
* Update package version

* Updated the schema

* update types to immediate_load, immediate_activate, immediate_command
* remove model from immediate_load and imediate_activate

* Update test
  • Loading branch information
goetzrrGit authored Dec 9, 2024
1 parent 3d4fddd commit d44ba82
Show file tree
Hide file tree
Showing 7 changed files with 77 additions and 19 deletions.
59 changes: 51 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nasa-jpl/seq-json-schema",
"version": "1.1.0",
"version": "1.2.0",
"license": "MIT",
"type": "module",
"repository": {
Expand Down
14 changes: 10 additions & 4 deletions schema.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$id": "https://github.com/NASA-AMMOS/seq-json-schema/tree/v1.1.0",
"$id": "https://github.com/NASA-AMMOS/seq-json-schema/tree/v1.2.0",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$defs": {
"immediate_activate": {
Expand Down Expand Up @@ -34,7 +34,7 @@
"description": "Onboard path and filename of sequence to be loaded."
},
"type": {
"const": "activate"
"const": "immediate_activate"
}
},
"required": ["sequence", "type"],
Expand Down Expand Up @@ -120,12 +120,18 @@
"metadata": {
"$ref": "#/$defs/metadata"
},
"models": {
"items": {
"$ref": "#/$defs/model"
},
"type": "array"
},
"stem": {
"type": "string",
"description": "Command stem"
},
"type": {
"const": "command"
"const": "immediate_command"
}
},
"required": ["stem", "args"],
Expand Down Expand Up @@ -284,7 +290,7 @@
"description": "Onboard path and filename of sequence to be loaded."
},
"type": {
"const": "load"
"const": "immediate_load"
}
},
"required": ["sequence", "type"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"args": [],
"sequence": "d:/eng/test.mod",
"description": "immediate activate with time field",
"type": "activate",
"type": "immediate_activate",
"time": {
"type": "COMMAND_RELATIVE"
}
Expand Down
3 changes: 2 additions & 1 deletion test/invalid-seq-json/immediate-command-with-time.seq.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"args": [],
"time": {
"type": "COMMAND_COMPLETE"
}
},
"type": "immediate_command"
}
]
}
2 changes: 1 addition & 1 deletion test/invalid-seq-json/immediate-load-with-time.seq.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"args": [],
"sequence": "d:/eng/test.mod",
"description": "immediate load with time field",
"type": "load",
"type": "immediate_load",
"time": {
"type": "COMMAND_RELATIVE"
}
Expand Down
14 changes: 11 additions & 3 deletions test/valid-seq-json/rtc.seq.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@
"metadata": {
"processor": "VC1A"
},
"models": [
{
"offset": "00:10:00.000",
"variable": "model_var_float",
"value": "1.62"
}
],
"args": []
},
{
Expand All @@ -42,8 +49,9 @@
"metadata": {
"processor": "VC1A"
},

"args": [],
"type": "command"
"type": "immediate_command"
},
{
"args": [
Expand All @@ -63,7 +71,7 @@
}
],
"sequence": "d:/eng/test.mod",
"type": "activate",
"type": "immediate_activate",
"metadata": {
"metadata_arg": "metadata_value"
}
Expand All @@ -86,7 +94,7 @@
}
],
"sequence": "d:/eng/test.mod",
"type": "load",
"type": "immediate_load",
"metadata": {
"metadata_arg": "metadata_value"
}
Expand Down

0 comments on commit d44ba82

Please sign in to comment.