AuboCaps  0.6.0
arcs::aubo_scope::WaitNode Class Reference

#include <wait_node.h>

Inheritance diagram for arcs::aubo_scope::WaitNode:
Collaboration diagram for arcs::aubo_scope::WaitNode:

Public Types

enum  ConfigType : int {
  NO_TYPE, NO_WAIT, TIME, DIGITAL_INPUT,
  ANALOG_INPUT_CURRENT, ANALOG_INPUT_VOLTAGE, FLOAT_REGISTER_INPUT, EXPRESSION_INPUT
}
 The configuration type used to determine which type of configuration this instance is. More...
 
enum  CompareOperator : int { LESS_THAN, GREATER_THAN }
 Compare operator types LESS_THAN and GREATER_THAN used when waiting for an analog input to go lower or higher, respectively, than a threshold. More...
 

Public Member Functions

 WaitNode (WaitNode &f)
 
 WaitNode (WaitNode &&f)
 
virtual ~WaitNode ()
 
ConfigType getConfigType ()
 This method returns the type of configuration. More...
 
void setConfigType (ConfigType type)
 
double getWaitTime ()
 
void setWaitTime (double time)
 
bool getBoolValueToWaitFor ()
 Depending on the type of input this is interpreted in different ways. More...
 
void setBoolValueToWaitFor (bool value)
 
float getFloatValueToWaitFor ()
 
void setFloatValueToWaitFor (float value)
 
void setDigitalInput (DigitalIoPtr input)
 Creates a configuration for waiting for a digital input to go high or low. More...
 
DigitalIoPtr getDigitalInput ()
 
void setModbusInput (ModbusIoPtr input)
 Creates a configuration for waiting for a digital MODBUS input to go high or low. More...
 
ModbusIoPtr getModbusInput ()
 
void setBoolRegister (BoolRegisterPtr input)
 Creates a configuration for waiting for a boolean register to go true or false. More...
 
BoolRegisterPtr getBoolRegister ()
 
void setCompareOperator (CompareOperator compareOperator)
 
CompareOperator getCompareOperator ()
 
void setAnalogInput (AnalogIoPtr input)
 Creates a configuration for waiting for an analog input to go past an electric current threshold. More...
 
AnalogIoPtr getAnalogInput ()
 
void setDoubleRegisterInput (DoubleRegisterPtr input)
 Creates a configuration for waiting for a register to go past a float threshold. More...
 
DoubleRegisterPtr getDoubleRegisterInput ()
 
void setExpressionInputConfig (ExpressionPtr expression)
 Create a configuration for waiting for an expression to be evaluated to true. More...
 
ExpressionPtr getExpressionInputConfig ()
 
- Public Member Functions inherited from arcs::aubo_scope::ProgramNode
 ProgramNode (ProgramNode &f)
 
 ProgramNode (ProgramNode &&f)
 
virtual ~ProgramNode ()
 
ProgramNodeContributionPtr getProgramNodeContribution ()
 不推荐用户调用 ProgramNodeContribution::generateScript 使用 ScriptWritter::writeChildren More...
 

Private Member Functions

 WaitNode ()
 

Private Attributes

void * d_ { nullptr }
 

Friends

class DataSwitch
 

Additional Inherited Members

- Protected Member Functions inherited from arcs::aubo_scope::ProgramNode
 ProgramNode ()
 

Detailed Description

Definition at line 16 of file wait_node.h.

Member Enumeration Documentation

Compare operator types LESS_THAN and GREATER_THAN used when waiting for an analog input to go lower or higher, respectively, than a threshold.

Enumerator
LESS_THAN 
GREATER_THAN 

Definition at line 101 of file wait_node.h.

The configuration type used to determine which type of configuration this instance is.

Enumerator
NO_TYPE 
NO_WAIT 

Nothing to wait.

TIME 

Wait type is time.

The config instance can be cast to TimeWaitNodeConfig.

DIGITAL_INPUT 

Wait type is digital_input.

The config instance can be cast to DigitalInputWaitNodeConfig.

ANALOG_INPUT_CURRENT 

Wait type is analog_input_current.

The config instance can be cast to AnalogInputCurrentWaitNodeConfig.

ANALOG_INPUT_VOLTAGE 

Wait type is analog_input_voltage.

The config instance can be cast to AnalogInputVoltageWaitNodeConfig.

FLOAT_REGISTER_INPUT 

Wait type is float_register_input.

The config instance can be cast to FloatRegisterInputWaitNodeConfig.

EXPRESSION_INPUT 

Wait type is expression_input.

The config instance can be cast to ExpressionInputWaitNodeConfig.

Definition at line 23 of file wait_node.h.

Constructor & Destructor Documentation

arcs::aubo_scope::WaitNode::WaitNode ( WaitNode f)
arcs::aubo_scope::WaitNode::WaitNode ( WaitNode &&  f)
virtual arcs::aubo_scope::WaitNode::~WaitNode ( )
virtual
arcs::aubo_scope::WaitNode::WaitNode ( )
private

Member Function Documentation

AnalogIoPtr arcs::aubo_scope::WaitNode::getAnalogInput ( )
BoolRegisterPtr arcs::aubo_scope::WaitNode::getBoolRegister ( )
bool arcs::aubo_scope::WaitNode::getBoolValueToWaitFor ( )

Depending on the type of input this is interpreted in different ways.

For digital inputs and MODBUS inputs, true means the input to wait for must be HIGH, false means the input to wait for must be LOW. For boolean registers the value is interpreted literally.

Returns
the input value to wait for.
CompareOperator arcs::aubo_scope::WaitNode::getCompareOperator ( )
ConfigType arcs::aubo_scope::WaitNode::getConfigType ( )

This method returns the type of configuration.

Cast this instance appropriately to have access to specific getters.

Returns
the type of this config.
DigitalIoPtr arcs::aubo_scope::WaitNode::getDigitalInput ( )
DoubleRegisterPtr arcs::aubo_scope::WaitNode::getDoubleRegisterInput ( )
ExpressionPtr arcs::aubo_scope::WaitNode::getExpressionInputConfig ( )
float arcs::aubo_scope::WaitNode::getFloatValueToWaitFor ( )
ModbusIoPtr arcs::aubo_scope::WaitNode::getModbusInput ( )
double arcs::aubo_scope::WaitNode::getWaitTime ( )
Returns
the time to wait for. second
void arcs::aubo_scope::WaitNode::setAnalogInput ( AnalogIoPtr  input)

Creates a configuration for waiting for an analog input to go past an electric current threshold.

Parameters
inputon which to wait, not null.
compareOperatorthe operator to use when comparing input to value, not null. Available options are "less than" ({ <}) or "greater than" ({ >}).
currentthe electric current threshold to wait for, not null.
errorHandlerthe error handler for validation errors. If using ErrorHandler#AUTO_CORRECT this will clamp the value to the nearest valid current value.
Returns
the configuration.
Exceptions
IllegalArgumentExceptionif input is an output (does not support reading of values). See IO#isInput().
void arcs::aubo_scope::WaitNode::setBoolRegister ( BoolRegisterPtr  input)

Creates a configuration for waiting for a boolean register to go true or false.

Parameters
inputthe boolean register input on which to wait, not null.
value_to_wait_fortrue, if waiting for the register to be true}, false} otherwise.
Returns
the configuration.
Exceptions
IllegalArgumentExceptionif input is an output (does not support reading of values). See IO#isInput().
void arcs::aubo_scope::WaitNode::setBoolValueToWaitFor ( bool  value)
void arcs::aubo_scope::WaitNode::setCompareOperator ( CompareOperator  compareOperator)
void arcs::aubo_scope::WaitNode::setConfigType ( ConfigType  type)
void arcs::aubo_scope::WaitNode::setDigitalInput ( DigitalIoPtr  input)

Creates a configuration for waiting for a digital input to go high or low.

Parameters
inputthe digital input on which to wait, not null.
value_to_wait_fortrue, if waiting for the input signal value/level to go HIGH, false otherwise (waiting for LOW signal value/level).
Returns
the configuration.
Exceptions
IllegalArgumentExceptionif input is an output (does not support reading of values). See IO#isInput().
void arcs::aubo_scope::WaitNode::setDoubleRegisterInput ( DoubleRegisterPtr  input)

Creates a configuration for waiting for a register to go past a float threshold.

Parameters
inputthe float register input on which to wait, not null.
compareOperatorthe operator to use when comparing register to value, not null. Available options are "less than" ({ <}) or "greater than" ({ >}).
value_to_wait_forthe float threshold to wait for.
Returns
the configuration.
Exceptions
IllegalArgumentExceptionif input is an output (does not support reading of values). See IO#isInput().
void arcs::aubo_scope::WaitNode::setExpressionInputConfig ( ExpressionPtr  expression)

Create a configuration for waiting for an expression to be evaluated to true.

Parameters
expressionthe expression to evaluate, not null.
Returns
the configuration.
void arcs::aubo_scope::WaitNode::setFloatValueToWaitFor ( float  value)
void arcs::aubo_scope::WaitNode::setModbusInput ( ModbusIoPtr  input)

Creates a configuration for waiting for a digital MODBUS input to go high or low.

Parameters
inputthe digital MODBUS input on which to wait, not null.
value_to_wait_fortrue, if waiting for the input signal value/level to go HIGH, false otherwise (waiting for LOW signal value/level).
Returns
the configuration.
Exceptions
IllegalArgumentExceptionif input is an output (does not support reading of values) or if output is not a digital output. See IO#isInput() and IO#getType().
void arcs::aubo_scope::WaitNode::setWaitTime ( double  time)

Friends And Related Function Documentation

friend class DataSwitch
friend

Definition at line 239 of file wait_node.h.

Member Data Documentation

void* arcs::aubo_scope::WaitNode::d_ { nullptr }
private

Definition at line 241 of file wait_node.h.


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