Documentation

PacketSequencer
in package

Table of Contents

Properties

$counter  : int
$start  : SequenceStart
A class for generating packet sequences.

Methods

__construct()  : mixed
Constructs a new PacketSequencer with the provided SequenceStart.
nextSequence()  : int
Returns the next sequence value, updating the sequence counter in the process.
setSequenceStart()  : void
Sets the sequence start, also known as the "starting counter ID".

Properties

Methods

nextSequence()

Returns the next sequence value, updating the sequence counter in the process.

public nextSequence() : int

Note: This is not a monotonic operation. The sequence counter increases from 0 to 9 before looping back around to 0.

Return values
int

The next sequence value.

setSequenceStart()

Sets the sequence start, also known as the "starting counter ID".

public setSequenceStart(SequenceStart $start) : void

Note: This does not reset the sequence counter.

Parameters
$start : SequenceStart

The new sequence start.

Loading…
On this page

Search results