Merge "Remove "response" from yang."
[packetcable.git] / packetcable-driver / src / main / java / org / pcmm / gates / impl / DOCSISServiceClassNameTrafficProfile.java
1 /**
2  @header@
3  */
4 package org.pcmm.gates.impl;
5
6 import org.pcmm.base.impl.PCMMBaseObject;
7 import org.pcmm.gates.ITrafficProfile;
8
9 /**
10  *
11  */
12 public class DOCSISServiceClassNameTrafficProfile extends PCMMBaseObject
13             implements ITrafficProfile {
14
15     public static final byte STYPE = 2;
16     public static final short LENGTH = 24;
17
18     /**
19      *
20      */
21     public DOCSISServiceClassNameTrafficProfile() {
22         this(LENGTH, STYPE, SNUM);
23     }
24
25     /**
26      * @param data - the data bytes to parse
27      */
28     public DOCSISServiceClassNameTrafficProfile(byte[] data) {
29         super(data);
30     }
31
32     /**
33      * @param len - the classifier's length
34      * @param sType - the sType value
35      * @param sNum - the sNum value
36      */
37     public DOCSISServiceClassNameTrafficProfile(short len, byte sType, byte sNum) {
38         super(len, sType, sNum);
39         setEnvelop((byte) 0x7);
40     }
41
42     /**
43      * @return the serviceClassName
44      */
45     public String getServiceClassName() {
46         return new String(getBytes((short) 4, (short) 4));
47     }
48
49     /**
50      * @param serviceClassName
51      *            the serviceClassName to set
52      */
53     public void setServiceClassName(String serviceClassName) {
54         setBytes(serviceClassName.getBytes(), (short) 4);
55     }
56
57     /*
58      * (non-Javadoc)
59      *
60      * @see org.pcmm.gates.ITrafficProfile#getEnvelop()
61      */
62     @Override
63     public byte getEnvelop() {
64         return getBytes((short) 0, (short) 1)[0];
65     }
66
67     /*
68      * (non-Javadoc)
69      *
70      * @see org.pcmm.gates.ITrafficProfile#setEnvelop(byte)
71      */
72     @Override
73     public void setEnvelop(byte en) {
74         setBytes(new byte[] { en }, (short) 0);
75     }
76 }