You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@plc4x.apache.org by Christofer Dutz <ch...@c-ware.de> on 2020/10/16 07:44:26 UTC

PlcValues ... especially the Bit-String types

Hi all,

I’m currently working on porting the PlcValues to Go and here just stumbled over something.
The PlcBYTE, PlcWORD, PlcDWORD seem to be integer values and not allow accessing the bool values as bit-fields.
I know Ben is still working on his improvements … will this be covered here? Do you have an ETA on when you’ll be able to finish your work?

Another Idea I had, was that we could add a getBitLength() and getBit(int bitIndex) methods to the PlcValue. Booleans are sort of the only types where the Boolean length differs from the length itself.

What do you think?

Chris

Re: PlcValues ... especially the Bit-String types

Posted by Christofer Dutz <ch...@c-ware.de>.
Hi Ben ... 

So do you want to merge your PR? It would really be useful to have that stuff in develop ...

Chris



Am 16.10.20, 10:16 schrieb "Ben Hutcheson" <be...@gmail.com>:

    Hi Chris,

    I have included a getBooleanArray() in each of the PlcBYTE, WORD, DWORD and
    LWORD classes. The refactor PR should be ready.

    Adding getBitLength and getBit methods seem like they could be useful.

    kind Regards

    Ben

    On Fri, Oct 16, 2020 at 3:44 AM Christofer Dutz <ch...@c-ware.de>
    wrote:

    > Hi all,
    >
    > I’m currently working on porting the PlcValues to Go and here just
    > stumbled over something.
    > The PlcBYTE, PlcWORD, PlcDWORD seem to be integer values and not allow
    > accessing the bool values as bit-fields.
    > I know Ben is still working on his improvements … will this be covered
    > here? Do you have an ETA on when you’ll be able to finish your work?
    >
    > Another Idea I had, was that we could add a getBitLength() and getBit(int
    > bitIndex) methods to the PlcValue. Booleans are sort of the only types
    > where the Boolean length differs from the length itself.
    >
    > What do you think?
    >
    > Chris
    >


Re: PlcValues ... especially the Bit-String types

Posted by Ben Hutcheson <be...@gmail.com>.
Hi Chris,

I have included a getBooleanArray() in each of the PlcBYTE, WORD, DWORD and
LWORD classes. The refactor PR should be ready.

Adding getBitLength and getBit methods seem like they could be useful.

kind Regards

Ben

On Fri, Oct 16, 2020 at 3:44 AM Christofer Dutz <ch...@c-ware.de>
wrote:

> Hi all,
>
> I’m currently working on porting the PlcValues to Go and here just
> stumbled over something.
> The PlcBYTE, PlcWORD, PlcDWORD seem to be integer values and not allow
> accessing the bool values as bit-fields.
> I know Ben is still working on his improvements … will this be covered
> here? Do you have an ETA on when you’ll be able to finish your work?
>
> Another Idea I had, was that we could add a getBitLength() and getBit(int
> bitIndex) methods to the PlcValue. Booleans are sort of the only types
> where the Boolean length differs from the length itself.
>
> What do you think?
>
> Chris
>