from the context menu.
The default of a new field/value-item is 'scalar'. How can I use arrays?
One way is to right-click on 'scalar'; in the class design (Design View) and select 'Replace with' in the context menu. The same works reverse, array types can be replaced by scalars as well.
I use a custom server action. Why some value-items are still filled by the FESA FWK?
As soon as a value-item defines a 'data-field-ref', the values-item will automatically be filled by FESA after execution of the custom server action. To prevent that, just remove the node 'data-field-ref' from a value-item.
- The promotion mechanism relies on XSD schema. The XSD schema files are created / updated in the background during source code synchronization.
- These types of data fields in the FESA class design are promoted only to the instance file if a default value is given in the FESA class design.
-
-
C++ Programming
Up
How do I use C++ editing support?
Eclipse offers the possibility to define code fragments that can be inserted by typing the name of the fragment and pressing CTRL+SPACE. For C++ a huge collection is already available and can be configured in Window > Preferences > C/C++ > Editor > Templates. For FESA3 related code a collection of code templates is defined.
How do I place 2D-Arrays in the RDA data container using C++?
For example:
string testString = "This is a test string";
const char ** stringArray = new const char*[11];
for (int i = 0; i < 11 ; i++) {
stringArray[i] = testString.c_str();
}
long dims[2] = {11,25};
data.insert("dim_charArrayValue", dims, 2);
data.insert("charArrayValue", stringArray, 11);
How do I access values in 2D arrays? What do I have to consider?
Design definition:
<data>
<device-data>
<configuration>
<field name="structArray">
<custom-type-array2D data-type-name-ref="StructArray">
<dim1>3</dim1>
<dim2>3</dim2>
</custom-type-array2D>
<default>{{{-1,-1,-1}}}</default>
</field>
</configuration>
Instantiation:
<device-instance name="TestDevice0" state="development">
<configuration>
<description value=""/>
<accelerator value="NONE"/>
<timingDomain value="NONE"/>
<acceleratorZone value="NONE"/>
<mainMuxCriterion value="NONE"/>
<structArray idref="_180319182146_0">
<value>{{{39.948,18,1},{-1,-1,-1},{-1,-1,-1}},{{12.001,6,1},{15.99994,8,2},{-1,-1,-1}},
{{7.1,5,2},{0.8,1,5},{-1,-1,-1}}}</value>
</structArray>
</configuration>
C++ Implementation:
std::cout << " max size: " << maxSize1 << ", " << maxSize2 << std::endl;
uint32_t size1, size2;
const StructArray::StructArray *s = pDev->structArray.get(size1, size2);
std::cout << " actual size: " << size1 << ", " << size2 << std::endl;
for (int i = 0; i < maxSize2; i++) {
for (int j = 0; j < size2; j++) {
std::cout << " i: " << i << " j: " << j ;
const StructArray::StructArray *m = pDev->structArray.getCell(i, j);
std::cout << " - (" << m->a << ", " << m->z << ", " << m->sr << ")" << std::endl;
}
}
Note: getCell() considers the maximum size of the 2D array, not the actual dimensions.
How do I enable / disable my own DEBUG messages within a FESA class?
Best practice is to use the FESA diagnostic logging.
How do I provide my custom logging topic for my FESA software?
- First define a custom logger:
cmw::log::Logger& mylogger = cmw::log::LoggerFactory::getLogger("FESA.SW.MyVerySpecialLogger");
- Use the custom logger in the log macros, e.g.
LOG_ERROR_IF(mylogger, "Setting1GetAction::execute - ERROR");
LOG_TRACE_IF(mylogger, "Setting1GetAction::execute - TRACE");
LOG_DEBUG_IF(mylogger, "Setting1GetAction::execute - DEBUG");
LOG_INFO_IF(mylogger, "Setting1GetAction::execute - INFO");
LOG_WARNING_IF(mylogger, "Setting1GetAction::execute - WARNING");
- Use a custom log.cfg along with the deploy-unit file which contains the custom logger:
...
logger.FESA.DIAG.level = AUDIT
# custom logger
logger.FESA.SW.MyVerySpecialLogger.level = WARNING
Please note that the file log.cfg is overridden during a release of the FESA software.
How do I prevent loggers writing to stdout
CMW logging sends log messages to all registered appenders. stdout is included by default, then the appenders configured in log.cfg are added.
To remove the default standard output appender:
#include <cmw-log/AppenderManager.h>
...
cmw::log::AppenderManager::unregisterAppender("StdoutAppender");
To add a standard output appender:
cmw::log::StdoutAppenderBuilder appender("AnotherStdoutAppender");
appender.setOutputStream(std::cout);
cmw::log::AppenderManager::registerAppender(appender.build());
What is the maximum length of a log message?
- < Fesa3 7: syslog limit = 1 kB
- > Fesa3 7.0.0: GELF 64kB (=1 UDP Paket),
How do I use preprocessor directives to enable MOCK sections?
- If the preprocessor directive is going to be reused within several source files:
- Define a C++ helper class within /src//Common/UserCode, e.g. Helper, make sure you have the same namespace as the FESA class itself
- define the preprocessor directive you need in the header, e.g. MOCK_
- in the source file you would like to use the preprocessor directive:
- include the helper class using #include </Common/UserCode/Helper.hpp>
- use the directive #ifdef MOCK_ around the section you use for mocking, etc
- if the preprocessor directive is uncommented in the helper classes' header the section will be executed during runtime
- if the preprocessor directive is commented the section will be ignored
How do I use the hasDataChanged()-method in custom get actions?
The hasDataChanged()-method was introduced to filter manual notifications. The default implementation returns true, but manual checks can be implemented to trigger manual notifications. A typical use-case for this method is data filtering at the real-time level. The method is also intended to steer when to send updated data. Keywords: on-change / subscription.
From: https://wikis.cern.ch/display/FESA3/hasDataChanged%28%29+method (Info from 08/2013)
"The
hasDataChanged()
is a method of a property's server action's C++ class. Its return value is checked by the framework before updating the clients subscribed to a given device property. If
hasDataChanged()
returns
true
, the clients will be updated; if it returns
false
, the clients will not be updated. The default implementation in the framework always returns
true
; this means that subscribing clients will always be notified even if the (possibly filtered) data published by the property hasn't changed since the last update.
The framework also generates an overridden implementation of
hasDataChanged()
for a FESA class's get server actions. The generated overridden implementation is a stub also returning
true
. The FESA class developer is free to provide his own implementation.
For example, for a notifiable property
Acquisition
whose get server action is called
GetAcquisition
the framework will be generated the following code for C++ class
GetAcquisition
:
GetAcquisition.h:
bool hasDataChanged(const fesa::RequestEvent& event, fesa::AbstractDevice& abstractDevice, const rdaData& filter) const;
GetAcquisition.cpp:
bool !GetAcquisition::hasDataChanged( const fesa::RequestEvent& event, fesa::AbstractDevice& abstractDevice, const rdaData& filter) const {
Device& device = static_cast<Device&>(abstractDevice);
if( device.dataChanged.get(event.getMultiplexingContext()) == true ) {
return true;
}
return false;
}
Please note that
hasDataChanged()
is generated for all get server actions, that is for both get server actions of notifiable properties and for get server actions of non-notifiable properties. The framework ignores
hasDataChanged()
for non-notifiable properties."
How do I send manual notifications from an RT action to other properties in a FESA class?
- Given that the FESA class design is already prepared for sending manual notifications from an RT action the following steps still have to be performed in the C++ code:
- call registerManualNotification("NameOfThePropertyWithoutNamespace", pDev->getName()); within the device loop
- call sendManualNotification(pCtxt); after the loop for the devices to send all registered notifications
Can I guarantee ordering of notifications on a property notified by multiple RT-Actions?
Notifications are triggered at the end of an RT-action. Depending on the priorities and scheduling configuration of RT-Actions, it is possible that an action that started earlier will finish later, resulting in out-of-order notifcations. If strict ordering of notifications is required, it is recommended that the two RT-Actions trigger a separate on-demand action that then notifies clients.
Generally, the middleware does not strictly guarantee ordering of notifications but can be assumed to deliver them in the order received.
How do I work with filter-items?
If filter-items are defined in a setting- or acquisition property it is possible to evaluate the content within the execute-method of the get-/set-action:
const char* theFilter = filter.getAFilter();
if( strcmp(theFilter, "AString")==0 ) {
data.setAnItem1(true);
data.setAnItem2(true);
} else {
data.setAnItem1(false);
data.setAnItem2(false);
}
How do I retrieve the FESA class name / version in the C++ code?
std::string className = this->ServiceLocator_->getClassName();
std::string classVersion = this->ServiceLocator_->getClassVersion();
How do I provide on-change functionality? I.e. send data only when it has notably changed?
- In the FESA class design: set the attribute 'on-change' to true in the property definition. This will indicate the intention to the applications.
- In the property implementation: adapt the default implementation of the method 'hasDataChanged'. Per default this method returns true which indicates a data change. If data changes within borders only are supposed to be published it is possible to implement this in the 'hasDataChanged' method.
How do I use GSI's Conditions to illustrate error conditions of my FESA software?
How do I create and use an array of strings?
Can I use the timing events and their event numbers in C++ code?
Just copy the C header file /common/usr/timing/groupsAndEvents/TimingConfigurationWR_V1.h to the Common code folder (e.g. into ClassName /src/ClassName/Common) of your FESA software project. The header lists the event names and their numbers. The header is generated in parallel to the WR timing configuration file in /common/usr/timing/groupsAndEvents/ .
How can I provide default values for GSI specific data fields?
https://www-acc.gsi.de/wiki/FESA/FESA3DefaultValuesAutomatically
How can I observe custom data of FESA software?
https://www-acc.gsi.de/wiki/FESA/FESA3ProcessStatisticsWithCMX
How can I construct my own TimingContext with a Selector?
fesa::MultiplexingContext* pCtxt = new fesa::TimingContext("FAIR.SELECTOR.S=1");
Please note that this custom timing context should NOT be used to store data in the acquisition buffer to avoid unexpected results.
The default TimingContext takes the system clock as timestamp and permissions are settingsAccess:NOT_ALLOWED and acquisitionAccess ALLOWED, except when used in SpecificInit where settingsAccess is ALLOWED.
How do I provide data in the acquisitionContext-Field of the non-multiplexed Acquisition-Property?
At the end of the AcquisitionGet execute-function add something like:
auto context = pEvt->getMultiplexingContext();
if (context->getType() != MultiplexingContext::MuxContextType::NoneCtxt) {
data.setProcessIndex(pDev->acquisitionContext.get(context)->processIndex);
data.setSequenceIndex(pDev->acquisitionContext.get(context)->sequenceIndex);
data.setChainIndex(pDev->acquisitionContext.get(context)->chainIndex);
data.setEventNumber(pDev->acquisitionContext.get(context)->eventNumber);
data.setTimingGroupID(pDev->acquisitionContext.get(context)->timingGroupID);
data.setAcquisitionStamp(pDev->acquisitionContext.get(context)->acquisitionStamp);
data.setEventStamp(pDev->acquisitionContext.get(context)->eventStamp);
data.setProcessStartStamp(pDev->acquisitionContext.get(context)->processStartStamp);
data.setSequenceStartStamp(pDev->acquisitionContext.get(context)->sequenceStartStamp);
data.setChainStartStamp(pDev->acquisitionContext.get(context)->chainStartStamp);
}
How can I construct a TimingContext with non-default access rights?
Use the constructor specifying ActionType, acqusitionAccess and setttingAccess:
// TimingContext to write settings in a set action
fesa::MultiplexingContext* pCtxt = new fesa::TimingContext("FAIR.SELECTOR.S=1", fesa::ActionType::SetAction, SET_ALLOWED, SET_ALLOWED | CHECK_FLAG_TO_BE_SYNC );
How can I provide my own TimingContext to avoid the error message "FESA_5014 The multiplexed field 'acquisitionContext' cannot be accessed using a NoneContext."?
A None Context cannot be used with a multiplexed field as of FESA3 v 5.0.1. Example workaround:
class TimingContextToWorkAroundRecentChangesInFesa: public MultiplexingContext {
public:
TimingContextToWorkAroundRecentChangesInFesa(const std::string& cycleName, timestamp_ns cycleStamp);
};
/*
* getSlot() in RTActions uses only the timestamp. However, the time stamp gets lost
* (i.e. is replaced with the system time) when calling via an OnDemandEventSource!!!
*/
TimingContextToWorkAroundRecentChangesInFesa::TimingContextToWorkAroundRecentChangesInFesa(const std::string& cycleName, timestamp_ns cycleStamp)
{
type_ = CycleTypeCtxt;
cycleName_ = cycleName;
cycleStamp_ = cycleStamp;
timeStamp_ = cycleStamp;
}
void FileWriteRTAction::execute(fesa::RTEvent* pEvt)
{ ...
TimingContextToWorkAroundRecentChangesInFesa *context = new TimingContextToWorkAroundRecentChangesInFesa(ctxt->getCycleName(),ctxt->getCycleStamp());
...
}
Release / Delivery / Deployment
Up
How do I mount the required FESA directories on a (virtual) front-end?
Create a directory matching the hostname of the (virtual) front-end in /common/export/nfsinit/ and provide a symbolic link to the FESA initialization script similar to the one in e.g. /common/export/nfsinit/vmla02/ .
How do I deliver FESA software for the MCS in Saclay, France?
https://www-acc.gsi.de/wiki/bin/view/FAIR/PlinacSource/DeploymentFESASoftware
Check the White Rabbit timing documentation for WR-related information.
Why does export to the database not work? An RMI exception is thrown.
When trying to export a FESA document to the database I receive the error message
"Error creating bean with name 'org.springframework.remoting.rmi.RmiServiceExporter#0' defined in class path resource [resources/server_config.xml]: Invocation of init method failed; nested exception is java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
$ java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
$ java.lang.ClassNotFoundException: org.springframework.remoting.rmi.RmiInvocationHandler (no security manager: RMI class loader disabled)"
Solution: Please check whether port 1199 is used by another program.
Quick Solution: Switch to another asl machine in the cluster.
Why does SVN require a password during the release of operational FESA software? -> ACC Login (kerberos)
a.k.a Eclipse freezes during release
Release ElectroStatQuadDU, version 0.2.0 Delivering FESA deploy-unit
ElectroStatQuadDU.deploy for !FEC vmla09...
Authentication realm: < [[https://www-acc.gsi.de:443][https://www-acc.gsi.de:443]]> ACC Login (kerberos)
Most probably the kerberos ticket expired. Before starting Eclipse check with klist which tickets your Linux session already have and perform kinit to re-initialize your kerberos ticket. See https://www-acc.gsi.de/wiki/IN/Subversion for details.
user@asl7xx:lnx>kinit; eclipse-neon&
During release the KDE Wallet pops up. What is this?
The KDE wallet is Linux' password storage on KDE systems. It can be disabled. See https://www-acc.gsi.de/wiki/IN/Subversion for details.
How do I create instance documents for mock devices efficiently?
Push the button on the toolbar of the instance file. A new file with a different file name will be created. It contains the same information as the original instance file. Only the device instance names will be changed (preceding X) as well as the timing configuration which will be set to NONE.
What is the difference between development/test and productive release of FESA software?
(07/2016) Different settings apply during release. See https://www-acc.gsi.de/wiki/FESA/FESA3ReleaseOfFESASoftware for details.
How can I jump directly to directories relevant for FESA development on the asl74x-cluster?
Matthias Wiebel created a collection of helper commands. You can find them here.
How can I upload FESA Explorer .zip files to the webserver without eclipse?
Script:
/common/usr/fesa/tools/scripts/upload-fex-webdav.sh
(The script uses kerberos and performs: curl --negotiate -u : -X PUT -T my.zip https://websvcdev.acc.gsi.de/groups/fesa/fex/)
Using cadaver:
cadaver https://websvcdev.acc.gsi.de/groups/fesa/fex/
put my.zip
Runtime
Up
How do I launch a FESA3 deploy-unit automatically on a (virtual) front-end?
The basic steps to launch a FESA3 deploy-unit are outlined here: https://www-acc.gsi.de/wiki/FESA/FECFilesystem#FEC64.
How do I test whether my FESA software is running and accessible for applications?
- Raphael M. kindly provided a tool to test the full stack from the top:
./device-connectivity-test.sh
- The tool will not only print the data it received but also summarize at the end in which layer problems appeared. Example:
...
--------------- Result Summary ---------------
Device : 'XYR01LB1'
Property : 'Status'
Nameserver : success
CMW/RDA3 (get) : success
JAPC (get) : success
CMW/RDA3 (subscribe) : success
JAPC (subscribe) : success
- The official wiki page: https://www-acc.gsi.de/wiki/Service/SvDeviceTest
How can I check whether my deploy-unit is up and running?
- Launch ./cmw-admin-console on the command line at a machine of the asl cluster. The tool lists the FESA software found in the database and allows status checks.
How do I quickly test whether my FESA software is running and accessible via RDA3 directly?
- Use the RDA3 C++ client software which is available for the FESA developers on the asl cluster:
- get-rda3-c++, set-rda3-c++, subscribe-rda3-c++
# set environment variable for appropriate CMW directory server
export CMW_DIRECTORY_CLIENT_SERVERLIST=cmwdev00a.acc.gsi.de:5021 # DEV and TEST environment
export CMW_DIRECTORY_CLIENT_SERVERLIST=cmwpro00a.acc.gsi.de:5021 # PRODUCTION environment
# perform get of Status property on device TestDevice0
user@asl74x:~> get-rda3-c++ -d TestDevice0 -p Status
# subscribe to a multiplexed property with a cycle name
user@asl74x:~> subscribe-rda3-c++ -d TestDevice0 -p Acquisition -c FAIR.SELECTOR.S=1
How do I find out in which environment my FESA software is running? Test/Development or Productive?
A python scripts performs checks on the development and the productive CMW directory servers:
user@asl74x:~> locate-fesa-software -f <name of FESA deploy-unit>
How do I find out in which environment my device is available? Test/Development or Productive?
A python scripts performs checks on the development and the productive CMW directory servers and the FESA database:
user@asl74x:~> locate-fesa-software -d
When is the persistency data file written?
The default interval for periodic persistence is: 3600 s (1h). After a new setting is applied, persistency data is written after a default delay of 30s. Persistence data is also written during a clean shutdown. If no fields are marked as persistent, no persistency data are written. There is also the possibility to trigger persistency "by hand". The default interval and the delay both can be configured in the fesa.cfg file. A period interval of 0 disables periodic persistence. (On the asl cluster or on 32-bit FECs it is possible to pass the configuration file of your choice via an application argument )
On a FEC: Where is the persistency data file located?
On a FEC the directory is mounted as /opt/fesa/data/development/fesa-data/ .
On the asl-cluster: Where is the persistency data file located?
/common/fesadata/data/
FESA_9006 Failed to restore the devices
This error is related to incompatibilities of persistent data. If an xml file (PersistentData.xml) containing persistent data is created during start of a deploy-unit because of persistent data fields in the class design the deploy-unit will not start a second time until the persistent data file is removed and automatically recreated by the latest version.
FESA_13008 Partial setting not allowed for this property
The rda data container expects all desired data values to be used during call of the settings property.
FESA_13021 The field namedPositionNames has no data for the cycle selector ALL (no set was done before calling get) ...
- The exception relates to the content of the rolling buffer that is used internally for acquisition fields. If the content is empty when a get-Operation is performed the exception is thrown. To circumvent this exception it is recommened to fill the buffer, e.g. during initialization before reading it. This may happen in an RT-Action for example:
void StatusRTAction::execute(fesa::RTEvent* pEvt) {
MultiplexingContext *pCtxt = pEvt->getMultiplexingContext();
std::vector<Device*> deviceCollection =
A201ServiceLocator_->getDeviceCollection();
for (unsigned int i = 0; i < deviceCollection.size(); i++) {
Device *pDev = deviceCollection[i];
if (pDev->power.get(pCtxt) != DEVICE_POWER::ON) {
pDev->powerState.set(DEVICE_POWER_STATE::OFF, pCtxt);
std::cout << "StatusRTAction(): power off device : "
<< pDev->getName() << std::endl;
pDev->status.set(DEVICE_STATUS::UNKNOWN, pCtxt);
pDev->detailedStatus.lower(0, pCtxt);
pDev->detailedStatus.lower(1, pCtxt);
pDev->control.set(DEVICE_CONTROL::LOCAL, pCtxt);
pDev->opReady.set(false, pCtxt);
pDev->interlock.set(false,pCtxt);
std::string errorString= "Device turned off";
long error_code= 4711;
pDev->error_collection.set(0,0,pCtxt);
} else {
pDev->powerState.set(DEVICE_POWER_STATE::ON, pCtxt);
std::cout << "StatusRTAction(): power on device : "
<< pDev->getName() << std::endl;
pDev->status.set(DEVICE_STATUS::OK, pCtxt);
pDev->detailedStatus.raise(0, pCtxt);
pDev->detailedStatus.raise(1, pCtxt);
pDev->control.set(DEVICE_CONTROL::LOCAL, pCtxt);
pDev->opReady.set(true, pCtxt);
pDev->interlock.set(false,pCtxt);
std::string errorString= "Device turned on";
long error_code=1;
pDev->error_collection.set(0,0,pCtxt);
}
std::cout << "Synchronize setting fields" << std::endl;
pDev->synchronizeSettingFields(*pCtxt);
}}
- Another possibility is to remove the data-field-ref elements in the value-item definition of the acquisition property. Then it is possible to set the outgoing acquisition data in the C++ code of the get action for the acquisition property.
FESA_4025 Instantiation file error: The value '-2147483648' is not valid for the xml-attribute 'value'....
Since FESA3 2.2.2 the value of the deviceNameTimingReceiver element in the instance file is checked. The default value -2147483648 does not work. For simple tests it is sufficient to select a value >0 .
FESA_1009 Failed to set the priority of the thread 'Notif_thread-default' to '17'. POSIX-ErrorMessage: Permission denied.
Root rights are required when launching a FESA binary that uses the RT part. May be circumvented by using the parameter -noRTSched during launch if root rights are not available. Another solution is to set the thread priority to '1'.
<client-notification-threads>
<thread-default prio="1"/>
</client-notification-threads>
FESA_12005 Value item 'Operation': invalid data; nested error message: FESA_10009 Invalid value: '0' is invalid regarding...
The error message during set of a property containing enumerations "FESA_12005 Value item 'Operation': invalid data; nested error message: FESA_10009 Invalid value: '0' is invalid regarding type '::Dm3::SchOPERATIONLIST::SchOPERATIONLIST'.. " may occur when enum items are set to access="RO" in the FESA class design. Setting access="RW" allows to write properties containing enumeration items.
I cannot connect to running FESA software with the FESA Explorer, and yes, the FESA software is up and running
A popular mistake is the naming of the FEC in the test folder of the deploy-unit. Please use the host name only, e.g. asl730. Using e.g. asl730.acc.gsi.de leads to the connection problems mentioned above.
How can I see the log output of my FESA software?
Using logstash.
How can I see which environment variables apply for a running process? (=which CMW nameserver is used by a FESA deploy-unit?)
strings –a /proc/<pid_of_the_process>/environ
How can I stop the daemon running a deploy-unit?
daemon -n testDU --stop
How can I restart the daemon running a deploy-unit?
daemon -n testDU --restart
Alternatively: reboot the FEC.
How can I start a deploy-unit on a FEC manually for testing?
cd /opt/nfsinit/<FEC name>
./50_fesa_...
My FESA Software runs when started manually but segfaults when started by daemon
This may be caused by linking an incompatible Boost library. Example: in Makefile.dep, DEPENDENT_LINKER_OPTIONS += /lib64 will cause the linker to use the system default Boost in preference to FESA's Boost version. The manual startscript passes configuration files as separate parameters, the daemon passes a configuration directory and uses the boost_filesystem library.
My newly inserted RT action is not triggered. Why?
Along with the class design the deploy-unit design has to be adapted as well. It requires a scheduler and the executable set to be 'mixed'. In the instance file the appropriate events have to be chosen.
How can I observe process statistics (notification queue length, # RT action/get/set calls, ...) of FESA software?
https://www-acc.gsi.de/wiki/FESA/FESA3ProcessStatisticsWithCMX
How can I read/write properties of FESA software using a (Python) script?
For example by using the REST interface
https://www-acc.gsi.de/wiki/FESA/Intern/JAPCRESTService
Frontends
Up
In the FEC initialisation directory /common/export/nfsinit<!FEC-Name> set a link to the global script which copies the script that defines the convenience aliases to the RAM disc of the FEC. E.g.
cd /common/export/nfsinit/vmla01
ln -s ../global/niceShortcuts 60-niceShortcuts
How do I log in to a FEC?
See https://www-acc.gsi.de/wiki/FESA/FrontEnds#Log_45in_44_environment_and_diagnosis_via_hostname
Which Convenience Functions are available for the Frontend / FEC environment?
See https://www-acc.gsi.de/wiki/FESA/FESA-FESA-Change-Directory-Commands
What is the purpose of commands like cdi, cdii, cdf, cdff?
See https://www-acc.gsi.de/wiki/FESA/FESA-FESA-Change-Directory-Commands
How can I see the log output of a booting front-end?
A possibility is the command
graylog tail --source <hostname> # e.g. graylog tail --source scuxl0000
How do I adjust a FEC for a certain operating system?
Create a symbolic link named like the hostname of the FEC in /common/tftp/csco/pxe/pxelinux.cfg to the required OS image.
Example:
cd /common/tftp/csco/pxe/pxelinux.cfg
ln -s virtual_scuxl.el7 vmla01
How do I use a GSI nomenclature instead of a frontend hostname?
FESA Database
Up
See Database Workflow - Issues to consider
How can I find out what is stored in the FESA database?
See Getting Information from the FESA Database
Exporting instances to the test database: what does the "Event is not defined" error message mean?
From DR7 on (04/2018) the test database uses a different implementation than the pro database. The actual error message is swallowed by the database internal tools. Please refer to the database developers.
cern.fesa.model.exception.FesaException: Could not export to database: DeviceData_Z_DU.instance
at cern.fesa.control.database.LabDataBaseManager.export(LabDataBaseManager.java:219)
at cern.fesa.plugin.job.ExportJob.runInWorkspace(ExportJob.java:67)
at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:39)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: java.lang.RuntimeException: Could not insert instantiation unit:PreparedStatementCallback; uncategorized SQLException for SQL [call fesa_server.insert_instantiation_unit(?,?,?)]; SQL state [72000]; error code [20037]; ORA-20037: PROCESSING_ERROR : Error occured when inserting FESA IU ORA-20001: Event is not defined!
ORA-06512: at "FESA.COM_ERROR_MGR", line 25
ORA-06512: at "FESA.COM_EVENT_MGR", line 504
ORA-06512: at "FESA.COM_EVENT_MGR", line 715
ORA-06512: at "FESA.COM_EVENT_MGR", line 689
ORA-06512: at "FESA.FESA_INSTANTIATION_INSERTION", line 187
ORA-06512: at "FESA.FESA_INSTANTIATION_INSERTION", line 1210
ORA-06512: at "FESA.FESA_INSTANTIATION_INSERTION", line 1328
Err: ORA-06512: at "FESA.COM_ERROR_MGR", line 25
ORA-06512: at "FESA.COM_EVENT_MGR", line 504
ORA-06512: at "FESA.COM_EVENT_MGR", line 715
ORA-06512: at "FESA.COM_EVENT_MGR", line 689
ORA-06512: at "FESA.FESA_INSTANTIATION_INSERTION", line 187
ORA-06512: at "FESA.FESA_INSTANTIATION_INSERTION", line 1210
ORA-06512: at "FESA.FESA_INSTANTIATION_INSERTION", line 1328
ORA-06512: at "FESA.FESA_SERVER", line 83
ORA-06512: at line 1
Hints:
- the test database checks for duplicate device instance names across different FESA classes
- both databases: sensitive to renamed elements in FESA design
- ...
FESA Class Documentation
Up
How do I provide documentation for a FESA3 class?
See FESA3 Class Documentation
Is there a possibility to visualize a FESA class design graphically?
During generation of FESA class documentation atwo graphs are generated. One of the graphs is visualizing the class interface, the other one is describing the internal relations with events, scheduling units, actions etc.
How do I upload FESA class documentation to the webdav server?
During release of an operational FESA deploy-unit the FESA class documentation page will be uploaded to the webdav server (plug-in >=2.5.3).
Alternatively the toolbar button may be used:
Both possibilities require the SVN username + password (=Linux login credentials) in the FESA preferences.
How can I see the documentation on the server?
In a browser select https://www-acc.gsi.de/data/fesa/classes/.html .
GIT Repository Handling
Up
How do I move from an SVN to a Git repository?
Eclipse:
Use a new workspace.
- New projects:
- Create a new project using the FESA project wizard
- Check 'Share project in repository'
- Switch to Eclipse's git perspective
- Select 'Add an existing local Git Repository to this view'
- Browse to project location in workspace
- Use menu FESA > Configure FESA Project for Repository to perform git ignore settings, commit the files locally, remote git repository creation at https://git.acc.gsi.de/org/fesa-classes or https://git.acc.gsi.de/org/fesa-deploy-units and pushing the master branch to remote
- Existing projects:
Command Line:
How do I import a FESA project from a git repository into my Eclipse workspace?
- copy the git repository URL into the clipboard
- in Eclipse
- select File > Import...
- Git > Projects from Git
- clone URI
- Enter the required username+password
- Fetch the desired branches
- Confirm the local destination
- Locally:
- git config --local user.name
- git config --local user.password
- Globally:
- git config --global user.name
- git config --global user.password
- FESA Eclipse Preferences
- Window > Preferences > FESA > Repository
SVN Repository Handling - outdated
Up
SVN - I just marked a file to be ignored by SVN. However now I cannot commit the folder where the file to be ignored is inside.
Trigger a SVN update of the folder in the Project Explorer. After that you will be able to commit the SVN ignore info of the folder.
SVN - My FESA project was inserted into the SVN repository automatically during creation. But I am not able to synchronize the project with the SVN repository.
Make sure the SVN connector 1.7.x is installed. See https://www-acc.gsi.de/wiki/FESA/FESA3Install201#SVN_Connector for details.
- Option 1: Remove the file. Commit and update the folder. Add the file again if necessary. Select Team > Add to svn:ignore .
- Option 2: Work on the command line. Ignore a directory:
svn propset svn:ignore dirname
. Ignore a file type: svn propset svn:ignore "*.zip" = . Edit the ignore file manually: =svn propedit svn:ignore .
SVN - After project synchronization an error occurs and the SVN connection appears to be lost in Eclipse. No SVN URL is displayed anymore in the Project Explorer.
This can be observed since Eclipse Neon. The SVN meta information for these projects is not lost. Everything can be restored by right-clicking the project > Team > Share project... > SVN > Use project settings > Finish .