X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/aa24fde9f922b0dd8c37ed16ac84aa77157c50ae..52b4afb2c72468a55fb49aeed3f7dda1277319df:/projects/stargazer/plugins/other/smux/value2os.h?ds=inline diff --git a/projects/stargazer/plugins/other/smux/value2os.h b/projects/stargazer/plugins/other/smux/value2os.h new file mode 100644 index 00000000..830fb3b3 --- /dev/null +++ b/projects/stargazer/plugins/other/smux/value2os.h @@ -0,0 +1,18 @@ +#ifndef __VALUE_2_OS_H__ +#define __VALUE_2_OS_H__ + +template +bool ValueToOS(const T & value, ObjectSyntax * objectSyntax); + +template <> +inline +bool ValueToOS(const 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; +} + +#endif