const string | fwGeneral_DYN_STRING_DEFAULT_SEPARATOR = "|" |
const string | FW_GENERAL_NATURAL_TIME_FORMAT = "%d/%m/%Y - %H:%M:%S" |
const string | FW_GENERAL_GENERIC_TIME_FORMAT = "%Y.%m.%d %H:%M:%S" |
const string | FW_GENERAL_TIMEZONE_UTC = "UTC" |
const string | FW_GENERAL_TIMEZONE_LOCAL = "LOCAL" |
global dyn_int | g_fwGeneral_dynDpeTypes |
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) |
fwGeneral_dateTimeWidget_setEnabled (bool bState) | |
public bool | fwGeneral_dateTimeWidget_isEnabled () |
fwGeneral_dateTimeWidget_setEndDateTime (time tDateTime) | |
fwGeneral_dateTimeWidget_setStartDateTime (time tDateTime) | |
fwGeneral_dateTimeWidget_setTimeZone (string sTimeZone) | |
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_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) | |
bool | fwGeneral_hasCorrectDateFormat (string sDate) |
fwGeneral_openInExternalBrowser (string sLink, dyn_string &exceptionInfo) | |
bool | fwGeneral_hasCorrectFormat (string sDateTime) |
bool | fwGeneral_hasCorrectTimeFormat (string sTime) |
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) | |
time | fwGeneral_stringToDate (string sDateTime) |
string | fwGeneral_recodeFile (string fnameToRecode, dyn_string &exceptionInfo) |
fwGeneral_getQueryRDBdirectEnabled (bool &queryRDBdirectEnabled) | |
fwGeneral_getParallelArchivingEnabled (bool &RDBinstalled, bool ¶llelArchivingEnabled) | |
fwGeneral_setQueryRDBdirectEnabled (bool queryRDBdirectEnabled) | |
fwGeneral_commandConfirmation | ( | string | dpe, |
string | command, | ||
bool & | confirmation, | ||
dyn_string & | exceptionInfo | ||
) |
Opens confirmation dialog panel, and returns result
user selection
dpe | name of the datapoint where the command will be applied |
command | short explanation of the action to be confirmed |
confirmation | whether the user confirmed the command or not |
exceptionInfo | returns 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.
bOk | Output - 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 |
References fwGeneral_hasCorrectFormat(), and fwGeneral_stringToDate().
time fwGeneral_dateTimeWidget_getStartDateTime | ( | bool & | bOk, |
dyn_string & | dsException | ||
) |
Returns start date and time selected by the user and performs format check.
bOk | Output - 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 |
References fwGeneral_hasCorrectFormat(), and fwGeneral_stringToDate().
string fwGeneral_dateTimeWidget_getTimeZone | ( | ) |
Returns the time zone used to determine the current time.
public bool fwGeneral_dateTimeWidget_isEnabled | ( | ) |
Is the DateTime widget enabled?
bool fwGeneral_dateTimeWidget_positivePeriodSelected | ( | dyn_string & | dsException | ) |
Checks whether the user has selected a positive time interval in the date/time widget or not.
dsException | - Input/Output: Carrier for exception message to be shown to user |
References fwGeneral_hasCorrectFormat(), and fwGeneral_stringToDate().
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)
bState | Input - boolean: state |
fwGeneral_dateTimeWidget_setEndDateTime | ( | time | tDateTime | ) |
Sets the end date and time in the Date Time Widget.
Input | - time: date and time |
fwGeneral_dateTimeWidget_setStartDateTime | ( | time | tDateTime | ) |
Sets the start date and time in the Date Time Widget.
Input | - time: date and time |
fwGeneral_dateTimeWidget_setTimeZone | ( | string | sTimeZone | ) |
Sets the time zone used to determine the current time.
Input | - string: time zone (e.g. FW_GENERAL_NATURAL_TIME_FORMAT, FW_GENERAL_GENERIC_TIME_FORMAT) |
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. !!!
bState | Input - 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
selectedDpTypes | returns the list of selected DP Types (one or multiple, depending on selectMultiple parameter. If specified as input it can contain the pre-defined selection. |
disabledDpTypes | list of DP Types that are disabled in the selection list. Specifying empty list means that all items are selectable |
exceptionInfo | returns details of any errors |
selectMultiple | determines if the selection list allows for multiple selection, or single selection only. |
text | panel title. If an empty string is specified, then "Select Datapoint Types" will be used. |
void fwGeneral_dynStringToString | ( | dyn_string | theDynString, |
string & | theString, | ||
string | separator = "|" |
||
) |
Converts a dyn_string to a string with the chosen separator.
theDynString | dyn_string to be converted |
theString | result of the conversion |
separator | separator 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 = "" |
||
) |
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.
ds | the dynamic string to be modified |
length | minimum length required for the dynamic string |
exceptionInfo | returns details of any exceptions |
value | value 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.
dp | datapoint to get the elements from |
dpType | dp type to get the elements from if no datapoint was specified (dp = "") |
dpElements | returns the list of dp elements sorted into alphabetical order. NB Their name(s) begin with "." ! |
dpElementTypes | returns the list of types of corresponding to the list of dp elements |
exceptionInfo | returns details of any exceptions |
excludedTypes | excluded dp elements of these types from the list |
forceDpCreation | if 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
dynTypes | list of integer values of dynamic dpe types (does not dyn_anytype or any dyn_dyn) |
exceptionInfo | details of any exceptions |
Referenced by fwGeneral_init().
fwGeneral_getGlobalValue | ( | string | globalVariable, |
anytype & | value, | ||
dyn_string & | exceptionInfo | ||
) |
Returns the value of a global variable
globalVariable | name of the global variable to get the value from |
value | returns the value of the global variable |
exceptionInfo | details 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.
name | name to be processed |
nameWithoutSN | name with system name removed |
exceptionInfo | details of any exceptions |
fwGeneral_getParallelArchivingEnabled | ( | bool & | RDBinstalled, |
bool & | parallelArchivingEnabled | ||
) |
Gets status of Parallel archiving (RDB installed + parallel on-off)
RDBinstalled,bool,out,RDB | is installed; true=installed |
parallelArchivingEnabled,bool,out,parallel | Archiving Enabled; true=on false=off |
fwGeneral_getQueryRDBdirectEnabled | ( | bool & | queryRDBdirectEnabled | ) |
Gets status of QueryRDBdirect (on, off)
queryRDBdirectEnabled,bool,out,queryRDBdirect | true=on false=off |
fwGeneral_getSystemIpAddress | ( | string | systemName, |
string & | ipAddress, | ||
string & | hostName, | ||
dyn_string & | exceptionInfo | ||
) |
Returns ipAddress and hostName where the PVSS system with
name systemName is running.
systemName | name of the system we are interested in |
ipAddress | ip address of the machine where the PVSS system is running |
hostName | host name of the machine where the PVSS system is running |
exceptionInfo | returns 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.
name | name to be processed (e.g. system1:crate01/board03/channel005) |
systemName | system name extracted from name (e.g. system1:) |
exceptionInfo | details of any exceptions |
Referenced by fwGeneral_getDpElements().
bool fwGeneral_hasCorrectDateFormat | ( | string | sDate | ) |
Checks the format of a provided date. Checks for following format: dd/mm/yyyy
Input | - string: date at question |
Referenced by fwGeneral_hasCorrectFormat().
bool fwGeneral_hasCorrectFormat | ( | string | sDateTime | ) |
Checks the format of a provided date and time. Checks for following format: dd/mm/yyyy hh:mm:ss
Input | - string: date and time at question |
References fwGeneral_hasCorrectDateFormat(), and fwGeneral_hasCorrectTimeFormat().
Referenced by fwGeneral_dateTimeWidget_getEndDateTime(), fwGeneral_dateTimeWidget_getStartDateTime(), and fwGeneral_dateTimeWidget_positivePeriodSelected().
bool fwGeneral_hasCorrectTimeFormat | ( | string | sTime | ) |
Checks the format of a provided time. Checks for following format: hh:mm:ss
Input | - string: time at question |
Referenced by fwGeneral_hasCorrectFormat().
fwGeneral_init | ( | dyn_string & | exceptionInfo | ) |
Initializes global constants provided by the library
exceptionInfo | details of any exceptions |
References fwGeneral_getDynDpeTypes().
fwGeneral_isDpeTypeDyn | ( | int | type, |
bool & | isDyn, | ||
dyn_string & | exceptionInfo | ||
) |
Returns whether the dpe type is dyn or not
type | integer number for dpe type |
isDyn | whether the dpetype is dyn or not |
exceptionInfo | details of any exceptions |
fwGeneral_openDetailsPanel | ( | string | dpe, |
dyn_string & | exceptionInfo | ||
) |
Opens the details panel for a given datapoint element
dpe | datapoint element to get the details from |
exceptionInfo | details of any exceptions |
fwGeneral_openInExternalBrowser | ( | string | sLink, |
dyn_string & | exceptionInfo | ||
) |
Open the www link in default browser
sLink | string www link |
exceptionInfo | details of any exceptions |
References fwException_raise(), and fwExceptionHandling_display().
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.
PVSS manager usage VISION
message | the message to be presented in the panel |
ok | returns TRUE if the user pressed the Ok button, FALSE otherwise |
exceptionInfo | details of any exceptions |
panelBarTitle | title for the panel WARNING: deprecated from PVSS 3.6 and higher |
onlyInfo | whether the panel is just for information, or it will also ask for user input |
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.
fnameToRecode,string,filename+path | which needs to be encoded |
References fwException_raise().
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
list | list of strings to select from |
selection | returns the selected items |
exceptionInfo | details of any exceptions |
multipleSelection | whether it is possible to select more than one item or not |
title | title 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
globalVariable | name of the global variable to set the value to |
value | the value to be set to the global variable |
exceptionInfo | details of any exceptions |
fwGeneral_setQueryRDBdirectEnabled | ( | bool | queryRDBdirectEnabled | ) |
set the status of QueryRDBdirect (on, off)
queryRDBdirectEnabled,bool,in,queryRDBdirect | true=on false=off |
time fwGeneral_stringToDate | ( | string | sDateTime | ) |
Converts previously checked time string into time value.
Input | - string: date and time to be checked |
Referenced by fwGeneral_dateTimeWidget_getEndDateTime(), fwGeneral_dateTimeWidget_getStartDateTime(), and fwGeneral_dateTimeWidget_positivePeriodSelected().
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.
theString | string to be split |
theDynString | result of splitting |
separator | separator used for splitting. The default value should be fwGeneral_DYN_STRING_DEFAULT_SEPARATOR, but PVSS doesn't allow constants in default arguments |
removeSpaces | whether to remove spaces in the string before parsing it or not |
compatibilityMode | useful 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. |