INT32 as_service_start(struct as_service_param *asp) { struct libpub_cmd cmd; if (as_info != NULL) return 0; #ifndef __MM_VBV_START_ADDR #if (DATA_BROADCAST==DATA_BROADCAST_IPANEL) #else if(NULL == as_buf) { as_buf = MALLOC(AS_BUF_LEN); } #endif #endif as_info = (struct as_module_info *)__MM_AS_START_ADDR; MEMSET(as_info, 0, sizeof(struct as_module_info)); MEMCPY(&as_info->param, asp, sizeof(struct as_service_param)); as_info->param.as_prog_attr |= P_SEARCH_SATTP; as_info->sat_nr = asp->as_sat_cnt; if(as_info->sat_nr > AS_MODULE_MAX_S_NUM) as_info->sat_nr = AS_MODULE_MAX_S_NUM; MEMCPY(as_info->sat_id, asp->sat_ids,as_info->sat_nr*sizeof(UINT16)); cmd.cmd_type = LIBPUB_CMD_AS_START; return libpub_send_cmd(&cmd, OSAL_WAIT_FOREVER_TIME); }
/*description : start an auto-scan according to the parameter asp.*/ INT32 as_service_start(struct as_service_param *asp) { struct libpub_cmd cmd; if (as_info != NULL) return 0; #ifndef __MM_VBV_START_ADDR if(NULL == as_buf) { as_buf = MALLOC(AS_BUF_LEN); } #endif as_info = (struct as_module_info *)__MM_AS_START_ADDR; MEMSET(as_info, 0, sizeof(struct as_module_info)); MEMCPY(&as_info->param, asp, sizeof(struct as_service_param)); as_info->param.as_prog_attr |= P_SEARCH_SATTP; if(asp->as_frontend_type==FRONTEND_TYPE_S) { FIXED_PRINTF("as_service_start*********************\n"); dvbs_as_callback(AS_SGN_INIT, 0, 0, 0, 0); } else if(asp->as_frontend_type == FRONTEND_TYPE_T ) { } as_info->sat_nr = asp->as_sat_cnt; if(as_info->sat_nr > AS_MODULE_MAX_S_NUM) as_info->sat_nr = AS_MODULE_MAX_S_NUM; MEMCPY(as_info->sat_id, asp->sat_ids,as_info->sat_nr*sizeof(UINT16)); cmd.cmd_type = LIBPUB_CMD_AS_START; return libpub_send_cmd(&cmd, OSAL_WAIT_FOREVER_TIME); }