|
|
@@ -931,22 +931,21 @@ void CGpioEntity::GetDevInfo(SpReqAnsContext<GpioService_GetDevInfo_Req, GpioSer
|
|
|
const ULONGLONG ullStart = SP::Module::Comm::RVCGetTickCount();
|
|
|
ErrorCodeEnum erroCode = m_hDevHelper->GetDevCategory(info);
|
|
|
const ULONGLONG ullEnd = SP::Module::Comm::RVCGetTickCount();
|
|
|
+ ctx->Ans.state = (int)erroCode;
|
|
|
if (erroCode == Error_Succeed) {
|
|
|
ctx->Ans.model = info.szModel;
|
|
|
- ctx->Ans.state = (int)info.eState;
|
|
|
ctx->Ans.type = info.szType;
|
|
|
ctx->Ans.version = CSimpleStringA::Format("%d.%d.%d.%d",
|
|
|
info.version.wMajor, info.version.wMinor, info.version.wRevision, info.version.wBuild);
|
|
|
DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_USER).setLogCode(GpioService_LogCode_GetDevInfo)
|
|
|
.setAPI("DevAdapter::GetDevCategory").setCostTime(ullEnd - ullStart)("model: %s, state:%d, type:%s, version:%s"
|
|
|
, ctx->Ans.model.GetData(), ctx->Ans.state, ctx->Ans.type.GetData(), ctx->Ans.version.GetData());
|
|
|
- ctx->Answer(erroCode);
|
|
|
}
|
|
|
else {
|
|
|
DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_USER).setLogCode(GpioService_LogCode_GetDevInfo).setAPI("DevAdapter::GetDevCategory")
|
|
|
.setCostTime(ullEnd - ullStart).setResultCode("RTA2904")("GetDevInfo failed: %s", SpStrError(erroCode));
|
|
|
- ctx->Answer(erroCode, GPIO_UserErrorCode_GetDevCategory_Failed);
|
|
|
}
|
|
|
+ ctx->Answer(Error_Succeed);
|
|
|
}
|
|
|
}
|
|
|
|