|
Veethree D7 SDK
|
The digital class.
Singleton class used for providing data and lower level hardware access to digital and PWM I/O channels.
#include <digital_context.h>
Public Member Functions | |
| digital_context (const digital_context &)=delete | |
| digital_context (digital_context &&)=delete | |
| digital_context & | operator= (const digital_context &)=delete |
| digital_context & | operator= (digital_context &&)=delete |
| void | set_pwm_in (const pwm_in_descriptor &desc) override |
| set_pwm_in Set the PWM input channel as described by the descriptor. | |
| void | set_pwm_out (const pwm_out_channel *channel, bool state) override |
| set_pwm_out Set the PWM out channel to the desiried state. | |
| pwm_result | read_pwm_in (const pwm_in_channel *channel) const override |
| Read the value of a pwm_in_channel. | |
| void | set_digital_out (const digital_out_channel *channel, bool state) override |
| Enable or disable a particular digital_out_channel. | |
| void | set_digital_in (const digital_in_channel *channel, bool enable) override |
| Enable or disable a particular digital_in_channel. | |
| digital_result | read_digital_in (const digital_in_channel *channel) const override |
| Read the current state of a digital input. | |
Static Public Member Functions | |
| static std::shared_ptr< digital_context > | instance () |
| Creates or requests the only instance available. | |
The digital class.
Singleton class used for providing data and lower level hardware access to digital and PWM I/O channels.
|
static |
Creates or requests the only instance available.
|
overridevirtual |
Read the current state of a digital input.
| channel | The channel to read from. |
Implements vsdk::io::digital_context_interface.
|
overridevirtual |
Read the value of a pwm_in_channel.
| channel | The channel to read the value from. |
Implements vsdk::io::digital_context_interface.
|
overridevirtual |
Enable or disable a particular digital_in_channel.
| channel | The channel to be enabled or disabled. |
| enable | A boolean value indicating the channel must be enabled (true) or disabled (false). |
Implements vsdk::io::digital_context_interface.
|
overridevirtual |
Enable or disable a particular digital_out_channel.
| channel | The channel to be enabled or disabled. |
| state | A boolean value indicating the channel must be enabled (true) or disabled (false). |
Implements vsdk::io::digital_context_interface.
|
overridevirtual |
set_pwm_in Set the PWM input channel as described by the descriptor.
| desc | A PWM input descriptor. |
Implements vsdk::io::digital_context_interface.
|
overridevirtual |
set_pwm_out Set the PWM out channel to the desiried state.
| channel | The channel to be modified |
| state | The desired state for the channel, true enables the output, false disables the output. |
Implements vsdk::io::digital_context_interface.