Closed emiltin closed 2 days ago
Causes the test: Site::Traffic Light Controller Operational emergency stage is read with S0006
to fail with: Did not receive status response within 60s
@otterdahl is the implementation or the spec wrong here? does it makes sense that an integer must always be send, even if status=false?
RSMP version | How to handle undefined/unknown values? | What can "s" be set to? |
---|---|---|
<= 3.1.2 | undefined | integer |
3.1.3 | "q" should be set to "undefined" or "unknown" | integer |
3.1.4 and later | "q" should be set to "undefined" or "unknown" | integer or null if undefined/unknown |
ok, the current spec must be updated then to state that an integer OR null can be passed. currenty it status that is must be an integer: https://rsmp-nordic.org/rsmp_specifications/rsmp_sxl_traffic_lights/1.0.15/sxl_traffic_light_controller.html#s0006
do you mean null or an empty string?
hm since you say this is from core 3.1.4 or later this must be in the core spec? and as such relate to all statues?
i cannot find where in the core spec it's stated that null can be send for status values?
i cannot where in the core spec it's stated that null can be send for status values?
In chapter http://rsmp-nordic.org/rsmp_specifications/core/3.2-draft/applicability/basic_structure.html#return-values-returnvalue, and look for the table that defines q
:
Value | Description |
---|---|
recent | The value is up to date |
old | The value is not up to date. Used when sending buffered values |
undefined | The component does not exist and no subscription will be performed. s should be set to null. |
unknown | The value is unknown and no subscription will be performed. s should be set to null. |
do you mean null or an empty string?
I mean null, not empty string ("")
searching the core spec for "null" shows only one result in section 4.4:
Empty values are sent as “” for simple values and as [] for arrays. Optional values can be omitted, but can not be sent as null unless otherwise stated.
Where does the spec state that null can be used for 's' in status updates?
searching the core spec for "null" shows only one result in section 4.4: ... Where does the spec state that null can be used for 's' in status updates?
Searching for null
doesn't seem to be working for some reason. But it is present in chapter http://rsmp-nordic.org/rsmp_specifications/core/3.2-draft/applicability/basic_structure.html#return-values-returnvalue, and look for the table that defines q. You need to scroll a bit to right in the table in the HTML version, but it does show up more clearly in the PDF version. Perhaps we should rearrange/clarify this to make it better
ah, weird that searching is not working.
the table above defining s
should be amended to note that when it should be null. Right now it just states 'Value'
I've updated the draft
I assume this can be closed since ITC-3 passes the validator?
Confirmed, the ITC returns an integer.
Note: the emergecystate attribute is deprecated.
2021-10-26T13:17:25.002Z 47678 KK+AG9998=001TC000 KK+AG9998=001TC000 60cb Received invalid StatusUpdate, schema errors: /sS/1/s, pattern, {"mType":"rSMsg","type":"StatusUpdate","mId":"60cbbe80-207a-44b5-a9a2-e20577ca045d","ntsOId":"KK+AG9998=001TC000","xNId":"","cId":"KK+AG9998=001TC000","sTs":"2021-10-26T13:15:41.213Z","sS":[{"sCI":"S0006","n":"status","s":"False","q":"recent"},{"sCI":"S0006","n":"emergencystage","s":"","q":"recent"}]}
emergencystage is empty, but according to the spec it must be an integer: https://rsmp-nordic.org/rsmp_specifications/rsmp_sxl_traffic_lights/1.0.15/sxl_traffic_light_controller.html#s0006