Functions | |
void | fwUkl1ExceptionLog_setLogName (const string &logName, bool deleteOld, bool create, dyn_string &exceptionInfo) |
string | fwUkl1ExceptionLog_getLogName () |
void | fwUkl1ExceptionLog_create (dyn_string &exceptionInfo) |
void | fwUkl1ExceptionLog_delete (dyn_string &exceptionInfo) |
void | fwUkl1ExceptionLog_clear (dyn_string &exceptionInfo) |
void | fwUkl1ExceptionLog_submit (dyn_string &exceptionInfo, string baseNode="") |
void | fwUkl1ExceptionLog_setDisplayTreeName (const string &treeName, dyn_string &exceptionInfo) |
string | fwUkl1ExceptionLog_getDisplayTreeName (dyn_string &exceptionInfo) |
void | fwUkl1ExceptionLog_connect (const string &treeName) |
void | fwUkl1ExceptionLog_displayCB (string dpe, dyn_string asNewData) |
string | _fwUkl1ExceptionLog_generateCode (const dyn_string &exceptionLog) |
|
Returns an unique identifier for that can be used to label an exception chain before it is submitted to the exception log.
|
|
Removes all the exceptions in the current exception log.
|
|
Sets up a connect()ion between the exception log data point and the function that is used to parse the exception log display.
Example (...) //Part of a PVSS tree shape initialisation function, created in GEDI. //Get the name of the shape that we are initialising. const string treeName = this.name(); //Now call the connect function. fwUkl1ExceptionLog_connect(treeName); //Will either have successfully connected to the log or will display an exception chain in this tree. (...) |
|
Used to create an exception log for use with the library functions. If the log already exists it will return with no errors. The log name is taken from the global variable gsFwUkl1ExceptionLogDp, which can accessed through set/getFwUkl1ExceptionLog_getLogName().
|
|
Deletes the existing exception log.
|
|
A call back function that can be used to display the exceptions contained within the exception log.
(...) //First set the name of the tree that we wish to use to display the exception log. //Holds any exception information that may occur. dyn_string exceptionInfo; int exInfoSize = dynlen(exceptionInfo); //Set the name of the tree to display the exception log. fwUkl1ExceptionLog_setDisplayTreeName(treeName, exceptionInfo); //Check for errors here, only continue if everything is ok. //...assuming everything is good, check for the existance of the exception log. fwUkl1ExceptionLog_create(exceptionInfo); //Again check for errors here, only continue if everything is ok. //...assuming everything is good connect this function to the exception log. dpConnect("fwUkl1ExceptionLog_displayCB", gsFwUkl1ExceptionLogDp + "." + FWUKL1_EXCEPTION_LOG_DPE); //Check for errors. dyn_errClass err = getLastError(); if (0 < dynlen(err)) { //Datapoint element doesn't exist can't check for errors! //Raise an exception. fwUkl1Exception_raise(exceptionInfo, "WARNING", "fwUkl1ExceptionLog_connect(): Failed to establish a call back function for the exception log data point. Future submitted errors will not be display in this tree.", ""); //Pop up an exception demostrating the error that occured. fwUkl1ExceptionHandling_display(exceptionInfo); exInfoSize = dynlen(exceptionInfo); }//if(0<dynlen(err)) (...) |
|
Returns the name of the PVSS tree shape that will be used by the fwUkl1ExceptionLog_displayCB function to display the exception log data.
(...) //Wish to get the current name of the tree being used by the fwExceptionLog_displayCB(). //exceptionInfo will tell us if it is valid. dyn_string exceptionInfo; const string currentTreeDisplayName = fwUkl1ExceptionLog_getDisplayTreeName(exceptionInfo); //The tree name will always be what is currently in use, check for errors to see if it will work. if ( 0 != dynlen(exceptionInfo) ) { //We can use the name in functions that require a PVSS tree shape. }//if(0!=dynlen(exceptionInfo)) else { //Tree shape is not recognised by PVSS need to take action... }//else(0!=dynlen(exceptionInfo)) (...) |
|
Returns the name of the current exception log.
|
|
Sets the name of the PVSS tree shape that the fwUkl1ExceptionLog_displayCB() should use to display the exception data.
|
|
Sets the name of the data point that is to be used for the exception log. Can also be used to create the data point if desired.
|
|
Submits an exception chain to the exception log. Takes a name for the base node that the exception chain should appear under in the exception tree. If exceptionInfo is empty then the function will just return.
Example (...) //Create a dyn_string to hold the exception information. dyn_string exceptionInfo; //Call a function, that could generate an error. thisFunction(exceptionInfo); //If an error has been generated it will be submitted to the log, otherwise nothing will occur. //All future exceptions that are submit()ted with "myNode" will be placed under the "myNode" entry in the exception tree. fwUkl1ExceptionLog_submit(exceptionInfo, "myNode"); //Note that exception info is now definately empty, for example a call to fwUkl1ExceptionHandling_display() would do nothing. (...) |