rsmp-nordic / rsmp_core

RSMP core specification
MIT License
6 stars 1 forks source link

aggregated status needs clarification #109

Open sveitech opened 1 year ago

sveitech commented 1 year ago

The documentation on aggregated status (4.4.2.1.1. State) could use a more detailed language.

Example 1: Bit 2 (Supervision system has no contact with the site) and bit 8 (site is not connected to the supervision system). What does this mean? How would the site know the supervision system cannot reach it? The site can only see that it is not receiving Ack messages. Bit 8, not connected, is this also communication disruption, or does it mean that RSMP is running, but no Supervision system IP has been configured?

Example 2: Bit 6 and Bit 7: "The site is connected and is currently in use", "The site is connected but is currently not in use". The aggregated message uses bits (instead of text-fields for example), assumedly for optimization, but why then use 2 bits for what would be one state here? It could be 1 = connected, 0 = disconnected. This leads to the question: can both bits be active at the same time? If not, the spec should detail which bits are mutually exclusive.

Also from the spec:

It is technically valid in RSMP to set the boolean elements to a nonsensical values, e.g. all boolean elements to false, but it is not defined how to interpret it at the receiving end

This SHOULD be defined. See above. This is a specification, not an essay. Define "non-sensical".

otterdahl commented 1 year ago

Example 1: Bit 2 (Supervision system has no contact with the site) and bit 8 (site is not connected to the supervision system). What does this mean? How would the site know the supervision system cannot reach it? The site can only see that it is not receiving Ack messages. Bit 8, not connected, is this also communication disruption, or does it mean that RSMP is running, but no Supervision system IP has been configured?

The 8 status bits are defined from the supervision system's point of view. They are defined the same way from the equipment all the way up to national traffic center. In reality, bit 2 and bit 8 can not be transferred using RSMP. I agree that this should be included in the spec.

Example 2: Bit 6 and Bit 7: "The site is connected and is currently in use", "The site is connected but is currently not in use". The aggregated message uses bits (instead of text-fields for example), assumedly for optimization, but why then use 2 bits for what would be one state here? It could be 1 = connected, 0 = disconnected.

The 8 status bits are 100% copy of the bits used by the National Traffic management system used at Trafikverket, and that is defined by a separate document "Integration NTS" (TDOK 2019:0316). You can find it here by searching for 2019:0316 in the field "TDOK-nummer". In other words, we didn't define them ourselves. I agree that there are room for optimizations, at this point there is little to gain from it.

This leads to the question: can both bits be active at the same time? If not, the spec should detail which bits are mutually exclusive.

No, they can't.

Also from the spec:

It is technically valid in RSMP to set the boolean elements to a nonsensical values, e.g. all boolean elements to false, but it is not defined how to interpret it at the receiving end

This SHOULD be defined. See above. This is a specification, not an essay. Define "non-sensical".

Yes, I agree. We can more clear about this and improve the specification.

sveitech commented 1 year ago

Thank you for the clarification.

emiltin commented 12 months ago

Let's check if some of Davids explanations should be integrated into the spec.