Skip to content

Commit

Permalink
API change to PVSupport, likely unused though
Browse files Browse the repository at this point in the history
  • Loading branch information
anjohnson committed Dec 28, 2023
1 parent dbc06c1 commit 035b285
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 11 deletions.
10 changes: 10 additions & 0 deletions documentation/RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@

This document summarizes the changes to the module between releases.

## Release 4.7.2 (UNRELEASED)

* The virtual `init()` method of `class PVSupport` has been made un-virtual, and the base-class
implementation always returns `false` as it should not be used. The `ControlSupport` and
`ScalarAlarmSupport` derived classes already provided their own implementations but needed
different method arguments, so a virtual base-class method couldn't be used anyway.
Those derived classes don't appear to be used internally at all, although they were being
used in Marty Kraimer's exampleCPP repository which is no longer maintained or recommended
for use anyway.

## Release 4.7.1 (EPICS 7.0.8, Dec 2023)

* Added data distributor plugin which can be used for distributing data between
Expand Down
5 changes: 2 additions & 3 deletions src/pv/controlSupport.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,18 @@ class epicsShareClass ControlSupport :
*/
virtual ~ControlSupport();
/**
* @brief Connects to contol fields.
* @brief Connects to control fields.
*
* @param pvValue The field to support.
* @param pvSupport Support specific fields.
* @return <b>true</b> for success and <b>false</b> for failure.
*/
virtual bool init(
bool init(
epics::pvData::PVFieldPtr const & pvValue,
epics::pvData::PVFieldPtr const & pvSupport);
/**
* @brief Honors control fields.
*
*
* @return Returns true is any fields were modified; otherwise false.
*/
virtual bool process();
Expand Down
14 changes: 7 additions & 7 deletions src/pv/pvSupport.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,17 @@ class epicsShareClass PVSupport
*/
virtual ~PVSupport(){}
/**
* @brief Optional initialization method.
* @brief Required initialization method.
*
* Called after PVRecord is created but before record is installed into PVDatabase.
* Implementation classes must define an init() method that must be
* explicitly called by PVRecord classes that use them to provide
* references to the specific fields to be supported. Different support
* will may different fields, so a virtual method cannot be defined in
* this base class to support them, hence this method always fails.
*
* @param pvValue The field to support.
* @param pvSupport Support specific fields.
* @return <b>true</b> for success and <b>false</b> for failure.
*/
virtual bool init(
epics::pvData::PVFieldPtr const & pvValue,
epics::pvData::PVFieldPtr const & pvSupport) {return true;}
bool init() {return false;}
/**
* @brief Optional method for derived class.
*
Expand Down
2 changes: 1 addition & 1 deletion src/pv/scalarAlarmSupport.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class epicsShareClass ScalarAlarmSupport :
* @param pvSupport Support specific fields.
* @return <b>true</b> for success and <b>false</b> for failure.
*/
virtual bool init(
bool init(
epics::pvData::PVFieldPtr const & pvValue,
epics::pvData::PVStructurePtr const & pvAlarm,
epics::pvData::PVFieldPtr const & pvSupport);
Expand Down

0 comments on commit 035b285

Please sign in to comment.