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