X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/a1211c21a5e253a1068042fa9bfdf19056c534ac..46b0747592074017ff0ea4b33d4a7194235886e5:/projects/stargazer/plugins/other/smux/value2os.h?ds=sidebyside diff --git a/projects/stargazer/plugins/other/smux/value2os.h b/projects/stargazer/plugins/other/smux/value2os.h deleted file mode 100644 index 20e62405..00000000 --- a/projects/stargazer/plugins/other/smux/value2os.h +++ /dev/null @@ -1,53 +0,0 @@ -#ifndef __VALUE_2_OS_H__ -#define __VALUE_2_OS_H__ - -#include "stg/ObjectSyntax.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; -} - -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