From a1211c21a5e253a1068042fa9bfdf19056c534ac Mon Sep 17 00:00:00 2001 From: Maxim Mamontov Date: Wed, 27 Jul 2011 14:44:10 +0300 Subject: [PATCH] Added specialization for unsigned in, long and unsigned long types --- .../stargazer/plugins/other/smux/value2os.h | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) 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 -- 2.44.2