|
Veethree D7 SDK
|
Interface for classes that provide data to digital and PWM channels.
By default, digital_in_channel, digital_out_channel, pwm_in_channel and pwm_out_channel can use digital_context_instance function for a shared default instance to provide data.
If there is a need to customise the behaviour of a context object, inherit from digital_context_interface and use the digital and PWM constructors that take an instance.
#include <digital_context_interface.h>
Public Member Functions | |
| virtual void | set_pwm_in (const pwm_in_descriptor &desc)=0 |
| set_pwm_in Set the PWM input channel as described by the descriptor. | |
| virtual void | set_pwm_out (const pwm_out_channel *channel, bool state)=0 |
| set_pwm_out Set the PWM out channel to the desiried state. | |
| virtual pwm_result | read_pwm_in (const pwm_in_channel *channel) const =0 |
| read_pwm_in Read the state of a PWM input channel. | |
| virtual void | set_digital_out (const digital_out_channel *channel, bool state)=0 |
| set_digital_out Set the digital output channel to the desired state. | |
| virtual void | set_digital_in (const digital_in_channel *channel, bool state)=0 |
| set_digital_in Set the digital input channel to the desired state. | |
| virtual digital_result | read_digital_in (const digital_in_channel *channel) const =0 |
| read_digital_in Read the state of the digital input channel. | |
Interface for classes that provide data to digital and PWM channels.
By default, digital_in_channel, digital_out_channel, pwm_in_channel and pwm_out_channel can use digital_context_instance function for a shared default instance to provide data.
If there is a need to customise the behaviour of a context object, inherit from digital_context_interface and use the digital and PWM constructors that take an instance.
|
pure virtual |
read_digital_in Read the state of the digital input channel.
Read will return a bool value indicating high or low
| channel | The channel to be read from. |
Implemented in vsdk::io::digital_context.
|
pure virtual |
read_pwm_in Read the state of a PWM input channel.
| channel | The channel to read from. |
Implemented in vsdk::io::digital_context.
|
pure virtual |
set_digital_in Set the digital input channel to the desired state.
| channel | The channel to be modified. |
| state | True enables readings for the channel, false disables the channel. |
Implemented in vsdk::io::digital_context.
|
pure virtual |
set_digital_out Set the digital output channel to the desired state.
| channel | The channel to be modified. |
| state | The desired state for the channel, true enables the output, false disables the output. |
Implemented in vsdk::io::digital_context.
|
pure virtual |
set_pwm_in Set the PWM input channel as described by the descriptor.
| desc | A PWM input descriptor. |
Implemented in vsdk::io::digital_context.
|
pure virtual |
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. |
Implemented in vsdk::io::digital_context.