Into

Modules

Documentation

classPiiIoOutputOperation

#include <PiiIoOutputOperation.h>

PiiIoOutputOperation description.

Inherits PiiDefaultOperation

Description

Configuring channels

Channels are configured with property maps (QVariantMap). See other recognized property values from PiiIoChannel.

All channels can be configured at once with the channelConfigs property. To configure a single channel, use the channelConfig property.

 // Create a new output signal operation
 PiiOperation* handler = engine.createOperation("PiiIoOutputOperation");

 // Configure channel 13
 QVariantMap props;
 props["pulseWidth"] = 300;
 props["pulseDelay"] = 0;
 props["channel"] = 13;
 props["index"] = 0;
 props["channelMode"] = "PulseOutput";
 props["electricalConnection"] = "IttlConnection";

 handler->setProperty("channelConfig", props);


 // To configure channels(14,15,16) at once, do this:
 QVariantMap props1;
 props["pulseWidth"] = 300;
 props["pulseDelay"] = 0;
 props["channel"] = 14;
 props["channelMode"] = "PulseOutput";
 props["electricalConnection"] = "IttlConnection";

 QVariantMap props2;
 props["pulseWidth"] = 300;
 props["pulseDelay"] = 0;
 props["channel"] = 15;
 props["channelMode"] = "PulseOutput";
 props["electricalConnection"] = "IttlConnection";

 QVariantMap props3;
 props["pulseWidth"] = 300;
 props["pulseDelay"] = 0;
 props["channel"] = 16;
 props["channelMode"] = "PulseOutput";
 props["electricalConnection"] = "IttlConnection";

 QVariantList configs;
 configs << props1 << props2 << props3;
 handler->setProperty("channelConfigs", configs);

Inputs

channelinteger.

valuedouble.

Properties

QVariantMap

Configure a single channel.

QVariantList

Configuration values for several channels.

int

Get a channel count.

QVariantList

Get the state of the channels.

bool

disabled description

ioDriver description

ioUnit description

Public Slots

void

Constructors and destructor

Public member functions

QVariantList
int
QVariantList
virtual void
(
  • bool reset
)

Checks the operation for execution.

bool
( )
( )
( )
void
(
  • const QVariantMap & channelConfig
)
void
(
  • const QVariantList & channelConfigs
)
void
(
  • bool disabled
)
void
( )
void
( )

Protected member functions

virtual void
( )

Executes one round of processing.

Property details

  • QVariantMap channelConfig

    [write]

    Configure a single channel.

  • QVariantList channelConfigs

    [read, write]

    Configuration values for several channels.

  • int channelCount

    [read]

    Get a channel count.

  • QVariantList channelStates

    [read]

    Get the state of the channels.

  • bool disabled

    [read, write]

    disabled description

  • QString ioDriver

    [read, write]

    ioDriver description

  • QString ioUnit

    [read, write]

    ioUnit description

Function details

  • PiiIoOutputOperation

    ()
  • ~PiiIoOutputOperation

    ()
  • QVariantList channelConfigs

    ()
  • int channelCount

    ()
  • QVariantList channelStates

    ()
  • virtual void check

    (
    • bool reset
    )
    [virtual]

    Checks the operation for execution.

    This function creates a suitable flow controller by calling createFlowController(). It then sets the flow controller to the active processor and sets the processor as the input controller for all inputs.

    If you change socket groupings in your overridden implementation, please call PiiDefaultOperation::check() after that. Otherwise, your new groupings will not be in effect.

    Reimplemented from PiiDefaultOperation.

  • bool disabled

    ()
  • QString ioDriver

    ()
  • QString ioUnit

    ()
  • void setChannelConfig

    (
    • const QVariantMap & channelConfig
    )
  • void setChannelConfigs

    (
    • const QVariantList & channelConfigs
    )
  • void setDisabled

    (
    • bool disabled
    )
  • void setIoDriver

    ()
  • void setIoUnit

    ()
  • virtual void process

    ()
    [protected, virtual]

    Executes one round of processing.

    This function is invoked by the processor if the necessary preconditions for a new processing round are met. This function does all the necessary calculations to create output objects and sends them to output sockets.

    Calls to process(), syncEvent(), and setProperty() are synchronized and cannot occur simultaneously. PiiDefaultOperation ensures this by locking processLock() for reading before calling process().

    Note: With time-consuming operations, one should occasionally check that the operation hasn't been interrupted, i.e. that state() returns Running.

    Exceptions
    PiiExecutionException

    whenever an unrecoverable error occurs during a processing round, the operation is interrupted, or finishes execution due to end of input data.

    Reimplemented from PiiDefaultOperation.

  • void setChannelState

    ()
    [slot]
Notes (0)

Add a note

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