DJI::OSDK::SubscriptionPackage Class Reference

Package class to support Subscribe-style telemetry. More...

#include <dji_subscription.hpp>

Public Types

typedef struct DJI::OSDK::SubscriptionPackage::PackageInfo PackageInfo
 

Public Member Functions

void setPackageID (uint8_t id)
 
void setConfig (uint8_t config)
 
bool setTopicList (Telemetry::TopicName *topics, int numberOfTopics, uint16_t freq)
 Fill in necessary information for ADD_PACKAGE call. More...
 
void allocateDataBuffer ()
 
void clearDataBuffer ()
 
void cleanUpPackage ()
 
int serializePackageInfo (uint8_t *buffer)
 Serialize the info and uidList to a buffer to send to FC. More...
 
void setUserUnpackCallback (VehicleCallBack userFunctionAfterPackageExtraction, UserData userData)
 
bool isOccupied ()
 
void setOccupied (bool status)
 
bool hasLeftOverData ()
 
void setLeftOverDataFlag (bool flag)
 
PackageInfo getInfo ()
 
uint32_t * getUidList ()
 
Telemetry::TopicNamegetTopicList ()
 
uint32_t * getOffsetList ()
 
uint8_t * getDataBuffer ()
 
uint32_t getBufferSize ()
 
VehicleCallBackHandler getUnpackHandler ()
 
void packageAddSuccessHandler ()
 Helper function to do post processing when adding package is successful. More...
 
void packageRemoveSuccessHandler ()
 Helper function to do post processing when removing package is successful. More...
 

Detailed Description

Package class to support Subscribe-style telemetry.

Use the DJI_DataSubscription class to access telemetry.

Note
This class is internal and does not need to be used by applications directly.

Member Function Documentation

◆ packageAddSuccessHandler()

void SubscriptionPackage::packageAddSuccessHandler ( )

Helper function to do post processing when adding package is successful.

Supported Platforms : M210V2, M300

◆ packageRemoveSuccessHandler()

void SubscriptionPackage::packageRemoveSuccessHandler ( )

Helper function to do post processing when removing package is successful.

Supported Platforms : M210V2, M300

◆ serializePackageInfo()

int SubscriptionPackage::serializePackageInfo ( uint8_t *  buffer)

Serialize the info and uidList to a buffer to send to FC.

Supported Platforms : M210V2, M300
Parameters
buffer

◆ setTopicList()

bool SubscriptionPackage::setTopicList ( Telemetry::TopicName topics,
int  numberOfTopics,
uint16_t  freq 
)

Fill in necessary information for ADD_PACKAGE call.

Supported Platforms : M210V2, M300
Parameters
topicsList of TopicName
numberOfTopicsNumber of topics to subscribe for this package
freqFrequency of this package
Returns

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