For getting RSSI value from xbee
Dependents: XBeeGetRSSISampleProgram Xbee_s2_RX_versao2
XBeeGetRssi.h@12:7ec2a4147b44, 2013-09-03 (annotated)
- Committer:
- ATKINZ117
- Date:
- Tue Sep 03 07:04:26 2013 +0000
- Revision:
- 12:7ec2a4147b44
- Parent:
- 9:eb8838ce9d65
changed to return rssi value as int.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
ATKINZ117 | 0:d1ff6ea68ab2 | 1 | #ifndef XBEEGETRSSI20130718 |
ATKINZ117 | 0:d1ff6ea68ab2 | 2 | #define XBEEGETRSSI20130718 |
ATKINZ117 | 0:d1ff6ea68ab2 | 3 | |
ATKINZ117 | 0:d1ff6ea68ab2 | 4 | #include "mbed.h" |
ATKINZ117 | 0:d1ff6ea68ab2 | 5 | |
ATKINZ117 | 0:d1ff6ea68ab2 | 6 | class XBeeGetRssi{ |
ATKINZ117 | 0:d1ff6ea68ab2 | 7 | public: |
ATKINZ117 | 0:d1ff6ea68ab2 | 8 | XBeeGetRssi(PinName tx,PinName rx); //select the oneshot mode or repeat mode. |
ATKINZ117 | 12:7ec2a4147b44 | 9 | int getRssi(/*int n*/); //method for getting rssi. |
ATKINZ117 | 0:d1ff6ea68ab2 | 10 | |
ATKINZ117 | 0:d1ff6ea68ab2 | 11 | private: |
ATKINZ117 | 0:d1ff6ea68ab2 | 12 | PinName _tx; |
ATKINZ117 | 0:d1ff6ea68ab2 | 13 | PinName _rx; |
ATKINZ117 | 7:588a7745cc0e | 14 | char _rssi[256]; //arrangement for containing the rssi value. |
ATKINZ117 | 12:7ec2a4147b44 | 15 | char* _rssi_address; //value before caluculate. |
ATKINZ117 | 12:7ec2a4147b44 | 16 | char* _getRssi(); |
ATKINZ117 | 12:7ec2a4147b44 | 17 | char* _returned_rssi; //return value after calculate |
ATKINZ117 | 12:7ec2a4147b44 | 18 | //char _return_rssi_value[10]; |
ATKINZ117 | 12:7ec2a4147b44 | 19 | //int _rssi_value; |
ATKINZ117 | 0:d1ff6ea68ab2 | 20 | }; |
ATKINZ117 | 0:d1ff6ea68ab2 | 21 | |
ATKINZ117 | 0:d1ff6ea68ab2 | 22 | #endif |