blob: 78eb682a7233b8cd3dc47c40c975e7b5ad57f4a5 [file] [log] [blame]
// 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 Isobustest_HH
#define Isobustest_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 "SocketCANtest.hh"
#include "Isobus_Templates.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 Isobustest_HH
#endif
namespace Isobustest {
/* Forward declarations of classes */
class CAN__ID;
class CAN__ID_template;
class RTR;
class RTR_template;
class Can__IDs;
class Can__IDs_template;
class Can__IDwithType;
class Can__IDwithType_template;
class OpenConnections;
class OpenConnections_template;
typedef PreGenRecordOf::PREGEN__RECORD__OF__BOOLEAN OpenConnectionsFlags;
typedef PreGenRecordOf::PREGEN__RECORD__OF__BOOLEAN_template OpenConnectionsFlags_template;
class Isobus__PT;
class SyncMasterPort;
class SyncSlavePort;
class PTCSet;
class PTCSet_template;
} /* end of namespace */
#ifndef Isobustest_HH
#define Isobustest_HH
namespace Isobustest {
/* Type definitions */
typedef BITSTRING BIT29;
typedef BITSTRING_template BIT29_template;
typedef COMPONENT MTC__CT;
typedef COMPONENT_template MTC__CT_template;
typedef COMPONENT PTC__isobus__CT;
typedef COMPONENT_template PTC__isobus__CT_template;
typedef COMPONENT PTC2__CT;
typedef COMPONENT_template PTC2__CT_template;
typedef COMPONENT PTC1__CT;
typedef COMPONENT_template PTC1__CT_template;
typedef COMPONENT PTC;
typedef COMPONENT_template PTC_template;
/* Class definitions */
class CAN__ID : public Base_Type {
public:
enum union_selection_type { UNBOUND_VALUE = 0, ALT_can__eff = 1, ALT_can__sff = 2, ALT_can__rtr = 3, ALT_can__err = 4 };
private:
union_selection_type union_selection;
union {
OCTETSTRING *field_can__eff;
OCTETSTRING *field_can__sff;
RTR *field_can__rtr;
BITSTRING *field_can__err;
};
void copy_value(const CAN__ID& other_value);
public:
CAN__ID();
CAN__ID(const CAN__ID& other_value);
~CAN__ID();
CAN__ID& operator=(const CAN__ID& other_value);
boolean operator==(const CAN__ID& other_value) const;
inline boolean operator!=(const CAN__ID& other_value) const { return !(*this == other_value); }
OCTETSTRING& can__eff();
const OCTETSTRING& can__eff() const;
OCTETSTRING& can__sff();
const OCTETSTRING& can__sff() const;
RTR& can__rtr();
const RTR& can__rtr() const;
BITSTRING& can__err();
const BITSTRING& can__err() const;
inline union_selection_type get_selection() const { return union_selection; }
boolean ischosen(union_selection_type checked_selection) const;
boolean is_bound() const;
boolean is_value() const;
void clean_up();
inline boolean is_present() const { return is_bound(); }
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 CAN__ID_template : public Base_Template {
union {
struct {
CAN__ID::union_selection_type union_selection;
union {
OCTETSTRING_template *field_can__eff;
OCTETSTRING_template *field_can__sff;
RTR_template *field_can__rtr;
BITSTRING_template *field_can__err;
};
} single_value;
struct {
unsigned int n_values;
CAN__ID_template *list_value;
} value_list;
};
void copy_value(const CAN__ID& other_value);
void copy_template(const CAN__ID_template& other_value);
public:
CAN__ID_template();
CAN__ID_template(template_sel other_value);
CAN__ID_template(const CAN__ID& other_value);
CAN__ID_template(const OPTIONAL<CAN__ID>& other_value);
CAN__ID_template(const CAN__ID_template& other_value);
~CAN__ID_template();
void clean_up();
CAN__ID_template& operator=(template_sel other_value);
CAN__ID_template& operator=(const CAN__ID& other_value);
CAN__ID_template& operator=(const OPTIONAL<CAN__ID>& other_value);
CAN__ID_template& operator=(const CAN__ID_template& other_value);
boolean match(const CAN__ID& other_value, boolean legacy = FALSE) const;
boolean is_value() const;CAN__ID valueof() const;
CAN__ID_template& list_item(unsigned int list_index) const;
void set_type(template_sel template_type, unsigned int list_length);
OCTETSTRING_template& can__eff();
const OCTETSTRING_template& can__eff() const;
OCTETSTRING_template& can__sff();
const OCTETSTRING_template& can__sff() const;
RTR_template& can__rtr();
const RTR_template& can__rtr() const;
BITSTRING_template& can__err();
const BITSTRING_template& can__err() const;
boolean ischosen(CAN__ID::union_selection_type checked_selection) const;
void log() const;
void log_match(const CAN__ID& 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 RTR : public Base_Type { // enum
friend class RTR_template;
public:
enum enum_type { RTRNULL = 0, UNKNOWN_VALUE = 1, UNBOUND_VALUE = 2 };
private:
enum_type enum_value;
public:
RTR();
RTR(int other_value);
RTR(enum_type other_value);
RTR(const RTR& other_value);
RTR& operator=(int other_value);
RTR& operator=(enum_type other_value);
RTR& operator=(const RTR& other_value);
boolean operator==(enum_type other_value) const;
boolean operator==(const RTR& other_value) const;
inline boolean operator!=(enum_type other_value) const { return !(*this == other_value); }
inline boolean operator!=(const RTR& other_value) const { return !(*this == other_value); }
boolean operator<(enum_type other_value) const;
boolean operator<(const RTR& other_value) const;
boolean operator>(enum_type other_value) const;
boolean operator>(const RTR& other_value) const;
inline boolean operator<=(enum_type other_value) const { return !(*this > other_value); }
inline boolean operator<=(const RTR& other_value) const { return !(*this > other_value); }
inline boolean operator>=(enum_type other_value) const { return !(*this < other_value); }
inline boolean operator>=(const RTR& 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 RTR& 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);
void encode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, TTCN_EncDec::coding_t, ...) const;
void decode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, TTCN_EncDec::coding_t, ...);
int RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree&) const;
int RAW_decode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, int, raw_order_t, boolean no_err=FALSE,int sel_field=-1, boolean first_call=TRUE, const RAW_Force_Omit* force_omit = NULL);
};
class RTR_template : public Base_Template {
union {
RTR::enum_type single_value;
struct {
unsigned int n_values;
RTR_template *list_value;
} value_list;
};
void copy_template(const RTR_template& other_value);
public:
RTR_template();
RTR_template(template_sel other_value);
RTR_template(int other_value);
RTR_template(RTR::enum_type other_value);
RTR_template(const RTR& other_value);
RTR_template(const OPTIONAL<RTR>& other_value);
RTR_template(const RTR_template& other_value);
~RTR_template();
boolean is_bound() const;
boolean is_value() const;
void clean_up();
RTR_template& operator=(template_sel other_value);
RTR_template& operator=(int other_value);
RTR_template& operator=(RTR::enum_type other_value);
RTR_template& operator=(const RTR& other_value);
RTR_template& operator=(const OPTIONAL<RTR>& other_value);
RTR_template& operator=(const RTR_template& other_value);
boolean match(RTR::enum_type other_value, boolean legacy = FALSE) const;
boolean match(const RTR& other_value, boolean legacy = FALSE) const;
RTR::enum_type valueof() const;
void set_type(template_sel template_type, unsigned int list_length);
RTR_template& list_item(unsigned int list_index);
void log() const;
void log_match(const RTR& 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 Can__IDs : public Base_Type {
public:
enum union_selection_type { UNBOUND_VALUE = 0, ALT_can__eff = 1, ALT_can__sff = 2, ALT_can__rtr = 3, ALT_can__err = 4 };
private:
union_selection_type union_selection;
union {
BITSTRING *field_can__eff;
BITSTRING *field_can__sff;
RTR *field_can__rtr;
BITSTRING *field_can__err;
};
void copy_value(const Can__IDs& other_value);
public:
Can__IDs();
Can__IDs(const Can__IDs& other_value);
~Can__IDs();
Can__IDs& operator=(const Can__IDs& other_value);
boolean operator==(const Can__IDs& other_value) const;
inline boolean operator!=(const Can__IDs& other_value) const { return !(*this == other_value); }
BITSTRING& can__eff();
const BITSTRING& can__eff() const;
BITSTRING& can__sff();
const BITSTRING& can__sff() const;
RTR& can__rtr();
const RTR& can__rtr() const;
BITSTRING& can__err();
const BITSTRING& can__err() const;
inline union_selection_type get_selection() const { return union_selection; }
boolean ischosen(union_selection_type checked_selection) const;
boolean is_bound() const;
boolean is_value() const;
void clean_up();
inline boolean is_present() const { return is_bound(); }
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);
void encode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, TTCN_EncDec::coding_t, ...) const;
void decode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, TTCN_EncDec::coding_t, ...);
int RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree&) const;
int RAW_decode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, int, raw_order_t, boolean no_err=FALSE,int sel_field=-1, boolean first_call=TRUE, const RAW_Force_Omit* force_omit = NULL);
};
class Can__IDs_template : public Base_Template {
union {
struct {
Can__IDs::union_selection_type union_selection;
union {
BITSTRING_template *field_can__eff;
BITSTRING_template *field_can__sff;
RTR_template *field_can__rtr;
BITSTRING_template *field_can__err;
};
} single_value;
struct {
unsigned int n_values;
Can__IDs_template *list_value;
} value_list;
};
void copy_value(const Can__IDs& other_value);
void copy_template(const Can__IDs_template& other_value);
public:
Can__IDs_template();
Can__IDs_template(template_sel other_value);
Can__IDs_template(const Can__IDs& other_value);
Can__IDs_template(const OPTIONAL<Can__IDs>& other_value);
Can__IDs_template(const Can__IDs_template& other_value);
~Can__IDs_template();
void clean_up();
Can__IDs_template& operator=(template_sel other_value);
Can__IDs_template& operator=(const Can__IDs& other_value);
Can__IDs_template& operator=(const OPTIONAL<Can__IDs>& other_value);
Can__IDs_template& operator=(const Can__IDs_template& other_value);
boolean match(const Can__IDs& other_value, boolean legacy = FALSE) const;
boolean is_value() const;Can__IDs valueof() const;
Can__IDs_template& list_item(unsigned int list_index) const;
void set_type(template_sel template_type, unsigned int list_length);
BITSTRING_template& can__eff();
const BITSTRING_template& can__eff() const;
BITSTRING_template& can__sff();
const BITSTRING_template& can__sff() const;
RTR_template& can__rtr();
const RTR_template& can__rtr() const;
BITSTRING_template& can__err();
const BITSTRING_template& can__err() const;
boolean ischosen(Can__IDs::union_selection_type checked_selection) const;
void log() const;
void log_match(const Can__IDs& 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 Can__IDwithType : public Base_Type {
INTEGER field_cantype;
Can__IDs field_can__ids;
public:
Can__IDwithType();
Can__IDwithType(const INTEGER& par_cantype,
const Can__IDs& par_can__ids);
Can__IDwithType(const Can__IDwithType& other_value);
inline boolean is_component() { return FALSE; }
void clean_up();
const TTCN_Typedescriptor_t* get_descriptor() const;
Can__IDwithType& operator=(const Can__IDwithType& other_value);
boolean operator==(const Can__IDwithType& other_value) const;
inline boolean operator!=(const Can__IDwithType& other_value) const
{ return !(*this == other_value); }
boolean is_bound() const;
inline boolean is_present() const { return is_bound(); }
boolean is_value() const;
inline INTEGER& cantype()
{return field_cantype;}
inline const INTEGER& cantype() const
{return field_cantype;}
inline Can__IDs& can__ids()
{return field_can__ids;}
inline const Can__IDs& can__ids() const
{return field_can__ids;}
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);
void encode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, TTCN_EncDec::coding_t, ...) const;
void decode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, TTCN_EncDec::coding_t, ...);
int RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree&) const;
int RAW_decode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, int, raw_order_t, boolean no_err=FALSE,int sel_field=-1, boolean first_call=TRUE, const RAW_Force_Omit* force_omit = NULL);
};
class Can__IDwithType_template : public Base_Template {
struct single_value_struct;
union {
single_value_struct *single_value;
struct {
unsigned int n_values;
Can__IDwithType_template *list_value;
} value_list;
};
void set_specific();
void copy_value(const Can__IDwithType& other_value);
void copy_template(const Can__IDwithType_template& other_value);
public:
Can__IDwithType_template();
Can__IDwithType_template(template_sel other_value);
Can__IDwithType_template(const Can__IDwithType& other_value);
Can__IDwithType_template(const OPTIONAL<Can__IDwithType>& other_value);
Can__IDwithType_template(const Can__IDwithType_template& other_value);
~Can__IDwithType_template();
Can__IDwithType_template& operator=(template_sel other_value);
Can__IDwithType_template& operator=(const Can__IDwithType& other_value);
Can__IDwithType_template& operator=(const OPTIONAL<Can__IDwithType>& other_value);
Can__IDwithType_template& operator=(const Can__IDwithType_template& other_value);
boolean match(const Can__IDwithType& other_value, boolean legacy = FALSE) const;
boolean is_bound() const;
boolean is_value() const;
void clean_up();
Can__IDwithType valueof() const;
void set_type(template_sel template_type, unsigned int list_length);
Can__IDwithType_template& list_item(unsigned int list_index) const;
INTEGER_template& cantype();
const INTEGER_template& cantype() const;
Can__IDs_template& can__ids();
const Can__IDs_template& can__ids() const;
int size_of() const;
void log() const;
void log_match(const Can__IDwithType& 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;
};
class OpenConnections : public Base_Type {
struct recordof_setof_struct {
int ref_count;
int n_elements;
COMPONENT **value_elements;
} *val_ptr;
static const COMPONENT UNBOUND_ELEM;
private:
friend boolean operator==(null_type null_value, const OpenConnections& other_value);
public:
typedef COMPONENT of_type;
OpenConnections();
OpenConnections(null_type other_value);
OpenConnections(const OpenConnections& other_value);
~OpenConnections();
void clean_up();
OpenConnections& operator=(null_type other_value);
OpenConnections& operator=(const OpenConnections& other_value);
boolean operator==(null_type other_value) const;
boolean operator==(const OpenConnections& other_value) const;
inline boolean operator!=(null_type other_value) const { return !(*this == other_value); }
inline boolean operator!=(const OpenConnections& other_value) const { return !(*this == other_value); }
COMPONENT& operator[](int index_value);
COMPONENT& operator[](const INTEGER& index_value);
const COMPONENT& operator[](int index_value) const;
const COMPONENT& operator[](const INTEGER& index_value) const;
OpenConnections operator<<=(int rotate_count) const;
OpenConnections operator<<=(const INTEGER& rotate_count) const;
OpenConnections operator>>=(int rotate_count) const;
OpenConnections operator>>=(const INTEGER& rotate_count) const;
OpenConnections operator+(const OpenConnections& other_value) const;
OpenConnections substr(int index, int returncount) const;
OpenConnections replace(int index, int len, const OpenConnections& repl) const;
OpenConnections replace(int index, int len, const OpenConnections_template& repl) const;
void set_size(int new_size);
inline boolean is_bound() const {return val_ptr != NULL; }
inline boolean is_present() const { return is_bound(); }
boolean is_value() const;
int size_of() const;
int n_elem() const { return size_of(); }
int lengthof() const;
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 OpenConnections_template : public Record_Of_Template {
union {
struct {
int n_elements;
COMPONENT_template **value_elements;
} single_value;
struct {
unsigned int n_values;
OpenConnections_template *list_value;
} value_list;
};
void copy_value(const OpenConnections& other_value);
void copy_template(const OpenConnections_template& other_value);
static boolean match_function_specific(const Base_Type *value_ptr, int value_index, const Restricted_Length_Template *template_ptr, int template_index, boolean legacy);
public:
OpenConnections_template();
OpenConnections_template(template_sel other_value);
OpenConnections_template(null_type other_value);
OpenConnections_template(const OpenConnections& other_value);
OpenConnections_template(const OPTIONAL<OpenConnections>& other_value);
OpenConnections_template(const OpenConnections_template& other_value);
~OpenConnections_template();
void clean_up();
OpenConnections_template& operator=(template_sel other_value);
OpenConnections_template& operator=(null_type other_value);
OpenConnections_template& operator=(const OpenConnections& other_value);
OpenConnections_template& operator=(const OPTIONAL<OpenConnections>& other_value);
OpenConnections_template& operator=(const OpenConnections_template& other_value);
COMPONENT_template& operator[](int index_value);
COMPONENT_template& operator[](const INTEGER& index_value);
const COMPONENT_template& operator[](int index_value) const;
const COMPONENT_template& operator[](const INTEGER& index_value) const;
void set_size(int new_size);
int n_elem() const;
int size_of(boolean is_size) const;
inline int size_of() const { return size_of(TRUE); }
inline int lengthof() const { return size_of(FALSE); }
boolean match(const OpenConnections& other_value, boolean legacy = FALSE) const;
inline boolean is_bound() const
{return template_selection != UNINITIALIZED_TEMPLATE; }
boolean is_value() const;
OpenConnections valueof() const;
OpenConnections substr(int index, int returncount) const;
OpenConnections replace(int index, int len, const OpenConnections_template& repl) const;
OpenConnections replace(int index, int len, const OpenConnections& repl) const;
void set_type(template_sel template_type, unsigned int list_length);
OpenConnections_template& list_item(unsigned int list_index);
void log() const;
void log_match(const OpenConnections& 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;
boolean get_istemplate_kind(const char* type) const;
};
class Isobus__PT : public PORT {
enum msg_selection { MESSAGE_0 };
struct msg_queue_item : public msg_queue_item_base {
msg_selection item_selection;
union {
Isobus::CAN__frame__j1939 *message_0;
};
component sender_component;
};
void remove_msg_queue_head();
protected:
void clear_queue();
public:
Isobus__PT(const char *par_port_name = NULL);
~Isobus__PT();
void send(const Isobus::CAN__frame__j1939& send_par, const COMPONENT& destination_component, FLOAT* timestamp_redirect = NULL);
void send(const Isobus::CAN__frame__j1939& send_par, FLOAT* timestamp_redirect = NULL);
void send(const Isobus::CAN__frame__j1939_template& send_par, const COMPONENT& destination_component, FLOAT* timestamp_redirect = NULL);
void send(const Isobus::CAN__frame__j1939_template& send_par, FLOAT* timestamp_redirect = NULL);
public:
alt_status receive(const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*);
alt_status check_receive(const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*);
alt_status trigger(const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*);
alt_status receive(const Isobus::CAN__frame__j1939_template& value_template, Isobus::CAN__frame__j1939 *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*);
alt_status check_receive(const Isobus::CAN__frame__j1939_template& value_template, Isobus::CAN__frame__j1939 *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*);
alt_status trigger(const Isobus::CAN__frame__j1939_template& value_template, Isobus::CAN__frame__j1939 *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*);
private:
void incoming_message(const Isobus::CAN__frame__j1939& incoming_par, component sender_component);
protected:
boolean process_message(const char *message_type, Text_Buf& incoming_buf, component sender_component, OCTETSTRING& slider);
};
class SyncMasterPort : public PORT {
enum msg_selection { MESSAGE_0 };
struct msg_queue_item : public msg_queue_item_base {
msg_selection item_selection;
union {
SocketCANtest::PhaseEndInd *message_0;
};
component sender_component;
};
void remove_msg_queue_head();
protected:
void clear_queue();
public:
SyncMasterPort(const char *par_port_name = NULL);
~SyncMasterPort();
void send(const SocketCANtest::PhaseStartReq& send_par, const COMPONENT& destination_component, FLOAT* timestamp_redirect = NULL);
void send(const SocketCANtest::PhaseStartReq& send_par, FLOAT* timestamp_redirect = NULL);
void send(const SocketCANtest::PhaseStartReq_template& send_par, const COMPONENT& destination_component, FLOAT* timestamp_redirect = NULL);
void send(const SocketCANtest::PhaseStartReq_template& send_par, FLOAT* timestamp_redirect = NULL);
public:
alt_status receive(const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*);
alt_status check_receive(const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*);
alt_status trigger(const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*);
alt_status receive(const SocketCANtest::PhaseEndInd_template& value_template, SocketCANtest::PhaseEndInd *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*);
alt_status check_receive(const SocketCANtest::PhaseEndInd_template& value_template, SocketCANtest::PhaseEndInd *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*);
alt_status trigger(const SocketCANtest::PhaseEndInd_template& value_template, SocketCANtest::PhaseEndInd *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*);
private:
void incoming_message(const SocketCANtest::PhaseEndInd& incoming_par, component sender_component);
protected:
boolean process_message(const char *message_type, Text_Buf& incoming_buf, component sender_component, OCTETSTRING& slider);
};
class SyncSlavePort : public PORT {
enum msg_selection { MESSAGE_0 };
struct msg_queue_item : public msg_queue_item_base {
msg_selection item_selection;
union {
SocketCANtest::PhaseStartReq *message_0;
};
component sender_component;
};
void remove_msg_queue_head();
protected:
void clear_queue();
public:
SyncSlavePort(const char *par_port_name = NULL);
~SyncSlavePort();
void send(const SocketCANtest::PhaseEndInd& send_par, const COMPONENT& destination_component, FLOAT* timestamp_redirect = NULL);
void send(const SocketCANtest::PhaseEndInd& send_par, FLOAT* timestamp_redirect = NULL);
void send(const SocketCANtest::PhaseEndInd_template& send_par, const COMPONENT& destination_component, FLOAT* timestamp_redirect = NULL);
void send(const SocketCANtest::PhaseEndInd_template& send_par, FLOAT* timestamp_redirect = NULL);
public:
alt_status receive(const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*);
alt_status check_receive(const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*);
alt_status trigger(const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*);
alt_status receive(const SocketCANtest::PhaseStartReq_template& value_template, SocketCANtest::PhaseStartReq *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*);
alt_status check_receive(const SocketCANtest::PhaseStartReq_template& value_template, SocketCANtest::PhaseStartReq *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*);
alt_status trigger(const SocketCANtest::PhaseStartReq_template& value_template, SocketCANtest::PhaseStartReq *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*);
private:
void incoming_message(const SocketCANtest::PhaseStartReq& incoming_par, component sender_component);
protected:
boolean process_message(const char *message_type, Text_Buf& incoming_buf, component sender_component, OCTETSTRING& slider);
};
class PTCSet : public Base_Type {
struct recordof_setof_struct {
int ref_count;
int n_elements;
COMPONENT **value_elements;
} *val_ptr;
static const COMPONENT UNBOUND_ELEM;
private:
friend boolean operator==(null_type null_value, const PTCSet& other_value);
public:
typedef COMPONENT of_type;
PTCSet();
PTCSet(null_type other_value);
PTCSet(const PTCSet& other_value);
~PTCSet();
void clean_up();
PTCSet& operator=(null_type other_value);
PTCSet& operator=(const PTCSet& other_value);
boolean operator==(null_type other_value) const;
boolean operator==(const PTCSet& other_value) const;
inline boolean operator!=(null_type other_value) const { return !(*this == other_value); }
inline boolean operator!=(const PTCSet& other_value) const { return !(*this == other_value); }
COMPONENT& operator[](int index_value);
COMPONENT& operator[](const INTEGER& index_value);
const COMPONENT& operator[](int index_value) const;
const COMPONENT& operator[](const INTEGER& index_value) const;
PTCSet operator<<=(int rotate_count) const;
PTCSet operator<<=(const INTEGER& rotate_count) const;
PTCSet operator>>=(int rotate_count) const;
PTCSet operator>>=(const INTEGER& rotate_count) const;
PTCSet operator+(const PTCSet& other_value) const;
PTCSet substr(int index, int returncount) const;
PTCSet replace(int index, int len, const PTCSet& repl) const;
PTCSet replace(int index, int len, const PTCSet_template& repl) const;
void set_size(int new_size);
inline boolean is_bound() const {return val_ptr != NULL; }
inline boolean is_present() const { return is_bound(); }
boolean is_value() const;
int size_of() const;
int n_elem() const { return size_of(); }
int lengthof() const;
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 PTCSet_template : public Record_Of_Template {
union {
struct {
int n_elements;
COMPONENT_template **value_elements;
} single_value;
struct {
unsigned int n_values;
PTCSet_template *list_value;
} value_list;
};
void copy_value(const PTCSet& other_value);
void copy_template(const PTCSet_template& other_value);
static boolean match_function_specific(const Base_Type *value_ptr, int value_index, const Restricted_Length_Template *template_ptr, int template_index, boolean legacy);
public:
PTCSet_template();
PTCSet_template(template_sel other_value);
PTCSet_template(null_type other_value);
PTCSet_template(const PTCSet& other_value);
PTCSet_template(const OPTIONAL<PTCSet>& other_value);
PTCSet_template(const PTCSet_template& other_value);
~PTCSet_template();
void clean_up();
PTCSet_template& operator=(template_sel other_value);
PTCSet_template& operator=(null_type other_value);
PTCSet_template& operator=(const PTCSet& other_value);
PTCSet_template& operator=(const OPTIONAL<PTCSet>& other_value);
PTCSet_template& operator=(const PTCSet_template& other_value);
COMPONENT_template& operator[](int index_value);
COMPONENT_template& operator[](const INTEGER& index_value);
const COMPONENT_template& operator[](int index_value) const;
const COMPONENT_template& operator[](const INTEGER& index_value) const;
void set_size(int new_size);
int n_elem() const;
int size_of(boolean is_size) const;
inline int size_of() const { return size_of(TRUE); }
inline int lengthof() const { return size_of(FALSE); }
boolean match(const PTCSet& other_value, boolean legacy = FALSE) const;
inline boolean is_bound() const
{return template_selection != UNINITIALIZED_TEMPLATE; }
boolean is_value() const;
PTCSet valueof() const;
PTCSet substr(int index, int returncount) const;
PTCSet replace(int index, int len, const PTCSet_template& repl) const;
PTCSet replace(int index, int len, const PTCSet& repl) const;
void set_type(template_sel template_type, unsigned int list_length);
PTCSet_template& list_item(unsigned int list_index);
void log() const;
void log_match(const PTCSet& 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;
boolean get_istemplate_kind(const char* type) const;
};
/* Function prototypes */
extern boolean operator==(null_type null_value, const OpenConnections& other_value);
inline boolean operator!=(null_type null_value, const OpenConnections& other_value) { return !(null_value == other_value); }
extern boolean operator==(null_type null_value, const PTCSet& other_value);
inline boolean operator!=(null_type null_value, const PTCSet& other_value) { return !(null_value == other_value); }
extern SocketCAN__Types::SocketCAN__socket__result f__open__socket2(const SocketCANtest::SocketCAN__open__socket__type& v__socket__type);
extern void start_f__open__socket2(const COMPONENT& component_reference, const SocketCANtest::SocketCAN__open__socket__type& v__socket__type);
extern SocketCANtest::SocketCAN__open__raw__result f__open__raw2();
extern void start_f__open__raw2(const COMPONENT& component_reference);
extern SocketCAN__Types::SocketCAN__ioctl__result f__ioctl__get__if__index2(const INTEGER& p__socket__id);
extern void start_f__ioctl__get__if__index2(const COMPONENT& component_reference, const INTEGER& p__socket__id);
extern SocketCAN__Types::SocketCAN__bind__result f__bind2(const INTEGER& p__socket__id, const INTEGER& p__if__index);
extern void start_f__bind2(const COMPONENT& component_reference, const INTEGER& p__socket__id, const INTEGER& p__if__index);
extern void f__close__socket2(const INTEGER& p__socket__id);
extern void start_f__close__socket2(const COMPONENT& component_reference, const INTEGER& p__socket__id);
extern void f__behaviour__isobus(const COMPONENT& v__ptc1);
extern void start_f__behaviour__isobus(const COMPONENT& component_reference, const COMPONENT& v__ptc1);
extern void f__behaviour1__sync();
extern void start_f__behaviour1__sync(const COMPONENT& component_reference);
extern COMPONENT f__get__component(const OCTETSTRING& connectioninitiator, const OCTETSTRING& connectionresponder);
extern void start_f__get__component(const COMPONENT& component_reference, const OCTETSTRING& connectioninitiator, const OCTETSTRING& connectionresponder);
extern void f__behaviour2__sync();
extern void start_f__behaviour2__sync(const COMPONENT& component_reference);
extern void f__behaviour__connections();
extern void start_f__behaviour__connections(const COMPONENT& component_reference);
extern verdicttype testcase_tc__encdec(boolean has_timer, double timer_value);
extern verdicttype testcase_tc__encdec__vt2ecu__vtStatusReq(boolean has_timer, double timer_value);
extern verdicttype testcase_tc__encdec__ecu2vt__getMemoryReq(boolean has_timer, double timer_value);
extern verdicttype testcase_tc__encdec__ecu2vt__getMemoryReq__with__templateI(boolean has_timer, double timer_value);
extern verdicttype testcase_tc__encdec__ecu2vt__getMemoryReq__with__template__II(boolean has_timer, double timer_value);
extern verdicttype testcase_tc__encdec__networkMessage__N__SP__Response__pdu__with__template(boolean has_timer, double timer_value);
extern verdicttype testcase_tc__encdec__networkMessage__N__SP__Response__with__template(boolean has_timer, double timer_value);
extern verdicttype testcase_tc__encdec__N__SP__Response__with__template(boolean has_timer, double timer_value);
extern verdicttype testcase_tc__encdec__ecu2vt__workingSetMaintenanceReq(boolean has_timer, double timer_value);
extern verdicttype testcase_tc__encdec__etp__dt(boolean has_timer, double timer_value);
extern verdicttype testcase_tc__dec__requestForAddressClaimed(boolean has_timer, double timer_value);
extern verdicttype testcase_tc__dec__largemessage(boolean has_timer, double timer_value);
extern verdicttype testcase_tc__Example001(boolean has_timer, double timer_value);
extern verdicttype testcase_tc__Example002(boolean has_timer, double timer_value);
/* Global variable declarations */
extern const TTCN_Typedescriptor_t CAN__ID_descr_;
extern const XERdescriptor_t CAN__ID_can__eff_xer_;
extern const TTCN_OERdescriptor_t CAN__ID_can__eff_oer_;
extern const TTCN_Typedescriptor_t CAN__ID_can__eff_descr_;
extern const XERdescriptor_t CAN__ID_can__sff_xer_;
extern const TTCN_OERdescriptor_t CAN__ID_can__sff_oer_;
extern const TTCN_Typedescriptor_t CAN__ID_can__sff_descr_;
extern const TTCN_RAWdescriptor_t RTR_raw_;
extern const TTCN_Typedescriptor_t RTR_descr_;
extern const TTCN_RAWdescriptor_t BIT29_raw_;
extern const XERdescriptor_t BIT29_xer_;
extern const TTCN_OERdescriptor_t BIT29_oer_;
extern const TTCN_Typedescriptor_t BIT29_descr_;
extern const XERdescriptor_t CAN__ID_can__err_xer_;
extern const TTCN_OERdescriptor_t CAN__ID_can__err_oer_;
extern const TTCN_Typedescriptor_t CAN__ID_can__err_descr_;
extern const TTCN_RAWdescriptor_t Can__IDs_raw_;
extern const TTCN_Typedescriptor_t Can__IDs_descr_;
extern const XERdescriptor_t Can__IDs_can__eff_xer_;
extern const TTCN_OERdescriptor_t Can__IDs_can__eff_oer_;
extern const TTCN_Typedescriptor_t Can__IDs_can__eff_descr_;
extern const XERdescriptor_t Can__IDs_can__sff_xer_;
extern const TTCN_OERdescriptor_t Can__IDs_can__sff_oer_;
extern const TTCN_Typedescriptor_t Can__IDs_can__sff_descr_;
extern const XERdescriptor_t Can__IDs_can__err_xer_;
extern const TTCN_OERdescriptor_t Can__IDs_can__err_oer_;
extern const TTCN_Typedescriptor_t Can__IDs_can__err_descr_;
extern const XERdescriptor_t Can__IDwithType_cantype_xer_;
extern const TTCN_OERdescriptor_t Can__IDwithType_cantype_oer_;
extern const TTCN_Typedescriptor_t Can__IDwithType_cantype_descr_;
extern const TTCN_RAWdescriptor_t Can__IDwithType_can__ids_raw_;
extern const TTCN_Typedescriptor_t Can__IDwithType_can__ids_descr_;
extern const TTCN_RAWdescriptor_t Can__IDwithType_raw_;
extern const TTCN_Typedescriptor_t Can__IDwithType_descr_;
extern const TTCN_Typedescriptor_t& MTC__CT_descr_;
extern const TTCN_Typedescriptor_t& PTC__isobus__CT_descr_;
extern SocketCAN__PortType::SocketCAN__PT PTC__isobus__CT_component_pt__socketCAN;
extern Isobus__PT PTC__isobus__CT_component_pt__isobus;
extern TIMER PTC__isobus__CT_component_T0;
extern const INTEGER& MAX__CONNECTIONS;
extern const TTCN_Typedescriptor_t OpenConnections_descr_;
extern const TTCN_Typedescriptor_t& PTC2__CT_descr_;
extern const TTCN_Typedescriptor_t OpenConnectionsFlags_descr_;
extern const XERdescriptor_t OpenConnectionsFlags_0_xer_;
extern const TTCN_OERdescriptor_t OpenConnectionsFlags_0_oer_;
extern const TTCN_Typedescriptor_t OpenConnectionsFlags_0_descr_;
extern const TTCN_Typedescriptor_t& PTC1__CT_descr_;
extern Isobus__PT PTC1__CT_component_pt__isobus;
extern OpenConnections PTC1__CT_component_openConnections;
extern OpenConnectionsFlags PTC1__CT_component_openConnectionsFlags;
extern TIMER PTC1__CT_component_T1;
extern Isobus__PT PTC2__CT_component_pt__isobus;
extern OCTETSTRING PTC2__CT_component_receivedUnacknowledgedData;
extern INTEGER PTC2__CT_component_msgSizeInBytes;
extern INTEGER PTC2__CT_component_receivedUnacknowledgedMsgSizeInBytes;
extern INTEGER PTC2__CT_component_nextExpectedPacketNumber;
extern INTEGER PTC2__CT_component_pgnOfMultiPacketMessage;
extern const XERdescriptor_t _T_PTC2__CT_component_ps_xer_;
extern const TTCN_OERdescriptor_t _T_PTC2__CT_component_ps_oer_;
extern const TTCN_Typedescriptor_t _T_PTC2__CT_component_ps_descr_;
extern OCTETSTRING PTC2__CT_component_ps;
extern OCTETSTRING PTC2__CT_component_sa;
extern OCTETSTRING PTC2__CT_component_tp__dt__can__id;
extern TIMER PTC2__CT_component_T2;
extern const TTCN_Typedescriptor_t PTCSet_descr_;
extern const TTCN_Typedescriptor_t& PTC_descr_;
extern SyncSlavePort PTC_component_pt__sync;
extern SocketCAN__PortType::SocketCAN__PT PTC_component_pt__socketCAN;
extern SocketCANtest::e__Phase PTC_component_v__phase;
extern TTCN_Module module_object;
} /* end of namespace */
#endif