| // This C++ header file was generated by the TTCN-3 compiler |
| // of the TTCN-3 Test Executor version CRL 113 200/6 R6A |
| // for Lénárd Nagy (elnrnag@elx78355y6x) on Thu Oct 24 10:29:40 2019 |
| |
| // Copyright (c) 2000-2019 Ericsson Telecom AB |
| |
| // Do not edit this file unless you know what you are doing. |
| |
| #ifndef Isotptest_HH |
| #define Isotptest_HH |
| |
| #ifdef TITAN_RUNTIME_2 |
| #error Generated code does not match with used runtime.\ |
| Code was generated without -R option but -DTITAN_RUNTIME_2 was used. |
| #endif |
| |
| /* Header file includes */ |
| |
| #include <TTCN3.hh> |
| #include "CanError.hh" |
| #include "SocketCAN_PortType.hh" |
| #include "SocketCAN_Templates.hh" |
| #include "Isotp.hh" |
| |
| #if TTCN3_VERSION != 60600 |
| #error Version mismatch detected.\ |
| Please check the version of the TTCN-3 compiler and the base library.\ |
| Run make clean and rebuild the project if the version of the compiler changed recently. |
| #endif |
| |
| #ifndef LINUX |
| #error This file should be compiled on LINUX |
| #endif |
| |
| #undef Isotptest_HH |
| #endif |
| |
| namespace Isotptest { |
| |
| /* Forward declarations of classes */ |
| |
| class SocketCAN__open__socket__type; |
| class SocketCAN__open__socket__type_template; |
| class SocketCAN__open__isotp__result; |
| class SocketCAN__open__isotp__result_template; |
| |
| } /* end of namespace */ |
| |
| #ifndef Isotptest_HH |
| #define Isotptest_HH |
| |
| namespace Isotptest { |
| |
| /* Type definitions */ |
| |
| typedef COMPONENT MTC__CT; |
| typedef COMPONENT_template MTC__CT_template; |
| typedef COMPONENT PTC__isotp__CT; |
| typedef COMPONENT_template PTC__isotp__CT_template; |
| |
| /* Class definitions */ |
| |
| class SocketCAN__open__socket__type : public Base_Type { // enum |
| friend class SocketCAN__open__socket__type_template; |
| public: |
| enum enum_type { OPEN__CAN__RAW = 0, OPEN__CAN__BCM = 1, OPEN__CAN__ISOTP = 2, UNKNOWN_VALUE = 3, UNBOUND_VALUE = 4 }; |
| private: |
| enum_type enum_value; |
| |
| public: |
| SocketCAN__open__socket__type(); |
| SocketCAN__open__socket__type(int other_value); |
| SocketCAN__open__socket__type(enum_type other_value); |
| SocketCAN__open__socket__type(const SocketCAN__open__socket__type& other_value); |
| |
| SocketCAN__open__socket__type& operator=(int other_value); |
| SocketCAN__open__socket__type& operator=(enum_type other_value); |
| SocketCAN__open__socket__type& operator=(const SocketCAN__open__socket__type& other_value); |
| |
| boolean operator==(enum_type other_value) const; |
| boolean operator==(const SocketCAN__open__socket__type& other_value) const; |
| inline boolean operator!=(enum_type other_value) const { return !(*this == other_value); } |
| inline boolean operator!=(const SocketCAN__open__socket__type& other_value) const { return !(*this == other_value); } |
| boolean operator<(enum_type other_value) const; |
| boolean operator<(const SocketCAN__open__socket__type& other_value) const; |
| boolean operator>(enum_type other_value) const; |
| boolean operator>(const SocketCAN__open__socket__type& other_value) const; |
| inline boolean operator<=(enum_type other_value) const { return !(*this > other_value); } |
| inline boolean operator<=(const SocketCAN__open__socket__type& other_value) const { return !(*this > other_value); } |
| inline boolean operator>=(enum_type other_value) const { return !(*this < other_value); } |
| inline boolean operator>=(const SocketCAN__open__socket__type& other_value) const { return !(*this < other_value); } |
| |
| static const char *enum_to_str(enum_type enum_par); |
| static enum_type str_to_enum(const char *str_par); |
| static boolean is_valid_enum(int int_par); |
| |
| static int enum2int(enum_type enum_par); |
| static int enum2int(const SocketCAN__open__socket__type& enum_par); |
| int as_int() const { return enum2int(enum_value); } |
| void from_int(int p_val) { *this = p_val; } |
| void int2enum(int int_val); |
| operator enum_type() const; |
| inline boolean is_bound() const { return enum_value != UNBOUND_VALUE; } |
| inline boolean is_value() const { return enum_value != UNBOUND_VALUE; } |
| inline void clean_up(){ enum_value = UNBOUND_VALUE; } |
| inline boolean is_present() const { return is_bound(); } |
| void log() const; |
| void set_param(Module_Param& param); |
| void encode_text(Text_Buf& text_buf) const; |
| void decode_text(Text_Buf& text_buf); |
| }; |
| |
| class SocketCAN__open__socket__type_template : public Base_Template { |
| union { |
| SocketCAN__open__socket__type::enum_type single_value; |
| struct { |
| unsigned int n_values; |
| SocketCAN__open__socket__type_template *list_value; |
| } value_list; |
| }; |
| |
| void copy_template(const SocketCAN__open__socket__type_template& other_value); |
| |
| public: |
| SocketCAN__open__socket__type_template(); |
| SocketCAN__open__socket__type_template(template_sel other_value); |
| SocketCAN__open__socket__type_template(int other_value); |
| SocketCAN__open__socket__type_template(SocketCAN__open__socket__type::enum_type other_value); |
| SocketCAN__open__socket__type_template(const SocketCAN__open__socket__type& other_value); |
| SocketCAN__open__socket__type_template(const OPTIONAL<SocketCAN__open__socket__type>& other_value); |
| SocketCAN__open__socket__type_template(const SocketCAN__open__socket__type_template& other_value); |
| ~SocketCAN__open__socket__type_template(); |
| |
| boolean is_bound() const; |
| boolean is_value() const; |
| void clean_up(); |
| SocketCAN__open__socket__type_template& operator=(template_sel other_value); |
| SocketCAN__open__socket__type_template& operator=(int other_value); |
| SocketCAN__open__socket__type_template& operator=(SocketCAN__open__socket__type::enum_type other_value); |
| SocketCAN__open__socket__type_template& operator=(const SocketCAN__open__socket__type& other_value); |
| SocketCAN__open__socket__type_template& operator=(const OPTIONAL<SocketCAN__open__socket__type>& other_value); |
| SocketCAN__open__socket__type_template& operator=(const SocketCAN__open__socket__type_template& other_value); |
| |
| boolean match(SocketCAN__open__socket__type::enum_type other_value, boolean legacy = FALSE) const; |
| boolean match(const SocketCAN__open__socket__type& other_value, boolean legacy = FALSE) const; |
| SocketCAN__open__socket__type::enum_type valueof() const; |
| void set_type(template_sel template_type, unsigned int list_length); |
| SocketCAN__open__socket__type_template& list_item(unsigned int list_index); |
| void log() const; |
| void log_match(const SocketCAN__open__socket__type& match_value, boolean legacy = FALSE) const; |
| void encode_text(Text_Buf& text_buf) const; |
| void decode_text(Text_Buf& text_buf); |
| boolean is_present(boolean legacy = FALSE) const; |
| boolean match_omit(boolean legacy = FALSE) const; |
| void set_param(Module_Param& param); |
| void check_restriction(template_res t_res, const char* t_name=NULL, boolean legacy = FALSE) const; |
| }; |
| |
| class SocketCAN__open__isotp__result { |
| SocketCAN__Types::SocketCAN__ifr field_ifr; |
| INTEGER field_socket__id; |
| public: |
| SocketCAN__open__isotp__result(); |
| SocketCAN__open__isotp__result(const SocketCAN__Types::SocketCAN__ifr& par_ifr, |
| const INTEGER& par_socket__id); |
| SocketCAN__open__isotp__result(const SocketCAN__open__isotp__result& other_value); |
| inline boolean is_component() { return FALSE; } |
| void clean_up(); |
| const TTCN_Typedescriptor_t* get_descriptor() const; |
| SocketCAN__open__isotp__result& operator=(const SocketCAN__open__isotp__result& other_value); |
| boolean operator==(const SocketCAN__open__isotp__result& other_value) const; |
| inline boolean operator!=(const SocketCAN__open__isotp__result& other_value) const |
| { return !(*this == other_value); } |
| |
| boolean is_bound() const; |
| |
| inline boolean is_present() const { return is_bound(); } |
| boolean is_value() const; |
| |
| inline SocketCAN__Types::SocketCAN__ifr& ifr() |
| {return field_ifr;} |
| inline const SocketCAN__Types::SocketCAN__ifr& ifr() const |
| {return field_ifr;} |
| inline INTEGER& socket__id() |
| {return field_socket__id;} |
| inline const INTEGER& socket__id() const |
| {return field_socket__id;} |
| inline int size_of() const |
| {return 2;} |
| void log() const; |
| void set_param(Module_Param& param); |
| void set_implicit_omit(); |
| void encode_text(Text_Buf& text_buf) const; |
| void decode_text(Text_Buf& text_buf); |
| }; |
| |
| class SocketCAN__open__isotp__result_template : public Base_Template { |
| struct single_value_struct; |
| union { |
| single_value_struct *single_value; |
| struct { |
| unsigned int n_values; |
| SocketCAN__open__isotp__result_template *list_value; |
| } value_list; |
| }; |
| |
| void set_specific(); |
| void copy_value(const SocketCAN__open__isotp__result& other_value); |
| void copy_template(const SocketCAN__open__isotp__result_template& other_value); |
| |
| public: |
| SocketCAN__open__isotp__result_template(); |
| SocketCAN__open__isotp__result_template(template_sel other_value); |
| SocketCAN__open__isotp__result_template(const SocketCAN__open__isotp__result& other_value); |
| SocketCAN__open__isotp__result_template(const OPTIONAL<SocketCAN__open__isotp__result>& other_value); |
| SocketCAN__open__isotp__result_template(const SocketCAN__open__isotp__result_template& other_value); |
| ~SocketCAN__open__isotp__result_template(); |
| SocketCAN__open__isotp__result_template& operator=(template_sel other_value); |
| SocketCAN__open__isotp__result_template& operator=(const SocketCAN__open__isotp__result& other_value); |
| SocketCAN__open__isotp__result_template& operator=(const OPTIONAL<SocketCAN__open__isotp__result>& other_value); |
| SocketCAN__open__isotp__result_template& operator=(const SocketCAN__open__isotp__result_template& other_value); |
| boolean match(const SocketCAN__open__isotp__result& other_value, boolean legacy = FALSE) const; |
| boolean is_bound() const; |
| boolean is_value() const; |
| void clean_up(); |
| SocketCAN__open__isotp__result valueof() const; |
| void set_type(template_sel template_type, unsigned int list_length); |
| SocketCAN__open__isotp__result_template& list_item(unsigned int list_index) const; |
| SocketCAN__Types::SocketCAN__ifr_template& ifr(); |
| const SocketCAN__Types::SocketCAN__ifr_template& ifr() const; |
| INTEGER_template& socket__id(); |
| const INTEGER_template& socket__id() const; |
| int size_of() const; |
| void log() const; |
| void log_match(const SocketCAN__open__isotp__result& match_value, boolean legacy = FALSE) const; |
| void encode_text(Text_Buf& text_buf) const; |
| void decode_text(Text_Buf& text_buf); |
| void set_param(Module_Param& param); |
| void check_restriction(template_res t_res, const char* t_name=NULL, boolean legacy = FALSE) const; |
| boolean is_present(boolean legacy = FALSE) const; |
| boolean match_omit(boolean legacy = FALSE) const; |
| }; |
| |
| |
| /* Function prototypes */ |
| |
| extern SocketCAN__Types::SocketCAN__socket__result f__open__socket(const SocketCAN__open__socket__type& v__socket__type); |
| extern void start_f__open__socket(const COMPONENT& component_reference, const SocketCAN__open__socket__type& v__socket__type); |
| extern SocketCAN__open__isotp__result f__open__isotp(const OCTETSTRING& p__rx__can__id, const OCTETSTRING& p__tx__can__id); |
| extern void start_f__open__isotp(const COMPONENT& component_reference, const OCTETSTRING& p__rx__can__id, const OCTETSTRING& p__tx__can__id); |
| extern SocketCAN__Types::SocketCAN__ioctl__result f__ioctl__get__if__index(const INTEGER& p__socket__id); |
| extern void start_f__ioctl__get__if__index(const COMPONENT& component_reference, const INTEGER& p__socket__id); |
| extern SocketCAN__Types::SocketCAN__bind__result f__bind(const INTEGER& p__socket__id, const INTEGER& p__if__index, const OCTETSTRING& p__rx__can__id, const OCTETSTRING& p__tx__can__id); |
| extern void start_f__bind(const COMPONENT& component_reference, const INTEGER& p__socket__id, const INTEGER& p__if__index, const OCTETSTRING& p__rx__can__id, const OCTETSTRING& p__tx__can__id); |
| extern void f__close__socket(const INTEGER& p__socket__id); |
| extern void start_f__close__socket(const COMPONENT& component_reference, const INTEGER& p__socket__id); |
| extern void f__send__isotp__message(const INTEGER& p__socket__id, const OCTETSTRING& p__pdu); |
| extern void start_f__send__isotp__message(const COMPONENT& component_reference, const INTEGER& p__socket__id, const OCTETSTRING& p__pdu); |
| extern void f__behaviour__isotp(const BOOLEAN& p__initiator, const OCTETSTRING& p__rx__can__id, const OCTETSTRING& p__tx__can__id); |
| extern void start_f__behaviour__isotp(const COMPONENT& component_reference, const BOOLEAN& p__initiator, const OCTETSTRING& p__rx__can__id, const OCTETSTRING& p__tx__can__id); |
| extern verdicttype testcase_tc__Isotp__Example001(boolean has_timer, double timer_value); |
| |
| /* Global variable declarations */ |
| |
| extern const FLOAT& c__guard; |
| extern const TTCN_Typedescriptor_t SocketCAN__open__socket__type_descr_; |
| extern const XERdescriptor_t SocketCAN__open__isotp__result_socket__id_xer_; |
| extern const TTCN_OERdescriptor_t SocketCAN__open__isotp__result_socket__id_oer_; |
| extern const TTCN_Typedescriptor_t SocketCAN__open__isotp__result_socket__id_descr_; |
| extern const TTCN_Typedescriptor_t SocketCAN__open__isotp__result_descr_; |
| extern const TTCN_Typedescriptor_t& MTC__CT_descr_; |
| extern const TTCN_Typedescriptor_t& PTC__isotp__CT_descr_; |
| extern SocketCAN__PortType::SocketCAN__PT PTC__isotp__CT_component_pt__socketCAN; |
| extern TIMER PTC__isotp__CT_component_T0; |
| extern TTCN_Module module_object; |
| |
| } /* end of namespace */ |
| |
| #endif |