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

Update OPC DA #65

Merged
merged 5 commits into from
Apr 4, 2024
Merged

Update OPC DA #65

merged 5 commits into from
Apr 4, 2024

Conversation

kumajaya
Copy link

@kumajaya kumajaya commented Mar 31, 2024

  • Don't do any unnecessary preventions for string conversion problems
  • Remove items and groups depend on FB config
  • Code refactoring from char* to std::string
  • Proper memory usage and deallocation

kumajaya added 2 commits April 2, 2024 08:52
Change SOpcItemData structure really fix unpredictable string
conversion problems. Don't do any further unnecessary preventions.

This commit also adds a copyright statement to the corresponding
changed files.
It is possible to create an FB without a read group or without a
write group.
@kumajaya
Copy link
Author

kumajaya commented Apr 3, 2024

@azoitl @MartinMelikMerkumians
I hope my understanding to const std::string& is correct:

  • No copy.
  • No allocation in the heap.
  • Quick behavior.
  • Inform developers that the variable is not altered.

Reference: https://grapeprogrammer.com/const_string_reference_cpp/

@azoitl
Copy link
Contributor

azoitl commented Apr 3, 2024

@azoitl @MartinMelikMerkumians I hope my understanding to const std::string& is correct:

* No copy.

* No allocation in the heap.

* Quick behavior.

* Inform developers that the variable is not altered.

Reference: https://grapeprogrammer.com/const_string_reference_cpp/

Yes this is my understanding of const references to std::string.

There is an exception to this rule: When C++ compiler could apply the move semantics to transfer the string's content into a newly created object then a pass by value is more efficient. Am I right @MartinMelikMerkumians ?

@azoitl azoitl merged commit 2d765de into eclipse-4diac:develop Apr 4, 2024
4 checks passed
@kumajaya kumajaya deleted the update/opcda-1 branch April 4, 2024 12:59
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

Successfully merging this pull request may close these issues.

3 participants