opendnp3  3.1.0
Reference implementation of DNP3 (IEEE-1815)
opendnp3::ControlRelayOutputBlock Class Reference

Describes an incoming control request from the master. More...

#include <opendnp3/app/ControlRelayOutputBlock.h>

Public Member Functions

 ControlRelayOutputBlock (OperationType opType=OperationType::LATCH_ON, TripCloseCode tcc=TripCloseCode::NUL, bool clear=false, uint8_t count=1, uint32_t onTime=100, uint32_t offTime=100, CommandStatus status=CommandStatus::SUCCESS)
 
 ControlRelayOutputBlock (uint8_t rawCode, uint8_t count=1, uint32_t onTime=100, uint32_t offTime=100, CommandStatus status=CommandStatus::SUCCESS)
 
bool IsQUFlagSet () const
 
bool operator== (const ControlRelayOutputBlock &lhs) const
 
bool ValuesEqual (const ControlRelayOutputBlock &lhs) const
 

Public Attributes

bool clear
 
uint8_t count
 the number of times to repeat the operation More...
 
uint32_t offTimeMS
 the 'off' time for the pulse train More...
 
uint32_t onTimeMS
 the 'on' time for the pulse train More...
 
OperationType opType
 operation type More...
 
uint8_t rawCode
 The raw code in bytes. More...
 
CommandStatus status
 status of the resulting operation More...
 
TripCloseCode tcc
 

Detailed Description

Describes an incoming control request from the master.

It is the applications responsibility to handle the request and return an approiate status code. The PULSE_CLOSE and PULSE_TRIP OperationType require setting the mOnTimeMS, mOffTimeMS and mCount variables, otherwise just use the defaults.

Definition at line 37 of file ControlRelayOutputBlock.h.

Constructor & Destructor Documentation

◆ ControlRelayOutputBlock() [1/2]

opendnp3::ControlRelayOutputBlock::ControlRelayOutputBlock ( OperationType  opType = OperationType::LATCH_ON,
TripCloseCode  tcc = TripCloseCode::NUL,
bool  clear = false,
uint8_t  count = 1,
uint32_t  onTime = 100,
uint32_t  offTime = 100,
CommandStatus  status = CommandStatus::SUCCESS 
)

◆ ControlRelayOutputBlock() [2/2]

opendnp3::ControlRelayOutputBlock::ControlRelayOutputBlock ( uint8_t  rawCode,
uint8_t  count = 1,
uint32_t  onTime = 100,
uint32_t  offTime = 100,
CommandStatus  status = CommandStatus::SUCCESS 
)

Member Function Documentation

◆ IsQUFlagSet()

bool opendnp3::ControlRelayOutputBlock::IsQUFlagSet ( ) const
inline

Definition at line 73 of file ControlRelayOutputBlock.h.

References rawCode.

◆ operator==()

bool opendnp3::ControlRelayOutputBlock::operator== ( const ControlRelayOutputBlock lhs) const
inline

Definition at line 84 of file ControlRelayOutputBlock.h.

References status, and ValuesEqual().

◆ ValuesEqual()

bool opendnp3::ControlRelayOutputBlock::ValuesEqual ( const ControlRelayOutputBlock lhs) const
inline

Definition at line 78 of file ControlRelayOutputBlock.h.

References clear, count, offTimeMS, onTimeMS, opType, and tcc.

Referenced by operator==().

Member Data Documentation

◆ clear

bool opendnp3::ControlRelayOutputBlock::clear

Definition at line 61 of file ControlRelayOutputBlock.h.

Referenced by ValuesEqual().

◆ count

uint8_t opendnp3::ControlRelayOutputBlock::count

the number of times to repeat the operation

Definition at line 63 of file ControlRelayOutputBlock.h.

Referenced by ValuesEqual().

◆ offTimeMS

uint32_t opendnp3::ControlRelayOutputBlock::offTimeMS

the 'off' time for the pulse train

Definition at line 67 of file ControlRelayOutputBlock.h.

Referenced by ValuesEqual().

◆ onTimeMS

uint32_t opendnp3::ControlRelayOutputBlock::onTimeMS

the 'on' time for the pulse train

Definition at line 65 of file ControlRelayOutputBlock.h.

Referenced by ValuesEqual().

◆ opType

OperationType opendnp3::ControlRelayOutputBlock::opType

operation type

Definition at line 57 of file ControlRelayOutputBlock.h.

Referenced by ValuesEqual().

◆ rawCode

uint8_t opendnp3::ControlRelayOutputBlock::rawCode

The raw code in bytes.

Definition at line 71 of file ControlRelayOutputBlock.h.

Referenced by IsQUFlagSet().

◆ status

CommandStatus opendnp3::ControlRelayOutputBlock::status

status of the resulting operation

Definition at line 69 of file ControlRelayOutputBlock.h.

Referenced by operator==().

◆ tcc

TripCloseCode opendnp3::ControlRelayOutputBlock::tcc

Definition at line 59 of file ControlRelayOutputBlock.h.

Referenced by ValuesEqual().


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