1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-12-03 11:24:10 +01:00
LibrePilot/flight/OpenPilot/UAVObjects/inc/exampleobject1.h

72 lines
2.6 KiB
C
Raw Normal View History

/**
******************************************************************************
*
* @file exampleobject1.h
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
* @brief Implementation of the ExampleObject1 object. This file has been
* automatically generated by the UAVObjectGenerator.
*
* @note Object definition file: exampleobject1.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 EXAMPLEOBJECT1_H
#define EXAMPLEOBJECT1_H
#include "openpilot.h"
// Object constants
#define EXAMPLEOBJECT1_OBJID 3852936276U
#define EXAMPLEOBJECT1_NAME "ExampleObject1"
#define EXAMPLEOBJECT1_ISSINGLEINST 0
#define EXAMPLEOBJECT1_ISSETTINGS 0
#define EXAMPLEOBJECT1_NUMBYTES sizeof(ExampleObject1Data)
// Data access macros
#define ExampleObject1Get(dataOut) UAVObjGetData(ExampleObject1Handle(), dataOut)
#define ExampleObject1Set(dataIn) UAVObjSetData(ExampleObject1Handle(), dataIn)
#define ExampleObject1ConnectQueue(queue) UAVObjConnectQueue(ExampleObject1Handle(), queue, EV_MASK_ALL_UPDATES)
#define ExampleObject1ConnectCallback(cb) UAVObjConnectCallback(ExampleObject1Handle(), cb, EV_MASK_ALL_UPDATES)
// Object data
typedef struct {
int8_t Field1;
int16_t Field2;
int32_t Field3;
float Field4[4];
uint8_t Field5;
uint16_t Field6;
uint32_t Field7;
uint8_t Field8;
} __attribute__((packed)) ExampleObject1Data;
// Enumeration types
typedef enum { EXAMPLEOBJECT1_FIELD8_OPTION1=0, EXAMPLEOBJECT1_FIELD8_OPTION2=1, } EXAMPLEOBJECT1FIELD8Enum;
// Generic interface functions
int32_t ExampleObject1Initialize();
UAVObjHandle ExampleObject1Handle();
#endif // EXAMPLEOBJECT1_H