Lines Matching refs:FrameStatus

22 from pw_hdlc.decode import Frame, FrameDecoder, FrameStatus, NO_ADDRESS
39 status: FrameStatus = FrameStatus.OK
42 def error(cls, status: FrameStatus): argument
43 assert status is not FrameStatus.OK
54 status: FrameStatus
68 Expected.error(FrameStatus.FRAMING_ERROR),
69 Expected.error(FrameStatus.FRAMING_ERROR),
120 Expected.error(FrameStatus.FRAMING_ERROR),
125 (b'\x7e1\x7e', [Expected.error(FrameStatus.FRAMING_ERROR)]),
126 (b'\x7e12\x7e', [Expected.error(FrameStatus.FRAMING_ERROR)]),
127 (b'\x7e12345\x7e', [Expected.error(FrameStatus.FRAMING_ERROR)]),
130 [Expected.error(FrameStatus.BAD_ADDRESS)]),
132 (b'\x7e123456\x7e', [Expected.error(FrameStatus.FCS_MISMATCH)]),
134 [Expected.error(FrameStatus.FCS_MISMATCH)]),
136 Expected.error(FrameStatus.FCS_MISMATCH),
141 [Expected.error(FrameStatus.FRAMING_ERROR)]),
144 [Expected.error(FrameStatus.FRAMING_ERROR)]),
147 [Expected.error(FrameStatus.FRAMING_ERROR)]),
149 (b'\x7e\x7d\x7e', [Expected.error(FrameStatus.FRAMING_ERROR)]),
150 (b'\x7e\1\x7d\x7e', [Expected.error(FrameStatus.FRAMING_ERROR)]),
151 (b'\x7e\1\2abc\x7d\x7e', [Expected.error(FrameStatus.FRAMING_ERROR)]),
152 (b'\x7e\1\2abcd\x7d\x7e', [Expected.error(FrameStatus.FRAMING_ERROR)]),
153 (b'\x7e\1\2abcd1234\x7d\x7e', [Expected.error(FrameStatus.FRAMING_ERROR)]),
156 Expected.error(FrameStatus.FRAMING_ERROR),
157 Expected.error(FrameStatus.FRAMING_ERROR),
160 Expected.error(FrameStatus.FRAMING_ERROR),
161 Expected.error(FrameStatus.FRAMING_ERROR),
166 [Expected.error(FrameStatus.FRAMING_ERROR)]),
172 [Expected.error(FrameStatus.FRAMING_ERROR),
175 [Expected.error(FrameStatus.FRAMING_ERROR),
178 (b'Hello?~', [ExpectedRaw(b'Hello?', FrameStatus.FRAMING_ERROR)]),
180 [ExpectedRaw(b'Hel\x7d\x7dlo', FrameStatus.FRAMING_ERROR)]),
181 (b'Hello?~~~~~', [ExpectedRaw(b'Hello?', FrameStatus.FRAMING_ERROR)]),
182 (b'~~~~Hello?~~~~~', [ExpectedRaw(b'Hello?', FrameStatus.FCS_MISMATCH)]),
184 ExpectedRaw(b'Hello?', FrameStatus.FRAMING_ERROR),
185 ExpectedRaw(b'Goodbye', FrameStatus.FCS_MISMATCH),
197 elif frame.status is FrameStatus.BAD_ADDRESS:
232 if frame.ok() or frame.status is FrameStatus.BAD_ADDRESS: