rscada / libmbus

Meter-bus library and utility programs
http://www.rscada.se/libmbus
BSD 3-Clause "New" or "Revised" License
217 stars 137 forks source link

Decoding frame data #200

Open rtborg opened 2 years ago

rtborg commented 2 years ago

I'd like to use libmbus in a C project, where data is pulled from a device and sent through another interface. Is there a way to parse/extract all data points from a telegram in a loop? Something like this:

foreach(data d in mbus_frame)
    char *data_type = mbus_frame.next_data_type()
    char *data = mbus_frame.next_data()

Edit: I am porting libmbus for use in an embedded device which does not have a lot of RAM, so my intent is to iterate over the data and send each record out as raw bytes, no decoding.

Thanks