-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lean status attributes #189
Comments
Instead of marking some attributes in the SXL as metadata, you could choose at subscription time which attribute should trigger an update. More flexible, but also maybe more complex to implement. |
Here's an example of a status subscription message: {
"mType": "rSMsg",
"type": "StatusSubscribe",
"mId": "d6d97f8b-e9db-4572-8084-70b55e312584",
"ntsOId": "O+14439=481WA001",
"xNId": "",
"cId": "O+14439=481WA001",
"sS": [
{
"sCI": "S0001",
"n": "signalgroupstatus",
"uRt": "5",
"sOc": false
},{
"sCI": "S0001",
"n": "cyclecounter",
"uRt": "5",
"sOc": false
},{
"sCI": "S0001",
"n": "basecyclecounter",
"uRt": "5",
"sOc": false
}
]
} As shown, updateRate and sendOnChange are specified for each attribute. Could we use these two existing flags to indicate that an attribute should only be send when other attributes change?
A possibility would be change that definition to something like:
For example, when you subscribe to S0001, the cyclecounter could be subscribed to as metadata, so you only get a message when the signalgroupstatus attribute change, which will then include the cyclecounter:. {
"mType": "rSMsg",
"type": "StatusSubscribe",
"mId": "d6d97f8b-e9db-4572-8084-70b55e312584",
"ntsOId": "O+14439=481WA001",
"xNId": "",
"cId": "O+14439=481WA001",
"sS": [
{
"sCI": "S0001",
"n": "signalgroupstatus",
"uRt": "0",
"sOc": true
},{
"sCI": "S0001",
"n": "cyclecounter",
"uRt": "0",
"sOc": false
}
]
} The benefit of this would be:
|
Added a PR #197 with the above idea of using uRt=0 and sOc=false to indicate |
I suggest using the word "lean" to describe attributes that don't trigger updates, but are send when other attributes trigger an update. |
Some status mesages include metadata that should not itself trigger a status message.
For example, when you subscribe to signal group status in a TLC, you want a status update whenever any of the signal groups change state. When that happen, you the current cycle counter should be included. See rsmp-nordic/rsmp_sxl_traffic_lights#21
But you don't want a status message each time just the cycle counter changes, but not the actual signal group status. This is already a problem when the cycle counter changes once per second, but it becomes much worse when we want to include the resolution of the cycle counter.
To support this, I suggest we distinguish between data and metadata in status attributes. Attributes marked as 'meta' should not trigger status updates.
The text was updated successfully, but these errors were encountered: