#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. | |
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 Member Functions | |
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. | |
virtual | ~cmd_ChannelAccess () |
Destructor. | |
virtual channelInfo_t & | getChannelInfo () |
Get the channel info read after sending command. | |
virtual bool | readDataBit () const |
Receive 1 bit from the device. | |
virtual uint8_t | readDataByte () const |
Receive 1 byte from the device. | |
virtual void | readData (byteVec_t &outBytes) const |
Receive a block of bytes from the device. | |
virtual void | writeData (const bool inSendBit) const |
Send 1 bit to the device. | |
virtual void | writeData (const uint8_t inSendByte) const |
Send 1 byte to the device. | |
virtual void | writeData (const byteVec_t &inSendBytes) const |
Send block of bytes to the device. | |
Private Attributes | |
const LOW_devDS2406 & | device |
Device the command is operating on. | |
channelInfo_t | channelInfo |
Channel info received after issuing the command. |
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 144 of file LOW_devDS2406.h.
|
DS2406 channel info as defined by Dallas.
|
|
Type for latch reset selection.
Definition at line 166 of file LOW_devDS2406.h. |
|
Type for CRC cycle selection.
Definition at line 154 of file LOW_devDS2406.h. |
|
Type for inition I/O mode selection.
Definition at line 163 of file LOW_devDS2406.h. |
|
Type for interleave mode selection.
Definition at line 157 of file LOW_devDS2406.h. |
|
Type for toggle mode selection.
Definition at line 160 of file LOW_devDS2406.h. |
|
|
Destructor. Releases the lock on the device. Definition at line 286 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 298 of file LOW_devDS2406.cpp. References channelInfo. Referenced by LOW_devDS2406::LOW_devDS2406(), LOW_compTwinSwitch::readStatus(), and LOW_compTwinSwitch::resetLatches(). |
|
Receive a block of bytes from the device.
Definition at line 316 of file LOW_devDS2406.cpp. References device, LOW_device::getLink(), and LOW_link::readData(). |
|
Receive 1 bit from the device.
Definition at line 304 of file LOW_devDS2406.cpp. References device, LOW_device::getLink(), and LOW_link::readDataBit(). |
|
Receive 1 byte from the device.
Definition at line 310 of file LOW_devDS2406.cpp. References device, LOW_device::getLink(), and LOW_link::readDataByte(). |
|
Send block of bytes to the device.
Definition at line 334 of file LOW_devDS2406.cpp. References device, LOW_device::getLink(), and LOW_link::writeData(). |
|
Send 1 byte to the device.
Definition at line 328 of file LOW_devDS2406.cpp. References device, LOW_device::getLink(), and LOW_link::writeData(). |
|
Send 1 bit to the device.
Definition at line 322 of file LOW_devDS2406.cpp. References device, LOW_device::getLink(), and LOW_link::writeData(). |
|
Channel info received after issuing the command.
Definition at line 249 of file LOW_devDS2406.h. Referenced by cmd_ChannelAccess(), and getChannelInfo(). |
|
Device the command is operating on.
Definition at line 248 of file LOW_devDS2406.h. Referenced by cmd_ChannelAccess(), readData(), readDataBit(), readDataByte(), writeData(), and ~cmd_ChannelAccess(). |