WarpTwin
Documentation for WarpTwin models and classes.
Loading...
Searching...
No Matches
app_apids.h
Go to the documentation of this file.
1/******************************************************************************
2* Copyright (c) ATTX INC 2025. All Rights Reserved.
3*
4* This software and associated documentation (the "Software") are the
5* proprietary and confidential information of ATTX, INC. The Software is
6* furnished under a license agreement between ATTX and the user organization
7* and may be used or copied only in accordance with the terms of the agreement.
8* Refer to 'license/attx_license.adoc' for standard license terms.
9*
10* EXPORT CONTROL NOTICE: THIS SOFTWARE MAY INCLUDE CONTENT CONTROLLED UNDER THE
11* INTERNATIONAL TRAFFIC IN ARMS REGULATIONS (ITAR) OR THE EXPORT ADMINISTRATION
12* REGULATIONS (EAR99). No part of the Software may be used, reproduced, or
13* transmitted in any form or by any means, for any purpose, without the express
14* written permission of ATTX, INC.
15******************************************************************************/
16
17/*
18App APID definition file
19------------------------
20This file defines the APIDs associated with individual apps. The Apids are uint16
21values which are unique per app. To ensure APIDs are not duplicated between apps,
22they are defined collectively within a single file. The APID per app is also used
23as the base for APIDs for telemetry and commands. While not strictly enforced,
24the following rules should be observed for APIDs
25
26Of the 3 numerical spaces available in a single 11-bit apid (that is, 0x000 to
270x7FF), the following conventions (while not strictly enforced) should be observed:
28- The 11 APID bits are broken into 7 and 4-bit values, with the 7 largest bits
29 reserved for apps and the last four reserved for cmd/tlm per app. That is:
30 APID: 0000000 0000
31 | App | |C/T |
32- APIDs for Apps should be contained to the first two hex "digits" of the APID,
33 that is, Apps should start at 0x000 and run through 0x7F0, with only the first
34 two digits incrementing
35- APIDs which come pre-defined with warpOS are defined beginning at 0x000, with
36 system utilities beginning at 0x000 and warpOS included apps beginning at
37- APIDs which come pre-defined with warpOS are defined beginning at 0x000, with
38 system utilities beginning at 0x000 and warpOS included apps beginning at
39 0x100
40- APIDs for user-defined (non-system) apps should begin at 0x400 and increment
41 from there, that is 0x410, 0x420, through 0x7F0. Therefore a total of 64
42 APIDs are available to warpOS users
43 APIDs are available to warpOS users
44- APIDs for telemetry and commands are contained to the last hex "digit" of the APID
45 and are added the the App APID, allowing up to 15 slots for cmd/tlm per app
46- Full APIDs for telemetry and commands are defined as (APID_FOR_APP) + (CMD/TLM_OFFSET)
47 + (APID_FOR_TLM_CMD) beginning at 0x001 and ending at 0x7FF
48- APIDs for telemetry begin at 0x0C and run through 0x0F (= 4 tlm packets definable per app)
49- APIDs for commands begin at 0x01 and run through 0x0B (= 11 cmd packets definable per app)
50
51APIDs for apps are defined here in the APIDs file.
52APIDs for telemetry are defined in the telemetry file per app in the telemtry/ folder
53APIDs for commands are defined in the command file per app in the commands/ folder
54
55Author: Alex Reynolds
56*/
57
58#ifndef APPS_APIDS_H
59#define APPS_APIDS_H
60
61// -------------------------------------------------------------------------------------
62// APID DEFINITIONS FOR APPS, TELEMETRY, AND COMMANDS
63// -------------------------------------------------------------------------------------
64// APID base at which all command APIDs begin
65#define CMD_APID_BASE 0x001
66// APID base at which all telemetry APIDs begin
67#define TLM_APID_BASE 0x00C
68
69// -------------------------------------------------------------------------------------
70// SYSTEM LEVEL APPS
71// -------------------------------------------------------------------------------------
72// Base APID for all executive functions which are not tied to an app -- i.e. schedule, etc.
73#define APP_APID_EXECUTIVE 0x000
74// Base APID for the telemetry manager
75#define APP_APID_TELEMETRY_MANAGER 0x010
76// Base APID for the command manager
77#define APP_APID_COMMAND_MANAGER 0x020
78// Base APID for the storage manager
79#define APP_APID_STORAGE_MANAGER 0x030
80
81// -------------------------------------------------------------------------------------
82// GNC APPS
83// -------------------------------------------------------------------------------------
84// Base APID for the Inertial Navigation EKF Dead Reckon Propagation Step
85#define APP_APID_GNC_INERT_NAV_DEAD_RECKON 0x300
86// Base APID for the Inertial Navigation EKF Magnetometer Update Step
87#define APP_APID_GNC_INERT_NAV_MAG_UPDATE 0x310
88// Base APID for the Inertial Navigation EKF GPS Update Step
89#define APP_APID_GNC_INERT_NAV_GPS_UPDATE 0x320
90// Base APID for the Inertial Navigation EKF Bias Update Step
91#define APP_APID_GNC_INERT_NAV_BIAS_UPDATE 0x330
92// Base APID for the Inertial Navigation EKF Bias Update Step
93#define APP_APID_GNC_INERT_NAV_BIAS_UPDATE 0x330
94// Base APID for the PD Attitude controller
95#define APP_APID_GNC_PD_ATT_CTRL 0x340
96#define APP_APID_GNC_PD_ATT_CTRL 0x340
97// Base APID for the Two axis pointing guidance
98#define APP_APID_GNC_TWO_AXIS_PNT 0x350
99
100// -------------------------------------------------------------------------------------
101// USER-DEFINED APPS
102// -------------------------------------------------------------------------------------
103// Base APID for the LED Blinker example
104#define APP_APID_LED_BLINKER 0x400
105
106#endif