Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Array type matches are too strict #148

Open
dirk-zimoch opened this issue Sep 21, 2023 · 2 comments
Open

Array type matches are too strict #148

dirk-zimoch opened this issue Sep 21, 2023 · 2 comments

Comments

@dirk-zimoch
Copy link
Contributor

dirk-zimoch commented Sep 21, 2023

Currently, the EPICS type of the array record must match the OPC-UA data type quite precisely. It is not possible to load arrays into a record of a different (even larger) type, e.g. UInt16 into LONG.

This is particularly annoying with arrays of Boolean, as there is no matching EPICS type.

It is no problem to load any scalar integer type into a longin or ai record, even Boolen and unsigned types. The same should be possible for arrays.

@ralphlange
Copy link
Member

This was an intentional design decision, based on performance concerns.

If sizes match, arrays can be copied using memcpy(). If sizes don't match, we need to loop and copy element by element.

@ralphlange
Copy link
Member

For OPC UA Boolean, I think UCHAR arrays work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants