Commit 0591d24
RTPS: Handle SequenceNumber_t correctly
As per DDS-RTPS specification, `firstSN` (named `firstAvailableSeqNum` in scapy) and `lastSN` (named `lastSeqNum` in scapy) fields of a Heartbeat submessage are of type `SequenceNumber_t`, which consists of two subfields, namely, `int32_t high` and `uint32_t low`. This change allows us to correctly assign values to fields.
For example, currently, `firstAvailableSeqNum = 0x01` is packed as `\x00\x00\x00\x01\x00\x00\x00\x00`, which is semantically wrong.
With the change, it is packed as `\x00\x00\x00\x00\x01\x00\x00\x00`.1 parent ca5a069 commit 0591d24
2 files changed
+46
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | 28 | | |
30 | 29 | | |
31 | 30 | | |
| |||
396 | 395 | | |
397 | 396 | | |
398 | 397 | | |
399 | | - | |
400 | | - | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
401 | 406 | | |
402 | 407 | | |
403 | 408 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
405 | 405 | | |
406 | 406 | | |
407 | 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 | + | |
0 commit comments