diff --git a/.gitattributes b/.gitattributes index bf25f3a9b06f6fb5069297225aabd445752753b5..d6ce0a1d8e7c9b1405ddb49c3859b452353d3875 100644 --- a/.gitattributes +++ b/.gitattributes @@ -204,6 +204,8 @@ MAC/APL/_GSO/MACScheduler/src/MACScheduler.conf.in -text svneol=native#applicati MAC/APL/_GSO/MACScheduler/src/MACScheduler.log_prop.in -text svneol=native#application/octet-stream MAC/APL/_GSO/MACScheduler/src/Makefile.am -text svneol=native#application/octet-stream MAC/APL/_GSO/MACScheduler/src/SAS_Protocol.prot -text svneol=native#application/octet-stream +MAC/APL/_GSO/MACScheduler/test/CCU_increment1.btsw -text svneol=native#application/octet-stream +MAC/APL/_GSO/MACScheduler/test/CCU_increment1.prot -text svneol=native#application/octet-stream MAC/APL/_VIC/VirtualInstrument/Makefile.am -text svneol=native#application/octet-stream MAC/APL/_VIC/VirtualInstrument/bootstrap -text svneol=native#application/octet-stream MAC/APL/_VIC/VirtualInstrument/configure.in -text svneol=native#application/octet-stream diff --git a/MAC/APL/APLCommon/include/APL/APLCommon/APLUtilities.h b/MAC/APL/APLCommon/include/APL/APLCommon/APLUtilities.h index 72dc095d0f36963e27245cb3a86b6953bc251d32..bb6f50e6e79bd6f3ec7fbdfd547e7ed7aff37aff 100644 --- a/MAC/APL/APLCommon/include/APL/APLCommon/APLUtilities.h +++ b/MAC/APL/APLCommon/include/APL/APLCommon/APLUtilities.h @@ -24,6 +24,7 @@ #define APLUtilities_H //# Includes +#include <time.h> //# Common Includes #include <Common/lofar_vector.h> #include <Common/lofar_string.h> @@ -49,6 +50,7 @@ class APLUtilities static void decodeCommand(const string& commandString, string& command, vector<string>& parameters); static void string2Vector(const string& parametersString, vector<string>& parameters); + static time_t getUTCtime(); protected: // protected copy constructor diff --git a/MAC/APL/APLCommon/include/APLCommon/APLUtilities.h b/MAC/APL/APLCommon/include/APLCommon/APLUtilities.h index 72dc095d0f36963e27245cb3a86b6953bc251d32..bb6f50e6e79bd6f3ec7fbdfd547e7ed7aff37aff 100644 --- a/MAC/APL/APLCommon/include/APLCommon/APLUtilities.h +++ b/MAC/APL/APLCommon/include/APLCommon/APLUtilities.h @@ -24,6 +24,7 @@ #define APLUtilities_H //# Includes +#include <time.h> //# Common Includes #include <Common/lofar_vector.h> #include <Common/lofar_string.h> @@ -49,6 +50,7 @@ class APLUtilities static void decodeCommand(const string& commandString, string& command, vector<string>& parameters); static void string2Vector(const string& parametersString, vector<string>& parameters); + static time_t getUTCtime(); protected: // protected copy constructor diff --git a/MAC/APL/APLCommon/src/APLUtilities.cc b/MAC/APL/APLCommon/src/APLUtilities.cc index e0e403856c5e910234a145ce8d08032993405d92..d20ae514e5f1a34407da392cb9b6b9b869ae6c0b 100644 --- a/MAC/APL/APLCommon/src/APLUtilities.cc +++ b/MAC/APL/APLCommon/src/APLUtilities.cc @@ -74,3 +74,14 @@ void APLUtilities::string2Vector(const string& parametersString, vector<string>& } } while(delim<parametersStringLen); } + +time_t APLUtilities::getUTCtime() +{ + time_t curr=time(0);// current local time + tm local=*gmtime(&curr);// convert curr to GMT, store as tm + local.tm_isdst = -1; // A negative value for tm_isdst shall cause mktime() + // to attempt to determine whether Daylight Savings Time + // is in effect for the specified time. + time_t utc=(mktime(&local));// convert GMT tm to GMT time_t + return utc; +} diff --git a/MAC/APL/APLCommon/src/LogicalDevice.cc b/MAC/APL/APLCommon/src/LogicalDevice.cc index 155579387f7b35f7f3d81e33144de9c9a32a3082..1ba4e87e50611114d767252db75a64b8bbb94c9e 100644 --- a/MAC/APL/APLCommon/src/LogicalDevice.cc +++ b/MAC/APL/APLCommon/src/LogicalDevice.cc @@ -133,7 +133,6 @@ LogicalDevice::LogicalDevice(const string& taskName, const string& parameterFile PS_CAT_TEMPORARY, &m_propertySetAnswer)); m_propertySet->enable(); - LOG_TRACE_FLOW(formatString("LogicalDevice(%s)::LogicalDevice end",getName().c_str())); } @@ -341,7 +340,8 @@ void LogicalDevice::handlePropertySetAnswer(::GCFEvent& answer) time_t LogicalDevice::_decodeTimeParameter(const string& timeStr) const { - time_t returnTime=time(0); + // specified times are in UTC, seconds since 1-1-1970 + time_t returnTime=APLUtilities::getUTCtime(); string::size_type plusPos = timeStr.find('+'); if(plusPos != string::npos) { @@ -359,7 +359,7 @@ void LogicalDevice::_schedule() // // set timers // specified times are in UTC, seconds since 1-1-1970 - time_t timeNow = time(0); + time_t timeNow = APLUtilities::getUTCtime(); time_t prepareTime = _decodeTimeParameter(m_parameterSet.getString("prepareTime")); time_t startTime = _decodeTimeParameter(m_parameterSet.getString("startTime")); time_t stopTime = _decodeTimeParameter(m_parameterSet.getString("stopTime")); @@ -464,7 +464,7 @@ void LogicalDevice::_sendToAllChilds(::GCFEvent& event) } catch(Exception& e) { - LOG_FATAL(formatString("Fatal error while sending message to child %s: %s",it->first.c_str(),e.message().c_str())); + LOG_FATAL(formatString("(%s) Fatal error while sending message to child %s",e.message().c_str(),it->first.c_str())); } ++it; } @@ -575,7 +575,6 @@ void LogicalDevice::_handleTimers(::GCFEvent& event, ::GCFPortInterface& port) } catch(Exception& e) { - LOG_WARN(formatString("retryTimeout parameter not found. Using %d",e.message().c_str(),retryTimeout)); } // loop through the buffered events and try to send each one. @@ -676,7 +675,7 @@ void LogicalDevice::_sendScheduleToClients() } catch(Exception& e) { - LOG_FATAL(formatString("Fatal error while scheduling child: %s",e.message().c_str())); + LOG_FATAL(formatString("(%s) Fatal error while scheduling child",e.message().c_str())); } ++it; } @@ -704,7 +703,7 @@ void LogicalDevice::_sendScheduleToClients() } catch(Exception& e) { - LOG_FATAL(formatString("Fatal error while scheduling child: %s",e.message().c_str())); + LOG_FATAL(formatString("(%s) Fatal error while scheduling child",e.message().c_str())); } ++it; } @@ -721,7 +720,7 @@ string LogicalDevice::_getShareLocation() const } catch(Exception& e) { - LOG_WARN(formatString("Sharelocation parameter not found. Using /home/lofar/MACTransport/",e.message().c_str())); + LOG_WARN(formatString("(%s) Sharelocation parameter not found. Using /home/lofar/MACTransport/",e.message().c_str())); } return shareLocation; } @@ -776,7 +775,7 @@ string LogicalDevice::_getShareLocation() const } catch(Exception& e) { - LOG_FATAL(formatString("Unable to create child %s",(*chIt).c_str())); + LOG_FATAL(formatString("(%s) Unable to create child %s",e.message().c_str(),(*chIt).c_str())); } } diff --git a/MAC/APL/Makefile.am b/MAC/APL/Makefile.am index 677c202f5e1d1bd5f8db7f95774ee78d1853384e..ea616979a996264f7e0fc696f8d8ea83c1e3ab8d 100644 --- a/MAC/APL/Makefile.am +++ b/MAC/APL/Makefile.am @@ -1,5 +1,6 @@ SUBDIRS= \ APLCommon \ + GSO \ PIC \ PAC \ VIC diff --git a/MAC/APL/PAC/_VirtualTelescope/src/AVTLogicalDeviceScheduler.cc b/MAC/APL/PAC/_VirtualTelescope/src/AVTLogicalDeviceScheduler.cc index dbf02535a6fb3c4cd89824dd2f1f7eb9b88644f1..f65f03b913ca53a50f9421545f837ddc814eac5d 100644 --- a/MAC/APL/PAC/_VirtualTelescope/src/AVTLogicalDeviceScheduler.cc +++ b/MAC/APL/PAC/_VirtualTelescope/src/AVTLogicalDeviceScheduler.cc @@ -201,9 +201,7 @@ bool AVTLogicalDeviceScheduler::submitSchedule(const unsigned long scheduleId,co boost::posix_time::time_duration startDelay = boost::posix_time::seconds(2*prepareDelayInt); boost::posix_time::time_duration stopDelay = boost::posix_time::seconds(3*prepareDelayInt); - time_t timeNow = time(0); - struct tm* utcTimeStruct = gmtime(&timeNow); - time_t utcTime = mktime(utcTimeStruct); + time_t utcTime = AVTUtilities::getUTCtime(); boost::posix_time::ptime curUTCtime = boost::posix_time::from_time_t(utcTime); boost::posix_time::ptime startTime = boost::posix_time::from_time_t(rawStartTime); boost::posix_time::ptime stopTime = boost::posix_time::from_time_t(rawStopTime); @@ -909,9 +907,7 @@ void AVTLogicalDeviceScheduler::handlePropertySetAnswer(GCFEvent& answer) if(ldIt != m_logicalDeviceMap.end()) { // check begin time, if not yet begun, cancel timers and remove schedule - time_t timeNow = time(0); - struct tm* utcTimeStruct = gmtime(&timeNow); - time_t utcTime = mktime(utcTimeStruct); + time_t utcTime = AVTUtilities::getUTCtime(); boost::posix_time::ptime curUTCtime = boost::posix_time::from_time_t(utcTime); boost::posix_time::ptime startTime = boost::posix_time::from_time_t(scheduleIt->second.startTime); if(startTime > curUTCtime) @@ -972,9 +968,7 @@ void AVTLogicalDeviceScheduler::handlePropertySetAnswer(GCFEvent& answer) int rawStartTime = atoi(parameters[2].c_str()); // starttime int rawStopTime = atoi(parameters[3].c_str()); // stoptime - time_t timeNow = time(0); - struct tm* utcTimeStruct = gmtime(&timeNow); - time_t utcTime = mktime(utcTimeStruct); + time_t utcTime = AVTUtilities::getUTCtime(); boost::posix_time::ptime curUTCtime = boost::posix_time::from_time_t(utcTime); boost::posix_time::ptime startTime = boost::posix_time::from_time_t(rawStartTime); boost::posix_time::ptime stopTime = boost::posix_time::from_time_t(rawStopTime); diff --git a/MAC/APL/PAC/_VirtualTelescope/src/AVTUtilities.cc b/MAC/APL/PAC/_VirtualTelescope/src/AVTUtilities.cc index e9f17b499056caeddae0129373e9000d1ef9f7b1..802836246c3dba9323f1c650c36a395b1bf5ead8 100644 --- a/MAC/APL/PAC/_VirtualTelescope/src/AVTUtilities.cc +++ b/MAC/APL/PAC/_VirtualTelescope/src/AVTUtilities.cc @@ -107,3 +107,14 @@ void AVTUtilities::encodeParameters(const vector<string>& parameters,string& enc ++parameterIt; } } + +time_t AVTUtilities::getUTCtime() +{ + time_t curr=time(0);// current local time + tm local=*gmtime(&curr);// convert curr to GMT, store as tm + local.tm_isdst = -1; // A negative value for tm_isdst shall cause mktime() + // to attempt to determine whether Daylight Savings Time + // is in effect for the specified time. + time_t utc=(mktime(&local));// convert GMT tm to GMT time_t + return utc; +} diff --git a/MAC/APL/PAC/_VirtualTelescope/src/AVTUtilities.h b/MAC/APL/PAC/_VirtualTelescope/src/AVTUtilities.h index e91fc1dc5dc8c70fbd284ce75f3a12e628a3e57f..4f138c13a5fb7ee9e8602869c17f0b42d6c68fd5 100644 --- a/MAC/APL/PAC/_VirtualTelescope/src/AVTUtilities.h +++ b/MAC/APL/PAC/_VirtualTelescope/src/AVTUtilities.h @@ -24,6 +24,7 @@ #define AVTUtilities_H //# Includes +#include <time.h> //# Common Includes #include <Common/LofarLogger.h> #include <Common/lofar_vector.h> @@ -53,6 +54,8 @@ class AVTUtilities static void decodeSubbandsParameter(const string& subbandsString, vector<int>& subbands); static void encodeParameters(const vector<string>& parameters,string& parameters); + static time_t getUTCtime(); + protected: // protected copy constructor AVTUtilities(const AVTUtilities&); diff --git a/MAC/APL/PAC/_VirtualTelescope/src/LogicalDeviceServer.conf.in b/MAC/APL/PAC/_VirtualTelescope/src/LogicalDeviceServer.conf.in index 0782f950e6210bdd6087cc935f7f669d39933a7b..ac4e99d1678ee3d36663adbd7f88802eb401bf1b 100644 --- a/MAC/APL/PAC/_VirtualTelescope/src/LogicalDeviceServer.conf.in +++ b/MAC/APL/PAC/_VirtualTelescope/src/LogicalDeviceServer.conf.in @@ -1,4 +1,6 @@ mac.ns.AVTTest.BeamServer.type=TCP +mac.ns.AVTTest.BeamServer.host=localhost +mac.ns.AVTTest.BeamServer.port=27001 mac.ns.AVTTestMAC2.timerPort.type=TCP mac.ns.LogicalDeviceScheduler.timerPort.type=TCP #mac.top.LogicalDeviceScheduler.BeamServer.remoteservice=ABS:client diff --git a/MAC/APL/_GSO/MACScheduler/src/MACScheduler.cc b/MAC/APL/_GSO/MACScheduler/src/MACScheduler.cc index fb3c24efbe55de60544c90e2c6304aa7c3afbbdb..8ad7540edc93552ce62e95d380712fb4b9b2332e 100644 --- a/MAC/APL/_GSO/MACScheduler/src/MACScheduler.cc +++ b/MAC/APL/_GSO/MACScheduler/src/MACScheduler.cc @@ -176,6 +176,44 @@ void MACScheduler::handlePropertySetAnswer(::GCFEvent& answer) { if(parameters.size()==1) { + string shareLocation = _getShareLocation(); + + try + { + // read the parameterset from the database: +#ifndef ACC_CONFIGURATIONMGR_UNAVAILABLE + boost::shared_ptr<ACC::ParameterSet> ps(m_configurationManager->getPS(parameters[0], "latest"); +#else // ACC_CONFIGURATIONMGR_UNAVAILABLE + LOG_FATAL("TODO: Use ACC::ConfigurationMgr to access OTDB database"); + // When the ACC::ConfigurationMgr can be used, then the following code is obsolete: + ACC::ParameterCollection pc(shareLocation + string("share/") + parameters[0]); // assume VIrootID is a file + boost::shared_ptr<ACC::ParameterSet> ps(new ACC::ParameterSet(pc)); + // End of soon to be obsolete code +#endif // ACC_CONFIGURATIONMGR_UNAVAILABLE + + // get some parameters and write it to the allocated CCU + string allocatedCCU = ps->getString("allocatedCCU"); + string viName = ps->getString("name"); + string psFileName = string("/") + viName + string(".ps"); + string psFilePath = shareLocation + string("mnt/") + allocatedCCU + string("/") + psFileName; + ps->writeFile(psFilePath); + + // send the schedule event to the VI-StartDaemon on the CCU + STARTDAEMONScheduleEvent sdScheduleEvent; + sdScheduleEvent.logicalDeviceType = LDTYPE_VIRTUALINSTRUMENT; + sdScheduleEvent.taskName = viName; + sdScheduleEvent.fileName = psFileName; + + TStringRemotePortMap::iterator it = m_VISDclientPorts.find(allocatedCCU); + if(it != m_VISDclientPorts.end()) + { + it->second->send(sdScheduleEvent); + } + } + catch(Exception& e) + { + LOG_FATAL(formatString("Error reading schedule parameters: %s",e.message().c_str())); + } } else { @@ -291,6 +329,21 @@ void MACScheduler::_disconnectedHandler(::GCFPortInterface& port) } } +string MACScheduler::_getShareLocation() const +{ + string shareLocation("/home/lofar/MACTransport/"); + GCF::ParameterSet* pParamSet = GCF::ParameterSet::instance(); + try + { + shareLocation = pParamSet->getString("shareLocation"); + } + catch(Exception& e) + { + LOG_WARN(formatString("(%s) Sharelocation parameter not found. Using /home/lofar/MACTransport/",e.message().c_str())); + } + return shareLocation; +} + ::GCFEvent::TResult MACScheduler::initial_state(::GCFEvent& event, ::GCFPortInterface& /*port*/) { LOG_TRACE_LIFETIME(TRACE_LEVEL_FLOW,formatString("%s - event=%s",getName().c_str(),evtstr(event)).c_str()); @@ -395,19 +448,12 @@ void MACScheduler::_disconnectedHandler(::GCFPortInterface& port) case SAS_SCHEDULE: { - string shareLocation("/home/lofar/MACTransport/"); - GCF::ParameterSet* pParamSet = GCF::ParameterSet::instance(); - try - { - shareLocation = pParamSet->getString(MS_CONFIG_PREFIX + string("shareLocation")); - } - catch(Exception& e) - { - LOG_WARN(formatString("Sharelocation parameter not found. Using %s",e.message().c_str(),shareLocation.c_str())); - } - + string shareLocation = _getShareLocation(); + // schedule event received from SAS SASScheduleEvent sasScheduleEvent(event); + SASResponseEvent sasResponseEvent; + sasResponseEvent.result = SAS_RESULT_NO_ERROR; try { @@ -417,7 +463,7 @@ void MACScheduler::_disconnectedHandler(::GCFPortInterface& port) #else // ACC_CONFIGURATIONMGR_UNAVAILABLE LOG_FATAL("TODO: Use ACC::ConfigurationMgr to access OTDB database"); // When the ACC::ConfigurationMgr can be used, then the following code is obsolete: - ACC::ParameterCollection pc(sasScheduleEvent.VIrootID); // assume VIrootID is a file + ACC::ParameterCollection pc(shareLocation + string("share/") + sasScheduleEvent.VIrootID); // assume VIrootID is a file boost::shared_ptr<ACC::ParameterSet> ps(new ACC::ParameterSet(pc)); // End of soon to be obsolete code #endif // ACC_CONFIGURATIONMGR_UNAVAILABLE @@ -425,8 +471,9 @@ void MACScheduler::_disconnectedHandler(::GCFPortInterface& port) // get some parameters and write it to the allocated CCU string allocatedCCU = ps->getString("allocatedCCU"); string viName = ps->getString("name"); - string psFileName = shareLocation + string("mnt/") + allocatedCCU; - ps->writeFile(psFileName); + string psFileName = string("/") + viName + string(".ps"); + string psFilePath = shareLocation + string("mnt/") + allocatedCCU + string("/") + psFileName; + ps->writeFile(psFilePath); // send the schedule event to the VI-StartDaemon on the CCU STARTDAEMONScheduleEvent sdScheduleEvent; @@ -439,11 +486,17 @@ void MACScheduler::_disconnectedHandler(::GCFPortInterface& port) { it->second->send(sdScheduleEvent); } + else + { + sasResponseEvent.result = SAS_RESULT_ERROR_VI_NOT_FOUND; + } } catch(Exception& e) { LOG_FATAL(formatString("Error reading schedule parameters: %s",e.message().c_str())); + sasResponseEvent.result = SAS_RESULT_ERROR_UNSPECIFIED; } + port.send(sasResponseEvent); break; } @@ -458,6 +511,13 @@ void MACScheduler::_disconnectedHandler(::GCFPortInterface& port) port.send(connectedEvent); break; } + + case LOGICALDEVICE_SCHEDULED: + { + LOGICALDEVICEScheduledEvent scheduledEvent(event); + m_propertySet->setValue(MS_PROPNAME_STATUS,GCFPVInteger(scheduledEvent.result)); + break; + } default: LOG_DEBUG(formatString("MACScheduler(%s)::idle_state, default",getName().c_str())); diff --git a/MAC/APL/_GSO/MACScheduler/src/MACScheduler.conf.in b/MAC/APL/_GSO/MACScheduler/src/MACScheduler.conf.in index 5a9af1cf4729440690465fa232f0bd7b1207c58a..193b298d7b8d283ee3057d2ee7ada30cf2804e1d 100644 --- a/MAC/APL/_GSO/MACScheduler/src/MACScheduler.conf.in +++ b/MAC/APL/_GSO/MACScheduler/src/MACScheduler.conf.in @@ -1,12 +1,15 @@ -mac.ns.MACScheduler.MACScheduler_SAS_server.type=TCP -mac.ns.MACScheduler.MACScheduler_VIparent_server.type=TCP -mac.ns.CCU0_StartDaemon_server.type=TCP -mac.ns.CCU0_StartDaemon_server.host=ccu0 -mac.ns.CCU1_StartDaemon_server.type=TCP -mac.ns.CCU1_StartDaemon_server.host=ccu1 +mac.ns.MACScheduler.SAS_server.type=TCP +mac.ns.MACScheduler.SAS_server.host=localhost +mac.ns.MACScheduler.SAS_server.port=27000 +mac.ns.MACScheduler.VIparent_server.type=TCP +mac.ns.MACScheduler.VIparent_server.host=localhost -mac.top.MACScheduler.CCU0_StartDaemon_server.remoteservice=StartDaemon:StartDaemon_server -mac.top.MACScheduler.CCU1_StartDaemon_server.remoteservice=StartDaemon:StartDaemon_server +mac.ns.CCU1_VIC_VIStartDaemon.server.type=TCP +mac.ns.CCU1_VIC_VIStartDaemon.server.host=localhost +mac.top.MACScheduler.CCU1_VIC_VIStartDaemon.remoteservice=CCU1_VIC_VIStartDaemon:server +mac.ns.CCU2_VIC_VIStartDaemon.server.type=TCP +mac.ns.CCU2_VIC_VIStartDaemon.server.host=ccu2 +mac.top.MACScheduler.CCU2_VIC_VIStartDaemon.remoteservice=CCU2_VIC_VIStartDaemon:server #mac.apl.ams.OTDBhostname= #mac.apl.ams.OTDBdatabasename= @@ -14,9 +17,9 @@ mac.top.MACScheduler.CCU1_StartDaemon_server.remoteservice=StartDaemon:StartDaem mac.apl.ams.shareLocation=/home/lofar/MACTransport/ mac.apl.ams.numberOfVIStartDaemons=2 -mac.apl.ams.CCU0.startDaemonPort=CCU0_StartDaemon_server -mac.apl.ams.CCU0.startDaemonTask=StartDaemon -mac.apl.ams.CCU1.startDaemonPort=CCU1_StartDaemon_server -mac.apl.ams.CCU1.startDaemonTask=StartDaemon +mac.apl.ams.CCU1.startDaemonPort=server +mac.apl.ams.CCU1.startDaemonTask=CCU1_VIC_VIStartDaemon +mac.apl.ams.CCU2.startDaemonPort=server +mac.apl.ams.CCU2.startDaemonTask=CCU2_VIC_VIStartDaemon mac.MACScheduler.pvss.cmdline=-proj MAC \ No newline at end of file diff --git a/MAC/APL/_GSO/MACScheduler/src/MACScheduler.h b/MAC/APL/_GSO/MACScheduler/src/MACScheduler.h index 788769d0d88966c85ff6713b6f265c596f989cfe..2654b69ed70d5fdc32bcb21db2e663d02ec7c08b 100644 --- a/MAC/APL/_GSO/MACScheduler/src/MACScheduler.h +++ b/MAC/APL/_GSO/MACScheduler/src/MACScheduler.h @@ -132,6 +132,7 @@ namespace GSO bool _isSASclientPort(const ::GCFPortInterface& port) const; bool _isVISDclientPort(const ::GCFPortInterface& port, string& visd) const; bool _isVIclientPort(const ::GCFPortInterface& port) const; + string _getShareLocation() const; string m_SASserverPortName; GCFTCPPort m_SASserverPort; // SAS-MAC communication diff --git a/MAC/APL/_GSO/MACScheduler/test/CCU_increment1.btsw b/MAC/APL/_GSO/MACScheduler/test/CCU_increment1.btsw new file mode 100644 index 0000000000000000000000000000000000000000..7c457eaa23c87e94ee23bd61192fb2a0ce3b2e9f --- /dev/null +++ b/MAC/APL/_GSO/MACScheduler/test/CCU_increment1.btsw @@ -0,0 +1,79 @@ +// +// CCU_increment1.btsw: Testscript for increment 1 of the CCU software. +// +// Copyright (C) 2005 +// ASTRON (Netherlands Foundation for Research in Astronomy) +// P.O.Box 2, 7990 AA Dwingeloo, The Netherlands, seg@astron.nl +// +// ------------------------------------------------------------------------------ +// Description: +// +// +// +// ------------------------------------------------------------------------------ + +[statemachines] + +Statemachine_MACScheduler (ready, time_is_over) = +{ +VAR a= 0x00000001, b. + + s000 : SAS_SCHEDULE ( "VI1.ps" ) ; s010. + + s010 : SAS_RESPONSE ( 0x00000000 ) ; s910. // scheduled ok + + +// s900 : R_SIG (time_is_over) ; s910. +// s900 : TIMER (0x1) ; s000. // Re-run after one second + + s910 : S_SIG (ready ) ; OK. + OK : TIMER(10) ; OK. +} + +Statemachine_BeamServer (ready, time_is_over) = +{ +VAR handle. + + s000 : ABS_BEAMALLOC (, ,,,,,,,,,, ,,,,,,,,,, ,,,,,,,,,, ,,,,,,,,,, ,,,,,,,,,, ,,,,,,,,,, ,,,,,,,,,, ,,,,,,,,,, ,,,,,,,,,, ,,,,,,,,,, ,,,,,,,,,, ,,,,,,,,,, ,,,,,,,,) ; s010. + s000 : ABS_BEAMFREE ( handle ) ; s020. + s000 : ABS_BEAMPOINTTO (,,,,) ; s000. + s000 : ABS_WGSETTINGS (,) ; s030. + s000 : ABS_WGENABLE ; s000. + s000 : ABS_WGDISABLE ; s000. + + s010 : ABS_BEAMALLOC_ACK ( 0x00000001, 0x00000000 ) ; s000. + + s020 : ABS_BEAMFREE_ACK ( handle, 0x00000000 ) ; s000. + + s030 : ABS_WGSETTINGS_ACK ( 0x00000000 ) ; s000. + +// s90 : R_SIG (time_is_over) ; s100. +// s90 : TIMER (0x10) ; s110. // not received the 'sent' in time so quit + + s900 : S_SIG (ready ) ; OK. + s910 : TERMINATE. + OK : TIMER(10) ; OK. +} + +WaitUntilTestEnd (SM1_ready, SM2_ready) = +{ + s01 : R_SIG (SM1_ready) ; s02. + s02 : R_SIG (SM2_ready) ; s03. + s03 : TERMINATE. +} + +HALF_HOUR_TIMER (half_hour_over_1, half_hour_over_2) = +{ + s000 : TIMER (0x057E) ; s010. + s010 : S_SIG (half_hour_over_1) ; s020. + s020 : S_SIG (half_hour_over_2) ; s000. +} + +[testscript] +VAR SM1_done, SM2_done, TMO_1, TMO_2. + +COM1 : Statemachine_MACScheduler (SM1_done, TMO_1) + HALF_HOUR_TIMER (TMO_1, TMO_2) + WaitUntilTestEnd (SM1_done, SM2_done). + +COM2 : Statemachine_BeamServer (SM2_done, TMO_2). diff --git a/MAC/APL/_GSO/MACScheduler/test/CCU_increment1.prot b/MAC/APL/_GSO/MACScheduler/test/CCU_increment1.prot new file mode 100644 index 0000000000000000000000000000000000000000..80739bef515dfda23b0444c364b67de344979167 --- /dev/null +++ b/MAC/APL/_GSO/MACScheduler/test/CCU_increment1.prot @@ -0,0 +1,416 @@ +//------------------------------------------------------------- +// SAS PROTOCOL SPECIFICATION for TestHarness +// BeamServer PROTOCOL SPECIFICATION for TestHarness +// version April 1, 2005 +// +// This file contains a computer readable interpretation of +// the SAS and BeamServer protocols for Lofar +// +// This file is intended to be used as an input file for the +// AutoTest Script Engine. It is not a formal definition of +// The SAS and BeamServer protocols: +// +// Change track: +// ========================================================== +// April 1, 2005 : Initial release, +// Robert Blaakmeer +// +// ========================================================== +// Notes: +// The following diagram shows the connections between the +// Test engine and Lofar +// __________ _________________ +// |Testengine| | Lofar | +// | | | apps | +// | _______|_ SAS Protocol _|___________ | +// | | client_1|----------------------------->|MACScheduler | | +// | |_________|<-----------------------------|_____________| | +// | | | | +// | | | | +// | | | | +// | _______|_ BeamServer Protocol _|______________ | +// | | server_2|<-----------------------------|VirtualTelescope| | +// | |_________|----------------------------->|________________| | +// | | | | +// |__________| |_________________| +// +// This file contains four sections: +// [io] : I/O configuration +// [type] : type definitions +// [functions] : Messages sent to the Device under Test (DUT) +// [events] : Messages received from the DuT. +// +// The format of each section is explained in brief in the +// beginning of each section. + + +[io] +COM1 = { SOCKET, ccc , "client localhost 27000" } // The machine running the MACScheduler +COM2 = { SOCKET, ccc , "server localhost 27001" } // The TestHarness computer (This machine computer-name/IP-address) + +// For serial ports: COM1 = { COM1, ccc , "Baud=1200 parity=N data=8 stop=1 octs=on" } + + +#define PADDING 0x00 + +[type] + +// A type has a number of parameters: the first parameter +// defines the size in bytes. If there is a second and third +// parameter, these define the lower and upper limit. +// +// If there is a fourth parameter, it can be a string +// with the following meanings: +// TIME : Parameters of this type reflect a certain +// time(span) +// ENUM : Parameters of this type have a value with +// an enumerated meaning. +// BITFIELD : Parameters of this type are bitmap para- +// meters. +// ASCII_0 : Field contains zero-terminated ASCII data. +// Field is fixed-sized, but bytes following +// the 0-byte are undefined and not checked. +// UNICODE_0 : Field contains zero-terminated UNICODE +// data. +// ASCII : Field contains non-terminated ASCII data. + +// +// The meaning of the remaining parameters depends of this +// string: +// TIME : Has one additional parameter, which is +// a float. This float indicates the time in +// seconds intended of one unit. +// ENUM : A list of additional parameters exists. +// This list is intended to be self-explaining. +// BITFIELD : A list of additional parameters exists. +// If the bitfield is denoted as +// (0xXXXX,0xXXXX), the first bitfield is +// a mask, the second bitfield defines the +// bits. + + +// First a small list of general purpose types is defined. +// Default type is interpreted as "Big endian" + +t_B1 = { 1 } +t_B2 = { 2 } +t_B3 = { 3 } +t_B4 = { 4 } +t_B6 = { 6 } +t_B8 = { 8 } +t_B16 = { 16 } + +// The remaining Lofar types: + +t_uShort = { 2 } +t_Double = { 8 } +t_Int = { 4 } +t_uInt = { 4 } +t_Long = { 4 } +t_uLong = { 4 } +t_String50 = -{ 50, ASCII_0 } // (-) indicates little endian; strings are padded with \0 + +// SAS enums +t_SAS_Result = { 4, 0x00000000, 0x00000004, ENUM, + 0x00000000 : "NO_ERROR", + 0x00000001 : "ERROR_UNSPECIFIED", + 0x00000002 : "ERROR_VI_NOT_FOUND", + 0x00000003 : "ERROR_INCORRECT_NUMBER_OF_PARAMETERS", + 0x00000004 : "ERROR_UNKNOWN_COMMAND" + } + +// ABS enums +t_ABS_Result = { 4, 0x00000000, 0x00000003, ENUM, + 0x00000000 : "SUCCESS", + 0x00000001 : "ERR_RANGE", + 0x00000002 : "ERR_BEAMALLOC", + 0x00000003 : "ERR_BEAMFREE" + } + +// +// Signal ID's +// +// SAS Protocol +// +// 0x01 SCHEDULE +// 0x02 UPDATESCHEDULE +// 0x03 CANCELSCHEDULE +// 0x04 RESPONSE +// 0x05 REPLACEMENTREQUEST +// +// ABS Protocol +// +// 0x01 BEAMALLOC +// 0x02 BEAMALLOC_ACK +// 0x03 BEAMFREE +// 0x04 BEAMFREE_ACK +// 0x05 BEAMPOINTTO +// 0x06 WGSETTINGS +// 0x07 WGSETTINGS_ACK +// 0x08 WGENABLE +// 0x09 WGDISABLE +// +// direction and protocol definitions: +// +// IN OUT INOUT +// SAS (MACScheduler) 0x4D 0x8D 0xCD +// ABS (BeamServer) 0x54 0x94 0xD4 +// + +[functions] +// -------------------------------SAS_Protocol------------------------ +SAS_SCHEDULE = +{ + 0x01, // signal Id + 0x4D, // Direction and protocol + 0x36000000, // message payload length. Depends on string length + 0x32000000, // string length + VIrootID : t_String50 +} + +SAS_UPDATESCHEDULE = +{ + 0x02, // signal Id + 0x4D, // Direction and protocol + 0x36000000, // message payload length. Depends on string length + 0x32000000, // string length + VIrootID : t_String50 +} + +SAS_CANCELSCHEDULE = +{ + 0x03, // signal Id + 0x4D, // Direction and protocol + 0x36000000, // message payload length. Depends on string length + 0x32000000, // string length + VIrootID : t_String50 +} + +// -------------------------------ABS_Protocol------------------------ +ABS_BEAMALLOC_ACK = +{ + 0x02, // signal Id + 0x94, // Direction and protocol + 0x0800000, // message payload length + handle : t_Int, + status : t_ABS_Result +} + +ABS_BEAMFREE_ACK = +{ + 0x04, // signal Id + 0x94, // Direction and protocol + 0x0800000, // message payload length + handle : t_Int, + status : t_ABS_Result +} + +ABS_WGSETTINGS_ACK = +{ + 0x07, // signal Id + 0x94, // Direction and protocol + 0x04000000, // message payload length + status : t_ABS_Result +} + + +[events] +// -------------------------------SAS_Protocol------------------------ + +SAS_RESPONSE = +{ + 0x04, // signal Id + 0x8D, // Direction and protocol + 0x04000000, // message payload length + result : t_SAS_Result +} + +SAS_REPLACEMENT_REQUEST = +{ + 0x05, // signal Id + 0x8D, // Direction and protocol + 0x36000000, // message payload length. Depends on string length + 0x32000000, // string length + nodeID : t_String50 +} + +// -------------------------------ABS_Protocol------------------------ +ABS_BEAMALLOC = +{ + 0x01, // signal Id + 0x54, // Direction and protocol + 0x08040000, // message payload length + spectral_window : t_Int, + n_subbands : t_Int, + subband1 : t_Int, // the subbands array has a length of 128 integers + subband2 : t_Int, + subband3 : t_Int, + subband4 : t_Int, + subband5 : t_Int, + subband6 : t_Int, + subband7 : t_Int, + subband8 : t_Int, + subband9 : t_Int, + subband10 : t_Int, + subband11 : t_Int, + subband12 : t_Int, + subband13 : t_Int, + subband14 : t_Int, + subband15 : t_Int, + subband16 : t_Int, + subband17 : t_Int, + subband18 : t_Int, + subband19 : t_Int, + subband20 : t_Int, + subband21 : t_Int, + subband22 : t_Int, + subband23 : t_Int, + subband24 : t_Int, + subband25 : t_Int, + subband26 : t_Int, + subband27 : t_Int, + subband28 : t_Int, + subband29 : t_Int, + subband30 : t_Int, + subband31 : t_Int, + subband32 : t_Int, + subband33 : t_Int, + subband34 : t_Int, + subband35 : t_Int, + subband36 : t_Int, + subband37 : t_Int, + subband38 : t_Int, + subband39 : t_Int, + subband40 : t_Int, + subband41 : t_Int, + subband42 : t_Int, + subband43 : t_Int, + subband44 : t_Int, + subband45 : t_Int, + subband46 : t_Int, + subband47 : t_Int, + subband48 : t_Int, + subband49 : t_Int, + subband50 : t_Int, + subband51 : t_Int, + subband52 : t_Int, + subband53 : t_Int, + subband54 : t_Int, + subband55 : t_Int, + subband56 : t_Int, + subband57 : t_Int, + subband58 : t_Int, + subband59 : t_Int, + subband60 : t_Int, + subband61 : t_Int, + subband62 : t_Int, + subband63 : t_Int, + subband64 : t_Int, + subband65 : t_Int, + subband66 : t_Int, + subband67 : t_Int, + subband68 : t_Int, + subband69 : t_Int, + subband70 : t_Int, + subband71 : t_Int, + subband72 : t_Int, + subband73 : t_Int, + subband74 : t_Int, + subband75 : t_Int, + subband76 : t_Int, + subband77 : t_Int, + subband78 : t_Int, + subband79 : t_Int, + subband80 : t_Int, + subband81 : t_Int, + subband82 : t_Int, + subband83 : t_Int, + subband84 : t_Int, + subband85 : t_Int, + subband86 : t_Int, + subband87 : t_Int, + subband88 : t_Int, + subband89 : t_Int, + subband90 : t_Int, + subband91 : t_Int, + subband92 : t_Int, + subband93 : t_Int, + subband94 : t_Int, + subband95 : t_Int, + subband96 : t_Int, + subband97 : t_Int, + subband98 : t_Int, + subband99 : t_Int, + subband100 : t_Int, + subband101 : t_Int, + subband102 : t_Int, + subband103 : t_Int, + subband104 : t_Int, + subband105 : t_Int, + subband106 : t_Int, + subband107 : t_Int, + subband108 : t_Int, + subband109 : t_Int, + subband110 : t_Int, + subband111 : t_Int, + subband112 : t_Int, + subband113 : t_Int, + subband114 : t_Int, + subband115 : t_Int, + subband116 : t_Int, + subband117 : t_Int, + subband118 : t_Int, + subband119 : t_Int, + subband120 : t_Int, + subband121 : t_Int, + subband122 : t_Int, + subband123 : t_Int, + subband124 : t_Int, + subband125 : t_Int, + subband126 : t_Int, + subband127 : t_Int, + subband128 : t_Int +} + +ABS_BEAMFREE = +{ + 0x03, // signal Id + 0x54, // Direction and protocol + 0x04000000, // message payload length + handle : t_Int +} + +ABS_BEAMPOINTTO = +{ + 0x05, // signal Id + 0x54, // Direction and protocol + 0x1C000000, // message payload length + handle : t_Int, + time : t_Int, + type : t_Int, + angle1 : t_Double, + angle2 : t_Double +} + +ABS_WGSETTINGS = +{ + 0x06, // signal Id + 0x54, // Direction and protocol + 0x0C000000, // message payload length + frequency : t_Double, + amplitude : t_uShort +} + +ABS_WGENABLE = +{ + 0x08, // signal Id + 0x54, // Direction and protocol + 0x00000000 // message payload length +} + +ABS_WGDISABLE = +{ + 0x09, // signal Id + 0x54, // Direction and protocol + 0x00000000 // message payload length +} diff --git a/MAC/APL/_VIC/VirtualInstrument/src/VirtualInstrument.cc b/MAC/APL/_VIC/VirtualInstrument/src/VirtualInstrument.cc index 58801490a31e54882f7e5b4b6b1c0de42eb555bf..1e25e09889b7a29da0f352ef7370ee3205b6e30a 100644 --- a/MAC/APL/_VIC/VirtualInstrument/src/VirtualInstrument.cc +++ b/MAC/APL/_VIC/VirtualInstrument/src/VirtualInstrument.cc @@ -117,34 +117,41 @@ void VirtualInstrument::concrete_handlePropertySetAnswer(::GCFEvent& answer) { if(strstr(pPropAnswer->pScope, it->second->getScope().c_str()) != 0) { - stringstream schedule; - schedule << "SCHEDULE "; - // SCHEDULE <sch.nr>,VT,<vt_name>,<bf_name>,<srg_name>,<starttime>,<stoptime>, - // <frequency>,<subbands>,<directiontype>,<angle1>,<angle2> - schedule << "1,"; - schedule << "VT,"; - schedule << it->first << ","; - - string childs = m_parameterSet.getString(it->first + string(".") + string("childs")); - vector<string> childsVector; - APLUtilities::string2Vector(childs,childsVector); - - schedule << childsVector[0] << ","; - schedule << childsVector[1] << ","; - time_t startTime = _decodeTimeParameter(m_parameterSet.getString(it->first + string(".") + string("startTime"))); - schedule << startTime << ","; - time_t stopTime = _decodeTimeParameter(m_parameterSet.getString(it->first + string(".") + string("stopTime"))); - schedule << stopTime << ","; - - schedule << m_parameterSet.getString(it->first + string(".") + string("frequency")) << ","; - schedule << m_parameterSet.getString(it->first + string(".") + string("subbands")) << ","; - schedule << m_parameterSet.getString(it->first + string(".") + string("directionType")) << ","; - schedule << m_parameterSet.getString(it->first + string(".") + string("angle1")) << ","; - schedule << m_parameterSet.getString(it->first + string(".") + string("angle2")) << ","; - - GCFPVString pvSchedule(schedule.str()); - it->second->setValue("command",pvSchedule); - scheduleSent = true; + try + { + stringstream schedule; + schedule << "SCHEDULE "; + // SCHEDULE <sch.nr>,VT,<vt_name>,<bf_name>,<srg_name>,<starttime>,<stoptime>, + // <frequency>,<subbands>,<directiontype>,<angle1>,<angle2> + schedule << "1,"; + schedule << "VT,"; + schedule << it->first << ","; + + string childs = m_parameterSet.getString(it->first + string(".") + string("childs")); + vector<string> childsVector; + APLUtilities::string2Vector(childs,childsVector); + + schedule << childsVector[0] << ","; + schedule << childsVector[1] << ","; + time_t startTime = _decodeTimeParameter(m_parameterSet.getString(it->first + string(".") + string("startTime"))); + schedule << startTime << ","; + time_t stopTime = _decodeTimeParameter(m_parameterSet.getString(it->first + string(".") + string("stopTime"))); + schedule << stopTime << ","; + + schedule << m_parameterSet.getString(it->first + string(".") + string("frequency")) << ","; + schedule << m_parameterSet.getString(it->first + string(".") + string("subbands")) << ","; + schedule << m_parameterSet.getString(it->first + string(".") + string("directionType")) << ","; + schedule << m_parameterSet.getString(it->first + string(".") + string("angle1")) << ","; + schedule << m_parameterSet.getString(it->first + string(".") + string("angle2")) << ","; + + GCFPVString pvSchedule(schedule.str()); + it->second->setValue("command",pvSchedule); + scheduleSent = true; + } + catch(Exception& e) + { + LOG_FATAL(e.message().c_str()); + } } ++it; } diff --git a/MAC/APL/_VIC/VirtualInstrument/src/VirtualInstrument.conf.in b/MAC/APL/_VIC/VirtualInstrument/src/VirtualInstrument.conf.in index 67f0542b1d278d717b5d7f07f63db84af5603e52..c4d83124f32a6fcad960045cbe947301a4a98c5e 100644 --- a/MAC/APL/_VIC/VirtualInstrument/src/VirtualInstrument.conf.in +++ b/MAC/APL/_VIC/VirtualInstrument/src/VirtualInstrument.conf.in @@ -1,17 +1,14 @@ -mac.ns.ARATest.ARAtestRSPserver.type=TCP -mac.ns.ARATestDriver.ARAtestRSPserver.type=TCP -mac.ns.RSP.acceptor.type=TCP +mac.ns.CCU1_VIC_VIStartDaemon.server.type=TCP +mac.ns.CCU1_VIC_VIStartDaemon.server.host=localhost +mac.ns.CCU2_VIC_VIStartDaemon.server.type=TCP +mac.ns.CCU2_VIC_VIStartDaemon.server.host=localhost -mac.top.ARA.ARAtestRSPserver.remoteservice=ARATestDriver:ARAtestRSPserver -#mac.top.ARA.ARAtestRSPserver.remoteservice=ARATest:ARAtestRSPserver -#mac.top.ARA.ARAtestRSPserver.remoteservice=RSP:acceptor -mac.apl.ara.N_RACKS=3 -mac.apl.ara.N_SUBRACKS_PER_RACK=1 -mac.apl.ara.N_BOARDS_PER_SUBRACK=1 -mac.apl.ara.N_APS_PER_BOARD=1 -mac.apl.ara.N_RCUS_PER_AP=2 -mac.apl.ara.STATUS_UPDATE_INTERVAL=1 -mac.apl.ara.STATISTICS_UPDATE_INTERVAL=1 +mac.ns.MACScheduler.VIparent_server.type=TCP +mac.ns.MACScheduler.VIparent_server.host=localhost +# +# mac.ns.MACScheduler.VIparent_server.remoteservice is dynamically configured +# because it depends on the VI name +# +mac.VirtualInstrument.pvss.cmdline=-proj MAC -mac.RegisterAccess.pvss.cmdline=-proj MAC \ No newline at end of file diff --git a/MAC/APL/_VIC/VirtualInstrument/src/VirtualInstrumentStartDaemonMain.cc b/MAC/APL/_VIC/VirtualInstrument/src/VirtualInstrumentStartDaemonMain.cc index 0a36a227dc1217f8d74ceddd210b670aa77bb141..b82fa2fa7debb8bc10138eb93fab7296441c7e41 100644 --- a/MAC/APL/_VIC/VirtualInstrument/src/VirtualInstrumentStartDaemonMain.cc +++ b/MAC/APL/_VIC/VirtualInstrument/src/VirtualInstrumentStartDaemonMain.cc @@ -35,9 +35,20 @@ int main(int argc, char* argv[]) GCFTask::init(argc, argv); + string ccuName("CCU1"); + if(argc != 2) + { + LOG_FATAL(formatString("invalid number of arguments. Assuming: %s %s",argv[0],ccuName.c_str())); + } + else + { + ccuName = string(argv[1]); + LOG_INFO(formatString("VirtualInstrument started with CCU name = %s",ccuName.c_str())); + } + boost::shared_ptr<VirtualInstrumentFactory> viFactory(new VirtualInstrumentFactory); - StartDaemon sd(string("VIC_VIStartDaemon")); + StartDaemon sd(ccuName + string("_VIC_VIStartDaemon")); sd.registerFactory(LDTYPE_VIRTUALINSTRUMENT,viFactory); sd.start(); // make initial transition diff --git a/MAC/APL/_VIC/VirtualInstrument/test/AVITestDriverTask.cc b/MAC/APL/_VIC/VirtualInstrument/test/AVITestDriverTask.cc index cc0fa6f7bc917970744062f9fa617479169b8301..a076acd23a999151299fb57b7b528fa451cbda94 100644 --- a/MAC/APL/_VIC/VirtualInstrument/test/AVITestDriverTask.cc +++ b/MAC/APL/_VIC/VirtualInstrument/test/AVITestDriverTask.cc @@ -42,7 +42,7 @@ using namespace GCF; using namespace std; -const char SCOPE_VIC_VIStartDaemon[] = "VIC_VIStartDaemon"; +const char SCOPE_VIC_VIStartDaemon[] = "CCU1_VIC_VIStartDaemon"; const char SCOPE_VIC_VI1[] = "VIC_VI1"; @@ -59,8 +59,8 @@ string AVITestDriverTask::m_taskName("AVITestDriver"); AVITestDriverTask::AVITestDriverTask() : GCFTask((State)&AVITestDriverTask::initial, m_taskName), m_answer(), - m_extPropSetVISD(SCOPE_VIC_VIStartDaemon,StartDaemon::PSTYPE_STARTDAEMON.c_str(),&m_answer), - m_extPropSetVI1(SCOPE_VIC_VI1,"TAplVI",&m_answer) + m_extPropSetCCU1VISD(SCOPE_VIC_VIStartDaemon,StartDaemon::PSTYPE_STARTDAEMON.c_str(),&m_answer), + m_extPropSetVI1(SCOPE_VIC_VI1,"TAplVicVI",&m_answer) { m_answer.setTask(this); @@ -79,7 +79,7 @@ GCFEvent::TResult AVITestDriverTask::initial(GCFEvent& event, GCFPortInterface& switch (event.signal) { case F_INIT: - m_extPropSetVISD.load(); + m_extPropSetCCU1VISD.load(); m_extPropSetVI1.load(); TRAN(AVITestDriverTask::enabled); diff --git a/MAC/APL/_VIC/VirtualInstrument/test/AVITestDriverTask.h b/MAC/APL/_VIC/VirtualInstrument/test/AVITestDriverTask.h index c1157cf126d0a3e0f9e109e41a3effeabef3d630..19fc7a7d9b474f12a4ab341af5be8b5334b89195 100644 --- a/MAC/APL/_VIC/VirtualInstrument/test/AVITestDriverTask.h +++ b/MAC/APL/_VIC/VirtualInstrument/test/AVITestDriverTask.h @@ -67,7 +67,7 @@ namespace AVI static string m_taskName; AVITestAnswer m_answer; - GCFExtPropertySet m_extPropSetVISD; + GCFExtPropertySet m_extPropSetCCU1VISD; GCFExtPropertySet m_extPropSetVI1; }; }; diff --git a/MAC/APL/_VIC/VirtualInstrument/test/AVITestTask.cc b/MAC/APL/_VIC/VirtualInstrument/test/AVITestTask.cc index 9269f0a50c4ca139853eef09114d46e8b62e820d..2ef257f066969e386c300d4bdf84ad7edfbee737 100644 --- a/MAC/APL/_VIC/VirtualInstrument/test/AVITestTask.cc +++ b/MAC/APL/_VIC/VirtualInstrument/test/AVITestTask.cc @@ -20,7 +20,7 @@ //# //# $Id$ -const char SCOPE_VIC_VIStartDaemon[] = "VIC_VIStartDaemon"; +const char SCOPE_VIC_VIStartDaemon[] = "CCU1_VIC_VIStartDaemon"; const char SCOPE_VIC_VI1[] = "VIC_VI1"; #define NEXT_TEST(_test_, _descr_) \ @@ -98,8 +98,8 @@ AVITestTask::AVITestTask() : m_answer(), m_test_passCounter(0), m_propsetLoadedCounter(0), - m_extPropSetVISD(SCOPE_VIC_VIStartDaemon,StartDaemon::PSTYPE_STARTDAEMON.c_str(),&m_answer), - m_extPropSetVI1(SCOPE_VIC_VI1,"TAplVI",&m_answer) + m_extPropSetCCU1VISD(SCOPE_VIC_VIStartDaemon,StartDaemon::PSTYPE_STARTDAEMON.c_str(),&m_answer), + m_extPropSetVI1(SCOPE_VIC_VI1,"TAplVicVI",&m_answer) { m_answer.setTask(this); } @@ -125,7 +125,7 @@ GCFEvent::TResult AVITestTask::initial(GCFEvent& event, GCFPortInterface& port) break; case F_ENTRY: - m_extPropSetVISD.load(); + m_extPropSetCCU1VISD.load(); m_extPropSetVI1.load(); break; diff --git a/MAC/APL/_VIC/VirtualInstrument/test/AVITestTask.h b/MAC/APL/_VIC/VirtualInstrument/test/AVITestTask.h index 22e2bd8f0fd96c47878c59a9e2e309c7f3c79fef..7802a327458059f65b382741ebeee9ed5b6a0c29 100644 --- a/MAC/APL/_VIC/VirtualInstrument/test/AVITestTask.h +++ b/MAC/APL/_VIC/VirtualInstrument/test/AVITestTask.h @@ -78,7 +78,7 @@ namespace AVI int m_test_passCounter; int m_propsetLoadedCounter; - GCFExtPropertySet m_extPropSetVISD; + GCFExtPropertySet m_extPropSetCCU1VISD; GCFExtPropertySet m_extPropSetVI1; };