Peritoneal Dialysis Capstone
Controlling catheter for peritoneal dialysis
Loading...
Searching...
No Matches
PWMOutput Class Reference

The implementation of IOutput. More...

#include <PWMOutput.h>

Inheritance diagram for PWMOutput:
Collaboration diagram for PWMOutput:

Public Member Functions

 PWMOutput (IHAL &hal, int pin)
 Configures a pin as a PWM output.
float getValue () override
 Returns the last value written to this output.
void setValue (float value) override
 Writes a value to this output.
Public Member Functions inherited from IOutput
virtual ~IOutput ()=default

Private Attributes

IHALm_hal
int m_pin
float m_value

Detailed Description

The implementation of IOutput.

Constructor & Destructor Documentation

◆ PWMOutput()

PWMOutput::PWMOutput ( IHAL & hal,
int pin )

Configures a pin as a PWM output.

Parameters
halA reference to the hardware abstraction layer.
pinThe pin number.

Member Function Documentation

◆ getValue()

float PWMOutput::getValue ( )
overridevirtual

Returns the last value written to this output.

Implements IOutput.

◆ setValue()

void PWMOutput::setValue ( float value)
overridevirtual

Writes a value to this output.

Parameters
valueThe floating-point value to set. Must be in the range [0, 1].

Implements IOutput.

Member Data Documentation

◆ m_hal

IHAL& PWMOutput::m_hal
private

◆ m_pin

int PWMOutput::m_pin
private

◆ m_value

float PWMOutput::m_value
private

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