-
Notifications
You must be signed in to change notification settings - Fork 47
Use the typed device support interfaces when available #84
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
Open
anjohnson
wants to merge
1
commit into
epics-modules:master
Choose a base branch
from
anjohnson:use-typed-DSETs
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dumb question, why are this definitions needed? I can't find any calls to write_ao or read_ai.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are typedefs for the record-specific device support entry tables (
dsets) that were first published for these record types in their generated*Record.hheaders in EPICS 7.0.4. Older versions of EPICS didn't allow the*Record.dbdfiles to add anything to the generated header, so the record types defined theirdsets in the*Record.cimplementation code and required device support layers to define them identically or in a compatible way (thestruct aStatsthat I replaced here). However that isn't good modern coding practice, and newer C/C++ compilers are getting more strict and rejecting duplicate definitions like that. They also don't like our oldDEVSUPFUNtypedef, requiring that all function pointers fully define the function being called.The EPICS 7.0.4 release made it possible for device supports to not have to provide or use their own
dsetdefinitions, and the device support routines inside Base are much shorter as a result. However for external modules like iocStats to still build against older EPICS versions the devices have to provide a compatible definition, which is only used when compiling with the old EPICS versions (they didn't define theHAS_aidsetorHAS_aodsetmacros). If you look at the include/aiRecord.h file in EPICS 7.0.4 or later you'll see the same definitions as above.The
read_ai()andwrite_ao()members of theaidsetandaodsetstructures are function pointers (not functions), and get called from their record type'sprocess()routine through theprec->dsetfield. Theprec->dsetfield actually points to the appropriatedevAiStatsordevAoStatstables defined below, so the calls in the record type actually go to theai_read()andao_write()functions as given in those tables.