libstp
Robotics library for Botball
Loading...
Searching...
No Matches
libstp::hal::analog::AnalogSensor Class Reference

#include <Analog.hpp>

Inheritance diagram for libstp::hal::analog::AnalogSensor:
[legend]

Public Member Functions

 AnalogSensor (int port)
 Create an analog sensor bound to a platform-defined port index.
virtual ~AnalogSensor ()
virtual int read () const
 Read the current raw analog value from the selected platform.

Public Attributes

int port

Detailed Description

Thin analog input wrapper implemented by the selected platform bundle.

The constructor stores the requested port number and, when safety checks are enabled, participates in duplicate-port detection shared across platforms.

Definition at line 14 of file Analog.hpp.

Constructor & Destructor Documentation

◆ AnalogSensor()

libstp::hal::analog::AnalogSensor::AnalogSensor ( int port)
explicit

Create an analog sensor bound to a platform-defined port index.

◆ ~AnalogSensor()

virtual libstp::hal::analog::AnalogSensor::~AnalogSensor ( )
virtual

Member Function Documentation

◆ read()

virtual int libstp::hal::analog::AnalogSensor::read ( ) const
virtual

Read the current raw analog value from the selected platform.

Member Data Documentation

◆ port

int libstp::hal::analog::AnalogSensor::port

Definition at line 23 of file Analog.hpp.


The documentation for this class was generated from the following file:
  • /home/runner/work/raccoon-lib/raccoon-lib/modules/libstp-hal/include/hal/Analog.hpp