added Fac_ERROR and Fac_RESULT codes to check if a requested feature could be set or not
This commit is contained in:
parent
18a1ee6340
commit
8465c25801
|
@ -99,6 +99,7 @@ struct asn1ReturnResult {
|
|||
struct asn1ReturnError {
|
||||
__u16 invokeId;
|
||||
__u16 errorValue;
|
||||
__u8 error[32];
|
||||
};
|
||||
|
||||
struct asn1Reject {
|
||||
|
|
|
@ -136,6 +136,8 @@ ParseReturnErrorComponent(struct asn1_parm *pc, u_char *p, u_char *end, int dumm
|
|||
}
|
||||
print_asn1msg(PRT_DEBUG_DECODE, "ReturnError: %s\n", error);
|
||||
|
||||
strcpy(pc->u.retError.error,error);
|
||||
|
||||
return p - beg;
|
||||
}
|
||||
|
||||
|
|
|
@ -95,6 +95,7 @@ int encodeFac (__u8 *dest, struct FacParm *fac)
|
|||
case Fac_Listen:
|
||||
case Fac_Suspend:
|
||||
case Fac_Resume:
|
||||
case Fac_RESULT:
|
||||
break;
|
||||
case Fac_CFActivate:
|
||||
len = encodeFacActivationDiversion(dest, &(fac->u.CFActivate));
|
||||
|
@ -110,6 +111,7 @@ int encodeFac (__u8 *dest, struct FacParm *fac)
|
|||
case Fac_CD:
|
||||
len = encodeFacCDeflection(dest, &(fac->u.CDeflection));
|
||||
}
|
||||
|
||||
return len;
|
||||
}
|
||||
|
||||
|
@ -171,7 +173,13 @@ int decodeFac (__u8 *src, struct FacParm *fac)
|
|||
}
|
||||
break;
|
||||
case returnResult:
|
||||
fac->Function = Fac_RESULT;
|
||||
return 0;
|
||||
case returnError:
|
||||
fac->Function = Fac_ERROR;
|
||||
fac->u.ERROR.errorValue = pc.u.retError.errorValue;
|
||||
strcpy(fac->u.ERROR.error, pc.u.retError.error);
|
||||
return 0;
|
||||
case reject:
|
||||
goto _dec_err;
|
||||
}
|
||||
|
|
|
@ -34,6 +34,8 @@
|
|||
|
||||
enum FacFunction {
|
||||
Fac_None = 0xffff,
|
||||
Fac_ERROR = 0xfffe,
|
||||
Fac_RESULT = 0xfffd,
|
||||
Fac_GetSupportedServices = 0x0000,
|
||||
Fac_Listen = 0x0001,
|
||||
Fac_Suspend = 0x0004,
|
||||
|
@ -47,6 +49,15 @@ enum FacFunction {
|
|||
Fac_AOCDChargingUnit = 0x0022,
|
||||
};
|
||||
|
||||
struct FacERROR {
|
||||
__u8 errorValue;
|
||||
__u8 error[32];
|
||||
};
|
||||
|
||||
struct FacRESULT {
|
||||
__u8 result;
|
||||
};
|
||||
|
||||
struct FacListen {
|
||||
__u32 NotificationMask;
|
||||
};
|
||||
|
@ -118,6 +129,8 @@ struct FacParm {
|
|||
struct FacCDeflection CDeflection;
|
||||
struct FacAOCDChargingUnit AOCDchu;
|
||||
struct FacAOCDCurrency AOCDcur;
|
||||
struct FacRESULT RESULT;
|
||||
struct FacERROR ERROR;
|
||||
} u;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue