New Features
- ECM-1240 API support
get_serial_number
set_packet_send_interval
ApiCall
can be used to add support for more APIs outside of this library
- Ability to make GEM API calls without pausing packet sending, making them vastly faster than before. This is experimental for now; pass
send_packet_delay=True
to BidirectionalProtocol
's constructor to enable.
- Support for API calls that have no response (pass
None
for the parser
parameters to ApiCall
)
Fixes
- ECM-1240 serial numbers are now parsed correctly
Breaking Changes
PacketProtocol
no longer has a close()
method. Users should close the transports directly. For example, if self._server
is an asyncio.Server
:
for s in self._server.sockets:
s.shutdown(socket.SHUT_RDWR)
s.close()
BidirectionalProtocol
no longer has send_api_request
and receive_api_response
methods. Instead, there is now an invoke_api
method that takes a Future
which will be completed as soon as the API response comes in. See README.md
for more details on its use. This change allows API responses to be returned to the caller much faster.
- The
serial_number
field for ECM-1240 packets is now treated as a 16-bit little-endian value. Previous versions treated it as a big-endian value. ECM-1240 packets received with this version of the library will thus have a serial number field that is in the opposite byte order from those returned by the previous verson.