fwGeneral  8.4.0
fwGeneral.ctl File Reference
global const dyn_int g_fwGeneral_dynDpeTypes
 constants representing dynamic dpe types More...
 
void fwGeneral_commandConfirmation (string dpe, string command, bool &confirmation, dyn_string &exceptionInfo)
 
time fwGeneral_dateTimeWidget_getEndDateTime (bool &bOk, dyn_string &dsException)
 
time fwGeneral_dateTimeWidget_getStartDateTime (bool &bOk, dyn_string &dsException)
 
string fwGeneral_dateTimeWidget_getTimeZone ()
 
bool fwGeneral_dateTimeWidget_positivePeriodSelected (dyn_string &dsException)
 
void fwGeneral_dateTimeWidget_setEnabled (bool bState)
 
public bool fwGeneral_dateTimeWidget_isEnabled ()
 
void fwGeneral_dateTimeWidget_setEndDateTime (time tDateTime)
 
void fwGeneral_dateTimeWidget_setStartDateTime (time tDateTime)
 
void fwGeneral_dateTimeWidget_setTimeZone (string sTimeZone)
 
void fwGeneral_dateTimeWidget_setVisible (bool bState)
 
void fwGeneral_DpTypeSelector (dyn_string &selectedDpTypes, dyn_string disabledDpTypes, dyn_string &exceptionInfo, bool selectMultiple=FALSE, string text="")
 
void fwGeneral_dynStringToString (dyn_string theDynString, string &theString, string separator=fwGeneral_DYN_STRING_DEFAULT_SEPARATOR)
 
void fwGeneral_fillDynString (dyn_string &ds, int length, dyn_string &exceptionInfo, string value="")
 
void fwGeneral_getDpElements (string dp, string dpType, dyn_string &dpElements, dyn_string &dpElementTypes, dyn_string &exceptionInfo, dyn_int excludedTypes="", bool forceDpCreation=false)
 
void fwGeneral_getGlobalValue (string globalVariable, anytype &value, dyn_string &exceptionInfo)
 
string fwSysName (string name, bool keepColon=false)
 
string fwNoSysName (string name)
 
void fwGeneral_getNameWithoutSN (string name, string &nameWithoutSN, dyn_string &exceptionInfo)
 
void fwGeneral_getSystemIpAddress (string systemName, string &ipAddress, string &hostName, dyn_string &exceptionInfo)
 
void fwGeneral_getSystemName (string name, string &systemName, dyn_string &exceptionInfo)
 
bool fwGeneral_hasCorrectDateFormat (string sDate)
 
bool fwGeneral_hasCorrectFormat (string sDateTime)
 
bool fwGeneral_hasCorrectTimeFormat (string sTime)
 
void fwGeneral_isDpeTypeDyn (int type, bool &isDyn, dyn_string &exceptionInfo)
 
void fwGeneral_openDetailsPanel (string dpe, dyn_string &exceptionInfo)
 
void fwGeneral_openMessagePanel (string message, bool &ok, dyn_string &exceptionInfo, string panelBarTitle="", bool onlyInfo=FALSE)
 
void fwGeneral_selectFromList (dyn_string list, dyn_string &selection, dyn_string &exceptionInfo, bool multipleSelection=false, string title="Select fromt the list")
 
void fwGeneral_setGlobalValue (string globalVariable, anytype value, dyn_string &exceptionInfo)
 
void fwGeneral_stringToDynString (string theString, dyn_string &theDynString, string separator="|", bool removeSpaces=true, bool compatibilityMode=false)
 
time fwGeneral_stringToDate (string sDateTime)
 
string fwGeneral_recodeFile (string fnameToRecode, dyn_string &exceptionInfo)
 
void fwGeneral_getQueryRDBdirectEnabled (bool &queryRDBdirectEnabled)
 
void fwGeneral_getParallelArchivingEnabled (bool &RDBinstalled, bool &parallelArchivingEnabled)
 
void fwGeneral_setQueryRDBdirectEnabled (bool queryRDBdirectEnabled)
 
string fwGeneral_getFileExtension (string filePath)
 
string fwGeneral_removeFileExtension (string filePath)
 
void fwGeneral_setHelpUseInternalBrowser (bool useInternalBrowser, dyn_string &exceptionInfo)
 
void fwGeneral_getHelpUseInternalBrowser (bool &useInternalBrowser, dyn_string &exceptionInfo)
 
int fwGeneral_setHelpExtBrowserCommand (string browserCmdLin, string browserCmdWin, dyn_string &exceptionInfo)
 
int fwGeneral_getHelpExtBrowserCommand (string &browserCmdLin, string &browserCmdWin, dyn_string &exceptionInfo)
 
private void fwGeneral_openHelpFile (string helpFilePath, dyn_string &exceptionInfo, string label="", string windowName="fwGeneralHelp")
 
void fwGeneral_openInExternalBrowser (string url, dyn_string &exceptionInfo)
 
void fwGeneral_openHelpForPanel (string panelFilePath, dyn_string &exceptionInfo)
 
void fwGeneral_openHelpForComponent (string componentName, dyn_string &exceptionInfo)
 
void FWDEPRECATED ()
 
void _fwGeneral_fwDeprecatedClear ()
 
private void _fwGeneral_displayDeprecatedLabel (int x=0, int y=0)
 
bool fwGeneral_loadCtrlLib (string libRelPath, bool excOnNotFound=true, bool useBeyondInit=false)
 

Detailed Description

Creation Date
24/03/04
Constraints
None
Author
Manuel Gonzalez Berges (IT-CO)

Function Documentation

void fwGeneral_commandConfirmation ( string  dpe,
string  command,
bool &  confirmation,
dyn_string &  exceptionInfo 
)

Opens confirmation dialog panel, and returns result user selection

Constraints
None
Usage
Public
PVSS managers
VISION
Parameters
dpename of the datapoint where the command will be applied
commandshort explanation of the action to be confirmed
confirmationwhether the user confirmed the command or not
exceptionInforeturns details of any errors
time fwGeneral_dateTimeWidget_getEndDateTime ( bool &  bOk,
dyn_string &  dsException 
)

Returns end date and time selected by the user and performs format check.

Constraints
To be used together with date/time widget (fwGeneralDateTimeWidget.pnl). The following UI elements have to be existent:
  • endDateField
  • endTimeField
Usage
Public
PVSS managers
VISION, CTRL
Parameters
bOkOutput - Returns info whether provided times were in correct format or not. In case of wrong format, current time is given back as return value.
dsException- Input/Output: Carrier for exception message to be shown to user
Returns
End date as time value
time fwGeneral_dateTimeWidget_getStartDateTime ( bool &  bOk,
dyn_string &  dsException 
)

Returns start date and time selected by the user and performs format check.

Constraints
To be used together with date/time widget (fwGeneralDateTimeWidget.pnl). The following UI elements have to be existent:
  • startDateField
  • startTimeField
Usage
Public
PVSS managers
VISION, CTRL
Parameters
bOkOutput - Returns info whether provided times were in correct format or not. In case of wrong format, current time is given back as return value.
dsException- Input/Output: Carrier for exception message to be shown to user
Returns
Start date as time value
string fwGeneral_dateTimeWidget_getTimeZone ( )

Returns the time zone used to determine the current time.

Constraints
To be used together with date/time widget (fwGeneralDateTimeWidget.pnl). The following UI elements have to be existent:
  • selectedTimeZone
Usage
Public
PVSS managers
VISION, CTRL
Returns
Time zone as string
bool fwGeneral_dateTimeWidget_positivePeriodSelected ( dyn_string &  dsException)

Checks whether the user has selected a positive time interval in the date/time widget or not.

Constraints
To be used together with date/time widget (fwGeneralDateTimeWidget.pnl). The following UI elements have to be existent:
  • startDateField
  • startTimeField
  • endDateField
  • endTimeField
Usage
Public
PVSS managers
VISION, CTRL
Parameters
dsException- Input/Output: Carrier for exception message to be shown to user
Returns
Boolean value TRUE if positive, FALSE if negative time interval
void fwGeneral_dateTimeWidget_setEnabled ( bool  bState)

Enables or disables the UI elements of the Date Time Widget. !!! Make sure widget is initialised before using this function. !!! (If you want to enable/disable upon initialization, use the provided $-parameter)

Constraints
To be used together with date/time widget (fwGeneralDateTimeWidget.pnl). The following UI elements have to be existent:
  • startNowButton
  • startDateField
  • startTimeField
  • startTimeSpin
  • startDateChooserButton
  • startDateButton
  • endNowButton
  • endDateField
  • endTimeField
  • endTimeSpin
  • endDateChooserButton
  • endDateButton
Usage
Public
PVSS managers
VISION, CTRL
Parameters
bStateInput - boolean: state
public bool fwGeneral_dateTimeWidget_isEnabled ( )

Is the DateTime widget enabled?

Returns
bool
void fwGeneral_dateTimeWidget_setEndDateTime ( time  tDateTime)

Sets the end date and time in the Date Time Widget.

Constraints
To be used together with date/time widget (fwGeneralDateTimeWidget.pnl). The following UI elements have to be existent:
  • endDateField
  • endTimeField
Usage
Public
PVSS managers
VISION, CTRL
Parameters
Input- time: date and time
void fwGeneral_dateTimeWidget_setStartDateTime ( time  tDateTime)

Sets the start date and time in the Date Time Widget.

Constraints
To be used together with date/time widget (fwGeneralDateTimeWidget.pnl). The following UI elements have to be existent:
  • startDateField
  • startTimeField
Usage
Public
PVSS managers
VISION, CTRL
Parameters
Input- time: date and time
void fwGeneral_dateTimeWidget_setTimeZone ( string  sTimeZone)

Sets the time zone used to determine the current time.

Constraints
To be used together with date/time widget (fwGeneralDateTimeWidget.pnl). The following UI elements have to be existent:
  • selectedTimeZone
Usage
Public
PVSS managers
VISION, CTRL
Parameters
Input- string: time zone (e.g. FW_GENERAL_NATURAL_TIME_FORMAT, FW_GENERAL_GENERIC_TIME_FORMAT)
void fwGeneral_dateTimeWidget_setVisible ( bool  bState)

Makes the UI elements of the Date Time Widget visible/invisible while still allowing for the different modes (date and time vs. only date; time zone shown). !!! Make sure the widget is initialised before using this function. !!!

Constraints
To be used together with date/time widget (fwGeneralDateTimeWidget.pnl). The following UI elements have to be existent:
  • startNowButton
  • startDateField
  • startTimeField
  • startTimeSpin
  • startDateChooserButton
  • startDateButton
  • endNowButton
  • endDateField
  • endTimeField
  • endTimeSpin
  • endDateChooserButton
  • endDateButton
  • startTimeLabel
  • endTimeLabel
  • timeZoneLabel
  • selectedTimeZone
  • dateTimeSeparator
  • dateAndTimeShownField
  • timeZoneShownField
Usage
Public
PVSS managers
VISION, CTRL
Parameters
bStateInput - boolean: state
void fwGeneral_DpTypeSelector ( dyn_string &  selectedDpTypes,
dyn_string  disabledDpTypes,
dyn_string &  exceptionInfo,
bool  selectMultiple = FALSE,
string  text = "" 
)

Opens the datapoint type selector panel and return the user selection

Constraints
None
Usage
Public
PVSS maangers
VISION
Parameters
selectedDpTypesreturns the list of selected DP Types (one or multiple, depending on selectMultiple parameter. If specified as input it can contain the pre-defined selection.
disabledDpTypeslist of DP Types that are disabled in the selection list. Specifying empty list means that all items are selectable
exceptionInforeturns details of any errors
selectMultipledetermines if the selection list allows for multiple selection, or single selection only.
textpanel title. If an empty string is specified, then "Select Datapoint Types" will be used.
void fwGeneral_dynStringToString ( dyn_string  theDynString,
string &  theString,
string  separator = fwGeneral_DYN_STRING_DEFAULT_SEPARATOR 
)

Converts a dyn_string to a string with the chosen separator.

Constraints
None
Usage
Public
PVSS managers
VISION, CTRL
Parameters
theDynStringdyn_string to be converted
theStringresult of the conversion
separatorseparator used for splitting. The default value should be fwGeneral_DYN_STRING_DEFAULT_SEPARATOR, but PVSS doesn't allow constants in default arguments
void fwGeneral_fillDynString ( dyn_string &  ds,
int  length,
dyn_string &  exceptionInfo,
string  value = "" 
)

Extend a dynamic string to the specified length. Initialise the newly added entries (strings) with the initial value given (null by default). If the initial length of the dynamic string is already longer than (or equal to) the requested length, then we leave the original dynamic string unchanged.

Constraints
None
Usage
Public
PVSS managers
VISION, CTRL
Parameters
dsthe dynamic string to be modified
lengthminimum length required for the dynamic string
exceptionInforeturns details of any exceptions
valuevalue to be used to fill in the array
void fwGeneral_getDpElements ( string  dp,
string  dpType,
dyn_string &  dpElements,
dyn_string &  dpElementTypes,
dyn_string &  exceptionInfo,
dyn_int  excludedTypes = "",
bool  forceDpCreation = false 
)

Returns a list with the dpes in a dp or a dp type. The method used is a workaround, because the function dpTypeGet doesn't return the dpes when there is a reference to another type.

Constraints
If a dp type is specified , at least one datapoint of the type has to exist
Usage
Public
PVSS managers
VISION, CTRL
Parameters
dpdatapoint to get the elements from
dpTypedp type to get the elements from if no datapoint was specified (dp = "")
dpElementsreturns the list of dp elements sorted into alphabetical order. NB Their name(s) begin with "." !
dpElementTypesreturns the list of types of corresponding to the list of dp elements
exceptionInforeturns details of any exceptions
excludedTypesexcluded dp elements of these types from the list
forceDpCreationif there are no dps of the specified type, it is possible to force the creation of a dummy dp to be able to get the structure
void fwGeneral_getGlobalValue ( string  globalVariable,
anytype &  value,
dyn_string &  exceptionInfo 
)

Returns the value of a global variable

Constraints
None
Usage
Public
PVSS managers
VISION, CTRL
Parameters
globalVariablename of the global variable to get the value from
valuereturns the value of the global variable
exceptionInfodetails of any exceptions
string fwSysName ( string  name,
bool  keepColon = false 
)

Returns the system name extracted from the passed string

The function parses the passed name parameter in search of the first colon (:) character, and returns the substring prior to it. Typical use case is to get the name of the system from the name of a datapoint.

Contrary to builtin dpSubStr(), the function may be called for any string, not necessarily being the name of an existing datapoint. It is safe to use with UTF strings.

See also fwGeneral_getSystemName

Parameters
namestring from which the system name is to be extracted;
keepColon(optional) determines if returned system name should contain the colon character (default: no).
string fwNoSysName ( string  name)

Returns a string with system name removed

The function parses the passed name parameter in search of the first colon (:) character, and returns the substring after it. Typical use case is to cut the system name part from the datapoint name.

Contrary to builtin dpSubStr(), the function may be called for any string, not necessarily being the name of an existing datapoint, It is safe to use with UTF strings.

See also fwGeneral_getNameWithoutSN

Parameters
namestring from which the system name is to be extracted;
keepColon(optional) determines if returned system name should contain the colon character (default: no).
void fwGeneral_getNameWithoutSN ( string  name,
string &  nameWithoutSN,
dyn_string &  exceptionInfo 
)

Removes the system name from the passed name.

See also

See Also
fwNoSysName
Reviewed:
2019-08-19
Parameters
namename to be processed
nameWithoutSNon return will contant name with system name removed
exceptionInfonot used (compatibility)
void fwGeneral_getSystemIpAddress ( string  systemName,
string &  ipAddress,
string &  hostName,
dyn_string &  exceptionInfo 
)

Returns ipAddress and hostName where the PVSS system with name systemName is running.

Constraints
Local system not supported. The remote system has to be connected at the time the function is called.
Usage
Public
PVSS managers
VISION, CTRL
Parameters
systemNamename of the system we are interested in
ipAddressip address of the machine where the PVSS system is running
hostNamehost name of the machine where the PVSS system is running
exceptionInforeturns details of any exceptions
void fwGeneral_getSystemName ( string  name,
string &  systemName,
dyn_string &  exceptionInfo 
)

Gets the system name from the passed name.

See also

See Also
fwSysName

Note that this function returns the system name with the colon character at the end. Use the fwSysName function with the keepColon=true parameter to get the name without.

Reviewed:
2019-08-19
Parameters
namename to be processed (e.g. "dist_1:CAEN/crate01/board03/channel005")
systemNameon return will contain system name extracted from the name parameter; in example above it would yeild "dist_1:"
exceptionInfonot used (compatibility)
bool fwGeneral_hasCorrectDateFormat ( string  sDate)

Checks the format of a provided date. Checks for following format: dd/mm/yyyy

Constraints
None
Usage
Public
PVSS managers
VISION, CTRL
Parameters
Input- string: date at question
Returns
Boolean value indicating result of check
bool fwGeneral_hasCorrectFormat ( string  sDateTime)

Checks the format of a provided date and time. Checks for following format: dd/mm/yyyy hh:mm:ss

Constraints
None
Usage
Public
PVSS managers
VISION, CTRL
Parameters
Input- string: date and time at question
Returns
Boolean value indicating result of check
bool fwGeneral_hasCorrectTimeFormat ( string  sTime)

Checks the format of a provided time. Checks for following format: hh:mm:ss

Constraints
None
Usage
Public
PVSS managers
VISION, CTRL
Parameters
Input- string: time at question
Returns
Boolean value indicating result of check
void fwGeneral_isDpeTypeDyn ( int  type,
bool &  isDyn,
dyn_string &  exceptionInfo 
)

Returns whether the dpe type is dyn or not

Constraints
None
Usage
Public
PVSS managers
VISION, CTRL
Parameters
typeinteger number for dpe type
isDynwhether the dpetype is dyn or not
exceptionInfodetails of any exceptions
void fwGeneral_openDetailsPanel ( string  dpe,
dyn_string &  exceptionInfo 
)

Opens the details panel for a given datapoint element

Constraints
None
Usage
Public
PVSS managers
VISION
Parameters
dpedatapoint element to get the details from
exceptionInfodetails of any exceptions
void fwGeneral_openMessagePanel ( string  message,
bool &  ok,
dyn_string &  exceptionInfo,
string  panelBarTitle = "",
bool  onlyInfo = FALSE 
)

Opens a message panel with the specified message. If it is used as a dialog (onlyInfo = FALSE) it will return whether the user pressed Ok or not. If it is used as information panel it will just display the panel and wait for the user to press Ok.

Constraints
None
Usage
Public

PVSS manager usage VISION

Parameters
messagethe message to be presented in the panel
okreturns TRUE if the user pressed the Ok button, FALSE otherwise
exceptionInfodetails of any exceptions
panelBarTitletitle for the panel WARNING: deprecated from PVSS 3.6 and higher
onlyInfowhether the panel is just for information, or it will also ask for user input
void fwGeneral_selectFromList ( dyn_string  list,
dyn_string &  selection,
dyn_string &  exceptionInfo,
bool  multipleSelection = false,
string  title = "Select fromt the list" 
)

Opens a panel to select one or several of the items in a list

Constraints
None
Usage
Public
PVSS managers
VISION, CTRL
Parameters
listlist of strings to select from
selectionreturns the selected items
exceptionInfodetails of any exceptions
multipleSelectionwhether it is possible to select more than one item or not
titletitle of the pop-up window with the dialog box
void fwGeneral_setGlobalValue ( string  globalVariable,
anytype  value,
dyn_string &  exceptionInfo 
)

Sets the value of a global variable

Constraints
None
Usage
Public
PVSS managers
VISION, CTRL
Parameters
globalVariablename of the global variable to set the value to
valuethe value to be set to the global variable
exceptionInfodetails of any exceptions
void fwGeneral_stringToDynString ( string  theString,
dyn_string &  theDynString,
string  separator = "|",
bool  removeSpaces = true,
bool  compatibilityMode = false 
)

Converts a string to a dyn_string with the chosen separator.

Constraints
None
Usage
Public
PVSS managers
VISION, CTRL
Parameters
theStringstring to be split
theDynStringresult of splitting
separatorseparator used for splitting. The default value should be fwGeneral_DYN_STRING_DEFAULT_SEPARATOR, but PVSS doesn't allow constants in default arguments
removeSpaceswhether to remove spaces in the string before parsing it or not
compatibilityModeuseful to parse strings that are the result of the automatic conversion by PVSS of a dyn_string to a string. In this case, the parts are separated by " | " (space-tube-space). If you want to get the original dyn_string, set this parameter to TRUE.
time fwGeneral_stringToDate ( string  sDateTime)

Converts previously checked time string into time value.

Constraints
None
Usage
Public
WinCC managers
VISION, CTRL
Parameters
Input- string: date and time to be checked
Returns
Time value of string including milliseconds (1970.01.01 00:00:00 in case of bad format)
string fwGeneral_recodeFile ( string  fnameToRecode,
dyn_string &  exceptionInfo 
)

Gets an ISO-8859-1 encoded text file and returns the path of a new text file in UTF-8 encoding.

Constraints
None
Usage
Public
PVSS managers
VISION, CTRL
Parameters
fnameToRecode,string,filename+pathwhich needs to be encoded
Returns
string path+filename of the encoded file.
void fwGeneral_getQueryRDBdirectEnabled ( bool &  queryRDBdirectEnabled)

Gets status of QueryRDBdirect (on, off)

Constraints
None
Usage
Public
PVSS managers
VISION, CTRL
Parameters
queryRDBdirectEnabled,bool,out,queryRDBdirecttrue=on false=off
void fwGeneral_getParallelArchivingEnabled ( bool &  RDBinstalled,
bool &  parallelArchivingEnabled 
)

Gets status of Parallel archiving (RDB installed + parallel on-off)

Constraints
None
Usage
Public
PVSS managers
VISION, CTRL
Parameters
RDBinstalled,bool,out,RDBis installed; true=installed
parallelArchivingEnabled,bool,out,parallelArchiving Enabled; true=on false=off
void fwGeneral_setQueryRDBdirectEnabled ( bool  queryRDBdirectEnabled)

set the status of QueryRDBdirect (on, off)

Constraints
None
Usage
Public
PVSS managers
VISION, CTRL
Parameters
queryRDBdirectEnabled,bool,in,queryRDBdirecttrue=on false=off
string fwGeneral_getFileExtension ( string  filePath)

Returns file extension of given file.

Constraints
None
Usage
Public
PVSS managers
VISION, CTRL
Parameters
filePath,string(in) Path to a file, may be absoulte or relative. File name is accepted also
Returns
string File extension, empty string if file doesn't have extension
string fwGeneral_removeFileExtension ( string  filePath)

Returns file path without file extension.

Constraints
None
Usage
Public
PVSS managers
VISION, CTRL
Parameters
filePath,string(in) Path to a file, may be absoulte or relative. File name is accepted also
Returns
string File path without file extension, if file doesn't have extension then returned string is same as input parameter
void fwGeneral_setHelpUseInternalBrowser ( bool  useInternalBrowser,
dyn_string &  exceptionInfo 
)

Sets in configuration datapoint if internal browser should be used to open help files.

Constraints
None
Usage
Public
PVSS managers
VISION, CTRL
Parameters
useInternalBrowser,bool(in) Flag indicating if internal browser should be used to open help files.
exceptionInfo,dyn_string(in/out) Details of any exceptions
void fwGeneral_getHelpUseInternalBrowser ( bool &  useInternalBrowser,
dyn_string &  exceptionInfo 
)

Retrieves from configuration datapoint if internal built-in browser should be used to open help files.

Constraints
None
Usage
Public
PVSS managers
VISION, CTRL
Parameters
useInternalBrowser,bool(out) Flag indicating if internal browser should be used to open help files.
exceptionInfo,dyn_string(in/out) Details of any exceptions
int fwGeneral_setHelpExtBrowserCommand ( string  browserCmdLin,
string  browserCmdWin,
dyn_string &  exceptionInfo 
)

Sets in configuration datapoint commands used to open external browser on Linux and Windows.

Note
Command should contain "$1" keyword that will be replaced by the URL to open.
Constraints
None
Usage
Public
PVSS managers
VISION, CTRL
Parameters
browserCmdLin,string(in) Command to open external browser on Linux operating systems.
browserCmdWin,string(in) Command to open external browser on Windows operating systems.
exceptionInfo,dyn_string(in/out) Details of any exceptions
int fwGeneral_getHelpExtBrowserCommand ( string &  browserCmdLin,
string &  browserCmdWin,
dyn_string &  exceptionInfo 
)

Retrieves from configuration datapoint commands used to open external browser on Linux and Windows.

Constraints
None
Usage
Public
PVSS managers
VISION, CTRL
Parameters
browserCmdLin,string(out) Command to open external browser on Linux operating systems.
browserCmdWin,string(out) Command to open external browser on Windows operating systems.
exceptionInfo,dyn_string(in/out) Details of any exceptions
private void fwGeneral_openHelpFile ( string  helpFilePath,
dyn_string &  exceptionInfo,
string  label = "",
string  windowName = "fwGeneralHelp" 
)

Opens given help file in defined help file's browser.

Constraints
None
Usage
Private
PVSS managers
VISION, CTRL
Parameters
helpFilePath,string(in) Path to the help file.
exceptionInfo,dyn_string(in/out) Details of any exceptions
label,string(in, optional) The label of the tab in fwViewer.
windowName,string(in, optional) The name of the window in fwViewer (groups tabs together).
void fwGeneral_openInExternalBrowser ( string  url,
dyn_string &  exceptionInfo 
)

Opens given URL in external browser.

Constraints
None
Usage
Public
PVSS managers
VISION, CTRL
Parameters
url,string(in) Address to open in external browser
exceptionInfo,dyn_string(in/out) Details of any exceptions
void fwGeneral_openHelpForPanel ( string  panelFilePath,
dyn_string &  exceptionInfo 
)

Opens help file of a given panel file.

Constraints
None
Usage
Public
PVSS managers
VISION
Parameters
panelFilePath,string(in) Relative path to a panel file (from panels/ directory)
exceptionInfo,dyn_string(in/out) Details of any exceptions
void fwGeneral_openHelpForComponent ( string  componentName,
dyn_string &  exceptionInfo 
)

Opens help file of a given component.

Constraints
None
Usage
Public
PVSS managers
VISION, CTRL
Parameters
componentName,string(in) Name of a component, note that underscore should be removed from the beggining of a subcomponent name if necessary, before passing it to the function.
exceptionInfo,dyn_string(in/out) Details of any exceptions
void FWDEPRECATED ( )

Marks a function or a panel as deprecated (reports and records the incident)

void _fwGeneral_fwDeprecatedClear ( )
private

Clears the log of deprecated function calls

used internally by the fwGeneral/fwDeprecatedList.pnl

private void _fwGeneral_displayDeprecatedLabel ( int  x = 0,
int  y = 0 
)

Displays flashing "Deprecated" label at a certain position for a couple of seconds

The function is to be used through startThread() so that it does not block critical setion that may need to be locked.

The x and y param make particular sense for reference panels; they need to be passed from the parent object, otherwise it would not work...

bool fwGeneral_loadCtrlLib ( string  libRelPath,
bool  excOnNotFound = true,
bool  useBeyondInit = false 
)

Load a CTRL library at runtime

Dynamically loads a CTRL library into the running UI or CTRL Manager. Allows for conditional loading of functionality (ie. if library exists). As it uses the startScript(), it could be automatically executed on the library loading (see example below)

libRelPath : the path and file name of the library relative to the scripts/libs
excOnNotFound : (optional) if set to true, the function will raise an exception if the library
is not found
useBeyondInt : (optional) if set to true, the function may be called not only from the
lib global initialization, but from any other place; see the warning below.
Returns
true if library was loaded succesfully
Exceptions
ifexcOnNotFound set to true, exception raised if library was not found
ifproblem occurs with the library while loading
ifcalled not from the lib global initialization without setting the useBeyondInit param
Warning
Due to current limitations in WinCC OA (ETM-1752, ETM-1753 issues), calling this function from another function, and not from the library global init script (ie. as in example below) may result in lib-scope variables not being visible, and possibly other side effects. The optional param useBeyondInit should be set to true to force the attempt anyway (and avoid the exception)
Remarks
If debug flag "fwGeneral_loadCtrlLib" is set, then information is printed to the log for every library load.

Example: library A.ctl that conditionally loads B.ctl if it exists

{A.ctl}
* private const bool Alib_init = fwGeneral_loadCtrlLib("B.ctl",false);
*

Variable Documentation

global const dyn_int g_fwGeneral_dynDpeTypes
Initial value:
= makeDynInt( DPEL_DYN_BIT32,
DPEL_DYN_BIT64,
DPEL_DYN_BLOB,
DPEL_DYN_BOOL,
DPEL_DYN_CHAR,
DPEL_DYN_DPID,
DPEL_DYN_FLOAT,
DPEL_DYN_INT,
DPEL_DYN_LANGSTRING,
DPEL_DYN_LONG,
DPEL_DYN_STRING,
DPEL_DYN_TIME,
DPEL_DYN_UINT,
DPEL_DYN_ULONG)

constants representing dynamic dpe types

Reviewed:
2019-08-19