35 #ifndef UAVOBJECTMANAGER_H
36 #define UAVOBJECTMANAGER_H
40 #define UAVOBJ_ALL_INSTANCES 0xFFFF
41 #define UAVOBJ_MAX_INSTANCES 1000
46 #define UAVOBJ_ACCESS_SHIFT 0
47 #define UAVOBJ_GCS_ACCESS_SHIFT 1
48 #define UAVOBJ_TELEMETRY_ACKED_SHIFT 2
49 #define UAVOBJ_GCS_TELEMETRY_ACKED_SHIFT 3
50 #define UAVOBJ_TELEMETRY_UPDATE_MODE_SHIFT 4
51 #define UAVOBJ_GCS_TELEMETRY_UPDATE_MODE_SHIFT 6
52 #define UAVOBJ_UPDATE_MODE_MASK 0x3
103 #define EV_MASK_ALL 0
104 #define EV_MASK_ALL_UPDATES (EV_UNPACKED | EV_UPDATED | EV_UPDATED_MANUAL | EV_UPDATED_PERIODIC)
131 void *uavo_data,
int uavo_len);
165 int32_t
UAVObjUnpack(UAVObjHandle obj_handle, uint16_t instId,
const uint8_t* dataIn);
166 int32_t
UAVObjPack(UAVObjHandle obj_handle, uint16_t instId, uint8_t* dataOut);
167 int32_t
UAVObjSave(UAVObjHandle obj_handle, uint16_t instId);
168 int32_t
UAVObjLoad(UAVObjHandle obj_handle, uint16_t instId);
170 #if defined(PIOS_INCLUDE_SDCARD)
171 int32_t UAVObjSaveToFile(UAVObjHandle obj_handle, uint16_t instId,
FILEINFO* file);
172 UAVObjHandle UAVObjLoadFromFile(
FILEINFO* file);
180 int32_t
UAVObjSetData(UAVObjHandle obj_handle,
const void* dataIn);
182 int32_t
UAVObjGetData(UAVObjHandle obj_handle,
void* dataOut);
188 int32_t
UAVObjSetMetadata(UAVObjHandle obj_handle,
const UAVObjMetadata* dataIn);
220 #endif // UAVOBJECTMANAGER_H
int32_t UAVObjSaveMetaobjects()
void UAVObjSetTelemetryAcked(UAVObjMetadata *dataOut, uint8_t val)
uint32_t UAVObjIDByIndex(uint8_t index)
void UAVObjSetTelemetryGcsUpdateMode(UAVObjMetadata *dataOut, UAVObjUpdateMode val)
uint16_t UAVObjCreateInstance(UAVObjHandle obj_handle, UAVObjInitializeCallback initCb)
void UAVObjSetTelemetryUpdateMode(UAVObjMetadata *dataOut, UAVObjUpdateMode val)
uint32_t lastCallbackErrorID
UAVObjHandle UAVObjGetByID(uint32_t id)
int32_t UAVObjSetInstanceData(UAVObjHandle obj_handle, uint16_t instId, const void *dataIn)
bool UAVObjIsMetaobject(UAVObjHandle obj)
int32_t UAVObjDisconnectQueue(UAVObjHandle obj_handle, struct pios_queue *queue)
UAVObjUpdateMode UAVObjGetGcsTelemetryUpdateMode(const UAVObjMetadata *dataOut)
bool UAVObjIsSettings(UAVObjHandle obj)
int32_t UAVObjLoadSettings()
int32_t UAVObjUnpack(UAVObjHandle obj_handle, uint16_t instId, const uint8_t *dataIn)
int32_t UAVObjSaveSettings()
uint32_t UAVObjGetNumBytes(UAVObjHandle obj)
int32_t UAVObjPack(UAVObjHandle obj_handle, uint16_t instId, uint8_t *dataOut)
int32_t UAVObjConnectCallbackThrottled(UAVObjHandle obj_handle, UAVObjEventCallback cb, void *cbCtx, uint8_t eventMask, uint16_t interval)
void UAVObjCbSetFlag(const UAVObjEvent *objEv, void *ctx, void *obj, int len)
UAVObjAccessType UAVObjGetGcsAccess(const UAVObjMetadata *dataOut)
int32_t UAVObjSave(UAVObjHandle obj_handle, uint16_t instId)
uint16_t loggingUpdatePeriod
int32_t UAVObjConnectQueueThrottled(UAVObjHandle obj_handle, struct pios_queue *queue, uint8_t eventMask, uint16_t interval)
uint32_t eventQueueErrors
UAVObjAccessType UAVObjGetAccess(const UAVObjMetadata *dataOut)
uint16_t telemetryUpdatePeriod
int32_t UAVObjSetDataField(UAVObjHandle obj_handle, const void *dataIn, uint32_t offset, uint32_t size)
uint32_t lastQueueErrorID
void UAVObjGetStats(UAVObjStats *statsOut)
uint16_t gcsTelemetryUpdatePeriod
uint8_t UAVObjGetTelemetryAcked(const UAVObjMetadata *dataOut)
int32_t UAVObjGetInstanceDataField(UAVObjHandle obj_handle, uint16_t instId, void *dataOut, uint32_t offset, uint32_t size)
uint8_t UAVObjGetGcsTelemetryAcked(const UAVObjMetadata *dataOut)
uint32_t UAVObjGetID(UAVObjHandle obj)
bool UAVObjIsSingleInstance(UAVObjHandle obj)
int32_t UAVObjGetInstanceData(UAVObjHandle obj_handle, uint16_t instId, void *dataOut)
void UAVObjInstanceUpdated(UAVObjHandle obj_handle, uint16_t instId)
void(* UAVObjInitializeCallback)(UAVObjHandle obj_handle, uint16_t instId)
UAVObjUpdateMode UAVObjGetTelemetryUpdateMode(const UAVObjMetadata *dataOut)
int32_t UAVObjConnectCallback(UAVObjHandle obj_handle, UAVObjEventCallback cb, void *cbCtx, uint8_t eventMask)
int32_t UAVObjSetInstanceDataField(UAVObjHandle obj_handle, uint16_t instId, const void *dataIn, uint32_t offset, uint32_t size)
void UAVObjUnblockThrottle(struct ObjectEventEntryThrottled *throttled)
struct UAVOBase * UAVObjHandle
int32_t UAVObjDeleteById(uint32_t obj_id, uint16_t inst_id)
int32_t UAVObjSetMetadata(UAVObjHandle obj_handle, const UAVObjMetadata *dataIn)
void(* UAVObjEventCallback)(const UAVObjEvent *ev, void *cb_ctx, void *uavo_data, int uavo_len)
void UAVObjCbCopyData(const UAVObjEvent *objEv, void *ctx, void *obj, int len)
int32_t UAVObjConnectQueue(UAVObjHandle obj_handle, struct pios_queue *queue, uint8_t eventMask)
uint8_t UAVObjGetMetadataAccess(const UAVObjMetadata *dataOut)
int32_t getEventMask(UAVObjHandle obj_handle, struct pios_queue *queue)
int32_t UAVObjLoadMetaobjects()
int32_t UAVObjGetMetadata(UAVObjHandle obj_handle, UAVObjMetadata *dataOut)
void UAVObjSetGcsTelemetryAcked(UAVObjMetadata *dataOut, uint8_t val)
UAVObjHandle UAVObjGetLinkedObj(UAVObjHandle obj)
uint32_t eventCallbackErrors
void UAVObjUpdated(UAVObjHandle obj)
uint16_t UAVObjGetNumInstances(UAVObjHandle obj)
int32_t UAVObjDeleteMetaobjects()
void(* new_uavo_instance_cb_t)(uint32_t, uint32_t)
int8_t UAVObjReadOnly(UAVObjHandle obj)
int32_t UAVObjLoad(UAVObjHandle obj_handle, uint16_t instId)
int32_t UAVObjSetData(UAVObjHandle obj_handle, const void *dataIn)
static struct pios_queue * queue
int32_t UAVObjInitialize()
int32_t UAVObjGetData(UAVObjHandle obj_handle, void *dataOut)
UAVObjHandle UAVObjRegister(uint32_t id, int32_t isSingleInstance, int32_t isSettings, uint32_t numBytes, UAVObjInitializeCallback initCb)
struct ObjectEventEntryThrottled * throttle
void UAVObjRegisterNewInstanceCB(new_uavo_instance_cb_t callback)
int32_t UAVObjGetDataField(UAVObjHandle obj_handle, void *dataOut, uint32_t offset, uint32_t size)
void UAVObjSetGcsAccess(UAVObjMetadata *dataOut, UAVObjAccessType mode)
int32_t UAVObjDisconnectCallback(UAVObjHandle obj_handle, UAVObjEventCallback cb, void *cbCtx)
void UAVObjSetAccess(UAVObjMetadata *dataOut, UAVObjAccessType mode)
void UAVObjIterate(void(*iterator)(UAVObjHandle obj))
int32_t UAVObjDeleteSettings()