Commit a908f98f authored by Botond Baranyi's avatar Botond Baranyi Committed by Gerrit Code Review
Browse files

Merge "changed PER encoding to work the same way as custom encoding, and...

Merge "changed PER encoding to work the same way as custom encoding, and enabled bitstring as stream type for all codecs (bug 508200)"
parents 35e9099e c27f89d0
......@@ -176,6 +176,9 @@ namespace Common {
Type *Type::get_stream_type(MessageEncodingType_t encoding_type, int stream_variant)
{
if (stream_variant == 0) {
return get_pooltype(T_BSTR);
}
switch (encoding_type) {
case CT_BER:
case CT_PER:
......@@ -184,13 +187,11 @@ namespace Common {
case CT_JSON:
return get_pooltype(T_OSTR);
case CT_TEXT:
if(stream_variant==0){
if(stream_variant==1){
return get_pooltype(T_CSTR);
} else {
return get_pooltype(T_OSTR);
}
case CT_CUSTOM:
return get_pooltype(T_BSTR);
default:
FATAL_ERROR("Type::get_stream_type()");
return 0;
......@@ -606,6 +607,8 @@ namespace Common {
chk_finished = false;
pard_type_instance = false;
needs_any_from_done = false;
encoding_by_function = false;
decoding_by_function = false;
asn_encoding = CT_UNDEF;
asn_decoding = CT_UNDEF;
}
......@@ -4395,27 +4398,45 @@ namespace Common {
void Type::set_coding_function(bool encode, const string& function_name)
{
string& coding_str = encode ? encoding_str : decoding_str;
if (!coding_str.empty()) {
error("Multiple custom %s functions declared for type '%s' (function `%s' "
"is already set)", encode ? "encoding" : "decoding",
get_typename().c_str(), coding_str.c_str());
string& coding_function = encode ? encoding_function : decoding_function;
MessageEncodingType_t& asn_coding = encode ? asn_encoding : asn_decoding;
bool& coding_by_function = encode ?
encoding_by_function : decoding_by_function;
if (!coding_function.empty()) {
// leave coding_by_function as true, this will indicate that there are
// multiple coding functions set
coding_function.clear();
}
else if (asn_coding != CT_UNDEF) {
// a different encoding type is already set for the ASN.1 type
asn_coding = CT_MULTIPLE;
coding_function.clear();
return;
}
coding_str = function_name;
coding_by_function = true;
else {
if (is_asn1()) {
asn_coding = CT_PER;
}
coding_function = function_name;
coding_by_function = true;
}
}
void Type::set_asn_coding(bool encode, Type::MessageEncodingType_t new_coding)
{
MessageEncodingType_t& coding = encode ? asn_encoding : asn_decoding;
if (coding == CT_UNDEF) {
bool& coding_by_function = encode ?
encoding_by_function : decoding_by_function; // true = PER coder is set
string& coding_function = encode ? encoding_function : decoding_function; // PER coder
if (coding == CT_UNDEF && !coding_by_function) {
// this is the first encoding/decoding function for this type, store it
// (also, no PER coders have been set for the type yet)
coding = new_coding;
}
else if (coding != new_coding) {
else if (coding != new_coding || coding_by_function) {
// there are several encoding/decoding functions declared for this type
// with different codings (encvalue/decvalue cannot be used in this case)
coding_function.clear();
coding = CT_MULTIPLE;
}
}
......@@ -4424,7 +4445,8 @@ namespace Common {
string& coding_str = encode ? encoding_str : decoding_str;
if (!coding_str.empty())
return;
coding_by_function = false;
bool& coding_by_function = encode ?
encoding_by_function : decoding_by_function;
Type::MessageEncodingType_t coding = CT_UNDEF;
if (!is_asn1()) {
......@@ -4517,18 +4539,18 @@ namespace Common {
else { // ASN.1 type
coding = encode ? asn_encoding : asn_decoding;
if ((coding == CT_UNDEF && delayed) || coding == CT_MULTIPLE) {
// either this is the delayed call and no external function has been
// either this is the delayed call and no external functions have been
// found, or there was already more than one function
error("Cannot determine the %s rules for ASN.1 type `%s'. "
"%s %s external function%s found%s", encode ? "encoding" : "decoding",
"%s %s external functions found%s", encode ? "encoding" : "decoding",
get_typename().c_str(), coding == CT_UNDEF ? "No" : "Multiple",
encode ? "encoding" : "decoding", coding == CT_UNDEF ? "" : "s",
encode ? "encoding" : "decoding",
coding == CT_UNDEF ? "" : " with different rules");
return;
}
if (coding == CT_UNDEF && !delayed) {
// the coding type is set by the external function's checker in this case;
// it's possible, that the function exists, but has not been reached yet;
if (!delayed) {
// there have been no errors so far in determining the coding type,
// but there might still be unchecked external functions out there;
// delay this function until everything else has been checked
Modules::delay_type_encode_check(this, encode);
return;
......@@ -4547,9 +4569,6 @@ namespace Common {
case CT_TEXT:
coding_str = "TEXT";
break;
case CT_PER:
coding_str = "PER";
break;
case CT_XER:
coding_str = "XER, XER_EXTENDED"; // TODO: fine tuning this parameter
break;
......@@ -4568,20 +4587,31 @@ namespace Common {
if (!berattrib)
delete ber;
break; }
case CT_CUSTOM:
if (!delayed) {
// coding_str is set by the coding function's checker in this case;
// it's possible, that the function exists, but has not been reached yet;
case CT_PER:
case CT_CUSTOM: {
// the coding function is set by its semantic checker in this case
string& coding_function = encode ? encoding_function : decoding_function;
if (coding_function.empty() && coding_by_function) {
error("Multiple %s %s functions set for type `%s'",
get_encoding_name(coding), encode ? "encoding" : "decoding",
get_typename().c_str());
}
else if (!delayed) {
// there have been no errors so far in determining the coding function,
// but there might still be unchecked external functions out there;
// delay this function until everything else has been checked
Modules::delay_type_encode_check(this, encode);
}
else if (coding_str.empty()) {
// this is the delayed call, and the custom coding function has still
// not been found
error("No custom %s function found for type `%s'",
else if (coding_function.empty()) {
// this is the delayed call, and the coding function has still not been set
error("No %s %s function found for type `%s'", get_encoding_name(coding),
encode ? "encoding" : "decoding", get_typename().c_str());
}
return;
else {
// this is the delayed call, and exactly one coding function has been set
coding_str = coding_function;
}
return; }
default:
error("Unknown coding selected for type '%s'", get_typename().c_str());
break;
......@@ -4589,8 +4619,8 @@ namespace Common {
coding_by_function = false;
}
bool Type::is_coding_by_function() const {
return coding_by_function;
bool Type::is_coding_by_function(bool encode) const {
return encode ? encoding_by_function : decoding_by_function;
}
const string& Type::get_coding(bool encode) const {
......
......@@ -307,7 +307,10 @@ namespace Common {
string encoding_str; // needed by codegen for encvalue() and decvalue()
string decoding_str;
bool coding_by_function; // false - coding attribute is set, true - coding via coding function
bool encoding_by_function; // false - coding attribute is set, true - coding via coding function
bool decoding_by_function; // same for decoding
string encoding_function; // name of custom or PER encoder
string decoding_function; // name of custom or PER decoder
MessageEncodingType_t asn_encoding; // set by the semantic analysis of encoding
MessageEncodingType_t asn_decoding; // and decoding external functions for ASN.1 types
/** What kind of AST element owns the type.
......@@ -659,7 +662,7 @@ namespace Common {
void set_coding_function(bool encode, const string& function_name);
void set_asn_coding(bool encode, MessageEncodingType_t new_coding);
void chk_coding(bool encode, bool delayed = false);
bool is_coding_by_function() const;
bool is_coding_by_function(bool encode) const;
const string& get_coding(bool encode) const;
private:
static MessageEncodingType_t get_enc_type(const Ttcn::SingleWithAttrib& enc);
......
......@@ -12970,7 +12970,7 @@ error:
break;
}
if (!gov_last->is_coding_by_function()) {
if (!gov_last->is_coding_by_function(true)) {
const string& tmp_id = get_temporary_id();
const string& tmp_buf_id = get_temporary_id();
const string& tmp_ref_id = get_temporary_id();
......@@ -13031,7 +13031,7 @@ error:
if (expr2.preamble)
expr->preamble = mputprintf(expr->preamble, "%s", expr2.preamble);
if (!_type->is_coding_by_function()) {
if (!_type->is_coding_by_function(false)) {
const string& tmp_id = get_temporary_id();
const string& buffer_id = get_temporary_id();
const string& retval_id = get_temporary_id();
......@@ -13127,7 +13127,7 @@ void Value::generate_code_expr_encvalue_unichar(expression_struct *expr)
v2_code = generate_code_char_coding_check(expr, u.expr.v2, "encvalue_unichar");
}
if (!gov_last->is_coding_by_function()) {
if (!gov_last->is_coding_by_function(true)) {
const string& tmp_id = get_temporary_id();
const string& tmp_buf_id = get_temporary_id();
const string& tmp_ref_id = get_temporary_id();
......@@ -13205,7 +13205,7 @@ void Value::generate_code_expr_encvalue_unichar(expression_struct *expr)
v3_code = generate_code_char_coding_check(expr, u.expr.v3, "decvalue_unichar");
}
if (!_type->is_coding_by_function()) {
if (!_type->is_coding_by_function(false)) {
const string& tmp_id = get_temporary_id();
const string& buffer_id = get_temporary_id();
const string& retval_id = get_temporary_id();
......
......@@ -6561,9 +6561,11 @@ namespace Ttcn {
// "untagged" on the (toplevel) input type will have no effect.
warning("UNTAGGED encoding attribute is ignored on top-level type");
}
if (Common::Type::CT_CUSTOM == encoding_type) {
if (Common::Type::CT_CUSTOM == encoding_type ||
Common::Type::CT_PER == encoding_type) {
if (PROTOTYPE_CONVERT != prototype) {
error("Only `prototype(convert)' is allowed for custom encoding functions");
error("Only `prototype(convert)' is allowed for %s encoding functions",
Type::get_encoding_name(encoding_type));
}
else {
// let the input type know that this is its encoding function
......@@ -6580,17 +6582,25 @@ namespace Ttcn {
}
}
if (output_type) {
if(encoding_type == Common::Type::CT_TEXT) { // TEXT encoding supports both octetstring and charstring stream types
if(encoding_type == Common::Type::CT_TEXT) {
// TEXT encoding supports bitstring, octetstring and charstring stream types
Type *stream_type = Type::get_stream_type(encoding_type,0);
Type *stream_type2 = Type::get_stream_type(encoding_type,1);
if ( (!stream_type->is_identical(output_type)) && (!stream_type2->is_identical(output_type)) ) {
output_type->error("The output type of %s encoding should be `%s' or `%s' "
"instead of `%s'", Type::get_encoding_name(encoding_type),
Type *stream_type3 = Type::get_stream_type(encoding_type,2);
if ( (!stream_type->is_identical(output_type)) &&
(!stream_type2->is_identical(output_type)) &&
(!stream_type3->is_identical(output_type))) {
output_type->error("The output type of %s encoding should be `%s', "
"`%s' or `%s' instead of `%s'", Type::get_encoding_name(encoding_type),
stream_type->get_typename().c_str(),
stream_type2->get_typename().c_str(),
stream_type3->get_typename().c_str(),
output_type->get_typename().c_str());
}
} else {
}
else if (encoding_type == Common::Type::CT_CUSTOM ||
encoding_type == Common::Type::CT_PER) {
// custom and PER encodings only support the bitstring stream type
Type *stream_type = Type::get_stream_type(encoding_type);
if (!stream_type->is_identical(output_type)) {
output_type->error("The output type of %s encoding should be `%s' "
......@@ -6599,6 +6609,19 @@ namespace Ttcn {
output_type->get_typename().c_str());
}
}
else {
// all other encodings support bitstring and octetstring stream types
Type *stream_type = Type::get_stream_type(encoding_type, 0);
Type *stream_type2 = Type::get_stream_type(encoding_type, 1);
if (!stream_type->is_identical(output_type) &&
!stream_type2->is_identical(output_type)) {
output_type->error("The output type of %s encoding should be `%s' "
"or '%s' instead of `%s'", Type::get_encoding_name(encoding_type),
stream_type->get_typename().c_str(),
stream_type2->get_typename().c_str(),
output_type->get_typename().c_str());
}
}
}
if (eb_list) eb_list->chk();
chk_allowed_encode();
......@@ -6608,17 +6631,25 @@ namespace Ttcn {
error("Attribute `decode' cannot be used without `prototype'");
}
if (input_type) {
if(encoding_type == Common::Type::CT_TEXT) { // TEXT encoding supports both octetstring and charstring stream types
if(encoding_type == Common::Type::CT_TEXT) {
// TEXT encoding supports bitstring, octetstring and charstring stream types
Type *stream_type = Type::get_stream_type(encoding_type,0);
Type *stream_type2 = Type::get_stream_type(encoding_type,1);
if ( (!stream_type->is_identical(input_type)) && (!stream_type2->is_identical(input_type)) ) {
input_type->error("The input type of %s decoding should be `%s' or `%s' "
"instead of `%s'", Type::get_encoding_name(encoding_type),
Type *stream_type3 = Type::get_stream_type(encoding_type,2);
if ( (!stream_type->is_identical(input_type)) &&
(!stream_type2->is_identical(input_type)) &&
(!stream_type3->is_identical(input_type))) {
input_type->error("The input type of %s decoding should be `%s', "
"`%s' or `%s' instead of `%s'", Type::get_encoding_name(encoding_type),
stream_type->get_typename().c_str(),
stream_type2->get_typename().c_str(),
stream_type3->get_typename().c_str(),
input_type->get_typename().c_str());
}
} else {
}
else if (encoding_type == Common::Type::CT_CUSTOM ||
encoding_type == Common::Type::CT_PER) {
// custom and PER encodings only support the bitstring stream type
Type *stream_type = Type::get_stream_type(encoding_type);
if (!stream_type->is_identical(input_type)) {
input_type->error("The input type of %s decoding should be `%s' "
......@@ -6627,7 +6658,19 @@ namespace Ttcn {
input_type->get_typename().c_str());
}
}
else {
// all other encodings support bitstring and octetstring stream types
Type *stream_type = Type::get_stream_type(encoding_type, 0);
Type *stream_type2 = Type::get_stream_type(encoding_type, 1);
if (!stream_type->is_identical(input_type) &&
!stream_type2->is_identical(input_type)) {
input_type->error("The input type of %s decoding should be `%s' "
"or `%s' instead of `%s'", Type::get_encoding_name(encoding_type),
stream_type->get_typename().c_str(),
stream_type2->get_typename().c_str(),
input_type->get_typename().c_str());
}
}
}
if (output_type && !output_type->has_encoding(encoding_type, encoding_options)) {
if (Common::Type::CT_CUSTOM == encoding_type) {
......@@ -6641,9 +6684,11 @@ namespace Ttcn {
}
}
else {
if (Common::Type::CT_CUSTOM == encoding_type) {
if (Common::Type::CT_CUSTOM == encoding_type ||
Common::Type::CT_PER == encoding_type) {
if (PROTOTYPE_SLIDING != prototype) {
error("Only `prototype(sliding)' is allowed for custom decoding functions");
error("Only `prototype(sliding)' is allowed for %s decoding functions",
Type::get_encoding_name(encoding_type));
}
else if (output_type) {
// let the output type know that this is its decoding function
......@@ -6863,13 +6908,25 @@ namespace Ttcn {
result_name = 0;
}
// taking the result from the buffer and producing debug printout
str = mputprintf(str, "ttcn_buffer.get_string(%s);\n"
if (output_type->get_type_refd_last()->get_typetype_ttcn3() ==
Common::Type::T_BSTR) {
// cannot extract a bitstring from the buffer, use temporary octetstring
// and convert it to bitstring
str = mputprintf(str,
"OCTETSTRING tmp_os;\n"
"ttcn_buffer.get_string(tmp_os);\n"
"%s = oct2bit(tmp_os);\n", result_name);
}
else {
str = mputprintf(str, "ttcn_buffer.get_string(%s);\n", result_name);
}
str = mputprintf(str,
"if (TTCN_Logger::log_this_event(TTCN_Logger::DEBUG_ENCDEC)) {\n"
"TTCN_Logger::begin_event(TTCN_Logger::DEBUG_ENCDEC);\n"
"TTCN_Logger::log_event_str(\"%s(): Stream after encoding: \");\n"
"%s.log();\n"
"TTCN_Logger::end_event();\n"
"}\n", result_name, function_name, result_name);
"}\n", function_name, result_name);
// returning the result stream if necessary
if (prototype == PROTOTYPE_CONVERT) {
if (debugger_active) {
......@@ -6909,9 +6966,17 @@ namespace Ttcn {
"TTCN_EncDec::ET_ALL, TTCN_EncDec::EB_WARNING);\n");
} else str = mputstr(str, "TTCN_EncDec::set_error_behavior("
"TTCN_EncDec::ET_ALL, TTCN_EncDec::EB_DEFAULT);\n");
str = mputstr(str, "TTCN_EncDec::clear_error();\n");
// creating a buffer from the input stream
str = mputprintf(str, "TTCN_EncDec::clear_error();\n"
"TTCN_Buffer ttcn_buffer(%s);\n", first_par_name);
if (input_type->get_type_refd_last()->get_typetype_ttcn3() ==
Common::Type::T_BSTR) {
// cannot create a buffer from a bitstring, convert it to octetstring
str = mputprintf(str, "TTCN_Buffer ttcn_buffer(bit2oct(%s));\n",
first_par_name);
}
else {
str = mputprintf(str, "TTCN_Buffer ttcn_buffer(%s);\n", first_par_name);
}
const char *result_name;
if (prototype == PROTOTYPE_CONVERT) {
// creating a local variable for the result
......@@ -6949,14 +7014,25 @@ namespace Ttcn {
"if (ttcn_buffer.get_pos() < ttcn_buffer.get_len()-1 && "
"TTCN_Logger::log_this_event(TTCN_WARNING)) {\n"
"ttcn_buffer.cut();\n"
"%s remaining_stream;\n"
"ttcn_buffer.get_string(remaining_stream);\n"
"%s remaining_stream;\n",
input_type->get_genname_value(my_scope).c_str());
if (input_type->get_type_refd_last()->get_typetype_ttcn3() ==
Common::Type::T_BSTR) {
str = mputstr(str,
"OCTETSTRING tmp_os;\n"
"ttcn_buffer.get_string(tmp_os);\n"
"remaining_stream = oct2bit(tmp_os);\n");
}
else {
str = mputstr(str, "ttcn_buffer.get_string(remaining_stream);\n");
}
str = mputprintf(str,
"TTCN_Logger::begin_event(TTCN_WARNING);\n"
"TTCN_Logger::log_event_str(\"%s(): Warning: Data remained at the end "
"of the stream after successful decoding: \");\n"
"remaining_stream.log();\n"
"TTCN_Logger::end_event();\n"
"}\n", input_type->get_genname_value(my_scope).c_str(), function_name);
"}\n", function_name);
// closing the block and returning the appropriate result or status code
if (prototype == PROTOTYPE_BACKTRACK) {
if (debugger_active) {
......@@ -6984,11 +7060,21 @@ namespace Ttcn {
}
} else {
// result handling and debug printout for sliding decoders
str = mputprintf(str, "switch (TTCN_EncDec::get_last_error_type()) {\n"
str = mputstr(str, "switch (TTCN_EncDec::get_last_error_type()) {\n"
"case TTCN_EncDec::ET_NONE:\n"
// TTCN_Buffer::get_string will call OCTETSTRING::clean_up()
"ttcn_buffer.cut();\n"
"ttcn_buffer.get_string(%s);\n"
"ttcn_buffer.cut();\n");
if (input_type->get_type_refd_last()->get_typetype_ttcn3() ==
Common::Type::T_BSTR) {
str = mputprintf(str,
"OCTETSTRING tmp_os;\n"
"ttcn_buffer.get_string(tmp_os);\n"
"%s = oct2bit(tmp_os);\n", first_par_name);
}
else {
str = mputprintf(str, "ttcn_buffer.get_string(%s);\n", first_par_name);
}
str = mputprintf(str,
"if (TTCN_Logger::log_this_event(TTCN_Logger::DEBUG_ENCDEC)) {\n"
"TTCN_Logger::begin_event(TTCN_Logger::DEBUG_ENCDEC);\n"
"TTCN_Logger::log_event_str(\"%s(): Stream after decoding: \");\n"
......@@ -7001,7 +7087,7 @@ namespace Ttcn {
"%sreturn 2;\n"
"default:\n"
"%sreturn 1;\n"
"}\n", first_par_name, function_name, first_par_name,
"}\n", function_name, first_par_name,
debugger_active ? "ttcn3_debugger.set_return_value(\"0\");\n" : "",
debugger_active ? "ttcn3_debugger.set_return_value(\"2\");\n" : "",
debugger_active ? "ttcn3_debugger.set_return_value(\"1\");\n" : "");
......
......@@ -567,8 +567,8 @@ namespace Ttcn {
if (act_attr->get_is_raw()) {
switch (ti_type->get_typetype_ttcn3()) {
case Type::T_BSTR:
if (!type->has_encoding(Type::CT_PER) && !type->has_encoding(Type::CT_RAW)) {
act_attr->error("A `raw' %s value was used for erroneous type `%s' which has no RAW or PER encodings.",
if (!type->has_encoding(Type::CT_RAW)) {
act_attr->error("A `raw' %s value was used for erroneous type `%s' which has no RAW encoding.",
ti_type->get_typename().c_str(), type->get_typename().c_str());
}
break;
......@@ -591,7 +591,6 @@ namespace Ttcn {
} else {
// the two types must have at least one common encoding
if (!((type->has_encoding(Type::CT_BER)&&ti_type->has_encoding(Type::CT_BER)) ||
(type->has_encoding(Type::CT_PER)&&ti_type->has_encoding(Type::CT_PER)) ||
(type->has_encoding(Type::CT_RAW)&&ti_type->has_encoding(Type::CT_RAW)) ||
(type->has_encoding(Type::CT_TEXT)&&ti_type->has_encoding(Type::CT_TEXT)) ||
(type->has_encoding(Type::CT_XER)&&ti_type->has_encoding(Type::CT_XER)) ||
......
......@@ -9297,7 +9297,7 @@ error:
set_params_str = mputstr(set_params_str, "}\nelse {\n");
}
Type::typetype_t tt = par->get_type()->get_type_refd_last()->get_typetype_ttcn3();
if (ve->get_dec_type()->is_coding_by_function()) {
if (ve->get_dec_type()->is_coding_by_function(false)) {
set_params_str = mputstr(set_params_str, "BITSTRING buff(");
switch (tt) {
case Type::T_BSTR:
......@@ -10041,7 +10041,7 @@ error:
set_values_str = mputstr(set_values_str, "}\nelse {\n");
}
Type::typetype_t tt = redir_type->get_type_refd_last()->get_typetype_ttcn3();
if (member_type->is_coding_by_function()) {
if (member_type->is_coding_by_function(false)) {
set_values_str = mputprintf(set_values_str, "BITSTRING buff_%d(",
(int)i);
switch (tt) {
......
......@@ -4582,7 +4582,7 @@ compile_time:
target_type->get_genname_value(my_scope).c_str(), class_tmp_id.c_str(),
target_type->get_genname_template(my_scope).c_str(), class_tmp_id.c_str(),
target_type->get_genname_value(my_scope).c_str());
bool dec_by_func = target_type->is_coding_by_function();
bool dec_by_func = target_type->is_coding_by_function(false);
if (dec_by_func) {
str = mputprintf(str,
// convert the TTCN_Buffer into a bitstring
......
......@@ -428,7 +428,7 @@ namespace Ttcn {
source_type->get_typename().c_str(),
Type::get_encoding_name(u.encdec.coding_type));
}
Type *stream_type = Type::get_stream_type(u.encdec.coding_type);
Type *stream_type = Type::get_stream_type(u.encdec.coding_type, 1);
if (!stream_type->is_identical(target_type)) {
target_type->error("Target type of %s encoding should be `%s' instead "
"of `%s'", Type::get_encoding_name(u.encdec.coding_type),
......@@ -441,7 +441,7 @@ namespace Ttcn {
void TypeMappingTarget::chk_decode(Type *source_type)
{
Error_Context cntxt(this, "In `decode' mapping");
Type *stream_type = Type::get_stream_type(u.encdec.coding_type);
Type *stream_type = Type::get_stream_type(u.encdec.coding_type, 1);
if (!stream_type->is_identical(source_type)) {
source_type->error("Source type of %s encoding should be `%s' instead "
"of `%s'", Type::get_encoding_name(u.encdec.coding_type),
......
-------------------------------------------------------------------------------
-- Copyright (c) 2000-2016 Ericsson Telecom AB
-- All rights reserved. This program and the accompanying materials
-- are made available under the terms of the Eclipse Public License v1.0
-- which accompanies this distribution, and is available at
-- http://www.eclipse.org/legal/epl-v10.html
--
-- Contributors:
-- Baranyi, Botond
--
-------------------------------------------------------------------------------
Types-A
DEFINITIONS
AUTOMATIC TAGS ::=
BEGIN
IMPORTS;
Int ::= INTEGER
Seq ::= SEQUENCE { --//Cannot determine the encoding rules for ASN.1 type `@Types-A.Seq'. Multiple encoding external functions found with different rules// //Cannot determine the decoding rules for ASN.1 type `@Types-A.Seq'. Multiple decoding external functions found with different rules//
num INTEGER,
str VisibleString
}
Set ::= SET {
num INTEGER,
str VisibleString
}
SeqOf ::= SEQUENCE OF INTEGER --//Multiple PER encoding functions set for type// //Multiple PER decoding functions set for type//
SetOf ::= SET OF INTEGER
Choice ::= CHOICE { --//Cannot determine the encoding rules for ASN.1 type `@Types-A.Choice'. Multiple encoding external functions found with different rules// //Cannot determine the decoding rules for ASN.1 type `@Types-A.Choice'. No decoding external functions found//
num INTEGER,
str VisibleString
}
END
/******************************************************************************
* Copyright (c) 2000-2016 Ericsson Telecom AB
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Balasko, Jeno
* Baranyi, Botond
*
******************************************************************************/
module encode_SE {