#include <LOW_devDS2406.h>
Collaboration diagram for LOW_devDS2406::cmd_ChannelAccess:
Public Types | |
typedef LOW_devDS2406::cmd_ChannelAccess::channelInfo_t | channelInfo_t |
DS2406 channel info as defined by Dallas. More... | |
enum | CRCtype_t { CRC_disable = 0, CRC_after1Byte = 1, CRC_after8Byte = 2, CRC_after32Byte = 3 } |
Type for CRC cycle selection. More... | |
enum | interleaveMode_t { asyncInterleaveMode = 0, syncInterleaveMode = 1 } |
Type for interleave mode selection. More... | |
enum | toggleMode_t { noToggleMode = 0, toggleMode = 1 } |
Type for toggle mode selection. More... | |
enum | initialMode_t { writeMode = 0, readMode = 1 } |
Type for inition I/O mode selection. More... | |
enum | activityLatchReset_t { noResetLatches = 0, resetLatches = 1 } |
Type for latch reset selection. More... | |
Public Methods | |
cmd_ChannelAccess (const LOW_devDS2406 &inDevice, const CRCtype_t inCRCtype, const chanSelect_t inChanSelect, const interleaveMode_t inInterleaveMode, const toggleMode_t inToggleMode, const initialMode_t inInitialMode, const activityLatchReset_t inALR) | |
Constructor with specification of command options. More... | |
~cmd_ChannelAccess () | |
Destructor. More... | |
channelInfo_t & | getChannelInfo () |
Get the channel info read after sending command. More... | |
bool | readDataBit () const |
Receive 1 bit from the device. More... | |
uint8_t | readDataByte () const |
Receive 1 byte from the device. More... | |
void | readData (byteVec_t &outBytes) const |
Receive a block of bytes from the device. More... | |
void | writeData (const bool inSendBit) const |
Send 1 bit to the device. More... | |
void | writeData (const uint8_t inSendByte) const |
Send 1 byte to the device. More... | |
void | writeData (const byteVec_t &inSendBytes) const |
Send block of bytes to the device. More... | |
Private Attributes | |
const LOW_devDS2406 & | device |
Device the command is operating on. More... | |
channelInfo_t | channelInfo |
Channel info received after issuing the command. More... |
The Channel Access command is used to access the PIO channels to sense the logical status of the output node and the output transistor and to change the status of the output transistor.
As there are many combinations of reading/writing the command is implemented as a class. The programmer himself is responsible to match read/write cycles according to prior selected options on instance creation.
For details see the original Dallas documentation.
Note: As any other command creating an instance of this class locks the device. Remember to destroy the object to release the device.
Definition at line 141 of file LOW_devDS2406.h.
|
DS2406 channel info as defined by Dallas.
|
|
Type for latch reset selection.
Definition at line 163 of file LOW_devDS2406.h. |
|
Type for CRC cycle selection.
Definition at line 151 of file LOW_devDS2406.h. |
|
Type for inition I/O mode selection.
Definition at line 160 of file LOW_devDS2406.h. |
|
Type for interleave mode selection.
Definition at line 154 of file LOW_devDS2406.h. |
|
Type for toggle mode selection.
Definition at line 157 of file LOW_devDS2406.h. |
|
|
Destructor. Releases the lock on the device. Definition at line 276 of file LOW_devDS2406.cpp. References device, LOW_device::getLink(), and LOW_link::resetBus(). |
|
Get the channel info read after sending command.
Definition at line 286 of file LOW_devDS2406.cpp. References channelInfo. Referenced by LOW_compTwinSwitch::readStatus(), and LOW_compTwinSwitch::resetLatches(). |
|
Receive a block of bytes from the device.
Definition at line 301 of file LOW_devDS2406.cpp. References byteVec_t, device, LOW_device::getLink(), and LOW_link::readData(). |
|
Receive 1 bit from the device.
Definition at line 291 of file LOW_devDS2406.cpp. References device, LOW_device::getLink(), and LOW_link::readDataBit(). |
|
Receive 1 byte from the device.
Definition at line 296 of file LOW_devDS2406.cpp. References device, LOW_device::getLink(), and LOW_link::readDataByte(). |
|
Send block of bytes to the device.
Definition at line 316 of file LOW_devDS2406.cpp. References byteVec_t, device, LOW_device::getLink(), and LOW_link::writeData(). |
|
Send 1 byte to the device.
Definition at line 311 of file LOW_devDS2406.cpp. References device, LOW_device::getLink(), and LOW_link::writeData(). |
|
Send 1 bit to the device.
Definition at line 306 of file LOW_devDS2406.cpp. References device, LOW_device::getLink(), and LOW_link::writeData(). |
|
Channel info received after issuing the command.
Definition at line 246 of file LOW_devDS2406.h. Referenced by cmd_ChannelAccess(), and getChannelInfo(). |
|
Device the command is operating on.
Definition at line 245 of file LOW_devDS2406.h. Referenced by cmd_ChannelAccess(), readData(), readDataBit(), readDataByte(), writeData(), and ~cmd_ChannelAccess(). |