packet_sequencer
PacketSequencer
A class for generating packet sequences.
Source code in src/eolib/packet/packet_sequencer.py
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
|
__init__(start)
Constructs a new PacketSequencer with the provided SequenceStart.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
start |
SequenceStart
|
The sequence start. |
required |
Source code in src/eolib/packet/packet_sequencer.py
10 11 12 13 14 15 16 17 18 |
|
next_sequence()
Returns the next sequence value, updating the sequence counter in the process.
Note
This is not a monotonic operation. The sequence counter increases from 0 to 9 before looping back around to 0.
Returns:
Name | Type | Description |
---|---|---|
int |
int
|
The next sequence value. |
Source code in src/eolib/packet/packet_sequencer.py
20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
|
set_sequence_start(start)
Sets the sequence start, also known as the "starting counter ID".
Note
This does not reset the sequence counter.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
start |
SequenceStart
|
The new sequence start. |
required |
Source code in src/eolib/packet/packet_sequencer.py
35 36 37 38 39 40 41 42 43 44 45 |
|