UAdapterState Class Reference

List of all members.


Detailed Description

UAdapterState contains the communication state of the DS2480 based COM port adapter.

\//\ This class is very preliminary and not all functionality is complete or debugged. This class is subject to change. //\//\

Version:
0.00
Author:
DS, SH

Public Member Functions

 UAdapterState (OneWireState newOneWireState)
 Construct the state of the U brick with the defaults.

Public Attributes

const byte USPEED_REGULAR = (byte) (0x00)
 DS9097U speed mode, regular speed.
const byte USPEED_FLEX = (byte) (0x04)
 DS9097U speed mode, flexible speed for long lines.
const byte USPEED_OVERDRIVE = (byte) (0x08)
 DS9097U speed mode, overdrive speed.
const byte USPEED_PULSE = (byte) (0x0C)
 DS9097U speed mode, pulse, for program and power delivery.
const byte MODE_DATA = (byte) (0x00E1)
 DS9097U data mode.
const byte MODE_COMMAND = (byte) (0x00E3)
 DS9097U command mode.
const byte MODE_STOP_PULSE = (byte) (0x00F1)
 DS9097U pulse mode.
const byte MODE_SPECIAL = (byte) (0x00F3)
 DS9097U special mode (in revision 1 silicon only).
const byte CHIP_VERSION1 = (byte) (0x04)
 DS9097U chip revision 1.
const byte CHIP_VERSION_MASK = (byte) (0x1C)
 DS9097U chip revision mask.
const byte PROGRAM_VOLTAGE_MASK = (byte) (0x20)
 DS9097U program voltage available mask.
const int MAX_ALARM_COUNT = 3000
 Maximum number of alarms.
UParameterSettings[] uParameters
 Parameter settings for the three logical modes.
OneWireState oneWireState
 The OneWire State object reference.
bool streamBits
 Flag true if can stream bits.
bool streamBytes
 Flag true if can stream bytes.
bool streamSearches
 Flag true if can stream search.
bool streamResets
 Flag true if can stream resets.
AdapterBaud ubaud
 Current baud rate that we are communicating with the DS9097U expressed for the DS2480 ichip.
byte uSpeedMode
 This is the current 'real' speed that the OneWire is operating at.
bool programVoltageAvailable
 This is the current state of the DS2480 adapter on program voltage availablity.
bool inCommandMode
 True when DS2480 is currently in command mode.
byte revision
 The DS2480 revision number. The current value values are 1 and 2.

Protected Attributes

internal bool longAlarmCheck
 Flag to indicate need to search for long alarm check.
internal int lastAlarmCount
 Count of how many resets have been seen without Alarms.

Constructor & Destructor Documentation

UAdapterState ( OneWireState  newOneWireState  ) 

Construct the state of the U brick with the defaults.


Member Data Documentation

const byte USPEED_REGULAR = (byte) (0x00)

DS9097U speed mode, regular speed.

const byte USPEED_FLEX = (byte) (0x04)

DS9097U speed mode, flexible speed for long lines.

const byte USPEED_OVERDRIVE = (byte) (0x08)

DS9097U speed mode, overdrive speed.

const byte USPEED_PULSE = (byte) (0x0C)

DS9097U speed mode, pulse, for program and power delivery.

const byte MODE_DATA = (byte) (0x00E1)

DS9097U data mode.

const byte MODE_COMMAND = (byte) (0x00E3)

DS9097U command mode.

const byte MODE_STOP_PULSE = (byte) (0x00F1)

DS9097U pulse mode.

const byte MODE_SPECIAL = (byte) (0x00F3)

DS9097U special mode (in revision 1 silicon only).

const byte CHIP_VERSION1 = (byte) (0x04)

DS9097U chip revision 1.

const byte CHIP_VERSION_MASK = (byte) (0x1C)

DS9097U chip revision mask.

const byte PROGRAM_VOLTAGE_MASK = (byte) (0x20)

DS9097U program voltage available mask.

const int MAX_ALARM_COUNT = 3000

Maximum number of alarms.

Parameter settings for the three logical modes.

The OneWire State object reference.

bool streamBits

Flag true if can stream bits.

Flag true if can stream bytes.

Flag true if can stream search.

Flag true if can stream resets.

AdapterBaud ubaud

Current baud rate that we are communicating with the DS9097U expressed for the DS2480 ichip.

Valid values can be:

  • BAUD_9600
  • BAUD_19200
  • BAUD_57600
  • BAUD_115200

byte uSpeedMode

This is the current 'real' speed that the OneWire is operating at.

This is used to represent the actual mode that the DS2480 is operting in. For example the logical speed might be USPEED_REGULAR but for RF emission reasons we may put the actual DS2480 in OWSpeed.SPEED_FLEX.

The valid values for this are:

  • USPEED_REGULAR
  • USPEED_FLEX
  • USPEED_OVERDRIVE
  • USPEED_PULSE

This is the current state of the DS2480 adapter on program voltage availablity.

'true' if available.

True when DS2480 is currently in command mode.

False when it is in data mode.

byte revision

The DS2480 revision number. The current value values are 1 and 2.

internal bool longAlarmCheck [protected]

Flag to indicate need to search for long alarm check.

internal int lastAlarmCount [protected]

Count of how many resets have been seen without Alarms.


The documentation for this class was generated from the following file:

Generated on Thu Aug 28 15:41:57 2008 for 1-Wire API for Compact.NET by  doxygen 1.5.6