unCoreInternals 9.3.0
Classification of unDeviceTreeOverview Functions

Functions in unTreeDeviceOverview.ctl

Functions not used:

  • unTreeDeviceOverview_Connection, unTreeDeviceOverview_WidgetInit, unTreeDeviceOverview_distributedRegister, unTreeDeviceOverview_AddAndCleanDiagnosticPanel.

Functions to manage datapoints:

  • unTreeDeviceOverview_getInternalTriggerName and _unTreeDeviceOverview_getInternalTriggerName used to get the specific datapoint name of _UnDevTreeOv DPT (_UnTreeDevOv_unicosHMI_1_2 dp, for example).
  • unTreeDeviceOverview_triggerDisplay and _unTreeDeviceOverview_triggerDisplay used to set the .command and .systemName dpe for _UnTreeDevOv_unicosHMI_1_2 (for example), which triggers the execution of the callback handling the display of the deviceTreeOverview. (***NOTE!!! Modify unGraphicalFrame so unTreeDeviceOverview_triggerDisplay is used instead of the one starting with _ (which is used internally in the script)).

Functions to manage filter:

  • unTreeDeviceOverview_initialize initializes the tree device overview graphical components (size, properties, etc. of the panel). Specified in dollar parameter DEVUN_TREEDISPLAY_INIT_FUNCTION and used in sInitFunction parameter in unTreeDeviceOverview_initializeTreeDeviceWidget.
  • unTreeDeviceOverview_initializeTreeDeviceWidget initializes the tree device widget. Sets all the initial conditions (devices, filter, systems, front ends, image loading, dpConnect) when starting. Called in the init function of unDeviceTree.pnl.
  • unTreeDeviceOverview_displayCallBack and unTreeDeviceOverview_displayCallBackTreeDeviceWidget handles the device tree commands for display (DEVUN_ADD_COMMAND, DEVUN_DELETE_COMMAND, DEVUN_APPLYFILTER_COMMAND). It displays, refreshes, updates or deletes, the devices in the tree list in the left side of the panel. Also, it sets filter bit values. Used in unDeviceTree.pnl when initializes and in unSetDeviceDPEConfigs_displayCallBack —> unSetDeviceDPEConfigs.ctl (although it looks that for setDeviceDPEConfigs is never used, only specified).
  • unTreeDeviceOverview_buildSubsystemList builds the domain and nature by filling the .items for the filter options used in unDeviceTree.pnl. It uses the values of the global dyn_string variables to fill the data. _unTreeDeviceOverview_buildSubsystemList builds the list of domain and nature. Uses the global mappings of deviceTree and fills the global dyn_string. Used in unicosHMI.ctl.
  • unTreeDeviceOverview_checkDeviceListSize checks that the size of each field is consistent, i.e., that there are 3 device dpnames with the corresponding 3 alias, 3 fe, 3 fedp, 3 app, 3 type, 3 nature, 3 domain.
  • unTreeDeviceOverview_getSelectedDeviceList gets list of devices and its configurations based on the filter criteria used in unTreeDeviceOverview_selectSortDeviceList to sort the list.
  • unTreeDeviceOverview_sortSelectedDeviceList sorts the list of selected devices. Used in unTreeDeviceOverview_selectSortDeviceList and addNodeInTree in unDeviceTree.pnl
  • unTreeDeviceOverview_selectSortDeviceList sorts the list of devices, i.e., refreshes the list. Used in unTreeDeviceOverview_applyFilter.
  • unTreeDeviceOverview_addNodeInTree adds the node in the unTreeWidget. Used in unTreeDeviceOverview_applyFilter.
  • unTreeDeviceOverview_applyFilter applies a new filter in the panel by erasing everything and adding all the systems connected. It refreshes the filter.
  • unTreeDeviceOverview_checkSelectState checks if the filter was modified. Used in unTreeDeviceOverview_applyFilter and applyFilter() in the unDeviceTree.pnl panel.
  • unTreeDeviceOverview_setSelectState keeps the current filter setting. Sets the previous selected global mapping variables to the current selected global mapping variables. Used in unTreeDeviceOverview_applyFilter and unDeviceTree.pnl.
  • unTreeDeviceOverview_checkSortByState checks the sort by state. A refresh in the list is triggered afterwards. Used in unTreeDeviceOverview_applyFilter and applyFilter() in unDeviceTree.pnl.
  • unTreeDeviceOverview_setSortByState keeps the sort by state. It sets the old global variable to the new value. Used in unTreeDeviceOverview_applyFilter.

Functions to manage display (in Overview area):

  • unTreeDeviceOverview_initializeDeviceToDisplay initializes the device and variables to display. It initializes the number of devices to be displayed by pages, lines, columns, graphs, etc. Used in panelGeneral_nodeLeftClick of treeDeviceOverview.pnl.
  • unTreeDeviceOverview_removedDisplayedDevices removes all the added symbol devices in the device overview area (removeSymbol). Used in unTreeDeviceOverview_displayDevices to refresh and treeDeviceOverview.pnl.
  • unTreeDeviceOverview_displayDevices shows the symbol of devices in the device overview (addSymbol). Used in the treeDeviceOverview.pnl.
  • unTreeDeviceOverview_showDeviceWidget shows the symbol devices in the device widget panel. It defines the coordinates to display and has addSymbol for the devices. Used in treeDeviceOverviewWidget.pnl (only function and code there).
  • unTreeDeviceOverview_getDeviceWidgetList gets the list of the widgets to show. Used in the panelGeneral_nodeLeftClick of treeDeviceOverview.pnl.
  • unTreeDeviceOverview_DeleteDiagnosticPanel keeps the front-end diagnostic panel per system to be able to close them when the remote system is off. It removes from the list the panels that are close. Not sure if this is used or useful. Used in unTreeDeviceOverview_displayCallBackTreeDeviceWidget for case DEVUN_DELETE_COMMAND. Functions used related to unDeviceTreeOverview.ctl.

Functions to manage display (in Snapshot area):

  • unTreeDeviceOverview_displayList display the list of device data in a table (for snapshot). Used in panelGeneral_nodeLeftClick, panelGeneral_updateSnapshot, panelGeneral_snapshot --> treeDeviceOverview.pnl.
  • unTreeDeviceOverview_displayLoadingText show the loading text of the treeDeviceOverview panel (Please wait ... devices X/Y).
  • unTreeDeviceOverview_showLoadingText makes the loading text visible or hidden.
  • unTreeDeviceOverview_getDeviceListData gets the data (time, value, invalidData, bitname, color) from the call of the ObjectList function. Used in unTreeDeviceOverview_displayList.
  • unTreeDeviceOverview_getDeviceListData gets the data (time, value, invalidData, bitname, color) from the call of the ObjectList function. Used in unTreeDeviceOverview_displayList.

Functions to get information:

  • unTreeDeviceOverview_getDeviceList get the list of devices. It relies on _unTreeDeviceOverview_getDeviceListFomFile, so it is getting the list of all the devices from the file. It is not related at all to _unTreeDeviceOverview_getDeviceList which is misleading. The function is only used at the end of unTreeDeviceOverview_loadAll.
  • _unTreeDeviceOverview_getDeviceList called in unDeviceListUpdate_getAndWriteDevice (in unDeviceListUpdate.ctl script) to obtain the list of all the devices with the corresponding configurations. It uses _unFilterDpFunctions_dpSelector which relies on a dpQuery that checks the appropriate datapoints (CPC) to obtain the devices.
  • unTreeDeviceOverview_getDeviceState gets the state of the device. Used in unTreeDeviceOverview_getDeviceListData.
  • unTreeDeviceOverview_getApplication gets the application list given a system name and frontend. Used in unDeviceListUpdate.ctl, unExportDevice.ctl, treeDeviceOverviewFilter.pnl (advanced filter), and cpcImportExportTesting.pnl.
  • unTreeDeviceOverview_getFrontEndName gets the frontend, frontend datapoint, and frontend type using a system as an input. It uses the _unTreeDeviceOverview_getFrontEndName function. It is only used in treeDeviceOverviewFilter.pnl. _unTreeDeviceOverview_getFrontEndName gets the frontend, frontend datapoint, and frontend type using a system, and the list of frontend device types as inputs. It is used in unDeviceListUpdate.ctl, unTreeDeviceOverview.ctl, unTreeDeviceOverviewDeprecated.ctl, AlarmScreenUNICOS.ctl, and xxxxx_para.pnl (xxxxx are the device/front end types).
  • _unTreeDeviceOverview_getSubSystemFromFile gets the list of nature and domain from file. Used in unTreeDeviceOverview_loadAll.
  • _unTreeDeviceOverview_getFrontEndNameApplicationFromFile gets the front end, front end datapoint, front end type, and frontend application name form file. Used in unTreeDeviceOverview_loadAll.

Functions to manage configurations:

  • unTreeDeviceOverview_initializeEventConfiguration initializes the global variables containing the event bits, etc. definition for devices and front end. It calls the function unTreeDeviceOverview_getConfiguration and unTreeDeviceOverview_getDPEObjectList. Used in the treeDeviceOverview.pnl initialization.
  • unTreeDeviceOverview_getDPEObjectList gets the DPE of a sDeviceType used for the objectList.
  • unTreeDeviceOverview_getConfiguration gets the configuration of the StsReg01(02) for an Unicos device type. Input dpType, output event bit names, positions, event bit corresponding to rising/falling edge, color.
  • unTreeDeviceOverview_getWidthSize gets the width dimension based on the strlen of the alias. Used in treeDeviceOverview.pnl —> panelGeneral_nodeLeftClick.
  • unTreeDeviceOverview_loadAll load all configuration (front ends, subsystems i.e., nature/domain, devicelist) from file. It calls _unTreeDeviceOverview_getFrontEndNameApplicationFromFile, _unTreeDeviceOverview_getSubSystemFromFile, and _unTreeDeviceOverview_buildSubsystemList, unTreeDeviceOverview_getDeviceList. It also specifies global mapping variables for the particular input systemname. It is used in unicosHMI_applicationUpdateDeviceList —> unicosHMI.ctl which is specified in g_dsHMIFunctions[HMI_APPLICATION_UPDATE_FUNCTION] when running the HMI at the beginning and used in unGraphicalFrame_initHMI in a dpConnect for updating the devicelist. This function connects to _unApplication .command/systemname and _unTreeDevOv .command/systemname

Functions to manage events in filter:

  • unTreeDeviceOverview_EventNodeLeftClick called when there is a left click done on a node of a TreeWidget (in the filter side). It just calls to unTreeDeviceOverview_ExpandOrNodeLeftClick. Used in the dollar parameter of unDeviceTree.pnl.
  • unTreeDeviceOverview_EventExpand similar function than unTreeDeviceOverview_EventNodeLeftClick.
  • unTreeDeviceOverview_ExpandOrNodeLeftClick function called from eventnodeleftclick or eventexpand.
  • unTreeDeviceOverview_DoubleClick called when a double click on a node of the unTreeWidget filter is done. It opens the faceplate of the front-end or device. Used as dollar parameter in unDeviceTree.pnl.
  • unTreeDeviceOverview_EventNodeRigthClick executed when one does a right click on a node of the Tree. It calls the functions unTreeWidget_getNodeNameAndNodeDp and unTreeDeviceOverview_DeviceRightClick. Used in unDeviceTree.pnl as dollar parameter.
  • unTreeDeviceOverview_DeviceRightClick right click event on tree device instance only used in unTreeDeviceOverview_EventNodeRigthClick. It opens the menu available for each widget of the filter and according to the answer selected if performs the appropriate action.
  • unTreeDeviceOverview_getChildrenDeviceList gets the list of children devices when a left click was done on a node of the tree. Used in panelGeneral_nodeLeftClick of treeDeviceOverview.pnl.
  • unTreeDeviceOverview_HandleEvent functions that triggers the device overview action when one clicks on a node of the device tree. It only specifies 3 .text fields when the case is DEVUN_TREEDISPLAY_NODELEFTCLICK. Used in treeDeviceOverview.pnl as a dollar parameter. This dollar param (DEVUN_TREEDISPLAY_FUNCTION) is then used in handleTriggerCommandThread —> unDeviceTree.pnl, which is called when initializing the panel.

Functions used related to unDeviceTreeOverview.ctl

unGraphicalFrame.ctl:

  • unGraphicalFrame_DeviceOv: shows the device over or device tree overview from cascade menu, icon, button.

Functions in unDeviceTree.pnl (UI):

Constants and global variables definitions.

Functions to set or save configurations:

  • storeSelectionForLater saves the current selection making it possible to restore the last filter settings.
  • saveSelection saves the selected filter according to what the user clicked. Specifies g_m_sSelectedMode and selectedDeviceTypes.items.
  • saveAliasSelection saves the alias filter selection according to what the user clicked.
  • applyFilter applies the selected filters in case they are valid.
  • updateUserFeedback used in loadSevedFilter() to trigger the functions to update the user feedback for all filter options.
  • updateUserFeedbackFor updates the user feedback for the provided filter option.
  • updateApplicationUserFeedback updates the user feedback for the application filter option.
  • updateExcludedAliasUserFeedback updates the user feedback for the excluded alias filter option
  • saveFilter saves the current filters with the help of a modal dialog into datapoints.
  • applyAdvancedFilter applies the filters selected in the advanced filter menu panel.
  • enableControls enables the graphical controls of this panel.

Functions to get or load configurations:

  • initPanel initializes the panel by connecting callback functions for devices and distributed systems, starting global variables and applying dollar parameters. It also initializes the filter, the function handleTriggerCommandThread, and it calls to unTreeDeviceOverview_buildSubsystemList and presetApplicationFilter.
  • presetApplicationFilter selects all applications by default if frontend applications are used. It registers the callback function applicationListChangedCB when the application list changes on a system.
  • buildPopupList builds the list of elements to display in pop-up window when clicked on one of the popup buttons of the filter options.
  • getListSelection shows the list selection panel (List...) to the user and retrieve the selection.
  • loadSavedFilter selects and loads a set of saved filters with the help of a modal dialog from datapoints.
  • openAdvancedFilterMenu opens the advanced filter menu panel and retrieves the filter options selected there.

Functions to handle configurations:

  • handleTriggerCommandThread handles user input on tree representation of shown devices and starts corresponding actions in a new thread. Case DEVUN_TREEDISPLAY_NODELEFTCLICK and DEVUN_TREEDISPLAY_EXPAND.
  • handlePopupButtonClick handles user left click on the popup buttons of each filter option (downward arrow) and delegates to the necessary functions.
  • handleCheckboxClick handles user selection on checkboxes of filter options and delegates to the necessary functions.

Callback Functions:

  • applicationListChangedCB callback function that reloads the selection when triggered. It rebuilds the subsystems list.
  • unDistConfigChangedCB callback function for distributed systems.

Functions to display:

  • applySelection applies the selected filters according to what the user clicked and triggers a UI update if successful.
  • showPopup displays the popup list and returns the index of user selection.
  • showFilter shows the devices for the selected filters in the tree element.

Functions to manage configurations and other functionalities:

  • addNodeInTree adds a node to the tree (when left clicking or expanding). Add text Please wait ... adding
  • isFilteringApproved checks if filters are valid or if they must be approved by the user. Notifies the user that the query for filtering can be slow and ask if it want to filter anyways.
  • transformArrayToString transforms a dynamic array of strings into one string.
  • transformArrayToStringAdvanced advanced version takes a starting string into account.
  • selectionIsNotNone tells the user whether the provided index is valid or not.
  • selectionContainsAllItems tells you whether all items stored in the second array are also in the first one.
  • selectedItemStringTooLong provides information if the string representation of a certain selected item is too long so that it must be cropped.
  • enableFilterButton only enable filter button if selection of filters has changed.

Functions in treeDeviceOverviewFilter.pnl (UI)

Functions to set or save configurations:

  • setComboboxFor populates the combobox of the provided filter option.
  • updateComboboxes populates the comboboxes of the panel with the previously loaded.
  • removeSelectionFor clears the combobox of the provided filter option and sets back the panel-global variables.
  • applySelectionForFilter applies the selection made in one of the comboboxes and updates all others accordingly. It is used with each filter option (application, system, nature, etc.) when they are changed.
  • enableControls enables or disables the control elements of this panel (disables before updating and enables afterwards).

Functions to get or load configurations:

  • initPanel initialises the panel by initializing global variables, applying dollar parameters and populating the UI.
  • loadInformationFor stores the information provided via dollar parameters in panel-global variables and initialises UI elements.
  • getSelectionForFilter processes the current selection (from a combobox) and returns the selected items accordingly.
  • getListSelection opens the list selection panel for multiple selections and returns the selection.
  • getPreparedSelection reads the currently selected filters and translates them into the format that is used to give them back to the main device selection panel. It relies in the use of getPreparedSelectionFor for each filter option.
  • getPreparedSelectionFor translates a specific filter selection into the format that is used to give them back to the main device selection panel.

Functions to manage configurations:

  • selectionIsNotNone determines whether the provided selection is valid or not.

Functions in treeDeviceOverview.pnl (UI)

Functions to set or save configurations:

  • panel_treeDeviceOverview_applyConfig applies the filter configuration and calls the panel_treeDeviceOverview_reload function with the obtained values.
  • panelGeneral_setBitFilter sets the filter in the snapshot.
  • fillFilterTables fills the filter lines by removing first the content and after that appending the values.
  • panelGeneral_updateSnapshot updates the snapshot list.
  • fillBreadcrumbTrail it creates a composed string with lvlXSelection.text. Not sure where is used, but in theory is triggered when a user inserts text into the lvlXSelection fields.
  • panel_treeDeviceOverview_useAsDefault —> List (right clicked) set the default filter.
  • panel_treeDeviceOverview_saveConfig —> List (right clicked) opens the save filter panel.

Functions to get or load configurations:

  • panel_treeDeviceOverview_reload reloads the table configuration in snapshot. It uses appendLines to insert the values of each field.
  • loadMapping --> initialize it defines the size/position of each field.
  • loadDefault --> initialize it calls the panel_treeDeviceOverview_applyConfig.
  • startDisplayHandlingThread --> initialize called at the end for the handling of the thread sCommand = triggerCommand.text; handleEvent(sCommand).
  • panel_treeDeviceOverview_loadDefault —> List (right clicked) load the default filter
  • panel_treeDeviceOverview_getConfig —> List (right clicked) gets the existing filter configurations.
  • panel_treeDeviceOverview_loadConfig —> List (right clicked) opens the load filter panel.
  • panel_treeDeviceOverview_isDefaultConfig —> List (right clicked) return whether the default configuration for the default column exists or not.
  • panel_treeDeviceOverview_getListParameter —> List (right clicked) get the visibility/width state of the columns in the list.

Functions to handle configurations:

  • panelGeneral_pageWidget handles the devices displayed in the presented page.
  • handleEvent --> initialize handles the cases when the command is DEVUN_TREEDISPLAY_UPDATE_SNAPSHOT, DEVUN_TREEDISPLAY_WIDGET, DEVUN_TREEDISPLAY_SNAPSHOT, DEVUN_TREEDISPLAY_NODELEFTCLICK, DEVUN_TREEDISPLAY_EXPAND, and DEVUN_TREEDISPLAY_PAGE_WIDGET.
  • panel_treeDeviceOverview_viewRightClick —> List (right clicked) opens the menu list with the options when right clicking.

Functions to display:

  • panelGeneral_widget displays the widget devices when started in the thread.
  • panelGeneral_snapshot displays the snapshot list when started in the thread.
  • panel_treeDeviceOverview_reOrder —> List (right clicked) reorder and reload the display

Functions to manage events:

  • panelGeneral_nodeLeftClick it handles the left click when started in the thread.
  • panel_treeDeviceOverview_actionRightClick —> List (right clicked) handles the different answers when right clicking on the list.