409862bcdbef3e1797bc1197e23353013da395d1
[packetcable.git] / packetcable-driver / src / main / java / org / pcmm / objects / SyncOptions.java
1 /**
2  @header@
3  */
4 package org.pcmm.objects;
5
6 import org.pcmm.base.impl.PCMMBaseObject;
7
8 /**
9  * 
10  * PCMM SyncOptions object
11  * 
12  */
13 public class SyncOptions extends PCMMBaseObject {
14
15         private byte synchType;
16
17         private byte reportType;
18
19         public static final byte STANDARD_REPORT_DATA = (byte) 0;
20         public static final byte COMPLETE_GATE_DATA = (byte) 1;
21         public static final byte FULL_SYNCHRONIZATION = (byte) 0;
22         public static final byte INCREMENTAL_SYNCHRONIZATION = (byte) 1;
23
24         public SyncOptions() {
25                 this(STANDARD_REPORT_DATA, FULL_SYNCHRONIZATION);
26         }
27
28         public SyncOptions(byte reportType, byte synchType) {
29                 super((short) 8, (byte) 1, (byte) 18);
30                 setByte(this.reportType = reportType, (short) 4);
31                 setByte(this.synchType = synchType, (short) 6);
32         }
33
34         /**
35          * Parse data and create COPSHandle object
36          */
37         public SyncOptions(byte[] dataPtr) {
38                 super(dataPtr);
39                 reportType = getByte((short) 4);
40                 synchType = getByte((short) 6);
41         }
42
43         /**
44          * @return the synchType
45          */
46         public byte getSynchType() {
47                 return synchType;
48         }
49
50         /**
51          * @param synchType
52          *            the synchType to set
53          */
54         public void setSynchType(byte synchType) {
55                 this.synchType = synchType;
56         }
57
58         /**
59          * @return the reportType
60          */
61         public byte getReportType() {
62                 return reportType;
63         }
64
65         /**
66          * @param reportType
67          *            the reportType to set
68          */
69         public void setReportType(byte reportType) {
70                 this.reportType = reportType;
71         }
72
73 }