2010-02-22 03:18:23 +01:00
|
|
|
/**
|
|
|
|
******************************************************************************
|
|
|
|
*
|
2010-03-27 04:19:56 +01:00
|
|
|
* @file $(NAMELC).h
|
2010-02-22 03:18:23 +01:00
|
|
|
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
|
2010-03-27 04:19:56 +01:00
|
|
|
* @brief Implementation of the $(NAME) object. This file has been
|
|
|
|
* automatically generated by the UAVObjectGenerator.
|
|
|
|
*
|
|
|
|
* @note Object definition file: $(XMLFILE).
|
|
|
|
* This is an automatically generated file.
|
|
|
|
* DO NOT modify manually.
|
2010-02-22 03:18:23 +01:00
|
|
|
*
|
|
|
|
* @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 $(NAMEUC)_H
|
|
|
|
#define $(NAMEUC)_H
|
|
|
|
|
2010-02-27 20:57:45 +01:00
|
|
|
// Object constants
|
2010-03-27 04:19:56 +01:00
|
|
|
#define $(NAMEUC)_OBJID $(OBJID)U
|
2010-02-27 20:57:45 +01:00
|
|
|
#define $(NAMEUC)_NAME "$(NAME)"
|
2010-04-28 03:54:24 +02:00
|
|
|
#define $(NAMEUC)_METANAME "$(NAME)Meta"
|
2010-03-29 00:23:57 +02:00
|
|
|
#define $(NAMEUC)_ISSINGLEINST $(ISSINGLEINST)
|
|
|
|
#define $(NAMEUC)_ISSETTINGS $(ISSETTINGS)
|
2010-02-27 20:57:45 +01:00
|
|
|
#define $(NAMEUC)_NUMBYTES sizeof($(NAME)Data)
|
|
|
|
|
2010-04-04 04:11:51 +02:00
|
|
|
// Object access macros
|
2010-04-02 05:26:02 +02:00
|
|
|
#define $(NAME)Get(dataOut) UAVObjGetData($(NAME)Handle(), dataOut)
|
|
|
|
#define $(NAME)Set(dataIn) UAVObjSetData($(NAME)Handle(), dataIn)
|
2010-04-04 04:11:51 +02:00
|
|
|
#define $(NAME)InstGet(instId, dataOut) UAVObjGetInstanceData($(NAME)Handle(), instId, dataOut)
|
|
|
|
#define $(NAME)InstSet(instId, dataIn) UAVObjSetInstanceData($(NAME)Handle(), instId, dataIn)
|
2010-04-02 05:26:02 +02:00
|
|
|
#define $(NAME)ConnectQueue(queue) UAVObjConnectQueue($(NAME)Handle(), queue, EV_MASK_ALL_UPDATES)
|
|
|
|
#define $(NAME)ConnectCallback(cb) UAVObjConnectCallback($(NAME)Handle(), cb, EV_MASK_ALL_UPDATES)
|
2010-04-04 04:11:51 +02:00
|
|
|
#define $(NAME)CreateInstance() UAVObjCreateInstance($(NAME)Handle())
|
|
|
|
#define $(NAME)RequestUpdate() UAVObjRequestUpdate($(NAME)Handle())
|
|
|
|
#define $(NAME)RequestInstUpdate(instId) UAVObjRequestInstanceUpdate($(NAME)Handle(), instId)
|
|
|
|
#define $(NAME)Updated() UAVObjUpdated($(NAME)Handle())
|
|
|
|
#define $(NAME)InstUpdated(instId) UAVObjUpdated($(NAME)Handle(), instId)
|
|
|
|
#define $(NAME)GetMetadata(dataOut) UAVObjGetMetadata($(NAME)Handle(), dataOut)
|
|
|
|
#define $(NAME)SetMetadata(dataIn) UAVObjSetMetadata($(NAME)Handle(), dataIn)
|
2010-02-22 03:18:23 +01:00
|
|
|
|
|
|
|
// Object data
|
|
|
|
typedef struct {
|
2010-03-27 04:19:56 +01:00
|
|
|
$(DATAFIELDS)
|
2010-02-22 03:18:23 +01:00
|
|
|
} __attribute__((packed)) $(NAME)Data;
|
|
|
|
|
2010-04-27 03:55:28 +02:00
|
|
|
// Field information
|
|
|
|
$(DATAFIELDINFO)
|
2010-04-01 04:03:40 +02:00
|
|
|
|
2010-02-22 03:18:23 +01:00
|
|
|
// Generic interface functions
|
|
|
|
int32_t $(NAME)Initialize();
|
2010-04-02 05:26:02 +02:00
|
|
|
UAVObjHandle $(NAME)Handle();
|
2010-02-22 03:18:23 +01:00
|
|
|
|
2010-03-27 04:19:56 +01:00
|
|
|
#endif // $(NAMEUC)_H
|