Public Types | Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
Crazyradio Class Reference

#include <Crazyradio.h>

Inheritance diagram for Crazyradio:
Inheritance graph
[legend]

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
 

Detailed Description

Definition at line 9 of file Crazyradio.h.

Member Enumeration Documentation

Enumerator
Datarate_250KPS 
Datarate_1MPS 
Datarate_2MPS 

Definition at line 14 of file Crazyradio.h.

Enumerator
Power_M18DBM 
Power_M12DBM 
Power_M6DBM 
Power_0DBM 

Definition at line 21 of file Crazyradio.h.

Constructor & Destructor Documentation

Crazyradio::Crazyradio ( uint32_t  devid)

Definition at line 22 of file Crazyradio.cpp.

Crazyradio::~Crazyradio ( )
virtual

Definition at line 42 of file Crazyradio.cpp.

Member Function Documentation

bool Crazyradio::getAckEnable ( ) const
inline

Definition at line 77 of file Crazyradio.h.

uint64_t Crazyradio::getAddress ( ) const
inline

Definition at line 51 of file Crazyradio.h.

uint8_t Crazyradio::getChannel ( ) const
inline

Definition at line 44 of file Crazyradio.h.

Datarate Crazyradio::getDatarate ( ) const
inline

Definition at line 58 of file Crazyradio.h.

uint32_t Crazyradio::numDevices ( )
static

Definition at line 46 of file Crazyradio.cpp.

void Crazyradio::send2PacketsNoAck ( const uint8_t *  data,
uint32_t  totalLength 
)
virtual

Definition at line 233 of file Crazyradio.cpp.

void Crazyradio::sendPacket ( const uint8_t *  data,
uint32_t  length,
ITransport::Ack result 
)
virtual

Implements ITransport.

Definition at line 136 of file Crazyradio.cpp.

void Crazyradio::sendPacketNoAck ( const uint8_t *  data,
uint32_t  length 
)
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.

float Crazyradio::version ( ) const
inline

Definition at line 37 of file Crazyradio.h.

Member Data Documentation

bool Crazyradio::m_ackEnable
private

Definition at line 102 of file Crazyradio.h.

uint64_t Crazyradio::m_address
private

Definition at line 100 of file Crazyradio.h.

uint8_t Crazyradio::m_channel
private

Definition at line 99 of file Crazyradio.h.

Datarate Crazyradio::m_datarate
private

Definition at line 101 of file Crazyradio.h.


The documentation for this class was generated from the following files:


crazyflie_cpp
Author(s): Wolfgang Hoenig
autogenerated on Fri Nov 1 2019 03:39:56