fwDeviceComment 9.3.0
fwDeviceFilter.ctl File Reference

LIBRARY: fwDeviceFilter.ctl

Author
Dr. Marc Bengulescu (BE-ICS-FD)
const string FW_DEVICE_FILTER_LIST_APPLICATION_REF = "fwDeviceFilter_applicationSelection"
 
const string FW_DEVICE_FILTER_LIST_DEVICE_TYPE_REF = "fwDeviceFilter_deviceTypeSelection"
 
const string FW_DEVICE_FILTER_LIST_NATURE_REF = "fwDeviceFilter_natureSelection"
 
const string FW_DEVICE_FILTER_LIST_DOMAIN_REF = "fwDeviceFilter_domainSelection"
 
const string FW_DEVICE_FILTER_TIME_PERIOD_REF = "fwDeviceFilter_timePeriod"
 
const string FW_DEVICE_FILTER_PLACEHOLDER_REF = "fwDeviceFilter_filterPlaceHolder"
 
const string FW_DEVICE_FILTER_REF = "fwDeviceFilter"
 
const string FW_DEVICE_FILTER_CUSTOM_COMBO_FIELD_NAME = "fwAlarmScreenGeneric_combo_filterFieldEdit"
 
const string FW_DEVICE_FILTER_MAX_ROWS_REF = "fwDeviceFilter_maxRows"
 
const signed FW_DEVICE_FILTER_LIST_APPLICATION = -1
 
const signed FW_DEVICE_FILTER_LIST_DEVICE_TYPE = -2
 
const signed FW_DEVICE_FILTER_LIST_NATURE = -3
 
const signed FW_DEVICE_FILTER_LIST_DOMAIN = -4
 
const signed FW_DEVICE_FILTER_TIME_PERIOD = -5
 
const unsigned FW_DEVICE_FILTER_LIST_1 = 1
 
const unsigned FW_DEVICE_FILTER_LIST_2 = 2
 
const unsigned FW_DEVICE_FILTER_LIST_3 = 3
 
const unsigned FW_DEVICE_FILTER_LIST_4 = 4
 
const unsigned FW_DEVICE_FILTER_LIST_5 = 5
 
const unsigned FW_DEVICE_FILTER_LIST_6 = 6
 
const string FW_DEVICE_FILTER_OPTION_ALL = "*"
 
const string FW_DEVICE_FILTER_OPTION_LIST = "List..."
 
const unsigned FW_DEVICE_FILTER_TYPE_COMBO_CUSTOM = 0
 
const unsigned FW_DEVICE_FILTER_TYPE_COMBO = 1
 
const unsigned FW_DEVICE_FILTER_TYPE_TEXT = 2
 
const unsigned FW_DEVICE_FILTER_TYPE_TIME_PERIOD = 3
 
const unsigned FW_DEVICE_FILTER_TYPE_UNDEFINED = 255
 
const unsigned FW_DEVICE_FILTER_MAX_FILTER = FW_DEVICE_FILTER_LIST_6
 
const unsigned FW_DEVICE_FILTER_MIN_FILTER = FW_DEVICE_FILTER_TIME_PERIOD
 
const unsigned FW_DEVICE_FILTER_DEFAULT_MAX_ROWS = 1500
 
const unsigned FW_DEVICE_FILTER_DEFAULT_TIME_FILTER_START = 2592000
 
global dyn_string gFwDeviceFilter_applyCBFunction = ""
 
global string gFwDeviceFilter_initialiseDpListFunction = ""
 
global string gFwDeviceFilter_groupQueryFunction = ""
 
global string gFwDeviceFilter_filterStartCB = ""
 
global string gFwDeviceFilter_filterEndCB = ""
 
global unsigned gFwDeviceFilter_previousMaxRows = FW_DEVICE_FILTER_DEFAULT_MAX_ROWS
 
global mapping gFwDeviceFilter_previousValues
 
global mapping gFwDeviceFilter_defaults
 
void fwDeviceFilter_init ()
 
 fwDeviceFilter_clearCallbacks ()
 
void fwDeviceFilter_addApplyFilterCallbackFunction (const string cbFunctionName)
 
void fwDeviceFilter_setFilterStartCallbackFunction (const string cbFunctionName)
 
void fwDeviceFilter_setFilterEndCallbackFunction (const string cbFunctionName)
 
void fwDeviceFilter_resetFilter (bool apply=true)
 
void fwDeviceFilter_applyFilter ()
 
unsigned fwDeviceFilter_getMaxRows ()
 
dyn_string _fwDeviceFilter_getValues (const signed n, bool &areAllSelected, bool &hasSelectionChanged, const mapping filterEnableState, const bool returnStarForAll=false)
 
string fwDeviceFilter_getFilterName (const signed filterN)
 
void fwDeviceFilter_linkTableColumn (const string tableRef, const unsigned columnN, const unsigned filterN, const unsigned type=FW_DEVICE_FILTER_TYPE_COMBO, const string sDefault="")
 
void fwDeviceFilter_updateFilters ()
 
void _fwDeviceFilter_updateFilter (const unsigned filterN)
 
unsigned _fwDeviceFilter_getFilterType (const unsigned filterN)
 
bool _fwDeviceFilter_filterExists (const unsigned filterN)
 
bool _fwDeviceFilter_setTableRef (const unsigned filterN, const string tableRef, const unsigned columnN)
 
bool _fwDeviceFilter_getTableRef (const unsigned filterN, string &tableRef, unsigned &columnN)
 
mapping _fwDeviceFilter_getEnableState ()
 
void _fwDeviceFilter_setEnableState (mapping state)
 
void fwDeviceFilter_enable (const bool enable)
 
void _fwDeviceFilter_enableApplyButton (const bool enable)
 
void fwDeviceFilter_enableFilter (const signed n, const bool enable)
 
bool fwDeviceFilter_isFilterEnabled (const signed n)
 
void fwDeviceFilter_setResultsTotal (const unsigned total, const unsigned displayed)
 
void fwDeviceFilter_addFilter (const unsigned n, const string name, const string label, const unsigned type, const dyn_string values=makeDynString(), const string sDefault="")
 
void _fwDeviceFilter_setFilterValues (const signed filterN, const dyn_string values, const string sDefault="")
 
string _filterNumberToRef (const signed n)
 
dyn_string fwDeviceFilter_dpListFilter (bool &hasSelectionChanged, const bool reload=true, const dyn_string dsFilterSystemNames=fwAlarmScreenGeneric_getConnectedSystems())
 
void fwDeviceFilter_setInitialiseDpListFunction (const string functionName)
 
dyn_string _fwDeviceFilter_initialiseDpList ()
 
void fwDeviceFilter_setGroupQueryFunction (const string functionName)
 
dyn_string _fwDeviceFilter_getList (const dyn_string dsGroup, const string sQueryWHERE, const string sPrefix, const string sSystem)
 
string _fwDeviceFilter_QueryGroup (const dyn_string dsFilter, const string sPrefix, const string sSystem)
 
dyn_string _fwDeviceFilter_checkApplication (const dyn_string dsDp, const dyn_string dsApplParam)
 
dyn_string _fwDeviceFilter_checkDeviceType (const dyn_string dsDp, const dyn_string dsDevType)
 
 fwDeviceFilter_updateCommandEvents ()
 

Detailed Description

(c) Copyright CERN 2005. All rights not expressly granted are reserved. iceco.nosp@m.ntro.nosp@m.ls.su.nosp@m.ppor.nosp@m.t@cer.nosp@m.n.ch

SPDX-License-Identifier: LGPL-3.0-only JCOP Copyright (C) CERN 2018 All rights reserved

Function Documentation

◆ fwDeviceFilter_applyFilter()

void fwDeviceFilter_applyFilter ( )

Apply the filter, by taking all the filter values and calling any applyFilter callback functions, with those values.

◆ fwDeviceFilter_linkTableColumn()

void fwDeviceFilter_linkTableColumn ( const string  tableRef,
const unsigned  columnN,
const unsigned  filterN,
const unsigned  type = FW_DEVICE_FILTER_TYPE_COMBO,
const string  sDefault = "" 
)

Link the column of a table to a given filter.

The values will be taken from the column to populate the filter.

◆ fwDeviceFilter_updateFilters()

void fwDeviceFilter_updateFilters ( )
Reviewed:
2018-06-22 Callback

◆ fwDeviceFilter_setResultsTotal()

void fwDeviceFilter_setResultsTotal ( const unsigned  total,
const unsigned  displayed 
)
Reviewed:
2018-06-22 Callback

◆ fwDeviceFilter_dpListFilter()

dyn_string fwDeviceFilter_dpListFilter ( bool &  hasSelectionChanged,
const bool  reload = true,
const dyn_string  dsFilterSystemNames = fwAlarmScreenGeneric_getConnectedSystems() 
)

Derived from fwAlarmScreenGeneric_dpListFilter.

reload = unAlarmScreen_g_iAlarmScreenType != UNALARMSCREEN_PANEL_SYSTEM_INTEGRITY;

Description:
Get a list of DP matching the given filter.

TODO make system names a filter list

◆ _fwDeviceFilter_QueryGroup()

string _fwDeviceFilter_QueryGroup ( const dyn_string  dsFilter,
const string  sPrefix,
const string  sSystem 
)
private
Description:
Transform a DP group list to a dpQuery 'FROM' clause with a list of DPs.
Usage:
Internal.
Parameters
[in]dsFilterdyn_string, The list of DP groups.
[in]sPrefixstring, Nature/domain indicator.
[in]sSystemstring, System on which to look for.

◆ _fwDeviceFilter_checkApplication()

dyn_string _fwDeviceFilter_checkApplication ( const dyn_string  dsDp,
const dyn_string  dsApplParam 
)
private
Description:
Check which of the given DPs is of any of the given applications.
Usage:
Internal.
Parameters
[in]dsDpdyn_string, The list of DP in which to check.
[in]dsApplParamdyn_string, The list of applications.
Returns
The list of DP from the input that are of any of the given applications.

◆ _fwDeviceFilter_checkDeviceType()

dyn_string _fwDeviceFilter_checkDeviceType ( const dyn_string  dsDp,
const dyn_string  dsDevType 
)
private
Description:
Check which of the given DPs is of any of the given device types.
Usage:
Internal.
Parameters
[in]dsDpdyn_string, The list of DP in which to check.
[in]dsDevTypedyn_string, The list of device types.
Returns
The list of DP from the input that are of any of the given device types.

◆ fwDeviceFilter_updateCommandEvents()

fwDeviceFilter_updateCommandEvents ( )

This function updates the textFieldOut event script of the filters that contain a textedit field in order to apply the filter immediately upon pressing the ENTER key while editing the filed