2010-04-18 00:16:20 +02:00
|
|
|
/**
|
|
|
|
******************************************************************************
|
|
|
|
*
|
|
|
|
* @file gcstelemetrystats.h
|
|
|
|
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
|
|
|
|
* @brief Implementation of the GCSTelemetryStats object. This file has been
|
|
|
|
* automatically generated by the UAVObjectGenerator.
|
|
|
|
*
|
|
|
|
* @note Object definition file: gcstelemetrystats.xml.
|
|
|
|
* This is an automatically generated file.
|
|
|
|
* DO NOT modify manually.
|
|
|
|
*
|
|
|
|
* @see The GNU Public License (GPL) Version 3
|
|
|
|
*
|
|
|
|
*****************************************************************************/
|
|
|
|
/*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful, but
|
|
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
|
|
|
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
|
|
* for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef GCSTELEMETRYSTATS_H
|
|
|
|
#define GCSTELEMETRYSTATS_H
|
|
|
|
|
|
|
|
#include "openpilot.h"
|
|
|
|
|
|
|
|
// Object constants
|
|
|
|
#define GCSTELEMETRYSTATS_OBJID 607270704U
|
|
|
|
#define GCSTELEMETRYSTATS_NAME "GCSTelemetryStats"
|
|
|
|
#define GCSTELEMETRYSTATS_ISSINGLEINST 1
|
|
|
|
#define GCSTELEMETRYSTATS_ISSETTINGS 0
|
|
|
|
#define GCSTELEMETRYSTATS_NUMBYTES sizeof(GCSTelemetryStatsData)
|
|
|
|
|
|
|
|
// Object access macros
|
|
|
|
#define GCSTelemetryStatsGet(dataOut) UAVObjGetData(GCSTelemetryStatsHandle(), dataOut)
|
|
|
|
#define GCSTelemetryStatsSet(dataIn) UAVObjSetData(GCSTelemetryStatsHandle(), dataIn)
|
|
|
|
#define GCSTelemetryStatsInstGet(instId, dataOut) UAVObjGetInstanceData(GCSTelemetryStatsHandle(), instId, dataOut)
|
|
|
|
#define GCSTelemetryStatsInstSet(instId, dataIn) UAVObjSetInstanceData(GCSTelemetryStatsHandle(), instId, dataIn)
|
|
|
|
#define GCSTelemetryStatsConnectQueue(queue) UAVObjConnectQueue(GCSTelemetryStatsHandle(), queue, EV_MASK_ALL_UPDATES)
|
|
|
|
#define GCSTelemetryStatsConnectCallback(cb) UAVObjConnectCallback(GCSTelemetryStatsHandle(), cb, EV_MASK_ALL_UPDATES)
|
|
|
|
#define GCSTelemetryStatsCreateInstance() UAVObjCreateInstance(GCSTelemetryStatsHandle())
|
|
|
|
#define GCSTelemetryStatsRequestUpdate() UAVObjRequestUpdate(GCSTelemetryStatsHandle())
|
|
|
|
#define GCSTelemetryStatsRequestInstUpdate(instId) UAVObjRequestInstanceUpdate(GCSTelemetryStatsHandle(), instId)
|
|
|
|
#define GCSTelemetryStatsUpdated() UAVObjUpdated(GCSTelemetryStatsHandle())
|
|
|
|
#define GCSTelemetryStatsInstUpdated(instId) UAVObjUpdated(GCSTelemetryStatsHandle(), instId)
|
|
|
|
#define GCSTelemetryStatsGetMetadata(dataOut) UAVObjGetMetadata(GCSTelemetryStatsHandle(), dataOut)
|
|
|
|
#define GCSTelemetryStatsSetMetadata(dataIn) UAVObjSetMetadata(GCSTelemetryStatsHandle(), dataIn)
|
|
|
|
|
|
|
|
// Object data
|
|
|
|
typedef struct {
|
|
|
|
uint8_t Connected;
|
|
|
|
float TxDataRate;
|
|
|
|
float RxDataRate;
|
|
|
|
uint32_t TxFailures;
|
|
|
|
uint32_t RxFailures;
|
|
|
|
uint32_t TxRetries;
|
|
|
|
|
|
|
|
} __attribute__((packed)) GCSTelemetryStatsData;
|
|
|
|
|
|
|
|
// Enumeration types
|
2010-04-21 04:49:11 +02:00
|
|
|
/* Enumeration options for field Connected */
|
|
|
|
typedef enum { GCSTELEMETRYSTATS_CONNECTED_TRUE=0, GCSTELEMETRYSTATS_CONNECTED_FALSE=1, } GCSTelemetryStatsConnectedOptions;
|
2010-04-18 00:16:20 +02:00
|
|
|
|
|
|
|
|
|
|
|
// Generic interface functions
|
|
|
|
int32_t GCSTelemetryStatsInitialize();
|
|
|
|
UAVObjHandle GCSTelemetryStatsHandle();
|
|
|
|
|
|
|
|
#endif // GCSTELEMETRYSTATS_H
|