Expose a pyserial connection through the automotive stream contract. More...
Public Member Functions | |
| bool | is_connected (self) |
| Return whether the transport is connected. | |
| None | connect (self) |
| Connect the transport. | |
| None | close (self) |
| Close the transport. | |
| None | reset_input_buffer (self) |
| Discard unread input bytes already waiting on the transport. | |
| int | write (self, bytes data) |
| Write bytes to the transport. | |
| None | flush (self) |
| Flush pending output when the transport requires it. | |
| bytes | read (self, int size) |
| Read bytes from the transport. | |
Expose a pyserial connection through the automotive stream contract.
| bool hardware_io.automotive.serial_stream_transport.SerialStreamTransport.is_connected | ( | self | ) |
Return whether the transport is connected.
Reimplemented from hardware_io.automotive.stream_transport_if.StreamTransportIf.
| bytes hardware_io.automotive.serial_stream_transport.SerialStreamTransport.read | ( | self, | |
| int | size | ||
| ) |
Read bytes from the transport.
| size | Maximum number of bytes to read. |
size bytes, or empty bytes on timeout. Reimplemented from hardware_io.automotive.stream_transport_if.StreamTransportIf.
| int hardware_io.automotive.serial_stream_transport.SerialStreamTransport.write | ( | self, | |
| bytes | data | ||
| ) |
Write bytes to the transport.
| data | Bytes to write. |
Reimplemented from hardware_io.automotive.stream_transport_if.StreamTransportIf.