Torc  0.1
Public Member Functions | Static Public Attributes | List of all members
Torc1WireBus Class Reference

A class to handle the one wire files system (OWFS) for 1Wire devices. More...

#include <torc1wirebus.h>

Inheritance diagram for Torc1WireBus:
[legend]

Public Member Functions

 Torc1WireBus ()
 
void Create (const QVariantMap &Details)
 
void Destroy (void)
 
- Public Member Functions inherited from TorcDeviceHandler
 TorcDeviceHandler ()
 
virtual ~TorcDeviceHandler ()=default
 

Static Public Attributes

static Torc1WireBusgTorc1WireBus = new Torc1WireBus()
 

Additional Inherited Members

- Static Public Member Functions inherited from TorcDeviceHandler
static void Start (const QVariantMap &Details)
 
static void Stop (void)
 
- Protected Member Functions inherited from TorcDeviceHandler
TorcDeviceHandlerGetNextHandler (void)
 
- Static Protected Member Functions inherited from TorcDeviceHandler
static TorcDeviceHandlerGetDeviceHandler (void)
 
- Protected Attributes inherited from TorcDeviceHandler
QReadWriteLock m_handlerLock
 

Detailed Description

A class to handle the one wire files system (OWFS) for 1Wire devices.

Using OWFS, 1Wire devices are presented at /sys/bus/w1/devices. If the kernel modules have not been loaded the /sys/bus/w1 directory will not exist, although it may exist and remain unpopulated if the wire module is still loaded.

We no longer monitor the file system and create/remove devices as they are seen. Instead we create those devices specified in the configuration file. Any that are not present will remain invalid.

Note
Only tested with RaspberryPi under Raspbian; other devices/implementations may use a different filesystem structure.
Only the Maxim DS18B20 digital thermometer is currently supported.
The required kernel modules are not loaded by default on Raspbian. You will need to 'modprobe' for both w1_gpio and w1_therm and add these to /etc/modules to ensure they are loaded at each reboot.
<torc>
<inputs>
<wire1>
<ds18b20>
<wire1serial>28-123456789abc</wire1serial>
<name>tanktemp</name>
<username>Tank temperature</username>
<userdescription>The temperature in the tank</userdescription>
</ds18b20>
</wire1>
</inputs>
</torc>

Definition at line 15 of file torc1wirebus.h.

Constructor & Destructor Documentation

Torc1WireBus::Torc1WireBus ( )

Definition at line 68 of file torc1wirebus.cpp.

Member Function Documentation

void Torc1WireBus::Create ( const QVariantMap &  Details)
virtual

Implements TorcDeviceHandler.

Definition at line 74 of file torc1wirebus.cpp.

void Torc1WireBus::Destroy ( void  )
virtual

Implements TorcDeviceHandler.

Definition at line 147 of file torc1wirebus.cpp.

Member Data Documentation

Torc1WireBus * Torc1WireBus::gTorc1WireBus = new Torc1WireBus()
static

Definition at line 20 of file torc1wirebus.h.


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