blob: a1dbd599fec575d9279961626d11771c14af4ae5 [file] [log] [blame]
///////////////////////////////////////////////////////////////////////////////
// //
// Copyright (c) 2000-2019 Ericsson Telecom AB //
// //
// All rights reserved. This program and the accompanying materials //
// are made available under the terms of the Eclipse Public License v2.0 //
// which accompanies this distribution, and is available at //
// https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html //
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////
// Module: EPTF_CLL_UIHandler_Definitions
//
// Purpose:
// This module contains definitions of EPTF_CLL_UIHandler.
//
// Module depends on:
// <EPTF_CLL_CLI_Definitions>
// <XUL_XTDL>
// <XTDPasp_Types>
// <XTDP_PDU_Defs>
// <EPTF_CLL_Variable_Definitions>
// <EPTF_CLL_Logging_Definitions>
// <EPTF_CLL_UIHandler_MsgDefinitions>
// <EPTF_CLL_Common_Definitions>
// <EPTF_CLL_TransportIPL4_Definitions>
// <IPL4asp_Types>
// <Socket_API_Definitions>
// <EPTF_CLL_Semaphore_Definitions>
// <EPTF_CLL_HashMap_Definitions>
// <IPL4asp_PortType>
// <HTTPmsg_Types>
//
// Current Owner:
// EFLOATT
//
// Last Review Date:
// 2010-xx-xx
//
// Detailed Comments:
// -
//
///////////////////////////////////////////////////////////////
module EPTF_CLL_UIHandler_Definitions
// [.objid{ itu_t(0) identified_organization(4) etsi(0)
// identified_organization(127) ericsson(5) testing(0)
// <put further nodes here if needed>}]
{
//=========================================================================
// Import Part
//=========================================================================
import from EPTF_CLL_CLI_Definitions all;
import from ttcn_ericsson_se_protocolModules_xtdp_xtdp all;
import from ttcn_ericsson_se_protocolModules_xtdp_xtdl all;
import from EPTF_CLL_Variable_Definitions all;
import from EPTF_CLL_Logging_Definitions all;
import from EPTF_CLL_UIHandler_MsgDefinitions all;
import from EPTF_CLL_Common_Definitions all;
import from EPTF_CLL_TransportIPL4_Definitions all;
import from IPL4asp_Types all;
import from EPTF_CLL_Semaphore_Definitions all;
import from EPTF_CLL_DataSource_Definitions all;
import from EPTF_CLL_HashMap_Definitions all;
import from EPTF_CLL_StatManager_Definitions all;
import from IPL4asp_PortType all;
import from EPTF_CLL_UIHandler_ChartDataTypeRingBuffer_Functions all;
//=========================================================================
// Module Parameters
//=========================================================================
//modulepar float tsp_EPTF_initalGuiRefreshRate := 10.0; //10.0 - Refresh period time for TITAN Runtime GUI
modulepar charstring tsp_EPTF_UIHandler_loggingComponentMask := "EPTF_UIHandler";
modulepar charstring tsp_EPTF_UIHandler_CLI_loggingComponentMask := "EPTF_UIHandler_CLI";
modulepar charstring tsp_EPTF_UIHandler_CLIPrefix := ""
friend module EPTF_CLL_UIHandler_WidgetFunctions,
EPTF_CLL_UIHandler_BrowserFunctions,
EPTF_CLL_UIHandlerClient_Functions,
EPTF_CLL_UIHandler_XULFunctions,
EPTF_CLL_UIHandler_DS_Functions;
//=========================================================================
// Data Types
//=========================================================================
///////////////////////////////////////////////////////////
// Type: EPTF_UIHandler_OpenSubscription
//
// Purpose:
// Structured type for storing subscriptions created by <EPTF_CLL_UISubscribeMeNote>.
//
// Elements:
// *EPTF_Var_CT* - provider - The component that has sent the <EPTF_CLL_UISubscribeMeNote> message.
// *charstring* - providedParamName - The name of the variable in the provider.
// *integer* - varIdx - The index of the created variable.
// *EPTF_UIHandler_WidgetIdString* - widgetId - If there is a connected widget, it contains the ID of it.
// <EPTF_UIHandler_HandledWidgetType> - widgetType - What kind of widget is connected to the variable.
// *Widgettype* - widgetDataType *optional* - Where there is a handled data type. (Used in case of TreeCell, TreeCol)
///////////////////////////////////////////////////////////
type record EPTF_UIHandler_OpenSubscription{
EPTF_Var_CT provider,
charstring providedParamName,
integer varIdx,
EPTF_UIHandler_WidgetIdString widgetId,
EPTF_UIHandler_HandledWidgetType widgetType,
Widgettype widgetDataType optional
}
///////////////////////////////////////////////////////////
// Type: EPTF_UIHandler_OpenSubscriptions
// Purpose:
// List of <EPTF_UIHandler_OpenSubscription> records.
///////////////////////////////////////////////////////////
type record of EPTF_UIHandler_OpenSubscription EPTF_UIHandler_OpenSubscriptions;
///////////////////////////////////////////////////////////
// Const: c_defEPTF_UIHandler_OpenSubscription
// Purpose:
// An empty <EPTF_UIHandler_OpenSubscription> record.
///////////////////////////////////////////////////////////
const EPTF_UIHandler_OpenSubscription c_UIHandler_defOpenSubscription := {
provider:=null,
providedParamName := "",
varIdx := -1,
widgetId := "",
widgetType := wtUnknown,
widgetDataType := omit};
///////////////////////////////////////////////////////////
// Type: EPTF_UIHandler_TreeData
// Purpose:
// Stores the GUI element indexes of the columns in the tree
// When you want to get the type of a cell, you must enumerate the columns of the tree
///////////////////////////////////////////////////////////
type record EPTF_UIHandler_TreeData{
EPTF_IntegerList columns,
integer nofCells
}
///////////////////////////////////////////////////////////
// Type: EPTF_UIHandler_CellData
// Purpose:
// Stores the GUI element index of the cell's column
///////////////////////////////////////////////////////////
type record EPTF_UIHandler_CellData{
integer colIdx,
boolean editable optional // egbotat: per-cell editable flag
}
///////////////////////////////////////////////////////////
// Type: EPTF_UIHandler_DitributionChartData
// Purpose:
// Stores the values of intervallimits
type record EPTF_UIHandler_DitributionChartData{
EPTF_FloatList intervallimits
}
///////////////////////////////////////////////////////////
// Type: EPTF_UIHandler_WidgetData
// Purpose:
// There are two types of widgets that must have additional information: the cell and the tree
///////////////////////////////////////////////////////////
type union EPTF_UIHandler_WidgetData{
EPTF_UIHandler_CellData cellData,
EPTF_UIHandler_TreeData treeData,
EPTF_UIHandler_DitributionChartData distChartData,
EPTF_UIHandler_MetaIteratorData metaIteratorData
}
///////////////////////////////////////////////////////////
// Type: EPTF_UIHandler_GuiItemRec
// Purpose:
// Describes the metadata of the iterator
///////////////////////////////////////////////////////////
type record EPTF_UIHandler_MetaIteratorData {
integer GUI_DescriptionDB_Idx,
EPTF_UIHandler_IteratorUnionType iteratorUnionType,
integer iteratorVarIdx,
EPTF_CharstringList currentValue,
integer nodePointer
}
///////////////////////////////////////////////////////////
// Type: EPTF_UIHandler_GuiItemRec
// Purpose:
// Describes a widget on the GUI
///////////////////////////////////////////////////////////
type record EPTF_UIHandler_GuiItemRec{
EPTF_UIHandler_WidgetIdString id,
EPTF_UIHandler_HandledWidgetType widgetType,
Widgettype widgetDataType optional,
integer parentIdx,
EPTF_IntegerList children,
EPTF_UIHandler_WidgetData widgetData optional,
Widgets XULformat optional,
boolean xuldisabled // original value in xml disabled flag
}
///////////////////////////////////////////////////////////
// Type: EPTF_UIHandler_GuiItemRecList
// Purpose:
// The list of <EPTF_UIHandler_GuiItemRec> records.
///////////////////////////////////////////////////////////
type record of EPTF_UIHandler_GuiItemRec EPTF_UIHandler_GuiItemRecList;
///////////////////////////////////////////////////////////
// Const: c_UIHandler_emptyGUIItem
// Purpose:
// An empty <EPTF_UIHandler_GuiItemRec> record.
///////////////////////////////////////////////////////////
const EPTF_UIHandler_GuiItemRec c_UIHandler_emptyGUIItem := {
/*id :=*/ "",
/*widgetType :=*/ wtUnknown,
/*widgetDataType :=*/ omit,
/*parentIdx :=*/ -1,
/*children :=*/ {},
/*widgetData :=*/ omit,
/*XULformat :=*/ omit,
/*xuldisabled*/ false
}
///////////////////////////////////////////////////////////
// Const: c_UIHandler_XSD_emptyTreeCell
// Purpose:
// An empty <Treecell> record.
///////////////////////////////////////////////////////////
const ttcn_ericsson_se_protocolModules_xtdp_xtdl.Treecell c_UIHandler_XSD_emptyTreeCell := {
/*align :=*/ omit,
/* customclass */ omit,
/*id :=*/ omit,
/*imageid :=*/ omit,
/*label_ :=*/ "",
/*tooltiptext :=*/ omit,
/*externaldata :=*/ omit,
/*visible :=*/ omit
}
///////////////////////////////////////////////////////////
// Const: c_UIHandler_XSD_emptyXTDPRequest
// Purpose:
// An empty <XTDP_Request> record.
///////////////////////////////////////////////////////////
const ttcn_ericsson_se_protocolModules_xtdp_xtdp.XTDP_Request c_UIHandler_XSD_emptyXTDPRequest := {
requestId := 1,
action_ := { choice := {
get := {
widget := { "", none_ }
}
}}
}
///////////////////////////////////////////////////////////
// Const: c_UIHandler_XSD_emptyTreeRow
// Purpose:
// An empty <Treerow> record.
///////////////////////////////////////////////////////////
const ttcn_ericsson_se_protocolModules_xtdp_xtdl.Treerow c_UIHandler_XSD_emptyTreeRow := {
/*treecellgroup_list :=*/ {{}}
}
/*
///////////////////////////////////////////////////////////
// Const: c_UIHandler_emptyTreeCell
// Purpose:
// An empty <Treecell> record.
///////////////////////////////////////////////////////////
const XUL_XTDL.Treecell c_UIHandler_emptyTreeCell := {
id := omit,
textlabel := "",
tooltiptext := omit
}
///////////////////////////////////////////////////////////
// Const: c_UIHandler_emptyTreeRow
// Purpose:
// An empty <Treerow> record.
///////////////////////////////////////////////////////////
const XUL_XTDL.Treerow c_UIHandler_emptyTreeRow := {}
*/
const ttcn_ericsson_se_protocolModules_xtdp_xtdl.Tabpage c_EPTF_UIHandler_emptyTabpage :=
{
/* customclass */ omit,
/* disabledongui */ omit,
/* id optional */ "",
/* label_ */ "",
/* maxheight */ omit,
/* orientation */ omit,
/* tooltiptext */ omit,
/* embeddedwidgets */ { {} }
}
///////////////////////////////////////////////////////////
// Const: c_missingFileName
// Purpose:
// This string has to be written to html message, and it will be replaced with the fileName
///////////////////////////////////////////////////////////
const charstring c_missingFileName := "$missingFileName"
/*
///////////////////////////////////////////////////////////
// Type: EPTF_UIHandler_XTDP_XML_TagList
// Purpose:
// The list of <XTDP_XML_Tag> record
///////////////////////////////////////////////////////////
type record of XTDP_XML_Tag EPTF_UIHandler_XTDP_XML_TagList;
*/
///////////////////////////////////////////////////////////
// Type: EPTF_UIHandler_WidgetsList
// Purpose:
// The list of <Widgets> record
///////////////////////////////////////////////////////////
type record of Widgets EPTF_UIHandler_WidgetsList;
type record ASP_XSD_XTDP {
// client_id is used only in case of server port with multiple connections
integer client_id optional,
ttcn_ericsson_se_protocolModules_xtdp_xtdp.XTDP_Message data
}
//=========================================================================
//Component Types
//=========================================================================
///////////////////////////////////////////////////////////
// Type: EPTF_UIHandler_CT
//
// Purpose:
// The component that implements the EPTF_UIHandler_CT feature
//
// Elements:
// EPTF_CLL_UIMgmtIf - <EPTF_CLL_UIMgmt_PT> - the management port
// v_openSubscriptions - <EPTF_UIHandler_OpenSubscriptions> - the list of the open subscriptions
//
// Detailed Comments:
// Gives a surface for automatization of data handling in UIs.
// The component on its EPTF_UIHandler_PT port can receive
// a note from the provider of a data to subscribe for that
// data. By that, the provider of the data can describe where
// to use its data.
//
///////////////////////////////////////////////////////////
public type component EPTF_UIHandler_CT extends EPTF_UIHandler_Private_CT{}
type record of EPTF_IntegerList EPTF_IntegerListList;
type record EPTF_UIHandler_GUIClientData {
integer clientId,
boolean handshakeSuccessful,
boolean authenticationSuccessful
}
const EPTF_UIHandler_GUIClientData c_EPTF_UIHandler_GUIClientData := {
-1,false,false
}
type record EPTF_UIHandler_ConditionData{
boolean value_
}
type function EPTF_UIHandler_createLayout_FT() runs on self;
type record of EPTF_UIHandler_GUIClientData EPTF_UIHandler_GUIClientDataList;
type record EPTF_Var_DirectContentKey {
EPTF_Var_DirectContent directContent,
charstring key
}
type record of EPTF_Var_DirectContentKey EPTF_UIHandler_simulation_directContentDB;
type record EPTF_UIhandler_Browser_Responder_HostInformation {
charstring hostIPAddress ,
integer hostPort
}
type record of EPTF_UIhandler_Browser_Responder_HostInformation EPTF_UIHandler_Browser_Responder_HostInformationList;
type record EPTF_UIhandler_Browser_Responder_ConnectionInformation {
charstring hostIPAddress ,
integer hostPort,
integer connId,
integer connIdPos
}
type record of EPTF_UIhandler_Browser_Responder_ConnectionInformation EPTF_UIHandler_Browser_Responder_ConnectionInformationList;
type record EPTF_UIhandler_Browser_CustomStyle_Information {
charstring styleFilename,
charstring styleStr
}
type record of EPTF_UIhandler_Browser_CustomStyle_Information EPTF_UIhandler_Browser_CustomStyle_InformationList;
type record of Widgets EPTF_WidgetsList;
type record of EPTF_CharstringList EPTF_CharstringListList;
type record of ttcn_ericsson_se_protocolModules_xtdp_xtdl.Tabpages EPTF_TabpagesList;
type record of UIHandler_ChartDataTypeRingBuffer EPTF_UIHandler_TraceRingBuffers;
///////////////////////////////////////////////////////////
// Type: EPTF_UIHandler_Browser_activeTab
//
// Purpose:
// Structured type for storing active Tabs for BrowserGUI and is there a need to refresh them
//
// Elements:
// *EPTF_UIHandler_WidgetIdString* - widgetId - widgetId
// *boolean* - needToRefresh - tab needs to be refreshed because new widget is added or old one removed
///////////////////////////////////////////////////////////
type record EPTF_UIHandler_Browser_activeTab{
EPTF_UIHandler_WidgetIdString widgetId,
boolean needToRefresh,
integer versionTabRefreshCount
}
///////////////////////////////////////////////////////////
// Type: EPTF_UIHandler_Browser_activeTabs
// Purpose:
// List of <EPTF_UIHandler_Browser_activeTab> records.
///////////////////////////////////////////////////////////
type record EPTF_UIHandler_Browser_activeTabs{
record of EPTF_UIHandler_Browser_activeTab activeTabs,
boolean needToRefreshWholeWindow,
integer versionRefreshCount
}
type record EPTF_UIHandler_initGUIToClient{
integer pl_clientid,
boolean pl_shadowedGui
}
type record of EPTF_UIHandler_initGUIToClient EPTF_UIHandler_initGUIToClientList;
///////////////////////////////////////////////////////////
// Type: EPTF_UIHandler_BrowserGUI_WidgetToVariable
//
// Purpose:
///////////////////////////////////////////////////////////
type record EPTF_UIHandler_BrowserGUI_WidgetToVariable{
EPTF_UIHandler_WidgetIdString widgetId,
integer varId,
boolean readonly
}
type record of EPTF_UIHandler_BrowserGUI_WidgetToVariable EPTF_UIHandler_BrowserGUI_WidgetToVariables;
//the postponed postProc functions database
type record EPTF_UIHandler_postponedPostProc{
integer idx,
EPTF_IntegerList argList
}
type record of EPTF_UIHandler_postponedPostProc EPTF_UIHandler_postponedPostProcDB;
friend type component EPTF_UIHandler_Private_CT extends
EPTF_Var_CT,
EPTF_Logging_CT,
EPTF_TransportIPL4_CT,
EPTF_Semaphore_CT,
EPTF_CLI_Client_CT,
EPTF_CLI_CT,
EPTF_DataSource_CLI_CT,
EPTF_HashMap_CT,
EPTF_DataSourceClient_CT,
EPTF_StatManager_CT
{
public port EPTF_adminPort_PT EPTF_adminPort_CP; //Widget management interface
private var ConnectionId v_UIHandler_pingerConnectionId := -1;
private var integer v_UIHandler_udp_port := -1;
private var boolean v_UIHandler_initialized := false;
private var boolean v_UIHandler_cleanupCalled := false;
private var integer v_UIHandler_lastRequest := 0;
private var boolean v_UIHandler_guiConnected := false;
private var dummy_CT v_UIHandler_address_tmp;
private var charstring v_UIHandler_windowLayout := ""
private var boolean v_UIHandler_guiLayoutReady := false;
private var EPTF_UIHandler_GuiItemRecList v_UIHandler_guiItemList := {};
private var EPTF_IntegerList v_UIHandler_tracePointers := {};
private var integer v_UIHandler_tracePointerHashMapId; // hashmap to store the trace pointer IDs for the trace widget items
private var integer v_UIHandler_widgetHashMapId; // hashmap to store widget IDs
//var EPTF_RunTimeGuiItemList v_RunTimeGuiItems := {omit, "Window", "vertical", omit, omit, {}};
//timer t_EPTF_guiRefresh;
private timer t_UIHandler_pingtimer := 1.0;
private var integer v_UIHandler_succpingcounter := 0;
private var integer v_UIHandler_pingcounter := 0;
private var integer v_UIHandler_prevpingcounter := 0;
private var default v_UIHandler_def := null;//, v_EPTF_GUIHandler_def;
private var float v_handshakeMaxTime := 1.0;
private var float v_authMaxTime := 1.0;
private var float v_byeMaxTime := 1.0;
private var integer v_UIHandler_byeTimer := -1;
private var charstring v_handshakeErrorMsg := "";
//var float v_GuiRefreshRate := tsp_EPTF_initalGuiRefreshRate;
private var EPTF_UIHandler_OpenSubscriptions v_UIHandler_openSubscriptions;
private var EPTF_IntegerListList v_UIHandler_subscriptions := {}; // indices pointing to v_UIHandler_openSubscriptions by variables if the variable has subscriptions
private var integer v_UIHandler_subscriptionHashMapId; // hashmap to store (widget IDs -> subscription index) associations
private var integer v_UIHandler_subscriptionHashMapIdVar; // hashmap to store (client var name -> subscription index) associations
private var integer v_UIHandler_windowIndex;
private var EPTF_UIHandler_GUIClientDataList v_UIHandler_GUIClientId := {};
private var integer v_UIHandler_lastRowId := 0;
private var boolean v_UIHandler_subscriptInProcess := false;
private timer t_UIHandler_bufferedXTDP := 0.0;
private var boolean v_UIHandler_RequestbufferIsEmpty := true;
private var ASP_XSD_XTDP v_UIHandler_Requestbuffer;
private var charstring v_UIHandler_GUI_Host := c_EPTF_UIHandler_Invalid_GUI_Host;
private var integer v_UIHandler_GUI_Port := c_EPTF_UIHandler_Invalid_GUI_Port;
private var ttcn_ericsson_se_protocolModules_xtdp_xtdp.XTDP_Message v_UIHandler_receivedMessage;
private var integer v_UIHandler_xtdpReceivedMessageSemaphore_r; // semaphore for handling one v_UIHandler_receivedMessage at the same time (thread-safe)
private var integer v_UIHandler_layoutResponseReceivedSemaphore;
private var integer v_UIHandler_exitButtonPressedSemaphore;
// logging
private var integer v_UIHandler_loggingMaskId := c_EPTF_Logging_invalidMaskId;
//CLI
//private var boolean v_UIHandlerCLIClient_initialized := false;
private var boolean v_UIHandler_CLI_clientConnected := true; // handled by CLI
private var boolean v_UIHandler_CLI_displayConnected := true; // handled by CLI: TODO: ask CLI if connected
private var integer v_UIHandler_CLI_vars2Display := -1;
private timer t_UIHandler_CLI_refresh;
private var default v_UIHandler_CLI_def := null;
// logging
private var integer v_UIHandler_CLI_loggingMaskId := c_EPTF_Logging_invalidMaskId;
//private var EPTF_CharstringArray2D v_iteratorsActive := {{},{}};
//private var integer v_iteratorsActiveLast := -1;
// GUI CONFIG:
private var EPTF_UIHandler_Config_ConnectVarToWidgets v_EPTF_UIHandler_Config_ConnectVarToWidgets := {};
private var integer v_EPTF_UIHandler_generatedIdCounter := 0;
private var integer v_EPTF_UIHandler_generatedNotVisibleIdCounter := 0;
private var EPTF_UIHandler_createLayout_FT v_EPTF_UIHandler_createLayoutCallback := null;
private var boolean v_UIHandler_emptyGUI := false;
private var boolean v_UIHandler_customGUIProcess := false;
//TODO sjz rename these 3 variables
private var EPTF_IntegerList v_UIHandler_widgetIdxList := {};
private var integer v_UIHandler_actualParentIdx := -1;
private var boolean v_UIHandler_actualParentIdxIsFilled := false;
//variables to simulator mode to GUI viewer
private var boolean v_EPTF_UIHandler_simulatonMode := false;
private var charstring v_EPTF_UIHandler_simulation_buildDB_file := "";
private var integer v_UIHandler_simulation_varsHashMapId; //hashmap to strore ( var name --> idx at simu)associations
private var EPTF_UIHandler_simulation_directContentDB v_UIHandler_simulation_directContentDB;
//Browser GUI
private var default v_UIHandler_Browser_defAltStep := null;
private port IPL4asp_PT v_IPL4_PCO;
private var EPTF_IntegerList v_connIds := {};
private var integer v_intNoWarn := -1;
private var integer v_tabsNb := 0;
private var EPTF_OctetstringList v_EPTF_UIHandler_Browser_chunk := {};
private var integer v_EPTF_UIHandler_Browser_chunk_FromConnId_Hash := -1;
private var integer v_EPTF_UIHandler_Browser_chunk_FromConnId_Queue := -1;
private var boolean v_UIHandler_progressEnabled := true;
private var charstring v_EPTF_UIHandler_Browser_activateWidgetIds := "";
private var boolean v_EPTF_UIHandler_Browser_enableWelcomeScreen := false;
private var charstring v_EPTF_UIHandler_Browser_errorMsg := "
<html>
<div>
<p>
Sorry, the requested file - <b>" & c_missingFileName & "</b> - not found.
Be sure, your module parameter: <b>$tsp_EPTF_UIHandler_Browser_directory</b> were set correctly and it contains the file.<br/>
Plese set it, restart the application and click <a href=\".\">here<a>.
</p>
</div>
</html>";
private var EPTF_UIHandler_Browser_activeTabs v_EPTF_UIHandler_Browser_activeTabs := {{},false, 1};
private var integer v_EPTF_UIHandler_Browser_activeTabs_Hash := -1;
private var integer v_EPTF_UIHandler_Browser_activeTabs_Queue := -1;
private var EPTF_UIHandler_Browser_Responder_ConnectionInformationList v_EPTF_Browser_remoteHosts := {};
private var EPTF_UIhandler_Browser_CustomStyle_InformationList v_EPTF_Browser_customStyleDescriptor := {};
private var charstring v_EPTF_Browser_customStyleCache := "";
private var charstring v_EPTF_UIHandler_Browser_directory := "";
private var charstring v_EPTF_UIHandler_WidgetFunctions_XTDP_XSD_filepath := "";
//Variables for chart history
private var EPTF_UIHandler_TraceRingBuffers v_EPTF_UIHandler_TraceRingBuffers:={};
private var integer v_EPTF_UIHandler_Traces_HashmapId:=-1;
private var boolean v_UIHandler_initToGUIClient := false;
private var boolean v_UIHandler_createGUIRunning := false;
private timer t_UIHandler_initGUIToClientTimer := 0.0;
private var EPTF_UIHandler_initGUIToClientList v_UIHandler_initGUIToClientList := {};
private var EPTF_UIHandler_BrowserGUI_WidgetToVariables v_EPTF_UIHandler_BrowserGUI_WidgetToVariables := {};
private var boolean v_EPTF_UIHandler_headlessmode;
private var boolean v_EPTF_UIHandler_servermode;
private var charstring v_EPTF_UIHandler_Authresp;
//Dynamic iterator change
private var EPTF_UIHandler_GUI_DescriptionDB v_UIHandler_GUI_DescriptionDB := {};
private var integer v_UIHandler_GUI_DescriptionDB_Idx := -1;
private var integer v_UIHandler_nofRunning_processExternalData_handlers := 0; // used to wait for all f_EPTF_UIHandler_Config_processExternalData_handler functions to finish
private var EPTF_IntegerList v_UIHandler_GUIFunctions_nofRunning_processExternalData_handlers := {}; // used to wait for all EPTF_CLL_UIHandler_GUIFunctions.cc[expand_current_node] functions to finish
private var EPTF_UIHandler_postponedPostProcDB v_UIHandler_postponedPostProcDB := {};
}
type component dummy_CT{
}
///////////////////////////////////////////////////////////
// Constant: c_EPTF_UIHandler_widgetIdPrefix
//
// Purpose:
// prefix for a generated random widget ID
//
// Detailed comments:
// UIHandler has to identify widgets with ID to make it
// possible to join them to variables. Users want to set
// this ID only if they want to write user code which uses
// the widget, not its associated data. Usually they
// do not care the widget ID. This case UIHandler generates
// an ID for that widgets. These IDs have this prefix, and
// continue with an integer from a counter.
// Do not use this prefix in your GUI description directly!
///////////////////////////////////////////////////////////
const charstring c_EPTF_UIHandler_widgetIdPrefix := "UIHandler_widgetId_";
///////////////////////////////////////////////////////////
// Constant: c_EPTF_UIHandler_notVisibleWidgetIdPrefix
//
// Purpose:
// The not visible counterpart of c_EPTF_UIHandler_widgetIdPrefix
//
// Detailed comments:
// -
///////////////////////////////////////////////////////////
const charstring c_EPTF_UIHandler_notVisibleWidgetIdPrefix := "UIHandler_notVisisbleWidgetId_";
///////////////////////////////////////////////////////////
// Constant: c_EPTF_UIHandler_tracePointerHashMapName
//
// Purpose:
// name of hasmap for storing trace pointer IDs
///////////////////////////////////////////////////////////
const charstring c_EPTF_UIHandler_tracePointerHashMapName := "UIHandler_tracePointerHashMap";
///////////////////////////////////////////////////////////
// Constant: c_EPTF_UIHandler_widgetIdHashMapName
//
// Purpose:
// name of hasmap for storing widget IDs
///////////////////////////////////////////////////////////
const charstring c_EPTF_UIHandler_widgetIdHashMapName := "UIHandler_widgetIdHashMap";
///////////////////////////////////////////////////////////
// Constant: c_EPTF_UIHandler_subscriptionHashMapName
//
// Purpose:
// name of hasmap for searching subscriptions on ground of widget IDs
///////////////////////////////////////////////////////////
const charstring c_EPTF_UIHandler_subscriptionHashMapName := "UIHandler_subscriptionHashMap";
///////////////////////////////////////////////////////////
// Constant: c_EPTF_UIHandler_simulation_varsHashMapName
//
// Purpose:
// name of hasmap for storing the variable names for simulation
///////////////////////////////////////////////////////////
const charstring c_EPTF_UIHandler_simulation_varsHashMapName := "UIHandler_simulation_varsHashMapName";
///////////////////////////////////////////////////////////
// Constant: c_EPTF_UIHandler_subscriptionHashMapNameVar
//
// Purpose:
// name of hasmap for searching subscriptions on ground of variable names
///////////////////////////////////////////////////////////
const charstring c_EPTF_UIHandler_subscriptionHashMapNameVar := "UIHandler_subscriptionHashMap_Var";
///////////////////////////////////////////////////////////
// Constant: c_EPTF_UIHandler_pingerTransport
//
// Purpose:
// name of pinger transport
///////////////////////////////////////////////////////////
const charstring c_EPTF_UIHandler_pingerTransport := "UIHandler_pingerTransport";
///////////////////////////////////////////////////////////
// Constant: c_EPTF_UIHandler_loggingEventClasses
//
// Purpose:
// list of logging event class names used on the UIHandler
//
// Detailed Comments:
// <EPTF_Logging_EventClassPrefixList> { "Warning", "Debug" }
///////////////////////////////////////////////////////////
const EPTF_Logging_EventClassPrefixList c_EPTF_UIHandler_loggingEventClasses := { "Warning", "Debug" };
///////////////////////////////////////////////////////////
// Constant: c_EPTF_UIHandler_loggingClassIdx_Warning
//
// Purpose:
// logging class index for Error
//
// Detailed Comments:
// *0*
///////////////////////////////////////////////////////////
const integer c_EPTF_UIHandler_loggingClassIdx_Warning := 0;
///////////////////////////////////////////////////////////
// Constant: c_EPTF_UIHandler_loggingClassIdx_Debug
//
// Purpose:
// logging class index for Error
//
// Detailed Comments:
// *1*
///////////////////////////////////////////////////////////
const integer c_EPTF_UIHandler_loggingClassIdx_Debug := 1;
///////////////////////////////////////////////////////////
// Constant: c_EPTF_UIHandler_XTDPType
//
//Purpose:
// Name constant
//
///////////////////////////////////////////////////////////
const charstring c_EPTF_UIHandler_XTDPType := "UIHandler_XTDP";
///////////////////////////////////////////////////////////
// Constant: c_EPTF_UIHandler_Invalid_GUI_Host
//
//Purpose:
// Invalid GUI host name
//
///////////////////////////////////////////////////////////
const charstring c_EPTF_UIHandler_Invalid_GUI_Host := "";
///////////////////////////////////////////////////////////
// Constant: c_EPTF_UIHandler_Invalid_GUI_Port
//
//Purpose:
// Invalid GUI port number
//
///////////////////////////////////////////////////////////
const integer c_EPTF_UIHandler_Invalid_GUI_Port := -1;
///////////////////////////////////////////////////////////
// Type: EPTF_UIHandler_Config_ConnectVarToWidget
//
// Purpose:
// Structured type for storing subscriptions used by <f_EPTF_UIHandler_Config_connectAllVarsToWidget>
//
// Elements:
// *EPTF_Var_CT* - provider - The component that has sent the <EPTF_CLL_UISubscribeMeNote> message.
// *charstring* - providedParamName - The name of the variable in the provider.
// *integer* - varIdx - The index of the created variable.
// *EPTF_UIHandler_WidgetIdString* - widgetId - If there is a connected widget, it contains the ID of it.
// <EPTF_Var_DirectContent> - initialValue - the initial value of the variable varIdx
///////////////////////////////////////////////////////////
type record EPTF_UIHandler_Config_ConnectVarToWidget{
EPTF_Var_CT provider,
charstring providedParamName,
integer varIdx,
EPTF_UIHandler_WidgetIdString widgetId,
EPTF_Var_DirectContent initialValue
}
///////////////////////////////////////////////////////////
// Type: EPTF_UIHandler_Config_ConnectVarToWidgets
// Purpose:
// List of <EPTF_UIHandler_Config_ConnectVarToWidget> records.
///////////////////////////////////////////////////////////
type record of EPTF_UIHandler_Config_ConnectVarToWidget EPTF_UIHandler_Config_ConnectVarToWidgets;
///////////////////////////////////////////////////////////
// Const: c_EPTF_UIHandler_Config_ConnectVarToWidget_init
// Purpose:
// An empty <EPTF_UIHandler_Config_ConnectVarToWidget> record.
///////////////////////////////////////////////////////////
const EPTF_UIHandler_Config_ConnectVarToWidget c_EPTF_UIHandler_Config_ConnectVarToWidget_init := {
provider:=null,
providedParamName := "",
varIdx := -1,
widgetId := ""
};
///////////////////////////////////////////////////////////
// Constant: c_EPTF_UIHandler_simulation_saveDBToFile
//
// Purpose:
// the name of the button to save DB to file
///////////////////////////////////////////////////////////
const charstring c_EPTF_UIHandler_simulation_saveDBToFile := "UIHandler_simulation_saveDBToFile";
///////////////////////////////////////////////////////////
// Type: EPTF_WidgetValuePair
// Purpose:
// WidgetId-Value pairs
///////////////////////////////////////////////////////////
type record EPTF_WidgetValuePair {
charstring widgetID,
charstring widgetVal
}
///////////////////////////////////////////////////////////
// Type: EPTF_WidgetValuePairs
// Purpose:
// List of <EPTF_WidgetValuePair> records.
///////////////////////////////////////////////////////////
type record of EPTF_WidgetValuePair EPTF_WidgetValuePairs;
const charstring c_EPTF_UIHandler_Browser_chunk_FromConnId_HashMapName := "EPTF_UIHandler_Browser_chunk_FromConnId_HashMapName"
const integer c_UIHandler_Browser_invalidIdx := -1;
const charstring c_EPTF_UIHandler_Browser_activeTabs_HashMapName := "EPTF_UIHandler_Browser_activeTabs_HashMapName"
//Dynamic iterator change
type record of EPTF_UIHandler_GUI_DescriptionDB_Item EPTF_UIHandler_GUI_DescriptionDB;
type record EPTF_UIHandler_GUI_DescriptionDB_Item {
charstring parentWidgetId,
charstring xml_widgets
}
const EPTF_UIHandler_GUI_DescriptionDB_Item c_UIHandler_GUI_DescriptionDB_Item := {
"",
""
}
type union EPTF_UIHandler_IteratorUnion {
Iterator iterator,
Tabpageiterator tabpageiterator,
Treecoliterator treecoliterator,
Treeitemiterator treeitemiterator,
Treerowiterator treerowiterator,
Treecelliterator treecelliterator,
Traceiterator traceiterator,
Listitemiterator listitemiterator,
Menuitemiterator menuitemiterator,
Externaldataiterator externaldataiterator
}
type enumerated EPTF_UIHandler_IteratorUnionType {
iterator,
tabpageiterator,
treecoliterator,
treeitemiterator,
treerowiterator,
treecelliterator,
traceiterator,
listitemiterator,
menuitemiterator,
externaldataiterator,
valuelistiterator
}
type record EPTF_UIHandler_GUI_ITValuesDBItem {
charstring iteratorID, // the ID of the iterator
charstring iteratorValue, // the value of the iteratorIdx-th element of the iterator
integer iteratorIdx, // the idx of the current element inside the iterator values
integer iteratorCount, // nof elements in the iterator
charstring iteratorRef // the name of the iterator
}
type record of EPTF_UIHandler_GUI_ITValuesDBItem EPTF_UIHandler_GUI_ITValuesDB;
} // end of module