From: Maxim Mamontov Date: Wed, 27 Jul 2011 11:44:10 +0000 (+0300) Subject: Added specialization for unsigned in, long and unsigned long types X-Git-Tag: 2.408-alpha~67 X-Git-Url: https://git.stg.codes/stg.git/commitdiff_plain/a1211c21a5e253a1068042fa9bfdf19056c534ac Added specialization for unsigned in, long and unsigned long types --- diff --git a/projects/stargazer/plugins/other/smux/value2os.h b/projects/stargazer/plugins/other/smux/value2os.h index 420616a1..20e62405 100644 --- a/projects/stargazer/plugins/other/smux/value2os.h +++ b/projects/stargazer/plugins/other/smux/value2os.h @@ -17,4 +17,37 @@ asn_long2INTEGER(&simpleSyntax->choice.number, value); return true; } +template <> +inline +bool ValueToOS(const unsigned int & value, ObjectSyntax * objectSyntax) +{ +objectSyntax->present = ObjectSyntax_PR_simple; +SimpleSyntax_t * simpleSyntax = &objectSyntax->choice.simple; +simpleSyntax->present = SimpleSyntax_PR_number; +asn_long2INTEGER(&simpleSyntax->choice.number, value); +return true; +} + +template <> +inline +bool ValueToOS(const long & value, ObjectSyntax * objectSyntax) +{ +objectSyntax->present = ObjectSyntax_PR_simple; +SimpleSyntax_t * simpleSyntax = &objectSyntax->choice.simple; +simpleSyntax->present = SimpleSyntax_PR_number; +asn_long2INTEGER(&simpleSyntax->choice.number, value); +return true; +} + +template <> +inline +bool ValueToOS(const unsigned long & value, ObjectSyntax * objectSyntax) +{ +objectSyntax->present = ObjectSyntax_PR_simple; +SimpleSyntax_t * simpleSyntax = &objectSyntax->choice.simple; +simpleSyntax->present = SimpleSyntax_PR_number; +asn_long2INTEGER(&simpleSyntax->choice.number, value); +return true; +} + #endif