Alicedcs.web.cern.ch



The standard DCS

USER INTERFACE in ALICE

Ver. 3.0.7 - 24/09/2008

History

01/03/2007 : Create

04/10/2007 : Bug Fixing and E-Log extension

12/12/2007 : NetworkTestConnection for Network Device, Default User login

24/09/2009 : New FSMTree browser, dcsUiScope Panel

1

Acronyms list

AC Access Control

DU Device Unit

CSV Comma Separated Values

CU Control Unit

DP PVSS Data Point

DPE PVSS Data Point Element

FSM Finite State Machine

FW Frame Work

LU Logical Unit

UI User Interface

UP User Panel

INDEX

Changes in the new release v 3.0.7 4

GUI changes 4

INSTALLATION changes 4

PROGRAMERS RULES 4

PROGRAMMING changes 4

COMPONENT PACKAGING files 5

The standard DCS USER INTERFACE in ALICE v3.0.7 8

INTRODUCTION 8

Standard DCS UI description 10

DETECTOR LOGO USER LOGIN & TIME 10

FSM NODE CONTROL 10

FSM NODE STATE 11

DETECTOR GRAPHIC LOCATOR 12

TITLE BAR 12

USER TOOL BAR 12

INFO DIALOG 13

TOOLS MENU BUTTON 13

ENVIRONMENT PARAMETERS 14

LHC STATUS 18

The TREE BROWSER for the FSM HIERARCHY 18

The USER PANEL FOR MONITORING 19

The DCS UI LOG MESSAGES READER 20

AUXILIARY MONITORING ZONE OF THE FSM MAJOR NODES 20

HOSTS STATE & MAIN FSM CONTROL PANEL for a DISTRIBUTED project 21

CLOSE WINDOW button 29

USER INTERFACE INSTALLATION 30

I –Pre-requisite for the installation 30

II –Component Installation 30

III – Look & Feel 30

III – Modify the config file : config/dcsUi.config 30

[Hierarchy] section 31

[AccessControl] section 31

[General] section 31

[HowToFacility] section 32

[Environment] section 32

[GraphicLocator] section 32

[AuxiliaryMonitoringZone] section 32

[HostsStatusZone] section 33

[ELogFacility] section 34

[InfoReader] section 34

[ToolsMenu] section 34

IV – The “Scope Utility” 35

Developers notes 35

Using the Scope widjet 36

V – The “Logger Utility” 38

Structure of Messages 38

Loggerconfiguration 38

Logger system example : HMPID Detector Logger 40

VI – User Panel Template 42

VII – Graphic Locator Template 44

APPENDIX A – dcsUiBase library 46

COOKBOOK for the GRAPHIC LOCATOR CREATION 53

Changes in the new release v 3.0.7

1 GUI changes

• New dcsUiScope panel in order to display trend curves.

• The FSMTreeBrowser widget compilation now is completed dynamically when the operator select a node.

• Add a “Large Version” of the UI adapted to 16:9 laptop monitors. (\panels\dcsUi\dcsUiMainPanelLarge.pnl)

2 INSTALLATION changes

• Added the new section [InfoReader].

• Added the new section [ToolsMenu].

3 PROGRAMERS RULES

• Please don’t use Layer number 8 in your project, this layer is used by the dcsUi and is intended as reserved.

• In order to integrate your project into the ALICE DCS project it is mandatory to include libraries in your scripts using the instruction “#uses” and NOT the “LoadCtrlLib” sentence in the config file.

4 PROGRAMMING changes

• In dcsUiBase.ctc library : added a function to check the interact with the dcsUi interface:

void dcsUiBase_setMainTitle(string title)

void dcsUiBase_setInfoText(string title, bool highlight = false)

void dcsUiBase_switchProgresBar(bool bOn)

void dcsUiBase_setProgresBar(float progres)

void dcsUiBase_switchBusyBar(bool bOn)

void dcsUiBase_jumpToObject(string node, string obj)

void dcsUiBase_openPopUpPanel(string sPanelFileName,

string sPanelName,

dyn_string dsParameters,

int iType = DCSUI_POPUPMODLESS )

void dcsUiBase_closePopUpPanel(string sPanelName)

• In dcsUiBase.ctc library : modify the two functions to decode LHC status :

string dcsUiBase_LHCStatus2Mess(string sStatus)

string dcsUiBase_LHCStatus2Col(string sStatus)

• In dcsUiBase.ctc library : more functions are added in order to manage colours :

string dcsUiColor_val2Color(float temp, int t_min, int t_max)

string dcsUiColor_convertColorName(string sSearchColor )

dyn_int dcsUiColor_string2RGB(string color, int &r,int &g,int &b)

float dcsUiColor_luminosity(int r, int g, int b)

float dcsUiColor_RGB2Croma(int r,int g,int b,float &h,float &s,float &v)

string dcsUiColor_croma2RGB(float h,float s,float v,int &r,int &g,int &b)

void dcsUiColor_getComplementaryRGB(int &r,int &g,int &b,float s,int l)

string dcsUiColor_getComplementaryColor(string color, bool isBW)

void dcsUiColor_setColor(string shapename, string color, bool isBW)

5 COMPONENT PACKAGING files

|Directory |FileName |Action |

|colorDB |dcsUiBaseColours |Modified |

|config |dcsUi_example.config |Modified |

| |dcsUiSet.config | |

| |dcsUiSet.init | |

| |dcsUiSet.postInstall | |

| |dcsLogger_example.config |Added |

|data\Themes |dcsUiAcid.Theme | |

| |dcsUiBase.Theme | |

| |dcsUiHighContrast.Theme | |

| |dcsUiBase_3.0.5.Theme |Added |

| |dcsUiBase_3.0.Theme |Added |

| |back_3.0.5.jpg |Added |

| |back_3.0.jpg |Added |

| |splash_3.0.5.JPG |Added |

| |splash_3.0.7.jpg |Added |

| |splash_3.0.JPG |Added |

|help\en_US.iso88591\xxxHowTo |xxxHowTo.html | |

|panels\dcsFsmChart |dcsFsmChart.pnl | |

| |dcsFsmChartAxis.pnl | |

| |dcsFsmChartAxisscale.pnl | |

| |dcsFsmChartBar.pnl | |

| |dcsFsmChartBino.pnl | |

| |dcsFsmChartCalendar.pnl | |

| |dcsFsmChartCalendarday.pnl | |

| |dcsFsmChartCommand.pnl | |

| |dcsFsmChartDateTime.pnl | |

| |dcsFsmChartExecuting.pnl | |

| |dcsFsmChartStateTable.pnl |Added |

| |dcsFsmChartStato.pnl | |

|panels\dcsFsmSynoptics |dcsFsmSynoptics.pnl | |

| |dcsFsmSynopticsCUIcon.pnl | |

| |dcsFsmSynopticsDUIcon.pnl | |

| |dcsFsmSynopticsHorLine.pnl | |

| |dcsFsmSynopticsLUIcon.pnl | |

| |dcsFsmSynopticsVerLine.pnl | |

| |dcsFsmSynopticsWidget.pnl | |

|panels\dcsFsmTools |dcsDimDnsStatusWidget.pnl | |

| |dcsFsmArchiving.pnl | |

| |dcsFSMControl_example.pnl |Modify |

| |dcsFsmControllHierarchyWidget.pnl | |

| |dcsFsmGetLogInfo.pnl |Added |

| |dcsFsmHostStatusWidget.pnl | |

| |dcsFsmObjNodeWidget.pnl | |

| |dcsFsmSrvHostWidget.pnl | |

| |dcsFsmTailoring.pnl | |

| |dcsFsmTailorWidget.pnl | |

| |dcsHostPMon.pnl | |

| |dcsHostStatus.pnl | |

|panels\dcsUi |dcsUiACLogin.pnl | |

| |dcsUiAuxiliaryWindow.pnl | |

| |dcsUiAuxiliaryWindow.pnl |Added |

| |dcsUiDataExtraction.pnl |Removed |

| |dcsUiElogSendItem.pnl |Removed |

| |dcsUiEnvirParam.pnl | |

| |dcsUiEnvirTrend.pnl |Removed |

| |dcsUiFsmDevLock.pnl | |

| |dcsUiFsmLock.pnl | |

| |dcsUiFSMObjStatusDisplay.pnl | |

| |dcsUiFsmObjWithDevLock.pnl | |

| |dcsUiFsmObjWithLock.pnl | |

| |dcsUiFSMStatus.pnl | |

| |dcsUiFSMStatusV.pnl |Added |

| |dcsUiFSMtree.pnl | |

| |dcsUiFsmUi.pnl | |

| |dcsUiGeneralDialog.pnl |Added |

| |dcsUiHostFSMStatusWidget.pnl | |

| |dcsUiHostStatusWidget.pnl | |

| |dcsUiHostStatusWidgetSmall.pnl | |

| |dcsUiHwStatus.pnl | |

| |dcsUiInfoDialog.pnl | |

| |dcsUiInfoPopUp.pnl |Added |

| |dcsUiInfoSend.pnl |Added |

| |dcsUiLHCStatus.pnl | |

| |dcsUiLHCStatusV.pnl |Added |

| |dcsUiMainPanel.pnl | |

| |dcsUiMainPanelLarge.pnl |Added |

| |dcsUiMessangerDispMess_example.pnl |Added |

| |dcsUiMessangerLogBook_example.pnl |Added |

| |dcsUiMessangerReader_example.pnl |Added |

| |dcsUiSplash.pnl | |

| |dcsUiSQLExtractor.pnl |Removed |

| |dcsUiTimer.pnl | |

| |dcsUiToolsButton.pnl |Added |

| |dcsUiTools.pnl |Removed |

|panels\ dcsScope |dcsUiScope.pnl |Added |

| |dcsUiScopeArea.pnl |Added |

| |dcsUiScopeAreaLong.pnl |Added |

| |dcsUiScopeAreaSmall.pnl |Added |

| |dcsUiScopeCall_Example.pnl |Added |

| |dcsUiScopePanel_Example.pnl |Added |

| |dcsUiScopeSet.pnl |Added |

| |dcsUiTrendView.pnl |Moved |

|panels\xxxDetector |xxxDetector.pnl | |

| |xxxUiLocator.pnl | |

|pictures\dcsUi |alarm.bmp | |

| |archiveset.bmp | |

| |back.jpg |Modify |

| |backup.bmp | |

| |breakcinc.bmp |Added |

| |check.bmp | |

| |dat.bmp | |

| |elog.gif | |

| |fsmcontrol.bmp | |

| |fsmengine.bmp | |

| |FSMLO_disco.bmp | |

| |FSMLO_dispa.bmp | |

| |FSMLO_enaco.bmp | |

| |FSMLO_enapa.bmp | |

| |FSMLO_excco.bmp | |

| |FSMLO_excpa.bmp | |

| |FSMLO_incco.bmp | |

| |FSMLO_incpa.bmp | |

| |FSMTV_cuc.bmp | |

| |FSMTV_cue.bmp | |

| |FSMTV_cus.bmp | |

| |FSMTV_duc.bmp | |

| |FSMTV_dus.bmp | |

| |FSMTV_luc.bmp | |

| |FSMTV_lue.bmp | |

| |FSMTV_lus.bmp | |

| |help.bmp | |

| |logo.bmp | |

| |note.bmp | |

| |notewrite.bmp | |

| |off.bmp | |

| |off_small.bmp | |

| |printer.bmp | |

| |restart.bmp | |

| |restart_small.bmp | |

| |splash.jpg |Modified |

| |tools.bmp | |

| |users.bmp | |

|scripts\libs |dcsUiBase.ctc | |

| |dcsInfoLibrary.ctc |Added |

| |dcsLogger.ctl |Added |

| |dcsUiBase.txt | |

| | | |

The standard DCS USER INTERFACE in ALICE v3.0.7

1 INTRODUCTION

In the ALICE control room each DCS workplace will be equipped with one 19” display. To reduce the risk of getting the DCS operator confused while dealing with many overlapping windows, the ACC has considered the DCS operation as more effective and less risky if performed via one or very few specialized window. This strategy has been adopted in the Standard UI design (fig.1) separating the FSM hierarchy browsing and monitoring action (mostly used during the normal detector operation) from the FSM control.

How it works

On the UI left side is located the FSM hierarchy tree browser while on the right side of the same window is located the User Panel (UP). The UP is meant to show monitoring information related to the selected FSM node which is highlighted in the tree browser by a red square surrounding the relevant icon. In this way, while navigating trough the FSM three, in the monitoring zone will appear only the corresponding UP without popping up new windows.

The different UPs for the FSM nodes have to be designed and implemented according to the requirements of the sub-detector experts.

For the selected node,, provided the relevant privileges are granted at the Access Control (AC), the standard FSM control panel for the command issue (detector control) can be opened in a smaller overlapping window.

This strategy of separating in different windows actions carried out with different frequencies allows for profiting in the browsing phase of almost all the screen for the UP where in a clear way the detector details can be represented.

Standard UI installation

In order to facilitate the installation in a PVSS project, the UI is provided as a FW component.

In the following table are reported the software version of the different applications requested to run the UI:

|PVSS |FW |FW_FSM |AC |

|3.6 |3.0.0 |r25v25 |Related to FW |

Figure 1. The Standard DCS UI provided by the ACC

2 Standard DCS UI description

1 DETECTOR LOGO USER LOGIN & TIME

A bitmap image representing the “Detector Logo” (60 x 45 pixels) is contained in the following file:

/pictures/dscUi/logo.bmp

The sub detector developer can change the logo changing the logo.bmp file.

To the right is display the current time and date, mouse right-click event displays the starting time of the current session. Closest the time the version number of dcsUi is showed.

On the above row, the window displays the name of the logged user “User Name” (NO USER if nobody is logged). Pressing the Key button then the Login Window opens. It allows for the User Name changing. This is the standard FW Access Control Toolbar button.

[pic]

The Settings of the “Grant List” for the ALICE UI, can be done by editing the [AccessControl] section into the dscUi.config file.

Note: for details on the ALICE AC policy and the FW Access Control component, please refer respectively to the “The ALICE DCS Integration Guidelines v.1.3.1” document and the relevant JCOP FW documentation.

On the right side of the key icons, two bars show the Memory and Disk occupancy in percentage.

2 FSM NODE CONTROL

This push button opens the standard “FSM Control Window” corresponding to the selected node in the tree browser. The button FSM node control is enabled only for the following AC grant levels: Operator, Expert and Developer. The Observer is excluded.

[pic]

For the Operator the FSM Control Window is opened in Modal mode, otherwise it is opened Modless[1].

[pic] [pic]

Figure 2. The FSM Control Window, to the left the single page window and to the right the multi page window

The FSM Control Window can display an FSM hierarchy tree that have up to 126 children, if the System displayed have more then 14 sub nodes, a multi page windows is open.

Note: In order to define the FSM Access Control, please refer to:

3 FSM NODE STATE

[pic]

This widget displays some relevant information of the selected FSM node: the NAME (the FSM Label property: in this case HMPID), the STATE (by the state name and related colour) and operation MODE by the lock state (Included/Excluded or Enabled/Disabled).

In case of long FSM names (typically for the DU), only the last 22 characters are displayed.

4 DETECTOR GRAPHIC LOCATOR

[pic]

If of interest, this area is devoted to host a “detector specific widget”. It shows the detector part corresponding to the selected node in the tree browser. The widget must be developed by the Detector Control system expert. A template file is provided in:

/panels/xxxDetector/xxxUiLocator.pnl

The “Graphic Locator facility” can be enabled/disabled editing the dcsUi.config file in the section [GraphicLocator] setting respectively YES/NO the variable UseGraphicLocator

5 TITLE BAR

A two lines text space is used to show the main info about the displayed UP. In order to set the title, in the Event_Initialize routine of the UP must call a function:

// ---------------- Set the title into the main window ------------------

dcsUiBase_setMainTitle("Node XXX – monitoring etc…");

// ----------------------------------------------------------------------

An example is provided in the template file:

/panels/xxxDetector/xxxDetector.pnl

6 USER TOOL BAR

This bar contains the push buttons that run some user facilities.

|ICON |DESCRIPTION |GRANTED |

|[pic] |Open the FW Standard Alarm Panel |Operator, Expert, Developer |

|[pic] |Open the WEB Browser at the Detector HowTo home page. This HTML page is | |

| |located at: /help/en_US.iso88591/xxxHowTo/xxxHowTo.html |All |

| |where “xxx” represent the three letters detector prefix | |

|[pic] |Open the FW Help page related to the panel showed. Please refer to FW | |

| |documentation. |All |

|[pic] |Open the Windows browser at the ALICE DCS ELOG Server page |Operator, Expert, Developer |

| [pic] |Save a bitmap image file of the actual showed monitoring panel. |Operator, Expert, Developer |

7 INFO DIALOG

A display zone on the left is devoted to display messages to the dcsUi Operator. Three types of messages could be showed using some dcsUi library functions:

• Simple Text Info

void dcsUiBase_setInfoText(string title, bool highlight = false)

• A Percentage Progress Bar

void dcsUiBase_setProgresBar(float progres)

void dcsUiBase_switchProgresBar(bool bOn)

• A Busy Bar

void dcsUiBase_switchBusyBar(bool bOn)

The push bottom on the right opens a dialog windows to send a message to the dcsUi interfaces running into the distributed system. A list box allows to indicate the message destination.

Figure 3. The Info send message panel

8 TOOLS MENU BUTTON

This button open a pop-up menu that contains links to a list of panels that the user can run. The list of items and the access permission can be defined, editing the dcsUi.config file in the section [ToolsMenun].

The variable UseIt has to be set with “Yes” in order to enable it. Then you have one row for each menu item, using the following format:

Buttoni = “,,

[ToolsMenu]

UseIt=YES

Button1="JCOP DE&N,JCOP Device Editor& Navigator,fwDeviceEditorNavigator/fwD..

Button2="Sysmanager,PVSS System Manager,vision/SysMgm,Modify"

# -------------------------------------

Figure 4. The Tools PopUp Menu

9 ENVIRONMENT PARAMETERS

[pic]

This widget shows the values of two PVSS DPs; one devoted to monitor the environment Temperature and the second the environment Pressure. Format and Units are displayed according the PVSS settings. The push button on the right opens a trend view panel related to the environment variables.

The “Environment Parameters facility” can be enabled/disabled, editing the dcsUi.config file in the section [Environment], and setting the variable UseIt to YER/NO accordingly. The DPs and the DPE that trace the environment parameters (DP are specified as FW LOGICAL VIEW names), can be chosen.

10 LHC STATUS

This widget shows the status of the LHC: the LHC Status, the Beam Status and the Detector LHC-Safe Status. In order to display these information the lhc_exchange system must be included into the distributed project[2], and for the Detector LHC-Safe Status the standard DataPoint, as indicated by the ACC responsible, will be created and updated.

For more details on the meaning of the LHC status please refer to: “LHC Operational Mode” document (EDMS doc No. :580728).

11 The TREE BROWSER for the FSM HIERARCHY

[pic]

Figure 4 The tree browser of the FSM hierarchy.

In the figure 4 is displayed the tree browser for the detector FSM hierarchy. Each node, according to a legend, is represented via a small icon (yellow toothed wheel for CU, cyan toothed wheel for LU and green rectangle for DU) followed by its name (FSM Label property for CU and LU).

A red box surrounding the icon, the bold font and the surrounding “« »” of the name, highlights the selected FSM node.

The navigation with the tree browser is quite similar to the one of the “standard Windows”.

Clicking on the mouse right button, a FSM node is selected and the associated UP is then automatically displayed in the dedicated area of the UI.

If commands have to be issued, then pushing the FSM Node Control button, the standard FSM control panel (smaller than the UI) opens. This is the only case when two panels are opened. Once the control operations are over then it can be closed and the browsing trough the tree can restart.

The root node of hierarchy to be first displayed at the start up can be chosen setting the variables RootNode and RootObjec, in the dcsUi.config file in the section [Hierarchy].

A tuning of the behaviour of the FSMTreeBrowser could be done modifying some $parameters of the widget in the panels\dcsUi\dcsUiMainPanel.pnl and dcsUiMainPanelLarge.pnl

These are :

$ALLMODELESS := YES/NO enables modless also for the operator

$EXPANDEDLEVEL := integer, the level of expansion of the tree at start-up

$PRELOADLEVEL := integer, the level of the hierarchy the will be pre load at start-up

12 The USER PANEL FOR MONITORING

Once a FSM node is selected then the corresponding UP appears in the reserved area of the UI. It is intended to provide complementing monitoring information. In addition, according to the user grant, in the UP, tables for the HV-LV channel settings (Vset, Iset,..etc), or pressure and/or temperature limit settings, can be made available.

Its dimensions are: 970 x 680 pixels.

The association between the FSM node and the panel must be done with the standard procedure in the FW Device & Editor Navigator.

A template file of detector UP is available in:

/panels/xxxDetector/xxxDetector.pnl

In order to exploit in the UP the user’s grants provided by the FW Access Control (AC), the DCS programmer is asked to strictly follow the schema reported in the template. He has to write all the relevant code for Enabling/Disabling the widgets, the setting tables, etc.

For the exploitation of the user’s grants in the FSM control please refers to

//Function (NoName)_General()

// ------ Access Control related Functions --------------------------

void xxxDetector_DisableAllAC()

{

// Put Here all commands to disable objects on the panel

}

void xxxDetector_EnableAC(bool isObserver, bool isOperator,

bool isExpert, bool isDeveloper)

{

if(isObserver) {

// Put Here all commands to enable objects on panel

// related to Guest grants

}

if(isOperator) {

// Put Here all commands to enable objects on panel

// related to Operator grants

}

if(isExpert) {

// Put Here all commands to enable objects on panel

// related to Expert grants

}

if(isDeveloper) {

// Put Here all commands to enable objects on panel

// related to Administrator grants

}

}

void xxxDetector_LoggedUserAC(string dp, string username_from_ui)

{

// Set the minimum users grants

bool isObserver=false;

bool isOperator=false;

bool isExpert=false;

bool isDeveloper=false;

// Disable all items in the panel

xxxDetector_DisableAllAC();

// Get Grants for the specified user

dcsUiBase_getACGrants(isDeveloper, isExpert, isOperator, isObserver);

// Now enable - this is related to the specific Policy rules

xxxDetector_EnableAC(isObserver,isOperator,isExpert,isDeveloper);

}

// ---------------------------------------------------------------------

This is the template for the EventIntailize routine of the UP panel

//Function (NoName)_EventInitialize()

main()

{

// -------- Access control ----------------------------------------

// Set the CB Function that Hook the change of Logged User

dyn_string exceptionInfo;

fwAccessControl_setupPanel("xxxDetector_LoggedUserAC",exceptionInfo);

if (dynlen(exceptionInfo)) {

xxxDetector_LoggedUserAC("",""); // global "reject"

}

// -------------------------------------------------------------------

// ---------------- Set the title into the main window ---------------

dcsUiBase_setMainTitle("XXX - Detector View");

// -------------------------------------------------------------------

}

13 The DCS UI LOG MESSAGES READER

[pic]

This widget shows the Log Messages. The first line contains the last one arrived, while below all the others received during the session (if any).

According to the privileges granted at the user (Operator, Expert or Developer), a button allows to open a logbook utility, the browsing on the archived messages can be done as well.

The actual version of the dcsUi don't implements a complete log system, but in the meanwhile each relevant operation, performed by the operator, with the dcsUi produce an automatic “Log Message” that could be processed (Cfr. “The Logger Utility” chapter).

14 AUXILIARY MONITORING ZONE OF THE FSM MAJOR NODES

This widget can monitor the state and operation mode of a list of critical FSM nodes. Only as suggestion: these nodes can refer to devices of the detector infrastructure (power supplies, cooling and gas plants, etc…) which states, a priori, are relevant for the operation of detector parts as Super module, Module, Sector …..

For the FSM operation of the critical nodes (command issue), the normal browsing and control panel opening procedure, has to be followed.

[pic]

Up to twenty nodes, arranged on five rows, can be displayed. A mouse click on the node opens in a child window the panel related to that.

The list of the FSM nodes to be displayed can be defined editing the dcsUi.config in the [AuxiliaryMonitoringZone] section.

The variable Title has to be set with a string containing the title.

Then five variables named Row1.. Row5 contains a comma separated list of, up to four, FSM nodes, using the following format:

Rowi = “,,.[,,.]

[AuxiliaryMonitoringZone]

# ----- This display the table -------

Title = "XXX DETECTOR Auxiliary Zone"

Row1 = "xxx R1,Node One,SECTOR1.DEV1_1,Node Two,SECTOR1.DEV1_2"

Row2 = "xxx R2,Plant One,INFRAS.PLANT1,Plant Two,INFRAS.PLANT1"

# -------------------------------------

15 HOSTS STATE & MAIN FSM CONTROL PANEL for a DISTRIBUTED project

[pic]

This bar contains one push button that opens the FSM Expert Control Panel (fig. 3). From there the start/stop of the entire FSM machinery for a distributed PVSS project can be carried out. It is enabled only if the Expert/Admin privileges are granted at the FW AC.

On the right side of the button there are a series of small widgets that automatically displays the state of systems running in the distributed system.

There are three types of widgets, the simplest represented by a small square that shows just the status of the connection, the second shows the status and the system name for a defined Distributed System, the third that is able to show also information about FSM processes/managers status and the last, .

The dcsHostFSMStatusWidget display this information:

[pic]

The list of the Systems to be displayed can be defined editing the dcsUi.config in the [HostsStatusZone] section.

The variable ExternalFSMPanel has to be set, with a string that specify the name of FSM Control panel that will be opened pushing the FSM button..

Then the variable named Hosts contains a comma separated list of System names that will be displayed with the first type of widget, using the following format:

Hosts = ":[,:]"

The variable named FSMHosts contains a comma separated list of System names that will be displayed with the second type of widget, using the following format:

FSMHosts = ":[,:]"

Finally, the variable named HostsSmall contains a comma separated list of System names that will be displayed with the third type of widget, using the following format:

HostsSmall = ":[,:]"

The HostsSmall and Hosts lines accept also the SystemName parameter in the form of an Internet DNS name, this notation indicate that the host is a generic Network Device (Ex. CAEN SY1527 or PLCs), then the connection test will be done by a PING request to the device.

[HostsStatusZone]

ExternalFSMPanel = "dcsFsmTools\dcsFSMControl.pnl"

Hosts = "ALIDCS001:dcs_system1,ALIDCS002:dcs_system2"

HostsSmall = "ALIDCS001:dcs_system1,HMPIDCS3:hmp_main,SY1527:hmpCa01.cern.ch"

FSMHosts = "HMPIDCS3:hmp_main,HMPIDCS4:hmp_hvlv"

# -------------------------------------

The FSM Expert Control Panel (fig. 5) contains all relevant information about FSM detailed status & control. In order to adapt the panel at the sub-detector FSM structure, the DCS programmer is asked to modify the panel putting the suitable number of the requested objects.

[pic]

Figure 5 - The FSM Expert Control Panel

An example panel is in the :

/panels/dcsFsmTools/dcsFSMControl_example.pnl

Some widgets are furnished in order to arrange this panel:

• dcsDimDnsStatusWidget.pnl : Display the status of DIM DNS Server node.

[pic]

• dcsFsmControllHierarchyWidget.pnl : Display two push buttons able to made the Stop Start/restart of the entire Hierarchy for all systems in the distributed architecture.

[pic]

• dcsFsmHostStatusWidget.pnl : Display a small square that represent a Host into the Distributed system. Two parameters have to be specified: $HostName (DNS Name of Host without the domain suffix) and $SystemName (the PVSS project system name without the colon character).

[pic]

A click on the square opens a related panel showing relevant information about the distributed host.

[pic]

[pic]

• dcsFsmSrvHostWidget.pnl : It displays the status of a FSM Server Manager. One parameter has to be specified: $SysName (the PVSS project system name without the colon character).

[pic]

Then, the name of system, the status of fwFsmSrvr.ctl manager, and the status of the FSM server are showed.

• dcsFsmObjNodeWidget.pnl: It displays the status of a FSM Domain node. Two parameters have to be specified: $sysName (the PVSS project system name without the colon character) and $node (the FSM domain node name).

[pic]

The name of node, two push buttons to restart and to stop the FSM tree recursively, then the status of FSM Domain node, and the ownership of that domain are shown.

The button on the right position to break the ownership of the node.

• dcsFSMTailorWidget.pnl : It displays the controls used to set and create the FSM enable/disable configuration file then edit, save and apply the operation mode of all the CUs in the FSM (include, exclude, disable, enable).

[pic]

In fact, since the CU operation mode is lost at each FSM Start/Stop, or at the PVSS project restart, then for hierarchies with many CUs, the configuration file can be very useful. Since this facility is under development it has been included in the UI as a pre-release version for test purposes.

[pic]

A function library could be used in order to configure the FSM Hierarchy with a specified configuration file created with the dcsFSMTailorWidget

bool dcsUiFSMConfig_applyFSMModeConfiguration(string sFileName)

● in the upper part of the FSM MAIN CONTROL panel there are three others buttons to access additional FSM features as:

- the FSM synoptic panel, showing at one glance the state and the operational mode of all the FSM objects in the project;

[pic]

- the FSM Chart panel showing the FSM_State vs. Time of the FSM objects in the project. Also the commands and the command execution of FSMs can be displayed.

[pic]

[pic]

A right click on the FSM Object label opens a panel that reports all the FSM State changes with the relevant timestamps.

In order to display the chart it is mandatory to archive the states of the FSM CUs/DUs. For this a dedicated tool is provided. A panel, opened by means of a “FSM Archive” button, gives the possibility to set the “Archive” property of all the FSM nodes of a system.

[pic]

16 CLOSE WINDOW button

The CLOSE button can be optionally displayed into the main panel. However, to prevent accidental panel closure, editing the dcsUi.config in the [General] section, and setting the variable CloseButton with NO, the main UI is left continuously running under the control of the PVSS consol process.

USER INTERFACE INSTALLATION

1 I –Pre-requisite for the installation

• Istallation of JCOP FrameWork component

• Setting of Access Control Domain/Privileges/Groups/Users according the centralized AC mechanism managed by ACC

• Definition of the FSM Hierarchy for the Sub-detector

• Settings inside the FSM Hierarchy of labels for each node

• Settings for the FSM Hierarchy of AC privileges for Operator and Expert grants

• Settings for the FSM Hierarchy the association between nodes and User panels

2 II –Component Installation

In order to install the standard UI component ‘Extract’ all zipped files into a temporary directory. Then, start your PVSS Project and run the standard JCOP FW “fwInstallation/fwInstallation.pnl” panel.

Install the component Alice DCS UI.

Restart the project.

3 III – Look & Feel

In order to change the Look & Feel of the dcsUi the sub detector developer can replace this files:

• displayed logo in the upper left corner of the UI : the user can replace the file: pictures/dcsUi/logo.bmp with a customized one. (60 pixel width, 43 pixel height, 256 colours).

• displayed background : replace the file pictures/dcsUi/back.jpg with a JPEG texture image (1280 x 1024 pixel). Some examples are give in the directory data/Themes.

• default user monitoring zone background : replace the file pictures/dcsUi/splash.jpg with a JPEG image (975 x 695 pixel). Some examples are give in the directory data/Themes.

• colour table : replace the file colorDB/dcsUiBaseColours with a new colour table. Some examples are give in the directory data/Themes, this files can be edited with the PVSS colour editor.

4

5 III – Modify the config file : config/dcsUi.config

The UI configuration file config/dcsUi.config concentrates in one place all the possible settings the user can do for the UI.

In the package an example file named dcsUi_example.config is present. After the first installation and before the customization of the configuration, rename it as dcsUi.config this action prevents to overwrite this file during the installation of next releases.

1 [Hierarchy] section

This section contains specifications about the FSM Hierarchy:

|[pic] |

2 [AccessControl] section

This section contains two lines devoted to the Centralized Access Control mechanism:

UseCentralizedAC=YES

CentralizedACServer=alidcsaccess

Actually these lines are left as they are.

Then one line specifies detector Access Control Domain name:

ACDomain=

For more details on the Access Control please refer to the Manual Page of the JCOP Framework Access Control component and to ACC Access control responsible.

FSMExcludeAC=

FSMDisableAC=

This two items specify the level of privileges needed to operate changes of FSM Operation Mode (Esclude/Include and Enable/Disable). Privileges are that specified into by AC list : Modify, Debug, Control, Monitoring.

DefaultUser = pippo

DefaultUserPassword = abracadabra

This two items specify a default user name and the relevant password.

3 [General] section

This section contains indication on some additional options of the UI.

|CloseButton = |Specify if the Main Panel have the “CLOSE” button |

4 [HowToFacility] section

This section specifies the path and the file name of the “Detector Related HowTo” home page. The PathName is specified starting from the “\ help \en_US.iso88591\” directory.

|HowToFileName = |Specify the HomePage path for the HowTo Pages facility |

5 [Environment] section

This section contains indication about the widget for the Environment parameters

|UseIt = |Specify if the EnviromentParam Widget will be displayed |

|TemperatureDP = |Alias name of DP that contains the environment temperature |

|PressureDP = |Alias name of DP that contains the environment pressure |

|DPElement = |Name of the DP Element that contains the P/T value |

Example :

Let’s suppose that in the project we have two DP of FwAi type that are used to read the environment parameters, and their names into the Logical View are: ENVIRON/TEMP and ENVIRON/PRES. The settings are:

[Environment]

UseIt=YES

TemperatureDP = dcs_gas:CavernTemperature

PressureDP = dcs_gas:CavernAtmosPressure

DPElement = ""

6 [GraphicLocator] section

This section contains details about the Graphic Locator widget

|UseGraphicLocator = |Specify if the Widget will be displayed |

|GraphLocatorfile = |Specify the path and filename of panel that realize the Detector specific Graphic |

| |Locator |

Example :

[GraphicLocator]

UseGraphicLocator=YES

GraphLocatorFile=xxxDetector\xxxUiLocator.pnl

7 [AuxiliaryMonitoringZone] section

This section contains details about the Auxiliary Monitoring Zone widget

|Title = |Specify the Title of the Monitoring zone |

|Row1= |Specify the list of nodes that are displayed into the first row |

|Row2= |Specify the list of nodes that are displayed into the second row |

|Row3= |Specify the list of nodes that are displayed into the third row |

|Row4= |Specify the list of nodes that are displayed into the fourth row |

|Row5= |Specify the list of nodes that are displayed into the fifth row |

The syntax of the < List of FSM nodes> is :

,,, . . ,,

And for the is:

.

Example :

Assuming that in the project the FSM Hierarchy is:

|Hierarchy |FSM Type | |

|XXX_DETECTOR |C.U. | |

| XXX_SECTOR1 |C.U. | |

| XXX_PART1_1 |L.U. | |

| XXX_PART1_2 |L.U. | |

| XXX_DEV_2A |D.U. | |

| XXX_SECTOR2 |C.U. | |

| XXX_PART2_1 |L.U. | |

| XXX_INFRASTRUCTURE |C.U. | |

| XXX_INFR_CRATE1 |L.U. | |

| XXX_INFR_CRATE2 |L.U. | |

And we want to display in the Auxiliary Zone the status of nodes “XXX_PART1_1”, “XXX_PART2_1”, “XXX_DEV_2A” , “XXX_INFR_CRATE1” and “XXX_INFR_CRATE2”

The configuration file could be:

[AuxiliaryMonitoringZone]

Title = "XXX detector relevant nodes"

Row1 = "Partitions,FIRST,XXX_SECTOR1.XXX_PART1_1,SECOND,XXX_SECTOR2.XXX_PART2_1

Row2 = "Devices,DEV OF SEC1,XXX_SECTOA1.XXX_DEV_2A

Row3 = "Crates,POWER,XXX_INFRASTRUCTURE.XXX_INFR_CRATE1, GAS,XXX_INFRASTRUCTURE.XXX_INFR_CRATE1

8 [HostsStatusZone] section

This section contains details about the Hosts Status Zone widget

|ExternalFSMPanel = |Specify the name of the panel open with the FSM Control push button. The standard one is : |

| |"dcsFsmTools\dcsFSMControl.pnl" |

|Hosts= |Specify the list of distributed hosts that are displayed with the “simple host widget” |

|HostsSmall= |Specify the list of distributed hosts that are displayed with the “small host widget” |

|FSMHosts= |Specify the list of distributed hosts that are displayed with the “complex host widget” |

The syntax of the < List of hosts> is :

:[,:…]

For the is a string contain the DNS host name without the domain suffix

For the is a string contain the PVSS System name without the colon character, if the is specified as a complete Internet DNS name (e.g. hostname.cern.ch) the host is considered a Network Device and not a PVSS Distributed Project. In that case only a PING test will be executed every 60 seconds in order to verify the network connection.

9 [ELogFacility] section

This section contains details about the ALICE DCS ELOG configuration

|UseIt = |Specify if you want the ELOG facility setted (YES or NO). |

|ELogVerboseLog = |Specify if you want ELOG debugging messages into the log viewer (YES or NO). |

|ELogHost= |Specify the name of the ELOG server |

|ELogHostPort= |Specify the port number of the ELOG server |

|ELogSubDirectory= |Specify the sub dir of log into the ELOG URL |

|DetectorELogURL= |Specify the name of the Detector specific ELOG |

|ELogWritePasswd = |Not yet defined |

|ELogUserName = |Not yet defined |

|ELogUserPasswd = |Not yet defined |

10 [InfoReader] section

This section contains details about the Log-Info system configuration

|UseIt = |Specify if the Widget will be displayed |

|PanelName = |Specify the path and file name of panel that realize the Logger reader panel (an example|

| |is given as 2dcsUi/dcsUiMessangerReader_example.pnl”) |

11 [ToolsMenu] section

This section contains details that define the structure of the pop-up Tools Menu.

|UseIt = |Specify if the Widget will be displayed |

|Buttoni = |Specify the label reported into the menu, the file name of panel that realize the menu |

| |item and level of privileges |

The syntax of the is :

,,

[ToolsMenu]

UseIt=YES

Button1="JCOP DE&N,JCOP Device Editor & Navigator,fwDeviceEditorNavigator/fwDeviceEditorNavigator.pnl,Modify"

Button2="Sysmanager,PVSS System Manager,vision/SysMgm,Modify"

Button3="DIP TOOL,JCOP Dip Explorer,fwDIP/fwDip.pnl,Modify"

6 IV – The “Scope Utility”

The dcsUi package version 3.0.7 contains a new feature named “Scope Utility” that give to developers the possibility to use some powerful Panels in order to display trend view plots. There are two possibility to use this feature.

1 Developers notes

The first one is to insert the “Scope” widget inside user panels. To do this three widgets are released, you can find they into the panel/dcsScope directory of project:

dcsUiScopeArea.pnl : a 724x448 pixel panel with controls in the bottom position

dcsUiScopeAreaLong.pnl : a 943x214 pixel panel with controls in the right position

dcsUiScopeAreaLong.pnl : a 458x378 pixel panel with controls in the bottom position

This widgets has five $parameters:

$AreaId : number, this identify the plot area inside the panel, normally 1, needed for panels with multiple plot widget inserted.

$sCurveName_left : string, comma separated list of labels of plots linked to the left scale.

$sCurveName_right : string, comma separated list of labels of plots linked to the right scale.

$sDpElement_left : string, comma separated list of Data Point Elements that will be plot, linked to the right scale.

$sDpElement_right : string, comma separated list of Data Point Elements that will be plot, linked to the right scale.

The widget can be set statically during the design of panel, writing the $parameter property, or dynamically calling a setValue function:

setValue("Scope1.ScopeAction1”,"text", "DPElementName;Plot Label");

where Scope1 is the reference name of widget inserted, ScopeAction1 is a constant name.

Pay attention that the reference number (1 in the example) must be equal to the value specified into the $AreaId parameter.

An example panel showing who you can insert this widget is in :

panels\dcsScope\dcsUiScopePanel_Example.pnl

The second possibility to use the “Scope” feature is opening a Project Scope Panel, that is able to plot more trend views, in different tabs, left the possibility to the operator to navigate into the project.

In order to open the panel end set the plots a function library is given:

// =============================================================

// DCS UI SCOPE UTILITY SECTION

// =============================================================

/* ------------------------------------------------

Name: dcsUi_addScopePlot()

Desc: add a plot into the Scope panel

inp: sLabel:= string (name of plot in legend)

sDpName:= string (name of the DP element)

sTabName:= string (label for the Tab)

Auth : A.Franco - INFN Bari

Date : 18/09/2008

Ver. : 1.0

Hist : -

------------------------------------------------ */

void dcsUi_addScopePlot(string sLabel, string sDpName, string sTabName = "TEMP")

An example panel showing who you can insert this widget is in :

panels\dcsScope\dcsUiScopeCall_Example.pnl

2 Using the Scope widget

The Scope widget panel contains some controls that act on the trend visualization:

● DISPLAY TIME SELECTION : used to set the start of trend and its duration, this action can be done also with the mouse, moving and resizing the time scale on the bottom of the trend view.

● REFRESH THE VIEW : pushing this button a Data base query is fired. The time interval of the query is that showed into the trend area.

● QUERY RESULTS : display how many values are returned from a REFRESH query.

● PAUSE THE DISPLAY : freeze the visualization of trend.

● GRID DISPLAY SWITCH ON/OFF : show/hide a grid on the trend area

● COPY TREND AREA INTO THE CLIPBOARD : copy the trend area image into the clipboard.

● EXTRACT DATA IN CSV FORMAT FILE : create a comma separated format ASCII file containing the data showed into the trend area. It has one column for each plot plus one for the time stamps. Values are stored into rows.

● PLOTS PROPERTIES SETTING : open a panel devoted to setting the properties of plots: colour, marker, type, scale.

The Set Plot Properties panel (Fig.6) report, for each plot:

• name of plot

• colour (a mouse click open the colour editor panel)

• type (points, linear, steps)

• fill (Yes/No. In order to fill the area under the trend line)

• point (the type of point marker)

• scale (NONE, LEFT, RIGHT)

• autoscale (Yes/No)

• linked_to (row number. In order to associate more plots to a single scale)

the push button “APPLY” set the new properties into the trend area.

Figure 6 - The Set Plot Properties panel

7 V – The “Logger Utility”

The ALICE DCS User Interface starting from the 3.0.6 version is able to stream log messages produced by the interaction of the operator with the interface, such send an FSM command or keep Hierarchy ownership.

The detectors developers can intercept this stream of messages in order to manage it (display, store, etc.)

1 Structure of Messages

The messages produced have the following structure:

• Source := 255 character string (Name of Stream/Process source of message)

• Type := character (Severity flag = "I" information,

"W" warning,

"E" error,

"F" fatal )

• Destination := int (Destination of Info = 1 Local, 2 remote)

• Message := 255 character string (Message )

2 Loggerconfiguration

In order to enable the “Logger Utility” some steps will be done:

• rename the file dcsLogger_example.config into the config directory as dcsLogger.config

• edit this file enabling the utility

[Logger]

dcsLoggerUseIt=YES

• edit the library file dcsLogger.ctl writing the code that manages the stream of messages. Two routines, one for the initialization of logger server and the second that manages the incoming messages. Here is the template of the library :

/* ------------------------------------------------------------

ALICE (HMPID) - INFO LOGGER FACILITY

This library collect all functions linked to the InfoLogger

facility for the ALICE DCS

---------------------------------------------------------------*/

// Ver.1.1 25/06/2008

//

// History

//

//

// ---------- Constant definition ----------------------------

const int INFOLOGGER_VERSION = "1.2";

const string INFOLOG_CONFIGFILE = "dcsLogger.config";

/* ------------------------------------------------------------

Funtion for Setting Global Variables

F.A. ver 1.0 25/6/2006

History

01/06/2006 - Creation

19/06/2006 - change prefix

28/05/2008 - Just transform this in a wrapper

------------------------------------------------------------ */

void dcsInfoLog_Init()

{

// Verify if the init is done

if( globalExists( "dcsInfoLoggerUseIt" ) ) return;

DebugTN("dcsInfoLog_Init(): Info Messenger ver."+INFOLOGGER_VERSION+" Intialization phase...");

// Set the Host Name

addGlobal("dcsInfoLoggerHostName", STRING_VAR);

dcsInfoLoggerHostName = getHostname();

addGlobal("dcsInfoLoggerSystemName", STRING_VAR);

dcsInfoLoggerSystemName = getSystemName();

// Read the config file variables

int val;

string fi = getPath(CONFIG_REL_PATH) + INFOLOG_CONFIGFILE;

string sec = "Logger";

string result;

result= "";

val = paCfgReadValue(fi,sec, "dcsLoggerUseIt",result);

addGlobal("dcsInfoLoggerUseIt", BOOL_VAR);

dcsInfoLoggerUseIt = (strtoupper(result) == "YES" ) ? true : false ;

DebugTN("dcsInfoLog_Init(): Use It "+strtoupper(result));

if(!dcsInfoLoggerUseIt) return;

// --- START THE INIT PHASE FOR THE LOGGER ----

// Ex. : hmpLogger_Init();

DebugN(" Starting the logger server ...");

// -------

DebugTN("dcsInfoLog_Init(): init DONE !");

return;

}

// ------------------------------------------------------------

/* ------------------------------------------------------------

This function is the Send messages for the InfoLogger System

F.A. ver 0.1 17/05/2006

History

17/05/2006 created.

19/06/2006 - change prefix

28/05/2008 - modify into a wrapper

Parameter:

sSource := string (Name of Stream/Process source of message)

sType := character (Severity flag = "I","W","E","F")

iDestination := int (Destination of Info = 1 Local, 2 remote)

sMessage := string (Message )

*/

void dcsInfoLog_SendMsg(string sSource, string sMessage, string sType, int iDestination = 1)

{

// skip if not enabled

if(!dcsInfoLoggerUseIt) return;

// Example of wrapping the message

// SEND THE MESSAGE TO THE SERVER ...

DebugTN("dcsInfoLog_SendMsg=>",sMessage);

// Ex. res = hmpLogger_sendMessage(eventType, sSource, sMessage,iDestination);

// if(!res) DebugTN("dcsInfoLog_SendMsg : Error in sending message!");

return;

}

// ------------------------------------------------------------

// ============================ EOF ================================

3 Logger system example : HMPID Detector Logger

In the HMPID project four subjects are involved into the Logger System

• LOCAL MESSAGE PRODUCER (LMP) This represents a project/program that is able to produce messages. It receives messages, formats they then sends to the Central Messages Repository, if there is no connection stores messages into e local queue. In order to minimize the flow it can cut off messages with a low priority storing they on a local file.

• CENTRAL MESSAGE REPOSITORY (CMR) This is the centralized server that receive messages from LMPs, provide to store it into a DB, then dispatch messages to applications that request info.

• REAL-TIME MESSAGES READER (RMR) This are client application or components into the DCS interfaces that are able to display in real-time messages coming from a set of LMPs. They can also store a little amount of last received messages.

• MESSAGES ANALIZER (MA) This is a client application that can do queries to the CMR in order to extract subset of messages filtered and ordered according the user requests.

The protocol adopted is the DIM and actually the DB repository is a simple ASCII sequential file.

Each time a script program need to inject a message, it calls a library function:

hmpLogger_sendMessage(eventType, sSource, sMessage,iDestination);

this is part of LMP code that provide to manage the message queque and to send via DIM protocol the message to the CMR.

The CMR, actually a PVSS Control Script, receive the message trought a publicated DIM DataPoint, then analyze and store it into a repository file. At the same time it provides to forward the message to all RMRs that are, at run time, subscribed to it via a DIM publication.

In order to implement the retrive of messages, the control script that performs the CMR also provide to answer to the query caming from the MA. This exchange of information is also based on DIM protocol. Each time the server receive a query, analyze it, read the log file and return messages.

Other then the library that realize all the functionality of LMP and CMR, and the Control Script for the CMR server, two panels are developed:

• dcsUiMessangerReader.pnl : that represents the RMR into the PVSS environment, integrated into the DCS UI.

• dcsUiMessangerLogBook.pnl : that represents the MA into the PVSS environment, integrated into the DCS UI.

The example panels are into the /panels/dcsUi directory.

For further details on this issue, e-mail the auhtor to antonio.franco@cern.ch.

8 VI – User Panel Template

In the panels/xxxDetector/ directory there is a template named: xxxDetector.pnl. It contains the “template scripts” that integrates the Access Control mechanism in the user panels.

In the General section of the Panel, there are three defined functions:

- the first one disables all the panel objects sensitive to the “Logged User”;

- the second one enables the panel objects according to the “grant level”;

- the third one is the CallBack_Function that react to the User Login.

//Function (NoName)_General()

// ------ Access Control related Functions ---------------------------

//

void xxxDetector_DisableAllAC()

{

// Put Here all commands to disable objects on panel

}

void xxxDetector_EnableAC(bool isObserver, bool isOperator, bool isExpert, bool isDepeloper)

{

if(isObserver)

{

// Put Here all commands to enable objects on panel

// related to Guest grants

}

if(isOperator)

{

// Put Here all commands to enable objects on panel

// related to Operator grants

}

if(isExpert)

{

// Put Here all commands to enable objects on panel

// related to Expert grants

}

if(isDepeloper)

{

// Put Here all commands to enable objects on panel

// related to Administrator grants

}

}

void xxxDetector_LoggedUserAC(string dp, string username_from_ui)

{

// Set the minimum users grants

bool isObserver=false;

bool isOperator=false;

bool isExpert=false;

bool isDepeloper=false;

// Disable all items in the panel

xxxDetector_DisableAllAC();

// Get Grants for the specified user

dcsUiBase_getACGrants(isDepeloper,isExpert,isOperator,isObserver);

// Now enable - this is related to the specific Policy rules

xxxDetector_EnableAC(isObserver,isOperator,isExpert,isDepeloper);

}

// ----------------------------------------------------------------------

In the EventInitialize section of the Panel, there are some code lines that register the Access Control CallBackFunction and set the Title in the Main Panel Window.

//Function (NoName)_EventInitialize()

main()

{

// -------- Access control -----------------------------------------

// Set the CB Function that Hook the change of Logged User

dyn_string exceptionInfo;

fwAccessControl_setupPanel("xxxDetector_LoggedUserAC",exceptionInfo);

if (dynlen(exceptionInfo)) {

xxxDetector_LoggedUserAC("",""); // global "reject"

}

// --------------------------------------------------------------------

// ---------------- Set the title into the main window ---------------

dcsUiBase_setMainTitle("XXX - Detector View");

// -------------------------------------------------------------------

}

9 VII – Graphic Locator Template

In the directory panels/xxxDetector/ there is a template file named: xxxUiLocator.pnl. It contains the “template scripts” that realize the Graphic Locator widget.

The developer must write some functions that Hide/Visualize a graphic schema of the detector according to the object name passed to the control.

//Function (NoName)_General()

__resetBack()

{

// Here put all commands to reset colors

// of graph objects

/* ------------- Example ------------------

setValue("Mod0", "backCol", "{128,128,128}");

setValue("Mod1", "backCol", "{128,128,128}");

setValue("Mod2", "backCol", "{128,128,128}");

setValue("Mod3", "backCol", "{128,128,128}");

----------------------------------------- */

}

__invisible()

{

// Here put all commands to set all graph

// objects INVISIBLE

/* ------------- Example ------------------

setValue("Mod0", "visible", false);

----------------------------------------- */

}

__visible(string what)

{

// Here put all commands to set graph objects

// of type "what" VISIBLE

/* ------------- Example ------------------

switch(what)

{

default:

setValue("Mod0", "visible", true);

break;

}

----------------------------------------- */

}

__setDisplay( string object )

{

// Here put the script to decode the Object

// in order to decide graph objects of locator in the

// panel will be set properties colors/visible ecc.

//

/* ------------- Example ------------------

int type = 0;

__invisible();

switch(type)

{

case 0:

setValue("Mod0", "backCol", "{254,251,251}");

txtDescr.text = "ALL";

break;

case 1:

setValue("Mod0", "backCol", "{254,251,251}");

txtDescr.text = "RICH MOD-0";

break;

}

---------------------------------------- */

}

//Function (NoName)_EventInitialize()

main()

{

// This is called at the startup

__setDisplay( $obj );

}

//Function txtLocation_EventSetFocus()

main()

{

// This is called each time a new panel is loaded

__resetBack();

__setDisplay( txtLocation.text );

setInputFocus(myModuleName(),myPanelName(),"txtDummy");

}

All the graphic objects, representing the detector’s parts, have to have a corresponding FSM node in the hierarchy.

As suggestion: in order to highlight the detector part selected in the tree browser, the locator can fill with the white colour, the corresponding shapes. In addition it can set a text box with a short label.

APPENDIX A – dcsUiBase library

/* ------------------------------------------------------------

ALICE DCS - UI LIBRARY

This library collects all functions linked to the ALICE UI

---------------------------------------------------------------*/

// Ver. 1.0 24/09/2008

//

// Add information for LHC

// Add NetTestFunction

// Add FsmConnectMode Wrapper

// Add function to display Info Dialog

// remove function to convert PMON Web pages in ASCII string

//

// 3/10/2007 - Add functions for the E-Log access

// 18/10/2007 - Add function for store the FSM Hierarchy on File

// 27/03/2008 - Add function for store the FSM Hierarchy on Ordered File

// 8/9/2008 - Add Constants dyn dyn str for LHC

// 16/9/2008 - Add call for ScopeLib + Add Call for PopUpPanel

// 23/9/2008 - Add Functions for the color management

// 24/9/2008 - Add Function for the Enable/Disable FSM configuration

// ---------- Constant definition ----------------------------

const string DCSUI_VERSION = "3.0.7";

const int SPLASH_SCREEN_DELAY = 5; // Number of seconds

const bool DCSUI_INFO_BRIGHT = true; // Info window Hightligt

const bool DCSUI_INFO_DARK = true; // Info window Dark

// Coordinate In the AC Grant List

const int DCSUI_AC_OBSERVER = 1;

const int DCSUI_AC_OPERATOR = 2;

const int DCSUI_AC_EXPERT = 3;

const int DCSUI_AC_DEVELOPER = 4;

const int DCSUI_FSM_MODAL = 1;

const int DCSUI_FSM_MODLESS = 2;

// =============================================================

// DCS UI GENERAL SECTION

// =============================================================

/* ------------------------------------------------------------

Function for Setting Global Variables

F.A. ver 1.0 19/6/2006

History

19/06/2006 - Creation

03/08/2006 - Modify to the dcsUiBase_setMainTitle

19/10/2006 - Add Configs entry for the Auziliary Monitoring Zone

30/10/2006 - Add Configs entry for AC centralized Service

------------------------------------------------------------ */

bool dcsUiBase_Init()

/* ------------------------------------------------------------

Function for Get a Param from the Config File

F.A. ver 1.0 19/6/2006

History

19/06/2006 - Creation

------------------------------------------------------------ */

string dcsUiBase_getConfigParam(string section, string name)

/* ------------------------------------------------------------

Function for Get the AC grants defined into the config

file Grants list

F.A. ver 1.0 19/6/2006

History

19/06/2006 - Creation

------------------------------------------------------------ */

void dcsUiBase_getACGrants(bool & isDeveloper,bool & isExpert,

bool & isOperator, bool & isObserver)

// =============================================================

// DCS UI INTERACTION SECTION

// =============================================================

/* ------------------------------------------------------------

Function for set the title into the Main DCS Window

F.A. ver 1.0 19/6/2006

History

19/06/2006 - Creation

30/10/2006 - Add the Existence verify

------------------------------------------------------------ */

void dcsUiBase_setMainTitle(string title)

/* ------------------------------------------------------------

Function for display a text into Info DCS Panel Dialog

F.A. ver 1.0 11/2/2007

History

11/02/2007 - Creation

------------------------------------------------------------ */

void dcsUiBase_setInfoText(string title, bool highlight = false)

/* ----------------------------------------------------------

Function to turn On/Off the progress bar into Info DCS Panel Dialog

F.A. ver 1.0 11/2/2007

History

11/02/2007 - Creation

------------------------------------------------------------ */

void dcsUiBase_switchProgresBar(bool bOn)

/* ----------------------------------------------------------

Function to set the progress value to the progress bar

into Info DCS Panel Dialog

F.A. ver 1.0 11/2/2007

History

11/02/2007 - Creation

------------------------------------------------------------ */

void dcsUiBase_setProgresBar(float progres)

/* ----------------------------------------------------------

Function to turn On/Off the busy bar into Info DCS Panel Dialog

F.A. ver 1.0 11/2/2007

History

11/02/2007 - Creation

------------------------------------------------------------ */

void dcsUiBase_switchBusyBar(bool bOn)

/* ------------------------------------------------------------

Function for set the Tree Viewer elected Node

F.A. ver 1.0 1/2/2008

History

01/02/2008 - Creation

------------------------------------------------------------ */

void dcsUiBase_jumpToObject(string node, string obj)

/* -------------------------------------------------------------

Function to open a PopUp windows inside the dcsUi

F.A. ver 1.0 18/09/2008

History

18/09/2008 - Creation

-------------------------------------------------------------- */

const int DCSUI_POPUPMODLESS = 1;

const int DCSUI_POPUPMODAL = 2;

void dcsUiBase_openPopUpPanel(string sPanelFileName,

string sPanelName,

dyn_string dsParameters,

int iType = DCSUI_POPUPMODLESS )

/* -------------------------------------------------------------

Function to close a PopUp windows inside the dcsUi

F.A. ver 1.0 18/09/2008

History

18/09/2008 - Creation

-------------------------------------------------------------- */

void dcsUiBase_closePopUpPanel(string sPanelName)

// =============================================================

// DCS UI LHC MANAGEMENT SECTION

// =============================================================

/* -------------------------------------------------------------

Function to convert the status of LHC into message

F.A. ver 1.0 20/10/2006

History

8/9/2008 - search into dds array

-------------------------------------------------------------- */

string dcsUiBase_LHCStatus2Mess(string sStatus)

/* -------------------------------------------------------------

Function to convert the status of LHC into color

F.A. ver 1.0 20/10/2006

History

8/9/2008 - search into dds array

-------------------------------------------------------------- */

string dcsUiBase_LHCStatus2Col(string sStatus)

// =============================================================

// DCS UI COLOR MANAGEMENT SECTION

// =============================================================

/* ------------------------------------------------

Name: dcsUiColor_val2Color()

Desc: Convert a value into a colour string

inp : temp := float (value to convert)

t_min := int (minimum of the scale)

t_max := int (maximum of the scale)

out : Colour := string "{red,green,blu}"

Note : the range values varies from 0 to 130

over range values are marked with blue

and red colours

Auth : A.Franco - INFN Bari

Date : 23/09/2008

Ver. : 1.0

Hist : -

------------------------------------------------ */

string dcsUiColor_val2Color(float temp, int t_min = 0, int t_max = 130)

/* ------------------------------------------------

Name: dcsUiColor_convertColorName()

Desc: Convert a colour name into a colour string

inp : sSearchColor := string (colour name)

out : Colour := string "{red,green,blu}"

Auth : A.Franco - INFN Bari

Date : 23/09/2008

Ver. : 1.0

Hist : -

------------------------------------------------ */

string dcsUiColor_convertColorName( string sSearchColor )

/* ------------------------------------------------

Name: dcsUiColor_string2RGB()

Desc: Convert a colour string into the RGB components

inp : color := string (colour string)

out : r:= int (red component)

g:= int (green component)

b:= int (blu component)

Auth : A.Franco - INFN Bari

Date : 23/09/2008

Ver. : 1.0

Hist : -

------------------------------------------------ */

dyn_int dcsUiColor_string2RGB(string color, int &r, int &g, int &b)

/* ------------------------------------------------

Name: dcsUiColor_luminosity()

Desc: Calculate the luminosity from RGB

inp : r:= int (red component)

g:= int (green component)

b:= int (blu component)

out : luminosity:= float

Auth : A.Franco - INFN Bari

// from Hermann Fuchs

Date : 23/09/2008

Ver. : 1.0

Hist : -

------------------------------------------------ */

float dcsUiColor_luminosity(int r, int g, int b)

/* ------------------------------------------------

Name: dcsUiColor_RGB2Croma()

Desc: Convert RGB components into a HSV

inp : red:= int (red component)

green:= int (green component)

blu:= int (blu component)

out : h := float (hue value)

s := float (saturation value)

v := float (intensity value)

return hue value;

Auth : A.Franco - INFN Bari

Date : 23/09/2008

Ver. : 1.0

Hist : -

------------------------------------------------ */

float dcsUiColor_RGB2Croma(int red, int green, int blu, float &h, float &s, float &v)

/* ------------------------------------------------

Name: dcsUiColor_croma2RGB()

Desc: convert HSV to RGB

inp: h := float (hue value)

s := float (saturation value)

v := float (intensity value)

out: red:= int (red component)

green:= int (green component)

blu:= int (blu component)

return color string;

Auth : A.Franco - INFN Bari

Date : 23/09/2008

Ver. : 1.0

Hist : -

------------------------------------------------ */

string dcsUiColor_croma2RGB(float h, float s, float v, int &red, int &green, int &blu)

/* ------------------------------------------------

Name: dcsUiColor_getComplementaryRGB()

Desc: get the complementary RGB components

inp: red:= int (red component)

green:= int (green component)

blu:= int (blu component)

satTh:= float (Saturation threshold for the Contrast)

lumTh:= int (Luminosity threshold for the Contrast,

-1 = differenzial)

out: red:= int (red component)

green:= int (green component)

blu:= int (blu component)

Auth : A.Franco - INFN Bari

Date : 23/09/2008

Ver. : 1.0

Hist : -

------------------------------------------------ */

void dcsUiColor_getComplementaryRGB(int &red, int &green, int &blu, float satTh = 0.3, int lumTh = -1)

/* ------------------------------------------------

Name: dcsUiColor_getComplementaryColor()

Desc: return a color string that is the complementary color

inp: color:= string (color string or static name)

isBW:= bool (true = Black or White color return

false = Color return)

out: color string

Auth : A.Franco - INFN Bari

Date : 23/09/2008

Ver. : 1.0

Hist : -

------------------------------------------------ */

string dcsUiColor_getComplementaryColor(string color, bool isBW = true)

/* ------------------------------------------------

Name: dcsUiColor_setColor()

Desc: sets the foreCol and backCol properties of a shape

inp: shapename:= string (name of shape)

color:= string (color string or color name)

isBW:= bool (true = Black or White color return

false = Color return)

Auth : A.Franco - INFN Bari

Date : 23/09/2008

Ver. : 1.0

Hist : -

------------------------------------------------ */

void dcsUiColor_setColor(string shapename, string color, bool isBW = true)

// =============================================================

// DCS UI SCOPE UTILITY SECTION

// =============================================================

/* ------------------------------------------------

Name: dcsUi_addScopePlot()

Desc: add a plot into the Scope panel

inp: sLabel:= string (name of plot in legend)

sDpName:= string (name of the DP element)

sTabName:= string (label for the new Tab)

Auth : A.Franco - INFN Bari

Date : 18/09/2008

Ver. : 1.0

Hist : -

------------------------------------------------ */

void dcsUi_addScopePlot(string sLabel, string sDpName, string sTabName = "TEMP")

// =============================================================

// DCS UI NETWORK UTILITY SECTION

// =============================================================

/* ------------------------------------------------

Name: dcsUiBase_TestNetworkConnection()

Desc: test the status of Net Connection

inp: sHostName:= string (DNS host name)

out: true := if ping replay

Auth : A.Franco - INFN Bari

Date : 19/12/2006

Ver. : 1.0

Hist : -

------------------------------------------------ */

bool dcsUiBase_TestNetworkConnection(string sHostName)

// =============================================================

// DCS UI FSM UTILITY SECTION

// =============================================================

/* -------------------------------------------------------------

Functions to manage apply the mode configuration file

F.A. ver 1.0 24/09/2008

return := true if it is done

History

-------------------------------------------------------------- */

bool dcsUiFSMConfig_applyFSMModeConfiguration(string sFileName)

/* -------------------------------------------------------------

Functions to manage the FSM Hierarchy on a file

F.A. ver 1.0 18/10/2007

return := true if write is done

History

-------------------------------------------------------------- */

const int FSM_CU = 1;

const int FSM_DU = 2;

const int FSM_LU = 0;

const string FSMHIERARCHYFILE = "dcsUiFSMHierarchy.csv";

const string FSMHIERARCHYFILEORDERED = "dcsUiFSMOrderedHierarchy.csv";

string dcsUiFSMtool_getHierarchyToFileName(string sRootName, bool withCreation = false, bool isOrdered = false)

bool dcsUiFSMtool_isHierarchyFileUpdated(string sRootNode)

bool dcsUiFSMtool_writeHierarchyToFile(string sRootNode)

bool dcsUi_FsmIsMine(string domain, string object)

// ============================ EOF =========================== =

COOKBOOK for the GRAPHIC LOCATOR CREATION

In order to build a graphic locator widget, let’s assume the detector has the followings Logical View:

|Hierarchy |FSM Type | |

|XXX_DETECTOR |C.U. | | |

| XXX_SECTOR1 |C.U. | | |

| XXX_PART1_1 |L.U. | | |

| XXX_PART1_2 |L.U. | | |

| XXX_SECTOR2 |C.U. | | |

| XXX_PART2_1 |L.U. | | |

| XXX_INFRASTRUCTURE |C.U. | | |

| XXX_INFR_CRATE1 |L.U. | | |

| XXX_INFR_CRATE2 |L.U. | | |

Then the corresponding graphic view of the detector can be the following:

[pic]

First of all we open the template file xxxDetector/xxxUiLocator.pnl and build the graphic schema of the detector.

[pic]

Then assign the names to all the objects as showed in the figure.

[pic]

Now open the Script Editor Windows and start to write the scripts in the NoName_General section.

First of all write the function that reset the background color of all the objects:

__resetBack()

{

setMultiValue("Sec1", "backCol", "{128,128,128}",

"Sec2", "backCol", "{128,128,128}",

"Sec3", "backCol", "{128,128,128}",

"Infr", "backCol", "{128,128,128}",

"Cr1", "backCol", "{128,128,128}",

"Cr2", "backCol", "{128,128,128}");

}

Then the function that makes invisible all objects :

__invisible()

{

setMultiValue("Sec1", "visible", false,

"Sec2", "visible", false,

"Sec3", "visible", false,

"Infr", "visible", false,

"Cr1", "visible", false,

"Cr2", "visible", false);

}

Now we define the function that makes visible some objects according to the “Logical name” passed as parameter :

__visible(string what)

{

switch(what)

{

case “XXX_DETECTOR”: // all sectors and rack switched on

setMultiValue("Sec1", "visible", true,

"Sec2", "visible", true,

"Sec3", "visible", true,

"Infr", "visible", true);

break;

case “XXX_SECTOR1”: // all sectors switched on

case “XXX_SECTOR2”:

case “XXX_PART1_1”:

case “XXX_PART1_2”:

case “XXX_PART2_3”:

setMultiValue("Sec1", "visible", true,

"Sec2", "visible", true,

"Sec3", "visible", true);

break;

case XXX_INFRASTRUCTURE: // switch rack and crates

case XXX_INFR_CRATE1:

case XXX_INFR_CRATE2:

setMultiValue("Infr", "visible", true,

"Cr1", "visible", true,

"Cr2", "visible", true);

break;

}

}

And finally the script that change the background color according the object:

__setDisplay( string object )

{

// switch off/on objects

__invisible();

__visible(object);

// set the white back ground

switch(object)

{

case “XXX_DETECTOR”: // all sectors and rack switched on

setMultiValue("Sec1", "backCol", "{254,251,251}",

"Sec2", "backCol", "{254,251,251}",

"Sec3", "backCol", "{254,251,251}",

"Infr", "backCol", "{254,251,251}");

txtDescr.text = "XXX DETECTOR";

break;

case “XXX_SECTOR1”: // part 1 & 2 of sector 1 are switched on

setMultiValue("Sec1", "backCol", "{254,251,251}",

"Sec2", "backCol", "{254,251,251}");

txtDescr.text = "SECTOR 1";

break;

case “XXX_SECTOR2”: // part 1 of sector 2 is switched on

setMultiValue("Sec3", "backCol", "{254,251,251}");

txtDescr.text = "SECTOR 2";

break;

case “XXX_PART1_1”: // part 1 of sector 1 is switched on

setMultiValue("Sec1", "backCol", "{254,251,251}");

txtDescr.text = "PART1 – SEC1";

break;

case “XXX_PART1_2”: // part 2 of sector 1 is switched on

setMultiValue("Sec2", "backCol", "{254,251,251}");

txtDescr.text = "PART2 – SEC1";

break;

case “XXX_PART2_1”: // part 1 of sector 2 is switched on

setMultiValue("Sec3", "backCol", "{254,251,251}");

txtDescr.text = "PART1 – SEC2";

break;

case “XXX_INFRASTRUCTURE”: // the rack is switched on

setMultiValue("Infr", "backCol", "{254,251,251}");

txtDescr.text = "INFRASTR. RACK";

break;

case “XXX_INFR_CRATE1”: // the first crate is switched on

setMultiValue("Cr1", "backCol", "{254,251,251}");

txtDescr.text = "POWER CRATE";

break;

case “XXX_INFR_CRATE2”: // the secont crate is switched on

setMultiValue("Cr2", "backCol", "{254,251,251}");

txtDescr.text = "VME TRIGGER";

break;

}

}

Then rename and save the panel in the relevant directory.

[pic]

Example of panel at Run Time

-----------------------

[1] The MODAL/MODLESS for the operator option could be forced changing some parameters into the Main DcsUi pannel.

[2] This is performed adding in the PVSS config file under the section [dist] the line :

distPerr = “alidcscom042.cern.ch” 205

-----------------------

Name of PVSS system and Status of Distribution Connection. The ToolTip text shows the Host name

Status of the FSM Control API process, PVSS00smi.exe

Status of the FSM Server manager :

fwFsmSrvr.ctl

Status of the FSM Engine

Status of the FSM Device Handler Manager

SECTOR1

PART 1

SECTOR1

PART 2

SECTOR2

PART 1

INFRASTRUCTURE

CRATE1

CRATE2

Sec1

Sec2

Sec3

Infr

Cr1

Cr2

CURRENT TIME

LOGIN

FSM NODE CONTROL

FSM HIERARCHY TREE BROWSER

AUXILIARY MONITORING ZONE OF THE FSM MAJOR NODES

HOSTS STATE & FSM MAIN CONTROL

CLOSE WINDOWS

FSM NODE STATE

DETECTOR GRAPHIC LOCATOR

USER TOOLS BAR

TITLE BAR

INFO DIALOG

TOOLS MENU BUTTON

LHC STATUS

ENVIRONMENTAL PARAMETER

USER PANEL FOR MONITORING

DCS UI LOG MESSAGES READER

LMP

LMP

LMP

CMR

RMR

RMR

RMR

MA

MA

|RootNode = |Name of Root FSM Domain |

|RootObject = |Name of Root FSM Object |

| | |

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download