1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-12-11 19:24:10 +01:00
LibrePilot/flight/OpenPilot/UAVObjects/inc/gcstelemetrystats.h
vassilis 99b67388bf Flight/UAVObjects Added support for default field values (used to initialize settings with defaults)
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@558 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-04-28 01:54:24 +00:00

85 lines
3.8 KiB
C

/**
******************************************************************************
*
* @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
// Object constants
#define GCSTELEMETRYSTATS_OBJID 607270704U
#define GCSTELEMETRYSTATS_NAME "GCSTelemetryStats"
#define GCSTELEMETRYSTATS_METANAME "GCSTelemetryStatsMeta"
#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;
// Field information
// Field Connected information
/* Enumeration options for field Connected */
typedef enum { GCSTELEMETRYSTATS_CONNECTED_TRUE=0, GCSTELEMETRYSTATS_CONNECTED_FALSE=1, } GCSTelemetryStatsConnectedOptions;
// Field TxDataRate information
// Field RxDataRate information
// Field TxFailures information
// Field RxFailures information
// Field TxRetries information
// Generic interface functions
int32_t GCSTelemetryStatsInitialize();
UAVObjHandle GCSTelemetryStatsHandle();
#endif // GCSTELEMETRYSTATS_H