GetAllSLogData

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 same as GetSuperLogData except that interface names are different to achieve compatibility.

Parameter

Same as GetSuperLogData

Return Value

Return True if it is successful, or return False.

Related Function

GetSuperLogData

 

Ejemplo

C#

private void GetAllSLogData(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.GetAllSLogData(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 GetAllSLogData(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.GetAllSLogData(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