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

LOW_devDS2406 Class Reference

Device class for DS2406 Dual Addressable Switch Plus 1 kbit Memory. More...

#include <LOW_devDS2406.h>

Inheritance diagram for LOW_devDS2406:

Inheritance graph
[legend]
Collaboration diagram for LOW_devDS2406:

Collaboration graph
[legend]
List of all members.

Public Types

typedef std::vector< LOW_devDS2406 *> devDS2406PtrVec_t
 Vector type of class device pointers. More...

typedef LOW_devDS2406::statusRegister_t statusRegister_t
 DS2406 internal status register as defined by Dallas. More...

enum  chanSelect_t { noneSelect = 0, chanASelect = 1, chanBSelect = 2, chanBothSelect = 3 }
 Type for PIO channel selection. More...

enum  sourceSelect_t { latchSelect = 1, flipFlopSelect = 2, curStatusSelect = 3 }
 Type for search source selection. More...

enum  pioTransistor_t { pioTransistorOn = 0, pioTransistorOff = 1 }
 Type for PIO transistor states. More...

enum  activePolarity_t { activeLow = 0, activeHigh = 1 }
 Type for activity polarity selection. More...

typedef std::vector< LOW_device *> devPtrVec_t
 Vector type of class device pointers. More...

typedef std::map< LOW_deviceID,
LOW_device *> 
deviceMap_t
 Map type of devices with LOW_deviceID as key. More...


Public Methods

 class_DERIVE_FROM_EXCEPTION (devDS2406_error,LOW_exception)
 Exception base class for all exceptions thrown by LOW_devDS2406. More...

 LOW_devDS2406 (LOW_netSegment &inSegment, const LOW_deviceID &inDevID)
 Real constructor corresponding to static pseudo constructor new_Instance(). More...

 ~LOW_devDS2406 ()
 Destructor. More...

virtual string getFamilyName () const
 Get the device's family name. More...

bool getIsExternalPowered () const
 Get wether the device is externally powered. More...

bool getHasPioB () const
 Get wether the second PIO channel is present. More...

void getSearchCondition (LOW_devDS2406::statusRegister_t *outStatusRegister) const
 Get the current search condition. More...

void setSearchCondition (const chanSelect_t inChanSelect, const sourceSelect_t inSourceSelect, const activePolarity_t inPolaritySelect, const pioTransistor_t inPioATrans, const pioTransistor_t inPioBTrans) const
 Set the search condition and status of the PIO transistors. More...

void cmd_ReadMemory (const uint8_t inStartAddr, byteVec_t &outBytes) const
 Read from EPROM memory. More...

void cmd_ReadStatus (const uint8_t inStartAddr, byteVec_t &outBytes) const
 Read from status memory. More...

void cmd_WriteStatus (const uint8_t inStartAddr, const byteVec_t &inWriteBytes) const
 Write to status memory. More...

LOW_deviceID getID () const
 Get the device's ROM ID. More...

LOW_netSegmentgetNetSegment () const
 Get the network segment the device is on. More...

bool verifyDevice (const bool inOnlyAlarm=false, const bool inDoReset=true) const
 Shortcut method to verify the presence of the device on it's network segment. More...


Static Public Attributes

const LOW_deviceIDRaw::devFamCode_t familyCode = 0x12
 Family code of this specific device. More...

const string familyName = "DS2406"
 Family name of this specific device. More...

const owCommand_t ReadMemory_COMMAND = 0xf0
 1-Wire command byte constant. More...

const owCommand_t ExtendedReadMemory_COMMAND = 0xa5
 1-Wire command byte constant. More...

const owCommand_t WriteMemory_COMMAND = 0x0f
 1-Wire command byte constant. More...

const owCommand_t WriteStatus_COMMAND = 0x55
 1-Wire command byte constant. More...

const owCommand_t ReadStatus_COMMAND = 0xaa
 1-Wire command byte constant. More...

const owCommand_t ChannelAccess_COMMAND = 0xf5
 1-Wire command byte constant. More...

const LOW_deviceIDRaw::devFamCode_t anyDev_famCode = 0xff
 Family code for selecting any/all device types. More...

const owCommand_t MatchROM_COMMAND = 0x55
 1-Wire command byte constant. More...

const owCommand_t ReadROM_COMMAND = 0x33
 1-Wire command byte constant. More...

const owCommand_t SkipROM_COMMAND = 0xcc
 1-Wire command byte constant. More...

const owCommand_t SearchROM_COMMAND = 0xf0
 1-Wire command byte constant. More...

const owCommand_t SearchAlarmROM_COMMAND = 0xec
 1-Wire command byte constant. More...


Protected Methods

void readMemUniversal (const uint16_t inStartAddr, byteVec_t &outBytes, const uint16_t inMaxLen, const owCommand_t inCommand) const
 Universal, internal data reading. More...

LOW_linkgetLink () const
 Get the link the device is on. More...

void cmd_MatchROM () const
 Shortcut for issuing a matchROM command for a device. More...


Static Protected Methods

LOW_devicenew_Instance (LOW_netSegment &inNetSegment, const LOW_deviceID &inDevID)
 Static pseudo constructor for registering with LOW_deviceFactory. More...


Protected Attributes

bool isExternalPowered
 External supply indicator. More...

bool hasPioB
 Wether the second PIO channel is present. More...

const LOW_deviceID ID
 1-Wire ROM ID of the device. More...

LOW_netSegmentnetSegment
 Network segment where the device is located. More...


Static Private Methods

int initialize ()
 Static inizializer to register the class with LOW_deviceFactory. More...


Static Private Attributes

int initHelper = initialize()
 Needed for dirty little C++ hack to force static initialization on application start. More...


Friends

class cmd_ChannelAccess
 required for accessing the device's lock. More...

class linkLock
 Needed to grant access to the protected getLink() method. More...


Detailed Description

Device class for DS2406 Dual Addressable Switch Plus 1 kbit Memory.

DS2406 features:

Author:
Harald Roelle, Helmut Reiser

Definition at line 56 of file LOW_devDS2406.h.


Member Typedef Documentation

typedef std::vector<LOW_devDS2406*> LOW_devDS2406::devDS2406PtrVec_t
 

Vector type of class device pointers.

Definition at line 96 of file LOW_devDS2406.h.

typedef std::map<LOW_deviceID,LOW_device*> LOW_device::deviceMap_t [inherited]
 

Map type of devices with LOW_deviceID as key.

Definition at line 97 of file LOW_device.h.

typedef std::vector<LOW_device*> LOW_device::devPtrVec_t [inherited]
 

Vector type of class device pointers.

Definition at line 96 of file LOW_device.h.

Referenced by LOW_netSegment::searchDevices().

typedef struct LOW_devDS2406::statusRegister_t LOW_devDS2406::statusRegister_t
 

DS2406 internal status register as defined by Dallas.


Member Enumeration Documentation

enum LOW_devDS2406::activePolarity_t
 

Type for activity polarity selection.

Enumeration values:
activeLow 
activeHigh 

Definition at line 108 of file LOW_devDS2406.h.

Referenced by getFamilyName(), and setSearchCondition().

enum LOW_devDS2406::chanSelect_t
 

Type for PIO channel selection.

Enumeration values:
noneSelect 
chanASelect 
chanBSelect 
chanBothSelect 

Definition at line 99 of file LOW_devDS2406.h.

Referenced by getFamilyName(), and setSearchCondition().

enum LOW_devDS2406::pioTransistor_t
 

Type for PIO transistor states.

Enumeration values:
pioTransistorOn 
pioTransistorOff 

Definition at line 105 of file LOW_devDS2406.h.

Referenced by getFamilyName(), and setSearchCondition().

enum LOW_devDS2406::sourceSelect_t
 

Type for search source selection.

Enumeration values:
latchSelect 
flipFlopSelect 
curStatusSelect 

Definition at line 102 of file LOW_devDS2406.h.

Referenced by getFamilyName(), and setSearchCondition().


Constructor & Destructor Documentation

LOW_devDS2406::LOW_devDS2406 LOW_netSegment   inSegment,
const LOW_deviceID   inDevID
 

Real constructor corresponding to static pseudo constructor new_Instance().

Parameters:
inSegment  Reference to network segment the device is on.
inDevID  Reference to device's ID.

Definition at line 62 of file LOW_devDS2406.cpp.

References chanASelect, cmd_ChannelAccess, hasPioB, and isExternalPowered.

Referenced by new_Instance().

LOW_devDS2406::~LOW_devDS2406  
 

Destructor.

Definition at line 77 of file LOW_devDS2406.cpp.


Member Function Documentation

LOW_devDS2406::class_DERIVE_FROM_EXCEPTION devDS2406_error   ,
LOW_exception   
 

Exception base class for all exceptions thrown by LOW_devDS2406.

void LOW_device::cmd_MatchROM   const [protected, inherited]
 

Shortcut for issuing a matchROM command for a device.

Calls the corresponding method in LOW_netSegment.

Definition at line 102 of file LOW_device.cpp.

References LOW_netSegment::cmd_MatchROM(), and LOW_device::netSegment.

Referenced by LOW_devDS2406::cmd_ChannelAccess::cmd_ChannelAccess(), LOW_devDS1820::cmd_ConvertT(), LOW_devDS1820::cmd_CopyScratchpad(), LOW_devDS2405::cmd_Match(), LOW_devDS1820::cmd_ReadPowerSupply(), LOW_devDS1820::cmd_ReadScratchpad(), LOW_devDS1820::cmd_RecallE2(), LOW_devDS1820::cmd_WriteScratchpad(), cmd_WriteStatus(), and readMemUniversal().

void LOW_devDS2406::cmd_ReadMemory const uint8_t    inStartAddr,
byteVec_t   outBytes
const
 

Read from EPROM memory.

The Read Memory command is used to read data from the 1024-bit EPROM data memory field. The bus master follows the command byte with a two-byte address (TA1=(T7:T0), TA2=(T15:T8)) that indicates a starting byte location within the data field. With every subsequent read data time slot the bus master receives data from the DS2406 starting at the initial address and continuing until the end of the 1024-bits data field is reached or until a Reset Pulse is issued.

If reading occurs through the end of memory space, the bus master issues sixteen additional read time slots and the DS2406 will respond with a 16-bit CRC of the command, address bytes and all data bytes read from the initial starting byte through the last byte of memory. This CRC is the result of clearing the CRC generator and then shifting in the command byte followed by the two address bytes and the data bytes beginning at the first addressed memory location and continuing through to the last byte of the EPROM data memory. Any reads ended by a Reset Pulse prior to reaching the end of memory will not have the 16-bit CRC available.

Typically the software controlling the device should store a 16-bit CRC with each page of data to insure rapid, error-free data transfers that eliminate having to read a page multiple times to determine if the received data is correct or not. (See Book of DS19xx iButton Standards, Chapter 7 for the recommended file structure to be used with the 1-Wire environment). If CRC values are imbedded within the data it is unnecessary to read the end-of-memory CRC. The Read Memory command can be ended at any point by issuing a Reset Pulse.

Parameters:
inStartAddr  Start address for reading.
outBytes  Values that were reveived. Read length is determined by the preset length of the vector.

Definition at line 136 of file LOW_devDS2406.cpp.

References byteVec_t, ReadMemory_COMMAND, and readMemUniversal().

void LOW_devDS2406::cmd_ReadStatus const uint8_t    inStartAddr,
byteVec_t   outBytes
const
 

Read from status memory.

The Read Status command is used to read data from the Status Memory field. The functional flow of this command is identical to the Read Memory command. Since the Status Memory is only 8 bytes, the DS2406 will send the 16-bit CRC after the last byte of status information has been transmitted.

DS2406 status memory map:

      ADDRESS   | BIT 7             | BIT 6         | BIT 5         | BIT 4        | BIT 3        | BIT 2       | BIT 1       | BIT 0
      ==========+===================+===============+===============+==============+==============+=============+=============+==========
      0 (EPROM) | BM3               | BM2           | BM1           | BM0          | WP3          | WP2         | WP1         | WP0
      ----------+-------------------+---------------+---------------+--------------+--------------+-------------+-------------+----------
      1 (EPROM) | 1                 | 1             | 1             | 1            | 1            | 1           | Redir. 0    | Redir. 0
      ----------+-------------------+---------------+---------------+--------------+--------------+-------------+-------------+----------
      2 (EPROM) | 1                 | 1             | 1             | 1            | 1            | 1           | Redir. 1    | Redir. 1
      ----------+-------------------+---------------+---------------+--------------+--------------+-------------+-------------+----------
      3 (EPROM) | 1                 | 1             | 1             | 1            | 1            | 1           | Redir. 2    | Redir. 2
      ----------+-------------------+---------------+---------------+--------------+--------------+-------------+-------------+----------
      4 (EPROM) | 1                 | 1             | 1             | 1            | 1            | 1           | Redir. 3    | Redir. 3
      ----------+-------------------+---------------+---------------+--------------+--------------+-------------+-------------+----------
      5 (EPROM) |                                                   EPROM Factory Test byte
      ----------+-------------------+---------------+---------------+--------------+--------------+-------------+-------------+----------
      6 (EPROM) |                                                 Don t care, always reads 00
      ----------+-------------------+---------------+---------------+--------------+--------------+-------------+-------------+----------
      7 (SRAM)  | Supply Indication | PIO-B Channel | PIO-A Channel | CSS4 Channel | CSS3 Channel | CSS2 Source | CSS1 Source | CSS0
                | (read only)       | Flip-flop     | Flip-flop     |      Select  |      Select  |      Select |      Select | Polarity
      ----------+-------------------+---------------+---------------+--------------+--------------+-------------+-------------+----------
      
Parameters:
inStartAddr  Start address for reading.
outBytes  Values that were reveived. Read length is determined by the preset length of the vector.
Exceptions:
devDS2406_error  Thrown when illegal address is selected.

Definition at line 142 of file LOW_devDS2406.cpp.

References byteVec_t, readMemUniversal(), and ReadStatus_COMMAND.

Referenced by getSearchCondition().

void LOW_devDS2406::cmd_WriteStatus const uint8_t    inStartAddr,
const byteVec_t   inWriteBytes
const
 

Write to status memory.

The Write Status command is used to program the Status Memory, which includes the specification of the Conditional Search Settings.

The Status Memory address range is 0000h to 0007h. The general programming algorithm is valid for the EPROM section of the Status Memory (addresses 0 to 4) only. The Status memory locations 5 and 6 are already pre-programmed to 00h and therefore cannot be altered. Status memory location 7 consists of static RAM, which can be reprogrammed without limitation. The supply indication (bit 7) is read-only; attempts to write to it are ignored. The function flow for writing to status memory location 7 is basically the same as for the other EPROM Status Memory Bytes. However, instead of a programming pulse the bus master sends a FFh byte (equivalent to 8 Write-One Time Slots) to transfer the new value from the scratchpad to the status memory.

See also cmd_ReadStatus().

Parameters:
inStartAddr  Start address for reading.
inWriteBytes  Values to write.
Exceptions:
devDS2406_error  Thrown when illegal address is selected.

Definition at line 148 of file LOW_devDS2406.cpp.

References byteVec_t, LOW_helper_CRC::calcCRC16(), LOW_device::cmd_MatchROM(), LOW_device::getLink(), LOW_link::readDataByte(), LOW_link::resetBus(), LOW_link::writeData(), and WriteStatus_COMMAND.

Referenced by setSearchCondition().

virtual string LOW_devDS2406::getFamilyName   const [inline, virtual]
 

Get the device's family name.

Returns:
Family name of the device.

Reimplemented from LOW_device.

Definition at line 275 of file LOW_devDS2406.h.

References activePolarity_t, byteVec_t, chanSelect_t, familyName, pioTransistor_t, and sourceSelect_t.

bool LOW_devDS2406::getHasPioB   const
 

Get wether the second PIO channel is present.

Returns:
Boolean indicates presence of channel B.

Definition at line 93 of file LOW_devDS2406.cpp.

References hasPioB.

Referenced by LOW_devDS2406::cmd_ChannelAccess::cmd_ChannelAccess(), LOW_compTwinSwitch::handleAlarm(), LOW_compTwinSwitch::LOW_compTwinSwitch(), and setSearchCondition().

LOW_deviceID LOW_device::getID   const [inherited]
 

Get the device's ROM ID.

Returns:
ROM ID of the device.

Definition at line 73 of file LOW_device.cpp.

References LOW_device::ID.

Referenced by LOW_netSegment::buryDevice(), LOW_netSegment::cmd_MatchROM(), LOW_compJalousieController::LOW_compJalousieController(), LOW_netSegment::removeDevice(), and LOW_netSegment::revitalizeDevice().

bool LOW_devDS2406::getIsExternalPowered   const
 

Get wether the device is externally powered.

Returns:
Boolean indicates external power.

Definition at line 87 of file LOW_devDS2406.cpp.

References isExternalPowered.

LOW_link & LOW_device::getLink   const [protected, inherited]
 

Get the link the device is on.

Returns:
Link the device is on.

Definition at line 96 of file LOW_device.cpp.

References LOW_netSegment::getLink(), and LOW_device::netSegment.

Referenced by LOW_devDS2406::cmd_ChannelAccess::cmd_ChannelAccess(), LOW_devDS1820::cmd_ConvertT(), LOW_devDS1820::cmd_CopyScratchpad(), LOW_devDS2405::cmd_MatchRead(), LOW_devDS1820::cmd_ReadPowerSupply(), LOW_devDS1820::cmd_ReadScratchpad(), LOW_devDS1820::cmd_RecallE2(), LOW_devDS2405::cmd_SearchRead(), LOW_devDS1820::cmd_WriteScratchpad(), cmd_WriteStatus(), LOW_devDS2406::cmd_ChannelAccess::readData(), LOW_devDS2406::cmd_ChannelAccess::readDataBit(), LOW_devDS2406::cmd_ChannelAccess::readDataByte(), readMemUniversal(), LOW_devDS2406::cmd_ChannelAccess::writeData(), and LOW_devDS2406::cmd_ChannelAccess::~cmd_ChannelAccess().

LOW_netSegment & LOW_device::getNetSegment   const [inherited]
 

Get the network segment the device is on.

Returns:
Nnetwork segment the device is on.

Definition at line 79 of file LOW_device.cpp.

References LOW_device::netSegment.

Referenced by LOW_compJalousieController::LOW_compJalousieController(), and LOW_compTwinSwitch::LOW_compTwinSwitch().

void LOW_devDS2406::getSearchCondition LOW_devDS2406::statusRegister_t   outStatusRegister const
 

Get the current search condition.

See also setSearchCondition().

Parameters:
outStatusRegister  Pointer to status register struture. Results are filled in there.

Definition at line 99 of file LOW_devDS2406.cpp.

References LOW_devDS2406::statusRegister_t::activePolarity, byteVec_t, LOW_devDS2406::statusRegister_t::channelFFQ_pioA, LOW_devDS2406::statusRegister_t::channelFFQ_pioB, LOW_devDS2406::statusRegister_t::channelSelect, cmd_ReadStatus(), LOW_devDS2406::statusRegister_t::isExternalPowered, and LOW_devDS2406::statusRegister_t::sourceSelect.

int LOW_devDS2406::initialize   [static, private]
 

Static inizializer to register the class with LOW_deviceFactory.

See also:
initHelper

Definition at line 37 of file LOW_devDS2406.cpp.

References familyCode, new_Instance(), and LOW_deviceFactory::registerSpecificCtor().

LOW_device * LOW_devDS2406::new_Instance LOW_netSegment   inNetSegment,
const LOW_deviceID   inDevID
[static, protected]
 

Static pseudo constructor for registering with LOW_deviceFactory.

Parameters:
inSegment  Reference to network segment the device is on.
inDevID  Reference to device's ID.
Returns:
New dynamic instance of specific device class.

Reimplemented from LOW_device.

Definition at line 50 of file LOW_devDS2406.cpp.

References LOW_devDS2406().

Referenced by initialize().

void LOW_devDS2406::readMemUniversal const uint16_t    inStartAddr,
byteVec_t   outBytes,
const uint16_t    inMaxLen,
const owCommand_t    inCommand
const [protected]
 

Universal, internal data reading.

Implements common parts of memory reading.

Parameters:
inStartAddr  Start address for reading.
outBytes  Values that were reveived. Read length is determined by the preset length of the vector.
inMaxLen  Maximum readable memory size.
inCommand  1-Wire command to start the read cycle.
Exceptions:
devDS2406_error  Thrown when illegal address is selected.

Definition at line 193 of file LOW_devDS2406.cpp.

References byteVec_t, LOW_helper_CRC::calcCRC16(), LOW_device::cmd_MatchROM(), LOW_device::getLink(), LOW_device::linkLock, owCommand_t, LOW_link::readData(), LOW_link::readDataByte(), LOW_link::resetBus(), and LOW_link::writeData().

Referenced by cmd_ReadMemory(), and cmd_ReadStatus().

void LOW_devDS2406::setSearchCondition const chanSelect_t    inChanSelect,
const sourceSelect_t    inSourceSelect,
const activePolarity_t    inPolaritySelect,
const pioTransistor_t    inPioATrans,
const pioTransistor_t    inPioBTrans
const
 

Set the search condition and status of the PIO transistors.

The condition is specified by the bit functions CSS0 to CSS4 in Status Memory location 7. At power-on all these bits are 1s. As long as the device remains powered up, the modified search conditions are available for use at any time. For the conditional search, one can specify

  • the polarity (HIGH or LOW; CSS0)
  • the source (PIO-pin, channel flip flop or activity latch; CSS1, CSS2)
  • the channel of interest (A, B or the logical OR of A, B; CSS3, CSS4)
The table shows all qualifying conditions and the required settings for CSS0 to CSS4:
              DESCRIPTION        |   CONDITIONAL SEARCH SELECT CODE
      -----------------+---------+--------------+-------------+---------
                       |         |CHANNEL SELECT|SOURCE SELECT|POLARITY
                       |         +------+-------+------+------+---------
       CONDITION       | CHANNEL | CSS4 | CSS3  | CSS2 | CSS1 | CSS0
      =================+=========+======+=======+======+======+=========
      RESERVED         |         |  Don't care  | 0    | 0    | 0/1
      -----------------+---------+------+-------+------+------+---------
      Unconditional    |neither  | 0    | 0     | At least one| 0
                       |         |      |       | must be 1   |
      -----------------+---------+------+-------+------+------+---------
      Activity Latch=0 | A       | 0    | 1     | 0    | 1    | 0
      -----------------+---------+------+-------+------+------+---------
      Activity Latch=1 | A       | 0    | 1     | 0    | 1    | 1
      -----------------+---------+------+-------+------+------+---------
      Channel FF = 0   | A       | 0    | 1     | 1    | 0    | 0
      (transistor on)  |         |      |       |      |      |
      -----------------+---------+------+-------+------+------+---------
      Channel FF = 1   | A       | 0    | 1     | 1    | 0    | 1
      (transistor off) |         |      |       |      |      |
      -----------------+---------+------+-------+------+------+---------
      PIO Low          | A       | 0    | 1     | 1    | 1    | 0
      -----------------+---------+------+-------+------+------+---------
      PIO High         | A       | 0    | 1     | 1    | 1    | 1
      -----------------+---------+------+-------+------+------+---------
      Activity Latch=0 | B       | 1    | 0     | 0    | 1    | 0
      -----------------+---------+------+-------+------+------+---------
      Activity Latch=1 | B       | 1    | 0     | 0    | 1    | 1
      -----------------+---------+------+-------+------+------+---------
      Channel FF = 0   | B       | 1    | 0     | 1    | 0    | 0
      (transistor on)  |         |      |       |      |      |
      -----------------+---------+------+-------+------+------+---------
      Channel FF = 1   | B       | 1    | 0     | 1    | 0    | 1
      (transistor off) |         |      |       |      |      |
      -----------------+---------+------+-------+------+------+---------
      PIO Low          | B       | 1    | 0     | 1    | 1    | 0
      -----------------+---------+------+-------+------+------+---------
      PIO High         | B       | 1    | 0     | 1    | 1    | 1
      -----------------+---------+------+-------+------+------+---------
      Activity Latch=0 | A or B  | 1    | 1     | 0    | 1    | 0
      -----------------+---------+------+-------+------+------+---------
      Activity Latch=1 | A or B  | 1    | 1     | 0    | 1    | 1
      -----------------+---------+------+-------+------+------+---------
      Channel FF = 0   | A or B  | 1    | 1     | 1    | 0    | 0
      (transistor on)  |         |      |       |      |      |
      -----------------+---------+------+-------+------+------+---------
      Channel FF = 1   | A or B  | 1    | 1     | 1    | 0    | 1
      (transistor off) |         |      |       |      |      |
      -----------------+---------+------+-------+------+------+---------
      PIO Low          | A or B  | 1    | 1     | 1    | 1    | 0
      -----------------+---------+------+-------+------+------+---------
      PIO High         | A or B  | 1    | 1     | 1    | 1    | 1
      -----------------+---------+------+-------+------+------+---------
      
Parameters:
inChanSelect  Select channel search condition.
inSourceSelect  Select source search condition.
inPolaritySelect  Select polarity search condition.
inPioATrans  Status of PIO transistor A.
inPioBTrans  Status of PIO transistor B.
Exceptions:
devDS2406_error  Thrown when channel B is selected without being present.

Definition at line 114 of file LOW_devDS2406.cpp.

References activePolarity_t, byteVec_t, chanBothSelect, chanBSelect, chanSelect_t, cmd_WriteStatus(), getHasPioB(), pioTransistor_t, and sourceSelect_t.

Referenced by LOW_compTwinSwitch::setAlarmCondition().

bool LOW_device::verifyDevice const bool    inOnlyAlarm = false,
const bool    inDoReset = true
const [inherited]
 

Shortcut method to verify the presence of the device on it's network segment.

See also:
LOW_netSegment::verifyDevice()

Definition at line 85 of file LOW_device.cpp.

References LOW_device::ID, LOW_device::netSegment, and LOW_netSegment::verifyDevice().

Referenced by LOW_compTwinSwitch::alarmPollLoop(), LOW_compTempSensor::checkAlarm(), LOW_devDS2405::cmd_SearchActive(), LOW_devDS2405::cmd_SearchRead(), and LOW_network::verifyDevice().


Friends And Related Function Documentation

friend class cmd_ChannelAccess [friend]
 

required for accessing the device's lock.

Definition at line 490 of file LOW_devDS2406.h.

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

friend class linkLock [friend, inherited]
 

Needed to grant access to the protected getLink() method.

Definition at line 174 of file LOW_device.h.

Referenced by LOW_devDS1820::cmd_ConvertT(), LOW_devDS1820::cmd_CopyScratchpad(), LOW_devDS2405::cmd_Match(), LOW_devDS2405::cmd_MatchRead(), LOW_devDS1820::cmd_ReadPowerSupply(), LOW_devDS1820::cmd_ReadScratchpad(), LOW_devDS1820::cmd_RecallE2(), LOW_devDS2405::cmd_SearchActive(), LOW_devDS2405::cmd_SearchRead(), LOW_devDS1820::cmd_WriteScratchpad(), and readMemUniversal().


Member Data Documentation

const LOW_deviceIDRaw::devFamCode_t LOW_device::anyDev_famCode = 0xff [static, inherited]
 

Family code for selecting any/all device types.

Definition at line 72 of file LOW_device.h.

Referenced by LOW_netSegment::cmd_SearchROM(), LOW_netSegment::getDevice(), LOW_netSegment::getDevices(), and LOW_deviceFactory::registerSpecificCtor().

const owCommand_t LOW_devDS2406::ChannelAccess_COMMAND = 0xf5 [static]
 

1-Wire command byte constant.

Definition at line 87 of file LOW_devDS2406.h.

const owCommand_t LOW_devDS2406::ExtendedReadMemory_COMMAND = 0xa5 [static]
 

1-Wire command byte constant.

Definition at line 83 of file LOW_devDS2406.h.

const LOW_deviceIDRaw::devFamCode_t LOW_devDS2406::familyCode = 0x12 [static]
 

Family code of this specific device.

Reimplemented from LOW_device.

Definition at line 77 of file LOW_devDS2406.h.

Referenced by initialize().

const string LOW_devDS2406::familyName = "DS2406" [static]
 

Family name of this specific device.

Reimplemented from LOW_device.

Definition at line 34 of file LOW_devDS2406.cpp.

Referenced by getFamilyName().

bool LOW_devDS2406::hasPioB [protected]
 

Wether the second PIO channel is present.

Definition at line 499 of file LOW_devDS2406.h.

Referenced by getHasPioB(), and LOW_devDS2406().

const LOW_deviceID LOW_device::ID [protected, inherited]
 

1-Wire ROM ID of the device.

Definition at line 182 of file LOW_device.h.

Referenced by LOW_device::getID(), LOW_device::LOW_device(), and LOW_device::verifyDevice().

int LOW_devDS2406::initHelper = initialize() [static, private]
 

Needed for dirty little C++ hack to force static initialization on application start.

See also:
initialize()

Definition at line 36 of file LOW_devDS2406.cpp.

bool LOW_devDS2406::isExternalPowered [protected]
 

External supply indicator.

Definition at line 498 of file LOW_devDS2406.h.

Referenced by getIsExternalPowered(), and LOW_devDS2406().

const owCommand_t LOW_device::MatchROM_COMMAND = 0x55 [static, inherited]
 

1-Wire command byte constant.

Definition at line 84 of file LOW_device.h.

Referenced by LOW_netSegment::cmd_MatchROM().

LOW_netSegment& LOW_device::netSegment [protected, inherited]
 

Network segment where the device is located.

Definition at line 183 of file LOW_device.h.

Referenced by LOW_device::cmd_MatchROM(), LOW_device::getLink(), LOW_device::getNetSegment(), LOW_device::LOW_device(), LOW_device::verifyDevice(), and LOW_device::~LOW_device().

const owCommand_t LOW_devDS2406::ReadMemory_COMMAND = 0xf0 [static]
 

1-Wire command byte constant.

Definition at line 82 of file LOW_devDS2406.h.

Referenced by cmd_ReadMemory().

const owCommand_t LOW_device::ReadROM_COMMAND = 0x33 [static, inherited]
 

1-Wire command byte constant.

Definition at line 85 of file LOW_device.h.

Referenced by LOW_netSegment::cmd_ReadROM().

const owCommand_t LOW_devDS2406::ReadStatus_COMMAND = 0xaa [static]
 

1-Wire command byte constant.

Definition at line 86 of file LOW_devDS2406.h.

Referenced by cmd_ReadStatus().

const owCommand_t LOW_device::SearchAlarmROM_COMMAND = 0xec [static, inherited]
 

1-Wire command byte constant.

Definition at line 88 of file LOW_device.h.

Referenced by LOW_netSegment::cmd_SearchROM(), and LOW_netSegment::cmd_SearchROMVerify().

const owCommand_t LOW_device::SearchROM_COMMAND = 0xf0 [static, inherited]
 

1-Wire command byte constant.

Definition at line 87 of file LOW_device.h.

Referenced by LOW_netSegment::cmd_SearchROM(), and LOW_netSegment::cmd_SearchROMVerify().

const owCommand_t LOW_device::SkipROM_COMMAND = 0xcc [static, inherited]
 

1-Wire command byte constant.

Definition at line 86 of file LOW_device.h.

Referenced by LOW_netSegment::cmd_SkipROM().

const owCommand_t LOW_devDS2406::WriteMemory_COMMAND = 0x0f [static]
 

1-Wire command byte constant.

Definition at line 84 of file LOW_devDS2406.h.

const owCommand_t LOW_devDS2406::WriteStatus_COMMAND = 0x55 [static]
 

1-Wire command byte constant.

Definition at line 85 of file LOW_devDS2406.h.

Referenced by cmd_WriteStatus().


The documentation for this class was generated from the following files:
Generated on Sun Jan 12 21:07:55 2003 by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001