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