1-Wire API for Compact.NET
Version 4.10
|
UAdapterState contains the communication state of the DS2480 based COM port adapter. More...
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... | |
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>
UAdapterState | ( | OneWireState | newOneWireState | ) |
Construct the state of the U brick with the defaults
const byte CHIP_VERSION1 = (byte)(0x04) |
DS9097U chip revision 1
const byte CHIP_VERSION_MASK = (byte)(0x1C) |
DS9097U chip revision mask
bool inCommandMode |
True when DS2480 is currently in command mode.
False when it is in data mode.
|
protected |
Count of how many resets have been seen without Alarms
|
protected |
Flag to indicate need to Search for long alarm check
const int MAX_ALARM_COUNT = 3000 |
Maximum number of alarms
const byte MODE_COMMAND = (byte)(0x00E3) |
DS9097U command mode
const byte MODE_DATA = (byte)(0x00E1) |
DS9097U data mode
const byte MODE_SPECIAL = (byte)(0x00F3) |
DS9097U special mode (in revision 1 silicon only)
const byte MODE_STOP_PULSE = (byte)(0x00F1) |
DS9097U pulse mode
OneWireState oneWireState |
The OneWire State object reference
const byte PROGRAM_VOLTAGE_MASK = (byte)(0x20) |
DS9097U program voltage available mask
bool programVoltageAvailable |
This is the current state of the DS2480 adapter on program voltage availablity.
'true' if available.
byte revision |
The DS2480 revision number. The current value values are 1 and 2.
bool streamBits |
Flag true if can stream bits
bool streamBytes |
Flag true if can stream bytes
bool streamResets |
Flag true if can stream resets
bool streamSearches |
Flag true if can stream Search
AdapterBaud ubaud |
Current baud rate that we are communicating with the DS9097U expressed for the DS2480 ichip.
Valid values can be:
UParameterSettings [] uParameters |
Parameter settings for the three logical modes
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 USPEED_REGULAR = (byte)(0x00) |
DS9097U speed mode, regular speed
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: