Security of Software Protection EtherCAT Programming Guide
29-4 March, 2017
29
29.2 _ECAT_Security_Get_Check_Verifykey_State
Syntax
U16 PASCAL _ECAT_Security_Get_Check_Verifykey_State (U16 CardNo, U16 *State )
Purpose
Check the verification status and result of checking the verification key.
Note: The function of verification check will not be completed unless the return code is not 2.
Parameter
Name Data type Property Description
CardNo U16 Number Card No.
State U16*
Status
Return code:
0: Verification sussesful.
1: Verification failed.
2: Verification in process.
3: _ECAT_Security_Check_Verifykey is not executed.
4: Processing error of
_ECAT_Security_Check_Verifykey
Example
U16 Status = 0;
U16 CardNo = 0, State = 0;
U32 Key[8] = {0, 0, 0, 0, 0, 0, 0, 0};
// Check the verification key
Status= _ECAT_Security_Check_Verifykey ( CardNo, Key );
// Wait for the result
While (1)
{
Status= _ECAT_Security_Get_Check_Verifykey_State ( CardNo, &State );
if (State != 2)
{
// Verification check is done. User can check the result from the return code.
break;
}
}