{{title}}¶
Environment setup¶
Set up (or verify) your account setup (see here).
In particular:
- add the following lines to $HOME/.bashrc:
export INTROOT=$HOME/introot source $HOME/.acs/.bash_profile.acs
- run the following command(s) to create an integration root area for your personal account (INTROOT defined above):
cd $HOME rm –rf $INTROOT (if it already exists) getTemplateForDirectory INTROOT $INTROOT
Create the project¶
e.g.:
mkdir ~/Projects
cd ~/Projects
tar zxvf DAQ_ACS.tar.gz
Import the project into Eclipse¶
File -> New -> Make project with existing code
and select your folder (e.g.: 'DAQ_ACS').
Create Make targets for your project into Eclipse¶
In the Eclipse right panel:
- select "M"
- browse the project dir up to the "src" where the Makefile is located
- right click on the "src" dir -> New
- specify the Make target name (e.g. 'all' )
- repeat the above steps for each target you want
Compile your project with Eclipse¶
In the Eclipse right panel:
- double click in the Make 'all' target created above
e.g.:
cta ctadev:~/Projetcs/DAQ_ACS/src 29 > make all make[1]: Entering directory `/home/ctadev/Projetcs/DAQ_ACS/src' == Dependencies C++: ../object/daqComponentImpl.d == (preprocessing MIDL => IDL) daqComponent == IDL Compiling for TAO (C++): daqComponent processing /home/ctadev/Projetcs/DAQ_ACS/src/../idl/daqComponent.idl == Dependencies for generated code: ../object/daqComponentC.d == Dependencies for generated code: ../object/daqComponentS.d make[1]: Leaving directory `/home/ctadev/Projetcs/DAQ_ACS/src' make[1]: Entering directory `/home/ctadev/Projetcs/DAQ_ACS/src' == Dependencies C++: ../object/daqComponentImpl.d make[1]: Leaving directory `/home/ctadev/Projetcs/DAQ_ACS/src' make[1]: Entering directory `/home/ctadev/Projetcs/DAQ_ACS/src' == checking IDL for Interface Repository == 2012-11-19T10:41:52.835 INFO [acsstartupLoadIFR] Loading files passed on the command line: ../idl/daqComponent.idl 2012-11-19T10:42:06.215 INFO [acsstartupLoadIFR] Checking of IDL interfaces in Interface Repository completed OK /bin/bash: lockfile: command not found WARNING, ignoring lock ../lib/python/site-packages/.make-OmniOrb.lock == IDL Compiling for OmniOrb (Python): daqComponent == (preprocessing) daqComponent == IDL Compiling for JacORB (Java): daqComponent Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. == Creating jarfile daqComponent from ../object/daqComponent/src == C++ Compiling generated code: daqComponentS.cpp == C++ Compiling generated code: daqComponentC.cpp == Making library: ../lib/libdaqComponentStubs.a == Making library: ../lib/libdaqComponentStubs.so == C++ Compiling: daqComponentImpl.cpp In file included from /alma/ACS-10.2/ACSSW/include/enumpropROImpl.h:383, from ../include/daqComponentImpl.h:16, from daqComponentImpl.cpp:10: /alma/ACS-10.2/ACSSW/include/enumpropROImpl.h: In constructor ‘ROEnumImpl<T, TCB, TSeq, TSeq_out, TAlarm, SK>::ROEnumImpl(const ACE_CString&, baci::BACIComponent*, DevIO<T>*, bool) [with T = DAQCOMPONENT::CamServerState, TCB = DAQCOMPONENT::CBCamServerState, TSeq = DAQCOMPONENT::CamServerStateSeq, TSeq_out = TAO_Seq_Out_T<DAQCOMPONENT::CamServerStateSeq>, TAlarm = DAQCOMPONENT::AlarmCamServerState, SK = POA_DAQCOMPONENT::ROCamServerState]’: daqComponentImpl.cpp:46: instantiated from here /alma/ACS-10.2/ACSSW/include/enumpropROImpl.h:371: warning: ‘ROEnumImpl<DAQCOMPONENT::CamServerState, DAQCOMPONENT::CBCamServerState, DAQCOMPONENT::CamServerStateSeq, TAO_Seq_Out_T<DAQCOMPONENT::CamServerStateSeq>, DAQCOMPONENT::AlarmCamServerState, POA_DAQCOMPONENT::ROCamServerState>::alarmSystemEnabled_m’ will be initialized after /alma/ACS-10.2/ACSSW/include/enumpropROImpl.h:320: warning: ‘baci::MonitorenumpropEventDispatcher* ROEnumImpl<DAQCOMPONENT::CamServerState, DAQCOMPONENT::CBCamServerState, DAQCOMPONENT::CamServerStateSeq, TAO_Seq_Out_T<DAQCOMPONENT::CamServerStateSeq>, DAQCOMPONENT::AlarmCamServerState, POA_DAQCOMPONENT::ROCamServerState>::monitorEventDispatcher_mp’ /alma/ACS-10.2/ACSSW/include/enumpropROImpl.i:26: warning: when initialized here In file included from /alma/ACS-10.2/ACSSW/include/enumpropROImpl.h:25, from ../include/daqComponentImpl.h:16, from daqComponentImpl.cpp:10: /alma/ACS-10.2/ACSSW/include/enumpropAlarm.i: At global scope: /alma/ACS-10.2/ACSSW/include/enumpropAlarm.h: In instantiation of ‘baci::AlarmenumpropEventStrategy<DAQCOMPONENT::CamServerState, ROEnumImpl<DAQCOMPONENT::CamServerState, DAQCOMPONENT::CBCamServerState, DAQCOMPONENT::CamServerStateSeq, TAO_Seq_Out_T<DAQCOMPONENT::CamServerStateSeq>, DAQCOMPONENT::AlarmCamServerState, POA_DAQCOMPONENT::ROCamServerState>, ACS::Alarmpattern>’: /alma/ACS-10.2/ACSSW/include/enumpropROImpl.i:758: instantiated from ‘ACS::Subscription* ROEnumImpl<T, TCB, TSeq, TSeq_out, TAlarm, SK>::new_subscription_AlarmEnum(ACS::Alarmpattern*, const ACS::CBDescIn&) [with T = DAQCOMPONENT::CamServerState, TCB = DAQCOMPONENT::CBCamServerState, TSeq = DAQCOMPONENT::CamServerStateSeq, TSeq_out = TAO_Seq_Out_T<DAQCOMPONENT::CamServerStateSeq>, TAlarm = DAQCOMPONENT::AlarmCamServerState, SK = POA_DAQCOMPONENT::ROCamServerState]’ daqComponentImpl.cpp:273: instantiated from here /alma/ACS-10.2/ACSSW/include/enumpropAlarm.i:138: warning: deprecated covariant return type for ‘char* baci::AlarmenumpropEventStrategy<T, ROT, AlarmT>::getObjectState() [with T = DAQCOMPONENT::CamServerState, ROT = ROEnumImpl<DAQCOMPONENT::CamServerState, DAQCOMPONENT::CBCamServerState, DAQCOMPONENT::CamServerStateSeq, TAO_Seq_Out_T<DAQCOMPONENT::CamServerStateSeq>, DAQCOMPONENT::AlarmCamServerState, POA_DAQCOMPONENT::ROCamServerState>, AlarmT = ACS::Alarmpattern]’ /alma/ACS-10.2/ACSSW/include/baciEvent.h:197: warning: overriding ‘virtual const char* baci::EventStrategy::getObjectState()’ In file included from /alma/ACS-10.2/ACSSW/include/enumpropAlarm.h:123, from /alma/ACS-10.2/ACSSW/include/enumpropROImpl.h:25, from ../include/daqComponentImpl.h:16, from daqComponentImpl.cpp:10: /alma/ACS-10.2/ACSSW/include/enumpropAlarm.i: In member function ‘void baci::AlarmenumpropEventStrategy<T, ROT, AlarmT>::setObjectState(const char*) [with T = DAQCOMPONENT::CamServerState, ROT = ROEnumImpl<DAQCOMPONENT::CamServerState, DAQCOMPONENT::CBCamServerState, DAQCOMPONENT::CamServerStateSeq, TAO_Seq_Out_T<DAQCOMPONENT::CamServerStateSeq>, DAQCOMPONENT::AlarmCamServerState, POA_DAQCOMPONENT::ROCamServerState>, AlarmT = ACS::Alarmpattern]’: daqComponentImpl.cpp:273: instantiated from here /alma/ACS-10.2/ACSSW/include/enumpropAlarm.i:183: warning: format ‘%llu’ expects type ‘long long unsigned int*’, but argument 6 has type ‘ACS::TimeInterval*’ == Making library: ../lib/libdaqComponentImpl.a == Making library: ../lib/libdaqComponentImpl.so make[1]: Leaving directory `/home/ctadev/Projetcs/DAQ_ACS/src' . . . 'all' done
Build your project with Eclipse¶
In the Eclipse right panel:
- double click in the Make 'install' target created above, e.g.:
cta ctadev:~/Projetcs/DAQ_ACS/src 30 > make install .....includes: daqComponentImpl.h ...CDB-Schemas: .....idl: /bin/bash: lockfile: command not found WARNING, ignoring lock /home/ctadev/introot/lib/python/site-packages/.make-OmniOrb.lock daqComponentStubs Finished installing IDL daqComponent .....lib: daqComponentImpl .....exe: ...other files Copying current files from: /home/ctadev/Projetcs/DAQ_ACS/src to: /home/ctadev/introot/Sources/DAQ_ACS/src from: /home/ctadev/Projetcs/DAQ_ACS/include to: /home/ctadev/introot/Sources/DAQ_ACS/include . . . done . . . installation done cta ctadev:~/Projetcs/DAQ_ACS/src 31 >
Test your ACS Component using the ACS Command Centre¶
- Start the ACS Command Centre
cta ctadev:~/Projetcs/DAQ_ACS/test 31 > cd Projetcs/DAQ_ACS/test/ cta ctadev:~/Projetcs/DAQ_ACS/test 31 > export ACS_CDB=$PWD cta ctadev:~/Projetcs/DAQ_ACS/test 31 > acscommandcenter
- start the ACS Suite using the appropriate 'Start' button
- start the Object Explorer tool through the appropriate Tools menu entry.
Stop the ACS Command Centre¶
- exit the Object Explorer
- stop the ACS Suite using the appropriate 'Stop' button