Skip to content

Commit

Permalink
Use canonical process variable name.
Browse files Browse the repository at this point in the history
This is important so that notifications for the process variable are
delivered to the right record. The canonical name can differ from the
name specified in the record because it is implicitly converted to a
RegisterPath object and that object might add or remove separators.
  • Loading branch information
smarsching committed Feb 8, 2018
1 parent 3cea5e2 commit 3147ab2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions chimeraTKApp/src/ChimeraTK/EPICS/RecordDeviceSupport.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,13 @@ class RecordDeviceSupportTrait {
device = DeviceRegistry::getDevice(deviceNameAndProcessVariableName.first);
{
boost::unique_lock<boost::recursive_mutex> lock(device->mutex);
processVariableSupport = device->createProcessVariableSupport(
deviceNameAndProcessVariableName.second);
processVariable = device->pvManager->getProcessVariable(
deviceNameAndProcessVariableName.second);
// We use processVariable->getName() so that we use the canonicalized name
// when create the process-variable support. Otherwise, notifications for
// the process variable might not be dispatched to the correct support.
processVariableSupport = device->createProcessVariableSupport(
processVariable->getName());
}
}

Expand Down

0 comments on commit 3147ab2

Please sign in to comment.