SatNOGS-COMMS  4.1.0
A COMMS subsystem for CubeSats
Loading...
Searching...
No Matches
satnogs::comms::lib::antenna_gpio< N > Class Template Reference

This class implements a simple GPIO-based antenna deployment mechanism, using for each controllable element a GPIO for instructing the deployment and a GPIO for sensing the deployment status of the corresponding element. More...

#include <antenna_gpio.hpp>

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

Classes

class  elem_io
 Specifies the deploy and the sensing GPIO. More...

Public Member Functions

 antenna_gpio (const char *name, const elem_io(&&io)[N])
 Construct a new antenna_gpio object.
bool detect (uint32_t idx) override
 Returns antenna deployment status.
void deploy (uint32_t idx, bool en) override
 Deploy the antenna.
Public Member Functions inherited from satnogs::comms::lib::antenna
 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 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)

Additional Inherited Members

Public Types inherited from satnogs::comms::lib::antenna
enum class  tlm : uint8_t {
  DEPLOYED , UPTIME , TEMPERATURE , VOLTAGE ,
  CURRENT
}
Protected Attributes inherited from satnogs::comms::lib::antenna
const etl::string< 32 > m_name
const uint32_t m_nelems

Detailed Description

template<uint32_t N>
class satnogs::comms::lib::antenna_gpio< N >

This class implements a simple GPIO-based antenna deployment mechanism, using for each controllable element a GPIO for instructing the deployment and a GPIO for sensing the deployment status of the corresponding element.

Template Parameters
Nthe number of elements
Note
The template parameter N can be omitted, as it can be deduced automatically by the constructor antenna_gpio().

Definition at line 44 of file antenna_gpio.hpp.

Constructor & Destructor Documentation

◆ antenna_gpio()

template<uint32_t N>
satnogs::comms::lib::antenna_gpio< N >::antenna_gpio ( const char * name,
const elem_io(&&) io[N] )
inline

Construct a new antenna_gpio object.

Parameters
namethe name of the antenna
ioa elem_io for each controllable element of the antenna

Definition at line 64 of file antenna_gpio.hpp.

Member Function Documentation

◆ deploy()

template<uint32_t N>
void satnogs::comms::lib::antenna_gpio< N >::deploy ( uint32_t idx,
bool en )
inlineoverridevirtual

Deploy the antenna.

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

Reimplemented from satnogs::comms::lib::antenna.

Definition at line 80 of file antenna_gpio.hpp.

◆ detect()

template<uint32_t N>
bool satnogs::comms::lib::antenna_gpio< N >::detect ( uint32_t idx)
inlineoverridevirtual

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 from satnogs::comms::lib::antenna.

Definition at line 71 of file antenna_gpio.hpp.


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