1-Wire API for Compact.NET  Version 4.10
UAdapterState Class Reference

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

Collaboration diagram for UAdapterState:

Public Member Functions

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

Public Attributes

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

Protected Attributes

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

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</version> <author>DS, SH</author>

Constructor & Destructor Documentation

◆ UAdapterState()

UAdapterState ( OneWireState  newOneWireState)

Construct the state of the U brick with the defaults

Member Data Documentation

◆ CHIP_VERSION1

const byte CHIP_VERSION1 = (byte)(0x04)

DS9097U chip revision 1

◆ CHIP_VERSION_MASK

const byte CHIP_VERSION_MASK = (byte)(0x1C)

DS9097U chip revision mask

◆ inCommandMode

bool inCommandMode

True when DS2480 is currently in command mode.

False when it is in data mode.

◆ lastAlarmCount

internal int lastAlarmCount
protected

Count of how many resets have been seen without Alarms

◆ longAlarmCheck

internal bool longAlarmCheck
protected

Flag to indicate need to Search for long alarm check

◆ MAX_ALARM_COUNT

const int MAX_ALARM_COUNT = 3000

Maximum number of alarms

◆ MODE_COMMAND

const byte MODE_COMMAND = (byte)(0x00E3)

DS9097U command mode

◆ MODE_DATA

const byte MODE_DATA = (byte)(0x00E1)

DS9097U data mode

◆ MODE_SPECIAL

const byte MODE_SPECIAL = (byte)(0x00F3)

DS9097U special mode (in revision 1 silicon only)

◆ MODE_STOP_PULSE

const byte MODE_STOP_PULSE = (byte)(0x00F1)

DS9097U pulse mode

◆ oneWireState

OneWireState oneWireState

The OneWire State object reference

◆ PROGRAM_VOLTAGE_MASK

const byte PROGRAM_VOLTAGE_MASK = (byte)(0x20)

DS9097U program voltage available mask

◆ programVoltageAvailable

bool programVoltageAvailable

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

'true' if available.

◆ revision

byte revision

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

◆ streamBits

bool streamBits

Flag true if can stream bits

◆ streamBytes

bool streamBytes

Flag true if can stream bytes

◆ streamResets

bool streamResets

Flag true if can stream resets

◆ streamSearches

bool streamSearches

Flag true if can stream Search

◆ ubaud

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

◆ uParameters

UParameterSettings [] uParameters

Parameter settings for the three logical modes

◆ USPEED_FLEX

const byte USPEED_FLEX = (byte)(0x04)

DS9097U speed mode, flexible speed for long lines

◆ USPEED_OVERDRIVE

const byte USPEED_OVERDRIVE = (byte)(0x08)

DS9097U speed mode, overdrive speed

◆ USPEED_PULSE

const byte USPEED_PULSE = (byte)(0x0C)

DS9097U speed mode, pulse, for program and power delivery

◆ USPEED_REGULAR

const byte USPEED_REGULAR = (byte)(0x00)

DS9097U speed mode, regular speed

◆ uSpeedMode

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

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