fwGeneral.ctl File Reference
const string fwGeneral_DYN_STRING_DEFAULT_SEPARATOR = "|"
global dyn_int g_fwGeneral_dynDpeTypes
 fwGeneral_commandConfirmation (string dpe, string command, bool &confirmation, dyn_string &exceptionInfo)
void fwGeneral_DpTypeSelector (dyn_string &selectedDpTypes, dyn_string disabledDpTypes, dyn_string &exceptionInfo, bool selectMultiple=FALSE, string text="")
 fwGeneral_dynStringToString (dyn_string theDynString, string &theString, string separator="|")
 fwGeneral_fillDynString (dyn_string &ds, int length, dyn_string &exceptionInfo, string value="")
 fwGeneral_getDpElements (string dp, string dpType, dyn_string &dpElements, dyn_string &dpElementTypes, dyn_string &exceptionInfo, dyn_int excludedTypes="", bool forceDpCreation=false)
 fwGeneral_getDynDpeTypes (dyn_string &dynTypes, dyn_string &exceptionInfo)
 fwGeneral_getGlobalValue (string globalVariable, anytype &value, dyn_string &exceptionInfo)
 fwGeneral_getNameWithoutSN (string name, string &nameWithoutSN, dyn_string &exceptionInfo)
 fwGeneral_getSystemIpAddress (string systemName, string &ipAddress, string &hostName, dyn_string &exceptionInfo)
 fwGeneral_getSystemName (string name, string &systemName, dyn_string &exceptionInfo)
 fwGeneral_init (dyn_string &exceptionInfo)
 fwGeneral_isDpeTypeDyn (int type, bool &isDyn, dyn_string &exceptionInfo)
 fwGeneral_openDetailsPanel (string dpe, dyn_string &exceptionInfo)
 fwGeneral_openMessagePanel (string message, bool &ok, dyn_string &exceptionInfo, string panelBarTitle="", bool onlyInfo=FALSE)
 fwGeneral_selectFromList (dyn_string list, dyn_string &selection, dyn_string &exceptionInfo, bool multipleSelection=false, string title="Select fromt the list")
 fwGeneral_setGlobalValue (string globalVariable, anytype value, dyn_string &exceptionInfo)
 fwGeneral_stringToDynString (string theString, dyn_string &theDynString, string separator="|", bool removeSpaces=true, bool compatibilityMode=false)

Detailed Description

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

Function Documentation

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
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.
fwGeneral_dynStringToString ( dyn_string  theDynString,
string &  theString,
string  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
fwGeneral_fillDynString ( dyn_string &  ds,
int  length,
dyn_string &  exceptionInfo,
string  value = "" 
)
Fills in the a dynamic string with the selected value (null by default)

until it has at least the required length. If the initial length of the dynamic string is equal or more than the requested length, then it is not changed.

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
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
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

References fwException_raise(), and fwGeneral_getSystemName().

fwGeneral_getDynDpeTypes ( dyn_string &  dynTypes,
dyn_string &  exceptionInfo 
)
Returns the a list of dynamic types for dpes
Constraints
None
Usage
Public
PVSS managers
VISION, CTRL
Parameters
dynTypeslist of integer values of dynamic dpe types (does not dyn_anytype or any dyn_dyn)
exceptionInfodetails of any exceptions

Referenced by fwGeneral_init().

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
fwGeneral_getNameWithoutSN ( string  name,
string &  nameWithoutSN,
dyn_string &  exceptionInfo 
)
Removes the system name from the passed name.

name can be a DP name or a DP alias. dpSubStr is not used because it only works if the dp exists.

Constraints
None
Usage
Public
PVSS managers
VISION, CTRL
Parameters
namename to be processed
nameWithoutSNname with system name removed
exceptionInfodetails of any exceptions
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

References fwException_raise().

fwGeneral_getSystemName ( string  name,
string &  systemName,
dyn_string &  exceptionInfo 
)
Gets the system name from the passed name.

name can be a DP name or a DP alias. dpSubStr is not used because it only works if the dp exists.

Constraints
None
Usage
Public
PVSS managers
VISION, CTRL
Parameters
namename to be processed (e.g. system1:crate01/board03/channel005)
systemNamesystem name extracted from name (e.g. system1:)
exceptionInfodetails of any exceptions

Referenced by fwGeneral_getDpElements().

fwGeneral_init ( dyn_string &  exceptionInfo)
Initializes global constants provided by the library
Constraints
None
Usage
Public
PVSS managers
VISION, CTRL
Parameters
exceptionInfodetails of any exceptions

References fwGeneral_getDynDpeTypes().

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
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
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
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
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
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.