GetSuperLogData

Definition

Usage

Read operation records one by one from the internal buffer. Before using this function, you can use ReadAllSLogData or ReadSuperLogData to read operation records from the device and write them into the internal buffer of the PC. Each time this function is executed, the pointer points to the next operation record. This function is the similar to GetSuperLogData2 except that GetSuperLogData2 can be used to obtain more accurate operation record time (in seconds).

Parameter

Device number

Pointer pointing to a long variable. The value is the device number of the received operation record.

Pointer pointing to a long variable. The value is the administrator ID of the received operation record.

Pointer pointing to a long variable. The value varies with dwManipulation.

Pointer pointing to along variable. The value varies with dwManipulation.

Pointer pointing to a long variable. The value varies with dwManipulation.

Pointer pointing to a long variable. The value is the operation type. The specific values are as follows:

Value of dwManipulation Meaning of dwManipulation Params1 Params2 Params3 Params4
0 Power on
1 Power off
3 Alarm Alarm type. 58: False alarm. 54:Door entry alarm,53: Exit button alarm, 55: Tamper alarm, 65535: Alarm off
4 Enter menu
5 Change setting Number of the set option
6 Register a fingerprint ID of the operateduser Operation result. 0: Success. Other values: Failure. Index of the registered fingerprint Length of the fingerprint template (2: Threatened fingerprint)
7 Register a password
14 Create an MF card ID of the operated user Number of fingerprints written into the MF card Size of fingerprint data written into the MF card
20 Copy data from the MF card to the device Number of fingerprints read out from the MF card
22 Restore factory setting
30 Enroll a new user ID of the operated user Operation result
32 Threatened alarm Whether to verify. 0: Key alarm. 1: Verify alarm Note: When the value is Verify alarm, dwSEnrollNumber returns the ID of the threatened user.
34 Anti-pass back Whether the alarm is an anti-pass back alarm.

Pointer pointing to a long variable. The value varies with dwManipulation.

Pointers pointing to long variables. The values are the date and time of the received operation record.

Return Value

Return True if it is successful, or return False.

Related Function

GetSuperLogData2, GetAllSLogData

 

Ejemplo

C#

private void GetSuperLogData(string sIp = "10.0.0.44", int iPort = 4370, int iMachineNumber = 1)
{
	//Create Standalone SDK class dynamicly.
	zkemkeeper.CZKEMClass axCZKEM1 = new zkemkeeper.CZKEMClass();
	axCZKEM1.Connect_Net(sIp, iPort);

	int idwErrorCode = 0;
	int iIndex = 0;
	int iSuperLogCount = 0;

	if (axCZKEM1.ReadSuperLogData(iMachineNumber)) //read the logs from the memory.(the same as axCZKEM1.ReadAllGLogData(iMachineNumber))
	{
		int idwTMachineNumber = 0;
		int idwSEnrollNumber = 0;
		int iParams4 = 0;
		int iParams1 = 0;
		int iParams2 = 0;
		int idwManipulation = 0;
		int iParams3 = 0;
		int idwYear = 0;
		int idwMonth = 0;
		int idwDay = 0;
		int idwHour = 0;
		int idwMinute = 0;

		while (axCZKEM1.GetSuperLogData(iMachineNumber, ref idwTMachineNumber, ref idwSEnrollNumber, ref iParams4, ref iParams1, ref iParams2,
								ref idwManipulation, ref iParams3, ref idwYear, ref idwMonth, ref idwDay, ref idwHour, ref idwMinute))//get recordes from the memory
		{
			MessageBox.Show("iSuperLogCount:" + iSuperLogCount.ToString() +
			"idwTMachineNumber :" + idwTMachineNumber.ToString() +
			"idwSEnrollNumber:" + idwSEnrollNumber.ToString() +
			"iParams4:" + iParams4.ToString() +
			"iParams1:" + iParams1.ToString() +
			"iParams2:" + iParams2.ToString() +
			"idwManipulation:" + idwManipulation.ToString() +
			"iParams3:" + iParams3.ToString() +
			"idwYear:" + idwYear.ToString() + " - " + idwMonth.ToString() + "-" + idwDay.ToString() + " " + idwHour.ToString() + ":" + idwMinute.ToString() );
			iIndex++;
		}
	}
	else
	{
		axCZKEM1.GetLastError(ref idwErrorCode);

		if (idwErrorCode != 0)
		{
			MessageBox.Show("Reading data from terminal failed,ErrorCode: " + idwErrorCode.ToString(), "Error");
			return;
		}
		else
		{
			MessageBox.Show("No data from terminal returns!", "Error");
			return;
		}
	}
}

VB

  Private Sub GetSuperLogData(Optional ByVal sIp As String = "10.0.0.44", Optional ByVal iPort As Integer = 4370,
                       Optional ByVal iMachineNumber As Integer = 1)
        'Create Standalone SDK class dynamicly.
        Dim axCZKEM1 As New zkemkeeper.CZKEM
        axCZKEM1.Connect_Net(sIp, iPort)
        Dim idwErrorCode As Integer

        Dim iSuperLogCount As Integer
        Dim lvItem As New ListViewItem("Items", 0)

        If axCZKEM1.ReadSuperLogData(iMachineNumber) = True Then 'read the logs from the memory.(the same as axCZKEM1.ReadAllGLogData(iMachineNumber))
            Dim idwTMachineNumber As Integer
            Dim idwSEnrollNumber As Integer
            Dim iParams4 As Integer
            Dim iParams1 As Integer
            Dim iParams2 As Integer
            Dim idwManipulation As Integer
            Dim iParams3 As Integer
            Dim idwYear As Integer
            Dim idwMonth As Integer
            Dim idwDay As Integer
            Dim idwHour As Integer
            Dim idwMinute As Integer

            While axCZKEM1.GetSuperLogData(iMachineNumber, idwTMachineNumber, idwSEnrollNumber, iParams4, iParams1, iParams2, idwManipulation, iParams3, idwYear, idwMonth, idwDay, idwHour, idwMinute) = True
                iSuperLogCount += 1
                MsgBox("iSuperLogCount:" & iSuperLogCount.ToString() &
                "idwTMachineNumber: " & idwTMachineNumber.ToString() &
                "idwSEnrollNumber:" & idwSEnrollNumber.ToString() &
                "iParams4: " & iParams4.ToString() &
                "iParams1:" & iParams1.ToString() &
                "iParams2:" & iParams2.ToString() &
                "idwManipulation:" & idwManipulation.ToString() &
                "iParams3:" & iParams3.ToString() &
                "idwYear: " & idwYear.ToString() + "-" + idwMonth.ToString() + "-" + idwDay.ToString() + " " + idwHour.ToString() + ":" + idwMinute.ToString())
            End While
        Else
            axCZKEM1.GetLastError(idwErrorCode)

            If idwErrorCode <> 0 Then
                MsgBox("Reading data from terminal failed,ErrorCode:" & idwErrorCode.ToString(), MsgBoxStyle.Exclamation, "Error")
                Return
            Else
                MsgBox("No data from terminal returns!", MsgBoxStyle.Exclamation, "Error")
                Return
            End If
        End If
    End Sub