opendnp3  3.0.0
Reference implementation of DNP3 (IEEE-1815)
opendnp3::IINField Class Reference

DNP3 two-byte IIN field. More...

#include <opendnp3/app/IINField.h>

Public Member Functions

 IINField ()
 
 IINField (IINBit bit)
 
 IINField (uint8_t aLSB, uint8_t aMSB)
 
bool Any () const
 
void Clear ()
 
void ClearBit (IINBit bit)
 
bool HasRequestError () const
 
bool IsClear (IINBit bit) const
 
bool IsSet (IINBit bit) const
 
IINField operator& (const IINField &aIIN) const
 
IINFieldoperator&= (const IINField &aIIN)
 
bool operator== (const IINField &aRHS) const
 
IINField operator| (const IINField &aIIN) const
 
IINFieldoperator|= (const IINField &aIIN)
 
IINField operator~ () const
 
void SetBit (IINBit bit)
 
void SetBitToValue (IINBit bit, bool value)
 

Static Public Member Functions

static IINField Empty ()
 

Public Attributes

uint8_t LSB
 
uint8_t MSB
 

Private Types

enum  LSBMask : uint8_t {
  LSBMask::BROADCAST = 0x01, LSBMask::CLASS1_EVENTS = 0x02, LSBMask::CLASS2_EVENTS = 0x04, LSBMask::CLASS3_EVENTS = 0x08,
  LSBMask::NEED_TIME = 0x10, LSBMask::LOCAL_CONTROL = 0x20, LSBMask::DEVICE_TROUBLE = 0x40, LSBMask::DEVICE_RESTART = 0x80
}
 
enum  MSBMask : uint8_t {
  MSBMask::FUNC_NOT_SUPPORTED = 0x01, MSBMask::OBJECT_UNKNOWN = 0x02, MSBMask::PARAM_ERROR = 0x04, MSBMask::EVENT_BUFFER_OVERFLOW = 0x08,
  MSBMask::ALREADY_EXECUTING = 0x10, MSBMask::CONFIG_CORRUPT = 0x20, MSBMask::RESERVED1 = 0x40, MSBMask::RESERVED2 = 0x80,
  MSBMask::REQUEST_ERROR_MASK = FUNC_NOT_SUPPORTED | OBJECT_UNKNOWN | PARAM_ERROR
}
 

Private Member Functions

void Clear (LSBMask bit)
 
void Clear (MSBMask bit)
 
bool Get (LSBMask bit) const
 
bool Get (MSBMask bit) const
 
void Set (LSBMask bit)
 
void Set (MSBMask bit)
 

Static Private Attributes

static const uint8_t REQUEST_ERROR_MASK
 

Detailed Description

DNP3 two-byte IIN field.

Definition at line 50 of file IINField.h.

Member Enumeration Documentation

◆ LSBMask

enum opendnp3::IINField::LSBMask : uint8_t
strongprivate
Enumerator
BROADCAST 
CLASS1_EVENTS 
CLASS2_EVENTS 
CLASS3_EVENTS 
NEED_TIME 
LOCAL_CONTROL 
DEVICE_TROUBLE 
DEVICE_RESTART 

Definition at line 54 of file IINField.h.

◆ MSBMask

enum opendnp3::IINField::MSBMask : uint8_t
strongprivate
Enumerator
FUNC_NOT_SUPPORTED 
OBJECT_UNKNOWN 
PARAM_ERROR 
EVENT_BUFFER_OVERFLOW 
ALREADY_EXECUTING 
CONFIG_CORRUPT 
RESERVED1 
RESERVED2 
REQUEST_ERROR_MASK 

Definition at line 66 of file IINField.h.

Constructor & Destructor Documentation

◆ IINField() [1/3]

opendnp3::IINField::IINField ( IINBit  bit)
inline

Definition at line 87 of file IINField.h.

References SetBit().

◆ IINField() [2/3]

opendnp3::IINField::IINField ( uint8_t  aLSB,
uint8_t  aMSB 
)
inline

Definition at line 92 of file IINField.h.

◆ IINField() [3/3]

opendnp3::IINField::IINField ( )
inline

Definition at line 94 of file IINField.h.

Referenced by Empty(), operator&(), operator|(), and operator~().

Member Function Documentation

◆ Any()

bool opendnp3::IINField::Any ( ) const
inline

Definition at line 110 of file IINField.h.

References LSB, and MSB.

◆ Clear() [1/3]

void opendnp3::IINField::Clear ( )
inline

Definition at line 115 of file IINField.h.

References LSB, and MSB.

◆ Clear() [2/3]

void opendnp3::IINField::Clear ( LSBMask  bit)
inlineprivate

Definition at line 179 of file IINField.h.

References LSB.

◆ Clear() [3/3]

void opendnp3::IINField::Clear ( MSBMask  bit)
inlineprivate

Definition at line 183 of file IINField.h.

References MSB.

◆ ClearBit()

void opendnp3::IINField::ClearBit ( IINBit  bit)

◆ Empty()

static IINField opendnp3::IINField::Empty ( )
inlinestatic

Definition at line 82 of file IINField.h.

References IINField().

◆ Get() [1/2]

bool opendnp3::IINField::Get ( LSBMask  bit) const
inlineprivate

Definition at line 160 of file IINField.h.

References LSB.

Referenced by HasRequestError().

◆ Get() [2/2]

bool opendnp3::IINField::Get ( MSBMask  bit) const
inlineprivate

Definition at line 165 of file IINField.h.

References MSB.

◆ HasRequestError()

bool opendnp3::IINField::HasRequestError ( ) const
inline

Definition at line 120 of file IINField.h.

References Get(), and REQUEST_ERROR_MASK.

◆ IsClear()

bool opendnp3::IINField::IsClear ( IINBit  bit) const
inline

Definition at line 98 of file IINField.h.

References IsSet().

◆ IsSet()

bool opendnp3::IINField::IsSet ( IINBit  bit) const

Referenced by IsClear().

◆ operator&()

IINField opendnp3::IINField::operator& ( const IINField aIIN) const
inline

Definition at line 137 of file IINField.h.

References IINField(), LSB, and MSB.

◆ operator&=()

IINField& opendnp3::IINField::operator&= ( const IINField aIIN)
inline

Definition at line 142 of file IINField.h.

References LSB, and MSB.

◆ operator==()

bool opendnp3::IINField::operator== ( const IINField aRHS) const

◆ operator|()

IINField opendnp3::IINField::operator| ( const IINField aIIN) const
inline

Definition at line 125 of file IINField.h.

References IINField(), LSB, and MSB.

◆ operator|=()

IINField& opendnp3::IINField::operator|= ( const IINField aIIN)
inline

Definition at line 130 of file IINField.h.

References LSB, and MSB.

◆ operator~()

IINField opendnp3::IINField::operator~ ( ) const
inline

Definition at line 149 of file IINField.h.

References IINField(), LSB, and MSB.

◆ Set() [1/2]

void opendnp3::IINField::Set ( LSBMask  bit)
inlineprivate

Definition at line 170 of file IINField.h.

References LSB.

◆ Set() [2/2]

void opendnp3::IINField::Set ( MSBMask  bit)
inlineprivate

Definition at line 174 of file IINField.h.

References MSB.

◆ SetBit()

void opendnp3::IINField::SetBit ( IINBit  bit)

Referenced by IINField().

◆ SetBitToValue()

void opendnp3::IINField::SetBitToValue ( IINBit  bit,
bool  value 
)

Member Data Documentation

◆ LSB

uint8_t opendnp3::IINField::LSB

Definition at line 154 of file IINField.h.

Referenced by Any(), Clear(), Get(), operator&(), operator&=(), operator|(), operator|=(), operator~(), and Set().

◆ MSB

uint8_t opendnp3::IINField::MSB

Definition at line 155 of file IINField.h.

Referenced by Any(), Clear(), Get(), operator&(), operator&=(), operator|(), operator|=(), operator~(), and Set().

◆ REQUEST_ERROR_MASK

const uint8_t opendnp3::IINField::REQUEST_ERROR_MASK
staticprivate

Definition at line 158 of file IINField.h.


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