1 | <?php declare(strict_types=1); |
||
9 | final class Frame |
||
10 | { |
||
11 | public const WIRE_SIZE = 8; |
||
12 | |||
13 | private $size; |
||
14 | private $origin; |
||
15 | private $tagged; |
||
16 | private $addressable; |
||
17 | private $protocolNo; |
||
18 | private $source; |
||
19 | |||
20 | /** |
||
21 | * @param int $size |
||
22 | * @throws InvalidValueException |
||
23 | */ |
||
24 | 29 | private function setSize(int $size): void |
|
32 | |||
33 | /** |
||
34 | * @param int $origin |
||
35 | * @throws InvalidValueException |
||
36 | */ |
||
37 | 25 | private function setOrigin(int $origin): void |
|
45 | |||
46 | /** |
||
47 | * @param int $protocolNo |
||
48 | * @throws InvalidValueException |
||
49 | */ |
||
50 | 21 | private function setProtocolNo(int $protocolNo): void |
|
58 | |||
59 | /** |
||
60 | * @param int $source |
||
61 | * @throws InvalidValueException |
||
62 | */ |
||
63 | 17 | private function setSource(int $source): void |
|
73 | |||
74 | /** |
||
75 | * @param int $size |
||
76 | * @param int $origin |
||
77 | * @param bool $tagged |
||
78 | * @param bool $addressable |
||
79 | * @param int $protocolNo |
||
80 | * @param int $source |
||
81 | * @throws InvalidValueException |
||
82 | */ |
||
83 | 29 | public function __construct(int $size, int $origin, bool $tagged, bool $addressable, int $protocolNo, int $source) |
|
92 | |||
93 | 2 | public function getSize(): int |
|
97 | |||
98 | 2 | public function getOrigin(): int |
|
102 | |||
103 | 2 | public function isTagged(): bool |
|
107 | |||
108 | 2 | public function isAddressable(): bool |
|
112 | |||
113 | 2 | public function getProtocolNo(): int |
|
117 | |||
118 | 2 | public function getSource(): int |
|
122 | } |
||
123 |