Into

Modules

Documentation

classPiiIoDriver

#include <PiiIoDriver.h>

An interface for input/output drivers.

Inherits QObject

Inherited by PiiDefaultIoDriver

Description

Public member functions

virtual PiiIoChannel *
(
  • int channel
)  = 0

Get a pointer to a PiiIoChannel object that stores the configuration of the given channel.

virtual int
( )  = 0

Get the total number of I/O channels.

virtual bool
( )

Close an initialized driver.

virtual bool
( )  = 0

Initialize the driver.

virtual bool
( )  = 0

Select the I/O unit to use.

Function details

  • virtual PiiIoChannel * channel

    (
    • int channel
    )
    [pure virtual]

    Get a pointer to a PiiIoChannel object that stores the configuration of the given channel.

    Parameters
    channel

    the channel number, 0 to #getChannelCount() - 1.

  • virtual int channelCount

    ()
    [pure virtual]

    Get the total number of I/O channels.

  • virtual bool close

    ()
    [inline, virtual]

    Close an initialized driver.

    After close(), initialize() must be called again before the driver is functional. The default implementation returns true.

    Returns

    true on success, false otherwise

  • virtual bool initialize

    ()
    [pure virtual]

    Initialize the driver.

    This function is must be called before the driver can be accessed

    Returns

    true if the initialization was successful, false otherwise.

  • virtual bool selectUnit

    ( )
    [pure virtual]

    Select the I/O unit to use.

    The driver may be able to handle many I/O boards. The active unit is selected by a generic unit id. Possibilities include, for example, network addresses and numeric board indices.

    Returns

    true if the selection was successful, false otherwise.

Notes (0)

Add a note

Not a single note added yet. Be the first, add yours.