u9n / dlms-cosem

A Python library for DLMS/COSEM
Other
79 stars 39 forks source link

There is no serial_hdlc client as used in the hdlc_example.py #55

Closed b1r63r closed 2 years ago

b1r63r commented 2 years ago

from dlms_cosem.clients.serial_hdlc import SerialHdlcClient

Should serial_hdlc be hdlc_transport and SerialHdlcClienthere be SerialHdlcTransport, or is there a missing client?

Krolken commented 2 years ago

Ah. Maybe I should remove that file. It is left from when I implemented the hdlc transport but had not yet done the dlms connection.

To get a HDLC connection to the meter use either

from dlms_cosem.clients.dlms_client import DlmsClient
from dlms_cosem.clients.hdlc_transport import SerialHdlcTransport
transport = SerialHdlcTransport(...)
client = DlmsClient(io_interface=transport, ...)

or

client = DlmsClient.with_serial_hdlc_transport(...)
b1r63r commented 2 years ago

thank you for the quick response