PPC_CMD_TAB_LOAD

Este comando efetua o processo completo de carga de novas tabelas no pin pad. Em caso de erro, as tabelas anteriores são mantidas.

Parâmetros de entrada

ConstantePresençaObservação
PPC_INP_INITVERMÚltimos 10 caracteres da Versão da Inicialização. Corresponde a JSON{"InitializationVersion"}.
PPC_INP_TABAIDMCorresponde a JSON{"AidParameters"}.
PPC_INP_TABCAPKMCorresponde a JSON{"PublicKeys"}.

Dados de resposta

Não há.

Retornos

RetornoDescrição
PPC_OKTabelas atualizadas com sucesso.
PPC_NOTOPENO comando PPC_CMD_OPEN não foi chamado previamente.
PPC_ERRMANDATUm parâmetro mandatório não foi fornecido.

Outros retornos: Ver Códigos de retorno.

Exemplo

int iCheckTables (const char *pszInitializationVersion, 
                  const char *pszAidParameters, 
                  const char *pszPublicKeys) 
{ 
   int iSt; 
   char szTableVer[11]; 

   iSt = PPC_ExecCmdNBlk (PPC_CMD_TAB_VER); 
   if (iSt != PPC_OK) return iSt; 

   PPC_GetResp (PPC_OUT_TABVER, sizeof (szTableVer), szTableVer); 
   if (!strcmp (&pszInitializationVersion[3], szTableVer) 
      return PPC_OK; // Se 10 últimos carateres forem iguais, sai OK. 

   PPC_SetParam (PPC_INP_INITVER, &pszInitializationVersion[3], 10); 
   PPC_SetParam (PPC_INP_TABAID, pszAidParameters, -1); 
   PPC_SetParam (PPC_INP_TABCAPK, pszPublicKeys, -1); 

   iSt = PPC_ExecCmdNBlk (PPC_CMD_TAB_LOAD); 
   return iSt; 
} 

Did this page help you?