mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-11-30 08:24:11 +01:00
e10a16f1c3
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@578 ebee16cc-31ac-478f-84a7-5cbb03baadba
85 lines
4.0 KiB
C
85 lines
4.0 KiB
C
/**
|
|
******************************************************************************
|
|
*
|
|
* @file flighttelemetrystats.h
|
|
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
|
|
* @brief Implementation of the FlightTelemetryStats object. This file has been
|
|
* automatically generated by the UAVObjectGenerator.
|
|
*
|
|
* @note Object definition file: flighttelemetrystats.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 FLIGHTTELEMETRYSTATS_H
|
|
#define FLIGHTTELEMETRYSTATS_H
|
|
|
|
// Object constants
|
|
#define FLIGHTTELEMETRYSTATS_OBJID 1712072286U
|
|
#define FLIGHTTELEMETRYSTATS_NAME "FlightTelemetryStats"
|
|
#define FLIGHTTELEMETRYSTATS_METANAME "FlightTelemetryStatsMeta"
|
|
#define FLIGHTTELEMETRYSTATS_ISSINGLEINST 1
|
|
#define FLIGHTTELEMETRYSTATS_ISSETTINGS 0
|
|
#define FLIGHTTELEMETRYSTATS_NUMBYTES sizeof(FlightTelemetryStatsData)
|
|
|
|
// Object access macros
|
|
#define FlightTelemetryStatsGet(dataOut) UAVObjGetData(FlightTelemetryStatsHandle(), dataOut)
|
|
#define FlightTelemetryStatsSet(dataIn) UAVObjSetData(FlightTelemetryStatsHandle(), dataIn)
|
|
#define FlightTelemetryStatsInstGet(instId, dataOut) UAVObjGetInstanceData(FlightTelemetryStatsHandle(), instId, dataOut)
|
|
#define FlightTelemetryStatsInstSet(instId, dataIn) UAVObjSetInstanceData(FlightTelemetryStatsHandle(), instId, dataIn)
|
|
#define FlightTelemetryStatsConnectQueue(queue) UAVObjConnectQueue(FlightTelemetryStatsHandle(), queue, EV_MASK_ALL_UPDATES)
|
|
#define FlightTelemetryStatsConnectCallback(cb) UAVObjConnectCallback(FlightTelemetryStatsHandle(), cb, EV_MASK_ALL_UPDATES)
|
|
#define FlightTelemetryStatsCreateInstance() UAVObjCreateInstance(FlightTelemetryStatsHandle())
|
|
#define FlightTelemetryStatsRequestUpdate() UAVObjRequestUpdate(FlightTelemetryStatsHandle())
|
|
#define FlightTelemetryStatsRequestInstUpdate(instId) UAVObjRequestInstanceUpdate(FlightTelemetryStatsHandle(), instId)
|
|
#define FlightTelemetryStatsUpdated() UAVObjUpdated(FlightTelemetryStatsHandle())
|
|
#define FlightTelemetryStatsInstUpdated(instId) UAVObjUpdated(FlightTelemetryStatsHandle(), instId)
|
|
#define FlightTelemetryStatsGetMetadata(dataOut) UAVObjGetMetadata(FlightTelemetryStatsHandle(), dataOut)
|
|
#define FlightTelemetryStatsSetMetadata(dataIn) UAVObjSetMetadata(FlightTelemetryStatsHandle(), dataIn)
|
|
|
|
// Object data
|
|
typedef struct {
|
|
uint8_t Status;
|
|
float TxDataRate;
|
|
float RxDataRate;
|
|
uint32_t TxFailures;
|
|
uint32_t RxFailures;
|
|
uint32_t TxRetries;
|
|
|
|
} __attribute__((packed)) FlightTelemetryStatsData;
|
|
|
|
// Field information
|
|
// Field Status information
|
|
/* Enumeration options for field Status */
|
|
typedef enum { FLIGHTTELEMETRYSTATS_STATUS_DISCONNECTED=0, FLIGHTTELEMETRYSTATS_STATUS_HANDSHAKEREQ=1, FLIGHTTELEMETRYSTATS_STATUS_HANDSHAKEACK=2, FLIGHTTELEMETRYSTATS_STATUS_CONNECTED=3, } FlightTelemetryStatsStatusOptions;
|
|
// Field TxDataRate information
|
|
// Field RxDataRate information
|
|
// Field TxFailures information
|
|
// Field RxFailures information
|
|
// Field TxRetries information
|
|
|
|
|
|
// Generic interface functions
|
|
int32_t FlightTelemetryStatsInitialize();
|
|
UAVObjHandle FlightTelemetryStatsHandle();
|
|
|
|
#endif // FLIGHTTELEMETRYSTATS_H
|