Field Class¶
- class Field¶
Represents a Field within a packet
- __construct(string $description)¶
Creates a new Field
- Parameters:
$description (
string) – The field description
- Returns:
A Field instance
- Return type:
- start(int $start)¶
Set the start bit (zero indexed) of the field
If this method is not called (i.e. the start bit is not set) the field starts immediately after the preceding field or at bit 0 if there are none
- Parameters:
$start (
int) – The start bit
- Returns:
A new instance of
Fieldwith the start bit- Return type:
- end(int $end)¶
Set the end bit (zero indexed) of the field
This method can only be called after
Field::start- Parameters:
$end (
int) – The end bit
- Returns:
A new instance of
Fieldwith the end bit- Return type:
- length(int $length)¶
Set the bit length of the field
This method cannot be called if
Field::endhas been called- Parameters:
$length (
int) – The bit
- Returns:
A new instance of
Fieldwith the bit length- Return type: