unAlarmScreenNg  0.9.5
AlarmScreenUNICOS.ctl File Reference

Functions

Public functions
mapping AlarmScreenUNICOS_getFilterCompletions (string sPropName, const dyn_string &dsSelectedSystems)
 
mapping AlarmScreenUNICOS_getSlaveFilterCompletions (string sPropName, const mapping &mFilters)
 
void AlarmScreenUNICOS_mouseTableEvent (const mapping &mArgs)
 
void AlarmScreenUNICOS_ctrlActionRequested (const mapping &mArgs)
 
mapping AlarmScreenUNICOS_mouseTableEvent_broken (const mapping &mSource, const mapping &mAlarmData)
 
mapping AlarmScreenUNICOS_treatRightClickAnswer (const mapping &mSource, const mapping &mAlarmData, const dyn_string &dsMenu, int iAnswer)
 
Private functions: initialization of some globals for UNICOS UI
private void _AlarmScreenUNICOS_initHMI ()
 
private void _AlarmScreenUNICOS_basicConfigApplied (const mapping &mArgs)
 
Private functions: processing of filter completions
private void _AlarmScreenUNICOS_getFilterCompletions_application (const dyn_string &dsSelectedSystems, mapping &mResult)
 
private dyn_string _AlarmScreenUNICOS_getSystemApplications (string sSystemName, string sFileNameSuffix="_unTreeDeviceOverview_FECharacteristics.dat")
 
private void _AlarmScreenUNICOS_getFilterCompletions_deviceType (const dyn_string &dsSelectedSystems, mapping &mResult)
 
private void _AlarmScreenUNICOS_getFilterCompletions_alarmType (const dyn_string &dsSelectedSystems, mapping &mResult)
 
private void _AlarmScreenUNICOS_getFilterCompletions_domain (const dyn_string &dsSelectedSystems, mapping &mResult)
 
private void _AlarmScreenUNICOS_getFilterCompletions_nature (const dyn_string &dsSelectedSystems, mapping &mResult)
 
private void _AlarmScreenUNICOS_getSubSystemFromFile (string sSystemName, int iSubSysIndex, dyn_string &dsResult, string sFileNameSuffix="_unTreeDeviceOverview_subSystem.dat")
 
Private functions: preparing popup menu
private dyn_string _AlarmScreenUNICOS_buildMenu (const mapping &mSource, const mapping &mAlarmData, int iMode)
 
private dyn_string _AlarmScreenUNICOS_buildBaseDpeMenu (string sDpe, string &sAlias, string &sDpType)
 
private void _AlarmScreenUNICOS_extendBaseDpeMenu (string sAlias, dyn_string &dsMenuList, int iMode)
 
private dyn_string _AlarmScreenUNICOS_buildColumnSubMenu (const mapping &mSource)
 
private void _AlarmScreenUNICOS_buildFinalMenu (dyn_string &dsMenuList, const dyn_string &dsColumnsMenu, int iMode, bool bDpeExists)
 
private void _AlarmScreenUNICOS_enableDisableAckMenu (const mapping &mSource, const mapping &mAlarmData, dyn_string &dsMenuList, int iMode)
 
private void _AlarmScreenUNICOS_disableMenuItem (dyn_string &dsMenuList, const string &sItemType, const string &sItemLabel)
 
Private functions: processing of user selection from popup menu
private void _AlarmScreenUNICOS_menuCpcGenericAction (const mapping &mSource, const mapping &mAlarmData, const dyn_string &dsMenu, int iAnswer)
 
private bool _AlarmScreenUNICOS_menuAlarmSpecific (const mapping &mSource, const mapping &mAlarmData, int iAnswer)
 
private bool _AlarmScreenUNICOS_menuLineToClipboard (const mapping &mSource, const mapping &mAlarmData)
 
private bool _AlarmScreenUNICOS_menuShowAllColumns (const mapping &mSource)
 
private bool _AlarmScreenUNICOS_menuShowHideColumn (const mapping &mSource, int iColumnIdx)
 
private bool _AlarmScreenUNICOS_menuDisplayAlarmDetails (const mapping &mSource, const mapping &mAlarmData)
 
private bool _AlarmScreenUNICOS_menuInsertComment (const mapping &mSource, const mapping &mAlarmData)
 
private void _AlarmScreenUNICOS_ackMultiple (dyn_mapping &dmAlarms)
 
The replacement (copy) of some functions used from unAlarm componebt
private void _AlarmScreenUNICOS_defaultPanel (string sDeviceName, string sDescription)
 

Variables

UNICOS-specific names of alarm properties, as they appear in alarm data mapping from AS EWO
const string ALARM_PROP_UN_TIME_UTC = "timeUtc"
 UTC alarm time.
 
const string ALARM_PROP_UN_APPLCIATION = "application"
 UNICOS application name.
 
const string ALARM_PROP_UN_DEVICE_TYPE = "deviceType"
 UNICOS device type name.
 
const string ALARM_PROP_UN_ALIAS = "alias"
 DP alias.
 
const string ALARM_PROP_UN_DOMAIN = "domain"
 UNICOS device domain name.
 
const string ALARM_PROP_UN_NATURE = "nature"
 UNICOS device nature name.
 
const string ALARM_PROP_UN_DESCRIPTION = "description"
 UNICOS device description.
 
const string ALARM_PROP_UN_ALARM_TYPE = "alarmType"
 UNICOS alarm type.
 
const string ALARM_PROP_UN_MASTER = "master"
 UNICOS master device name (for AA and DA)
 
const string ALARM_PROP_UN_ALARM_LEVEL = "alarmLevel"
 UNICOS alarm level (0/1/2/3 = Info/Warning/Alarm/Safety alarm)
 
const string ALARM_PROP_UN_PANEL = "unPanel"
 UNICOS device panel name.
 
const string ALARM_PROP_UN_S = "s"
 UNICOS column titled 'S', see mouseTableEvent.
 
Replacement for constances declared in unAlarmScreen.ctl in order to remove dependency on that library
const string AS_NG_UN_ALARM_FILTER_ALL = "*"
 Replacement for UNALARMSCREEN_FILTER_ALL: the string that appears in filter with meaning 'all'.
 
const string AS_NG_UN_ALARM_LIST = "List..."
 Replacement for UNALARMSCREEN_LIST_NAME: the string that appears in selection list of combobox.
 
const int AS_NG_UN_MENU_INDEX_COPY_LINE = 100000
 Replacement for UNALARMSCREEN_POPUPMENU_INDEX_COPY_LINE: the index of popup menu item "Copy to clipboard".
 
private const string ASNG_UN_DBG = "ASNG_DBG"
 Flag for activating debug messages in this library, one flag for all functions.
 

Detailed Description

UNICOS-cpecific support for NextGen Alarm Screen

Function Documentation

◆ AlarmScreenUNICOS_getFilterCompletions()

mapping AlarmScreenUNICOS_getFilterCompletions ( string  sPropName,
const dyn_string &  dsSelectedSystems 
)

Get list of comletions for filter on given alarm property

Parameters
sPropNameThe name of alarm property for which filter is configured
dsSelectedSystemsThe list of selected system names
Returns
mapping with 3 fields (keys are strings):
  • "type" The type of completions used for this filter, see enum FilterCompletionsType
  • "list" The list of completion strings for this filter
  • "map" The list of completion strings for this filter in case complitions are related to connected systems. Key is string (system name), value is dyn_string = list of completions if this system is connected

◆ AlarmScreenUNICOS_getSlaveFilterCompletions()

mapping AlarmScreenUNICOS_getSlaveFilterCompletions ( string  sPropName,
const mapping &  mFilters 
)

Get list of comletions for slave filter on given alarm property

Parameters
sPropNameThe name of alarm property for which filter is configured
mFiltersCurrent settings for all 'master' filters of this slave:
  • key: alarm property name of filter
  • value: current filter value for this alarm property
Returns
mapping with 1 field (key is string):
  • "list" The list of completion strings for this filter

◆ AlarmScreenUNICOS_mouseTableEvent()

void AlarmScreenUNICOS_mouseTableEvent ( const mapping &  mArgs)

Process mouse event in alarm table cell. TODO - code and description The variant of calling this from C++ code doesn't work for UNICOS, postponed...

◆ AlarmScreenUNICOS_ctrlActionRequested()

void AlarmScreenUNICOS_ctrlActionRequested ( const mapping &  mArgs)

Process ctrlActionRequested() event of AS EWO in UNICOS-specific way

Parameters
mArgsevent arguments, see function AlarmScreenNgEwo_ctrlActionRequested()

◆ AlarmScreenUNICOS_mouseTableEvent_broken()

mapping AlarmScreenUNICOS_mouseTableEvent_broken ( const mapping &  mSource,
const mapping &  mAlarmData 
)

Process mouse event in alarm table cell. TODO - code and description The variant of calling this from C++ code doesn't work for UNICOS, postponed...

Note
This function is not used, remains here as first variant for tests

◆ AlarmScreenUNICOS_treatRightClickAnswer()

mapping AlarmScreenUNICOS_treatRightClickAnswer ( const mapping &  mSource,
const mapping &  mAlarmData,
const dyn_string &  dsMenu,
int  iAnswer 
)

Process user selection from popup menu on alarm table. The whole logic of processing follows the logic of unAlarmScreen_treatRightClickAnswer(), as much as possible.

Parameters
mSourceParameters of event source (what row/column in table was clicked, mouse pointer position etc.)
mAlarmDataProperties of all alarms, selected in the table
dsMenuThe description of popup menu that was hown to user
iAnswerThe ID of menu item, selected by user
Returns
TODO

◆ _AlarmScreenUNICOS_initHMI()

private void _AlarmScreenUNICOS_initHMI ( )

Simplified version of unGraphicalFrame_initHMI(), the main differences are:

  • added check if initialization was already done
  • not all of initializations are performed

◆ _AlarmScreenUNICOS_basicConfigApplied()

private void _AlarmScreenUNICOS_basicConfigApplied ( const mapping &  mArgs)

Process ctrlActionRequested() event of AS EWO in UNICOS-specific way; the case when event is AS_EWO_ACTION_BASIC_CONFIG_APPLIED. The main goal of this method is performing UNICOS-specific initialization of AS EWO

Parameters
mArgsevent arguments, see function AlarmScreenNgEwo_ctrlActionRequested()

◆ _AlarmScreenUNICOS_getFilterCompletions_application()

private void _AlarmScreenUNICOS_getFilterCompletions_application ( const dyn_string &  dsSelectedSystems,
mapping &  mResult 
)

Get completions for filter on application name

Parameters
dsSelectedSystemsThe list of selected system names
mResultmapping where result shall be placed, 3 fields are available (keys are strings):
  • "type" The type of completions used for this filter, see enum FilterCompletionsType
  • "list" The list of completion strings for this filter
  • "map" The list of completion strings for this filter in case complitions are related to connected systems. Key is string (system name), value is dyn_string = list of completions if this system is connected

◆ _AlarmScreenUNICOS_getSystemApplications()

private dyn_string _AlarmScreenUNICOS_getSystemApplications ( string  sSystemName,
string  sFileNameSuffix = "_unTreeDeviceOverview_FECharacteristics.dat" 
)

Get list of applications for given system name. This is a bit simplified version of function _unTreeDeviceOverview_getFrontEndNameApplicationFromFile()

Parameters
sSystemNameThe name of system
sFileNameSuffixSuffix for file name with information
Returns
list of application names for this system

◆ _AlarmScreenUNICOS_getFilterCompletions_deviceType()

private void _AlarmScreenUNICOS_getFilterCompletions_deviceType ( const dyn_string &  dsSelectedSystems,
mapping &  mResult 
)

Get completions for filter on device type

Parameters
dsSelectedSystemsThe list of selected system names
mResultmapping where result shall be placed, 3 fields are available (keys are strings):
  • "type" The type of completions used for this filter, see enum FilterCompletionsType
  • "list" The list of completion strings for this filter
  • "map" The list of completion strings for this filter in case complitions are related to connected systems. Key is string (system name), value is dyn_string = list of completions if this system is connected

◆ _AlarmScreenUNICOS_getFilterCompletions_alarmType()

private void _AlarmScreenUNICOS_getFilterCompletions_alarmType ( const dyn_string &  dsSelectedSystems,
mapping &  mResult 
)

Get completions for filter on alarm type

Parameters
dsSelectedSystemsThe list of selected system names
mResultmapping where result shall be placed, 3 fields are available (keys are strings):
  • "type" The type of completions used for this filter, see enum FilterCompletionsType
  • "list" The list of completion strings for this filter
  • "map" The list of completion strings for this filter in case complitions are related to connected systems. Key is string (system name), value is dyn_string = list of completions if this system is connected

◆ _AlarmScreenUNICOS_getFilterCompletions_domain()

private void _AlarmScreenUNICOS_getFilterCompletions_domain ( const dyn_string &  dsSelectedSystems,
mapping &  mResult 
)

Get completions for filter on device domain

Parameters
dsSelectedSystemsThe list of selected system names
mResultmapping where result shall be placed, 3 fields are available (keys are strings):
  • "type" The type of completions used for this filter, see enum FilterCompletionsType
  • "list" The list of completion strings for this filter
  • "map" The list of completion strings for this filter in case complitions are related to connected systems. Key is string (system name), value is dyn_string = list of completions if this system is connected

◆ _AlarmScreenUNICOS_getFilterCompletions_nature()

private void _AlarmScreenUNICOS_getFilterCompletions_nature ( const dyn_string &  dsSelectedSystems,
mapping &  mResult 
)

Get completions for filter on device nature

Parameters
dsSelectedSystemsThe list of selected system names
mResultmapping where result shall be placed, 3 fields are available (keys are strings):
  • "type" The type of completions used for this filter, see enum FilterCompletionsType
  • "list" The list of completion strings for this filter
  • "map" The list of completion strings for this filter in case complitions are related to connected systems. Key is string (system name), value is dyn_string = list of completions if this system is connected

◆ _AlarmScreenUNICOS_getSubSystemFromFile()

private void _AlarmScreenUNICOS_getSubSystemFromFile ( string  sSystemName,
int  iSubSysIndex,
dyn_string &  dsResult,
string  sFileNameSuffix = "_unTreeDeviceOverview_subSystem.dat" 
)

Read from configuration file This is a bit simplified version of original function _unTreeDeviceOverview_getSubSystemFromFile()

Parameters
sSystemNameSystem name being processed
iSubSysIndexWhich of 'subsystems' is required (1 = doman, 2 = nature)
dsResultVariable where resulting names will be placed
sFileNameSuffixConstant part of file name

◆ _AlarmScreenUNICOS_buildMenu()

private dyn_string _AlarmScreenUNICOS_buildMenu ( const mapping &  mSource,
const mapping &  mAlarmData,
int  iMode 
)

Build popup menu for right mouse button event in alarm table. The functionality is copied from unAlarmScreen_treatRightClickAnswer() function, with adaptation for new alarm screen.

Parameters
mSourceParameters of event in the table
mAlarmDataAll properties of selected alarm(s) in table
iModeThe mode of data source for AS EWO, one of constants AS_NG_EWO_MODE_xxx
Returns
Popup menu description

◆ _AlarmScreenUNICOS_extendBaseDpeMenu()

private void _AlarmScreenUNICOS_extendBaseDpeMenu ( string  sAlias,
dyn_string &  dsMenuList,
int  iMode 
)

The basic popup menu was built (or not) for selected DP, this function adds to that menu description items which are always there for any device in alarm screen.

Parameters
sAliasAlias for DP in activated row of alarm table
dsMenuListPreviously built description of popup menu, can be empty
iModeThe mode of data source for AS EWO, one of constants AS_NG_EWO_MODE_xxx

◆ _AlarmScreenUNICOS_buildColumnSubMenu()

private dyn_string _AlarmScreenUNICOS_buildColumnSubMenu ( const mapping &  mSource)

Build items of submenu for showing/hiding table columns

Parameters
mSourceParameters of event in the table &
Returns
items for column visibility submenu

◆ _AlarmScreenUNICOS_buildFinalMenu()

private void _AlarmScreenUNICOS_buildFinalMenu ( dyn_string &  dsMenuList,
const dyn_string &  dsColumnsMenu,
int  iMode,
bool  bDpeExists 
)

Build the ultimate content of pupup menu.

Parameters
dsMenuListPreliminary popup menu description
dsColumnsMenuItems of 'View' submenu (show/hide table columns)
iModeThe mode of data source for AS EWO, one of constants AS_NG_EWO_MODE_xxx
bDpeExiststrue if menu is being built for existing DPE

◆ _AlarmScreenUNICOS_enableDisableAckMenu()

private void _AlarmScreenUNICOS_enableDisableAckMenu ( const mapping &  mSource,
const mapping &  mAlarmData,
dyn_string &  dsMenuList,
int  iMode 
)

Enable/disable menu items of popup menu, related to alarm acknowledgment/masking TODO: the first part of logic is not clear at all, see comments inside this functions

Parameters
mSourceParameters of event in the table
mAlarmDataAll properties of selected alarm(s) in table
dsMenuList(partially) prepared description of popup menu
iModeThe mode of data source for AS EWO, one of constants AS_NG_EWO_MODE_xxx

◆ _AlarmScreenUNICOS_disableMenuItem()

private void _AlarmScreenUNICOS_disableMenuItem ( dyn_string &  dsMenuList,
const string &  sItemType,
const string &  sItemLabel 
)

Disable item in popup menu description, i.e. the very last part shall be ",0" instead of ",1"

Parameters
dsMenuListDescription of popup menu
sItemTypeThe type of item to be disabled, typically "PUSH_BUTTON"
PUSH_BUTTONThe label of item to be disabled

◆ _AlarmScreenUNICOS_menuCpcGenericAction()

private void _AlarmScreenUNICOS_menuCpcGenericAction ( const mapping &  mSource,
const mapping &  mAlarmData,
const dyn_string &  dsMenu,
int  iAnswer 
)

Process user selection from popup menu on alarm table. It was checked before calling this function that user selection is not one of alarm-specific menu items. Thus, selection must be most probably one of items for CPC device. The logic of this function corresponds to unAlarmScreen_treatRightClickAnswer().

Parameters
mSourceParameters of event source (what row/column in table was clicked, mouse pointer position etc.)
mAlarmDataProperties of all alarms, selected in the table
dsMenuThe description of popup menu that was hown to user
iAnswerThe ID of menu item, selected by user

◆ _AlarmScreenUNICOS_menuAlarmSpecific()

private bool _AlarmScreenUNICOS_menuAlarmSpecific ( const mapping &  mSource,
const mapping &  mAlarmData,
int  iAnswer 
)

Process menu selection corresponding to one of alarm-specific menu items (in contrast to general popup menu for UNICOS devices).

Parameters
mSourceParameters of event in the table
mAlarmDataAll properties of selected alarm(s) in table
dsMenuiAnswer The ID of item selected from menu
Returns
true if selection in menu corresponds to one of alarm-specific menu items, i.e. if user selection was processed; false otherwise

◆ _AlarmScreenUNICOS_menuLineToClipboard()

private bool _AlarmScreenUNICOS_menuLineToClipboard ( const mapping &  mSource,
const mapping &  mAlarmData 
)

Copy content of active table row to clipboard

Parameters
mSourceParameters of event in the table
mAlarmDataAll properties of selected alarm(s) in table
Returns
Always true

◆ _AlarmScreenUNICOS_menuShowAllColumns()

private bool _AlarmScreenUNICOS_menuShowAllColumns ( const mapping &  mSource)

Make visible all table columns

Parameters
mSourceParameters of event in the table
Returns
Always true

◆ _AlarmScreenUNICOS_menuShowHideColumn()

private bool _AlarmScreenUNICOS_menuShowHideColumn ( const mapping &  mSource,
int  iColumnIdx 
)

Switch visibility of single column in table

Parameters
mSourceParameters of event in the table
iColumnIdxTable column index
Returns
Always true

◆ _AlarmScreenUNICOS_menuDisplayAlarmDetails()

private bool _AlarmScreenUNICOS_menuDisplayAlarmDetails ( const mapping &  mSource,
const mapping &  mAlarmData 
)

Display details of alarm in selected row

Parameters
mSourceParameters of event in the table
mAlarmDataAll properties of selected alarm(s) in table
Returns
Always true

◆ _AlarmScreenUNICOS_menuInsertComment()

private bool _AlarmScreenUNICOS_menuInsertComment ( const mapping &  mSource,
const mapping &  mAlarmData 
)

Set comment for alarm in selected row

Parameters
mSourceParameters of event in the table
mAlarmDataAll properties of selected alarm(s) in table
Returns
Always true

◆ _AlarmScreenUNICOS_ackMultiple()

private void _AlarmScreenUNICOS_ackMultiple ( dyn_mapping &  dmAlarms)

Acknowledge (multiple) alarms, selected in AS EWO

Parameters
dmAlarmsList of alarms data for alarms to be acknowledged

◆ _AlarmScreenUNICOS_defaultPanel()

private void _AlarmScreenUNICOS_defaultPanel ( string  sDeviceName,
string  sDescription 
)

The replacement of function _unAlarmScreen_defaultPanel().
Action for click on "S" column of the alarm screen.

Parameters
sDeviceNamestring input, The DPE of the clicked device.
sDescriptionstring input, The description of the clicked device.
UsageInternal.