ClearCore Library
|
ClearCore I/O Expansion Board Manager Class.
This is the manager class for all the CCIO-8 pin connectors. The CCIO-8 link state is established and queried through this class, as well as the filter setting for all of the CCIO-8 connectors. Each CCIO-8 connector can be accessed through this class, in addition to the individual access available through the CcioPin class.
For more detailed information on the CCIO-8 system, check out the ClearCore I/O Expansion Board informational page.
ClearCore I/O Expansion Board Manager Class. More...
#include <CcioBoardManager.h>
Public Member Functions | |
bool | PinState (ClearCorePins pinNum) |
Read the digital state of the specified CCIO-8 pin. | |
void | PinState (ClearCorePins pinNum, bool newState) |
Write the digital state to the specified CCIO-8 pin. | |
void | OutputPulsesStart (ClearCorePins pinNum, uint32_t onTime, uint32_t offTime, uint16_t pulseCount=0, bool blockUntilDone=false) |
Start an output pulse. | |
void | OutputPulsesStop (ClearCorePins pinNum, bool stopImmediately=true) |
Stop an output pulse. | |
volatile const uint64_t & | OutputPulsesActive () |
Check the output pulse state. | |
uint8_t | CcioDiscover (SerialDriver *comInstance) |
Polls for and discovers all CCIO-8 boards connected to the ClearCore. | |
volatile const uint8_t & | CcioCount () |
Accessor for the number of CCIO-8 boards connected to the ClearCore. | |
volatile const bool & | LinkBroken () |
Accessor for the CCIO-8 link status. | |
volatile const uint64_t & | IoOverloadRT () |
Accessor for all the CCIO-8 pins' overloaded states. | |
uint64_t | IoOverloadAccum () |
Accessor for all the CCIO-8 pins' accumulated overload states. | |
volatile const uint64_t & | IoOverloadSinceStartupAccum () |
Accessor for all the CCIO-8 pins' accumulated overload states. | |
uint64_t | InputsRisen (uint64_t mask=UINT64_MAX) |
Clear on read accessor for rising input edges. | |
uint64_t | InputsFallen (uint64_t mask=UINT64_MAX) |
Clear on read accessor for falling input edges. | |
volatile const uint64_t & | InputState () |
Accessor for all the CCIO-8 pins' filtered input states. | |
volatile const uint64_t & | OutputState () |
Accessor for all the CCIO-8 pins' output states. | |
void | CcioRediscoverEnable (bool enable) |
Enable or Disable the automatic rediscover function. | |
CcioPin * | PinByIndex (ClearCorePins connectorIndex) |
Accessor for the individual CCIO-8 pin connectors. | |
uint8_t | RefreshRate () |
Accessor for the CCIO-8 link refresh rate. | |
|
inline |
Accessor for the number of CCIO-8 boards connected to the ClearCore.
uint8_t ClearCore::CcioBoardManager::CcioDiscover | ( | SerialDriver * | comInstance | ) |
Polls for and discovers all CCIO-8 boards connected to the ClearCore.
[in] | comInstance | A pointer to the SerialDriver that controls the serial port that the CCIO-8 is plugged into |
void ClearCore::CcioBoardManager::CcioRediscoverEnable | ( | bool | enable | ) |
Enable or Disable the automatic rediscover function.
If the CCIO-8 link is broken the CcioBoardManager can attempt to rebuild the link.
[in] | enable | Whether to enable or disable rediscover. |
uint64_t ClearCore::CcioBoardManager::InputsFallen | ( | uint64_t | mask = UINT64_MAX | ) |
Clear on read accessor for falling input edges.
[in] | mask | (optional) The CCIO-8 bits to check for falling edges. |
uint64_t ClearCore::CcioBoardManager::InputsRisen | ( | uint64_t | mask = UINT64_MAX | ) |
Clear on read accessor for rising input edges.
[in] | mask | (optional) The CCIO-8 bits to check for rising edges. |
|
inline |
Accessor for all the CCIO-8 pins' filtered input states.
uint64_t ClearCore::CcioBoardManager::IoOverloadAccum | ( | ) |
Accessor for all the CCIO-8 pins' accumulated overload states.
|
inline |
Accessor for all the CCIO-8 pins' overloaded states.
|
inline |
Accessor for all the CCIO-8 pins' accumulated overload states.
|
inline |
Accessor for the CCIO-8 link status.
|
inline |
Check the output pulse state.
This allows you to see which CCIO-8 pins have active output pulses being sent.
void ClearCore::CcioBoardManager::OutputPulsesStart | ( | ClearCorePins | pinNum, |
uint32_t | onTime, | ||
uint32_t | offTime, | ||
uint16_t | pulseCount = 0 , |
||
bool | blockUntilDone = false |
||
) |
Start an output pulse.
This allows you to start a pulse on a CCIO-8 connector that is on for onTime milliseconds and off for offTime milliseconds and will stop after pulseCount cycles. A pulseCount of 0 will cause the pulse to run endlessly.
If a pulse is already running, calling this will allow you to override the previous pulse (after the next change in state).
[in] | pinNum | The CCIO-8 pin number. |
[in] | onTime | The amount of time the input will be held on [ms]. |
[in] | offTime | The amount of time the input will be held off [ms]. |
[in] | pulseCount | (optional) The amount of cycles the pulse will run for. Default: 0 (pulse runs endlessly). |
[in] | blockUntilDone | (optional) If true, the function doesn't return until the pulses have been sent. Default: false. |
void ClearCore::CcioBoardManager::OutputPulsesStop | ( | ClearCorePins | pinNum, |
bool | stopImmediately = true |
||
) |
Stop an output pulse.
This allows you to stop the currently running pulse on a CCIO-8 output. The output will always be set to FALSE after canceling a pulse.
[in] | pinNum | The CCIO-8 pin number |
[in] | stopImmediately | (optional) If true, the output pulses will be stopped immediately; if false, any active pulse will be completed first. Default: true. |
|
inline |
Accessor for all the CCIO-8 pins' output states.
CcioPin * ClearCore::CcioBoardManager::PinByIndex | ( | ClearCorePins | connectorIndex | ) |
Accessor for the individual CCIO-8 pin connectors.
[in] | connectorIndex | The index of the CCIO-8 pin being requested |
bool ClearCore::CcioBoardManager::PinState | ( | ClearCorePins | pinNum | ) |
Read the digital state of the specified CCIO-8 pin.
[in] | pinNum | The CCIO-8 pin number |
void ClearCore::CcioBoardManager::PinState | ( | ClearCorePins | pinNum, |
bool | newState | ||
) |
Write the digital state to the specified CCIO-8 pin.
[in] | pinNum | The CCIO-8 pin number |
[in] | newState | The digital value to be written to the connector. |
|
inline |
Accessor for the CCIO-8 link refresh rate.
Calculates and returns the refresh rate based on the number of CCIO-8 boards currently connected.