OS  v1.7.5
Documentation
Loading...
Searching...
No Matches
qOS::input::channel Class Referenceabstract

#include <input.hpp>

Inheritance diagram for qOS::input::channel:
[legend]
Collaboration diagram for qOS::input::channel:
[legend]

Public Member Functions

virtual type getType (void) const noexcept=0
 Get the channel type.
 
event getEvent (void) const noexcept
 Retrieves the last event for the given input channel.
 
bool setCallback (const eventCallback_t cb) noexcept
 Set the callback function when event are detected on the input input channel.
 
bool setChannel (const uint8_t inputChannel) noexcept
 Set/Change the channel(pin) number.
 
uint8_t getChannel (void) const noexcept
 Get the channel(pin) number.
 
void setUserData (void *pUserData) noexcept
 Set the channel user-data.
 
void * getUserData (void) noexcept
 Get the channel user-data.
 
virtual bool isShared (void) const noexcept=0
 Check if the channel value is shared with other channel with the same (pin) number.
 
virtual bool setTime (const event e, const qOS::duration_t t) noexcept=0
 Set the timeout for the specified event.
 
virtual bool setParameter (const event e, const analogValue_t p) noexcept=0
 Set the parameter for the specified event.
 
virtual uint8_t getCount (void) const noexcept=0
 Get pulsation count for the digital input.
 
virtual bool unShare (void) noexcept=0
 

Additional Inherited Members

- Protected Member Functions inherited from qOS::node
listgetContainer (void) noexcept
 Get a pointer to the list in which this node is contained.
 
 node ()
 

Member Function Documentation

◆ getChannel()

uint8_t qOS::input::channel::getChannel ( void ) const
inlinenoexcept

Get the channel(pin) number.

Returns
The channel(pin) number.

◆ getCount()

virtual uint8_t qOS::input::channel::getCount ( void ) const
pure virtualnoexcept

Get pulsation count for the digital input.

Note
No valid on analog inputs
Returns
The current pulsation count.

Implemented in qOS::input::analogChannel, and qOS::input::digitalChannel.

◆ getEvent()

event qOS::input::channel::getEvent ( void ) const
inlinenoexcept

Retrieves the last event for the given input channel.

Returns
The last input-channel event.

◆ getType()

virtual type qOS::input::channel::getType ( void ) const
pure virtualnoexcept

Get the channel type.

Returns
The channel type.

Implemented in qOS::input::analogChannel, and qOS::input::digitalChannel.

◆ getUserData()

void * qOS::input::channel::getUserData ( void )
inlinenoexcept

Get the channel user-data.

Returns
A pointer to the user-data

◆ isShared()

virtual bool qOS::input::channel::isShared ( void ) const
pure virtualnoexcept

Check if the channel value is shared with other channel with the same (pin) number.

Returns
true if shared. Otherwise false.

Implemented in qOS::input::analogChannel, and qOS::input::digitalChannel.

◆ setCallback()

bool qOS::input::channel::setCallback ( const eventCallback_t cb)
inlinenoexcept

Set the callback function when event are detected on the input input channel.

Parameters
[in]cbThe callback function

◆ setChannel()

bool qOS::input::channel::setChannel ( const uint8_t inputChannel)
inlinenoexcept

Set/Change the channel(pin) number.

Parameters
[in]inputChannelThe specified channel number (pin) to read.
Returns
true on success. Otherwise false.

◆ setParameter()

virtual bool qOS::input::channel::setParameter ( const event e,
const analogValue_t p )
pure virtualnoexcept

Set the parameter for the specified event.

Parameters
[in]eThe event where the parameter will be set.
[in]pThe value of the parameter.
Returns
true on success. Otherwise false.

Implemented in qOS::input::analogChannel, and qOS::input::digitalChannel.

◆ setTime()

virtual bool qOS::input::channel::setTime ( const event e,
const qOS::duration_t t )
pure virtualnoexcept

Set the timeout for the specified event.

Parameters
[in]eThe event where the timeout will be set.
[in]tThe value of the timeout.
Returns
true on success. Otherwise false.

Implemented in qOS::input::analogChannel, and qOS::input::digitalChannel.

◆ setUserData()

void qOS::input::channel::setUserData ( void * pUserData)
inlinenoexcept

Set the channel user-data.

Parameters
[in]pUserDataA pointer to the user-data

◆ unShare()

virtual bool qOS::input::channel::unShare ( void )
pure virtualnoexcept

Implemented in qOS::input::analogChannel.