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