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

Suggestion: Extend JSON_TO_STRUCT/STRUCT_TO_JSON to have optional GPL_JSON arguments #6

Open
JBrO910 opened this issue Jun 20, 2024 · 3 comments

Comments

@JBrO910
Copy link

JBrO910 commented Jun 20, 2024

Hi,
my background lays in other programming languages where it is usually not appropriate to manually change the source code of libraries. That's why I was a bit perplexed when it is encouraged to change the values of GPL_JSON to suit my needs.
So I was wondering if it is possible to have optional arguments for the JSON_TO_STRUCT and STRUCT_TO_JSON function blocks. I would be fine if the GPL_JSON stays the way it is (for default values perhaps) but I think it would be nice to offer the option to bypass this values when creating objects out of these function blocks.

Thanks in advance!

@stefandreyer
Copy link
Owner

Hi,

what is your goal? creat objects in different size?

BR

@JBrO910
Copy link
Author

JBrO910 commented Jun 25, 2024

Hey,
that would make it possible but that was not my goal. Instead, my original goal is that these GPL_JSON values do not need to be changed manually in the source code. In my opinion it is not an elegant solution that I have to go in the libary to increase the value size for example.
Like I said, I am used to other prgramming languages where it is not appropriate to change the source code of external libraries. I am not sure if this is a normal process in CODESYS however.

Best regards,
Jonathan

@stefandreyer
Copy link
Owner

Hi,

the smat thing is, you can change these var of a library in you project. All vars in a parameter var list can be changed independed for each project on there needs:

image

Is this what you whanted?

BR Stefan

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