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

Interface for all outstation application callback info except for control requests. More...

#include <opendnp3/outstation/IOutstationApplication.h>

Public Member Functions

virtual ~IOutstationApplication ()=default
 
virtual uint16_t ColdRestart ()
 The outstation should perform a complete restart. More...
 
virtual RestartMode ColdRestartSupport () const
 Query the outstation for the cold restart mode it supports. More...
 
virtual ApplicationIIN GetApplicationIIN () const
 Returns the application-controlled IIN field. More...
 
virtual void RecordClassAssignment (AssignClassType type, PointClass clazz, uint16_t start, uint16_t stop)
 Called if SupportsAssignClass returns true The type and range are pre-validated against the outstation's database and class assignments are automatically applied internally. More...
 
virtual bool SupportsAssignClass ()
 True if the outstation supports the assign class function code If this function returns false, the assign class callbacks will never be called and the outstation will return IIN 2.1 (FUNC_NOT_SUPPORTED) when it receives this function code. More...
 
virtual bool SupportsWriteAbsoluteTime ()
 Queries whether the the outstation supports absolute time writes If this function returns false, WriteAbsoluteTime will never be called and the outstation will return IIN 2.1 (FUNC_NOT_SUPPORTED) More...
 
virtual bool SupportsWriteTimeAndInterval ()
 Queries whether the outstation supports the writing of TimeAndInterval If this function returns false, WriteTimeAndInterval will never be called and the outstation will return IIN 2.1 (FUNC_NOT_SUPPORTED) when it receives this request. More...
 
virtual uint16_t WarmRestart ()
 The outstation should perform a partial restart of only the DNP3 application. More...
 
virtual RestartMode WarmRestartSupport () const
 Query the outstation for the warm restart mode it supports. More...
 
virtual bool WriteAbsoluteTime (const UTCTimestamp &timestamp)
 Write the time to outstation, only called if SupportsWriteAbsoluteTime return true. More...
 
virtual bool WriteTimeAndInterval (const ICollection< Indexed< TimeAndInterval >> &values)
 Write one or more TimeAndInterval values. More...
 
- Public Member Functions inherited from opendnp3::IDnpTimeSource
virtual DNPTime Now ()
 Returns a DNPTime of the current time. More...
 

Detailed Description

Interface for all outstation application callback info except for control requests.

Definition at line 42 of file IOutstationApplication.h.

Constructor & Destructor Documentation

◆ ~IOutstationApplication()

virtual opendnp3::IOutstationApplication::~IOutstationApplication ( )
virtualdefault

Member Function Documentation

◆ ColdRestart()

virtual uint16_t opendnp3::IOutstationApplication::ColdRestart ( )
inlinevirtual

The outstation should perform a complete restart.

See the DNP3 specification for a complete descripton of normal behavior

Returns
number of seconds or milliseconds until restart is complete. The value is interpreted based on the Restart Mode returned from ColdRestartSupport()

Reimplemented in opendnp3::DefaultOutstationApplication.

Definition at line 116 of file IOutstationApplication.h.

◆ ColdRestartSupport()

virtual RestartMode opendnp3::IOutstationApplication::ColdRestartSupport ( ) const
inlinevirtual

Query the outstation for the cold restart mode it supports.

Reimplemented in opendnp3::DefaultOutstationApplication.

Definition at line 101 of file IOutstationApplication.h.

References opendnp3::UNSUPPORTED.

◆ GetApplicationIIN()

virtual ApplicationIIN opendnp3::IOutstationApplication::GetApplicationIIN ( ) const
inlinevirtual

Returns the application-controlled IIN field.

Reimplemented in opendnp3::DefaultOutstationApplication.

Definition at line 95 of file IOutstationApplication.h.

◆ RecordClassAssignment()

virtual void opendnp3::IOutstationApplication::RecordClassAssignment ( AssignClassType  type,
PointClass  clazz,
uint16_t  start,
uint16_t  stop 
)
inlinevirtual

Called if SupportsAssignClass returns true The type and range are pre-validated against the outstation's database and class assignments are automatically applied internally.

This callback allows user code to persist the changes to non-volatile memory

Reimplemented in opendnp3::DefaultOutstationApplication.

Definition at line 92 of file IOutstationApplication.h.

◆ SupportsAssignClass()

virtual bool opendnp3::IOutstationApplication::SupportsAssignClass ( )
inlinevirtual

True if the outstation supports the assign class function code If this function returns false, the assign class callbacks will never be called and the outstation will return IIN 2.1 (FUNC_NOT_SUPPORTED) when it receives this function code.

Reimplemented in opendnp3::DefaultOutstationApplication.

Definition at line 83 of file IOutstationApplication.h.

◆ SupportsWriteAbsoluteTime()

virtual bool opendnp3::IOutstationApplication::SupportsWriteAbsoluteTime ( )
inlinevirtual

Queries whether the the outstation supports absolute time writes If this function returns false, WriteAbsoluteTime will never be called and the outstation will return IIN 2.1 (FUNC_NOT_SUPPORTED)

Reimplemented in opendnp3::DefaultOutstationApplication.

Definition at line 48 of file IOutstationApplication.h.

◆ SupportsWriteTimeAndInterval()

virtual bool opendnp3::IOutstationApplication::SupportsWriteTimeAndInterval ( )
inlinevirtual

Queries whether the outstation supports the writing of TimeAndInterval If this function returns false, WriteTimeAndInterval will never be called and the outstation will return IIN 2.1 (FUNC_NOT_SUPPORTED) when it receives this request.

Reimplemented in opendnp3::DefaultOutstationApplication.

Definition at line 65 of file IOutstationApplication.h.

◆ WarmRestart()

virtual uint16_t opendnp3::IOutstationApplication::WarmRestart ( )
inlinevirtual

The outstation should perform a partial restart of only the DNP3 application.

See the DNP3 specification for a complete descripton of normal behavior

Returns
number of seconds or milliseconds until restart is complete. The value is interpreted based on the Restart Mode returned from WarmRestartSupport()

Reimplemented in opendnp3::DefaultOutstationApplication.

Definition at line 125 of file IOutstationApplication.h.

◆ WarmRestartSupport()

virtual RestartMode opendnp3::IOutstationApplication::WarmRestartSupport ( ) const
inlinevirtual

Query the outstation for the warm restart mode it supports.

Reimplemented in opendnp3::DefaultOutstationApplication.

Definition at line 107 of file IOutstationApplication.h.

References opendnp3::UNSUPPORTED.

◆ WriteAbsoluteTime()

virtual bool opendnp3::IOutstationApplication::WriteAbsoluteTime ( const UTCTimestamp timestamp)
inlinevirtual

Write the time to outstation, only called if SupportsWriteAbsoluteTime return true.

Returns
boolean value indicating if the time value supplied was accepted. Returning false will cause the outstation to set IIN 2.3 (PARAM_ERROR) in its response. The outstation should clear its NEED_TIME field when handling this response

Reimplemented in opendnp3::DefaultOutstationApplication.

Definition at line 57 of file IOutstationApplication.h.

◆ WriteTimeAndInterval()

virtual bool opendnp3::IOutstationApplication::WriteTimeAndInterval ( const ICollection< Indexed< TimeAndInterval >> &  values)
inlinevirtual

Write one or more TimeAndInterval values.

Only called if SupportsWriteTimeAndInterval returns true. The outstation application code is reponsible for updating TimeAndInterval values in the database if this behavior is desired

Returns
boolean value indicating if the values supplied were accepted. Returning false will cause the outstation to set IIN 2.3 (PARAM_ERROR) in its response.

Reimplemented in opendnp3::DefaultOutstationApplication.

Definition at line 75 of file IOutstationApplication.h.


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