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

Provides a mechanism for building a set of one or more command headers. More...

#include <opendnp3/master/CommandSet.h>

Public Types

typedef std::vector< std::shared_ptr< ICommandHeader > > HeaderVector
 

Public Member Functions

 CommandSet ()=default
 Contrsuct an empty command set. More...
 
 CommandSet (CommandSet &&other)
 Construct a new command set and take ownership of the headers in argument. More...
 
 CommandSet (std::initializer_list< Indexed< AnalogOutputDouble64 >> items)
 Construct a command set from a list of AODouble64. More...
 
 CommandSet (std::initializer_list< Indexed< AnalogOutputFloat32 >> items)
 Construct a command set from a list of AOFloat32. More...
 
 CommandSet (std::initializer_list< Indexed< AnalogOutputInt16 >> items)
 Construct a command set from a list of AOInt16. More...
 
 CommandSet (std::initializer_list< Indexed< AnalogOutputInt32 >> items)
 Construct a command set from a list of AOInt32. More...
 
 CommandSet (std::initializer_list< Indexed< ControlRelayOutputBlock >> items)
 Construct a command set from a list of CROB. More...
 
 ~CommandSet ()
 
template<class T >
void Add (std::initializer_list< Indexed< T >> items)
 Convenience functions that can build an entire header in one call. More...
 
template<class T >
void Add (std::vector< Indexed< T >> items)
 Convenience functions that can build an entire header in one call. More...
 
template<class T >
ICommandCollection< T > & StartHeader ()
 Begin a header of the parameterized type. More...
 
template<>
ICommandCollection< ControlRelayOutputBlock > & StartHeader ()
 
template<>
ICommandCollection< AnalogOutputInt16 > & StartHeader ()
 
template<>
ICommandCollection< AnalogOutputInt32 > & StartHeader ()
 
template<>
ICommandCollection< AnalogOutputFloat32 > & StartHeader ()
 
template<>
ICommandCollection< AnalogOutputDouble64 > & StartHeader ()
 

Private Member Functions

 CommandSet (const CommandSet &)=delete
 
template<class T >
void AddAny (std::initializer_list< Indexed< T >> items)
 
CommandSetoperator= (const CommandSet &other)=delete
 
ICommandCollection< AnalogOutputDouble64 > & StartHeaderAODouble64 ()
 
ICommandCollection< AnalogOutputFloat32 > & StartHeaderAOFloat32 ()
 
ICommandCollection< AnalogOutputInt16 > & StartHeaderAOInt16 ()
 
ICommandCollection< AnalogOutputInt32 > & StartHeaderAOInt32 ()
 
ICommandCollection< ControlRelayOutputBlock > & StartHeaderCROB ()
 

Private Attributes

HeaderVector m_headers
 

Friends

class CommandSetOps
 

Detailed Description

Provides a mechanism for building a set of one or more command headers.

Definition at line 41 of file CommandSet.h.

Member Typedef Documentation

◆ HeaderVector

typedef std::vector<std::shared_ptr<ICommandHeader> > opendnp3::CommandSet::HeaderVector

Definition at line 47 of file CommandSet.h.

Constructor & Destructor Documentation

◆ CommandSet() [1/8]

opendnp3::CommandSet::CommandSet ( )
default

Contrsuct an empty command set.

◆ ~CommandSet()

opendnp3::CommandSet::~CommandSet ( )

◆ CommandSet() [2/8]

opendnp3::CommandSet::CommandSet ( CommandSet &&  other)

Construct a new command set and take ownership of the headers in argument.

◆ CommandSet() [3/8]

opendnp3::CommandSet::CommandSet ( std::initializer_list< Indexed< ControlRelayOutputBlock >>  items)

Construct a command set from a list of CROB.

◆ CommandSet() [4/8]

opendnp3::CommandSet::CommandSet ( std::initializer_list< Indexed< AnalogOutputInt16 >>  items)

Construct a command set from a list of AOInt16.

◆ CommandSet() [5/8]

opendnp3::CommandSet::CommandSet ( std::initializer_list< Indexed< AnalogOutputInt32 >>  items)

Construct a command set from a list of AOInt32.

◆ CommandSet() [6/8]

opendnp3::CommandSet::CommandSet ( std::initializer_list< Indexed< AnalogOutputFloat32 >>  items)

Construct a command set from a list of AOFloat32.

◆ CommandSet() [7/8]

opendnp3::CommandSet::CommandSet ( std::initializer_list< Indexed< AnalogOutputDouble64 >>  items)

Construct a command set from a list of AODouble64.

◆ CommandSet() [8/8]

opendnp3::CommandSet::CommandSet ( const CommandSet )
privatedelete

Member Function Documentation

◆ Add() [1/2]

template<class T >
void opendnp3::CommandSet::Add ( std::initializer_list< Indexed< T >>  items)
inline

Convenience functions that can build an entire header in one call.

Definition at line 74 of file CommandSet.h.

◆ Add() [2/2]

template<class T >
void opendnp3::CommandSet::Add ( std::vector< Indexed< T >>  items)
inline

Convenience functions that can build an entire header in one call.

Definition at line 87 of file CommandSet.h.

◆ AddAny()

template<class T >
void opendnp3::CommandSet::AddAny ( std::initializer_list< Indexed< T >>  items)
private

◆ operator=()

CommandSet& opendnp3::CommandSet::operator= ( const CommandSet other)
privatedelete

◆ StartHeader() [1/6]

template<class T >
ICommandCollection<T>& opendnp3::CommandSet::StartHeader ( )

Begin a header of the parameterized type.

◆ StartHeader() [2/6]

template<>
ICommandCollection<ControlRelayOutputBlock>& opendnp3::CommandSet::StartHeader ( )
inline

Definition at line 117 of file CommandSet.h.

References StartHeaderCROB().

◆ StartHeader() [3/6]

template<>
ICommandCollection<AnalogOutputInt16>& opendnp3::CommandSet::StartHeader ( )
inline

Definition at line 122 of file CommandSet.h.

References StartHeaderAOInt16().

◆ StartHeader() [4/6]

template<>
ICommandCollection<AnalogOutputInt32>& opendnp3::CommandSet::StartHeader ( )
inline

Definition at line 127 of file CommandSet.h.

References StartHeaderAOInt32().

◆ StartHeader() [5/6]

template<>
ICommandCollection<AnalogOutputFloat32>& opendnp3::CommandSet::StartHeader ( )
inline

Definition at line 132 of file CommandSet.h.

References StartHeaderAOFloat32().

◆ StartHeader() [6/6]

template<>
ICommandCollection<AnalogOutputDouble64>& opendnp3::CommandSet::StartHeader ( )
inline

Definition at line 137 of file CommandSet.h.

References StartHeaderAODouble64().

◆ StartHeaderAODouble64()

ICommandCollection<AnalogOutputDouble64>& opendnp3::CommandSet::StartHeaderAODouble64 ( )
private

Referenced by StartHeader().

◆ StartHeaderAOFloat32()

ICommandCollection<AnalogOutputFloat32>& opendnp3::CommandSet::StartHeaderAOFloat32 ( )
private

Referenced by StartHeader().

◆ StartHeaderAOInt16()

ICommandCollection<AnalogOutputInt16>& opendnp3::CommandSet::StartHeaderAOInt16 ( )
private

Referenced by StartHeader().

◆ StartHeaderAOInt32()

ICommandCollection<AnalogOutputInt32>& opendnp3::CommandSet::StartHeaderAOInt32 ( )
private

Referenced by StartHeader().

◆ StartHeaderCROB()

ICommandCollection<ControlRelayOutputBlock>& opendnp3::CommandSet::StartHeaderCROB ( )
private

Referenced by StartHeader().

Friends And Related Function Documentation

◆ CommandSetOps

friend class CommandSetOps
friend

Definition at line 44 of file CommandSet.h.

Member Data Documentation

◆ m_headers

HeaderVector opendnp3::CommandSet::m_headers
private

Definition at line 114 of file CommandSet.h.


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