Rev

Rev 2465 | Details | Compare with Previous | Last modification | View Log | SVN | Bug Tracker

Rev Author Line No. Line
2465 garciay 1
/**
2
 * @author      ETSI / STF481 / Yann Garcia
3
 * @version     $URL: file:///D:/RepositoriesNew/ITS/trunk/javasrc/codec/org/etsi/ttcn/codec/its/adapter/AcEnableSecurity.java $
4
 *              $Id: AcEnableSecurity.java 2655 2017-01-26 10:46:08Z filatov $
5
 */
6
package org.etsi.ttcn.codec.its.adapter;
7
 
8
import org.etsi.ttcn.codec.CodecBuffer;
9
import org.etsi.ttcn.codec.MainCodec;
10
import org.etsi.ttcn.codec.generic.Record;
11
import org.etsi.ttcn.tci.RecordValue;
12
import org.etsi.ttcn.tci.Type;
13
 
14
public class AcEnableSecurity extends Record {
15
 
16
    public AcEnableSecurity(MainCodec mainCodec) {
17
        super(mainCodec);
18
    }
19
 
20
    @Override
21
    protected void postEncodeField(String fieldName, CodecBuffer buf) {
22
//        TERFactory.getInstance().logDebug(">>> AcEnableSecurity.postEncodeField: " + fieldName);
23
 
24
    }
25
 
26
    @Override
27
    protected void preDecodeField(String fieldName, CodecBuffer buf, Type decodingHypothesis, RecordValue rv) {
28
//        TERFactory.getInstance().logDebug(">>> AcEnableSecurity.preDecodeField: " + fieldName + ", " + decodingHypothesis.getName() + ", " + rv.getType().getName());
29
 
30
        if (fieldName.equals("certificateId")) {
31
            mainCodec.setHint(decodingHypothesis.getName() + "Len", String.valueOf(buf.getNbBytes()));
32
        }
33
    }
34
 
35
    @Override
36
    protected void postDecodeField(String fieldName, CodecBuffer buf, Type decodingHypothesis, RecordValue rv) {
37
//        TERFactory.getInstance().logDebug(">>> AcEnableSecurity.postDecodeField: " + fieldName + ", " + decodingHypothesis.getName() + ", " + rv.getType().getName());
38
    }
39
 
40
} // End of class AcEnableSecurity