Generic hardware access library
HAL::PollItemCommand Class Reference

SequencerCommand to poll an item. More...

#include <PollItemCommand.hh>

Inheritance diagram for HAL::PollItemCommand:
HAL::SequencerCommand

List of all members.

Public Member Functions

 PollItemCommand (std::string item, CommandSequence &sequence)
virtual ~PollItemCommand ()
void excecute (const HardwareDeviceInterface &device) const throw ( IllegalOperationException, BusAdapterException, MaskBoundaryException, TimeoutException )
 This routine is common to all Sequencer commands.
void setOffsetPointer (uint32_t *offsetPtr)
 This is used by the PollItemFactory.
void setReferenceValuePointer (uint32_t *dataPtr)
 This is used by the PollItemFactory.
void setTimeoutPointer (uint32_t *timeoutPtr)
 This is used by the PollItemFactory.
void setResultPointer (uint32_t *resultPtr)
 This is used by the PollItemFactory.
void setReferenceValue (uint32_t offset)
 This is used by the PollItemFactory.
void setOffset (uint32_t offset)
 This is used by the PollItemFactory.
void setTimeout (uint32_t timeout)
 This is used by the PollItemFactory.
void setPollMethod (HalPollMethod pollMethod)
 This is used by the PollItemFactory.

Private Attributes

CommandSequencesequence
std::string item
uint32_t * referenceValuePtr
uint32_t referenceValue
uint32_t * timeoutPtr
uint32_t timeout
uint32_t * offsetPtr
uint32_t offset
uint32_t * resultPtr
HalPollMethod pollMethod

Detailed Description

SequencerCommand to poll an item.

This Command corresponds to the pollItem method in the HardwareDeviceInterface. The syntax is :

pollItem item referenceValue timeout $varname [pollMethod] [offset]

  • 'referenceValue' which is used to define the end condition of the polling. This parameter can be a constant or a variable.
  • 'timeout' is the time in ms after which an exception is thrown if the poll-condition has not yet been encountered. This parameter can be a constant or a variable.
  • '$varname' is the name of a varible which will contain the value read from the item during the last poll cycle.
  • 'pollMethod' is an optional parameter which must have one of the values "HAL_POLL_UNTIL_EQUAL" or "HAL_POLL_UNTIL_DIFFERENT". If the first value is chosen the item will be polled until its value is equal to the referenceValue. If "HAL_POLL_UNTIL_DIFFERENT" is chosen the item will be polled until its value is not equal to the referenceceValue.
  • 'offset' is an optional parameter (default is 0) and can be a constant or a variable name. It contains an offset added to address of the item.
See also:
PollItemFactory
Author:
Christoph Schwick
Revision:
1.1
Date:
2007/03/05 18:02:10

Definition at line 52 of file PollItemCommand.hh.


Constructor & Destructor Documentation

HAL::PollItemCommand::PollItemCommand ( std::string  item,
HAL::CommandSequence sequence 
)
Parameters:
sequencedenotes the Sequence to which this command belongs. This reference is needed to store the read value in a variable of the sequence.

Definition at line 4 of file PollItemCommand.cc.

virtual HAL::PollItemCommand::~PollItemCommand ( ) [inline, virtual]

Definition at line 62 of file PollItemCommand.hh.


Member Function Documentation

This routine is common to all Sequencer commands.

It does what it pretends to do.

Implements HAL::SequencerCommand.

Definition at line 14 of file PollItemCommand.cc.

void HAL::PollItemCommand::setOffset ( uint32_t  offset)

This is used by the PollItemFactory.

Definition at line 23 of file PollItemCommand.cc.

void HAL::PollItemCommand::setOffsetPointer ( uint32_t *  offsetPtr)

This is used by the PollItemFactory.

Definition at line 35 of file PollItemCommand.cc.

This is used by the PollItemFactory.

Definition at line 39 of file PollItemCommand.cc.

void HAL::PollItemCommand::setReferenceValue ( uint32_t  offset)

This is used by the PollItemFactory.

Definition at line 31 of file PollItemCommand.cc.

void HAL::PollItemCommand::setReferenceValuePointer ( uint32_t *  dataPtr)

This is used by the PollItemFactory.

Definition at line 43 of file PollItemCommand.cc.

void HAL::PollItemCommand::setResultPointer ( uint32_t *  resultPtr)

This is used by the PollItemFactory.

Definition at line 47 of file PollItemCommand.cc.

void HAL::PollItemCommand::setTimeout ( uint32_t  timeout)

This is used by the PollItemFactory.

Definition at line 27 of file PollItemCommand.cc.

void HAL::PollItemCommand::setTimeoutPointer ( uint32_t *  timeoutPtr)

This is used by the PollItemFactory.

Definition at line 51 of file PollItemCommand.cc.


Member Data Documentation

std::string HAL::PollItemCommand::item [private]

Definition at line 112 of file PollItemCommand.hh.

uint32_t HAL::PollItemCommand::offset [private]

Definition at line 118 of file PollItemCommand.hh.

uint32_t* HAL::PollItemCommand::offsetPtr [private]

Definition at line 117 of file PollItemCommand.hh.

Definition at line 114 of file PollItemCommand.hh.

Definition at line 113 of file PollItemCommand.hh.

uint32_t* HAL::PollItemCommand::resultPtr [private]

Definition at line 119 of file PollItemCommand.hh.

Definition at line 111 of file PollItemCommand.hh.

uint32_t HAL::PollItemCommand::timeout [private]

Definition at line 116 of file PollItemCommand.hh.

uint32_t* HAL::PollItemCommand::timeoutPtr [private]

Definition at line 115 of file PollItemCommand.hh.


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