#include <VWI.hh>
Virtual Wire Receiver.
Definition at line 174 of file VWI.hh.
Construct VWI Receiver instance connected to the given pin.
- Parameters
-
[in] | rx | input pin. |
[in] | codec | for the receiver. |
Definition at line 181 of file VWI.hh.
bool VWI::Receiver::available |
( |
| ) |
const |
|
inline |
Returns true if an unread message is available. May have a bad check-sum.
- Returns
- true(1) if a message is available to read.
Definition at line 212 of file VWI.hh.
void VWI::Receiver::begin |
( |
| ) |
|
|
inline |
Start the Phase Locked Loop listening for the receiver. Must do this before receiving any messages,
Definition at line 191 of file VWI.hh.
void VWI::Receiver::end |
( |
| ) |
|
|
inline |
Stop the Phase Locked Loop listening to the receiver. No messages will be received until begin() is called again. Saves interrupt processing cycles.
Definition at line 202 of file VWI.hh.
int VWI::Receiver::link_quality_indicator |
( |
| ) |
|
Return link quality indicator; milli-seconds that the receiver pin is low after receiving a message. RF433 RX modules will increase gain until noise is detected. The lower the gain during the latest message the longer the delay before noise. Typical values are 200 when transmitter (3.7V) is 10 cm from the receiver, 150 at 50 cm, 100 at 5 m. For this measurement to be valid a new message should not be sent in the automatic gain control time slot (time until noise).
- Returns
- milli-seconds.
Definition at line 156 of file VWI_Receiver.cpp.
int VWI::Receiver::recv |
( |
uint8_t & |
src, |
|
|
uint8_t & |
port, |
|
|
void * |
buf, |
|
|
size_t |
len, |
|
|
uint32_t |
ms = 0L |
|
) |
| |
If a message is available (good checksum or not), copies up to len bytes to the given buffer, buf. Returns number of bytes received/copied, zero(0) for timeout or negative error code; bad checksum(-1), and in enhanced mode did not match address(-2).
- Parameters
-
[out] | src | source network address. |
[out] | port | device port (or message type). |
[in] | buf | pointer to location to save the read data. |
[in] | len | available space in buf. |
[in] | ms | timeout period (zero for blocking) |
- Returns
- number of bytes received or negative error code.
Definition at line 119 of file VWI_Receiver.cpp.
void TIMER1_COMPA_vect |
( |
void |
| ) |
|
|
friend |
The documentation for this class was generated from the following files: