|  | ClearCore Library
    | 
Connector class for an individual CCIO-8 pin.
Manages individual CCIO-8 pins.
For more detailed information on the CCIO-8 system, check out the ClearCore I/O Expansion Board informational page.
For more detailed information on the ClearCore Connector interface, check out the ClearCore Connector System informational page.
Connector class for an individual CCIO-8 pin. More...
#include <CcioPin.h>
 Inheritance diagram for ClearCore::CcioPin:
 Inheritance diagram for ClearCore::CcioPin: Collaboration diagram for ClearCore::CcioPin:
 Collaboration diagram for ClearCore::CcioPin:| Public Member Functions | |
| virtual ConnectorModes | Mode () override | 
| Get the connector's operational mode. | |
| virtual bool | Mode (ConnectorModes newMode) override | 
| Set the connector's operational mode. | |
| Connector::ConnectorTypes | Type () override | 
| Get connector type. | |
| bool | IsWritable () override | 
| Get R/W status of the connector. | |
| int16_t | State () override | 
| In input mode, get the connector's last filtered sampled value. In output mode, get the connector's output state. | |
| bool | State (int16_t newState) override | 
| Set the output state of the connector. | |
| void | FilterLength (uint16_t samples) | 
| Set the connector's digital filter length in samples. The default is 3 samples. | |
| void | Filter_ms (uint16_t len) | 
| Set the connector's digital filter length in ms. | |
| bool | IsInHwFault () override | 
| Check whether the connector is in a hardware fault state. | |
| bool | InputRisen () | 
| Clear on read accessor for this connector's rising input state. | |
| bool | InputFallen () | 
| Clear on read accessor for this connector's falling input state. | |
| void | OutputPulsesStart (uint32_t onTime, uint32_t offTime, uint16_t pulseCount=0, bool blockUntilDone=false) | 
| Start an output pulse. | |
| void | OutputPulsesStop (bool stopImmediately=true) | 
| Stop an output pulse. | |
|  Public Member Functions inherited from ClearCore::Connector | |
| void | Reinitialize () | 
| Reinitialize this connector to the power-up state. | |
| int32_t | ConnectorIndex () | 
| Accessor for the bit index of this connector in the input register. | |
| uint32_t | InputRegMask () | 
| Get a bit mask representing this connector. | |
| Additional Inherited Members | |
|  Public Types inherited from ClearCore::Connector | |
| enum | ConnectorModes { INVALID_NONE , INPUT_ANALOG , INPUT_DIGITAL , OUTPUT_ANALOG , OUTPUT_DIGITAL , OUTPUT_H_BRIDGE , OUTPUT_PWM , OUTPUT_TONE , OUTPUT_WAVE , CPM_MODE_A_DIRECT_B_DIRECT , CPM_MODE_STEP_AND_DIR , CPM_MODE_A_DIRECT_B_PWM , CPM_MODE_A_PWM_B_PWM , TTL , RS232 , SPI , CCIO , USB_CDC } | 
| All possible operational modes for a connector.  More... | |
| enum | ConnectorTypes { DIGITAL_IN_TYPE , DIGITAL_IN_OUT_TYPE , SHIFT_REG_TYPE , ANALOG_IN_DIGITAL_IN_TYPE , ANALOG_OUT_DIGITAL_IN_OUT_TYPE , H_BRIDGE_TYPE , CPM_TYPE , SERIAL_TYPE , SERIAL_USB_TYPE , CCIO_DIGITAL_IN_OUT_TYPE } | 
| The different types of ClearCore connectors.  More... | |
| void ClearCore::CcioPin::Filter_ms | ( | uint16_t | len | ) | 
Set the connector's digital filter length in ms.
Restarts any filtering in progress.
| [in] | len | The length of the filter in ms. | 
| 
 | inline | 
Set the connector's digital filter length in samples. The default is 3 samples.
This will set the length of the filter equal to (samples * CCIO-8 refresh rate) for this connector.
Restarts any filtering in progress.
| [in] | samples | The number of samples to filter. | 
| bool ClearCore::CcioPin::InputFallen | ( | ) | 
Clear on read accessor for this connector's falling input state.
| bool ClearCore::CcioPin::InputRisen | ( | ) | 
Clear on read accessor for this connector's rising input state.
| 
 | overridevirtual | 
Check whether the connector is in a hardware fault state.
Implements ClearCore::Connector.
| 
 | inlineoverridevirtual | 
Get R/W status of the connector.
Implements ClearCore::Connector.
| 
 | inlineoverridevirtual | 
Get the connector's operational mode.
Reimplemented from ClearCore::Connector.
| 
 | overridevirtual | 
Set the connector's operational mode.
Configure the connector to operate in a new I/O mode.
| [in] | newMode | The new mode to be set. The valid modes for this connector type are: | 
Implements ClearCore::Connector.
| void ClearCore::CcioPin::OutputPulsesStart | ( | 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 the output 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] | 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::CcioPin::OutputPulsesStop | ( | bool | stopImmediately = true | ) | 
Stop an output pulse.
This allows you to stop the currently running pulse on this output. The output will always be set to FALSE after canceling a pulse.
| [in] | stopImmediately | (optional) If true, the output pulses will be stopped immediately; if false, any active pulse will be completed first. Default: true. | 
| 
 | overridevirtual | 
In input mode, get the connector's last filtered sampled value. In output mode, get the connector's output state.
Implements ClearCore::Connector.
| 
 | overridevirtual | 
Set the output state of the connector.
This allows you to change the output value of the connector item.
| [in] | newState | The value to be output. | 
Implements ClearCore::Connector.
| 
 | inlineoverridevirtual | 
Get connector type.
Implements ClearCore::Connector.