Protocol updates for more flexibility and better testing.
This commit is contained in:
+2
-27
@@ -80,31 +80,6 @@ rejectionReason_6_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
|
||||
return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
|
||||
}
|
||||
|
||||
static int
|
||||
memb_yourRelativeBet_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
|
||||
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
|
||||
long value;
|
||||
|
||||
if(!sptr) {
|
||||
_ASN_CTFAIL(app_key, td, sptr,
|
||||
"%s: value not given (%s:%d)",
|
||||
td->name, __FILE__, __LINE__);
|
||||
return -1;
|
||||
}
|
||||
|
||||
value = *(const long *)sptr;
|
||||
|
||||
if((value >= 0 && value <= 10000000)) {
|
||||
/* Constraint check succeeded */
|
||||
return 0;
|
||||
} else {
|
||||
_ASN_CTFAIL(app_key, td, sptr,
|
||||
"%s: constraint failed (%s:%d)",
|
||||
td->name, __FILE__, __LINE__);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
static asn_INTEGER_enum_map_t asn_MAP_rejectionReason_value2enum_6[] = {
|
||||
{ 1, 24, "rejectedInvalidGameState" },
|
||||
{ 2, 19, "rejectedNotYourTurn" },
|
||||
@@ -182,8 +157,8 @@ static asn_TYPE_member_t asn_MBR_YourActionRejectedMessage_1[] = {
|
||||
{ ATF_NOFLAGS, 0, offsetof(struct YourActionRejectedMessage, yourRelativeBet),
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
|
||||
0,
|
||||
&asn_DEF_NativeInteger,
|
||||
memb_yourRelativeBet_constraint_1,
|
||||
&asn_DEF_AmountOfMoney,
|
||||
0, /* Defer constraints checking to the member type */
|
||||
0, /* PER is not compiled, use -gen-PER */
|
||||
0,
|
||||
"yourRelativeBet"
|
||||
|
||||
Reference in New Issue
Block a user