WarpTwin
Documentation for WarpTwin models and classes.
Loading...
Searching...
No Matches
Setup.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/*
17Setup header file
18
19Author: Alex Reynolds
20*/
21#ifndef FLIGHT_SETUP_H
22#define FLIGHT_SETUP_H
23
24#include <stdint.h>
25
26#include "flight/OS.h"
27#include "flight/Platform.h"
29
30namespace warpos {
31
39class Setup {
40public:
42 virtual ~Setup() {}
43
52 virtual int16 writeTelemetry(uint8 target, uint8* data, uint16 size) {return ERROR_BUFFER_NOT_IMPLEMENTED;}
53
62 virtual uint32 readCommand(uint8 target, uint8* data, uint32 max_size) {return ERROR_BUFFER_NOT_IMPLEMENTED;}
63
72 virtual int16 writeStorage(uint8 target, const char* data, uint32 size) {return ERROR_BUFFER_NOT_IMPLEMENTED;}
73
76 OS& os() {return _os;}
77
81
82protected:
85
88};
89}
90
91#endif
Holds all os-specific interfaces.
Definition OS.h:51
Holds all platform-specific interfaces.
Definition Platform.h:111
virtual uint32 initStorageBuffer()
Initialize the storage buffer.
Definition Setup.h:66
virtual int16 writeStorage(uint8 target, const char *data, uint32 size)
Write data to storage buffer.
Definition Setup.h:72
virtual int16 initCommandBuffer()
Initialize the command buffer.
Definition Setup.h:56
Platform & _platform
Reference to the sytem hardware.
Definition Setup.h:87
OS & _os
Reference to the system OS.
Definition Setup.h:84
virtual int16 initTelemetryBuffer()
Initialize the telemetry buffer.
Definition Setup.h:46
virtual uint32 readCommand(uint8 target, uint8 *data, uint32 max_size)
Read data from the command buffer.
Definition Setup.h:62
Setup(OS &os, Platform &platform)
Definition Setup.h:41
Platform & platform()
Get a handle to the current platform.
Definition Setup.h:80
OS & os()
Get a handle to the current OS.
Definition Setup.h:76
virtual ~Setup()
Definition Setup.h:42
virtual int16 writeTelemetry(uint8 target, uint8 *data, uint16 size)
Write data to telemetry buffer.
Definition Setup.h:52
#define ERROR_BUFFER_NOT_IMPLEMENTED
Variable to raise an error if an appropriate buffer is not in place.
Definition clockwerkerrors.h:126
Definition DeadReckon.cpp:20