Log Database

Log Database

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

Arr

Array of log database records of VBApi_TlogRec.

name

Name of object (must be opened by the function VBApiOpenObject).

bt

Begin time of the interval for record selection.

et

End time of the interval for record selection.

bCompleted

Attribute, whether the array Arr contains all required records.

ok

Return value - call success.

Return value

Value of the parameter ok.

Return code

Meaning

Return code

Meaning

0

Call successful.

1

Incorrect object name.

2

No logged on user.

3

Invalid parameters.

4

Internal 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

Arr

Array of log database records of VBApi_TlogRec.

mask

Object name mask.

groups

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

Constant

Action type

Public Const Type_Alarm_Log = 1

Alarms

Public Const Type_System_Log = 2

System

Public Const Type_Proces_Log = 4

Process

Public Const Type_Kom_Log = 8

Kom

Public Const Type_Operator_Log = 16

Operator's interventions

Public Const Type_EventMsg_Log = 32

Events

Public Const Type_LogonLogoff_Log = 64

Log On/Off

Public Const Type_ManualEntry_Log = 128

Manual intervention

Public Const Type_ChangeValue_Log = 256

Spontaneous value change

Public Const Type_PostMortemData_Log = 412

Time recorder

bt

Begin time of the interval for record selection.

et

End time of the interval for record selection.

bCompleted

Attribute, whether the array Arr contains all required records.

ok

Return value - call success.

Return value

Value of the parameter ok.

Return code

Meaning

Return code

Meaning

0

Call successful.

1

Incorrect object name.

2

No logged on user.

3

Invalid parameters.

4

Internal 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:

D2000 VBApi