package org.etsi.its.tool.elvior;

import org.etsi.ttcn.tci.Type;
import org.etsi.ttcn.tci.Value;
import org.etsi.ttcn.tri.TriMessage;


/**
 * 
 * Note that "Enable Internal Codec" field shall be set to true
 *
 */
public class LibItsEvcsn_asn1 extends LibIts_asn1 {
    
    /**
     * Constructor
     */
    public LibItsEvcsn_asn1() {
        _logger.entering("LibItsEvcsn_asn1", "LibItsEvcsn_asn1");
        _encodingName = "EVCSN_PDU_Descriptions";
    }
    
    @Override
    public Value decode(final TriMessage message, final Type decodingHypothesis) {
        _logger.entering("LibItsEvcsn_asn1", "decode", decodingHypothesis.getName());
        
        if (decodingHypothesis.getName().endsWith("evcsnPacket")) {
            Type type = getTypeForName("EVCSN_PDU_Descriptions.EvcsnPdu");
            return super.decode(message, type);
        }
        
        return super.decode(message, decodingHypothesis);
    }
    
} // End of class LibItsEvcsn_asn1 
