dnp3 (C++ API) 1.1.0
dnp3::Database Class Reference

Internal database access. More...

#include <dnp3.hpp>

Public Member Functions

 Database (Database &&other) noexcept
 Transfer ownership of the underlying C-type to this instance and invalidate the other instance. More...
 
bool add_binary_input (uint16_t index, EventClass point_class, const BinaryInputConfig &config)
 Add a new BinaryInput point. More...
 
bool remove_binary_input (uint16_t index)
 Remove a BinaryInput point. More...
 
bool update_binary_input (const BinaryInput &value, const UpdateOptions &options)
 Update a BinaryInput point. More...
 
BinaryInput get_binary_input (uint16_t index)
 Get a BinaryInput point. More...
 
bool add_double_bit_binary_input (uint16_t index, EventClass point_class, const DoubleBitBinaryInputConfig &config)
 Add a new Double-Bit Binary Input point. More...
 
bool remove_double_bit_binary_input (uint16_t index)
 Remove a Double-Bit Binary Input point. More...
 
bool update_double_bit_binary_input (const DoubleBitBinaryInput &value, const UpdateOptions &options)
 Update a Double-Bit Binary Input point. More...
 
DoubleBitBinaryInput get_double_bit_binary_input (uint16_t index)
 Get a Double-Bit Binary Input point. More...
 
bool add_binary_output_status (uint16_t index, EventClass point_class, const BinaryOutputStatusConfig &config)
 Add a new Binary Output Status point. More...
 
bool remove_binary_output_status (uint16_t index)
 Remove a Binary Output Status point. More...
 
bool update_binary_output_status (const BinaryOutputStatus &value, const UpdateOptions &options)
 Update a Binary Output Status point. More...
 
BinaryOutputStatus get_binary_output_status (uint16_t index)
 Get a Binary Output Status point. More...
 
bool add_counter (uint16_t index, EventClass point_class, const CounterConfig &config)
 Add a new Counter point. More...
 
bool remove_counter (uint16_t index)
 Remove a Counter point. More...
 
bool update_counter (const Counter &value, const UpdateOptions &options)
 Update a Counter point. More...
 
Counter get_counter (uint16_t index)
 Get a Counter point. More...
 
bool add_frozen_counter (uint16_t index, EventClass point_class, const FrozenCounterConfig &config)
 Add a new Frozen Counter point. More...
 
bool remove_frozen_counter (uint16_t index)
 Remove a Frozen Counter point. More...
 
bool update_frozen_counter (const FrozenCounter &value, const UpdateOptions &options)
 Update an Frozen Counter point. More...
 
FrozenCounter get_frozen_counter (uint16_t index)
 Get a Frozen Counter point. More...
 
bool add_analog_input (uint16_t index, EventClass point_class, const AnalogInputConfig &config)
 Add a new AnalogInput point. More...
 
bool remove_analog_input (uint16_t index)
 Remove an AnalogInput point. More...
 
bool update_analog_input (const AnalogInput &value, const UpdateOptions &options)
 Update a AnalogInput point. More...
 
AnalogInput get_analog_input (uint16_t index)
 Get a AnalogInput point. More...
 
bool add_analog_output_status (uint16_t index, EventClass point_class, const AnalogOutputStatusConfig &config)
 Add a new Analog Output Status point. More...
 
bool remove_analog_output_status (uint16_t index)
 Remove an Analog Output Status point. More...
 
bool update_analog_output_status (const AnalogOutputStatus &value, const UpdateOptions &options)
 Update a Analog Output Status point. More...
 
AnalogOutputStatus get_analog_output_status (uint16_t index)
 Get a Analog Output Status point. More...
 
bool add_octet_string (uint16_t index, EventClass point_class)
 Add a new Octet String point. More...
 
bool remove_octet_string (uint16_t index)
 Remove an Octet String point. More...
 
bool update_octet_string (uint16_t index, const std::vector< uint8_t > &value, const UpdateOptions &options)
 Update an Octet String point. More...
 

Friends

class CppDatabaseFriend
 

Detailed Description

Internal database access.

Warning
This object is only valid within a transaction

Constructor & Destructor Documentation

◆ Database()

dnp3::Database::Database ( Database &&  other)
inlinenoexcept

Transfer ownership of the underlying C-type to this instance and invalidate the other instance.

Note
the moved class will now throw an exception if any method is called
Parameters
otherClass from which ownership will be transfer to this instance

Member Function Documentation

◆ add_analog_input()

bool dnp3::Database::add_analog_input ( uint16_t  index,
EventClass  point_class,
const AnalogInputConfig config 
)

Add a new AnalogInput point.

Parameters
indexIndex of the point
point_classEvent class
configConfiguration
Returns
True if the point was successfully added, false otherwise

◆ add_analog_output_status()

bool dnp3::Database::add_analog_output_status ( uint16_t  index,
EventClass  point_class,
const AnalogOutputStatusConfig config 
)

Add a new Analog Output Status point.

Parameters
indexIndex of the point
point_classEvent class
configConfiguration
Returns
True if the point was successfully added, false otherwise

◆ add_binary_input()

bool dnp3::Database::add_binary_input ( uint16_t  index,
EventClass  point_class,
const BinaryInputConfig config 
)

Add a new BinaryInput point.

Parameters
indexIndex of the point
point_classEvent class
configConfiguration
Returns
True if the point was successfully added, false otherwise

◆ add_binary_output_status()

bool dnp3::Database::add_binary_output_status ( uint16_t  index,
EventClass  point_class,
const BinaryOutputStatusConfig config 
)

Add a new Binary Output Status point.

Parameters
indexIndex of the point
point_classEvent class
configConfiguration
Returns
True if the point was successfully added, false otherwise

◆ add_counter()

bool dnp3::Database::add_counter ( uint16_t  index,
EventClass  point_class,
const CounterConfig config 
)

Add a new Counter point.

Parameters
indexIndex of the point
point_classEvent class
configConfiguration
Returns
True if the point was successfully added, false otherwise

◆ add_double_bit_binary_input()

bool dnp3::Database::add_double_bit_binary_input ( uint16_t  index,
EventClass  point_class,
const DoubleBitBinaryInputConfig config 
)

Add a new Double-Bit Binary Input point.

Parameters
indexIndex of the point
point_classEvent class
configConfiguration
Returns
True if the point was successfully added, false otherwise

◆ add_frozen_counter()

bool dnp3::Database::add_frozen_counter ( uint16_t  index,
EventClass  point_class,
const FrozenCounterConfig config 
)

Add a new Frozen Counter point.

Parameters
indexIndex of the point
point_classEvent class
configConfiguration
Returns
True if the point was successfully added, false otherwise

◆ add_octet_string()

bool dnp3::Database::add_octet_string ( uint16_t  index,
EventClass  point_class 
)

Add a new Octet String point.

Parameters
indexIndex of the point
point_classEvent class
Returns
True if the point was successfully added, false otherwise

◆ get_analog_input()

AnalogInput dnp3::Database::get_analog_input ( uint16_t  index)

Get a AnalogInput point.

Parameters
indexIndex of the point to get
Returns
Analog point
Exceptions
ParamException

◆ get_analog_output_status()

AnalogOutputStatus dnp3::Database::get_analog_output_status ( uint16_t  index)

Get a Analog Output Status point.

Parameters
indexIndex of the point to get
Returns
Analog Output Status point
Exceptions
ParamException

◆ get_binary_input()

BinaryInput dnp3::Database::get_binary_input ( uint16_t  index)

Get a BinaryInput point.

Parameters
indexIndex of the point to get
Returns
Binary Input point
Exceptions
ParamException

◆ get_binary_output_status()

BinaryOutputStatus dnp3::Database::get_binary_output_status ( uint16_t  index)

Get a Binary Output Status point.

Parameters
indexIndex of the point to get
Returns
Binary Output Status point
Exceptions
ParamException

◆ get_counter()

Counter dnp3::Database::get_counter ( uint16_t  index)

Get a Counter point.

Parameters
indexIndex of the point to get
Returns
Counter point
Exceptions
ParamException

◆ get_double_bit_binary_input()

DoubleBitBinaryInput dnp3::Database::get_double_bit_binary_input ( uint16_t  index)

Get a Double-Bit Binary Input point.

Parameters
indexIndex of the point to get
Returns
Double-Bit Binary Input point
Exceptions
ParamException

◆ get_frozen_counter()

FrozenCounter dnp3::Database::get_frozen_counter ( uint16_t  index)

Get a Frozen Counter point.

Parameters
indexIndex of the point to get
Returns
Frozen Counter point
Exceptions
ParamException

◆ remove_analog_input()

bool dnp3::Database::remove_analog_input ( uint16_t  index)

Remove an AnalogInput point.

Parameters
indexIndex of the point
Returns
True if the point was successfully removed, false otherwise

◆ remove_analog_output_status()

bool dnp3::Database::remove_analog_output_status ( uint16_t  index)

Remove an Analog Output Status point.

Parameters
indexIndex of the point
Returns
True if the point was successfully removed, false otherwise

◆ remove_binary_input()

bool dnp3::Database::remove_binary_input ( uint16_t  index)

Remove a BinaryInput point.

Parameters
indexIndex of the point
Returns
True if the point was successfully removed, false otherwise

◆ remove_binary_output_status()

bool dnp3::Database::remove_binary_output_status ( uint16_t  index)

Remove a Binary Output Status point.

Parameters
indexIndex of the point
Returns
True if the point was successfully removed, false otherwise

◆ remove_counter()

bool dnp3::Database::remove_counter ( uint16_t  index)

Remove a Counter point.

Parameters
indexIndex of the point
Returns
True if the point was successfully removed, false otherwise

◆ remove_double_bit_binary_input()

bool dnp3::Database::remove_double_bit_binary_input ( uint16_t  index)

Remove a Double-Bit Binary Input point.

Parameters
indexIndex of the point
Returns
True if the point was successfully removed, false otherwise

◆ remove_frozen_counter()

bool dnp3::Database::remove_frozen_counter ( uint16_t  index)

Remove a Frozen Counter point.

Parameters
indexIndex of the point
Returns
True if the point was successfully removed, false otherwise

◆ remove_octet_string()

bool dnp3::Database::remove_octet_string ( uint16_t  index)

Remove an Octet String point.

Parameters
indexIndex of the point
Returns
True if the point was successfully removed, false otherwise

◆ update_analog_input()

bool dnp3::Database::update_analog_input ( const AnalogInput value,
const UpdateOptions options 
)

Update a AnalogInput point.

Parameters
valueNew value of the point
optionsUpdate options
Returns
True if the point was successfully updated, false otherwise

◆ update_analog_output_status()

bool dnp3::Database::update_analog_output_status ( const AnalogOutputStatus value,
const UpdateOptions options 
)

Update a Analog Output Status point.

Parameters
valueNew value of the point
optionsUpdate options
Returns
True if the point was successfully updated, false otherwise

◆ update_binary_input()

bool dnp3::Database::update_binary_input ( const BinaryInput value,
const UpdateOptions options 
)

Update a BinaryInput point.

Parameters
valueNew value of the point
optionsUpdate options
Returns
True if the point was successfully updated, false otherwise

◆ update_binary_output_status()

bool dnp3::Database::update_binary_output_status ( const BinaryOutputStatus value,
const UpdateOptions options 
)

Update a Binary Output Status point.

Parameters
valueNew value of the point
optionsUpdate options
Returns
True if the point was successfully updated, false otherwise

◆ update_counter()

bool dnp3::Database::update_counter ( const Counter value,
const UpdateOptions options 
)

Update a Counter point.

Parameters
valueNew value of the point
optionsUpdate options
Returns
True if the point was successfully updated, false otherwise

◆ update_double_bit_binary_input()

bool dnp3::Database::update_double_bit_binary_input ( const DoubleBitBinaryInput value,
const UpdateOptions options 
)

Update a Double-Bit Binary Input point.

Parameters
valueNew value of the point
optionsUpdate options
Returns
True if the point was successfully updated, false otherwise

◆ update_frozen_counter()

bool dnp3::Database::update_frozen_counter ( const FrozenCounter value,
const UpdateOptions options 
)

Update an Frozen Counter point.

Parameters
valueNew value of the point
optionsUpdate options
Returns
True if the point was successfully updated, false otherwise

◆ update_octet_string()

bool dnp3::Database::update_octet_string ( uint16_t  index,
const std::vector< uint8_t > &  value,
const UpdateOptions options 
)

Update an Octet String point.

Parameters
indexIndex of the octet string
valueNew value of the point
optionsUpdate options
Returns
True if the point was successfully updated, false otherwise

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