A managed wrapper on the native 1-Wire Public Domain Kit API for the 1-Wire USB master devices based on the DS2490. It relies on a native shared library (owusb.dll/libowusb.so) to expose external calls to the p/invoke layer.
This is not yet a full implementation at either the C++ native API export level (not all 1-Wire calls are exported) or this managed level.
More...
|
enum class | FamilyCodes : byte {
Unknown = 0x00
, HighResolutionDigitalThermometer = 0x10
, EconoThermometer = 0x22
, MultisensorTH = 0x26
,
ProgrammableThermometer = 0x28
, SerialIDButton = 0x81
} |
|
enum class | LineLevel : int { Normal = 0x00
, Strong5 = 0x02
, Program = 0x04
, Break = 0x08
} |
| The constants used to describe the line power level on the 1-Wire network.
More...
|
|
|
static void | WalkNetwork (int port, bool connected, OneWireSerialNumberHandler match) |
| Walks the 1-Wire network at port and calls match for every device found. More...
|
|
static int | Detect (usb_dev_handle handle) |
|
static bool | Acquire (int port) |
|
static bool | First (int port, bool doReset, bool alarmOnly) |
|
static bool | Next (int port, bool doReset, bool alarmOnly) |
|
static byte[] | GetSerialNumber (int port) |
|
static void | SetSerialNumber (int port, byte[] serialNumBuf) |
|
static bool | Access (int port) |
|
static void | Release (int port) |
|
static byte | ReadBytePower (int port) |
|
static bool | WriteBytePower (int port, byte sendbyte) |
|
static byte | ReadByte (int port) |
|
static bool | WriteByte (int port, byte sendbyte) |
|
static LineLevel | SetLineLevel (int port, LineLevel newLevel) |
|
static bool | TransferBlock (int port, bool doReset, ref byte[] buffer) |
|
static void | SetCrc (int port, ushort reset) |
|
static void | SetCrc (int port, byte reset) |
|
static ushort | CheckCrc (int port, ushort data) |
|
static byte | CheckCrc (int port, byte data) |
|
static string | GetLastError () |
|
static int | Test (int val) |
| A simple test method that echos the provided integer back to the caller. Note that this is a wrapper method so the call does go through the native library. More...
|
|
A managed wrapper on the native 1-Wire Public Domain Kit API for the 1-Wire USB master devices based on the DS2490. It relies on a native shared library (owusb.dll/libowusb.so) to expose external calls to the p/invoke layer.
This is not yet a full implementation at either the C++ native API export level (not all 1-Wire calls are exported) or this managed level.
◆ LineLevel
The constants used to describe the line power level on the 1-Wire network.
◆ OneWireSerialNumberHandler()
delegate void Apac.Dallas.OneWire.owApi.OneWireSerialNumberHandler |
( |
ulong |
serialNum | ) |
|
A delegate used to handle calls for a 1-Wire serial number.
- Parameters
-
serialNum | The serial number being handled. |
◆ Test()
static int Apac.Dallas.OneWire.owApi.Test |
( |
int |
val | ) |
|
|
inlinestatic |
A simple test method that echos the provided integer back to the caller. Note that this is a wrapper method so the call does go through the native library.
- Parameters
-
val | The Int32 value to be echoed. |
- Returns
- Returns the value provided in val .
◆ WalkNetwork()
Walks the 1-Wire network at port and calls match for every device found.
- Parameters
-
port | The port to use for communications. |
connected | Indicates the caller is managing the connection. |
match | The delegate called for each device on the network. |
The documentation for this class was generated from the following file:
- /var/lib/jenkins/workspace/apac/APAC/Apac.Dallas.OneWire/owApi.cs