CitrixGetMeasures Function

Action

Retrieves measures collected by a Citrix client for an actual session. Null may be specified for measures that are not of interest.

Include file

CitrixAPI.bdh

Syntax

CitrixGetMeasures( out nBytesIn   : number optional,
                   out nBytesOut  : number optional,
                   out nFramesIn  : number optional,
                   out nFramesOut : number optional,
                   out nErrorsIn  : number optional,
                   out nErrorsOut : number optional,
                   out nLastLat   : number optional,
                   out nAvgLat    : number optional,
                   out nLatDev    : number optional ): boolean;

Return value

  • true if successful

  • false otherwise

Parameter Description
nBytesIn Received bytes
nBytesOut Sent bytes
nFramesIn Received frames
nFramesOut Sent frames
nErrorsIn Received errors
nErrorsOut Sent errors
nLastLat Last latency
nAvgLat Average latency
nLatDev Current latency deviation

Example:

  transaction TMain
  var
    nBytesIn   : number;
    nBytesOut  : number;
    nFramesIn  : number;
    nFramesOut : number;
    nErrorsIn  : number;
    nErrorsOut : number;
    nLastLat   : number;
    nAvgLat    : number;
    nLatDev    : number;
  begin
    CitrixInit(640, 480);
    CitrixSetApplication("Excel");
    CitrixConnect("myserver", "myusername", "mypass", "mydomain", COLOR_16bit);
    CitrixWaitForLogon();
    hWnd4 := CitrixWaitForWindowCreation("Microsoft Excel - Book*", MATCH_Wildcard, 0x15CF0000, -4, -4, 648, 488);
    CitrixKeyString("test");
    CitrixMouseClick(636, 14, hWnd4, MOUSE_ButtonLeft);
    ThinkTime(2.63);
    CitrixMouseClick(306, 289, hWnd4, MOUSE_ButtonLeft);
    CitrixWaitForWindow(hWnd4, EVENT_Destroy);
    CitrixGetMeasures(nBytesIn, nBytesOut, nFramesIn, nFramesOut, nErrorsIn, nErrorsOut, nLastLat, nAvgLat, nLatDev);
    print("Citrix measures: ");
    print(" bytes in: " + string(nBytesIn));
    print(" bytes out: " + string(nBytesOut));
    print(" frames in: " + string(nFramesIn));
    print(" frames out: " + string(nFramesOut));
    print(" errors in: " + string(nErrorsIn));
    print(" errors out: " + string(nErrorsOut));
    print(" last latency: " + string(nLastLat));
    print("  avg. latency:" + string(nAvgLat));
    print(" current latency deviation: " + string(nLatDev));
    CitrixDisconnect();
  end TMain;