I need to send to meter raw PDU packet (of course with HDLC header) for example
06010227C8010301
Currently if I want to write some values to meter I have to parse this message by hand and create appropriate objects in my C++ code (for example CGXDLMSVariant, DLMS_OBJECT_TYPE, attribute id) and call appropriate method (for example CGXDLMSClient::Write, CGXDLMSClient::Method, ...). I have definitions of commands in such raw format. Possibly internal structure of commands can be more complicated in comparison with example above (for example setting more objects simultaneously or complicated object model including nested data structures or arrays). I don't want to write PDU parser by hand if possible. Just want add all necessary headers to PDU packet, send it to meter, and read answer.
I am using this library but only for simple settings which are hardcoded in my software. Problem is PDU command can change from one version of firmware to another. I want my program to be configurable with the raw PDU packet (provided by meter manufacturer) as parameter. I don't know which function should I call to send raw PDU packet. For example something like this:
All command are defined in standard and we are supporting them all.
What you need to ask from the manufacturer is this:
1.Is Logical Name or Short Name referencing used?
2. What is Client Address?
3. What Is Server Address?
4. Is meter using HDLC or WRAPPER framing.
That is all what you need to know to read your meter. Of course if you are using ciphered connection then there are secure settings that must be correct.
send raw PDU to meter
Hi,
Why you don't use ANSI C++ library? Why you are parsing messages?
https://github.com/gurux/gurux.dlms.cpp
BR,
Mikko
I am using this library but
I am using this library but only for simple settings which are hardcoded in my software. Problem is PDU command can change from one version of firmware to another. I want my program to be configurable with the raw PDU packet (provided by meter manufacturer) as parameter. I don't know which function should I call to send raw PDU packet. For example something like this:
Send(std::string pdu_packet_as_string)
{
...
}
Ján Kolár
Hi,
All command are defined in standard and we are supporting them all.
What you need to ask from the manufacturer is this:
1.Is Logical Name or Short Name referencing used?
2. What is Client Address?
3. What Is Server Address?
4. Is meter using HDLC or WRAPPER framing.
That is all what you need to know to read your meter. Of course if you are using ciphered connection then there are secure settings that must be correct.
BR,
Mikko