-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRadioCountMsg.java
More file actions
executable file
·158 lines (135 loc) · 4.18 KB
/
RadioCountMsg.java
File metadata and controls
executable file
·158 lines (135 loc) · 4.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
/**
* This class is automatically generated by mig. DO NOT EDIT THIS FILE.
* This class implements a Java interface to the 'RadioCountMsg'
* message type.
*/
public class RadioCountMsg extends net.tinyos.message.Message {
/** The default size of this message type in bytes. */
public static final int DEFAULT_MESSAGE_SIZE = 2;
/** The Active Message type associated with this message. */
public static final int AM_TYPE = 6;
/** Create a new RadioCountMsg of size 2. */
public RadioCountMsg() {
super(DEFAULT_MESSAGE_SIZE);
amTypeSet(AM_TYPE);
}
/** Create a new RadioCountMsg of the given data_length. */
public RadioCountMsg(int data_length) {
super(data_length);
amTypeSet(AM_TYPE);
}
/**
* Create a new RadioCountMsg with the given data_length
* and base offset.
*/
public RadioCountMsg(int data_length, int base_offset) {
super(data_length, base_offset);
amTypeSet(AM_TYPE);
}
/**
* Create a new RadioCountMsg using the given byte array
* as backing store.
*/
public RadioCountMsg(byte[] data) {
super(data);
amTypeSet(AM_TYPE);
}
/**
* Create a new RadioCountMsg using the given byte array
* as backing store, with the given base offset.
*/
public RadioCountMsg(byte[] data, int base_offset) {
super(data, base_offset);
amTypeSet(AM_TYPE);
}
/**
* Create a new RadioCountMsg using the given byte array
* as backing store, with the given base offset and data length.
*/
public RadioCountMsg(byte[] data, int base_offset, int data_length) {
super(data, base_offset, data_length);
amTypeSet(AM_TYPE);
}
/**
* Create a new RadioCountMsg embedded in the given message
* at the given base offset.
*/
public RadioCountMsg(net.tinyos.message.Message msg, int base_offset) {
super(msg, base_offset, DEFAULT_MESSAGE_SIZE);
amTypeSet(AM_TYPE);
}
/**
* Create a new RadioCountMsg embedded in the given message
* at the given base offset and length.
*/
public RadioCountMsg(net.tinyos.message.Message msg, int base_offset, int data_length) {
super(msg, base_offset, data_length);
amTypeSet(AM_TYPE);
}
/**
/* Return a String representation of this message. Includes the
* message type name and the non-indexed field values.
*/
public String toString() {
String s = "Message <RadioCountMsg> \n";
try {
s += " [counter=0x"+Long.toHexString(get_counter())+"]\n";
} catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ }
return s;
}
// Message-type-specific access methods appear below.
/////////////////////////////////////////////////////////
// Accessor methods for field: counter
// Field type: int, unsigned
// Offset (bits): 0
// Size (bits): 16
/////////////////////////////////////////////////////////
/**
* Return whether the field 'counter' is signed (false).
*/
public static boolean isSigned_counter() {
return false;
}
/**
* Return whether the field 'counter' is an array (false).
*/
public static boolean isArray_counter() {
return false;
}
/**
* Return the offset (in bytes) of the field 'counter'
*/
public static int offset_counter() {
return (0 / 8);
}
/**
* Return the offset (in bits) of the field 'counter'
*/
public static int offsetBits_counter() {
return 0;
}
/**
* Return the value (as a int) of the field 'counter'
*/
public int get_counter() {
return (int)getUIntBEElement(offsetBits_counter(), 16);
}
/**
* Set the value of the field 'counter'
*/
public void set_counter(int value) {
setUIntBEElement(offsetBits_counter(), 16, value);
}
/**
* Return the size, in bytes, of the field 'counter'
*/
public static int size_counter() {
return (16 / 8);
}
/**
* Return the size, in bits, of the field 'counter'
*/
public static int sizeBits_counter() {
return 16;
}
}