Making classes final to make inheritance impossible
[iot2.git] / benchmarks / other / ZigbeeTest / IoTZigbeeMessageZclConfigureReportingResponse.java
1
2 import java.util.List;
3
4 /** Zigbee Message Zcl Configure Reporting Response.
5  *
6  * @author      Ali Younis <ayounis @ uci.edu>
7  * @version     1.0
8  * @since       2016-04-19
9  */
10 public class IoTZigbeeMessageZclConfigureReportingResponse extends IoTZigbeeMessage {
11
12         static public class Attribute {
13
14                 // private variables
15                 private int attributeId;
16                 private boolean successOrFail;
17                 private boolean isReport;
18
19                 /**
20                  * Constructor
21                  */
22                 public Attribute(int _attributeId, boolean _successOrFail, boolean _isReport) {
23                         attributeId = _attributeId;
24                         successOrFail = _successOrFail;
25                         isReport = _isReport;
26                 }
27
28                 /**
29                  * getAttributeId() method that returns attribute id
30                  *
31                  * @return int
32                  */
33                 public int getAttributeId() {
34                         return attributeId;
35                 }
36
37                 /**
38                  * getIsReport() method that gets if the direction is report of receive
39                  *
40                  * @return boolean
41                  */
42                 public boolean getIsReport() {
43                         return isReport;
44                 }
45
46                 /**
47                  * getSuccessOrFail() method is if the configure for this attribute failed or succeeded
48                  *
49                  * @return boolean
50                  */
51                 public boolean getSuccessOrFail() {
52                         return successOrFail;
53                 }
54         }
55
56         // private variables
57         private int clusterId;
58         private int profileId;
59         private boolean allSuccess;
60         private List <Attribute> attributes;
61
62         /**
63          * Constructor
64          */
65         public IoTZigbeeMessageZclConfigureReportingResponse(int _packetId, int _clusterId, int _profileId, boolean _allSuccess, List <Attribute> _attributes) {
66                 super(_packetId);
67
68                 clusterId = _clusterId;
69                 profileId = _profileId;
70                 allSuccess = _allSuccess;
71                 attributes = _attributes;
72         }
73
74         /**
75          * getAllSuccess() method that returns if all the configurations succeeded
76          *
77          * @return boolean
78          */
79         public boolean getAllSuccess() {
80                 return allSuccess;
81         }
82
83         /**
84          * getClusterId() method that returns the cluster id
85          *
86          * @return int
87          */
88         public int getClusterId() {
89                 return clusterId;
90         }
91
92         /**
93          * getProfileId() method that returns the profile id
94          *
95          * @return int
96          */
97         public int getProfileId() {
98                 return profileId;
99         }
100
101         /**
102          * getAttributes() method that returns if all attributes if one of there was a failure to configure
103          *
104          * @return List <Attribute>
105          */
106         public List <Attribute> getAttributes() {
107                 return attributes;
108         }
109 }