dnp3 (.NET API) 1.8.0-RC1
Loading...
Searching...
No Matches
dnp3.IOutstationApplication Interface Reference

Dynamic information required by the outstation from the user application More...

Public Member Functions

ushort GetProcessingDelayMs ()
 Returns the DELAY_MEASUREMENT delay More...
 
WriteTimeResult WriteAbsoluteTime (ulong time)
 Handle a write of the absolute time during time synchronization procedures. More...
 
ApplicationIin GetApplicationIin ()
 Returns the application-controlled IIN bits More...
 
RestartDelay ColdRestart ()
 Request that the outstation perform a cold restart More...
 
RestartDelay WarmRestart ()
 Request that the outstation perform a warm restart More...
 
FreezeResult FreezeCountersAll (FreezeType freezeType, DatabaseHandle databaseHandle)
 Freeze all the counters More...
 
FreezeResult FreezeCountersAllAtTime (DatabaseHandle databaseHandle, ulong time, uint interval)
 Freeze all the counters at a requested time and interval More...
 
FreezeResult FreezeCountersRange (ushort start, ushort stop, FreezeType freezeType, DatabaseHandle databaseHandle)
 Freeze a range of counters More...
 
FreezeResult FreezeCountersRangeAtTime (ushort start, ushort stop, DatabaseHandle databaseHandle, ulong time, uint interval)
 Freeze a range of counters at a requested time and interval More...
 
bool SupportWriteAnalogDeadBands ()
 Controls outstation support for writing group 34, analog input dead-bands More...
 
void BeginWriteAnalogDeadBands ()
 Called when the outstation begins processing a header to write analog dead-bands More...
 
void WriteAnalogDeadBand (ushort index, double deadBand)
 Called when the outstation writes the dead-band of an analog input More...
 
void EndWriteAnalogDeadBands ()
 Called when the outstation completes processing a header to write analog dead-bands More...
 
bool SupportAssignClass ()
 Controls outstation support for ASSIGN_CLASS requests, which change the class of the events that points generate More...
 
void BeginAssignClass ()
 Called before the point headers of an accepted ASSIGN_CLASS request are reported More...
 
void AssignClassAll (PointType pointType, EventClass pointClass)
 Called for a point header of an accepted ASSIGN_CLASS request that names every point of a type More...
 
void AssignClassRange (PointType pointType, ushort start, ushort stop, EventClass pointClass)
 Called for a point header of an accepted ASSIGN_CLASS request that names a range of points of a type More...
 
void EndAssignClass ()
 Called after the point headers of an accepted ASSIGN_CLASS request are reported More...
 
bool WriteStringAttr (byte set, byte variation, StringAttr attrType, string value)
 Write a string attribute. This method is only called if the corresponding attribute has been configured as writable More...
 
bool WriteFloatAttr (byte set, byte variation, FloatAttr attrType, float value)
 Write a 32-bit floating point attribute. This method is only called if the corresponding attribute has been configured as writable More...
 
bool WriteDoubleAttr (byte set, byte variation, FloatAttr attrType, double value)
 Write a 64-bit floating point attribute. This method is only called if the corresponding attribute has been configured as writable More...
 
bool WriteUintAttr (byte set, byte variation, UintAttr attrType, uint value)
 Write an unsigned integer attribute. This method is only called if the corresponding attribute has been configured as writable More...
 
bool WriteIntAttr (byte set, byte variation, IntAttr attrType, int value)
 Write a signed integer attribute. This method is only called if the corresponding attribute has been configured as writable More...
 
bool WriteOctetStringAttr (byte set, byte variation, OctetStringAttr attrType, System.Collections.Generic.ICollection< byte > value)
 Write an octet-string attribute. This method is only called if the corresponding attribute has been configured as writable More...
 
bool WriteBitStringAttr (byte set, byte variation, BitStringAttr attrType, System.Collections.Generic.ICollection< byte > value)
 Write a bit-string attribute. This method is only called if the corresponding attribute has been configured as writable More...
 
bool WriteTimeAttr (byte set, byte variation, TimeAttr attrType, ulong value)
 Write a DNP3 time attribute. This method is only called if the corresponding attribute has been configured as writable. More...
 
void BeginConfirm ()
 Called when a CONFIRM is received to a response or unsolicited response, but before any previously transmitted events are cleared from the buffer More...
 
void EventCleared (ulong id)
 Called when an event is cleared from the buffer due to master acknowledgement More...
 
void EndConfirm (BufferState state)
 Called when all relevant events have been cleared More...
 

Detailed Description

Dynamic information required by the outstation from the user application

Member Function Documentation

◆ AssignClassAll()

void dnp3.IOutstationApplication.AssignClassAll ( PointType  pointType,
EventClass  pointClass 
)

Called for a point header of an accepted ASSIGN_CLASS request that names every point of a type

Every point header is reported, even when headers name the same points, which are then in more than one call; the last header that names a point sets its class. The calls come after the whole request has been applied to the database, outside its lock, and report it: they can't reject it. This callback allows application code to persist the assignment; an outstation that doesn't reverts to its configured classes when it restarts. Replaying the calls in order reproduces the assignment.

Parameters
pointTypeType of the points
pointClassClass the header assigns the points' events to, or none

◆ AssignClassRange()

void dnp3.IOutstationApplication.AssignClassRange ( PointType  pointType,
ushort  start,
ushort  stop,
EventClass  pointClass 
)

Called for a point header of an accepted ASSIGN_CLASS request that names a range of points of a type

See IOutstationApplication.AssignClassAll.

Parameters
pointTypeType of the points
startFirst index of the range
stopLast index of the range, inclusive
pointClassClass the header assigns the points' events to, or none

◆ BeginAssignClass()

void dnp3.IOutstationApplication.BeginAssignClass ( )

Called before the point headers of an accepted ASSIGN_CLASS request are reported

◆ BeginConfirm()

void dnp3.IOutstationApplication.BeginConfirm ( )

Called when a CONFIRM is received to a response or unsolicited response, but before any previously transmitted events are cleared from the buffer

◆ BeginWriteAnalogDeadBands()

void dnp3.IOutstationApplication.BeginWriteAnalogDeadBands ( )

Called when the outstation begins processing a header to write analog dead-bands

◆ ColdRestart()

RestartDelay dnp3.IOutstationApplication.ColdRestart ( )

Request that the outstation perform a cold restart

The outstation will not automatically restart. It is the responsibility of the user application to handle this request and take the appropriate action.

Returns
The restart delay

◆ EndAssignClass()

void dnp3.IOutstationApplication.EndAssignClass ( )

Called after the point headers of an accepted ASSIGN_CLASS request are reported

Assignments accumulated in the calls before it can be persisted as a batch in this method.

◆ EndConfirm()

void dnp3.IOutstationApplication.EndConfirm ( BufferState  state)

Called when all relevant events have been cleared

Parameters
stateinformation about the post-CONFIRM state of the buffer

◆ EndWriteAnalogDeadBands()

void dnp3.IOutstationApplication.EndWriteAnalogDeadBands ( )

Called when the outstation completes processing a header to write analog dead-bands

Multiple dead-bands changes can be accumulated in calls to IOutstationApplication.WriteAnalogDeadBand and then be processed as a batch in this method.

◆ EventCleared()

void dnp3.IOutstationApplication.EventCleared ( ulong  id)

Called when an event is cleared from the buffer due to master acknowledgement

Parameters
idUnique identifier previously assigned to the event by the database in an update method

◆ FreezeCountersAll()

FreezeResult dnp3.IOutstationApplication.FreezeCountersAll ( FreezeType  freezeType,
DatabaseHandle  databaseHandle 
)

Freeze all the counters

Parameters
freezeTypeType of freeze operation
databaseHandleDatabase handle
Returns
Result of the freeze operation

◆ FreezeCountersAllAtTime()

FreezeResult dnp3.IOutstationApplication.FreezeCountersAllAtTime ( DatabaseHandle  databaseHandle,
ulong  time,
uint  interval 
)

Freeze all the counters at a requested time and interval

A time and interval of 0 freeze once immediately; a time with an interval of 0 freezes once at that time; an interval with a time of 0 freezes periodically, relative to the beginning of the current hour; and both freeze periodically, relative to the time.

Parameters
databaseHandleDatabase handle
time48-bit DNP3 timestamp in milliseconds since epoch UTC
intervalCount of milliseconds representing the interval between freezes relative to the timestamp
Returns
Result of the freeze operation

◆ FreezeCountersRange()

FreezeResult dnp3.IOutstationApplication.FreezeCountersRange ( ushort  start,
ushort  stop,
FreezeType  freezeType,
DatabaseHandle  databaseHandle 
)

Freeze a range of counters

Parameters
startStart index to freeze (inclusive)
stopStop index to freeze (inclusive)
freezeTypeType of freeze operation
databaseHandleDatabase handle
Returns
Result of the freeze operation

◆ FreezeCountersRangeAtTime()

FreezeResult dnp3.IOutstationApplication.FreezeCountersRangeAtTime ( ushort  start,
ushort  stop,
DatabaseHandle  databaseHandle,
ulong  time,
uint  interval 
)

Freeze a range of counters at a requested time and interval

A time and interval of 0 freeze once immediately; a time with an interval of 0 freezes once at that time; an interval with a time of 0 freezes periodically, relative to the beginning of the current hour; and both freeze periodically, relative to the time.

Parameters
startStart index to freeze (inclusive)
stopStop index to freeze (inclusive)
databaseHandleDatabase handle
time48-bit DNP3 timestamp in milliseconds since epoch UTC
intervalCount of milliseconds representing the interval between freezes relative to the timestamp
Returns
Result of the freeze operation

◆ GetApplicationIin()

ApplicationIin dnp3.IOutstationApplication.GetApplicationIin ( )

Returns the application-controlled IIN bits

Returns
Application IIN bits

◆ GetProcessingDelayMs()

ushort dnp3.IOutstationApplication.GetProcessingDelayMs ( )

Returns the DELAY_MEASUREMENT delay

The value returned by this method is used in conjunction with the DELAY_MEASUREMENT function code and returned in a g52v2 time delay object as part of a non-LAN time synchronization procedure.

It represents the processing delay from receiving the request to sending the response. This parameter should almost always use the default value of zero as only an RTOS or bare metal system would have access to this level of timing. Modern hardware can almost always respond in less than 1 millisecond anyway.

Returns
Processing delay, in milliseconds

◆ SupportAssignClass()

bool dnp3.IOutstationApplication.SupportAssignClass ( )

Controls outstation support for ASSIGN_CLASS requests, which change the class of the events that points generate

Returning false answers them with IIN2.0 NO_FUNC_CODE_SUPPORT.

The outstation applies an accepted request to its database itself, and only to events generated afterwards: buffered events keep their class. It then reports the request with a single call to IOutstationApplication.BeginAssignClass, a call to IOutstationApplication.AssignClassAll or IOutstationApplication.AssignClassRange for each point header in request order, and a single call to IOutstationApplication.EndAssignClass. A request with any error changes nothing and makes none of these calls.

Returns
True if the outstation should process ASSIGN_CLASS requests

◆ SupportWriteAnalogDeadBands()

bool dnp3.IOutstationApplication.SupportWriteAnalogDeadBands ( )

Controls outstation support for writing group 34, analog input dead-bands

Returning false, indicates that the writes to group34 should not be processed and requests to do so should be rejected with IIN2.1 OBJECT_UNKNOWN

Returning true will allow the request to process the actual values with a sequence of calls:

1) A single call to IOutstationApplication.BeginWriteAnalogDeadBands

2) Zero or more calls to IOutstationApplication.WriteAnalogDeadBand

3) A single call to IOutstationApplication.EndWriteAnalogDeadBands

Returns
True if the outstation should process the request

◆ WarmRestart()

RestartDelay dnp3.IOutstationApplication.WarmRestart ( )

Request that the outstation perform a warm restart

The outstation will not automatically restart. It is the responsibility of the user application to handle this request and take the appropriate action.

Returns
The restart delay

◆ WriteAbsoluteTime()

WriteTimeResult dnp3.IOutstationApplication.WriteAbsoluteTime ( ulong  time)

Handle a write of the absolute time during time synchronization procedures.

Parameters
timeReceived time in milliseconds since EPOCH (only 48 bits are used)
Returns
Result of the write time operation

◆ WriteAnalogDeadBand()

void dnp3.IOutstationApplication.WriteAnalogDeadBand ( ushort  index,
double  deadBand 
)

Called when the outstation writes the dead-band of an analog input

Called for each analog dead-band in the write request where an analog input is defined at the specified index.

The dead-band is automatically updated in the database. This callback allows application code to persist the modified value to non-volatile memory if desired

A negative dead-band written by the master is stored, and reported here, as 0

Parameters
indexIndex of the analog input
deadBandNew dead-band value

◆ WriteBitStringAttr()

bool dnp3.IOutstationApplication.WriteBitStringAttr ( byte  set,
byte  variation,
BitStringAttr  attrType,
System.Collections.Generic.ICollection< byte >  value 
)

Write a bit-string attribute. This method is only called if the corresponding attribute has been configured as writable

Parameters
setSet to which the attribute belongs
variationVariation of the attribute
attrTypeEnumeration describing which attribute it is, possibly unknown
valueIterator over bytes of the value
Returns
If true, the value will be modified in the in memory database and the outstation will return a successful response. If false, no change will be made and the outstation will return PARAM_ERROR

◆ WriteDoubleAttr()

bool dnp3.IOutstationApplication.WriteDoubleAttr ( byte  set,
byte  variation,
FloatAttr  attrType,
double  value 
)

Write a 64-bit floating point attribute. This method is only called if the corresponding attribute has been configured as writable

Parameters
setSet to which the attribute belongs
variationVariation of the attribute
attrTypeEnumeration describing which attribute it is, possibly unknown
valueValue of the attribute
Returns
If true, the value will be modified in the in memory database and the outstation will return a successful response. If false, no change will be made and the outstation will return PARAM_ERROR

◆ WriteFloatAttr()

bool dnp3.IOutstationApplication.WriteFloatAttr ( byte  set,
byte  variation,
FloatAttr  attrType,
float  value 
)

Write a 32-bit floating point attribute. This method is only called if the corresponding attribute has been configured as writable

Parameters
setSet to which the attribute belongs
variationVariation of the attribute
attrTypeEnumeration describing which attribute it is, possibly unknown
valueValue of the attribute
Returns
If true, the value will be modified in the in memory database and the outstation will return a successful response. If false, no change will be made and the outstation will return PARAM_ERROR

◆ WriteIntAttr()

bool dnp3.IOutstationApplication.WriteIntAttr ( byte  set,
byte  variation,
IntAttr  attrType,
int  value 
)

Write a signed integer attribute. This method is only called if the corresponding attribute has been configured as writable

Parameters
setSet to which the attribute belongs
variationVariation of the attribute
attrTypeEnumeration describing which attribute it is, possibly unknown
valueValue of the attribute
Returns
If true, the value will be modified in the in memory database and the outstation will return a successful response. If false, no change will be made and the outstation will return PARAM_ERROR

◆ WriteOctetStringAttr()

bool dnp3.IOutstationApplication.WriteOctetStringAttr ( byte  set,
byte  variation,
OctetStringAttr  attrType,
System.Collections.Generic.ICollection< byte >  value 
)

Write an octet-string attribute. This method is only called if the corresponding attribute has been configured as writable

Parameters
setSet to which the attribute belongs
variationVariation of the attribute
attrTypeEnumeration describing which attribute it is, possibly unknown
valueIterator over bytes of the value
Returns
If true, the value will be modified in the in memory database and the outstation will return a successful response. If false, no change will be made and the outstation will return PARAM_ERROR

◆ WriteStringAttr()

bool dnp3.IOutstationApplication.WriteStringAttr ( byte  set,
byte  variation,
StringAttr  attrType,
string  value 
)

Write a string attribute. This method is only called if the corresponding attribute has been configured as writable

Parameters
setSet to which the attribute belongs
variationVariation of the attribute
attrTypeEnumeration describing which attribute it is, possibly unknown
valueValue of the attribute
Returns
If true, the value will be modified in the in memory database and the outstation will return a successful response. If false, no change will be made and the outstation will return PARAM_ERROR

◆ WriteTimeAttr()

bool dnp3.IOutstationApplication.WriteTimeAttr ( byte  set,
byte  variation,
TimeAttr  attrType,
ulong  value 
)

Write a DNP3 time attribute. This method is only called if the corresponding attribute has been configured as writable.

Parameters
setSet to which the attribute belongs
variationVariation of the attribute
attrTypeEnumeration describing which attribute it is, possibly unknown
value48-bit DNP3 timestamp value
Returns
If true, the value will be modified in the in memory database and the outstation will return a successful response. If false, no change will be made and the outstation will return PARAM_ERROR

◆ WriteUintAttr()

bool dnp3.IOutstationApplication.WriteUintAttr ( byte  set,
byte  variation,
UintAttr  attrType,
uint  value 
)

Write an unsigned integer attribute. This method is only called if the corresponding attribute has been configured as writable

Parameters
setSet to which the attribute belongs
variationVariation of the attribute
attrTypeEnumeration describing which attribute it is, possibly unknown
valueValue of the attribute
Returns
If true, the value will be modified in the in memory database and the outstation will return a successful response. If false, no change will be made and the outstation will return PARAM_ERROR

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