示例#1
0
static swi_status_t emp_init_with_callbacks()
{
  swi_status_t res;

  res = emp_parser_init(1, empCmds, empHldrs, empReconnectionCallback);
  if (res != SWI_STATUS_OK)
    return res;

  res = emp_parser_init(1, empCmds, empHldrs, empReconnectionCallback);
  if (res != SWI_STATUS_OK)
    return res;
  return SWI_STATUS_OK;
}
示例#2
0
static swi_status_t emp_init()
{
  swi_status_t res;

  res = emp_parser_destroy(SWI_EMP_DESTROY_NO_CMDS);
  if (res != SWI_STATUS_OK)
    return res;

  res = emp_parser_init(SWI_EMP_INIT_NO_CMDS);
  if (res != SWI_STATUS_OK)
    return res;

  res = emp_parser_init(SWI_EMP_INIT_NO_CMDS);
  if (res != SWI_STATUS_OK)
    return res;
  return SWI_STATUS_OK;
}
示例#3
0
swi_status_t swi_sys_Init()
{
  swi_status_t res;

  if (module_initialized)
    return SWI_STATUS_OK;

  res = emp_parser_init(SWI_EMP_INIT_NO_CMDS);
  if (res != SWI_STATUS_OK)
    return res;
  module_initialized = 1;
  return SWI_STATUS_OK;
}
示例#4
0
rc_ReturnCode_t swi_sms_Init()
{
  rc_ReturnCode_t res;

  if (module_initialized)
    return RC_OK;

  res = emp_parser_init(1, empCmds, empHldrs, empReregisterServices); // No async EMP cmd is managed by this lib
  if (res != RC_OK)
  {
    SWI_LOG("SMS", ERROR, "%s: Error while init emp lib, res=%d\n", __FUNCTION__, res);
    return res;
  }
  module_initialized = 1;
  return RC_OK;
}