unCPC6  6.6.6
WinCC-OA implementation of UNICOS CPC
 All Files Functions Variables Pages
unStepperUtils.ctl File Reference

Utilities for Stepper Diagnostics panels. More...

Functions

dyn_string unStepperInfo_getDiagnosticsInfo (const string &sAlias, const string &sApplicationName, const int iExpectedLength)
 Get diagnostics information for given alias. More...
 
dyn_string unStepperInfo_getFileInfo (const string &sFileName, const string &sApplicationName, const int iExpectedLength)
 Reads stepper information data from files in "panels/vision/diagnostic/appname/*". More...
 
void unStepperInfo_validateColumnsNumber (const dyn_string &dsLines, const int iExpectedLength)
 Checks if each line has expected number of columns and raises fwException in case this doesn't happen. More...
 
void unStepperInfo_raiseAndDisplayError (const string &errorMsg)
 Raises error and displays message in pop up window. More...
 
string unStepperInfo_getFileName (const string &sAliasName)
 Get name of the file where states or transitions data of a given alias is stored. More...
 
bool unStepperInfo_isDigit (const char c)
 Checks if a character is a digit. More...
 
string unStepperInfo_HTMLWrap (const string &sInput)
 Adds HTML code such that input string gets word-wrapping. More...
 

Variables

const char CSV_FILE_DELIMITER = "@"
 

Detailed Description

Utilities for Stepper Diagnostics panels.

Author
rafae.nosp@m.l.j..nosp@m.f.san.nosp@m.tos@.nosp@m.cern..nosp@m.ch

Function Documentation

dyn_string unStepperInfo_getDiagnosticsInfo ( const string &  sAlias,
const string &  sApplicationName,
const int  iExpectedLength 
)

Get diagnostics information for given alias.

Parameters
[in]sAliasAlias name
[in]sApplicationNameName of the application
[in]expectedLengthExpected number of columns
Returns
(see unStepperInfo_getFileInfo)

References unStepperInfo_getFileInfo(), and unStepperInfo_getFileName().

dyn_string unStepperInfo_getFileInfo ( const string &  sFileName,
const string &  sApplicationName,
const int  iExpectedLength 
)

Reads stepper information data from files in "panels/vision/diagnostic/appname/*".

Parameters
[in]sFileNameName of the file
[in]sApplicationNameName of the application
[in]expectedLengthExpected length of each row
Returns
Data from file as a dynamic string. Each element is a row

References unStepperInfo_raiseAndDisplayError(), and unStepperInfo_validateColumnsNumber().

Referenced by unStepperInfo_getDiagnosticsInfo().

void unStepperInfo_validateColumnsNumber ( const dyn_string &  dsLines,
const int  iExpectedLength 
)

Checks if each line has expected number of columns and raises fwException in case this doesn't happen.

Parameters
[in]dsLinesList of lines to be validated
[in]expectedLengthExpected length of each row

References unStepperInfo_raiseAndDisplayError().

Referenced by unStepperInfo_getFileInfo().

void unStepperInfo_raiseAndDisplayError ( const string &  errorMsg)

Raises error and displays message in pop up window.

Parameters
[in]errorMsgError message to display

Referenced by unStepperInfo_getFileInfo(), and unStepperInfo_validateColumnsNumber().

string unStepperInfo_getFileName ( const string &  sAliasName)

Get name of the file where states or transitions data of a given alias is stored.

Computes .csv file name as given by alias name without trailing digits

Parameters
[in]Aliasname
Returns
Name of the csv file

References unStepperInfo_isDigit().

Referenced by unStepperInfo_getDiagnosticsInfo().

bool unStepperInfo_isDigit ( const char  c)

Checks if a character is a digit.

Parameters
[in]charCharacter to be checked
Returns
TRUE if character is digit, FALSE otherwhise

Referenced by unStepperInfo_getFileName().

string unStepperInfo_HTMLWrap ( const string &  sInput)

Adds HTML code such that input string gets word-wrapping.

Parameters
[in]sInputAlias name
Returns
Word-wrapped input