]> git.stg.codes - stg.git/blob - projects/stargazer/plugins/other/smux/value2os.h
ASN.1 generated code moved to library
[stg.git] / projects / stargazer / plugins / other / smux / value2os.h
1 #ifndef __VALUE_2_OS_H__
2 #define __VALUE_2_OS_H__
3
4 template <typename T>
5 bool ValueToOS(const T & value, ObjectSyntax * objectSyntax);
6
7 template <>
8 inline
9 bool ValueToOS<int>(const int & value, ObjectSyntax * objectSyntax)
10 {
11 objectSyntax->present = ObjectSyntax_PR_simple;
12 SimpleSyntax_t * simpleSyntax = &objectSyntax->choice.simple;
13 simpleSyntax->present = SimpleSyntax_PR_number;
14 asn_long2INTEGER(&simpleSyntax->choice.number, value);
15 return true;
16 }
17
18 #endif