plc4x-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christofer Dutz <christofer.d...@c-ware.de>
Subject [DISCUSS] Introduce a "RawPlcValue" in the API?
Date Thu, 04 Mar 2021 09:35:57 GMT
Hi all,

In PLC4X we have PLCValues ... mostly we default to sort of a raw byte-array PlcValue if no
type information is provided.
Now in Go we have the problem, that we can only access types in the api (As if in the Java
version we could only access the types in the plc4j-api module)

This is a problem for me in PLC4Go ... as I'm for example getting incoming events from the
KNX bus without any type information so I'm getting byte arrays. The application knows the
types a given GroupAddressValue should have. Unfortunately, I can't access the ReadBuffer
and the DataIo types as these are internal.
So instead of making them public (which I would consider a really bad practice), I was thinking
if we should provicd a new "RawPlcValue" PlcValueType for exactly these cases.
It would be a normal Byte-Array PLCValue but also have some additional methods/functions provided
by the driver which allow parsing the raw content as a given datatype (provided as string
argument).

What do you think?

Chris

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message