HEBI C++ API  1.0.0-rc1
hebi::Command::IoBank Class Referencefinal

A message field for interfacing with a bank of I/O pins. More...

#include <command.hpp>

Public Member Functions

bool hasInt (int pinNumber) const
 True if (and only if) the particular numbered pin in this bank has an integer (e.g., digital) value. More...
 
bool hasFloat (int pinNumber) const
 True if (and only if) the particular numbered pin in this bank has an floating point (e.g., analog or PWM) value. More...
 
int64_t getInt (int pinNumber) const
 If this numbered pin in this bank has an integer (e.g., digital) value, returns that value; otherwise returns a default. More...
 
float getFloat (int pinNumber) const
 If this numbered pin in this bank has an floating point (e.g., analog or PWM) value, returns that value; otherwise returns a default. More...
 
void setInt (int pinNumber, int64_t value)
 Sets the particular pin to a integer value (representing a digital output). More...
 
void setFloat (int pinNumber, float value)
 Sets the particular pin to a floating point value (representing a PWM output). More...
 
void clear (int pinNumber)
 Removes any currently set value for this pin. More...
 

Detailed Description

A message field for interfacing with a bank of I/O pins.

Member Function Documentation

bool hebi::Command::IoBank::hasInt ( int  pinNumber) const

True if (and only if) the particular numbered pin in this bank has an integer (e.g., digital) value.

Parameters
pinNumberWhich pin to check; valid values for pinNumber depend on the bank.
bool hebi::Command::IoBank::hasFloat ( int  pinNumber) const

True if (and only if) the particular numbered pin in this bank has an floating point (e.g., analog or PWM) value.

Parameters
pinNumberWhich pin to check; valid values for pinNumber depend on the bank.
int64_t hebi::Command::IoBank::getInt ( int  pinNumber) const

If this numbered pin in this bank has an integer (e.g., digital) value, returns that value; otherwise returns a default.

Parameters
pinNumberWhich pin to get; valid values for pinNumber depend on the bank.
float hebi::Command::IoBank::getFloat ( int  pinNumber) const

If this numbered pin in this bank has an floating point (e.g., analog or PWM) value, returns that value; otherwise returns a default.

Parameters
pinNumberWhich pin to get; valid values for pinNumber depend on the bank.
void hebi::Command::IoBank::setInt ( int  pinNumber,
int64_t  value 
)

Sets the particular pin to a integer value (representing a digital output).

Parameters
pinNumberWhich pin to set; valid values for pinNumber depend on the bank.
void hebi::Command::IoBank::setFloat ( int  pinNumber,
float  value 
)

Sets the particular pin to a floating point value (representing a PWM output).

Parameters
pinNumberWhich pin to set; valid values for pinNumber depend on the bank.
void hebi::Command::IoBank::clear ( int  pinNumber)

Removes any currently set value for this pin.

Parameters
pinNumberWhich pin to clear; valid values for pinNumber depend on the bank.

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