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

104 lines
4.8 KiB
C

/**
******************************************************************************
* @addtogroup UAVObjects OpenPilot UAVObjects
* @{
* @addtogroup TaskInfo TaskInfo
* @brief Task information
*
* Autogenerated files and functions for TaskInfo Object
* @{
*
* @file taskinfo.h
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
* @brief Implementation of the TaskInfo object. This file has been
* automatically generated by the UAVObjectGenerator.
*
* @note Object definition file: taskinfo.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 TASKINFO_H
#define TASKINFO_H
// Object constants
#define TASKINFO_OBJID 1358273008U
#define TASKINFO_NAME "TaskInfo"
#define TASKINFO_METANAME "TaskInfoMeta"
#define TASKINFO_ISSINGLEINST 1
#define TASKINFO_ISSETTINGS 0
#define TASKINFO_NUMBYTES sizeof(TaskInfoData)
// Object access macros
/**
* @function TaskInfoGet(dataOut)
* @brief Populate a TaskInfoData object
* @param[out] dataOut
*/
#define TaskInfoGet(dataOut) UAVObjGetData(TaskInfoHandle(), dataOut)
#define TaskInfoSet(dataIn) UAVObjSetData(TaskInfoHandle(), dataIn)
#define TaskInfoInstGet(instId, dataOut) UAVObjGetInstanceData(TaskInfoHandle(), instId, dataOut)
#define TaskInfoInstSet(instId, dataIn) UAVObjSetInstanceData(TaskInfoHandle(), instId, dataIn)
#define TaskInfoConnectQueue(queue) UAVObjConnectQueue(TaskInfoHandle(), queue, EV_MASK_ALL_UPDATES)
#define TaskInfoConnectCallback(cb) UAVObjConnectCallback(TaskInfoHandle(), cb, EV_MASK_ALL_UPDATES)
#define TaskInfoCreateInstance() UAVObjCreateInstance(TaskInfoHandle())
#define TaskInfoRequestUpdate() UAVObjRequestUpdate(TaskInfoHandle())
#define TaskInfoRequestInstUpdate(instId) UAVObjRequestInstanceUpdate(TaskInfoHandle(), instId)
#define TaskInfoUpdated() UAVObjUpdated(TaskInfoHandle())
#define TaskInfoInstUpdated(instId) UAVObjUpdated(TaskInfoHandle(), instId)
#define TaskInfoGetMetadata(dataOut) UAVObjGetMetadata(TaskInfoHandle(), dataOut)
#define TaskInfoSetMetadata(dataIn) UAVObjSetMetadata(TaskInfoHandle(), dataIn)
#define TaskInfoReadOnly(dataIn) UAVObjReadOnly(TaskInfoHandle())
// Object data
typedef struct {
uint16_t StackRemaining[13];
uint8_t Running[13];
} __attribute__((packed)) TaskInfoData;
// Field information
// Field StackRemaining information
/* Array element names for field StackRemaining */
typedef enum { TASKINFO_STACKREMAINING_SYSTEM=0, TASKINFO_STACKREMAINING_ACTUATOR=1, TASKINFO_STACKREMAINING_TELEMETRYTX=2, TASKINFO_STACKREMAINING_TELEMETRYTXPRI=3, TASKINFO_STACKREMAINING_TELEMETRYRX=4, TASKINFO_STACKREMAINING_GPS=5, TASKINFO_STACKREMAINING_MANUALCONTROL=6, TASKINFO_STACKREMAINING_ALTITUDE=7, TASKINFO_STACKREMAINING_AHRSCOMMS=8, TASKINFO_STACKREMAINING_STABILIZATION=9, TASKINFO_STACKREMAINING_GUIDANCE=10, TASKINFO_STACKREMAINING_WATCHDOG=11, TASKINFO_STACKREMAINING_FLIGHTPLAN=12 } TaskInfoStackRemainingElem;
/* Number of elements for field StackRemaining */
#define TASKINFO_STACKREMAINING_NUMELEM 13
// Field Running information
/* Enumeration options for field Running */
typedef enum { TASKINFO_RUNNING_FALSE=0, TASKINFO_RUNNING_TRUE=1 } TaskInfoRunningOptions;
/* Array element names for field Running */
typedef enum { TASKINFO_RUNNING_SYSTEM=0, TASKINFO_RUNNING_ACTUATOR=1, TASKINFO_RUNNING_TELEMETRYTX=2, TASKINFO_RUNNING_TELEMETRYTXPRI=3, TASKINFO_RUNNING_TELEMETRYRX=4, TASKINFO_RUNNING_GPS=5, TASKINFO_RUNNING_MANUALCONTROL=6, TASKINFO_RUNNING_ALTITUDE=7, TASKINFO_RUNNING_AHRSCOMMS=8, TASKINFO_RUNNING_STABILIZATION=9, TASKINFO_RUNNING_GUIDANCE=10, TASKINFO_RUNNING_WATCHDOG=11, TASKINFO_RUNNING_FLIGHTPLAN=12 } TaskInfoRunningElem;
/* Number of elements for field Running */
#define TASKINFO_RUNNING_NUMELEM 13
// Generic interface functions
int32_t TaskInfoInitialize();
UAVObjHandle TaskInfoHandle();
#endif // TASKINFO_H
/**
* @}
* @}
*/