fwDeviceComment 9.2.0
fwDeviceComment.ctl File Reference

LIBRARY: fwDeviceComment.ctl

Author
Dr. Marc Bengulescu (BE-ICS-FD)
global string FW_DEVICE_COMMENT_CLASS
 
const string FW_DEVICE_COMMENT_DELIMITER = "~"
 
const unsigned FW_DEVICE_COMMENT_TABLE_COLUMN_DPE = 0
 
const unsigned FW_DEVICE_COMMENT_TABLE_COLUMN_APPLICATION = 1
 
const unsigned FW_DEVICE_COMMENT_TABLE_COLUMN_DEVICE = 2
 
const unsigned FW_DEVICE_COMMENT_TABLE_COLUMN_TIMESTAMP = 3
 
const unsigned FW_DEVICE_COMMENT_TABLE_COLUMN_USER = 4
 
const unsigned FW_DEVICE_COMMENT_TABLE_COLUMN_COMMENT = 5
 
const unsigned FW_DEVICE_COMMENT_TABLE_COLUMN_EXTENSION = 6
 
const unsigned FW_DEVICE_COMMENT_TABLE_COLUMN_SYSTEM = 7
 
const unsigned FW_DEVICE_COMMENT_TABLE_COLUMN_HOST = 8
 
const unsigned FW_DEVICE_COMMENT_TABLE_COLUMN_ACTIVE = 9
 
const string FW_DEVICE_COMMENT_TABLE_REF = "fwDeviceComment_commentsTable"
 
const string FW_DEVICE_COMMENT_FWDC_PANEL_REF = "PANEL_REF1"
 
const string FW_DEVICE_COMMENT_FWDC_PANEL_TITLE = "Device Comments"
 
const string FW_DEVICE_COMMENT_FWDC_PANEL_COMMCHANGE_CB = "unDeviceCommentsPanel_commentsChangedCB"
 
global string gFwDeviceComment_populateTableFunction
 
global dyn_string gFwDeviceComment_tableChangedCallbackFunction
 
global dyn_string gFwDeviceComment_filterAppliedCallbackFunction
 
global unsigned gFwDeviceComment_totalShown = 0
 
global dyn_dyn_anytype gFwDeviceComment_filteredComments
 
global bool gFwDeviceComment_bUserHasCancelled
 
void fwDeviceComment_init ()
 
void fwDeviceComment_sortTableAdjustColumns ()
 
void fwDeviceComment_addRows (dyn_string dpe, dyn_string application, dyn_string device, dyn_time timestamp, dyn_string user, dyn_string comment, dyn_string commentExt, dyn_string sys, dyn_string host, dyn_bool active)
 
void fwDeviceComment_deleteAllRows ()
 
void fwDeviceComment_deleteDeviceRows (string sDeviceDPE)
 
void fwDeviceComment_applyFilter (unsigned maxRows, bool hasDpFilterListChanged, bool hasChanged, dyn_string dpFilterList, time start, time end, mapping filterValues)
 
void fwDeviceComment_setPopulateTableFunction (string functionName)
 
void fwDeviceComment_populateTable (unsigned maxRows, dyn_string dpFilter=makeDynString(), bool bClearTable=true)
 
void fwDeviceComment_enable (const bool enable)
 
bool fwDeviceComment_setFilteredComments (dyn_dyn_anytype ddaFilteredComments)
 
bool fwDeviceComment_getFilteredComments (dyn_dyn_anytype &ddaFilteredComments)
 
void fwDeviceComment_addTableChangedCallback (string cbFunctionName)
 
void fwDeviceComment_addFilterAppliedCallback (string cbFunctionName)
 
void fwDeviceComment_clearCallbacks ()
 
void fwDeviceComment_showProgress (int iProgress, int iTotal)
 
shape fwDeviceComment_getPanelShape ()
 
void fwDeviceComment_showUserFeedback (string sMessage)
 
bool fwDeviceComment_getUserHasCancelled ()
 
void fwDeviceComment_setUserHasCancelled (bool bUserHasCancelled)
 
void fwDeviceComment_removeHiddenRows (dyn_int &diRowIndexes)
 

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

◆ fwDeviceComment_sortTableAdjustColumns()

void fwDeviceComment_sortTableAdjustColumns ( )
private
Reviewed:
2018-06-22 Callback

◆ fwDeviceComment_deleteDeviceRows()

void fwDeviceComment_deleteDeviceRows ( string  sDeviceDPE)

Deletes all the comments for the specified device

◆ fwDeviceComment_applyFilter()

void fwDeviceComment_applyFilter ( unsigned  maxRows,
bool  hasDpFilterListChanged,
bool  hasChanged,
dyn_string  dpFilterList,
time  start,
time  end,
mapping  filterValues 
)

Apply a filter to the table.

dpFilterList is the patterns of DPs to match for populating the table. The filter is then applied after the table has been populated. The table will only be populated if hasDpFilterListChanged = true and it will only be filtered if hasChanged = true.

filterValues is a mapping { columnN => dyn_string(valuesToMatch) } or { columnN => "*" }

Reviewed:
2018-06-21 Callback

◆ fwDeviceComment_setFilteredComments()

bool fwDeviceComment_setFilteredComments ( dyn_dyn_anytype  ddaFilteredComments)

Store to a global variable the DPs of all the visible rows in the table Used for: exporting comments

◆ fwDeviceComment_getFilteredComments()

bool fwDeviceComment_getFilteredComments ( dyn_dyn_anytype &  ddaFilteredComments)

Retrive from a global variable the DPs of all the visible rows in the table Used for: exporting comments

◆ fwDeviceComment_addTableChangedCallback()

void fwDeviceComment_addTableChangedCallback ( string  cbFunctionName)

Add a table change callback - it will be executed when the table is repopulated.

◆ fwDeviceComment_addFilterAppliedCallback()

void fwDeviceComment_addFilterAppliedCallback ( string  cbFunctionName)

Add a table change callback - it will be executed when the table is repopulated.

◆ fwDeviceComment_showProgress()

void fwDeviceComment_showProgress ( int  iProgress,
int  iTotal 
)

Displays a progressbar when searching for comments

◆ fwDeviceComment_getPanelShape()

shape fwDeviceComment_getPanelShape ( )
private

Returns the panel shape object for fwDeviceComment.pnl

◆ fwDeviceComment_showUserFeedback()

void fwDeviceComment_showUserFeedback ( string  sMessage)

Shows feedback to the user This function should be called in a seperate thread, i.e. startThread("showUserFeedback","Message to the user");*

◆ fwDeviceComment_getUserHasCancelled()

bool fwDeviceComment_getUserHasCancelled ( )

Retrieves from a global variable the userHasCancelled state Used for: cancelling search/filter

◆ fwDeviceComment_setUserHasCancelled()

void fwDeviceComment_setUserHasCancelled ( bool  bUserHasCancelled)

Stores to a global variable the userHasCancelled state Used for: cancelling search/filter

◆ fwDeviceComment_removeHiddenRows()

void fwDeviceComment_removeHiddenRows ( dyn_int &  diRowIndexes)

Returns the indexes of only the visible rows from the provied row index list.

visible = actually displayed in the table

The WinCC-OA function getSelectedLines() also includes any filtered out rows that are not displayed in the table.