CRTP Driver main class.
Classes
CRTPDriver
CRTPDriver()
CTRP Driver main class
This class in inherited by all the CRTP link drivers.
Driver constructor. Throw an exception if the driver is unable to open the URI
Descendants
- cflib.crtp.prrtdriver.PrrtDriver
- cflib.crtp.radiodriver.RadioDriver
- cflib.crtp.serialdriver.SerialDriver
- cflib.crtp.tcpdriver.TcpDriver
- cflib.crtp.udpdriver.UdpDriver
- cflib.crtp.usbdriver.UsbDriver
Methods
def close(self)
Close the link
def connect(self, uri, radio_link_statistics_callback, link_error_callback)
Connect the driver to a specified URI
Parameters
Name | Description |
---|---|
uri | Uri of the link to open |
radio_link_statistics_callback | Callback to report radio link statistics |
link_error_callback | Callback to report errors (will result in disconnection) |
def enum(self)
Enumerate, and return a list, of the available link URI on this system
def get_help(self)
return the help message on how to form the URI for this driver None means no help
def get_name(self)
Return a human readable name of the interface.
def get_status(self)
Return a status string from the interface.
def receive_packet(self, wait=0)
Receive a CRTP packet.
Parameters
Name | Description |
---|---|
wait | The time to wait for a packet in second. -1 means forever@return One CRTP packet or None if no packet has been received. |
def scan_interface(self, address=None)
Scan interface for available Crazyflie quadcopters and return a list with them.
def send_packet(self, pk)
Send a CRTP packet