Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

LOW_devDS2406::cmd_ChannelAccess Class Reference

Class for accessing the PIO channels. More...

#include <LOW_devDS2406.h>

Collaboration diagram for LOW_devDS2406::cmd_ChannelAccess:

Collaboration graph
[legend]
List of all members.

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...

virtual ~cmd_ChannelAccess ()
 Destructor. More...

virtual channelInfo_tgetChannelInfo ()
 Get the channel info read after sending command. More...

virtual bool readDataBit () const
 Receive 1 bit from the device. More...

virtual uint8_t readDataByte () const
 Receive 1 byte from the device. More...

virtual void readData (byteVec_t &outBytes) const
 Receive a block of bytes from the device. More...

virtual void writeData (const bool inSendBit) const
 Send 1 bit to the device. More...

virtual void writeData (const uint8_t inSendByte) const
 Send 1 byte to the device. More...

virtual void writeData (const byteVec_t &inSendBytes) const
 Send block of bytes to the device. More...


Private Attributes

const LOW_devDS2406device
 Device the command is operating on. More...

channelInfo_t channelInfo
 Channel info received after issuing the command. More...


Detailed Description

Class for accessing the PIO channels.

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.


Member Typedef Documentation

typedef struct LOW_devDS2406::cmd_ChannelAccess::channelInfo_t LOW_devDS2406::cmd_ChannelAccess::channelInfo_t
 

DS2406 channel info as defined by Dallas.


Member Enumeration Documentation

enum LOW_devDS2406::cmd_ChannelAccess::activityLatchReset_t
 

Type for latch reset selection.

Enumeration values:
noResetLatches 
resetLatches 

Definition at line 166 of file LOW_devDS2406.h.

enum LOW_devDS2406::cmd_ChannelAccess::CRCtype_t
 

Type for CRC cycle selection.

Enumeration values:
CRC_disable 
CRC_after1Byte 
CRC_after8Byte 
CRC_after32Byte 

Definition at line 154 of file LOW_devDS2406.h.

enum LOW_devDS2406::cmd_ChannelAccess::initialMode_t
 

Type for inition I/O mode selection.

Enumeration values:
writeMode 
readMode 

Definition at line 163 of file LOW_devDS2406.h.

enum LOW_devDS2406::cmd_ChannelAccess::interleaveMode_t
 

Type for interleave mode selection.

Enumeration values:
asyncInterleaveMode 
syncInterleaveMode 

Definition at line 157 of file LOW_devDS2406.h.

enum LOW_devDS2406::cmd_ChannelAccess::toggleMode_t
 

Type for toggle mode selection.

Enumeration values:
noToggleMode 
toggleMode 

Definition at line 160 of file LOW_devDS2406.h.


Constructor & Destructor Documentation

LOW_devDS2406::cmd_ChannelAccess::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.

Obtains a lock on the device.

Parameters:
inDevice  Reference to the device the command operates on.
inCRCtype  CRC cycle selection.
inChanSelect  PIO channel selection.
inInterleaveMode  Interleave mode selection.
inToggleMode  Toggle mode selection.
inInitialMode  Initial I/O mode selection.
inALR  Latch reset selection.
Exceptions:
devDS2406_error  Thrown when illegal combination of modes is selected.

Definition at line 240 of file LOW_devDS2406.cpp.

References LOW_devDS2406::cmd_ChannelAccess::channelInfo_t::activityLatch_pioA, LOW_devDS2406::cmd_ChannelAccess::channelInfo_t::activityLatch_pioB, byteVec_t, LOW_devDS2406::cmd_ChannelAccess::channelInfo_t::channelFFQ_pioA, LOW_devDS2406::cmd_ChannelAccess::channelInfo_t::channelFFQ_pioB, channelInfo, LOW_device::cmd_MatchROM(), device, LOW_devDS2406::getHasPioB(), LOW_device::getLink(), LOW_devDS2406::cmd_ChannelAccess::channelInfo_t::hasPioB, LOW_devDS2406::cmd_ChannelAccess::channelInfo_t::isExternalPowered, LOW_link::readDataByte(), LOW_devDS2406::cmd_ChannelAccess::channelInfo_t::sensedLevel_pioA, LOW_devDS2406::cmd_ChannelAccess::channelInfo_t::sensedLevel_pioB, and LOW_link::writeData().

LOW_devDS2406::cmd_ChannelAccess::~cmd_ChannelAccess   [virtual]
 

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().


Member Function Documentation

LOW_devDS2406::cmd_ChannelAccess::channelInfo_t & LOW_devDS2406::cmd_ChannelAccess::getChannelInfo   [virtual]
 

Get the channel info read after sending command.

Definition at line 298 of file LOW_devDS2406.cpp.

References channelInfo.

Referenced by LOW_compTwinSwitch::readStatus(), and LOW_compTwinSwitch::resetLatches().

void LOW_devDS2406::cmd_ChannelAccess::readData byteVec_t   outBytes const [virtual]
 

Receive a block of bytes from the device.

Parameters:
outBytes  Values that were reveived. Read length is determined by the preset length of the vector.

Definition at line 316 of file LOW_devDS2406.cpp.

References byteVec_t, device, LOW_device::getLink(), and LOW_link::readData().

bool LOW_devDS2406::cmd_ChannelAccess::readDataBit   const [virtual]
 

Receive 1 bit from the device.

Returns:
Bit that was reveived.

Definition at line 304 of file LOW_devDS2406.cpp.

References device, LOW_device::getLink(), and LOW_link::readDataBit().

uint8_t LOW_devDS2406::cmd_ChannelAccess::readDataByte   const [virtual]
 

Receive 1 byte from the device.

Returns:
Byte that was reveived.

Definition at line 310 of file LOW_devDS2406.cpp.

References device, LOW_device::getLink(), and LOW_link::readDataByte().

void LOW_devDS2406::cmd_ChannelAccess::writeData const byteVec_t   inSendBytes const [virtual]
 

Send block of bytes to the device.

Parameters:
inSendBytes  Block of bytes to send.

Definition at line 334 of file LOW_devDS2406.cpp.

References byteVec_t, device, LOW_device::getLink(), and LOW_link::writeData().

void LOW_devDS2406::cmd_ChannelAccess::writeData const uint8_t    inSendByte const [virtual]
 

Send 1 byte to the device.

Parameters:
inSendByte  Byte to send.

Definition at line 328 of file LOW_devDS2406.cpp.

References device, LOW_device::getLink(), and LOW_link::writeData().

void LOW_devDS2406::cmd_ChannelAccess::writeData const bool    inSendBit const [virtual]
 

Send 1 bit to the device.

Parameters:
inSendBit  Bit to send.

Definition at line 322 of file LOW_devDS2406.cpp.

References device, LOW_device::getLink(), and LOW_link::writeData().


Member Data Documentation

channelInfo_t LOW_devDS2406::cmd_ChannelAccess::channelInfo [private]
 

Channel info received after issuing the command.

Definition at line 249 of file LOW_devDS2406.h.

Referenced by cmd_ChannelAccess(), and getChannelInfo().

const LOW_devDS2406& LOW_devDS2406::cmd_ChannelAccess::device [private]
 

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().


The documentation for this class was generated from the following files:
Generated on Mon Oct 27 22:56:28 2003 by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001