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  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  crtpPosExtBringup
struct  crtpPositionSetpointRequest
struct  crtpSetpointRequest
struct  crtpStopRequest
struct  data_mocap
struct  logBlockItem
struct  logBlockItemV2
struct  posFixed24_t
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 uint16_t fp16_t
typedef int16_t posFixed16_t
typedef struct posFixed24_t posFixed24_t
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)
 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)
 crtpPosExtBringup ()
 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

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
int32_t quat
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
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

typedef uint16_t fp16_t

Definition at line 1091 of file crtp.h.

typedef int16_t posFixed16_t

Definition at line 1092 of file crtp.h.

typedef struct posFixed24_t posFixed24_t

Definition at line 98 of file crtp.h.


Enumeration Type Documentation

Enumerator:
crtpLogControlResultOk 
crtpLogControlResultOutOfMemory 
crtpLogControlResultCmdNotFound 
crtpLogControlResultWrongBlockId 
crtpLogControlResultBlockTooLarge 
crtpLogControlResultBlockExists 

Definition at line 666 of file crtp.h.

Enumerator:
EEPROM 
OW 
LED12 
LOCO 

Definition at line 405 of file crtp.h.

Enumerator:
TRAJECTORY_LOCATION_INVALID 
TRAJECTORY_LOCATION_MEM 

Definition at line 1048 of file crtp.h.

Enumerator:
TRAJECTORY_TYPE_POLY4D 

Definition at line 1054 of file crtp.h.


Function Documentation

struct crtp __attribute__ ( (packed)  )

Definition at line 178 of file crtp.h.

Definition at line 315 of file crtp.h.

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

Definition at line 38 of file crtp.h.

__attribute__::crtp ( uint8_t  byte)

Definition at line 45 of file crtp.h.

Definition at line 1087 of file crtp.h.

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

Definition at line 1018 of file crtp.h.

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

Definition at line 968 of file crtp.h.

Definition at line 924 of file crtp.h.

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

Definition at line 1046 of file crtp.h.

Definition at line 984 of file crtp.h.

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

Definition at line 946 of file crtp.h.

Definition at line 838 of file crtp.h.

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

Definition at line 822 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 1174 of file crtp.h.

Definition at line 1155 of file crtp.h.

Definition at line 1136 of file crtp.h.

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

Definition at line 589 of file crtp.h.

Definition at line 800 of file crtp.h.

Definition at line 513 of file crtp.h.

Definition at line 724 of file crtp.h.

Definition at line 555 of file crtp.h.

Definition at line 766 of file crtp.h.

Definition at line 664 of file crtp.h.

__attribute__::crtpLogStartRequest ( uint8_t  id,
uint8_t  period 
)

Definition at line 635 of file crtp.h.

Definition at line 651 of file crtp.h.

Definition at line 403 of file crtp.h.

Definition at line 375 of file crtp.h.

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

Definition at line 445 of file crtp.h.

__attribute__::crtpMemoryWriteRequest ( uint8_t  memId,
uint32_t  memAddr 
)

Definition at line 477 of file crtp.h.

Definition at line 160 of file crtp.h.

Definition at line 297 of file crtp.h.

Definition at line 125 of file crtp.h.

Definition at line 262 of file crtp.h.

Definition at line 86 of file crtp.h.

Definition at line 223 of file crtp.h.

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

Definition at line 178 of file crtp.h.

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

Definition at line 315 of file crtp.h.

Definition at line 1122 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 361 of file crtp.h.

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

Definition at line 105 of file crtp.h.

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

Definition at line 52 of file crtp.h.

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

Definition at line 94 of file crtp.h.

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

Definition at line 131 of file crtp.h.

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

Definition at line 167 of file crtp.h.

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

Definition at line 231 of file crtp.h.

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

Definition at line 268 of file crtp.h.

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

Definition at line 304 of file crtp.h.

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

Definition at line 519 of file crtp.h.

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

Definition at line 562 of file crtp.h.

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

Definition at line 730 of file crtp.h.

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

Definition at line 773 of file crtp.h.


Variable Documentation

int16_t ax

Definition at line 920 of file crtp.h.

int16_t ay

Definition at line 921 of file crtp.h.

int16_t az

Definition at line 922 of file crtp.h.

uint8_t blockId

Definition at line 709 of file crtp.h.

uint8_t channel

Definition at line 56 of file crtp.h.

const uint8_t cmd = 0

Definition at line 1142 of file crtp.h.

const uint8_t command

Definition at line 101 of file crtp.h.

uint32_t crc

Definition at line 147 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.

struct data_mocap data

Definition at line 469 of file crtp.h.

Definition at line 1098 of file crtp.h.

float duration

Definition at line 962 of file crtp.h.

uint8_t group

Definition at line 117 of file crtp.h.

uint8_t groupMask

Definition at line 934 of file crtp.h.

const crtp header

Definition at line 100 of file crtp.h.

float height

Definition at line 961 of file crtp.h.

uint8_t id

Definition at line 102 of file crtp.h.

Definition at line 598 of file crtp.h.

uint8_t length

Definition at line 112 of file crtp.h.

uint8_t link

Definition at line 57 of file crtp.h.

uint32_t log_crc

Definition at line 543 of file crtp.h.

uint16_t log_len

Definition at line 541 of file crtp.h.

uint8_t log_max_ops

Definition at line 547 of file crtp.h.

uint8_t log_max_packet

Definition at line 545 of file crtp.h.

uint8_t logType

Definition at line 575 of file crtp.h.

uint32_t memAddr

Definition at line 435 of file crtp.h.

uint8_t memId

Definition at line 412 of file crtp.h.

uint32_t memSize

Definition at line 434 of file crtp.h.

Definition at line 433 of file crtp.h.

uint8_t n_pieces

Definition at line 1070 of file crtp.h.

char name[30]

Definition at line 1182 of file crtp.h.

Definition at line 395 of file crtp.h.

uint16_t numParam

Definition at line 146 of file crtp.h.

uint32_t offset

Definition at line 1069 of file crtp.h.

int16_t omegax

Definition at line 924 of file crtp.h.

int16_t omegay

Definition at line 925 of file crtp.h.

int16_t omegaz

Definition at line 926 of file crtp.h.

uint8_t period

Definition at line 648 of file crtp.h.

float pitch

Definition at line 375 of file crtp.h.

uint8_t port

Definition at line 58 of file crtp.h.

uint32_t quat

Definition at line 923 of file crtp.h.

uint8_t readonly

Definition at line 116 of file crtp.h.

uint8_t relative

Definition at line 1041 of file crtp.h.

Definition at line 111 of file crtp.h.

uint8_t requestByte1

Definition at line 695 of file crtp.h.

uint8_t res0

Definition at line 115 of file crtp.h.

uint8_t result

Definition at line 696 of file crtp.h.

uint8_t reversed

Definition at line 1066 of file crtp.h.

float roll

Definition at line 374 of file crtp.h.

uint8_t sign

Definition at line 114 of file crtp.h.

uint8_t status

Definition at line 468 of file crtp.h.

char text[27]

Definition at line 118 of file crtp.h.

uint16_t thrust

Definition at line 377 of file crtp.h.

float timescale

Definition at line 1068 of file crtp.h.

uint16_t timestampHi

Definition at line 711 of file crtp.h.

uint8_t timestampLo

Definition at line 710 of file crtp.h.

uint8_t trajectoryId

Definition at line 1067 of file crtp.h.

union { ... } trajectoryIdentifier

Definition at line 1071 of file crtp.h.

uint8_t trajectoryType

Definition at line 1072 of file crtp.h.

uint8_t type

Definition at line 113 of file crtp.h.

const T value

Definition at line 189 of file crtp.h.

char version[30]

Definition at line 1144 of file crtp.h.

int16_t vx

Definition at line 869 of file crtp.h.

int16_t vy

Definition at line 870 of file crtp.h.

int16_t vz

Definition at line 919 of file crtp.h.

Definition at line 833 of file crtp.h.

Definition at line 834 of file crtp.h.

float yaw

Definition at line 888 of file crtp.h.

float yawrate

Definition at line 376 of file crtp.h.

Definition at line 835 of file crtp.h.

float zDistance

Definition at line 872 of file crtp.h.



crazyflie_tools
Author(s): Wolfgang Hoenig
autogenerated on Wed Jun 12 2019 19:20:48