Commit 8493e73
Fix KeyFrame not sent if no changed values (#3367)
* Initial plan
* Fix KeyFrame not sent if no changed values (Issue #2622)
The MessageCount was only incremented in OnMessagePublished() which is only called when a message is actually published. When there are no data changes, no message is published, so MessageCount stayed the same and KeyFrames were never sent after the initial one.
The fix moves the MessageCount increment to IsDeltaFrame() so it tracks publishing intervals instead of actual messages published. This ensures that after KeyFrameCount intervals, a key frame is sent regardless of whether data changed.
Co-authored-by: romanett <[email protected]>
* Address code review: Use direct cast instead of Convert.ToUInt32
Co-authored-by: romanett <[email protected]>
---------
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: romanett <[email protected]>1 parent 2fc1ad1 commit 8493e73
File tree
2 files changed
+61
-3
lines changed- Libraries/Opc.Ua.PubSub
- Tests/Opc.Ua.PubSub.Tests/PublishedData
2 files changed
+61
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| 68 | + | |
68 | 69 | | |
69 | 70 | | |
70 | 71 | | |
| |||
73 | 74 | | |
74 | 75 | | |
75 | 76 | | |
76 | | - | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
77 | 87 | | |
78 | 88 | | |
79 | 89 | | |
| |||
176 | 186 | | |
177 | 187 | | |
178 | 188 | | |
179 | | - | |
| 189 | + | |
180 | 190 | | |
181 | 191 | | |
182 | 192 | | |
183 | 193 | | |
184 | 194 | | |
185 | 195 | | |
186 | | - | |
187 | 196 | | |
188 | 197 | | |
189 | 198 | | |
| |||
Lines changed: 49 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
404 | 404 | | |
405 | 405 | | |
406 | 406 | | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
407 | 456 | | |
408 | 457 | | |
0 commit comments