Skip to content

Commit

Permalink
Merge pull request #44 from CDOT-CV/master
Browse files Browse the repository at this point in the history
J2735 2020 Compatibility
  • Loading branch information
dan-du-car authored Jan 3, 2024
2 parents c1c57ed + 4222a1e commit 208257a
Show file tree
Hide file tree
Showing 7 changed files with 133 additions and 127 deletions.
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ The existence of a list is specified by adding .list to the field path where the


###### Optional/Mandatory Fields
The EqualsValue fieldName references the optional field that the field depends on. If the field is optional, the fieldName should reference itself. If the field is manditory assuming another field exists (usually its parent), then that field should be referenced in the fieldName. If the field is manditory regardless of other fields then the EqualsValue condition is not necessary.
The EqualsValue fieldName references the optional field that the field depends on. If the field is optional, the fieldName should reference itself. If the field is mandatory assuming another field exists (usually its parent), then that field should be referenced in the fieldName. If the field is mandatory regardless of other fields then the EqualsValue condition is not necessary.

In the example above, elevationOffset is optional, latOffset is mandatory if crumbData exists, and crumbData{0}.timeOffset is always mandatory.

Expand Down Expand Up @@ -602,7 +602,7 @@ EqualsValue = {"conditions":[{"ifPart":{"fieldName":"metadata.recordGeneratedBy"
```

The following field validation specifies that sequential validation should NOT be enacted on `metadata.serialId.recordId` when the records is from
and `rxMsg` OR the records is _santiized_ (`"metadata.sanitized": "True"`.
and `rxMsg` OR the records is _sanitized_ (`"metadata.sanitized": "True"`.
fields when

```
Expand Down Expand Up @@ -671,7 +671,13 @@ This library is used in the following test and verification applications as of t

## Release Notes

### Release 0.0.8
### Release 0.0.10
- Modified test messages to conform to J2735 2020
- Modified TIM config to conform to J2735 2020
- Fixed some typos in the README
- Fixed typo in unit test name in `validator_integration_test.py`

### Release 0.0.9
- Regular expression validation for strings

### Release 0.0.8
Expand Down
6 changes: 3 additions & 3 deletions odevalidator/configs/config_tim.ini
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ EqualsValue = {"conditions":[{"ifPart":{"fieldName":"payload.data.MessageFrame.v
Type = string
EqualsValue = {"conditions":[{"ifPart":{"fieldName":"payload.data.MessageFrame.value.TravelerInformation.urlB"}}]}

[payload.data.MessageFrame.value.TravelerInformation.dataFrames.TravelerDataFrame.sspTimRights]
[payload.data.MessageFrame.value.TravelerInformation.dataFrames.TravelerDataFrame.notUsed]
Type = decimal
LowerLimit = 0
UpperLimit = 31
Expand Down Expand Up @@ -345,7 +345,7 @@ Type = decimal
LowerLimit = 0
UpperLimit = 527040

[payload.data.MessageFrame.value.TravelerInformation.dataFrames.TravelerDataFrame.duratonTime]
[payload.data.MessageFrame.value.TravelerInformation.dataFrames.TravelerDataFrame.durationTime]
Type = decimal
LowerLimit = 0
UpperLimit = 320000
Expand All @@ -355,7 +355,7 @@ Type = decimal
LowerLimit = 0
UpperLimit = 7

[payload.data.MessageFrame.value.TravelerInformation.dataFrames.TravelerDataFrame.sspLocationRights]
[payload.data.MessageFrame.value.TravelerInformation.dataFrames.TravelerDataFrame.notUsed1]
Type = decimal
LowerLimit = 0
UpperLimit = 31
Expand Down
94 changes: 47 additions & 47 deletions tests/testfiles/bad.json

Large diffs are not rendered by default.

94 changes: 47 additions & 47 deletions tests/testfiles/good.json

Large diffs are not rendered by default.

42 changes: 21 additions & 21 deletions tests/testfiles/good_broadcast_tim.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion tests/validator_integration_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def test_good_bsmTx_file_passes_sequential_checks(self):
results = self._validate_file(data_file, config_file)
assert_results(self, results, 0)

def test_good_braodcast_tim(self):
def test_good_broadcast_tim(self):
data_file = 'tests/testfiles/good_broadcast_tim.json'
config_file = 'odevalidator/configs/config_tim.ini'
results = self._validate_file(data_file, config_file)
Expand Down
10 changes: 5 additions & 5 deletions validate_queue_response_full_sample.json
Original file line number Diff line number Diff line change
Expand Up @@ -295,11 +295,11 @@
"direction": 1111111111111111
}
},
"duratonTime": 2880,
"sspMsgRights1": 1,
"sspMsgRights2": 1,
"sspTimRights": 1,
"sspLocationRights": 1,
"durationTime": 2880,
"notUsed2": 0,
"notUsed3": 0,
"notUsed": 0,
"notUsed1": 0,
"frameType": {
"advisory": ""
},
Expand Down

0 comments on commit 208257a

Please sign in to comment.