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

LOW_linkFlexibleSpeed Class Reference

Mix-in class for 1-Wire link adapters capable of flexible speed. More...

#include <LOW_linkFlexibleSpeed.h>

Inheritance diagram for LOW_linkFlexibleSpeed:

Inheritance graph
[legend]
List of all members.

Public Types

typedef std::vector< LOW_linkFlexibleSpeed * > flexLinkPtrVec_t
 Vector type of link class pointers.

enum  wireSpeed_t { normal_speed = 0, flexible_speed = 1, overdrive_speed = 2 }
 1-Wire communication speeds. More...

Configuration values.
enum  pdSlewRate_t {
  pdSlewRate_15 = 0x00, pdSlewRate_2_2, pdSlewRate_1_65, pdSlewRate_1_37,
  pdSlewRate_1_1, pdSlewRate_0_83, pdSlewRate_0_7, pdSlewRate_0_55
}
 Type for flexible speed pulldown slew rate in V/microsec. More...

enum  w1LowTime_t {
  w1LowTime_8 = 0x00, w1LowTime_9, w1LowTime_10, w1LowTime_11,
  w1LowTime_12, w1LowTime_13, w1LowTime_14, w1LowTime_15
}
 Type for flexible speed write-1 low time in microsec. More...

enum  soW0RecTime_t {
  soW0RecTime_3 = 0x00, soW0RecTime_4, soW0RecTime_5, soW0RecTime_6,
  soW0RecTime_7, soW0RecTime_8, soW0RecTime_9, soW0RecTime_10
}
 Type for flexible speed DSO/ W0R time in microsec. More...


Public Member Functions

 class_DERIVE_FROM_EXCEPTION (incompatibleSpeed_error, LOW_exception)
 Exception base class for all exceptions thrown by LOW_link.

virtual void setWireSpeed (const wireSpeed_t inWireSpeed)
 Set the 1-Wire speed mode.

virtual wireSpeed_t getWireSpeed ()=0
 Get the 1-Wire speed mode.

virtual void setPullDownSlewRate (const pdSlewRate_t inPDSR)
 Set the Pulldown Slew Rate Control.

virtual pdSlewRate_t getPullDownSlewRate ()
 Get the Pulldown Slew Rate Control.

virtual void setWrite1LowTime (const w1LowTime_t inW1LT)
 Set the Write 1 Low Time.

virtual w1LowTime_t getWrite1LowTime ()
 Get the Write 1 Low Time.

virtual void setSampleOffsetWrite0Rec (const soW0RecTime_t inSOW0RT)
 Set the Sample Offset / Write 0 Recovery time.

virtual soW0RecTime_t getSampleOffsetWrite0Rec ()
 Get the Sample Offset / Write 0 Recovery time.


Protected Member Functions

 LOW_linkFlexibleSpeed (const wireSpeed_t inWireSpeed, const pdSlewRate_t inPdSlewRate, const w1LowTime_t inW1LowTime, const soW0RecTime_t inSoW0RecTime)
 Constructor.

virtual ~LOW_linkFlexibleSpeed ()
 Destructor.


Protected Attributes

wireSpeed_t wireSpeed
 Saved value of wire speed.

pdSlewRate_t pdSlewRate
 Saved value of pulldown slew rate.

w1LowTime_t w1LowTime
 Saved value of write-1 low time.

soW0RecTime_t soW0RecTime
 Saved value of DSO/W0R time.


Detailed Description

Mix-in class for 1-Wire link adapters capable of flexible speed.

Any link class representing a concrete 1-Wire link adapter can inherit from this class.

Values are stored by the methods in this class. For covenience they may called by overriding methods. See also description of individual methods.

Note that deriving classes should also override the get*() methods to reflect actual values of the device.

Note: This class is intentionally NOT thread-safe. This has to be accomplished by deriving classes

Author:
Harald Roelle

Definition at line 43 of file LOW_linkFlexibleSpeed.h.


Member Typedef Documentation

typedef std::vector<LOW_linkFlexibleSpeed*> LOW_linkFlexibleSpeed::flexLinkPtrVec_t
 

Vector type of link class pointers.

Definition at line 64 of file LOW_linkFlexibleSpeed.h.


Member Enumeration Documentation

enum LOW_linkFlexibleSpeed::pdSlewRate_t
 

Type for flexible speed pulldown slew rate in V/microsec.

Enumeration values:
pdSlewRate_15  Pulldown slew rate 15 V/microsec.
pdSlewRate_2_2  Pulldown slew rate 2.2 V/microsec.
pdSlewRate_1_65  Pulldown slew rate 1.65 V/microsec.
pdSlewRate_1_37  Pulldown slew rate 1.37 V/microsec.
pdSlewRate_1_1  Pulldown slew rate 1.1 V/microsec.
pdSlewRate_0_83  Pulldown slew rate 0.83 V/microsec.
pdSlewRate_0_7  Pulldown slew rate 0.7 V/microsec.
pdSlewRate_0_55  Pulldown slew rate 0.55 V/microsec.

Definition at line 76 of file LOW_linkFlexibleSpeed.h.

Referenced by getPullDownSlewRate(), LOW_linkDS2490::getPullDownSlewRate(), LOW_linkDS2480B::getPullDownSlewRate(), LOW_linkDS2490::PDSR_val_2_pdSlewRate(), and LOW_linkDS2480B::PDSR_val_2_pdSlewRate().

enum LOW_linkFlexibleSpeed::soW0RecTime_t
 

Type for flexible speed DSO/ W0R time in microsec.

Enumeration values:
soW0RecTime_3  DSO/w0R time 3 microsec.
soW0RecTime_4  DSO/w0R time 4 microsec.
soW0RecTime_5  DSO/w0R time 5 microsec.
soW0RecTime_6  DSO/w0R time 6 microsec.
soW0RecTime_7  DSO/w0R time 7 microsec.
soW0RecTime_8  DSO/w0R time 8 microsec.
soW0RecTime_9  DSO/w0R time 9 microsec.
soW0RecTime_10  DSO/w0R time 10 microsec.

Definition at line 98 of file LOW_linkFlexibleSpeed.h.

Referenced by getSampleOffsetWrite0Rec(), LOW_linkDS2490::getSampleOffsetWrite0Rec(), LOW_linkDS2480B::getSampleOffsetWrite0Rec(), LOW_linkDS2490::SOW0RT_val_2_soW0RecTime(), and LOW_linkDS2480B::SOW0RT_val_2_soW0RecTime().

enum LOW_linkFlexibleSpeed::w1LowTime_t
 

Type for flexible speed write-1 low time in microsec.

Enumeration values:
w1LowTime_8  Write-1 low time 8 microsec.
w1LowTime_9  Write-1 low time 9 microsec.
w1LowTime_10  Write-1 low time 10 microsec.
w1LowTime_11  Write-1 low time 11 microsec.
w1LowTime_12  Write-1 low time 12 microsec.
w1LowTime_13  Write-1 low time 13 microsec.
w1LowTime_14  Write-1 low time 14 microsec.
w1LowTime_15  Write-1 low time 15 microsec.

Definition at line 87 of file LOW_linkFlexibleSpeed.h.

Referenced by getWrite1LowTime(), LOW_linkDS2490::getWrite1LowTime(), LOW_linkDS2480B::getWrite1LowTime(), LOW_linkDS2490::W1LT_val_2_w1LowTime(), and LOW_linkDS2480B::W1LT_val_2_w1LowTime().

enum LOW_linkFlexibleSpeed::wireSpeed_t
 

1-Wire communication speeds.

Enumeration values:
normal_speed  Normal 1-Wire speed, 16 kbps.
flexible_speed  Flexible 1-Wire speed.
overdrive_speed  Overdrive 1-Wire speed, 142 kbps.

Definition at line 67 of file LOW_linkFlexibleSpeed.h.

Referenced by LOW_linkDS2490::getWireSpeed(), LOW_linkDS2480B::getWireSpeed(), LOW_linkDS2490::OWSPEED_val_2_wireSpeed(), and LOW_linkDS2480B::OWSPEED_val_2_wireSpeed().


Constructor & Destructor Documentation

LOW_linkFlexibleSpeed::LOW_linkFlexibleSpeed const wireSpeed_t  inWireSpeed,
const pdSlewRate_t  inPdSlewRate,
const w1LowTime_t  inW1LowTime,
const soW0RecTime_t  inSoW0RecTime
[protected]
 

Constructor.

Protected because should only be callable from deriving classes.

Parameters:
inWireSpeed Initial value for 1-Wire speed.
inPdSlewRate Initial value for pulldown slew rate.
inW1LowTime Initial value for write-1 low time.
inSoW0RecTime Initial value for DSO/W0R time.

Definition at line 26 of file LOW_linkFlexibleSpeed.cpp.

LOW_linkFlexibleSpeed::~LOW_linkFlexibleSpeed  )  [protected, virtual]
 

Destructor.

Definition at line 36 of file LOW_linkFlexibleSpeed.cpp.


Member Function Documentation

LOW_linkFlexibleSpeed::class_DERIVE_FROM_EXCEPTION incompatibleSpeed_error  ,
LOW_exception 
 

Exception base class for all exceptions thrown by LOW_link.

LOW_linkFlexibleSpeed::pdSlewRate_t LOW_linkFlexibleSpeed::getPullDownSlewRate  )  [virtual]
 

Get the Pulldown Slew Rate Control.

Current speed checking is done by provided implementation.

Note:Implementations should NOT simply return the value saved in this class, but read the actual values from the device.

Exceptions:
incompatibleSpeed_error Thrown when not in flexible speed mode.

Reimplemented in LOW_linkDS2480B, and LOW_linkDS2490.

Definition at line 62 of file LOW_linkFlexibleSpeed.cpp.

References flexible_speed, pdSlewRate, pdSlewRate_t, and wireSpeed.

Referenced by LOW_linkDS2490::getPullDownSlewRate(), and LOW_linkDS2480B::getPullDownSlewRate().

LOW_linkFlexibleSpeed::soW0RecTime_t LOW_linkFlexibleSpeed::getSampleOffsetWrite0Rec  )  [virtual]
 

Get the Sample Offset / Write 0 Recovery time.

Current speed checking is done by provided implementation.

Note:Implementations should NOT simply return the value saved in this class, but read the actual values from the device.

Exceptions:
incompatibleSpeed_error Thrown when not in flexible speed mode.

Reimplemented in LOW_linkDS2480B, and LOW_linkDS2490.

Definition at line 98 of file LOW_linkFlexibleSpeed.cpp.

References flexible_speed, soW0RecTime, soW0RecTime_t, and wireSpeed.

Referenced by LOW_linkDS2490::getSampleOffsetWrite0Rec(), and LOW_linkDS2480B::getSampleOffsetWrite0Rec().

virtual wireSpeed_t LOW_linkFlexibleSpeed::getWireSpeed  )  [pure virtual]
 

Get the 1-Wire speed mode.

Implemented in LOW_linkDS2480B, and LOW_linkDS2490.

LOW_linkFlexibleSpeed::w1LowTime_t LOW_linkFlexibleSpeed::getWrite1LowTime  )  [virtual]
 

Get the Write 1 Low Time.

Current speed checking is done by provided implementation.

Note:Implementations should NOT simply return the value saved in this class, but read the actual values from the device.

Exceptions:
incompatibleSpeed_error Thrown when not in flexible speed mode.

Reimplemented in LOW_linkDS2480B, and LOW_linkDS2490.

Definition at line 80 of file LOW_linkFlexibleSpeed.cpp.

References flexible_speed, w1LowTime, w1LowTime_t, and wireSpeed.

Referenced by LOW_linkDS2490::getWrite1LowTime(), and LOW_linkDS2480B::getWrite1LowTime().

void LOW_linkFlexibleSpeed::setPullDownSlewRate const pdSlewRate_t  inPDSR  )  [virtual]
 

Set the Pulldown Slew Rate Control.

Current speed checking and remembering the value is done by provided implementation.

Exceptions:
incompatibleSpeed_error Thrown when not in flexible speed mode.

Reimplemented in LOW_linkDS2480B, and LOW_linkDS2490.

Definition at line 53 of file LOW_linkFlexibleSpeed.cpp.

References flexible_speed, pdSlewRate, and wireSpeed.

Referenced by LOW_linkDS2490::setPullDownSlewRate(), and LOW_linkDS2480B::setPullDownSlewRate().

void LOW_linkFlexibleSpeed::setSampleOffsetWrite0Rec const soW0RecTime_t  inSOW0RT  )  [virtual]
 

Set the Sample Offset / Write 0 Recovery time.

Current speed checking and remembering the value is done by provided implementation.

Exceptions:
incompatibleSpeed_error Thrown when not in flexible speed mode.

Reimplemented in LOW_linkDS2480B, and LOW_linkDS2490.

Definition at line 89 of file LOW_linkFlexibleSpeed.cpp.

References flexible_speed, soW0RecTime, and wireSpeed.

Referenced by LOW_linkDS2490::setSampleOffsetWrite0Rec(), and LOW_linkDS2480B::setSampleOffsetWrite0Rec().

void LOW_linkFlexibleSpeed::setWireSpeed const wireSpeed_t  inWireSpeed  )  [virtual]
 

Set the 1-Wire speed mode.

Reimplemented in LOW_linkDS2480B, and LOW_linkDS2490.

Definition at line 47 of file LOW_linkFlexibleSpeed.cpp.

References wireSpeed.

Referenced by LOW_linkDS2490::setWireSpeed(), and LOW_linkDS2480B::setWireSpeed().

void LOW_linkFlexibleSpeed::setWrite1LowTime const w1LowTime_t  inW1LT  )  [virtual]
 

Set the Write 1 Low Time.

Current speed checking and remembering the value is done by provided implementation.

Exceptions:
incompatibleSpeed_error Thrown when not in flexible speed mode.

Reimplemented in LOW_linkDS2480B, and LOW_linkDS2490.

Definition at line 71 of file LOW_linkFlexibleSpeed.cpp.

References flexible_speed, w1LowTime, and wireSpeed.

Referenced by LOW_linkDS2490::setWrite1LowTime(), and LOW_linkDS2480B::setWrite1LowTime().


Member Data Documentation

pdSlewRate_t LOW_linkFlexibleSpeed::pdSlewRate [protected]
 

Saved value of pulldown slew rate.

Definition at line 187 of file LOW_linkFlexibleSpeed.h.

Referenced by getPullDownSlewRate(), LOW_linkDS2490::resetLinkAdapter(), LOW_linkDS2480B::resetLinkAdapter(), setPullDownSlewRate(), and LOW_linkDS2490::setWireSpeed().

soW0RecTime_t LOW_linkFlexibleSpeed::soW0RecTime [protected]
 

Saved value of DSO/W0R time.

Definition at line 189 of file LOW_linkFlexibleSpeed.h.

Referenced by getSampleOffsetWrite0Rec(), LOW_linkDS2490::resetLinkAdapter(), LOW_linkDS2480B::resetLinkAdapter(), setSampleOffsetWrite0Rec(), and LOW_linkDS2490::setWireSpeed().

w1LowTime_t LOW_linkFlexibleSpeed::w1LowTime [protected]
 

Saved value of write-1 low time.

Definition at line 188 of file LOW_linkFlexibleSpeed.h.

Referenced by getWrite1LowTime(), LOW_linkDS2490::resetLinkAdapter(), LOW_linkDS2480B::resetLinkAdapter(), LOW_linkDS2490::setWireSpeed(), and setWrite1LowTime().

wireSpeed_t LOW_linkFlexibleSpeed::wireSpeed [protected]
 

Saved value of wire speed.

Definition at line 186 of file LOW_linkFlexibleSpeed.h.

Referenced by getPullDownSlewRate(), getSampleOffsetWrite0Rec(), LOW_linkDS2480B::getWireSpeed(), getWrite1LowTime(), LOW_linkDS2480B::reset_cmd(), LOW_linkDS2490::resetLinkAdapter(), LOW_linkDS2480B::resetLinkAdapter(), LOW_linkDS2480B::searchAccelCtrl_cmd(), setPullDownSlewRate(), setSampleOffsetWrite0Rec(), setWireSpeed(), LOW_linkDS2490::setWireSpeed(), setWrite1LowTime(), and LOW_linkDS2480B::singleBit_cmd().


The documentation for this class was generated from the following files:
Generated on Tue Feb 3 11:31:00 2004 for OneWireLibrary++ by doxygen 1.3.2