@@ -349,9 +349,11 @@ void exServer::createAxisPVs(bool is_monitor, int id, int period, const char* ax
349349 }
350350
351351 sprintf (buffer, " %s:%d:%d:%s.NORD" , prefix, period, id, axis);
352+ bool is_edges = (strcmp (axis, " XE" ) == 0 );
352353 pPVI = new pvInfo (0.5 , buffer, static_cast <float >(m_ntc), 1 .0f , " " , aitEnumInt32, 1 );
353354 m_pvList[buffer] = pPVI;
354- exPV* pPV = new NORDPV<int >(*this , *pPVI, true , scanOn, pSPV->getNORD ());
355+ exPV* pPV = (is_monitor ? static_cast <NORDPV<int >*>(new NORDMONPV<int >(*this , *pPVI, true , scanOn, pSPV->getNORD (), id, is_edges)) :
356+ static_cast <NORDPV<int >*>(new NORDSPECPV<int >(*this , *pPVI, true , scanOn, pSPV->getNORD (), id, is_edges)));
355357 pPVI->setPV (pPV);
356358 sprintf (pvAlias, " %s%s" , m_pvPrefix.c_str (), buffer);
357359 this ->installAliasName (*pPVI, pvAlias);
@@ -520,6 +522,7 @@ bool exServer::createSpecPVs(const std::string& pvStr)
520522 }
521523
522524 createAxisPVs (false , spec, period, " X" , m_tof_units);
525+ createAxisPVs (false , spec, period, " XE" , m_tof_units);
523526 createAxisPVs (false , spec, period, " Y" , std::string (" cnt /" ) + m_tof_units); // currently MAX_UNIT_SIZE = 8 for CTRL_DOUBLE calls
524527 createAxisPVs (false , spec, period, " YC" , " cnt" );
525528 createCountsPV (false , spec, period);
@@ -543,6 +546,7 @@ bool exServer::createMonitorPVs(const std::string& pvStr)
543546 }
544547
545548 createAxisPVs (true , mon, period, " X" , m_tof_units);
549+ createAxisPVs (true , mon, period, " XE" , m_tof_units);
546550 createAxisPVs (true , mon, period, " Y" , std::string (" cnt /" ) + m_tof_units); // currently MAX_UNIT_SIZE = 8 for CTRL_DOUBLE calls
547551 createAxisPVs (true , mon, period, " YC" , " cnt" );
548552 createCountsPV (true , mon, period);
@@ -570,8 +574,8 @@ bool exServer::createMonitorPVs(const std::string& pvStr)
570574bool parseSpecPV (const std::string& pvStr, int & spec, int & period, std::string& axis, std::string& field)
571575{
572576 // Assumes period then spectrum
573- pcrecpp::RE spec_per_re (" SPEC:(\\ d+):(\\ d+):(X|YC|Y|C)([.].*)?" );
574- pcrecpp::RE spec_re (" SPEC:(\\ d+):(X|YC|Y|C)([.].*)?" );
577+ pcrecpp::RE spec_per_re (" SPEC:(\\ d+):(\\ d+):(XE| X|YC|Y|C)([.].*)?" );
578+ pcrecpp::RE spec_re (" SPEC:(\\ d+):(XE| X|YC|Y|C)([.].*)?" );
575579
576580 if (!spec_per_re.FullMatch (pvStr, &period, &spec, &axis, &field))
577581 {
@@ -588,8 +592,8 @@ bool parseSpecPV(const std::string& pvStr, int& spec, int& period, std::string&
588592bool parseMonitorPV (const std::string& pvStr, int & mon, int & period, std::string& axis, std::string& field)
589593{
590594 // Assumes period then monitor
591- pcrecpp::RE monitor_per_re (" MON:(\\ d+):(\\ d+):(X|YC|Y|C|S)([.].*)?" );
592- pcrecpp::RE monitor_re (" MON:(\\ d+):(X|YC|Y|C|S)([.].*)?" );
595+ pcrecpp::RE monitor_per_re (" MON:(\\ d+):(\\ d+):(XE| X|YC|Y|C|S)([.].*)?" );
596+ pcrecpp::RE monitor_re (" MON:(\\ d+):(XE| X|YC|Y|C|S)([.].*)?" );
593597 if (!monitor_per_re.FullMatch (pvStr, &period, &mon, &axis, &field))
594598 {
595599 if (!monitor_re.FullMatch (pvStr, &mon, &axis, &field))
0 commit comments