dnp3 0.3.2
dnp3: ^0.3.2 copied to clipboard
DNP3 (IEEE 1815) master and outstation for Dart and Flutter on top of the stepfunc dnp3 Rust library, with zero-copy measurements and isolate-friendly handles.
Changelog #
All notable changes to this package are documented here. Versions follow
semantic versioning; while the version is 0.x, a minor version may
contain breaking changes, which are marked Breaking. New entries go under
## Unreleased (see CONTRIBUTING.md).
0.3.2 #
- Packaging only: the 0.3.1 upload was made before its changelog entry was finalized, so its
CHANGELOG.mdlisted the 0.3.1 changes under "Unreleased". No code changes.
0.3.1 #
- Docs: README restructured for pub.dev (installation from pub.dev, platform support matrix,
examples table); the detailed guides moved to
doc/master.md,doc/outstation.md,doc/architecture.mdanddoc/benchmarks.md. - New
example/example.dart: a self-contained outstation + master demo. - Documented the flyweight accessors (
valueAt,flagsAt,timeAt, ...) inherited by the measurement blocks;analysis_options.yamlsets the formatter page width to 110 sodart formatand pub.dev's analysis agree. - Community files:
CONTRIBUTING.md,CODE_OF_CONDUCT.md,SECURITY.md, issue and pull request templates.
0.3.0 #
MasterServerreleases the channel of an accepted connection when its session ends and calls the newMasterServerHandler.closed; a failingstartreleases the channel too.- Requests addressed to an object that was destroyed in Dart (e.g. controls for a server-hosted outstation) fall back to the native timeout behavior instead of being answered with success.
- Database batches are all-or-nothing: an invalid op no longer leaves the earlier ops applied.
- Values that would wrap on the wire (point indices, flags, CROB count / times, analog
output integers, dead bands, file parameters, processing / restart delays) throw
RangeError; the native side rejects out-of-range attribute integers and g34v1 dead bands instead of truncating them. - FREEZE_AT_TIME periods below 100 ms are raised to 100 ms.
Dnp3.closeIsolate/Dnp3.shutdownclose the event streams of the isolate's objects; later calls fail withShutdownException.MeasurementWorkeracknowledges a fragment even if the handler throws.- Breaking: internal helpers (
decodeResults,decodeAssociationMessage,decodeAttribute,encodeAttribute, theClientEventsdispatch methods) are no longer part of the public API. - A Dart restart callback that throws is answered as "not supported" (it was reported to the master as a restart in 0 ms); unknown application requests use the native fallback.
Database.getRangeon a destroyed outstation throwsInvalidHandleException.AssociationEvent.iin2keeps the IIN2 byte ofrejectedByIin2task failures.ReadHeader.rangeandDeadBandHeadervalidate their indices and values in Dart.OutstationInfo:requestControl,broadcastAction(newBroadcastActionenum),unsupportedFunction,unsolicited;sequenceofunexpectedConfirmevents is the confirm's sequence number (it returned the unsolicited flag).RestartRequestedis also emitted when a restart callback accepted the restart.Outstation.enable/disable/setDecodeLevel/setApplicationIin/setProcessingDelaythrowStateErrorafterdestroy(), likeMasterChannel.CommandSet.crob/analog(oneByteIndex:);CommandException.statusCodekeeps status codes thatCommandStatusdoes not know.- Removing a poll also removes it from its association's bookkeeping.
- Every public API member is documented;
public_member_api_docsis enforced. - The native library is built only as a dynamic library; ABI version 3
(
dnp3_association_set_time_offsetwas removed,Association.setTimeOffsetstays).
0.2.0 #
ConnectionPolicy: reconnect logic of TCP/TLS clients (masters and outstations) in Dart — endpoint, timeout, local endpoint and master address per attempt, delay after a disconnect — with a native fallback on timeout. Refused connections are now reported asconnectFailedevents.Outstation.tcpClient/tlsClient(masterAddress:).OutstationHandlers.onControlFragmentBegin / onControlFragmentEnd; in accept mode all mirrored control values of a request are written in a single transaction.TimeSource: system clock with offset, unavailable, or manually supplied time.FreezeMode.autohandles FREEZE_AT_TIME (once, periodic, periodic relative to the hour) with a native scheduler.- Measurement back-pressure:
maxInFlightFragments,Association.acknowledge, automatic acknowledgement inMeasurementWorker. Association.readFile(onOpened:)decides whether to continue once the size is known.Dnp3Exception.detailwith the structured library error. Breaking:TimeSyncException.detail(int) was renamed tovalue.- ABI version 2.
0.1.0 #
- Initial release on top of the
dnp3Rust crate 1.7.0. - Master: TCP / TLS / serial / UDP channels, master TCP server, associations, reads, polls, commands, time sync, restarts, dead bands, generic requests, device attributes, file transfer, association information.
- Outstation: TCP / TLS clients and servers, serial (one-shot and fault tolerant), UDP, complete database API with batched zero-copy transactions, native and Dart callback modes for controls and application requests, information callbacks.
- Zero-copy measurement delivery (external typed data, flyweight decoding), leaf FFI calls
reading Dart buffers in place, isolate-friendly handles,
MeasurementWorker. - Build hook compiling the native bridge for Android, iOS, macOS, Linux and Windows, or consuming prebuilt libraries.
- Benchmarks, integration tests, CI workflows (as a patch).