1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-12-04 12:24:11 +01:00
LibrePilot/flight/OpenPilot/UAVObjects/inc/flightbatterystate.h
fredericg 369657d52e FlightBatteryState object changed
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@786 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-06-16 13:41:10 +00:00

77 lines
3.5 KiB
C

/**
******************************************************************************
*
* @file flightbatterystate.h
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
* @brief Implementation of the FlightBatteryState object. This file has been
* automatically generated by the UAVObjectGenerator.
*
* @note Object definition file: flightbatterystate.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 FLIGHTBATTERYSTATE_H
#define FLIGHTBATTERYSTATE_H
// Object constants
#define FLIGHTBATTERYSTATE_OBJID 4176558368U
#define FLIGHTBATTERYSTATE_NAME "FlightBatteryState"
#define FLIGHTBATTERYSTATE_METANAME "FlightBatteryStateMeta"
#define FLIGHTBATTERYSTATE_ISSINGLEINST 1
#define FLIGHTBATTERYSTATE_ISSETTINGS 0
#define FLIGHTBATTERYSTATE_NUMBYTES sizeof(FlightBatteryStateData)
// Object access macros
#define FlightBatteryStateGet(dataOut) UAVObjGetData(FlightBatteryStateHandle(), dataOut)
#define FlightBatteryStateSet(dataIn) UAVObjSetData(FlightBatteryStateHandle(), dataIn)
#define FlightBatteryStateInstGet(instId, dataOut) UAVObjGetInstanceData(FlightBatteryStateHandle(), instId, dataOut)
#define FlightBatteryStateInstSet(instId, dataIn) UAVObjSetInstanceData(FlightBatteryStateHandle(), instId, dataIn)
#define FlightBatteryStateConnectQueue(queue) UAVObjConnectQueue(FlightBatteryStateHandle(), queue, EV_MASK_ALL_UPDATES)
#define FlightBatteryStateConnectCallback(cb) UAVObjConnectCallback(FlightBatteryStateHandle(), cb, EV_MASK_ALL_UPDATES)
#define FlightBatteryStateCreateInstance() UAVObjCreateInstance(FlightBatteryStateHandle())
#define FlightBatteryStateRequestUpdate() UAVObjRequestUpdate(FlightBatteryStateHandle())
#define FlightBatteryStateRequestInstUpdate(instId) UAVObjRequestInstanceUpdate(FlightBatteryStateHandle(), instId)
#define FlightBatteryStateUpdated() UAVObjUpdated(FlightBatteryStateHandle())
#define FlightBatteryStateInstUpdated(instId) UAVObjUpdated(FlightBatteryStateHandle(), instId)
#define FlightBatteryStateGetMetadata(dataOut) UAVObjGetMetadata(FlightBatteryStateHandle(), dataOut)
#define FlightBatteryStateSetMetadata(dataIn) UAVObjSetMetadata(FlightBatteryStateHandle(), dataIn)
// Object data
typedef struct {
uint32_t Voltage;
uint32_t Current;
uint32_t ConsumedEnergy;
} __attribute__((packed)) FlightBatteryStateData;
// Field information
// Field Voltage information
// Field Current information
// Field ConsumedEnergy information
// Generic interface functions
int32_t FlightBatteryStateInitialize();
UAVObjHandle FlightBatteryStateHandle();
#endif // FLIGHTBATTERYSTATE_H