Classes | Defines | Typedefs | Enumerations | Functions | Variables
crtp.h File Reference
#include "Crazyradio.h"
#include <cstdint>
Include dependency graph for crtp.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  crtp
struct  crtpCommanderHighLevelDefineTrajectoryRequest
struct  crtpCommanderHighLevelGoToRequest
struct  crtpCommanderHighLevelLandRequest
struct  crtpCommanderHighLevelSetGroupMaskRequest
struct  crtpCommanderHighLevelStartTrajectoryRequest
struct  crtpCommanderHighLevelStopRequest
struct  crtpCommanderHighLevelTakeoffRequest
struct  crtpConsoleResponse
struct  crtpEmergencyStopRequest
struct  crtpEmergencyStopWatchdogRequest
struct  crtpEmpty
struct  crtpExternalPosePacked
struct  crtpExternalPoseUpdate
struct  crtpExternalPositionPacked
struct  crtpExternalPositionUpdate
struct  crtpFullStateSetpointRequest
struct  crtpGetDeviceTypeNameRequest
struct  crtpGetDeviceTypeNameResponse
struct  crtpGetFirmwareVersionRequest
struct  crtpGetFirmwareVersionResponse
struct  crtpGetProtocolVersionRequest
struct  crtpGetProtocolVersionResponse
struct  crtpHoverSetpointRequest
struct  crtpLogControlResponse
struct  crtpLogCreateBlockRequest
struct  crtpLogCreateBlockV2Request
struct  crtpLogDataResponse
struct  crtpLogGetInfoRequest
struct  crtpLogGetInfoResponse
struct  crtpLogGetInfoV2Request
struct  crtpLogGetInfoV2Response
struct  crtpLogGetItemRequest
struct  crtpLogGetItemResponse
struct  crtpLogGetItemV2Request
struct  crtpLogGetItemV2Response
struct  crtpLogResetRequest
struct  crtpLogStartRequest
struct  crtpLogStopRequest
struct  crtpMemoryGetInfoRequest
struct  crtpMemoryGetInfoResponse
struct  crtpMemoryGetNumberRequest
struct  crtpMemoryGetNumberResponse
struct  crtpMemoryReadRequest
struct  crtpMemoryReadResponse
struct  crtpMemoryWriteRequest
struct  crtpMemoryWriteResponse
struct  crtpPacket_t
struct  crtpParamReadRequest
struct  crtpParamReadV2Request
struct  crtpParamTocGetInfoRequest
struct  crtpParamTocGetInfoResponse
struct  crtpParamTocGetInfoV2Request
struct  crtpParamTocGetInfoV2Response
struct  crtpParamTocGetItemRequest
struct  crtpParamTocGetItemResponse
struct  crtpParamTocGetItemV2Request
struct  crtpParamTocGetItemV2Response
struct  crtpParamWriteRequest< T >
struct  crtpParamWriteV2Request< T >
struct  crtpPlatformRSSIAck
struct  crtpPositionSetpointRequest
struct  crtpSetpointRequest
struct  crtpStopRequest
struct  logBlockItem
struct  logBlockItemV2
struct  trajectoryDescription

Defines

#define CHECKSIZE(s)   static_assert(sizeof(s) <= CRTP_MAXSIZE, #s " packet is too large");
#define CHECKSIZE_RESPONSE(s)   static_assert(sizeof(s) <= CRTP_MAXSIZE_RESPONSE, #s " packet is too large");

Typedefs

typedef crtpParamTocGetItemResponse Response

Enumerations

enum  crtpLogControlResult {
  crtpLogControlResultOk = 0, crtpLogControlResultOutOfMemory = 12, crtpLogControlResultCmdNotFound = 8, crtpLogControlResultWrongBlockId = 2,
  crtpLogControlResultBlockTooLarge = 7, crtpLogControlResultBlockExists = 17
}
enum  crtpMemoryType { EEPROM = 0x00, OW = 0x01, LED12 = 0x10, LOCO = 0x11 }
enum  TrajectoryLocation_e { TRAJECTORY_LOCATION_INVALID = 0, TRAJECTORY_LOCATION_MEM = 1 }
enum  TrajectoryType_e { TRAJECTORY_TYPE_POLY4D = 0 }

Functions

struct crtp __attribute__ ((packed))
 CHECKSIZE (crtpParamWriteRequest< double >) struct crtpParamValueResponse
 CHECKSIZE (crtpParamWriteV2Request< float >) struct crtpParamValueV2Response
constexpr crtp (uint8_t port, uint8_t channel)
 crtp (uint8_t byte)
 crtpCommanderHighLevelDefineTrajectoryRequest (uint8_t trajectoryId)
 crtpCommanderHighLevelGoToRequest (uint8_t groupMask, bool relative, float x, float y, float z, float yaw, float duration)
 crtpCommanderHighLevelLandRequest (uint8_t groupMask, float height, float duration)
 crtpCommanderHighLevelSetGroupMaskRequest (uint8_t groupMask)
 crtpCommanderHighLevelStartTrajectoryRequest (uint8_t groupMask, bool relative, bool reversed, uint8_t trajectoryId, float timescale)
 crtpCommanderHighLevelStopRequest (uint8_t groupMask)
 crtpCommanderHighLevelTakeoffRequest (uint8_t groupMask, float height, float duration)
 crtpEmergencyStopRequest ()
 crtpEmergencyStopWatchdogRequest ()
 crtpExternalPosePacked ()
 crtpExternalPoseUpdate (float x, float y, float z, float qx, float qy, float qz, float qw)
 crtpExternalPositionPacked ()
 crtpExternalPositionUpdate (float x, float y, float z)
 crtpFullStateSetpointRequest (float x, float y, float z, float vx, float vy, float vz, float ax, float ay, float az, float qx, float qy, float qz, float qw, float rollRate, float pitchRate, float yawRate)
 crtpGetDeviceTypeNameRequest ()
 crtpGetFirmwareVersionRequest ()
 crtpGetProtocolVersionRequest ()
 crtpHoverSetpointRequest (float vx, float vy, float yawrate, float zDistance)
 crtpLogCreateBlockRequest ()
 crtpLogCreateBlockV2Request ()
 crtpLogGetInfoRequest ()
 crtpLogGetInfoV2Request ()
 crtpLogGetItemRequest (uint8_t id)
 crtpLogGetItemV2Request (uint16_t id)
 crtpLogResetRequest ()
 crtpLogStartRequest (uint8_t id, uint8_t period)
 crtpLogStopRequest (uint8_t id)
 crtpMemoryGetInfoRequest (uint8_t memId)
 crtpMemoryGetNumberRequest ()
 crtpMemoryReadRequest (uint8_t memId, uint32_t memAddr, uint8_t length)
 crtpMemoryWriteRequest (uint8_t memId, uint32_t memAddr)
 crtpParamReadRequest (uint8_t id)
 crtpParamReadV2Request (uint16_t id)
 crtpParamTocGetInfoRequest ()
 crtpParamTocGetInfoV2Request ()
 crtpParamTocGetItemRequest (uint8_t id)
 crtpParamTocGetItemV2Request (uint16_t id)
 crtpParamWriteRequest (uint8_t id, const T &value)
 crtpParamWriteV2Request (uint16_t id, const T &value)
 crtpPositionSetpointRequest (float x, float y, float z, float yaw)
 crtpSetpointRequest (float roll, float pitch, float yawrate, uint16_t thrust)
 crtpStopRequest ()
static bool match (const Crazyradio::Ack &response)
bool operator== (const crtp &other) const
bool operator== (const crtpParamTocGetItemRequest &other) const
bool operator== (const crtpParamTocGetInfoRequest &other) const
bool operator== (const crtpParamReadRequest &other) const
bool operator== (const crtpParamTocGetItemV2Request &other) const
bool operator== (const crtpParamTocGetInfoV2Request &other) const
bool operator== (const crtpParamReadV2Request &other) const
bool operator== (const crtpLogGetInfoRequest &other) const
bool operator== (const crtpLogGetItemRequest &other) const
bool operator== (const crtpLogGetInfoV2Request &other) const
bool operator== (const crtpLogGetItemV2Request &other) const
void quatdecompress (uint32_t comp, float q[4])

Variables

typedef __attribute__
int16_t ax
int16_t ay
int16_t az
uint8_t blockId
uint8_t channel
const uint8_t cmd = 0
const uint8_t command
uint32_t crc
static int const CRTP_MAX_DATA_SIZE = 30
static int const CRTP_MAXSIZE = 31
static int const CRTP_MAXSIZE_RESPONSE = 32
uint8_t data [24]
struct trajectoryDescription description
float duration
uint8_t group
uint8_t groupMask
const crtp header
float height
uint8_t id
logBlockItem items [14]
uint8_t length
uint8_t link
uint32_t log_crc
uint8_t log_len
uint8_t log_max_ops
uint8_t log_max_packet
uint8_t logType
uint64_t memAddr
uint8_t memId
uint32_t memSize
crtpMemoryType memType
uint8_t n_pieces
char name [30]
uint8_t numberOfMemories
uint8_t numParam
uint32_t offset
int16_t omegax
int16_t omegay
int16_t omegaz
uint8_t period
float pitch
uint8_t port
uint32_t quat
float qw
float qx
float qy
float qz
uint8_t readonly
uint8_t relative
crtpParamTocGetItemRequest request
uint8_t requestByte1
uint8_t res0
uint8_t result
uint8_t reversed
float roll
uint8_t sign
uint8_t status
char text [28]
uint16_t thrust
float timescale
uint16_t timestampHi
uint8_t timestampLo
uint8_t trajectoryId
union {
trajectoryIdentifier
uint8_t trajectoryLocation
uint8_t trajectoryType
uint8_t type = 3
const T value
int version
float vx
float vy
int16_t vz
float x
float y
float yaw
float yawrate
float z
float zDistance

Define Documentation

#define CHECKSIZE (   s)    static_assert(sizeof(s) <= CRTP_MAXSIZE, #s " packet is too large");

Definition at line 8 of file crtp.h.

#define CHECKSIZE_RESPONSE (   s)    static_assert(sizeof(s) <= CRTP_MAXSIZE_RESPONSE, #s " packet is too large");

Definition at line 11 of file crtp.h.


Typedef Documentation

Definition at line 105 of file crtp.h.


Enumeration Type Documentation

Enumerator:
crtpLogControlResultOk 
crtpLogControlResultOutOfMemory 
crtpLogControlResultCmdNotFound 
crtpLogControlResultWrongBlockId 
crtpLogControlResultBlockTooLarge 
crtpLogControlResultBlockExists 

Definition at line 673 of file crtp.h.

Enumerator:
EEPROM 
OW 
LED12 
LOCO 

Definition at line 412 of file crtp.h.

Enumerator:
TRAJECTORY_LOCATION_INVALID 
TRAJECTORY_LOCATION_MEM 

Definition at line 1127 of file crtp.h.

Enumerator:
TRAJECTORY_TYPE_POLY4D 

Definition at line 1133 of file crtp.h.


Function Documentation

struct crtp __attribute__ ( (packed)  )

Definition at line 185 of file crtp.h.

Definition at line 322 of file crtp.h.

constexpr __attribute__::crtp ( uint8_t  port,
uint8_t  channel 
)

Definition at line 40 of file crtp.h.

__attribute__::crtp ( uint8_t  byte)

Definition at line 47 of file crtp.h.

Definition at line 1166 of file crtp.h.

__attribute__::crtpCommanderHighLevelGoToRequest ( uint8_t  groupMask,
bool  relative,
float  x,
float  y,
float  z,
float  yaw,
float  duration 
)

Definition at line 1097 of file crtp.h.

__attribute__::crtpCommanderHighLevelLandRequest ( uint8_t  groupMask,
float  height,
float  duration 
)

Definition at line 1047 of file crtp.h.

Definition at line 1003 of file crtp.h.

__attribute__::crtpCommanderHighLevelStartTrajectoryRequest ( uint8_t  groupMask,
bool  relative,
bool  reversed,
uint8_t  trajectoryId,
float  timescale 
)

Definition at line 1125 of file crtp.h.

Definition at line 1063 of file crtp.h.

__attribute__::crtpCommanderHighLevelTakeoffRequest ( uint8_t  groupMask,
float  height,
float  duration 
)

Definition at line 1025 of file crtp.h.

Definition at line 856 of file crtp.h.

Definition at line 867 of file crtp.h.

Definition at line 917 of file crtp.h.

__attribute__::crtpExternalPoseUpdate ( float  x,
float  y,
float  z,
float  qx,
float  qy,
float  qz,
float  qw 
)

Definition at line 899 of file crtp.h.

Definition at line 845 of file crtp.h.

__attribute__::crtpExternalPositionUpdate ( float  x,
float  y,
float  z 
)

Definition at line 829 of file crtp.h.

__attribute__::crtpFullStateSetpointRequest ( float  x,
float  y,
float  z,
float  vx,
float  vy,
float  vz,
float  ax,
float  ay,
float  az,
float  qx,
float  qy,
float  qz,
float  qw,
float  rollRate,
float  pitchRate,
float  yawRate 
)

Definition at line 1218 of file crtp.h.

Definition at line 1199 of file crtp.h.

Definition at line 1180 of file crtp.h.

__attribute__::crtpHoverSetpointRequest ( float  vx,
float  vy,
float  yawrate,
float  zDistance 
)

Definition at line 596 of file crtp.h.

Definition at line 807 of file crtp.h.

Definition at line 520 of file crtp.h.

Definition at line 731 of file crtp.h.

Definition at line 562 of file crtp.h.

Definition at line 773 of file crtp.h.

Definition at line 671 of file crtp.h.

__attribute__::crtpLogStartRequest ( uint8_t  id,
uint8_t  period 
)

Definition at line 642 of file crtp.h.

Definition at line 658 of file crtp.h.

Definition at line 410 of file crtp.h.

Definition at line 382 of file crtp.h.

__attribute__::crtpMemoryReadRequest ( uint8_t  memId,
uint32_t  memAddr,
uint8_t  length 
)

Definition at line 452 of file crtp.h.

__attribute__::crtpMemoryWriteRequest ( uint8_t  memId,
uint32_t  memAddr 
)

Definition at line 484 of file crtp.h.

Definition at line 167 of file crtp.h.

Definition at line 304 of file crtp.h.

Definition at line 132 of file crtp.h.

Definition at line 269 of file crtp.h.

Definition at line 93 of file crtp.h.

Definition at line 230 of file crtp.h.

__attribute__::crtpParamWriteRequest ( uint8_t  id,
const T &  value 
)

Definition at line 185 of file crtp.h.

__attribute__::crtpParamWriteV2Request ( uint16_t  id,
const T &  value 
)

Definition at line 322 of file crtp.h.

__attribute__::crtpPositionSetpointRequest ( float  x,
float  y,
float  z,
float  yaw 
)
__attribute__::crtpSetpointRequest ( float  roll,
float  pitch,
float  yawrate,
uint16_t  thrust 
)

Definition at line 368 of file crtp.h.

static bool match ( const Crazyradio::Ack response) [static]

Definition at line 112 of file crtp.h.

bool __attribute__::operator== ( const crtp other) const

Definition at line 54 of file crtp.h.

bool __attribute__::operator== ( const crtpParamTocGetItemRequest other) const

Definition at line 101 of file crtp.h.

bool __attribute__::operator== ( const crtpParamTocGetInfoRequest other) const

Definition at line 138 of file crtp.h.

bool __attribute__::operator== ( const crtpParamReadRequest other) const

Definition at line 174 of file crtp.h.

bool __attribute__::operator== ( const crtpParamTocGetItemV2Request other) const

Definition at line 238 of file crtp.h.

bool __attribute__::operator== ( const crtpParamTocGetInfoV2Request other) const

Definition at line 275 of file crtp.h.

bool __attribute__::operator== ( const crtpParamReadV2Request other) const

Definition at line 311 of file crtp.h.

bool __attribute__::operator== ( const crtpLogGetInfoRequest other) const

Definition at line 526 of file crtp.h.

bool __attribute__::operator== ( const crtpLogGetItemRequest other) const

Definition at line 569 of file crtp.h.

bool __attribute__::operator== ( const crtpLogGetInfoV2Request other) const

Definition at line 737 of file crtp.h.

bool __attribute__::operator== ( const crtpLogGetItemV2Request other) const

Definition at line 780 of file crtp.h.

void quatdecompress ( uint32_t  comp,
float  q[4] 
)

Definition at line 44 of file crtp.cpp.


Variable Documentation

int16_t ax

Definition at line 999 of file crtp.h.

int16_t ay

Definition at line 1000 of file crtp.h.

int16_t az

Definition at line 1001 of file crtp.h.

uint8_t blockId

Definition at line 716 of file crtp.h.

uint8_t channel

Definition at line 58 of file crtp.h.

const uint8_t cmd = 0

Definition at line 1186 of file crtp.h.

const uint8_t command

Definition at line 108 of file crtp.h.

uint32_t crc

Definition at line 154 of file crtp.h.

int const CRTP_MAX_DATA_SIZE = 30 [static]

Definition at line 6 of file crtp.h.

int const CRTP_MAXSIZE = 31 [static]

Definition at line 7 of file crtp.h.

int const CRTP_MAXSIZE_RESPONSE = 32 [static]

Definition at line 10 of file crtp.h.

uint8_t data

Definition at line 476 of file crtp.h.

Definition at line 1177 of file crtp.h.

float duration

Definition at line 1041 of file crtp.h.

uint8_t group

Definition at line 124 of file crtp.h.

uint8_t groupMask

Definition at line 1013 of file crtp.h.

Definition at line 107 of file crtp.h.

float height

Definition at line 1040 of file crtp.h.

uint8_t id

Definition at line 109 of file crtp.h.

Definition at line 605 of file crtp.h.

uint8_t length

Definition at line 119 of file crtp.h.

uint8_t link

Definition at line 59 of file crtp.h.

uint32_t log_crc

Definition at line 550 of file crtp.h.

uint16_t log_len

Definition at line 548 of file crtp.h.

uint8_t log_max_ops

Definition at line 554 of file crtp.h.

uint8_t log_max_packet

Definition at line 552 of file crtp.h.

uint8_t logType

Definition at line 582 of file crtp.h.

uint32_t memAddr

Definition at line 442 of file crtp.h.

uint8_t memId

Definition at line 419 of file crtp.h.

uint32_t memSize

Definition at line 441 of file crtp.h.

Definition at line 440 of file crtp.h.

uint8_t n_pieces

Definition at line 1149 of file crtp.h.

char name[30]

Definition at line 1226 of file crtp.h.

Definition at line 402 of file crtp.h.

uint16_t numParam

Definition at line 153 of file crtp.h.

uint32_t offset

Definition at line 1148 of file crtp.h.

int16_t omegax

Definition at line 1003 of file crtp.h.

int16_t omegay

Definition at line 1004 of file crtp.h.

int16_t omegaz

Definition at line 1005 of file crtp.h.

uint8_t period

Definition at line 655 of file crtp.h.

float pitch

Definition at line 382 of file crtp.h.

uint8_t port

Definition at line 60 of file crtp.h.

int32_t quat

Definition at line 920 of file crtp.h.

float qw

Definition at line 925 of file crtp.h.

float qx

Definition at line 922 of file crtp.h.

float qy

Definition at line 923 of file crtp.h.

float qz

Definition at line 924 of file crtp.h.

uint8_t readonly

Definition at line 123 of file crtp.h.

uint8_t relative

Definition at line 1120 of file crtp.h.

Definition at line 118 of file crtp.h.

uint8_t requestByte1

Definition at line 702 of file crtp.h.

uint8_t res0

Definition at line 122 of file crtp.h.

uint8_t result

Definition at line 703 of file crtp.h.

uint8_t reversed

Definition at line 1145 of file crtp.h.

float roll

Definition at line 381 of file crtp.h.

uint8_t sign

Definition at line 121 of file crtp.h.

uint8_t status

Definition at line 475 of file crtp.h.

char text

Definition at line 125 of file crtp.h.

uint16_t thrust

Definition at line 384 of file crtp.h.

float timescale

Definition at line 1147 of file crtp.h.

uint16_t timestampHi

Definition at line 718 of file crtp.h.

uint8_t timestampLo

Definition at line 717 of file crtp.h.

uint8_t trajectoryId

Definition at line 1146 of file crtp.h.

union { ... } trajectoryIdentifier

Definition at line 1150 of file crtp.h.

uint8_t trajectoryType

Definition at line 1151 of file crtp.h.

uint8_t type = 3

Definition at line 120 of file crtp.h.

const T value

Definition at line 196 of file crtp.h.

char version

Definition at line 1188 of file crtp.h.

int16_t vx

Definition at line 948 of file crtp.h.

int16_t vy

Definition at line 949 of file crtp.h.

int16_t vz

Definition at line 998 of file crtp.h.

float x

Definition at line 840 of file crtp.h.

float y

Definition at line 841 of file crtp.h.

float yaw

Definition at line 967 of file crtp.h.

float yawrate

Definition at line 383 of file crtp.h.

float z

Definition at line 842 of file crtp.h.

float zDistance

Definition at line 951 of file crtp.h.



crazyflie_cpp
Author(s): Wolfgang Hoenig
autogenerated on Wed Jun 12 2019 19:20:44