Hi everyone,

I think that the second option, using some type of standard definition for
"plc4x-types", may facilitate the development of protocols.

As an example the definition of Scalar types in [1].

Best regards,

1.
http://epics-pvdata.sourceforge.net/alpha/normativeTypes/normativeTypes.html



El sáb., 28 dic. 2019 a las 4:19, Christofer Dutz (<
christofer.d...@c-ware.de>) escribió:

> Hi all,
>
> while porting the code to use the PlcValue objects I did notice when
> updating all existing PlcFieldHandlers that the code looks sort of almost
> the same.
> While I would say the S7FieldHandler is by far the most advanced one
> (actually checking the data has the right type and doing range checks for
> every element).
>
> How about moving most of this code to a base class?
> I did notice that an essential part of this are the internal types defined
> by every protocol. But these types might have different names, but in
> general they do have the same meaning.
>
> So how about we define an Enum with the different types and then either
> use them in the drivers or simply provide a mapping of driver types to
> plc4x-types?
>
> I know that writing the FieldHandler was something that required a lot of
> code and coding … this way we could reuse the code and simplify things
> greatly when writing new drivers?
>
> Of course will there be fields that don’t fit this schema, especially for
> KNX and BACnet, but most of the other drivers could easily reuse the code.
>
> What do you think?
>
>
> Chris
>


-- 
*CEOS Automatización, C.A.*
*GALPON SERVICIO INDUSTRIALES Y NAVALES FA, C.A.,*
*PISO 1, OFICINA 2, AV. RAUL LEONI, SECTOR GUAMACHITO,*

*FRENTE A LA ASOCIACION DE GANADEROS,BARCELONA,EDO. ANZOATEGUI*
*Ing. César García*
*Cel: 0416-681.03.99*

*Cel: 0414-760.98.95*

*Hotline Técnica SIEMENS: 0800 1005080*

*Email: support.aan.automat...@siemens.com
<support.aan.automat...@siemens.com>*

Reply via email to