D2000 VBApi - Log database

Contents of the log database of the D2000 System may be browsed in two ways:

  1. Records for one (particular) object.
  2. Records for objects, that match the given mask and describe the particular type of action.

To get the records of one object, call the function VBApiGetLogByObject.


Declaration
Declare Sub VBApiGetLogByObject Lib "vbapi.dll" Alias "_GetLogByObject@24" (Arr() As VBApi_TLogRec, ByRef name As String, ByRef bt As Date, ByRef et As Date, ByRef bCompletted As Long, ByRef ok As Long)
Parameters
ArrArray of log database records of VBApi_TlogRec.
nameName of object (must be opened by the function VBApiOpenObject).
btBegin time of the interval for record selection.
etEnd time of the interval for record selection.
bCompletedAttribute, whether the array Arr contains all required records.
okReturn value - call success.
Return value
Value of the parameter ok.

Return codeMeaning
0Call successful.
1Incorrect object name.
2No logged on user.
3Invalid parameters.
4Internal error.
Note
If the parameter bCompletted = 1 (data not completed - too much data), to get the remaining data  it is necessary to call the function again with changed time bt according to the last record in the array Arr.


To get records of the objects that match the name mask and also describe some type of action, call the function VBApiGetLogByGroup.


Declaration
Declare Sub VBApiGetLogByGroup Lib "vbapi.dll" Alias "_GetLogByGroup@28" (Arr() As VBApi_TLogRec, ByRef mask As String, ByRef groups As Long, ByRef bt As Date, ByRef et As Date, ByRef bCompletted As Long, ByRef ok As Long)
Parameters
ArrArray of log database records of VBApi_TlogRec.
maskObject name mask.
groups

Action type. Action type is given by a number, that is the sum of the following constants:

ConstantAction type
Public Const Type_Alarm_Log = 1Alarms
Public Const Type_System_Log = 2System
Public Const Type_Proces_Log = 4Process
Public Const Type_Kom_Log = 8Kom
Public Const Type_Operator_Log = 16Operator's interventions
Public Const Type_EventMsg_Log = 32Events
Public Const Type_LogonLogoff_Log = 64Log On/Off
Public Const Type_ManualEntry_Log = 128Manual intervention
Public Const Type_ChangeValue_Log = 256Spontaneous value change
Public Const Type_PostMortemData_Log = 412Time recorder
btBegin time of the interval for record selection.
etEnd time of the interval for record selection.
bCompletedAttribute, whether the array Arr contains all required records.
okReturn value - call success.
Return value
Value of the parameter ok.

Return codeMeaning
0Call successful.
1Incorrect object name.
2No logged on user.
3Invalid parameters.
4Internal error.
Note
If the parameter bCompletted = 1 (data not completed - too much data), it is necessary to call the function repeatedly with the changed time bt according to the last record in the array Arr to get the remaining data.

Related pages:

Napíšte komentár