Merge "Remove "response" from yang."
[packetcable.git] / packetcable-driver / src / main / java / org / pcmm / base / IPCMMBaseObject.java
1 /**
2  @header@
3  */
4
5 package org.pcmm.base;
6
7 import java.io.IOException;
8 import java.net.Socket;
9
10 import org.umu.cops.stack.COPSData;
11
12 /**
13  * Base interface for all PCMM objects, it define the {@code S-Type},
14  * {@code S-Num} and the data length
15  * 
16  */
17 public interface IPCMMBaseObject {
18
19     /**
20      * sets the S-Type
21      *
22      * @param stype
23      */
24     void setSType(byte stype);
25
26     /**
27      *
28      * @return S-Type
29      */
30     byte getSType();
31
32     /**
33      * sets the S-Num
34      *
35      * @param snum
36      *            S-Num
37      */
38     void setSNum(byte snum);
39
40     /**
41      * gets the S-Num
42      *
43      * @return S-Num
44      */
45     byte getSNum();
46
47     /**
48      * sets the length;
49      *
50      * @param len
51      */
52     void setLength(short len);
53
54     /**
55      * gets the length;
56      *
57      * @return length
58      */
59     short getLength();
60
61     /**
62      * sets the COPS data
63      *
64      * @param data
65      *            COPS data
66      */
67     void setData(COPSData data);
68
69     /**
70      * gets the COPS data
71      *
72      * @return COPS data
73      */
74     COPSData getData();
75
76     void writeData(Socket id) throws IOException;
77
78         byte[] getAsBinaryArray();
79
80 }