LOGDISPLAY Example
This program exercises several modes of the LOGDISPLAY instruction. It assumes that in the project, there is a mimic called MENU with a Log Viewer animation whose identifier is REPLOG01.
To find the Log Viewer's identifier, select Edit mode, then select the menu Display.Properties List (name).
Configuration
' Create a domain DOM01
' Create a nature NAT01
'Variables used:
' @PRIORITY.MIN of type REGISTER
' @PRIORITY.MAX of type REGISTER
' @VALIDATE of type STATE
' @CODERETURN of type STATE
' @RETURN of type TEXT
Mode 0 - BEGIN (syntax 1)
SUB logdisplaybegin()
'Declare return code
DIM intReturn as integer;
intReturn = LOGDISPLAY("BEGIN","MENU","","REPLOG01");
END SUB
Mode 1 - BEFORE (syntax 1)
SUB logdisplaybefore()
'Declare return code
DIM intReturn as integer;
intReturn = LOGDISPLAY("BEFORE","MENU","","REPLOG01");
END SUB
Mode 3 - AFTER (syntax 1)
SUB logdisplayafter()
'Declare return code
DIM intReturn as integer;
intReturn = LOGDISPLAY("AFTER","MENU","","REPLOG01");
END SUB
Mode 4 - END(syntax 1)
SUB logdisplayend()
'Declare return code
DIM intReturn as integer;
intReturn = LOGDISPLAY("END","MENU","","REPLOG01");
END SUB
Mode 9 - DOMAIN (syntax 2)
SUB logdisplaydomain()
'Declare return code
DIM intReturn as integer;
intReturn = LOGDISPLAY("DOMAIN","MENU","","REPLOG01","DOM01");
END SUB
SUB logdisplaydomainnofilter()
'Declare return code
DIM intReturn as integer;
intReturn = LOGDISPLAY("DOMAIN","MENU","","REPLOG01","");
END SUB
Mode 5 - Nature (syntax 2)
SUB logdisplayNature()
'Declare return code
DIM intReturn as integer;
intReturn = LOGDISPLAY("Nature","MENU","","REPLOG01","NAT01");
END SUB
SUB logdisplayNaturenofilter()
'Declare return code
DIM intReturn as integer;
intReturn = LOGDISPLAY("Nature","MENU","","REPLOG01","");
END SUB
Mode 12 - SETDATETIME (syntax 3)
SUB logdisplaysetdatetime()
'Declare return code
DIM intReturn as integer;
DIM dblStartTime as double;
DIM dblEndTime as double;
dblStartTime = DATETIMEVALUE("21/06/2002", "17:05:12:654");
dblEndTime = DATETIMEVALUE("21/06/2002", "17:10:12:654");
intReturn = LOGDISPLAY("SETDATETIME","MENU","","REPLOG01",dblStartTime,dblEndTime) ;
END SUB
Mode 11 - PRINTALL (syntax 1)
SUB logdisplayprintall()
'Declare return code
DIM intReturn as integer;
intReturn = LOGDISPLAY("PRINTALL","MENU","","REPLOG01");
END SUB
Mode 13 - FILTER (syntax 4)
SUB logdisplayfilter()
'Declare return code
DIM intReturn as integer;
DIM strFilter as Str;
strFilter = "=(#t BEG DOM01)";
intReturn = LOGDISPLAY("FILTER","MENU","","REPLOG01",strFilter);
END SUB
'Mode 14 - PRINT_SELECTED (syntax 1)
SUB logdisplayprintselected()
'Declare return code
DIM intReturn as integer;
intReturn = LOGDISPLAY("PRINT_SELECTED","MENU","","REPLOG01");
END SUB;
Mode 15 - PRINT_DISPLAY (syntax 1)
SUB logdisplayprintdisplay()
'Declare return code
DIM intReturn as integer;
intReturn = LOGDISPLAY("PRINT_DISPLAY","MENU","","REPLOG01");
END SUB
Mode 16 - FIRST (syntax 1)
SUB logdisplayfirst()
'Declare return code
DIM intReturn as integer;
intReturn = LOGDISPLAY("FIRST","MENU","","REPLOG01");
END SUB
Mode 17 - LAST (syntax 1)
SUB logdisplaylast()
'Declare return code
DIM intReturn as integer;
intReturn = LOGDISPLAY("LAST","MENU","","REPLOG01");
END SUB
Mode 23 - LINESELECT (syntax 9)
SUB OnLineSel()
LOGDISPLAY("LINESELECT", "log","","log1","main","","linesel" ,""); END SUB
SUB LineSel()
DIM lHandle As Long;
DIM i As Integer;
DIM sPath As Str;
PRINT ("LINESELECT");
lHandle = XMLPATH ( "GET", "/log/log1", "lineselect/variable" );
PRINT (CGET_BUFFER ( lHandle, 0, 255 ));
lHandle = XMLPATH ( "GET", "/log/log1", "lineselect/x" );
PRINT (CGET_BUFFER ( lHandle, 0, 255 ));
lHandle = XMLPATH ( "GET", "/log/log1", "lineselect/y" );
PRINT (CGET_BUFFER ( lHandle, 0, 255 ));
lHandle = XMLPATH ( "GET", "/log/log1", "lineselect/selected" );
PRINT (CGET_BUFFER ( lHandle, 0, 255 ));
PRINT (XMLPATH ( "GETDOUBLE", "/log/log1", "lineselect/time" )); FOR (i=0;i<8;i=i+1)
sPath = FORMAT ("lineselect.element[%d].value", i+1);
lHandle = XMLPATH ( "GET", "/log/log1", sPath );
PRINT (CGET_BUFFER ( lHandle, 0, 255 ));
NEXT
XMLPATH ( "UNLOAD", "/log/log1");
END SUB
Mode 25 - GETSORT (syntax 11)
SUB GetSort()
DIM lHandle As Long;
LOGDISPLAY ( "GETSORT", "log","","log1");
lHandle = XMLPATH ( "GET", "/log/log1", "getsort/column" );
PRINT (CGET_BUFFER ( lHandle, 0, 255 ));
lHandle = XMLPATH ( "GET", "/log/log1", "getsort/sort" );
PRINT (CGET_BUFFER ( lHandle, 0, 255 ));
XMLPATH ( "UNLOAD", "/log/log1");
END SUB