WarpTwin
Documentation for WarpTwin models and classes.
Loading...
Searching...
No Matches
warpos::Setup Class Reference

Holds the setup configuration for Flight Executive. More...

#include <Setup.h>

Public Member Functions

 Setup (OS &os, Platform &platform)
virtual ~Setup ()
virtual int16 initTelemetryBuffer ()
 Initialize the telemetry buffer.
virtual int16 writeTelemetry (uint8 target, uint8 *data, uint16 size)
 Write data to telemetry buffer.
virtual int16 initCommandBuffer ()
 Initialize the command buffer.
virtual uint32 readCommand (uint8 target, uint8 *data, uint32 max_size)
 Read data from the command buffer.
virtual uint32 initStorageBuffer ()
 Initialize the storage buffer.
virtual int16 writeStorage (uint8 target, const char *data, uint32 size)
 Write data to storage buffer.
OSos ()
 Get a handle to the current OS.
Platformplatform ()
 Get a handle to the current platform.

Protected Attributes

OS_os
 Reference to the system OS.
Platform_platform
 Reference to the sytem hardware.

Detailed Description

Holds the setup configuration for Flight Executive.

The Setup class manages a set of base-level functionality, such as writing telemetry, reading commands, etc. which are often hardware or low-level functions. It allows users to specify which buffers are written for telementry, for instance.

Constructor & Destructor Documentation

◆ Setup()

warpos::Setup::Setup ( OS & os,
Platform & platform )
inline

◆ ~Setup()

virtual warpos::Setup::~Setup ( )
inlinevirtual

Member Function Documentation

◆ initCommandBuffer()

virtual int16 warpos::Setup::initCommandBuffer ( )
inlinevirtual

Initialize the command buffer.

Returns
Error code corresponding to success/failure

◆ initStorageBuffer()

virtual uint32 warpos::Setup::initStorageBuffer ( )
inlinevirtual

Initialize the storage buffer.

Returns
Error code corresponding to success/failure

◆ initTelemetryBuffer()

virtual int16 warpos::Setup::initTelemetryBuffer ( )
inlinevirtual

Initialize the telemetry buffer.

Returns
Error code corresponding to success/failure

◆ os()

OS & warpos::Setup::os ( )
inline

Get a handle to the current OS.

Returns
Handle to OS

◆ platform()

Platform & warpos::Setup::platform ( )
inline

Get a handle to the current platform.

Returns
Handle to platform

◆ readCommand()

virtual uint32 warpos::Setup::readCommand ( uint8 target,
uint8 * data,
uint32 max_size )
inlinevirtual

Read data from the command buffer.

Parameters
targetDevice selection indicator. May be unused if command only has one source
dataPointer to the byte array to read
max_sizeThe maximum amount of data to read out of the buffer
Returns
The number of bytes read out of the buffer

◆ writeStorage()

virtual int16 warpos::Setup::writeStorage ( uint8 target,
const char * data,
uint32 size )
inlinevirtual

Write data to storage buffer.

Parameters
targetDevice selection indicator. May be unused if storage only has one output
dataPointer to the byte array to write
sizeSize of the buffer pointed to by data
Returns
Error code corresponding to success/failure

◆ writeTelemetry()

virtual int16 warpos::Setup::writeTelemetry ( uint8 target,
uint8 * data,
uint16 size )
inlinevirtual

Write data to telemetry buffer.

Parameters
targetDevice selection indicator. May be unused if telemetry only has one output
dataPointer to the byte array to write
sizeSize of the buffer pointed to by data
Returns
Error code corresponding to success/failure

Member Data Documentation

◆ _os

OS& warpos::Setup::_os
protected

Reference to the system OS.

◆ _platform

Platform& warpos::Setup::_platform
protected

Reference to the sytem hardware.


The documentation for this class was generated from the following file:
  • /Users/mickey/Documents/Projects/warptwin/warpos/src/flight/Setup.h