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

Mock ICommandHandler used for examples and demos. More...

#include <opendnp3/outstation/SimpleCommandHandler.h>

Public Member Functions

 SimpleCommandHandler (CommandStatus status)
 
virtual void Begin () override
 called when a command APDU begins processing More...
 
virtual void End () override
 called when a command APDU ends processing More...
 
CommandStatus Operate (const AnalogOutputDouble64 &command, uint16_t index, IUpdateHandler &handler, OperateType opType) override
 Operate a double precision, floating point analog output - group 41 variation 4. More...
 
CommandStatus Operate (const AnalogOutputFloat32 &command, uint16_t index, IUpdateHandler &handler, OperateType opType) override
 Operate a single precision, floating point analog output - group 41 variation 3. More...
 
CommandStatus Operate (const AnalogOutputInt16 &command, uint16_t index, IUpdateHandler &handler, OperateType opType) override
 Ask if the application supports a 16 bit analog output - group 41 variation 2. More...
 
CommandStatus Operate (const AnalogOutputInt32 &command, uint16_t index, IUpdateHandler &handler, OperateType opType) override
 Operate a 32 bit analog output - group 41 variation 1. More...
 
CommandStatus Operate (const ControlRelayOutputBlock &command, uint16_t index, IUpdateHandler &handler, OperateType opType) override
 Operate a ControlRelayOutputBlock - group 12 variation 1. More...
 
CommandStatus Select (const AnalogOutputDouble64 &command, uint16_t index) override
 Ask if the application supports a double precision, floating point analog output - group 41 variation 4. More...
 
CommandStatus Select (const AnalogOutputFloat32 &command, uint16_t index) override
 Ask if the application supports a single precision, floating point analog output - group 41 variation 3. More...
 
CommandStatus Select (const AnalogOutputInt16 &command, uint16_t index) override
 Ask if the application supports a 16 bit analog output - group 41 variation 2. More...
 
CommandStatus Select (const AnalogOutputInt32 &command, uint16_t index) override
 Ask if the application supports a 32 bit analog output - group 41 variation 1. More...
 
CommandStatus Select (const ControlRelayOutputBlock &command, uint16_t index) override
 Ask if the application supports a ControlRelayOutputBlock - group 12 variation 1. More...
 
- Public Member Functions inherited from opendnp3::ICommandHandler
virtual ~ICommandHandler ()=default
 

Public Attributes

uint32_t numEnd
 
uint32_t numOperate
 
uint32_t numSelect
 
uint32_t numStart
 

Protected Member Functions

virtual void DoOperate (const AnalogOutputDouble64 &command, uint16_t index, OperateType opType)
 
virtual void DoOperate (const AnalogOutputFloat32 &command, uint16_t index, OperateType opType)
 
virtual void DoOperate (const AnalogOutputInt16 &command, uint16_t index, OperateType opType)
 
virtual void DoOperate (const AnalogOutputInt32 &command, uint16_t index, OperateType opType)
 
virtual void DoOperate (const ControlRelayOutputBlock &command, uint16_t index, OperateType opType)
 
virtual void DoSelect (const AnalogOutputDouble64 &command, uint16_t index)
 
virtual void DoSelect (const AnalogOutputFloat32 &command, uint16_t index)
 
virtual void DoSelect (const AnalogOutputInt16 &command, uint16_t index)
 
virtual void DoSelect (const AnalogOutputInt32 &command, uint16_t index)
 
virtual void DoSelect (const ControlRelayOutputBlock &command, uint16_t index)
 

Protected Attributes

CommandStatus status
 

Detailed Description

Mock ICommandHandler used for examples and demos.

Definition at line 33 of file SimpleCommandHandler.h.

Constructor & Destructor Documentation

◆ SimpleCommandHandler()

opendnp3::SimpleCommandHandler::SimpleCommandHandler ( CommandStatus  status)
Parameters
statusThe status value to return in response to all commands

Member Function Documentation

◆ Begin()

virtual void opendnp3::SimpleCommandHandler::Begin ( )
overridevirtual

called when a command APDU begins processing

Implements opendnp3::ICommandHandler.

◆ DoOperate() [1/5]

virtual void opendnp3::SimpleCommandHandler::DoOperate ( const AnalogOutputDouble64 command,
uint16_t  index,
OperateType  opType 
)
inlineprotectedvirtual

Definition at line 88 of file SimpleCommandHandler.h.

◆ DoOperate() [2/5]

virtual void opendnp3::SimpleCommandHandler::DoOperate ( const AnalogOutputFloat32 command,
uint16_t  index,
OperateType  opType 
)
inlineprotectedvirtual

Definition at line 85 of file SimpleCommandHandler.h.

◆ DoOperate() [3/5]

virtual void opendnp3::SimpleCommandHandler::DoOperate ( const AnalogOutputInt16 command,
uint16_t  index,
OperateType  opType 
)
inlineprotectedvirtual

Definition at line 79 of file SimpleCommandHandler.h.

◆ DoOperate() [4/5]

virtual void opendnp3::SimpleCommandHandler::DoOperate ( const AnalogOutputInt32 command,
uint16_t  index,
OperateType  opType 
)
inlineprotectedvirtual

Definition at line 82 of file SimpleCommandHandler.h.

◆ DoOperate() [5/5]

virtual void opendnp3::SimpleCommandHandler::DoOperate ( const ControlRelayOutputBlock command,
uint16_t  index,
OperateType  opType 
)
inlineprotectedvirtual

Definition at line 76 of file SimpleCommandHandler.h.

◆ DoSelect() [1/5]

virtual void opendnp3::SimpleCommandHandler::DoSelect ( const AnalogOutputDouble64 command,
uint16_t  index 
)
inlineprotectedvirtual

Definition at line 87 of file SimpleCommandHandler.h.

◆ DoSelect() [2/5]

virtual void opendnp3::SimpleCommandHandler::DoSelect ( const AnalogOutputFloat32 command,
uint16_t  index 
)
inlineprotectedvirtual

Definition at line 84 of file SimpleCommandHandler.h.

◆ DoSelect() [3/5]

virtual void opendnp3::SimpleCommandHandler::DoSelect ( const AnalogOutputInt16 command,
uint16_t  index 
)
inlineprotectedvirtual

Definition at line 78 of file SimpleCommandHandler.h.

◆ DoSelect() [4/5]

virtual void opendnp3::SimpleCommandHandler::DoSelect ( const AnalogOutputInt32 command,
uint16_t  index 
)
inlineprotectedvirtual

Definition at line 81 of file SimpleCommandHandler.h.

◆ DoSelect() [5/5]

virtual void opendnp3::SimpleCommandHandler::DoSelect ( const ControlRelayOutputBlock command,
uint16_t  index 
)
inlineprotectedvirtual

Definition at line 75 of file SimpleCommandHandler.h.

◆ End()

virtual void opendnp3::SimpleCommandHandler::End ( )
overridevirtual

called when a command APDU ends processing

Implements opendnp3::ICommandHandler.

◆ Operate() [1/5]

CommandStatus opendnp3::SimpleCommandHandler::Operate ( const AnalogOutputDouble64 command,
uint16_t  index,
IUpdateHandler handler,
OperateType  opType 
)
overridevirtual

Operate a double precision, floating point analog output - group 41 variation 4.

Parameters
commandcommand to operate
indexindex of the command
handlerinterface for loading measurement changes
opTypethe operation type the outstation received.
Returns
result of request

Implements opendnp3::ICommandHandler.

◆ Operate() [2/5]

CommandStatus opendnp3::SimpleCommandHandler::Operate ( const AnalogOutputFloat32 command,
uint16_t  index,
IUpdateHandler handler,
OperateType  opType 
)
overridevirtual

Operate a single precision, floating point analog output - group 41 variation 3.

Parameters
commandcommand to operate
indexindex of the command
handlerinterface for loading measurement changes
opTypethe operation type the outstation received.
Returns
result of request

Implements opendnp3::ICommandHandler.

◆ Operate() [3/5]

CommandStatus opendnp3::SimpleCommandHandler::Operate ( const AnalogOutputInt16 command,
uint16_t  index,
IUpdateHandler handler,
OperateType  opType 
)
overridevirtual

Ask if the application supports a 16 bit analog output - group 41 variation 2.

Parameters
commandcommand to operate
indexindex of the command
handlerinterface for loading measurement changes
opTypethe operation type the outstation received.
Returns
result of request

Implements opendnp3::ICommandHandler.

◆ Operate() [4/5]

CommandStatus opendnp3::SimpleCommandHandler::Operate ( const AnalogOutputInt32 command,
uint16_t  index,
IUpdateHandler handler,
OperateType  opType 
)
overridevirtual

Operate a 32 bit analog output - group 41 variation 1.

Parameters
commandcommand to operate
indexindex of the command
handlerinterface for loading measurement changes
opTypethe operation type the outstation received.
Returns
result of request

Implements opendnp3::ICommandHandler.

◆ Operate() [5/5]

CommandStatus opendnp3::SimpleCommandHandler::Operate ( const ControlRelayOutputBlock command,
uint16_t  index,
IUpdateHandler handler,
OperateType  opType 
)
overridevirtual

Operate a ControlRelayOutputBlock - group 12 variation 1.

Parameters
commandcommand to operate
indexindex of the command
handlerinterface for loading measurement changes
opTypethe operation type the outstation received.
Returns
result of request

Implements opendnp3::ICommandHandler.

◆ Select() [1/5]

CommandStatus opendnp3::SimpleCommandHandler::Select ( const AnalogOutputDouble64 command,
uint16_t  index 
)
overridevirtual

Ask if the application supports a double precision, floating point analog output - group 41 variation 4.

Parameters
commandcommand to operate
indexindex of the command
Returns
result of request

Implements opendnp3::ICommandHandler.

◆ Select() [2/5]

CommandStatus opendnp3::SimpleCommandHandler::Select ( const AnalogOutputFloat32 command,
uint16_t  index 
)
overridevirtual

Ask if the application supports a single precision, floating point analog output - group 41 variation 3.

Parameters
commandcommand to operate
indexindex of the command
Returns
result of request

Implements opendnp3::ICommandHandler.

◆ Select() [3/5]

CommandStatus opendnp3::SimpleCommandHandler::Select ( const AnalogOutputInt16 command,
uint16_t  index 
)
overridevirtual

Ask if the application supports a 16 bit analog output - group 41 variation 2.

Parameters
commandcommand to operate
indexindex of the command
Returns
result of request

Implements opendnp3::ICommandHandler.

◆ Select() [4/5]

CommandStatus opendnp3::SimpleCommandHandler::Select ( const AnalogOutputInt32 command,
uint16_t  index 
)
overridevirtual

Ask if the application supports a 32 bit analog output - group 41 variation 1.

Parameters
commandcommand to operate
indexindex of the command
Returns
result of request

Implements opendnp3::ICommandHandler.

◆ Select() [5/5]

CommandStatus opendnp3::SimpleCommandHandler::Select ( const ControlRelayOutputBlock command,
uint16_t  index 
)
overridevirtual

Ask if the application supports a ControlRelayOutputBlock - group 12 variation 1.

Parameters
commandcommand to operate
indexindex of the command
Returns
result of request

Implements opendnp3::ICommandHandler.

Member Data Documentation

◆ numEnd

uint32_t opendnp3::SimpleCommandHandler::numEnd

Definition at line 96 of file SimpleCommandHandler.h.

◆ numOperate

uint32_t opendnp3::SimpleCommandHandler::numOperate

Definition at line 93 of file SimpleCommandHandler.h.

◆ numSelect

uint32_t opendnp3::SimpleCommandHandler::numSelect

Definition at line 94 of file SimpleCommandHandler.h.

◆ numStart

uint32_t opendnp3::SimpleCommandHandler::numStart

Definition at line 95 of file SimpleCommandHandler.h.

◆ status

CommandStatus opendnp3::SimpleCommandHandler::status
protected

Definition at line 90 of file SimpleCommandHandler.h.


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