-
Notifications
You must be signed in to change notification settings - Fork 0
/
xbee_64_addr.h
72 lines (60 loc) · 1.13 KB
/
xbee_64_addr.h
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
/*
* Xbee16addr.h
*
* Created on: 16/06/2014
* Author: Wellington
*/
#ifndef XBEE64ADDR_H_
#define XBEE64ADDR_H_
class Xbee64Addr {
public:
Xbee64Addr(){}
Xbee64Addr(unsigned char msb, unsigned char secsb, unsigned char tirsb, unsigned char forsb, unsigned char fivsb, unsigned char sixsb, unsigned char sevsb, unsigned char lsb){
msb_ = msb;
secsb_ = secsb;
tirsb_ = tirsb;
forsb_ = forsb;
fivsb_ = fivsb;
sixsb_ = sixsb;
sevsb_ = sevsb;
lsb_ = lsb;
}
virtual ~Xbee64Addr(){}
unsigned char get_addr_sb(unsigned char index){
if(index==1){
return msb_;
}
if(index==2){
return secsb_;
}
if(index==3){
return tirsb_;
}
if(index==4){
return forsb_;
}
if(index==5){
return fivsb_;
}
if(index==6){
return sixsb_;
}
if(index==7){
return sevsb_;
}
if(index==8){
return lsb_;
}
return msb_;
}
private:
unsigned char msb_;
unsigned char secsb_;
unsigned char tirsb_;
unsigned char forsb_;
unsigned char fivsb_;
unsigned char sixsb_;
unsigned char sevsb_;
unsigned char lsb_;
};
#endif /* XBEE64ADDR_H_ */