OneWireLibrary++

This C++ library is a new approach for a software library to interface to 1-Wire hardware.

It is developed on Linux, using KDevelop on a SuSE 9.0 system.

Features

  • GNU GPL license
  • Support for passive serial, active serial (DS2480B) and USB interfaces (DS2490)
  • View on multiple interfaces as one logical network
  • Provides easy to use interfaces to devices (by now: DS1820, DS2401, DS2405, DS2406, DS2890)
  • Portable to different platforms (at least in theory). Platform specific parts are encapsulated in special classes using the static factory design pattern.
  • Easy to extend (imho)
  • Includes console demo application
  • Written in and for C++ (oh well, some might say that's a bug)

Major todos, aka missing features

  • Support for segmented networks
  • Testing, testing ... testing

Status

This package just reached alpha status! Use it your own risk.

Changes V0.4.3

  • Fixed bug in strong pullup IO of DS2490 (Thanks to Daniel Lux for discovering this one)

Changes V0.4.2

  • Fixes to satisfy gcc3 series compilers.
  • Fixed bug in temperature calculation.

Changes V0.4.1

  • Support for digital potentiometer DS2890.
  • Support for silicon serial number DS2401.
  • Handling of unknown device types.
  • Bugfixes.

Changes V0.4

  • Support of USB controllers based on DS2490
  • Requires libusb, at least V0.1.6
  • Thread safety
  • Threads and mutexes supporting classes
  • Replaced semaphores by mutexes
  • Abandoned support of IPC classes
  • Cleanups and streamlining
  • Tons of bugfixes

See also the known bugs and the todo list.

In principle, the core part of the library is platform independant as it only uses standard C++. The platform specific parts are encapsulated in special classes, following the factory design pattern. Therefore it should be possible to port it to other OSs.

Documentation

Here you can find the api documentation online.

Download

Old versions