SatNOGS-COMMS  4.1.0
A COMMS subsystem for CubeSats
Loading...
Searching...
No Matches
satnogs::comms::lib::antenna Class Reference

Generic antenna definition. More...

#include <antenna.hpp>

Inheritance diagram for satnogs::comms::lib::antenna:
satnogs::comms::lib::antenna_gpio< N > satnogs::comms::lib::antenna_isis< N >

Public Types

enum class  tlm : uint8_t {
  DEPLOYED , UPTIME , TEMPERATURE , VOLTAGE ,
  CURRENT
}

Public Member Functions

 antenna (const char *name, uint32_t nelems)
 Construct a new generic antenna object.
virtual void enable (bool en)
 Enables or disables the antenna subsystem if required.
virtual bool detect (uint32_t idx)
 Returns antenna deployment status.
virtual void deploy (uint32_t idx, bool en)
 Deploy the antenna.
virtual void deploy_backup (uint32_t idx, bool en)
 Deploy the antenna using the backup method if exists.
const char * name () const
 Retrieves the name of the antenna.
uint32_t nelems () const
 Retrieves the number of available elements of the antenna.
virtual void telemetry (tlm t, float &res)
virtual void telemetry (tlm t, uint32_t &res)
virtual void telemetry (tlm t, bool &res)
virtual void telemetry (tlm t, uint32_t idx, float &res)
virtual void telemetry (tlm t, uint32_t idx, uint32_t &res)
virtual void telemetry (tlm t, uint32_t idx, bool &res)

Protected Attributes

const etl::string< 32 > m_name
const uint32_t m_nelems

Detailed Description

Generic antenna definition.

The goal of this class is to provide a common generic interface that will simplify implementations of antenna deployment. The class is not intended to be used directly, rather than be inherited by classes implementing the actual interaction with the hardware (e.g GPIO, SPI, I2C, etc)

Definition at line 45 of file antenna.hpp.

Member Enumeration Documentation

◆ tlm

enum class satnogs::comms::lib::antenna::tlm : uint8_t
strong
Enumerator
DEPLOYED 
UPTIME 
TEMPERATURE 
VOLTAGE 
CURRENT 

Definition at line 48 of file antenna.hpp.

Constructor & Destructor Documentation

◆ antenna()

satnogs::comms::lib::antenna::antenna ( const char * name,
uint32_t nelems )

Construct a new generic antenna object.

Parameters
namethe name of the antenna
nelemsthe number of elements that are controlled/deployed independently. (e.g 2 for dipole, 4 for turnstile, etc)

Definition at line 34 of file antenna.cpp.

Member Function Documentation

◆ deploy()

void satnogs::comms::lib::antenna::deploy ( uint32_t idx,
bool en )
virtual

Deploy the antenna.

Parameters
idxAn antenna index. Should be in the range [0, -1]
entrue to deploy, false to stop trying to deploy.

Reimplemented in satnogs::comms::lib::antenna_gpio< N >, and satnogs::comms::lib::antenna_isis< N >.

Definition at line 68 of file antenna.cpp.

◆ deploy_backup()

void satnogs::comms::lib::antenna::deploy_backup ( uint32_t idx,
bool en )
virtual

Deploy the antenna using the backup method if exists.

Parameters
idxAn antenna index. Should be in the range [0, -1]
entrue to deploy, false to stop trying to deploy.

Definition at line 79 of file antenna.cpp.

◆ detect()

bool satnogs::comms::lib::antenna::detect ( uint32_t idx)
virtual

Returns antenna deployment status.

Parameters
idxAn antenna index. Should be in the range [0, -1]
Returns
true if the the antenna is deployed, false otherwise

Reimplemented in satnogs::comms::lib::antenna_gpio< N >, and satnogs::comms::lib::antenna_isis< N >.

Definition at line 56 of file antenna.cpp.

◆ enable()

void satnogs::comms::lib::antenna::enable ( bool en)
virtual

Enables or disables the antenna subsystem if required.

Parameters
entrue to enable, false to disable

Reimplemented in satnogs::comms::lib::antenna_isis< N >.

Definition at line 45 of file antenna.cpp.

◆ name()

const char * satnogs::comms::lib::antenna::name ( ) const

Retrieves the name of the antenna.

Returns
The name of the antenna as a string.

Definition at line 89 of file antenna.cpp.

◆ nelems()

uint32_t satnogs::comms::lib::antenna::nelems ( ) const

Retrieves the number of available elements of the antenna.

Returns
uint32_t the number of elements available on this antenna

Definition at line 100 of file antenna.cpp.

◆ telemetry() [1/6]

void satnogs::comms::lib::antenna::telemetry ( tlm t,
bool & res )
virtual

Definition at line 118 of file antenna.cpp.

◆ telemetry() [2/6]

void satnogs::comms::lib::antenna::telemetry ( tlm t,
float & res )
virtual

Reimplemented in satnogs::comms::lib::antenna_isis< N >.

Definition at line 106 of file antenna.cpp.

◆ telemetry() [3/6]

void satnogs::comms::lib::antenna::telemetry ( tlm t,
uint32_t & res )
virtual

Reimplemented in satnogs::comms::lib::antenna_isis< N >.

Definition at line 112 of file antenna.cpp.

◆ telemetry() [4/6]

void satnogs::comms::lib::antenna::telemetry ( tlm t,
uint32_t idx,
bool & res )
virtual

Reimplemented in satnogs::comms::lib::antenna_isis< N >.

Definition at line 124 of file antenna.cpp.

◆ telemetry() [5/6]

void satnogs::comms::lib::antenna::telemetry ( tlm t,
uint32_t idx,
float & res )
virtual

Definition at line 130 of file antenna.cpp.

◆ telemetry() [6/6]

void satnogs::comms::lib::antenna::telemetry ( tlm t,
uint32_t idx,
uint32_t & res )
virtual

Definition at line 136 of file antenna.cpp.

Member Data Documentation

◆ m_name

const etl::string<32> satnogs::comms::lib::antenna::m_name
protected

Definition at line 96 of file antenna.hpp.

◆ m_nelems

const uint32_t satnogs::comms::lib::antenna::m_nelems
protected

Definition at line 97 of file antenna.hpp.


The documentation for this class was generated from the following files: