opendnp3
3.1.0
Reference implementation of DNP3 (IEEE-1815)
|
A singleton with default setting useful for examples. More...
#include <opendnp3/outstation/DefaultOutstationApplication.h>
Public Member Functions | |
DefaultOutstationApplication (TimeDuration timeSyncRefreshRate=TimeDuration::Minutes(1)) | |
virtual | ~DefaultOutstationApplication ()=default |
virtual uint16_t | ColdRestart () override |
The outstation should perform a complete restart. More... | |
virtual RestartMode | ColdRestartSupport () const override |
Query the outstation for the cold restart mode it supports. More... | |
virtual ApplicationIIN | GetApplicationIIN () const override |
Returns the application-controlled IIN field. More... | |
virtual DNPTime | Now () override |
Returns a DNPTime of the current time. More... | |
virtual void | RecordClassAssignment (AssignClassType type, PointClass clazz, uint16_t start, uint16_t stop) override |
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 () override |
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 () override |
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 () override |
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 () override |
The outstation should perform a partial restart of only the DNP3 application. More... | |
virtual RestartMode | WarmRestartSupport () const override |
Query the outstation for the warm restart mode it supports. More... | |
virtual bool | WriteAbsoluteTime (const UTCTimestamp ×tamp) override |
Write the time to outstation, only called if SupportsWriteAbsoluteTime return true. More... | |
virtual bool | WriteTimeAndInterval (const ICollection< Indexed< TimeAndInterval >> &values) override |
Write one or more TimeAndInterval values. More... | |
Public Member Functions inherited from opendnp3::IOutstationApplication | |
virtual | ~IOutstationApplication ()=default |
virtual void | OnConfirmProcessed (bool is_unsolicited, uint32_t num_class1, uint32_t num_class2, uint32_t num_class3) |
This method notifies that application code that an expected CONFIRM has been received, and events may have cleared from the event buffer. More... | |
Public Member Functions inherited from opendnp3::ILinkListener | |
virtual void | OnKeepAliveFailure () |
Called when a keep alive message (request link status) receives no response. More... | |
virtual void | OnKeepAliveInitiated () |
Called when the keep alive timer elapses. This doesn't denote a keep-alive failure, it's just a notification. More... | |
virtual void | OnKeepAliveSuccess () |
Called when a keep alive message receives a valid response. More... | |
virtual void | OnStateChange (LinkStatus value) |
Called when a the reset/unreset status of the link layer changes. More... | |
virtual void | OnUnknownDestinationAddress (uint16_t destination) |
Called when a link-layer frame is received from an unknown destination address. More... | |
virtual void | OnUnknownSourceAddress (uint16_t source) |
Called when a link-layer frame is received from an unknown source address. More... | |
Static Public Member Functions | |
static std::shared_ptr< IOutstationApplication > | Create (TimeDuration timeSyncRefreshRate=TimeDuration::Minutes(1)) |
Private Member Functions | |
bool | IsTimeValid () const |
bool | NeedsTime () const |
Private Attributes | |
UTCTimestamp | last_timestamp = UTCTimestamp() |
std::chrono::system_clock::time_point | last_update = std::chrono::system_clock::time_point(std::chrono::milliseconds(0)) |
TimeDuration | refresh_rate |
A singleton with default setting useful for examples.
Definition at line 35 of file DefaultOutstationApplication.h.
opendnp3::DefaultOutstationApplication::DefaultOutstationApplication | ( | TimeDuration | timeSyncRefreshRate = TimeDuration::Minutes(1) | ) |
|
virtualdefault |
|
inlineoverridevirtual |
The outstation should perform a complete restart.
See the DNP3 specification for a complete descripton of normal behavior
Reimplemented from opendnp3::IOutstationApplication.
Definition at line 83 of file DefaultOutstationApplication.h.
|
inlineoverridevirtual |
Query the outstation for the cold restart mode it supports.
Reimplemented from opendnp3::IOutstationApplication.
Definition at line 75 of file DefaultOutstationApplication.h.
References opendnp3::UNSUPPORTED.
|
inlinestatic |
Definition at line 38 of file DefaultOutstationApplication.h.
|
overridevirtual |
Returns the application-controlled IIN field.
Reimplemented from opendnp3::IOutstationApplication.
|
private |
|
private |
|
overridevirtual |
Returns a DNPTime of the current time.
This value is used when freezing counters.
Reimplemented from opendnp3::IDnpTimeSource.
|
inlineoverridevirtual |
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 from opendnp3::IOutstationApplication.
Definition at line 69 of file DefaultOutstationApplication.h.
|
inlineoverridevirtual |
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 from opendnp3::IOutstationApplication.
Definition at line 65 of file DefaultOutstationApplication.h.
|
inlineoverridevirtual |
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 from opendnp3::IOutstationApplication.
Definition at line 50 of file DefaultOutstationApplication.h.
|
inlineoverridevirtual |
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 from opendnp3::IOutstationApplication.
Definition at line 56 of file DefaultOutstationApplication.h.
|
inlineoverridevirtual |
The outstation should perform a partial restart of only the DNP3 application.
See the DNP3 specification for a complete descripton of normal behavior
Reimplemented from opendnp3::IOutstationApplication.
Definition at line 87 of file DefaultOutstationApplication.h.
|
inlineoverridevirtual |
Query the outstation for the warm restart mode it supports.
Reimplemented from opendnp3::IOutstationApplication.
Definition at line 79 of file DefaultOutstationApplication.h.
References opendnp3::UNSUPPORTED.
|
overridevirtual |
Write the time to outstation, only called if SupportsWriteAbsoluteTime return true.
Reimplemented from opendnp3::IOutstationApplication.
|
inlineoverridevirtual |
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
Reimplemented from opendnp3::IOutstationApplication.
Definition at line 60 of file DefaultOutstationApplication.h.
|
private |
Definition at line 97 of file DefaultOutstationApplication.h.
|
private |
Definition at line 99 of file DefaultOutstationApplication.h.
|
private |
Definition at line 96 of file DefaultOutstationApplication.h.