Completing ZigbeeTest with doorlock test
[iot2.git] / benchmarks / other / ZigbeeTest / IoTZigbeeMessageZclReportAttributes.java
1
2 import java.util.List;
3
4 /** Zigbee Message Zcl Report Attributes.
5  *
6  * @author      Ali Younis <ayounis @ uci.edu>
7  * @version     1.0
8  * @since       2016-04-19
9  */
10 public class IoTZigbeeMessageZclReportAttributes extends IoTZigbeeMessage {
11
12         static public class Attribute {
13
14                 // private variables
15                 private int attributeId;
16                 private int dataType;
17                 private byte[] data;
18
19                 /**
20                  * Constructor
21                  */
22                 public Attribute(int _attributeId, int _dataType, byte[] _data) {
23                         attributeId = _attributeId;
24                         dataType = _dataType;
25                         data = _data;
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                 /**
39                  * getDataType() method that returns attribute data type
40                  *
41                  * @return int
42                  */
43                 public int getDataType() {
44                         return dataType;
45                 }
46
47
48                 /**
49                  * getData() method that returns attribute data
50                  *
51                  * @return byte[]
52                  */
53                 public byte[] getData() {
54                         return data;
55                 }
56
57         }
58
59         // private variables
60         private int clusterId;
61         private int profileId;
62         private List <Attribute> attributes;
63
64         /**
65          * Constructor
66          */
67         public IoTZigbeeMessageZclReportAttributes(int _packetId, int _clusterId, int _profileId, List <Attribute> _attributes) {
68                 super(_packetId);
69
70                 clusterId = _clusterId;
71                 profileId = _profileId;
72                 attributes = _attributes;
73         }
74
75         /**
76          * getClusterId() method that returns the cluster id
77          *
78          * @return int
79          */
80         public int getClusterId() {
81                 return clusterId;
82         }
83
84         /**
85          * getProfileId() method that returns the profile id
86          *
87          * @return int
88          */
89         public int getProfileId() {
90                 return profileId;
91         }
92
93         /**
94          * getAttributes() method that returns all attributes data
95          *
96          * @return List <Attribute>
97          */
98         public List <Attribute> getAttributes() {
99                 return attributes;
100         }
101 }