#include <Crazyradio.h>
Public Types | |
enum | Datarate { Datarate_250KPS = 0, Datarate_1MPS = 1, Datarate_2MPS = 2 } |
enum | Power { Power_M18DBM = 0, Power_M12DBM = 1, Power_M6DBM = 2, Power_0DBM = 3 } |
Public Member Functions | |
Crazyradio (uint32_t devid) | |
bool | getAckEnable () const |
uint64_t | getAddress () const |
uint8_t | getChannel () const |
Datarate | getDatarate () const |
virtual void | send2PacketsNoAck (const uint8_t *data, uint32_t totalLength) |
virtual void | sendPacket (const uint8_t *data, uint32_t length, ITransport::Ack &result) |
virtual void | sendPacketNoAck (const uint8_t *data, uint32_t length) |
void | setAckEnable (bool enable) |
void | setAddress (uint64_t address) |
void | setArc (uint8_t arc) |
void | setArdBytes (uint8_t nbytes) |
void | setArdTime (uint8_t us) |
void | setChannel (uint8_t channel) |
void | setContCarrier (bool active) |
void | setDatarate (Datarate datarate) |
void | setPower (Power power) |
float | version () const |
virtual | ~Crazyradio () |
Public Member Functions inherited from ITransport | |
struct ITransport::Ack | __attribute__ ((packed)) |
void | enableLogging (bool enable) |
ITransport () | |
virtual | ~ITransport () |
Public Member Functions inherited from USBDevice | |
USBDevice (uint16_t idVendor, uint16_t idProduct) | |
virtual | ~USBDevice () |
Static Public Member Functions | |
static uint32_t | numDevices () |
Private Attributes | |
bool | m_ackEnable |
uint64_t | m_address |
uint8_t | m_channel |
Datarate | m_datarate |
Additional Inherited Members | |
Protected Member Functions inherited from ITransport | |
void | logAck (const Ack &ack) |
void | logPacket (const uint8_t *data, uint32_t length) |
Protected Member Functions inherited from USBDevice | |
void | open (uint32_t devid) |
void | sendVendorSetup (uint8_t request, uint16_t value, uint16_t index, const unsigned char *data, uint16_t length) |
Static Protected Member Functions inherited from USBDevice | |
static uint32_t | numDevices (uint16_t idVendor, uint16_t idProduct) |
Protected Attributes inherited from ITransport | |
bool | m_enableLogging |
std::ofstream | m_file |
Protected Attributes inherited from USBDevice | |
libusb_context * | m_ctx |
libusb_device_handle * | m_handle |
float | m_version |
Definition at line 9 of file Crazyradio.h.
enum Crazyradio::Datarate |
Enumerator | |
---|---|
Datarate_250KPS | |
Datarate_1MPS | |
Datarate_2MPS |
Definition at line 14 of file Crazyradio.h.
enum Crazyradio::Power |
Enumerator | |
---|---|
Power_M18DBM | |
Power_M12DBM | |
Power_M6DBM | |
Power_0DBM |
Definition at line 21 of file Crazyradio.h.
Crazyradio::Crazyradio | ( | uint32_t | devid | ) |
Definition at line 22 of file Crazyradio.cpp.
|
virtual |
Definition at line 42 of file Crazyradio.cpp.
|
inline |
Definition at line 77 of file Crazyradio.h.
|
inline |
Definition at line 51 of file Crazyradio.h.
|
inline |
Definition at line 44 of file Crazyradio.h.
|
inline |
Definition at line 58 of file Crazyradio.h.
|
static |
Definition at line 46 of file Crazyradio.cpp.
|
virtual |
Definition at line 233 of file Crazyradio.cpp.
|
virtual |
Implements ITransport.
Definition at line 136 of file Crazyradio.cpp.
|
virtual |
Implements ITransport.
Definition at line 197 of file Crazyradio.cpp.
void Crazyradio::setAckEnable | ( | bool | enable | ) |
Definition at line 125 of file Crazyradio.cpp.
void Crazyradio::setAddress | ( | uint64_t | address | ) |
Definition at line 57 of file Crazyradio.cpp.
void Crazyradio::setArc | ( | uint8_t | arc | ) |
Definition at line 95 of file Crazyradio.cpp.
void Crazyradio::setArdBytes | ( | uint8_t | nbytes | ) |
Definition at line 120 of file Crazyradio.cpp.
void Crazyradio::setArdTime | ( | uint8_t | us | ) |
Definition at line 100 of file Crazyradio.cpp.
void Crazyradio::setChannel | ( | uint8_t | channel | ) |
Definition at line 51 of file Crazyradio.cpp.
void Crazyradio::setContCarrier | ( | bool | active | ) |
Definition at line 131 of file Crazyradio.cpp.
void Crazyradio::setDatarate | ( | Datarate | datarate | ) |
Definition at line 84 of file Crazyradio.cpp.
void Crazyradio::setPower | ( | Power | power | ) |
Definition at line 90 of file Crazyradio.cpp.
|
inline |
Definition at line 37 of file Crazyradio.h.
|
private |
Definition at line 102 of file Crazyradio.h.
|
private |
Definition at line 100 of file Crazyradio.h.
|
private |
Definition at line 99 of file Crazyradio.h.
|
private |
Definition at line 101 of file Crazyradio.h.