Veethree D7 SDK
Loading...
Searching...
No Matches
vsdk::io::digital_in_channel Class Reference

Detailed Description

The digital_in_channel class.

This class holds the configuration for a particular digital input channel. It is also responsible for enabling/disabling the channel.

#include <digital_in_channel.h>

Public Member Functions

 digital_in_channel (const digital_in_descriptor &desc)
 The class constructor.
 digital_in_channel (std::shared_ptr< digital_context_interface > instance, const digital_in_descriptor &desc)
 The class constructor.
digital_result read () const
 Read the current state of the input.
digital_in_descriptor descriptor () const
 Return a descriptor with the channel configuration used when the class was instantiated.
 digital_in_channel (const digital_in_channel &other)=delete
 digital_in_channel (digital_in_channel &&other) noexcept
digital_in_channel & operator= (const digital_in_channel &other)=delete
digital_in_channel & operator= (digital_in_channel &&other) noexcept
Public Member Functions inherited from vsdk::io::event_notification
virtual event_notification_id add_notification (const event_notification_descriptor &desc)
 Add a definition when an event must be notified.
virtual bool remove_notification (event_notification_id id)
 Remove a notification identified by 'id'.
virtual void remove_all_notifications ()
 Remove all notifications.
virtual void start_notifications ()
 Start the event notifications.
virtual void stop_notifications ()
 Stop the event notifications.
 event_notification ()
 Class constructors.
 event_notification (const event_notification &other)=delete
 Class constructors.
 event_notification (event_notification &&other) noexcept
 Class constructors.
event_notification & operator= (const event_notification &other)=delete
 Assignment operators.
event_notification & operator= (event_notification &&other) noexcept
 Assignment operators.

Protected Member Functions

bool process_notification (const event_notification_descriptor &desc) const noexcept override
 process_notification

Detailed Description

The digital_in_channel class.

This class holds the configuration for a particular digital input channel. It is also responsible for enabling/disabling the channel.

Constructor & Destructor Documentation

◆ digital_in_channel() [1/4]

vsdk::io::digital_in_channel::digital_in_channel ( const digital_in_descriptor & desc)
explicit

The class constructor.

Parameters
descThe channel configuration.

◆ digital_in_channel() [2/4]

vsdk::io::digital_in_channel::digital_in_channel ( std::shared_ptr< digital_context_interface > instance,
const digital_in_descriptor & desc )
explicit

The class constructor.

Parameters
instanceA class instance that conforms to digital_context_interface.
descThe channel configuration.

◆ digital_in_channel() [3/4]

vsdk::io::digital_in_channel::digital_in_channel ( const digital_in_channel & other)
delete

Standard constructors

◆ digital_in_channel() [4/4]

vsdk::io::digital_in_channel::digital_in_channel ( digital_in_channel && other)
noexcept

Standard constructors

Member Function Documentation

◆ descriptor()

digital_in_descriptor vsdk::io::digital_in_channel::descriptor ( ) const

Return a descriptor with the channel configuration used when the class was instantiated.

Returns
A digital_in_descriptor object.

◆ operator=() [1/2]

digital_in_channel & vsdk::io::digital_in_channel::operator= ( const digital_in_channel & other)
delete

Standard assignment operators

◆ operator=() [2/2]

digital_in_channel & vsdk::io::digital_in_channel::operator= ( digital_in_channel && other)
noexcept

Standard assignment operators

◆ process_notification()

bool vsdk::io::digital_in_channel::process_notification ( const event_notification_descriptor & desc) const
overrideprotectedvirtualnoexcept

process_notification

When a notification is a vsdk::io::event_notification_frequency::single_shot, once that notification is generated it is automatically removed, so attempting to use its vsdk::io::event_notification_id in the remove_notification function will result in a false return value.

Parameters
descA notification description, see vsdk::io::event_notification_descriptor.
Returns
It returns true when the notification has been handled, otherwise false.

Implements vsdk::io::event_notification.

◆ read()

digital_result vsdk::io::digital_in_channel::read ( ) const

Read the current state of the input.

Returns
A digital_result.

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