├── config ├── src-footer.inc ├── doxygen_files │ ├── img │ │ └── opendnp3.png │ └── mainpage.dox ├── astyle.cfg ├── src-header.inc ├── APACHE_LICENSE_HEADER └── gecapache.licenseheader ├── cpp ├── tests │ ├── fuzz │ │ ├── corpus │ │ │ ├── d41d8cd98f00b204e9800998ecf8427e.dnp │ │ │ ├── 0239a8b5d819fcd422d724a846672122.dnp │ │ │ ├── 02ec5b15b10b5bc33b47047185a1fee5.dnp │ │ │ ├── 062f20e1414534b1afdb0ef65d938c6e.dnp │ │ │ ├── 0842344241561c8b959fa659a3f7e13f.dnp │ │ │ ├── 0b3902307f244d598088a0ba958b3643.dnp │ │ │ ├── 0bb101d1ea68aa217d0a97d8f9017426.dnp │ │ │ ├── 0c06a7277af045380e9da62f9022bd2f.dnp │ │ │ ├── 1254cb1ba7132cf79405ac0065340893.dnp │ │ │ ├── 16a3acecf8bb9902fbbe10f1dc0c69f2.dnp │ │ │ ├── 179973c6f40d1ef8c9bde51969b1497c.dnp │ │ │ ├── 1bbb5c12693a431dc83ad997719a4fd1.dnp │ │ │ ├── 1e513cf5c9512c6f0bd34045393fdbc0.dnp │ │ │ ├── 215977058b012ff1c4755c14fb9f46b2.dnp │ │ │ ├── 2515775e994f5970854c037f476eb3f3.dnp │ │ │ ├── 27ca51d0c5baac3146d5196252f769d4.dnp │ │ │ ├── 28de1bad04f60d0b47afd3359bae9c90.dnp │ │ │ ├── 2b8343b17b14d4781fa4d6c8c00c370e.dnp │ │ │ ├── 2bd4a20745092c25d27c38f2ab32214f.dnp │ │ │ ├── 331df8d14c86f7fd692b6694504f06e9.dnp │ │ │ ├── 333ebd68f680b180c4124cefef59e40e.dnp │ │ │ ├── 3382a083102cee1b8dd6e81fa8c14856.dnp │ │ │ ├── 347309a965294f3861282ec2e6394e75.dnp │ │ │ ├── 34f7583aecb6349acb96f7bc044c3132.dnp │ │ │ ├── 367983e8f7861ec35baf9f5bad560aa9.dnp │ │ │ ├── 368880b945a62887d0a160d6c799264b.dnp │ │ │ ├── 37f7e45f6dc00f58b15c7b4dfd1aaaae.dnp │ │ │ ├── 427c76730aa5199f17032d352f06863d.dnp │ │ │ ├── 4d8359a728ac2b9e71c87dba50fecca9.dnp │ │ │ ├── 4d9d5e07dffd78f81a31ce837dd92059.dnp │ │ │ ├── 540bf3c70678edf4d04ff01869d93c46.dnp │ │ │ ├── 544c9a58c37c0d3d27a013f504605606.dnp │ │ │ ├── 5728bcd61bf3211e15cd43e84b4bc5c0.dnp │ │ │ ├── 5825df613b5d1b9e0041c2d536a949c5.dnp │ │ │ ├── 5a3053c37db9ef2db83e6ddb3ddcf651.dnp │ │ │ ├── 5bf057e431c6137b5e97eb03b532a8ee.dnp │ │ │ ├── 5c07ccb64a776f434af5459c21bd0a8d.dnp │ │ │ ├── 5dce3d4b5d30b45871790a8dad994c2a.dnp │ │ │ ├── 5edf55df347641a886ffa7cb9e37ff33.dnp │ │ │ ├── 60584d8d9dfb4cb40159f8c6398af3c6.dnp │ │ │ ├── 657ed0935015875279013aeceb88f97a.dnp │ │ │ ├── 66546026765e5bcf8fe2b0e2acdced81.dnp │ │ │ ├── 6bf3c196974c1766ff46561bd78bdf58.dnp │ │ │ ├── 6c1ad8984e5e245dfeed58ad477d6a2f.dnp │ │ │ ├── 70f496ce5a35399d594f503125a4eddd.dnp │ │ │ ├── 723cffa3f9c08aa462f3f9f63423c4a8.dnp │ │ │ ├── 726cef763eaf10d5e07305f8afc625e7.dnp │ │ │ ├── 738f505dee4c7ddbb05dcecaabd8686a.dnp │ │ │ ├── 77dd862b670971564171cfa9b6d04a1b.dnp │ │ │ ├── 78c4b3e5413afc6f917d0bb7cea73331.dnp │ │ │ ├── 7cf25204ae93870228ee197eef9707ed.dnp │ │ │ ├── 8298e6a7c745a45f418dcdffcbdeda39.dnp │ │ │ ├── 901f887f1b0ac839575cc772f7fb4ba7.dnp │ │ │ ├── 928a9840dd7e406fa0ab8c4e706eba90.dnp │ │ │ ├── 97afd4e82fcc644a7181142dfc5bfed3.dnp │ │ │ ├── 981c48f8bf3ba143d015e2a2d87e788a.dnp │ │ │ ├── 989cc5887e96dccddb59bd93e4e014f6.dnp │ │ │ ├── 9b1c9152337d2d98d4ad9e7953d0f50b.dnp │ │ │ ├── 9bca36880e66cf94e8cc3c90fe99b8de.dnp │ │ │ ├── 9e08d8b922a7b52dcda4300ec6cb8878.dnp │ │ │ ├── a0b38a4b97edaf76a61d74f6cc52f059.dnp │ │ │ ├── a322cd18aa701d08d823dedfd18213ec.dnp │ │ │ ├── a36937ecaf836cf7f5ab02587a4188b1.dnp │ │ │ ├── a46afb6fe9a011cd9ee3bf0d6b4e846c.dnp │ │ │ ├── aa61275f7af773accef7d51411db8de4.dnp │ │ │ ├── ab43849b7ea957173e9e8d518546c2b0.dnp │ │ │ ├── ad0ee8ebcfc165d2530dad63589d904a.dnp │ │ │ ├── ae483a7032e4b5c09e869c8091fe45fc.dnp │ │ │ ├── af1e143a4adb9ba927c1a08691e3b030.dnp │ │ │ ├── af981cbe99a4144b0173f3fae38bb95f.dnp │ │ │ ├── b32d43d558507f180979150e7b1f89ce.dnp │ │ │ ├── b3fee84d35fcbf185cc627e4fb194950.dnp │ │ │ ├── b8036bc9eb5dafdfda02d92a35a3d791.dnp │ │ │ ├── b9b137d6d58faf7394acbe71a1244d02.dnp │ │ │ ├── bc07cb59ef08b34d88c9c84c88a7f54d.dnp │ │ │ ├── c1821d487d944db24f15d456dd1c82ac.dnp │ │ │ ├── c25f72c217a26ec402e91259041aba4c.dnp │ │ │ ├── c2f5a047aaf003c06906628933e387d7.dnp │ │ │ ├── c57e2f191f21209e433813ccca56d40b.dnp │ │ │ ├── cc7d78c03bf2ff8dc67a9d99137f5eb5.dnp │ │ │ ├── d3425b9c4b58c38325e45b61fe85d7f4.dnp │ │ │ ├── d51df7e2fe1fd7381aa1086e5ccab01b.dnp │ │ │ ├── daeca11ade8e84e29b480334d64e8dd1.dnp │ │ │ ├── e055b79129f5d38658053f1f337a9705.dnp │ │ │ ├── e0b965fb8f48c81e765c535fb6916317.dnp │ │ │ ├── e0c837ebcd297dc13784c743b4122d75.dnp │ │ │ ├── e7b1ddd8e8ed30a21e943bb546e4b72e.dnp │ │ │ ├── eb27db6983108a19449ba21f1becd7b0.dnp │ │ │ ├── eb7c74d91121ac582a0cb5def87d333f.dnp │ │ │ ├── eea878383fc605ea4bf1cce36163bad9.dnp │ │ │ ├── ef1afdf1d0c0dc4b36c23c08967635d2.dnp │ │ │ ├── f6ec2f4708290d6a397f0976e3acb25b.dnp │ │ │ └── ff15da3d60bb11e937102e22b70db8e4.dnp │ │ ├── fuzzdnp3.options │ │ ├── dnpcorpus.sh │ │ ├── NullLogHandler.h │ │ ├── CMakeLists.txt │ │ └── fuzzdecoder.cpp │ ├── unit │ │ ├── main.cpp │ │ ├── utils │ │ │ ├── DNPHelpers.h │ │ │ ├── CallbackQueue.h │ │ │ └── ProtocolUtil.h │ │ └── TestCRC.cpp │ ├── asiotests │ │ ├── main.cpp │ │ └── certs │ │ │ ├── ca_chain │ │ │ ├── entity1_cert.pem │ │ │ ├── entity2_cert.pem │ │ │ └── ca_cert.pem │ │ │ └── self_signed │ │ │ ├── entity1_cert.pem │ │ │ └── entity2_cert.pem │ ├── integration │ │ ├── main.cpp │ │ ├── mocks │ │ │ └── NullSOEHandler.cpp │ │ └── CMakeLists.txt │ └── dnp3mocks │ │ └── CMakeLists.txt ├── examples │ ├── decoder │ │ └── CMakeLists.txt │ ├── master │ │ └── CMakeLists.txt │ ├── master-udp │ │ └── CMakeLists.txt │ ├── outstation │ │ └── CMakeLists.txt │ ├── tls │ │ ├── master │ │ │ └── CMakeLists.txt │ │ ├── outstation │ │ │ └── CMakeLists.txt │ │ └── master-gprs │ │ │ └── CMakeLists.txt │ ├── outstation-udp │ │ └── CMakeLists.txt │ └── master-gprs │ │ └── CMakeLists.txt └── lib │ ├── src │ ├── outstation │ │ ├── IOutstationApplication.cpp │ │ ├── event │ │ │ ├── EventRecord.cpp │ │ │ ├── EventState.h │ │ │ └── TypedStorage.h │ │ ├── IINHelpers.h │ │ ├── IEventRecorder.h │ │ ├── IEventSelector.h │ │ ├── IINHelpers.cpp │ │ ├── OutstationSeqNum.h │ │ └── OctetStringSerializer.h │ ├── app │ │ ├── AppSeqNum.h │ │ ├── SequenceInfo.h │ │ ├── IINValue.h │ │ ├── Functions.h │ │ ├── parsing │ │ │ ├── Functions.h │ │ │ ├── IWhiteList.h │ │ │ └── BitReader.h │ │ ├── APDURequest.cpp │ │ ├── Functions.cpp │ │ ├── QualityFlags.h │ │ └── Message.h │ ├── master │ │ ├── HeaderBuilder.h │ │ ├── IScheduleCallback.h │ │ ├── HeaderConversions.h │ │ ├── ScanResult.h │ │ ├── DefaultMasterApplication.cpp │ │ ├── MasterScan.cpp │ │ └── HeaderConversions.cpp │ ├── transport │ │ ├── TransportSeqNum.h │ │ └── TransportConstants.h │ ├── logging │ │ └── Location.h │ ├── link │ │ ├── Addresses.cpp │ │ ├── ILinkLayer.h │ │ └── LinkHeaderFields.cpp │ └── channel │ │ ├── ASIOSerialHelpers.h │ │ ├── IChannelCallbacks.h │ │ └── IOpenDelayStrategy.cpp │ └── include │ └── opendnp3 │ ├── IResource.h │ ├── master │ ├── CommandResultCallbackT.h │ ├── IMasterScan.h │ ├── IMaster.h │ ├── ICommandCollection.h │ ├── PrintingCommandResultCallback.h │ └── IUTCTimeSource.h │ ├── util │ ├── StaticOnly.h │ ├── Buffer.h │ └── UTCTimestamp.h │ ├── decoder │ └── IDecoderCallbacks.h │ ├── channel │ └── IListener.h │ └── app │ ├── AppConstants.h │ └── GroupVariationID.h ├── codecov.yml ├── java ├── run-javah.bat ├── release.properties ├── cpp │ ├── com_automatak_dnp3_impl_DNP3ManagerFactory.h │ ├── adapters │ │ └── Conversions.h │ └── jni │ │ └── JNITaskConfig.h ├── AUTOMATAK_FILE_HEADER └── bindings │ └── src │ ├── test │ └── java │ │ └── com │ │ └── automatak │ │ └── dnp3 │ │ └── impl │ │ ├── ExceptionHandlingTest.java │ │ └── mocks │ │ └── NullLogHandler.java │ └── main │ └── java │ └── com │ └── automatak │ └── dnp3 │ ├── mock │ ├── OutputHandler.java │ └── package-info.java │ ├── DNP3Exception.java │ ├── CommandHeaders.java │ ├── EventConfig.java │ ├── impl │ └── package-info.java │ ├── OctetString.java │ ├── ChangeSet.java │ ├── LogHandler.java │ ├── Outstation.java │ ├── PointClassMasks.java │ ├── ChannelListener.java │ ├── LogMasks.java │ ├── Measurement.java │ ├── LinkStatistics.java │ ├── IPEndpoint.java │ ├── CounterConfig.java │ ├── StackStatistics.java │ ├── AnalogConfig.java │ └── TaskId.java ├── dotnet ├── examples │ ├── master │ │ └── CMakeLists.txt │ ├── outstation │ │ └── CMakeLists.txt │ ├── master-gprs │ │ └── CMakeLists.txt │ └── master-gprs-tls │ │ └── CMakeLists.txt ├── nuget │ ├── build │ │ ├── opendnp3.targets │ │ └── opendnp3.props │ └── .nuspec ├── CMakeLists.txt ├── CLRAdapter │ └── src │ │ ├── ICommandHeaderWorkAround.h │ │ ├── StdIOWorkaround.cpp │ │ ├── StdIOWorkaround.h │ │ └── Lock.h └── CLRInterface │ └── src │ ├── gen │ └── ILinkStatusListener.cs │ ├── IListener.cs │ ├── IMaster.cs │ ├── IMasterSession.cs │ ├── IMasterScan.cs │ ├── ISessionAcceptor.cs │ ├── DNP3Exception.cs │ └── IDnpTimeSource.cs ├── .gitattributes ├── deps ├── exe4cpp.cmake ├── ser4cpp.cmake ├── catch.cmake └── asio.cmake ├── .clang-tidy ├── generation ├── render │ ├── pom.xml │ └── src │ │ └── main │ │ └── scala │ │ └── com │ │ └── automatak │ │ └── render │ │ ├── Indentation.scala │ │ ├── cpp │ │ └── EnumConfig.scala │ │ ├── ModelRenderer.scala │ │ └── csharp │ │ └── package.scala ├── dnp3 │ ├── pom.xml │ └── src │ │ └── main │ │ └── scala │ │ └── com │ │ └── automatak │ │ └── render │ │ └── dnp3 │ │ ├── objects │ │ └── groups │ │ │ ├── Group110.scala │ │ │ ├── Group111.scala │ │ │ ├── Group113.scala │ │ │ ├── Group112.scala │ │ │ └── Group80.scala │ │ └── enums │ │ ├── LinkStatus.scala │ │ └── LogLevel.scala └── AUTOMATAK_FILE_HEADER └── NOTICE /config/src-footer.inc: -------------------------------------------------------------------------------- 1 | 2 | /* vim: set ts=4 sw=4: */ 3 | -------------------------------------------------------------------------------- /cpp/tests/fuzz/corpus/d41d8cd98f00b204e9800998ecf8427e.dnp: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /cpp/tests/fuzz/fuzzdnp3.options: -------------------------------------------------------------------------------- 1 | [libfuzzer] 2 | max_len = 4096 3 | -------------------------------------------------------------------------------- /config/doxygen_files/img/opendnp3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnp3/opendnp3/HEAD/config/doxygen_files/img/opendnp3.png -------------------------------------------------------------------------------- /cpp/tests/fuzz/corpus/0239a8b5d819fcd422d724a846672122.dnp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnp3/opendnp3/HEAD/cpp/tests/fuzz/corpus/0239a8b5d819fcd422d724a846672122.dnp -------------------------------------------------------------------------------- /cpp/tests/fuzz/corpus/02ec5b15b10b5bc33b47047185a1fee5.dnp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnp3/opendnp3/HEAD/cpp/tests/fuzz/corpus/02ec5b15b10b5bc33b47047185a1fee5.dnp -------------------------------------------------------------------------------- /cpp/tests/fuzz/corpus/062f20e1414534b1afdb0ef65d938c6e.dnp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnp3/opendnp3/HEAD/cpp/tests/fuzz/corpus/062f20e1414534b1afdb0ef65d938c6e.dnp -------------------------------------------------------------------------------- /cpp/tests/fuzz/corpus/0842344241561c8b959fa659a3f7e13f.dnp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnp3/opendnp3/HEAD/cpp/tests/fuzz/corpus/0842344241561c8b959fa659a3f7e13f.dnp -------------------------------------------------------------------------------- /cpp/tests/fuzz/corpus/0b3902307f244d598088a0ba958b3643.dnp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnp3/opendnp3/HEAD/cpp/tests/fuzz/corpus/0b3902307f244d598088a0ba958b3643.dnp -------------------------------------------------------------------------------- /cpp/tests/fuzz/corpus/0bb101d1ea68aa217d0a97d8f9017426.dnp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnp3/opendnp3/HEAD/cpp/tests/fuzz/corpus/0bb101d1ea68aa217d0a97d8f9017426.dnp -------------------------------------------------------------------------------- /cpp/tests/fuzz/corpus/0c06a7277af045380e9da62f9022bd2f.dnp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnp3/opendnp3/HEAD/cpp/tests/fuzz/corpus/0c06a7277af045380e9da62f9022bd2f.dnp -------------------------------------------------------------------------------- /cpp/tests/fuzz/corpus/1254cb1ba7132cf79405ac0065340893.dnp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnp3/opendnp3/HEAD/cpp/tests/fuzz/corpus/1254cb1ba7132cf79405ac0065340893.dnp -------------------------------------------------------------------------------- /cpp/tests/fuzz/corpus/16a3acecf8bb9902fbbe10f1dc0c69f2.dnp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnp3/opendnp3/HEAD/cpp/tests/fuzz/corpus/16a3acecf8bb9902fbbe10f1dc0c69f2.dnp -------------------------------------------------------------------------------- /cpp/tests/fuzz/corpus/179973c6f40d1ef8c9bde51969b1497c.dnp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnp3/opendnp3/HEAD/cpp/tests/fuzz/corpus/179973c6f40d1ef8c9bde51969b1497c.dnp -------------------------------------------------------------------------------- /cpp/tests/fuzz/corpus/1bbb5c12693a431dc83ad997719a4fd1.dnp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnp3/opendnp3/HEAD/cpp/tests/fuzz/corpus/1bbb5c12693a431dc83ad997719a4fd1.dnp -------------------------------------------------------------------------------- /cpp/tests/fuzz/corpus/1e513cf5c9512c6f0bd34045393fdbc0.dnp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnp3/opendnp3/HEAD/cpp/tests/fuzz/corpus/1e513cf5c9512c6f0bd34045393fdbc0.dnp -------------------------------------------------------------------------------- /cpp/tests/fuzz/corpus/215977058b012ff1c4755c14fb9f46b2.dnp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnp3/opendnp3/HEAD/cpp/tests/fuzz/corpus/215977058b012ff1c4755c14fb9f46b2.dnp -------------------------------------------------------------------------------- /cpp/tests/fuzz/corpus/2515775e994f5970854c037f476eb3f3.dnp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnp3/opendnp3/HEAD/cpp/tests/fuzz/corpus/2515775e994f5970854c037f476eb3f3.dnp -------------------------------------------------------------------------------- /cpp/tests/fuzz/corpus/27ca51d0c5baac3146d5196252f769d4.dnp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnp3/opendnp3/HEAD/cpp/tests/fuzz/corpus/27ca51d0c5baac3146d5196252f769d4.dnp -------------------------------------------------------------------------------- /cpp/tests/fuzz/corpus/28de1bad04f60d0b47afd3359bae9c90.dnp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnp3/opendnp3/HEAD/cpp/tests/fuzz/corpus/28de1bad04f60d0b47afd3359bae9c90.dnp -------------------------------------------------------------------------------- /cpp/tests/fuzz/corpus/2b8343b17b14d4781fa4d6c8c00c370e.dnp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnp3/opendnp3/HEAD/cpp/tests/fuzz/corpus/2b8343b17b14d4781fa4d6c8c00c370e.dnp -------------------------------------------------------------------------------- /cpp/tests/fuzz/corpus/2bd4a20745092c25d27c38f2ab32214f.dnp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnp3/opendnp3/HEAD/cpp/tests/fuzz/corpus/2bd4a20745092c25d27c38f2ab32214f.dnp -------------------------------------------------------------------------------- /cpp/tests/fuzz/corpus/331df8d14c86f7fd692b6694504f06e9.dnp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnp3/opendnp3/HEAD/cpp/tests/fuzz/corpus/331df8d14c86f7fd692b6694504f06e9.dnp -------------------------------------------------------------------------------- /cpp/tests/fuzz/corpus/333ebd68f680b180c4124cefef59e40e.dnp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnp3/opendnp3/HEAD/cpp/tests/fuzz/corpus/333ebd68f680b180c4124cefef59e40e.dnp -------------------------------------------------------------------------------- /cpp/tests/fuzz/corpus/3382a083102cee1b8dd6e81fa8c14856.dnp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnp3/opendnp3/HEAD/cpp/tests/fuzz/corpus/3382a083102cee1b8dd6e81fa8c14856.dnp -------------------------------------------------------------------------------- /cpp/tests/fuzz/corpus/347309a965294f3861282ec2e6394e75.dnp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnp3/opendnp3/HEAD/cpp/tests/fuzz/corpus/347309a965294f3861282ec2e6394e75.dnp -------------------------------------------------------------------------------- /cpp/tests/fuzz/corpus/34f7583aecb6349acb96f7bc044c3132.dnp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnp3/opendnp3/HEAD/cpp/tests/fuzz/corpus/34f7583aecb6349acb96f7bc044c3132.dnp -------------------------------------------------------------------------------- /cpp/tests/fuzz/corpus/367983e8f7861ec35baf9f5bad560aa9.dnp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnp3/opendnp3/HEAD/cpp/tests/fuzz/corpus/367983e8f7861ec35baf9f5bad560aa9.dnp -------------------------------------------------------------------------------- /cpp/tests/fuzz/corpus/368880b945a62887d0a160d6c799264b.dnp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnp3/opendnp3/HEAD/cpp/tests/fuzz/corpus/368880b945a62887d0a160d6c799264b.dnp -------------------------------------------------------------------------------- /cpp/tests/fuzz/corpus/37f7e45f6dc00f58b15c7b4dfd1aaaae.dnp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnp3/opendnp3/HEAD/cpp/tests/fuzz/corpus/37f7e45f6dc00f58b15c7b4dfd1aaaae.dnp -------------------------------------------------------------------------------- /cpp/tests/fuzz/corpus/427c76730aa5199f17032d352f06863d.dnp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnp3/opendnp3/HEAD/cpp/tests/fuzz/corpus/427c76730aa5199f17032d352f06863d.dnp -------------------------------------------------------------------------------- /cpp/tests/fuzz/corpus/4d8359a728ac2b9e71c87dba50fecca9.dnp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnp3/opendnp3/HEAD/cpp/tests/fuzz/corpus/4d8359a728ac2b9e71c87dba50fecca9.dnp -------------------------------------------------------------------------------- /cpp/tests/fuzz/corpus/4d9d5e07dffd78f81a31ce837dd92059.dnp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnp3/opendnp3/HEAD/cpp/tests/fuzz/corpus/4d9d5e07dffd78f81a31ce837dd92059.dnp -------------------------------------------------------------------------------- /cpp/tests/fuzz/corpus/540bf3c70678edf4d04ff01869d93c46.dnp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnp3/opendnp3/HEAD/cpp/tests/fuzz/corpus/540bf3c70678edf4d04ff01869d93c46.dnp -------------------------------------------------------------------------------- /cpp/tests/fuzz/corpus/544c9a58c37c0d3d27a013f504605606.dnp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnp3/opendnp3/HEAD/cpp/tests/fuzz/corpus/544c9a58c37c0d3d27a013f504605606.dnp -------------------------------------------------------------------------------- /cpp/tests/fuzz/corpus/5728bcd61bf3211e15cd43e84b4bc5c0.dnp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnp3/opendnp3/HEAD/cpp/tests/fuzz/corpus/5728bcd61bf3211e15cd43e84b4bc5c0.dnp -------------------------------------------------------------------------------- /cpp/tests/fuzz/corpus/5825df613b5d1b9e0041c2d536a949c5.dnp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnp3/opendnp3/HEAD/cpp/tests/fuzz/corpus/5825df613b5d1b9e0041c2d536a949c5.dnp -------------------------------------------------------------------------------- /cpp/tests/fuzz/corpus/5a3053c37db9ef2db83e6ddb3ddcf651.dnp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnp3/opendnp3/HEAD/cpp/tests/fuzz/corpus/5a3053c37db9ef2db83e6ddb3ddcf651.dnp -------------------------------------------------------------------------------- /cpp/tests/fuzz/corpus/5bf057e431c6137b5e97eb03b532a8ee.dnp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnp3/opendnp3/HEAD/cpp/tests/fuzz/corpus/5bf057e431c6137b5e97eb03b532a8ee.dnp -------------------------------------------------------------------------------- /cpp/tests/fuzz/corpus/5c07ccb64a776f434af5459c21bd0a8d.dnp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnp3/opendnp3/HEAD/cpp/tests/fuzz/corpus/5c07ccb64a776f434af5459c21bd0a8d.dnp -------------------------------------------------------------------------------- /cpp/tests/fuzz/corpus/5dce3d4b5d30b45871790a8dad994c2a.dnp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnp3/opendnp3/HEAD/cpp/tests/fuzz/corpus/5dce3d4b5d30b45871790a8dad994c2a.dnp -------------------------------------------------------------------------------- /cpp/tests/fuzz/corpus/5edf55df347641a886ffa7cb9e37ff33.dnp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnp3/opendnp3/HEAD/cpp/tests/fuzz/corpus/5edf55df347641a886ffa7cb9e37ff33.dnp -------------------------------------------------------------------------------- /cpp/tests/fuzz/corpus/60584d8d9dfb4cb40159f8c6398af3c6.dnp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnp3/opendnp3/HEAD/cpp/tests/fuzz/corpus/60584d8d9dfb4cb40159f8c6398af3c6.dnp -------------------------------------------------------------------------------- /cpp/tests/fuzz/corpus/657ed0935015875279013aeceb88f97a.dnp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnp3/opendnp3/HEAD/cpp/tests/fuzz/corpus/657ed0935015875279013aeceb88f97a.dnp -------------------------------------------------------------------------------- /cpp/tests/fuzz/corpus/66546026765e5bcf8fe2b0e2acdced81.dnp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnp3/opendnp3/HEAD/cpp/tests/fuzz/corpus/66546026765e5bcf8fe2b0e2acdced81.dnp -------------------------------------------------------------------------------- /cpp/tests/fuzz/corpus/6bf3c196974c1766ff46561bd78bdf58.dnp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnp3/opendnp3/HEAD/cpp/tests/fuzz/corpus/6bf3c196974c1766ff46561bd78bdf58.dnp -------------------------------------------------------------------------------- /cpp/tests/fuzz/corpus/6c1ad8984e5e245dfeed58ad477d6a2f.dnp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnp3/opendnp3/HEAD/cpp/tests/fuzz/corpus/6c1ad8984e5e245dfeed58ad477d6a2f.dnp -------------------------------------------------------------------------------- /cpp/tests/fuzz/corpus/70f496ce5a35399d594f503125a4eddd.dnp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnp3/opendnp3/HEAD/cpp/tests/fuzz/corpus/70f496ce5a35399d594f503125a4eddd.dnp -------------------------------------------------------------------------------- /cpp/tests/fuzz/corpus/723cffa3f9c08aa462f3f9f63423c4a8.dnp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnp3/opendnp3/HEAD/cpp/tests/fuzz/corpus/723cffa3f9c08aa462f3f9f63423c4a8.dnp -------------------------------------------------------------------------------- /cpp/tests/fuzz/corpus/726cef763eaf10d5e07305f8afc625e7.dnp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnp3/opendnp3/HEAD/cpp/tests/fuzz/corpus/726cef763eaf10d5e07305f8afc625e7.dnp -------------------------------------------------------------------------------- /cpp/tests/fuzz/corpus/738f505dee4c7ddbb05dcecaabd8686a.dnp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnp3/opendnp3/HEAD/cpp/tests/fuzz/corpus/738f505dee4c7ddbb05dcecaabd8686a.dnp -------------------------------------------------------------------------------- /cpp/tests/fuzz/corpus/77dd862b670971564171cfa9b6d04a1b.dnp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnp3/opendnp3/HEAD/cpp/tests/fuzz/corpus/77dd862b670971564171cfa9b6d04a1b.dnp -------------------------------------------------------------------------------- /cpp/tests/fuzz/corpus/78c4b3e5413afc6f917d0bb7cea73331.dnp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnp3/opendnp3/HEAD/cpp/tests/fuzz/corpus/78c4b3e5413afc6f917d0bb7cea73331.dnp -------------------------------------------------------------------------------- /cpp/tests/fuzz/corpus/7cf25204ae93870228ee197eef9707ed.dnp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnp3/opendnp3/HEAD/cpp/tests/fuzz/corpus/7cf25204ae93870228ee197eef9707ed.dnp -------------------------------------------------------------------------------- /cpp/tests/fuzz/corpus/8298e6a7c745a45f418dcdffcbdeda39.dnp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnp3/opendnp3/HEAD/cpp/tests/fuzz/corpus/8298e6a7c745a45f418dcdffcbdeda39.dnp -------------------------------------------------------------------------------- /cpp/tests/fuzz/corpus/901f887f1b0ac839575cc772f7fb4ba7.dnp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnp3/opendnp3/HEAD/cpp/tests/fuzz/corpus/901f887f1b0ac839575cc772f7fb4ba7.dnp -------------------------------------------------------------------------------- /cpp/tests/fuzz/corpus/928a9840dd7e406fa0ab8c4e706eba90.dnp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnp3/opendnp3/HEAD/cpp/tests/fuzz/corpus/928a9840dd7e406fa0ab8c4e706eba90.dnp -------------------------------------------------------------------------------- /cpp/tests/fuzz/corpus/97afd4e82fcc644a7181142dfc5bfed3.dnp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnp3/opendnp3/HEAD/cpp/tests/fuzz/corpus/97afd4e82fcc644a7181142dfc5bfed3.dnp -------------------------------------------------------------------------------- /cpp/tests/fuzz/corpus/981c48f8bf3ba143d015e2a2d87e788a.dnp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnp3/opendnp3/HEAD/cpp/tests/fuzz/corpus/981c48f8bf3ba143d015e2a2d87e788a.dnp -------------------------------------------------------------------------------- /cpp/tests/fuzz/corpus/989cc5887e96dccddb59bd93e4e014f6.dnp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnp3/opendnp3/HEAD/cpp/tests/fuzz/corpus/989cc5887e96dccddb59bd93e4e014f6.dnp -------------------------------------------------------------------------------- /cpp/tests/fuzz/corpus/9b1c9152337d2d98d4ad9e7953d0f50b.dnp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnp3/opendnp3/HEAD/cpp/tests/fuzz/corpus/9b1c9152337d2d98d4ad9e7953d0f50b.dnp -------------------------------------------------------------------------------- /cpp/tests/fuzz/corpus/9bca36880e66cf94e8cc3c90fe99b8de.dnp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnp3/opendnp3/HEAD/cpp/tests/fuzz/corpus/9bca36880e66cf94e8cc3c90fe99b8de.dnp -------------------------------------------------------------------------------- /cpp/tests/fuzz/corpus/9e08d8b922a7b52dcda4300ec6cb8878.dnp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnp3/opendnp3/HEAD/cpp/tests/fuzz/corpus/9e08d8b922a7b52dcda4300ec6cb8878.dnp -------------------------------------------------------------------------------- /cpp/tests/fuzz/corpus/a0b38a4b97edaf76a61d74f6cc52f059.dnp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnp3/opendnp3/HEAD/cpp/tests/fuzz/corpus/a0b38a4b97edaf76a61d74f6cc52f059.dnp -------------------------------------------------------------------------------- /cpp/tests/fuzz/corpus/a322cd18aa701d08d823dedfd18213ec.dnp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnp3/opendnp3/HEAD/cpp/tests/fuzz/corpus/a322cd18aa701d08d823dedfd18213ec.dnp -------------------------------------------------------------------------------- /cpp/tests/fuzz/corpus/a36937ecaf836cf7f5ab02587a4188b1.dnp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnp3/opendnp3/HEAD/cpp/tests/fuzz/corpus/a36937ecaf836cf7f5ab02587a4188b1.dnp -------------------------------------------------------------------------------- /cpp/tests/fuzz/corpus/a46afb6fe9a011cd9ee3bf0d6b4e846c.dnp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnp3/opendnp3/HEAD/cpp/tests/fuzz/corpus/a46afb6fe9a011cd9ee3bf0d6b4e846c.dnp -------------------------------------------------------------------------------- /cpp/tests/fuzz/corpus/aa61275f7af773accef7d51411db8de4.dnp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnp3/opendnp3/HEAD/cpp/tests/fuzz/corpus/aa61275f7af773accef7d51411db8de4.dnp -------------------------------------------------------------------------------- /cpp/tests/fuzz/corpus/ab43849b7ea957173e9e8d518546c2b0.dnp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnp3/opendnp3/HEAD/cpp/tests/fuzz/corpus/ab43849b7ea957173e9e8d518546c2b0.dnp -------------------------------------------------------------------------------- /cpp/tests/fuzz/corpus/ad0ee8ebcfc165d2530dad63589d904a.dnp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnp3/opendnp3/HEAD/cpp/tests/fuzz/corpus/ad0ee8ebcfc165d2530dad63589d904a.dnp -------------------------------------------------------------------------------- /cpp/tests/fuzz/corpus/ae483a7032e4b5c09e869c8091fe45fc.dnp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnp3/opendnp3/HEAD/cpp/tests/fuzz/corpus/ae483a7032e4b5c09e869c8091fe45fc.dnp -------------------------------------------------------------------------------- /cpp/tests/fuzz/corpus/af1e143a4adb9ba927c1a08691e3b030.dnp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnp3/opendnp3/HEAD/cpp/tests/fuzz/corpus/af1e143a4adb9ba927c1a08691e3b030.dnp -------------------------------------------------------------------------------- /cpp/tests/fuzz/corpus/af981cbe99a4144b0173f3fae38bb95f.dnp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnp3/opendnp3/HEAD/cpp/tests/fuzz/corpus/af981cbe99a4144b0173f3fae38bb95f.dnp -------------------------------------------------------------------------------- /cpp/tests/fuzz/corpus/b32d43d558507f180979150e7b1f89ce.dnp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnp3/opendnp3/HEAD/cpp/tests/fuzz/corpus/b32d43d558507f180979150e7b1f89ce.dnp -------------------------------------------------------------------------------- /cpp/tests/fuzz/corpus/b3fee84d35fcbf185cc627e4fb194950.dnp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnp3/opendnp3/HEAD/cpp/tests/fuzz/corpus/b3fee84d35fcbf185cc627e4fb194950.dnp -------------------------------------------------------------------------------- /cpp/tests/fuzz/corpus/b8036bc9eb5dafdfda02d92a35a3d791.dnp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnp3/opendnp3/HEAD/cpp/tests/fuzz/corpus/b8036bc9eb5dafdfda02d92a35a3d791.dnp -------------------------------------------------------------------------------- /cpp/tests/fuzz/corpus/b9b137d6d58faf7394acbe71a1244d02.dnp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnp3/opendnp3/HEAD/cpp/tests/fuzz/corpus/b9b137d6d58faf7394acbe71a1244d02.dnp -------------------------------------------------------------------------------- /cpp/tests/fuzz/corpus/bc07cb59ef08b34d88c9c84c88a7f54d.dnp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnp3/opendnp3/HEAD/cpp/tests/fuzz/corpus/bc07cb59ef08b34d88c9c84c88a7f54d.dnp -------------------------------------------------------------------------------- /cpp/tests/fuzz/corpus/c1821d487d944db24f15d456dd1c82ac.dnp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnp3/opendnp3/HEAD/cpp/tests/fuzz/corpus/c1821d487d944db24f15d456dd1c82ac.dnp -------------------------------------------------------------------------------- /cpp/tests/fuzz/corpus/c25f72c217a26ec402e91259041aba4c.dnp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnp3/opendnp3/HEAD/cpp/tests/fuzz/corpus/c25f72c217a26ec402e91259041aba4c.dnp -------------------------------------------------------------------------------- /cpp/tests/fuzz/corpus/c2f5a047aaf003c06906628933e387d7.dnp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnp3/opendnp3/HEAD/cpp/tests/fuzz/corpus/c2f5a047aaf003c06906628933e387d7.dnp -------------------------------------------------------------------------------- /cpp/tests/fuzz/corpus/c57e2f191f21209e433813ccca56d40b.dnp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnp3/opendnp3/HEAD/cpp/tests/fuzz/corpus/c57e2f191f21209e433813ccca56d40b.dnp -------------------------------------------------------------------------------- /cpp/tests/fuzz/corpus/cc7d78c03bf2ff8dc67a9d99137f5eb5.dnp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnp3/opendnp3/HEAD/cpp/tests/fuzz/corpus/cc7d78c03bf2ff8dc67a9d99137f5eb5.dnp -------------------------------------------------------------------------------- /cpp/tests/fuzz/corpus/d3425b9c4b58c38325e45b61fe85d7f4.dnp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnp3/opendnp3/HEAD/cpp/tests/fuzz/corpus/d3425b9c4b58c38325e45b61fe85d7f4.dnp -------------------------------------------------------------------------------- /cpp/tests/fuzz/corpus/d51df7e2fe1fd7381aa1086e5ccab01b.dnp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnp3/opendnp3/HEAD/cpp/tests/fuzz/corpus/d51df7e2fe1fd7381aa1086e5ccab01b.dnp -------------------------------------------------------------------------------- /cpp/tests/fuzz/corpus/daeca11ade8e84e29b480334d64e8dd1.dnp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnp3/opendnp3/HEAD/cpp/tests/fuzz/corpus/daeca11ade8e84e29b480334d64e8dd1.dnp -------------------------------------------------------------------------------- /cpp/tests/fuzz/corpus/e055b79129f5d38658053f1f337a9705.dnp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnp3/opendnp3/HEAD/cpp/tests/fuzz/corpus/e055b79129f5d38658053f1f337a9705.dnp -------------------------------------------------------------------------------- /cpp/tests/fuzz/corpus/e0b965fb8f48c81e765c535fb6916317.dnp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnp3/opendnp3/HEAD/cpp/tests/fuzz/corpus/e0b965fb8f48c81e765c535fb6916317.dnp -------------------------------------------------------------------------------- /cpp/tests/fuzz/corpus/e0c837ebcd297dc13784c743b4122d75.dnp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnp3/opendnp3/HEAD/cpp/tests/fuzz/corpus/e0c837ebcd297dc13784c743b4122d75.dnp -------------------------------------------------------------------------------- /cpp/tests/fuzz/corpus/e7b1ddd8e8ed30a21e943bb546e4b72e.dnp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnp3/opendnp3/HEAD/cpp/tests/fuzz/corpus/e7b1ddd8e8ed30a21e943bb546e4b72e.dnp -------------------------------------------------------------------------------- /cpp/tests/fuzz/corpus/eb27db6983108a19449ba21f1becd7b0.dnp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnp3/opendnp3/HEAD/cpp/tests/fuzz/corpus/eb27db6983108a19449ba21f1becd7b0.dnp -------------------------------------------------------------------------------- /cpp/tests/fuzz/corpus/eb7c74d91121ac582a0cb5def87d333f.dnp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnp3/opendnp3/HEAD/cpp/tests/fuzz/corpus/eb7c74d91121ac582a0cb5def87d333f.dnp -------------------------------------------------------------------------------- /cpp/tests/fuzz/corpus/eea878383fc605ea4bf1cce36163bad9.dnp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnp3/opendnp3/HEAD/cpp/tests/fuzz/corpus/eea878383fc605ea4bf1cce36163bad9.dnp -------------------------------------------------------------------------------- /cpp/tests/fuzz/corpus/ef1afdf1d0c0dc4b36c23c08967635d2.dnp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnp3/opendnp3/HEAD/cpp/tests/fuzz/corpus/ef1afdf1d0c0dc4b36c23c08967635d2.dnp -------------------------------------------------------------------------------- /cpp/tests/fuzz/corpus/f6ec2f4708290d6a397f0976e3acb25b.dnp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnp3/opendnp3/HEAD/cpp/tests/fuzz/corpus/f6ec2f4708290d6a397f0976e3acb25b.dnp -------------------------------------------------------------------------------- /cpp/tests/fuzz/corpus/ff15da3d60bb11e937102e22b70db8e4.dnp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnp3/opendnp3/HEAD/cpp/tests/fuzz/corpus/ff15da3d60bb11e937102e22b70db8e4.dnp -------------------------------------------------------------------------------- /config/astyle.cfg: -------------------------------------------------------------------------------- 1 | # don't create backup files 2 | --style=allman 3 | --suffix=none 4 | --indent=tab 5 | --indent-cases 6 | --pad-oper 7 | --break-closing-brackets 8 | --keep-one-line-statements 9 | --align-pointer=type 10 | -------------------------------------------------------------------------------- /codecov.yml: -------------------------------------------------------------------------------- 1 | coverage: 2 | status: 3 | project: 4 | default: 5 | informational: true 6 | patch: 7 | default: 8 | informational: true 9 | precision: 2 10 | round: down 11 | range: "0...100" 12 | -------------------------------------------------------------------------------- /cpp/examples/decoder/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_executable(decoder ./main.cpp) 2 | target_link_libraries (decoder PRIVATE opendnp3) 3 | set_target_properties(decoder PROPERTIES FOLDER cpp/examples) 4 | install(TARGETS decoder RUNTIME DESTINATION bin) 5 | -------------------------------------------------------------------------------- /cpp/examples/master/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_executable(master-demo ./main.cpp) 2 | target_link_libraries (master-demo PRIVATE opendnp3) 3 | set_target_properties(master-demo PROPERTIES FOLDER cpp/examples) 4 | install(TARGETS master-demo RUNTIME DESTINATION bin) 5 | -------------------------------------------------------------------------------- /cpp/examples/master-udp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_executable(master-udp-demo ./main.cpp) 2 | target_link_libraries (master-udp-demo PRIVATE opendnp3) 3 | set_target_properties(master-udp-demo PROPERTIES FOLDER cpp/examples) 4 | install(TARGETS master-udp-demo RUNTIME DESTINATION bin) 5 | -------------------------------------------------------------------------------- /cpp/examples/outstation/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_executable(outstation-demo ./main.cpp) 2 | target_link_libraries (outstation-demo PRIVATE opendnp3) 3 | set_target_properties(outstation-demo PROPERTIES FOLDER cpp/examples) 4 | install(TARGETS outstation-demo RUNTIME DESTINATION bin) 5 | -------------------------------------------------------------------------------- /cpp/examples/tls/master/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_executable(master-tls-demo ./main.cpp) 2 | target_link_libraries (master-tls-demo PRIVATE opendnp3) 3 | set_target_properties(master-tls-demo PROPERTIES FOLDER cpp/examples/tls) 4 | install(TARGETS master-tls-demo RUNTIME DESTINATION bin) 5 | -------------------------------------------------------------------------------- /cpp/examples/outstation-udp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_executable(outstation-udp-demo ./main.cpp) 2 | target_link_libraries (outstation-udp-demo PRIVATE opendnp3) 3 | set_target_properties(outstation-udp-demo PROPERTIES FOLDER cpp/examples) 4 | install(TARGETS outstation-udp-demo RUNTIME DESTINATION bin) 5 | -------------------------------------------------------------------------------- /cpp/examples/tls/outstation/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_executable(outstation-tls-demo ./main.cpp) 2 | target_link_libraries (outstation-tls-demo PRIVATE opendnp3) 3 | set_target_properties(outstation-tls-demo PROPERTIES FOLDER cpp/examples/tls) 4 | install(TARGETS outstation-tls-demo RUNTIME DESTINATION bin) 5 | -------------------------------------------------------------------------------- /cpp/examples/tls/master-gprs/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_executable(master-gprs-tls-demo ./main.cpp) 2 | target_link_libraries (master-gprs-tls-demo PRIVATE opendnp3) 3 | set_target_properties(master-gprs-tls-demo PROPERTIES FOLDER cpp/examples/tls) 4 | install(TARGETS master-gprs-tls-demo RUNTIME DESTINATION bin) 5 | -------------------------------------------------------------------------------- /cpp/examples/master-gprs/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_executable(master-gprs-demo ./main.cpp ./ExampleListenCallbacks.h ./ExampleListenCallbacks.cpp) 2 | target_link_libraries (master-gprs-demo PRIVATE opendnp3) 3 | set_target_properties(master-gprs-demo PROPERTIES FOLDER cpp/examples) 4 | install(TARGETS master-gprs-demo RUNTIME DESTINATION bin) 5 | -------------------------------------------------------------------------------- /java/run-javah.bat: -------------------------------------------------------------------------------- 1 | javah -jni -d cpp -classpath ".\bindings\target\classes" com.automatak.dnp3.impl.DNP3ManagerFactory com.automatak.dnp3.impl.ManagerImpl com.automatak.dnp3.impl.ChannelImpl com.automatak.dnp3.impl.MasterImpl com.automatak.dnp3.impl.OutstationImpl com.automatak.dnp3.impl.CommandBuilderImpl com.automatak.dnp3.impl.DatabaseImpl 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /dotnet/examples/master/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | enable_language(CSharp) 2 | 3 | add_executable(master-dotnet Program.cs) 4 | 5 | set_target_properties(master-dotnet PROPERTIES FOLDER "dotnet/examples") 6 | set_property(TARGET master-dotnet PROPERTY VS_DOTNET_TARGET_FRAMEWORK_VERSION ${DNP3_DOTNET_FRAMEWORK_VERSION}) 7 | target_link_libraries(master-dotnet DNP3CLRAdapter) -------------------------------------------------------------------------------- /dotnet/examples/outstation/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | enable_language(CSharp) 2 | 3 | add_executable(outstation-dotnet Program.cs) 4 | 5 | set_target_properties(outstation-dotnet PROPERTIES FOLDER "dotnet/examples") 6 | set_property(TARGET outstation-dotnet PROPERTY VS_DOTNET_TARGET_FRAMEWORK_VERSION ${DNP3_DOTNET_FRAMEWORK_VERSION}) 7 | target_link_libraries(outstation-dotnet DNP3CLRAdapter) -------------------------------------------------------------------------------- /dotnet/examples/master-gprs/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | enable_language(CSharp) 2 | 3 | add_executable(master-dotnet-gprs Program.cs) 4 | 5 | set_target_properties(master-dotnet-gprs PROPERTIES FOLDER "dotnet/examples") 6 | set_property(TARGET master-dotnet-gprs PROPERTY VS_DOTNET_TARGET_FRAMEWORK_VERSION ${DNP3_DOTNET_FRAMEWORK_VERSION}) 7 | target_link_libraries(master-dotnet-gprs DNP3CLRAdapter) -------------------------------------------------------------------------------- /dotnet/examples/master-gprs-tls/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | enable_language(CSharp) 2 | 3 | add_executable(master-dotnet-gprs-tls Program.cs) 4 | 5 | set_target_properties(master-dotnet-gprs-tls PROPERTIES FOLDER "dotnet/examples") 6 | set_property(TARGET master-dotnet-gprs-tls PROPERTY VS_DOTNET_TARGET_FRAMEWORK_VERSION ${DNP3_DOTNET_FRAMEWORK_VERSION}) 7 | target_link_libraries(master-dotnet-gprs-tls DNP3CLRAdapter) -------------------------------------------------------------------------------- /java/release.properties: -------------------------------------------------------------------------------- 1 | #release configuration 2 | #Wed May 22 13:55:59 PDT 2019 3 | scm.tagNameFormat=@{project.version} 4 | pushChanges=false 5 | scm.url=scm\:git\:git@github.com\:dnp3/opendnp3.git 6 | preparationGoals=clean verify 7 | projectVersionPolicyId=default 8 | remoteTagging=true 9 | scm.commentPrefix=[maven-release-plugin] 10 | exec.snapshotReleasePluginAllowed=false 11 | completedPhase=check-poms 12 | -------------------------------------------------------------------------------- /cpp/tests/fuzz/dnpcorpus.sh: -------------------------------------------------------------------------------- 1 | #/bin/sh 2 | PCAPDIR=pcap/ICS-Security-Tools/ 3 | OUTDIR=corpus 4 | find $PCAPDIR -name "*.pcap" | while read i; do tshark -r $i -T fields -e tcp.payload; done | tr -d : > /tmp/dnp3.txt 5 | i=0; 6 | cat /tmp/dnp3.txt | while read line; do i=$((i+1)); echo $line | xxd -r -p > $OUTDIR/$i.dnp; done 7 | ls $OUTDIR/*.dnp | while read i; do hash=`md5 $i | cut -d" " -f4`; mv $i $OUTDIR/$hash.dnp; done 8 | rm /tmp/dnp3.txt 9 | -------------------------------------------------------------------------------- /java/cpp/com_automatak_dnp3_impl_DNP3ManagerFactory.h: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT THIS FILE - it is machine generated */ 2 | #include 3 | /* Header for class com_automatak_dnp3_impl_DNP3ManagerFactory */ 4 | 5 | #ifndef _Included_com_automatak_dnp3_impl_DNP3ManagerFactory 6 | #define _Included_com_automatak_dnp3_impl_DNP3ManagerFactory 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | #ifdef __cplusplus 11 | } 12 | #endif 13 | #endif 14 | -------------------------------------------------------------------------------- /dotnet/nuget/build/opendnp3.targets: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Set default behaviour, in case users don't have core.autocrlf set. 2 | * text=auto 3 | 4 | # Explicitly declare text files we want to always be normalized and converted 5 | # to native line endings on checkout. 6 | *.c text 7 | *.h text 8 | *.cpp text 9 | *.java text 10 | *.cs text 11 | *.scala text 12 | 13 | # Declare files that will always have CRLF line endings on checkout. 14 | *.sln text eol=crlf 15 | 16 | # Denote all files that are truly binary and should not be modified. 17 | *.png binary 18 | *.jpg binary 19 | -------------------------------------------------------------------------------- /config/doxygen_files/mainpage.dox: -------------------------------------------------------------------------------- 1 | /*! \mainpage opendnp3 2 | 3 | Overview 4 | ======== 5 | Opendnp3 is an Apache-licensed implementation of the 6 | DNP3 protocol (aka IEEE-1815). 7 | 8 | About this page 9 | =============== 10 | This is autogenerated C++ API documentation for developers. This documentation 11 | complements the developers guide. 12 | 13 | Please refer to the guide for architecture, supported features, build instructions, and examples. 14 | */ 15 | -------------------------------------------------------------------------------- /deps/exe4cpp.cmake: -------------------------------------------------------------------------------- 1 | include(FetchContent) 2 | 3 | FetchContent_Declare( 4 | exe4cpp 5 | URL https://github.com/automatak/exe4cpp/archive/fb878a4de598ba9d6e4338afebf83f96e03af1b8.zip 6 | URL_HASH SHA1=18B141E8CF09DC8D28CC62DD5FA2920670D501BD 7 | ) 8 | 9 | FetchContent_GetProperties(exe4cpp) 10 | if(NOT exe4cpp_POPULATED) 11 | FetchContent_Populate(exe4cpp) 12 | 13 | add_library(exe4cpp INTERFACE) 14 | target_include_directories(exe4cpp INTERFACE ${exe4cpp_SOURCE_DIR}/src) 15 | target_compile_features(exe4cpp INTERFACE cxx_std_14) 16 | endif() 17 | -------------------------------------------------------------------------------- /deps/ser4cpp.cmake: -------------------------------------------------------------------------------- 1 | include(FetchContent) 2 | 3 | FetchContent_Declare( 4 | ser4cpp 5 | URL https://github.com/automatak/ser4cpp/archive/3c449734dc530a8f465eb0982de29165cc4e23d5.zip 6 | URL_HASH SHA1=937B759B7CC80180DA26B47037E796B59798A672 7 | ) 8 | 9 | FetchContent_GetProperties(ser4cpp) 10 | if(NOT ser4cpp_POPULATED) 11 | FetchContent_Populate(ser4cpp) 12 | 13 | add_library(ser4cpp INTERFACE) 14 | target_include_directories(ser4cpp INTERFACE ${ser4cpp_SOURCE_DIR}/src) 15 | target_compile_features(ser4cpp INTERFACE cxx_std_14) 16 | endif() 17 | -------------------------------------------------------------------------------- /.clang-tidy: -------------------------------------------------------------------------------- 1 | --- 2 | Checks: '*,-google-readability-todo,-google-build-using-namespace,-google-readability-braces-around-statements,-readability-braces-around-statements,-hicpp-braces-around-statements,-modernize-return-braced-init-list,-cppcoreguidelines-pro-type-member-init,-hicpp-member-init,-modernize-use-default-member-init' 3 | WarningsAsErrors: '' 4 | HeaderFilterRegex: '' 5 | AnalyzeTemporaryDtors: false 6 | FormatStyle: file 7 | CheckOptions: 8 | - key: modernize-make-unique.MakeSmartPtrFunction 9 | value: 'std::make_unique' 10 | ... 11 | -------------------------------------------------------------------------------- /generation/render/pom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4.0.0 4 | 5 | 6 | com.automatak.render 7 | opendnp3-generation 8 | 1.0.0 9 | 10 | 11 | opendnp3-generation-render 12 | jar 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /deps/catch.cmake: -------------------------------------------------------------------------------- 1 | include(FetchContent) 2 | 3 | FetchContent_Declare( 4 | catch 5 | URL https://github.com/catchorg/Catch2/releases/download/v2.11.3/catch.hpp 6 | URL_HASH SHA1=C127EBB7A4F65C6CEFF7587C8EF18F84A74D6C15 7 | DOWNLOAD_NO_EXTRACT TRUE 8 | DOWNLOAD_DIR ${CMAKE_CURRENT_BINARY_DIR}/catch-src 9 | ) 10 | 11 | FetchContent_GetProperties(catch) 12 | if(NOT catch_POPULATED) 13 | FetchContent_Populate(catch) 14 | 15 | find_package(Threads) 16 | 17 | add_library(catch INTERFACE) 18 | target_include_directories(catch INTERFACE ${CMAKE_CURRENT_BINARY_DIR}/catch-src) 19 | target_compile_features(catch INTERFACE cxx_std_11) 20 | endif() 21 | -------------------------------------------------------------------------------- /cpp/tests/fuzz/NullLogHandler.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef OPENDNP3_NULLLOGHANDLER_H 3 | #define OPENDNP3_NULLLOGHANDLER_H 4 | 5 | #include "opendnp3/logging/Logger.h" 6 | 7 | class NullLogHandler : public opendnp3::ILogHandler 8 | { 9 | void log(opendnp3::ModuleId module, 10 | const char* id, 11 | opendnp3::LogLevel level, 12 | char const* location, 13 | char const* message) override {} 14 | }; 15 | 16 | class NullLogger 17 | { 18 | public: 19 | opendnp3::Logger get_logger() const { 20 | return opendnp3::Logger(this->handler, opendnp3::ModuleId(0), "logger", opendnp3::LogLevels(~0)); 21 | } 22 | 23 | private: 24 | std::shared_ptr handler; 25 | }; 26 | 27 | #endif // OPENDNP3_NULLLOGHANDLER_H 28 | -------------------------------------------------------------------------------- /generation/dnp3/pom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4.0.0 4 | 5 | 6 | com.automatak.render 7 | opendnp3-generation 8 | 1.0.0 9 | 10 | 11 | opendnp3-generation-dnp3 12 | jar 13 | 14 | 15 | 16 | com.automatak.render 17 | opendnp3-generation-render 18 | 1.0.0 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /config/src-header.inc: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to Green Energy Corp (www.greenenergycorp.com) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with this 4 | * work for additional information regarding copyright ownership. Green Enery 5 | * Corp licenses this file to you under the Apache License, Version 2.0 (the 6 | * "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | -------------------------------------------------------------------------------- /deps/asio.cmake: -------------------------------------------------------------------------------- 1 | include(FetchContent) 2 | 3 | FetchContent_Declare( 4 | asio 5 | URL https://github.com/chriskohlhoff/asio/archive/asio-1-16-0.zip 6 | URL_HASH SHA1=6BDD33522D5B95B36445ABB2072A481F7CE15402 7 | ) 8 | 9 | FetchContent_GetProperties(asio) 10 | if(NOT asio_POPULATED) 11 | FetchContent_Populate(asio) 12 | 13 | find_package(Threads) 14 | 15 | add_library(asio INTERFACE) 16 | target_include_directories(asio INTERFACE ${asio_SOURCE_DIR}/asio/include) 17 | target_compile_definitions(asio INTERFACE ASIO_STANDALONE) 18 | target_compile_features(asio INTERFACE cxx_std_11) 19 | target_link_libraries(asio INTERFACE Threads::Threads) 20 | 21 | if(WIN32) 22 | target_link_libraries(asio INTERFACE ws2_32 wsock32) # Link to Winsock 23 | target_compile_definitions(asio INTERFACE _WIN32_WINNT=0x0601) # Windows 7 and up 24 | endif() 25 | endif() 26 | -------------------------------------------------------------------------------- /java/AUTOMATAK_FILE_HEADER: -------------------------------------------------------------------------------- 1 | Copyright 2013-2022 Step Function I/O, LLC 2 | 3 | Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 4 | LLC (https://stepfunc.io) under one or more contributor license agreements. 5 | See the NOTICE file distributed with this work for additional information 6 | regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 7 | this file to you under the Apache License, Version 2.0 (the "License"); you 8 | may not use this file except in compliance with the License. You may obtain 9 | a copy of the License at: 10 | 11 | http://www.apache.org/licenses/LICENSE-2.0 12 | 13 | Unless required by applicable law or agreed to in writing, software 14 | distributed under the License is distributed on an "AS IS" BASIS, 15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | See the License for the specific language governing permissions and 17 | limitations under the License. 18 | -------------------------------------------------------------------------------- /config/APACHE_LICENSE_HEADER: -------------------------------------------------------------------------------- 1 | Copyright 2013-2022 Step Function I/O, LLC 2 | 3 | Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 4 | LLC (https://stepfunc.io) under one or more contributor license agreements. 5 | See the NOTICE file distributed with this work for additional information 6 | regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 7 | this file to you under the Apache License, Version 2.0 (the "License"); you 8 | may not use this file except in compliance with the License. You may obtain 9 | a copy of the License at: 10 | 11 | http://www.apache.org/licenses/LICENSE-2.0 12 | 13 | Unless required by applicable law or agreed to in writing, software 14 | distributed under the License is distributed on an "AS IS" BASIS, 15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | See the License for the specific language governing permissions and 17 | limitations under the License. 18 | -------------------------------------------------------------------------------- /generation/AUTOMATAK_FILE_HEADER: -------------------------------------------------------------------------------- 1 | Copyright 2013-2022 Step Function I/O, LLC 2 | 3 | Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 4 | LLC (https://stepfunc.io) under one or more contributor license agreements. 5 | See the NOTICE file distributed with this work for additional information 6 | regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 7 | this file to you under the Apache License, Version 2.0 (the "License"); you 8 | may not use this file except in compliance with the License. You may obtain 9 | a copy of the License at: 10 | 11 | http://www.apache.org/licenses/LICENSE-2.0 12 | 13 | Unless required by applicable law or agreed to in writing, software 14 | distributed under the License is distributed on an "AS IS" BASIS, 15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | See the License for the specific language governing permissions and 17 | limitations under the License. 18 | -------------------------------------------------------------------------------- /cpp/tests/fuzz/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | add_executable (fuzzdecoder ./onefile.cpp ./fuzzdecoder.cpp) 3 | target_link_libraries (fuzzdecoder PRIVATE opendnp3) 4 | target_include_directories(fuzzdecoder PRIVATE ./) 5 | set_target_properties(fuzzdecoder PROPERTIES FOLDER cpp/tests/fuzzing) 6 | clang_format(fuzzdecoder) 7 | clang_tidy(fuzzdecoder) 8 | 9 | add_executable (fuzzoutstation ./onefile.cpp ./fuzzoutstation.cpp) 10 | target_link_libraries (fuzzoutstation PRIVATE catch dnp3mocks) 11 | target_include_directories(fuzzoutstation PRIVATE ./) 12 | set_target_properties(fuzzoutstation PROPERTIES FOLDER cpp/tests/fuzzing) 13 | clang_format(fuzzoutstation) 14 | clang_tidy(fuzzoutstation) 15 | 16 | add_executable (fuzzmaster ./onefile.cpp ./fuzzmaster.cpp) 17 | target_link_libraries (fuzzmaster PRIVATE catch dnp3mocks) 18 | target_include_directories(fuzzmaster PRIVATE ./) 19 | set_target_properties(fuzzmaster PROPERTIES FOLDER cpp/tests/fuzzing) 20 | clang_format(fuzzmaster) 21 | clang_tidy(fuzzmaster) -------------------------------------------------------------------------------- /dotnet/nuget/build/opendnp3.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | $(MSBuildThisFileDirectory)..\runtime\x86\DNP3CLRAdapter.dll 6 | 7 | 8 | $(MSBuildThisFileDirectory)..\runtime\x86\DNP3CLRInterface.dll 9 | 10 | 11 | $(MSBuildThisFileDirectory)..\runtime\x64\DNP3CLRAdapter.dll 12 | 13 | 14 | $(MSBuildThisFileDirectory)..\runtime\x64\DNP3CLRInterface.dll 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /dotnet/nuget/.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | @CPACK_PACKAGE_NAME@ 6 | @PROJECT_VERSION@ 7 | @CPACK_PACKAGE_DESCRIPTION_SUMMARY@ 8 | @CPACK_PACKAGE_DESCRIPTION@ 9 | @CPACK_PACKAGE_VENDOR@ 10 | @CPACK_PACKAGE_HOMEPAGE_URL@ 11 | Apache-2.0 12 | https://licenses.nuget.org/Apache-2.0 13 | This package includes both x86 and x64 binaries. You must specify the target platform in your IDE (i.e. you cannot use "AnyCPU") 14 | 15 | This package depends on VC++ 2019 runtime and OpenSSL 1.1.1. 16 | 17 | dnp3 SCADA protocol 18 | 19 | 20 | -------------------------------------------------------------------------------- /java/bindings/src/test/java/com/automatak/dnp3/impl/ExceptionHandlingTest.java: -------------------------------------------------------------------------------- 1 | package com.automatak.dnp3.impl; 2 | 3 | import com.automatak.dnp3.*; 4 | import com.automatak.dnp3.impl.mocks.NullLogHandler; 5 | import com.automatak.dnp3.mock.PrintingChannelListener; 6 | import org.junit.Test; 7 | 8 | import java.util.Collections; 9 | 10 | public class ExceptionHandlingTest { 11 | 12 | @Test(expected = DNP3Exception.class) 13 | public void testCreateTcpClientFromShutdownManager() throws DNP3Exception { 14 | DNP3Manager manager = DNP3ManagerFactory.createManager(4, new NullLogHandler()); 15 | manager.shutdown(); 16 | 17 | Channel channel = manager.addTCPClient( 18 | "client", 19 | LogMasks.NORMAL | LogMasks.APP_COMMS, 20 | ChannelRetry.getDefault(), 21 | Collections.singletonList(new IPEndpoint("127.0.0.1", 20000)), 22 | "0.0.0.0", 23 | PrintingChannelListener.getInstance() 24 | ); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /NOTICE: -------------------------------------------------------------------------------- 1 | ========================================================================= 2 | == NOTICE file corresponding to the section 4 d of == 3 | == the Apache License, Version 2.0, == 4 | == in this case for the opendnp3 == 5 | ========================================================================= 6 | 7 | This product includes software developed by Green Energy Corp 8 | (http://www.greenenergycorp.com/) and Step Function I/O LLC (https://stepfunc.io). 9 | 10 | The homepage for opendnp3 is: 11 | 12 | https://dnp3.github.io 13 | 14 | Please read the LICENSE file present in the root directory of this 15 | distribution. 16 | 17 | Aside from contributions to the oepdnp3 distribution listed above, this repository 18 | also distributes the following 3rd party softare: 19 | 20 | https://github.com/philsquared/Catch (test only dependency) 21 | 22 | Project requires, but specified as a git-submodule: 23 | * ASIO (https://github.com/chriskohlhoff/asio) 1.10.6 or later 24 | -------------------------------------------------------------------------------- /cpp/tests/unit/main.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | #define CATCH_CONFIG_MAIN 21 | #include 22 | -------------------------------------------------------------------------------- /cpp/tests/asiotests/main.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | #define CATCH_CONFIG_MAIN 21 | #include 22 | -------------------------------------------------------------------------------- /cpp/tests/integration/main.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | #define CATCH_CONFIG_MAIN 21 | #include 22 | -------------------------------------------------------------------------------- /cpp/lib/src/outstation/IOutstationApplication.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | #include "opendnp3/outstation/IOutstationApplication.h" 21 | -------------------------------------------------------------------------------- /cpp/tests/integration/mocks/NullSOEHandler.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | 21 | #include "mocks/NullSOEHandler.h" 22 | 23 | NullSOEHandler NullSOEHandler::instance; 24 | -------------------------------------------------------------------------------- /dotnet/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | string(REGEX REPLACE "[^0-9]" "" framework_folder_name ${DNP3_DOTNET_FRAMEWORK_VERSION}) 2 | string(PREPEND "net" framework_folder_name) 3 | 4 | add_subdirectory(./CLRInterface) 5 | add_subdirectory(./CLRAdapter) 6 | 7 | if(DNP3_EXAMPLES) 8 | add_subdirectory(./examples/master) 9 | add_subdirectory(./examples/master-gprs) 10 | add_subdirectory(./examples/master-gprs-tls) 11 | add_subdirectory(./examples/outstation) 12 | endif() 13 | 14 | # CMake NuGet generation support 15 | set(CPACK_NUGET_PACKAGE_DESCRIPTION_SUMMARY "OpenDNP3 is the de facto reference implementation of IEEE-1815 (DNP3), a standards-based SCADA protocol.") 16 | set(CPACK_NUGET_PACKAGE_COPYRIGHT "Green Energy Corp, Step Function I/O LLC, and contributors") 17 | set(CPACK_NUGET_PACKAGE_LICENSEURL "https://github.com/dnp3/opendnp3/blob/develop/LICENSE") 18 | 19 | # Manual NuGet generation (to support both x86 and x64) 20 | configure_file(./nuget/.nuspec nuget/.nuspec @ONLY) 21 | configure_file(./nuget/build/opendnp3.props nuget/build/opendnp3.props COPYONLY) 22 | configure_file(./nuget/build/opendnp3.targets nuget/build/opendnp3.targets COPYONLY) 23 | -------------------------------------------------------------------------------- /config/gecapache.licenseheader: -------------------------------------------------------------------------------- 1 | 2 | extensions: .cs .cpp .h 3 | 4 | // 5 | // Licensed to Green Energy Corp (www.greenenergycorp.com) under one or 6 | // more contributor license agreements. See the NOTICE file distributed 7 | // with this work for additional information regarding copyright ownership. 8 | // Green Energy Corp licenses this file to you under the Apache License, 9 | // Version 2.0 (the "License"); you may not use this file except in 10 | // compliance with the License. You may obtain a copy of the License at 11 | // 12 | // http://www.apache.org/licenses/LICENSE-2.0 13 | // 14 | // Unless required by applicable law or agreed to in writing, software 15 | // distributed under the License is distributed on an "AS IS" BASIS, 16 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | // See the License for the specific language governing permissions and 18 | // limitations under the License. 19 | // 20 | // This file was forked on 01/01/2013 by Step Function I/O, LLC and modifications 21 | // have been made to this file. Step Function I/O, LLC licenses these modifications to 22 | // you under the terms of the License. 23 | // 24 | -------------------------------------------------------------------------------- /java/bindings/src/main/java/com/automatak/dnp3/mock/OutputHandler.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | package com.automatak.dnp3.mock; 21 | 22 | public interface OutputHandler { 23 | void handleOutput(String output); 24 | } -------------------------------------------------------------------------------- /generation/render/src/main/scala/com/automatak/render/Indentation.scala: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | package com.automatak.render 21 | 22 | trait Indentation { 23 | 24 | def apply(f: => Iterator[String]): Iterator[String] 25 | 26 | } 27 | -------------------------------------------------------------------------------- /cpp/tests/asiotests/certs/ca_chain/entity1_cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIDDzCCAfcCFCZeRM8pg1kvbiuJCR/t7jbGkt16MA0GCSqGSIb3DQEBCwUAMEkx 3 | CzAJBgNVBAYTAlVTMQswCQYDVQQIDAJPUjENMAsGA1UEBwwEQmVuZDEeMBwGA1UE 4 | CgwVQWNtZSBDZXJ0aWZpY2F0ZSBDb3JwMCAXDTIwMDUxMjIzMjk0MloYDzIxMTgx 5 | MjA1MjMyOTQyWjA9MQswCQYDVQQGEwJVUzELMAkGA1UECAwCT1IxITAfBgNVBAoM 6 | GEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDCCASIwDQYJKoZIhvcNAQEBBQADggEP 7 | ADCCAQoCggEBALfBaGJyxI/4b1Xy7rbP/9McGFLmDwC6v56v79DW1NBkNpevAGee 8 | oZ/zHsm35IZDB1CkJjw1KIcDY3GRsHlynKhCmxkjOMBU5HBl6H2sclOYEb/CTqh2 9 | kpBxMpaBPU4jIX+N+J4S1dm94DD+qiZvIKbZeVBuDWgpf0OGo1b9ysBDNV24CP6V 10 | Xv636kEJNTre5bjSKCt0T1E4CdD8/cMs1n/HHf0yE+jZvhj4tYzFC6OgBlQxykKG 11 | DKyNc9KQIx/7XeAQHSPyZa/rIkjaAiwLbWF0w+u0rhzPnr1yVlJnr/l+Mc5u5uUK 12 | ei4Jz/n3E6xcDnfnz4wtzYwhJZfnvQtWJLECAwEAATANBgkqhkiG9w0BAQsFAAOC 13 | AQEAdRxOM1yH/0fnZZmQ5yvdvzRtJtlgBNxZjqeIFGx5yWil/7GstlH9PW0JicGl 14 | /uQ99SUi17rW9I3BQxhWLsAHbuizJHCQZqsYfzefOhEengUe2KDenlMCcol8HI3x 15 | FwiV4hhg/ePbiEYmZwlyBcUUI94OiyLLO9Ek9QQSSeuyWHGCPBTdD2eC+l5IO+Fh 16 | idwgrrQym/BI76EjTEKg+S/jn89oJkHOJtCH3aiycmVjg/D6zxxNUXmHliq7pGNZ 17 | hpQExrXmTms3cv1ibxiZUUjOREimTDwghLZAXTYXf6rWwZ951KUo2zoBLL0TnEdt 18 | F27sh/ciCm1ep+9M8mcNlE1t5A== 19 | -----END CERTIFICATE----- 20 | -------------------------------------------------------------------------------- /cpp/tests/asiotests/certs/ca_chain/entity2_cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIDDzCCAfcCFCZeRM8pg1kvbiuJCR/t7jbGkt17MA0GCSqGSIb3DQEBCwUAMEkx 3 | CzAJBgNVBAYTAlVTMQswCQYDVQQIDAJPUjENMAsGA1UEBwwEQmVuZDEeMBwGA1UE 4 | CgwVQWNtZSBDZXJ0aWZpY2F0ZSBDb3JwMCAXDTIwMDUxMjIzMzA0MloYDzIxMTgx 5 | MjA1MjMzMDQyWjA9MQswCQYDVQQGEwJVUzELMAkGA1UECAwCT1IxITAfBgNVBAoM 6 | GEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDCCASIwDQYJKoZIhvcNAQEBBQADggEP 7 | ADCCAQoCggEBALN036Sap5g3yd6/JC9M+9hwH/9XsXOhoN6YPbHwEQPTx/CTnQfL 8 | HGFnMcI2aN/JCOLjWMGpyCq5SS2o6nuQy9LB8TsKubtf5LxBb/jzwAEHk9sudsMl 9 | 8pfJ/Wtc49WrMsCD6Lo884zrFRnCMInZmEo3pZPFCe1oAnLg0McjTkoOEUfg+Gex 10 | k6WuBA6W+gGUmcmDLEkuuF4U6fBCqI0cRDKjgs0PLlqlEKQt4Ji6bgCoVE0I6qx8 11 | jT3B1InN8+pUm8AU6mGKk6GSVEuass0EA9p9KqwplP/DBu8xQX2Xftb+T9zkS46E 12 | 3oom1nHtZzDrdwKw6df9sPAtknGqBFwK/KMCAwEAATANBgkqhkiG9w0BAQsFAAOC 13 | AQEAdQ47sqRYyUnP7WFrptwne/5X6cW6pxZhA7WWcbpjmVvg5tyhfZDkCXwsJ8Rk 14 | ogQatS8XIFSFyC6qkV5F5iEBnTkRC8XnNb1iE925IPc9Vz8PnrM8vUuCaOhKxg+8 15 | k2Udmk5pKJ1VCMcokiM5e+kih9J4eYLuCPklCS5BbLTv6cBhLmtacsjDS4McfxbD 16 | F7fCvSj7dvmcUTjEmi2Z5iQkN40+mZHbBTEwsSasNvsZwaQCUiHfM0gBKPS2N145 17 | O4DgHU2XtP4Bf05nVstbTYNAp2Nu05/5e6gTylKZsX6E57j/YAWAr6qTQ19HjsOv 18 | oEp72DAZNPmdd9NjLRoCeD/NjA== 19 | -----END CERTIFICATE----- 20 | -------------------------------------------------------------------------------- /java/bindings/src/main/java/com/automatak/dnp3/mock/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | /** 21 | * A package of mock callback implementations. 22 | * 23 | * Not useful for real world applications, but good for demos. 24 | */ 25 | package com.automatak.dnp3.mock; -------------------------------------------------------------------------------- /java/bindings/src/main/java/com/automatak/dnp3/DNP3Exception.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | package com.automatak.dnp3; 21 | 22 | public class DNP3Exception extends Exception { 23 | public DNP3Exception(String message) 24 | { 25 | super(message); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /generation/render/src/main/scala/com/automatak/render/cpp/EnumConfig.scala: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | package com.automatak.render.cpp 21 | 22 | import com.automatak.render.EnumModel 23 | 24 | case class EnumConfig(model: EnumModel, intConv: Boolean, stringConv: Boolean, serialization: Boolean) 25 | 26 | -------------------------------------------------------------------------------- /cpp/lib/src/app/AppSeqNum.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | #ifndef OPENDNP3_APPSEQNUM_H 21 | #define OPENDNP3_APPSEQNUM_H 22 | 23 | #include "SequenceNum.h" 24 | 25 | #include 26 | 27 | namespace opendnp3 28 | { 29 | 30 | using AppSeqNum = SequenceNum; 31 | 32 | } 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /dotnet/CLRAdapter/src/ICommandHeaderWorkAround.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | 21 | #ifndef OPENDNP3CLR_ICOMMAND_HEADER_WORKAROUND_H 22 | #define OPENDNP3CLR_ICOMMAND_HEADER_WORKAROUND_H 23 | 24 | namespace opendnp3 25 | { 26 | class ICommandHeader 27 | { 28 | 29 | }; 30 | } 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /dotnet/CLRAdapter/src/StdIOWorkaround.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | #include "StdIOWorkaround.h" 21 | 22 | #if (_MSC_VER >= 1900) 23 | 24 | /* 25 | FILE _iob[] = { *stdin, *stdout, *stderr }; 26 | 27 | extern "C" FILE * __cdecl __iob_func(void) 28 | { 29 | return _iob; 30 | } 31 | */ 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /cpp/lib/src/app/SequenceInfo.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | #ifndef OPENDNP3_SEQUENCEINFO_H 21 | #define OPENDNP3_SEQUENCEINFO_H 22 | 23 | namespace opendnp3 24 | { 25 | 26 | enum class SequenceInfo 27 | { 28 | OTHER, 29 | PREVIOUS, 30 | CORRECT 31 | }; 32 | 33 | } // namespace opendnp3 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /java/bindings/src/main/java/com/automatak/dnp3/CommandHeaders.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | package com.automatak.dnp3; 21 | 22 | /** 23 | * A CommandHeaders is something that can send some info to a CommandBuilder 24 | */ 25 | public interface CommandHeaders 26 | { 27 | void build(CommandBuilder builder); 28 | }; -------------------------------------------------------------------------------- /cpp/lib/src/outstation/event/EventRecord.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | 21 | #include "EventRecord.h" 22 | 23 | namespace opendnp3 24 | { 25 | 26 | EventRecord::EventRecord(uint16_t index, EventClass clazz) 27 | : 28 | 29 | index(index), 30 | clazz(clazz) 31 | { 32 | } 33 | 34 | } // namespace opendnp3 35 | -------------------------------------------------------------------------------- /cpp/lib/src/master/HeaderBuilder.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | #ifndef OPENDNP3_HEADERBUILDER_H 21 | #define OPENDNP3_HEADERBUILDER_H 22 | 23 | #include "app/HeaderWriter.h" 24 | 25 | #include 26 | 27 | namespace opendnp3 28 | { 29 | 30 | typedef std::function HeaderBuilderT; 31 | } 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /cpp/lib/src/master/IScheduleCallback.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | #ifndef OPENDNP3_ISCHEDULECALLBACK_H 21 | #define OPENDNP3_ISCHEDULECALLBACK_H 22 | 23 | namespace opendnp3 24 | { 25 | 26 | class IScheduleCallback 27 | { 28 | public: 29 | virtual void OnPendingTask() = 0; 30 | }; 31 | 32 | } // namespace opendnp3 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /cpp/lib/src/transport/TransportSeqNum.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | #ifndef OPENDNP3_TRANSPORTSEQNUM_H 21 | #define OPENDNP3_TRANSPORTSEQNUM_H 22 | 23 | #include "SequenceNum.h" 24 | 25 | #include 26 | 27 | namespace opendnp3 28 | { 29 | 30 | typedef SequenceNum TransportSeqNum; 31 | 32 | } 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /dotnet/CLRAdapter/src/StdIOWorkaround.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | 21 | 22 | #if (_MSC_VER >= 1900) 23 | 24 | /* 25 | http://stackoverflow.com/questions/30412951/unresolved-external-symbol-imp-fprintf-and-imp-iob-func-sdl2 26 | */ 27 | 28 | #include 29 | 30 | //extern "C" FILE * __cdecl __iob_func(void); 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /generation/render/src/main/scala/com/automatak/render/ModelRenderer.scala: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | package com.automatak.render 21 | 22 | /** 23 | * Converts some type into a line iterator 24 | * @tparam A 25 | */ 26 | trait ModelRenderer[A] { 27 | 28 | def render(a: A)(implicit i: Indentation): Iterator[String] 29 | 30 | } 31 | -------------------------------------------------------------------------------- /cpp/lib/src/outstation/IINHelpers.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | #ifndef OPENDNP3_IINHELPERS_H 21 | #define OPENDNP3_IINHELPERS_H 22 | 23 | #include "app/parsing/ParseResult.h" 24 | 25 | #include "opendnp3/app/IINField.h" 26 | 27 | namespace opendnp3 28 | { 29 | 30 | IINField IINFromParseResult(ParseResult result); 31 | } 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /dotnet/CLRInterface/src/gen/ILinkStatusListener.cs: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // Licensed to Green Energy Corp (www.greenenergycorp.com) under one or 4 | // more contributor license agreements. See the NOTICE file distributed 5 | // with this work for additional information regarding copyright ownership. 6 | // Green Energy Corp licenses this file to you under the Apache License, 7 | // Version 2.0 (the "License"); you may not use this file except in 8 | // compliance with the License. You may obtain a copy of the License at 9 | // 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | // 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | // 18 | // This file was forked on 01/01/2013 by Step Function I/O, LLC and modifications 19 | // have been made to this file. Step Function I/O, LLC licenses these modifications to 20 | // you under the terms of the License. 21 | // 22 | 23 | namespace Automatak.DNP3.Interface 24 | { 25 | public interface ILinkListener 26 | { 27 | void OnStateChange(LinkStatus value); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /cpp/tests/asiotests/certs/self_signed/entity1_cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIDTTCCAjWgAwIBAgIJALunynUE8K2oMA0GCSqGSIb3DQEBCwUAMD0xCzAJBgNV 3 | BAYTAlVTMQswCQYDVQQIDAJOQzEhMB8GA1UECgwYSW50ZXJuZXQgV2lkZ2l0cyBQ 4 | dHkgTHRkMB4XDTE3MDcwNjE5MjQxOFoXDTI3MDcwNDE5MjQxOFowPTELMAkGA1UE 5 | BhMCVVMxCzAJBgNVBAgMAk5DMSEwHwYDVQQKDBhJbnRlcm5ldCBXaWRnaXRzIFB0 6 | eSBMdGQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDKO/V9/YnVyNrp 7 | X6g6divKZe4uQMDu/HCr3icj/wvIGbYnXsL2q/RcRZ3AblRZaE1VCz2Zdpas19ib 8 | BnX3e7s7z/5/ZylabSNzZNUz8LNpvybDEVHaHbv3w2GWBuZyJPU8BThfWvai9Oa9 9 | SJTXa7SbR1ieeCGSi+GbXm94oQ8QvasOkPiBVFnIqc66wYjalIi20U4+dm2Cu5Mj 10 | nbKLrQ2rO9HtUJ6D9cixCtUsvAJX7nbK1hmMe7YjmU7HmznuAsk7Xbg11ngK3NJW 11 | 4X5MWrLuNV/aPh3jb10SMg0aNA5d6fT3PbgSyS6ePS5IDVU2kxfNI3czy7oc98IZ 12 | QkR01RiLAgMBAAGjUDBOMB0GA1UdDgQWBBS0bRL03x9ZT7ALfxjcsU5O1lANaTAf 13 | BgNVHSMEGDAWgBS0bRL03x9ZT7ALfxjcsU5O1lANaTAMBgNVHRMEBTADAQH/MA0G 14 | CSqGSIb3DQEBCwUAA4IBAQBCsf0atdmaTaR4LqKjPPjn9G4AIrV/yGdROR18QNut 15 | zIyy/eDt+ahkwtj9Kg51k6V1FuM3LV8xd88PS4jyXC0Q8foF5y6qprdEN0rlfsR6 16 | DRxx3uF8cHIV6oM6RRmprP2mp4TaIWbD5aUGkZWxTYFn9fLM3CwsH1q6OS66K3m0 17 | +decNPfrV1NfD6+HcjCtGcNsL8GA/NCZCO2qUzRe9BkX8jFm6Opw7dCqmmU89+X3 18 | mIQX5SSFsmJieEDbknbMb0YFwuqrSbgqW9i8kKnrFcjy7oJyp6V7qEMFtsFg7S4F 19 | jTyLtpYPlY4/tB4g6VlUDIvXFQW/RHXSAMHCUofFO/j6 20 | -----END CERTIFICATE----- 21 | -------------------------------------------------------------------------------- /cpp/tests/asiotests/certs/self_signed/entity2_cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIDTTCCAjWgAwIBAgIJALztSg/IjyZkMA0GCSqGSIb3DQEBCwUAMD0xCzAJBgNV 3 | BAYTAlVTMQswCQYDVQQIDAJOQzEhMB8GA1UECgwYSW50ZXJuZXQgV2lkZ2l0cyBQ 4 | dHkgTHRkMB4XDTE3MDcwNjE5MjQ0MVoXDTI3MDcwNDE5MjQ0MVowPTELMAkGA1UE 5 | BhMCVVMxCzAJBgNVBAgMAk5DMSEwHwYDVQQKDBhJbnRlcm5ldCBXaWRnaXRzIFB0 6 | eSBMdGQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCtbAuN/MjpHJh8 7 | /H0eXdHfgqUY+gIpHfXHyTyqixfdIFwBEoutmV7unaEzJT2vmPNA9IFVpGSW0yFb 8 | Wgr4tGB6mBCjJsHEELJCdZl1JVz/lg7vPpDY8BzCCtAP+K0IefkNNLycY0VQiGj2 9 | v7+lTgI/hgJNh8l4bYH0WmRRs//qsqH/wnSNCyCpRC4IexvEdMrcLZ0wBi7LRhrl 10 | D3kjZDPQ61V4/iDgWo8ygMIff8G11ka/CoJMNVsDgo+TW63r03PjmGm8QVJuM79f 11 | vIiv8zDjy1eKW+oT+ixuGtBCX2/xkZVUqYcu6rx/vMBBwJNk7mTEy8hHxgo5FHkp 12 | /MewWyRpAgMBAAGjUDBOMB0GA1UdDgQWBBSN/PdCO0kFRq5h8GAWfa9NgzdwnzAf 13 | BgNVHSMEGDAWgBSN/PdCO0kFRq5h8GAWfa9NgzdwnzAMBgNVHRMEBTADAQH/MA0G 14 | CSqGSIb3DQEBCwUAA4IBAQBwEKbVvXvr6ChFQwMM4if1Mp8+SxzolW8xtSaeCaRM 15 | 4LL7P2LJdMxDhC/bjCgeeTN+SfrjM3QiiyVxk2ZrcRJbwKnkqE1R6OWUXHvbicvE 16 | IMBQp+5JHhYp+TJRwdgL/jmc7eruUD1O8lRtBX8AEdRZFyoG06JthzQvyObuxTi1 17 | 50OQ4iR9qrIXsLALFJbftDYgAT2nFX2iM8Cpq/jyQ7YcIKR8iCCaGBbHurFEFA/O 18 | xdBrLFyAH2BcVVpYrwOf/DhOczwcrRtYW8oKMRjwXYDZG3+tsyTADRicjdmUsl13 19 | tqGLqqK+CHC2t0xtasE/0kAiHxFugA2pFCbgRub2iun1 20 | -----END CERTIFICATE----- 21 | -------------------------------------------------------------------------------- /cpp/tests/unit/utils/DNPHelpers.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | #ifndef OPENDNP3_UNITTESTS_DNP_HELPERS_H 21 | #define OPENDNP3_UNITTESTS_DNP_HELPERS_H 22 | 23 | #include 24 | 25 | #include 26 | 27 | std::string RepairCRC(const std::string& arData); 28 | 29 | std::string ToHex(opendnp3::LinkFrame& frame); 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /java/bindings/src/main/java/com/automatak/dnp3/EventConfig.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | package com.automatak.dnp3; 21 | 22 | import com.automatak.dnp3.enums.PointClass; 23 | 24 | public class EventConfig { 25 | 26 | public EventConfig() { 27 | this.clazz = PointClass.Class1; 28 | } 29 | 30 | public PointClass clazz; 31 | } 32 | -------------------------------------------------------------------------------- /cpp/tests/integration/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(integrationtests_headers 2 | ./mocks/CountingSOEHandler.h 3 | ./mocks/ExpectedValue.h 4 | ./mocks/NullSOEHandler.h 5 | ./mocks/PerformanceStackPair.h 6 | ./mocks/QueuedChannelListener.h 7 | ./mocks/QueuingSOEHandler.h 8 | ./mocks/StackPair.h 9 | ./mocks/SynchronizedQueue.h 10 | ) 11 | 12 | set(integrationtests_src 13 | ./main.cpp 14 | 15 | ./TestDeadlock.cpp 16 | ./TestDNP3Manager.cpp 17 | ./TestEventIntegration.cpp 18 | ./TestMasterServerSmoke.cpp 19 | ./TestPerformance.cpp 20 | 21 | ./mocks/NullSOEHandler.cpp 22 | ./mocks/PerformanceStackPair.cpp 23 | ./mocks/StackPair.cpp 24 | ) 25 | 26 | source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} 27 | FILES ${integrationtests_headers} ${integrationtests_src} 28 | ) 29 | 30 | add_executable(integrationtests 31 | ${integrationtests_headers} ${integrationtests_src} 32 | ) 33 | target_compile_features(integrationtests PRIVATE cxx_std_14) 34 | target_link_libraries(integrationtests PRIVATE catch opendnp3 dnp3mocks) 35 | target_include_directories(integrationtests PRIVATE ./) 36 | set_target_properties(integrationtests PROPERTIES FOLDER cpp/tests) 37 | add_test(NAME integrationtests COMMAND integrationtests) 38 | 39 | clang_format(integrationtests) 40 | clang_tidy(integrationtests) 41 | -------------------------------------------------------------------------------- /java/bindings/src/main/java/com/automatak/dnp3/impl/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | /** 21 | * A package for all of the native implementation classes and adapters 22 | * The is only one public class, DNP3ManagerFactory that is used 23 | * to obtain a concrete implementation of the DNP3Manager interface. 24 | */ 25 | package com.automatak.dnp3.impl; -------------------------------------------------------------------------------- /java/bindings/src/main/java/com/automatak/dnp3/OctetString.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | package com.automatak.dnp3; 21 | 22 | 23 | /** 24 | * A byte[] measurement type 25 | */ 26 | public class OctetString 27 | { 28 | public final byte[] value; 29 | 30 | public OctetString(byte[] value) 31 | { 32 | this.value = value; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /java/bindings/src/test/java/com/automatak/dnp3/impl/mocks/NullLogHandler.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | package com.automatak.dnp3.impl.mocks; 21 | 22 | import com.automatak.dnp3.LogEntry; 23 | import com.automatak.dnp3.LogHandler; 24 | 25 | public class NullLogHandler implements LogHandler { 26 | 27 | @Override 28 | public void log(LogEntry entry) {} 29 | 30 | } 31 | -------------------------------------------------------------------------------- /cpp/lib/src/logging/Location.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | #ifndef OPENDNP3_LOCATION_H 21 | #define OPENDNP3_LOCATION_H 22 | 23 | #define STRINGIFY(x) #x 24 | #define TOSTRING(x) STRINGIFY(x) 25 | 26 | #ifndef OPENDNP3_SUPPRESS_LOG_LOCATION 27 | #define LOCATION __FILE__ "(" TOSTRING(__LINE__) ")" 28 | #else 29 | #define LOCATION "" 30 | #endif 31 | 32 | #endif // OPENDNP3_LOCATION_H 33 | -------------------------------------------------------------------------------- /generation/render/src/main/scala/com/automatak/render/csharp/package.scala: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | package com.automatak.render 21 | 22 | package object csharp { 23 | 24 | def namespace(namespace: String)(inner: => Iterator[String])(implicit indent: Indentation): Iterator[String] = { 25 | Iterator("namespace " + namespace) ++ bracket { 26 | inner 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /cpp/tests/asiotests/certs/ca_chain/ca_cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIDdTCCAl2gAwIBAgIUYvI+Tjmd/vfaladcfoAkWT8jL6EwDQYJKoZIhvcNAQEL 3 | BQAwSTELMAkGA1UEBhMCVVMxCzAJBgNVBAgMAk9SMQ0wCwYDVQQHDARCZW5kMR4w 4 | HAYDVQQKDBVBY21lIENlcnRpZmljYXRlIENvcnAwIBcNMjAwNTEyMjMyMTMxWhgP 5 | MjEyMDA0MTgyMzIxMzFaMEkxCzAJBgNVBAYTAlVTMQswCQYDVQQIDAJPUjENMAsG 6 | A1UEBwwEQmVuZDEeMBwGA1UECgwVQWNtZSBDZXJ0aWZpY2F0ZSBDb3JwMIIBIjAN 7 | BgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAx22oU5MZSTHABE6hVLrzhGM7JQhC 8 | bBJ9lmC17817t2RGfCCv5KoaUGGExJCCVCmquAKbAXW2CDwcqp5R6N93Vm7cuqrl 9 | jtxzYFS/seQ7lx4mlb9hnYLgmP4QMSiiG17SXStSEsmaCcPJ9CjAt5ta0LYMaEze 10 | A7OXOPz/UKvJc89aE2ty6EI9FYVYLDMCr0pO5zRswePbP9AvswgmC3cPlRJJetS6 11 | ax5u78IU5TNSRThdMjTgXg7YQxoiUDyZUdi9bY5i6nRpUz2Rr5/jt71kXCY9Cj45 12 | 5uJroghGkJHfPh8yFyIDJ4oFjdnsvM2hyqBgXm8A6afFhVJy34/jX1RKkwIDAQAB 13 | o1MwUTAdBgNVHQ4EFgQUiDkaMiwCpXE9SJUn3Xrz+bT37k4wHwYDVR0jBBgwFoAU 14 | iDkaMiwCpXE9SJUn3Xrz+bT37k4wDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0B 15 | AQsFAAOCAQEAE8kgMhHW2GDajCC46ixM0EkpajQUpH/4J1K522BstCL5KE5gqiSy 16 | zzEJFd+T94Hl3vpZkmBvH/h8C7OzjU6Be6ZWYpAaIgKgK5j57SvadLZlbs2BeLjh 17 | ldRmqQLWs7tp2K5gYSNs6YeEey84zFOCYSENkH75JU5DZC2jV9PH+K9ayE5WL5hw 18 | XpIHnbAKMNk7A/VsES94fzyqz2TiQzOPdnNp8TqsvaXJ8V+u1zEtdK8iAE9Wt1t0 19 | OhKqW1aWlZ0l9OoX4zaxPPCk7OAWGNnZbQpZyvok2M//sBkrnftYarr0/3x2oXjQ 20 | wdZLIcvpxoJehK8EnlyGzIS9/NStvQavdQ== 21 | -----END CERTIFICATE----- 22 | -------------------------------------------------------------------------------- /cpp/lib/src/master/HeaderConversions.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | #ifndef OPENDNP3_CONVERSIONS_H 21 | #define OPENDNP3_CONVERSIONS_H 22 | 23 | #include "master/HeaderBuilder.h" 24 | 25 | #include "opendnp3/master/HeaderTypes.h" 26 | 27 | #include 28 | 29 | namespace opendnp3 30 | { 31 | 32 | HeaderBuilderT ConvertToLambda(const std::vector
& headers); 33 | 34 | } 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /cpp/lib/include/opendnp3/IResource.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | #ifndef OPENDNP3_IRESOURCE_H 21 | #define OPENDNP3_IRESOURCE_H 22 | 23 | namespace opendnp3 24 | { 25 | 26 | /** 27 | * Anything that can be shutdown 28 | */ 29 | struct IResource 30 | { 31 | public: 32 | virtual ~IResource() = default; 33 | 34 | virtual void Shutdown() = 0; 35 | }; 36 | 37 | } // namespace opendnp3 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /java/cpp/adapters/Conversions.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | #ifndef OPENDNP3_CONVERSIONS_H 21 | #define OPENDNP3_CONVERSIONS_H 22 | 23 | #include "../jni/JCache.h" 24 | 25 | #include "opendnp3/StackStatistics.h" 26 | 27 | class Conversions 28 | { 29 | public: 30 | static LocalRef ConvertStackStatistics(JNIEnv* env, const opendnp3::StackStatistics& stats); 31 | }; 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /cpp/lib/src/transport/TransportConstants.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | #ifndef OPENDNP3_TRANSPORTCONSTANTS_H 21 | #define OPENDNP3_TRANSPORTCONSTANTS_H 22 | 23 | #include 24 | 25 | namespace opendnp3 26 | { 27 | /// Maximum TPDU length 28 | const uint8_t MAX_TPDU_LENGTH = 250; 29 | /// Maximum TPDU payload size 30 | const uint8_t MAX_TPDU_PAYLOAD = 249; 31 | 32 | } // namespace opendnp3 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /cpp/lib/include/opendnp3/master/CommandResultCallbackT.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | #ifndef OPENDNP3_COMMANDRESULTCALLBACKT_H 21 | #define OPENDNP3_COMMANDRESULTCALLBACKT_H 22 | 23 | #include "opendnp3/master/ICommandTaskResult.h" 24 | 25 | #include 26 | 27 | namespace opendnp3 28 | { 29 | 30 | using CommandResultCallbackT = std::function; 31 | 32 | } 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /cpp/lib/src/master/ScanResult.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | #ifndef OPENDNP3_SCANRESULT_H 21 | #define OPENDNP3_SCANRESULT_H 22 | 23 | #include "opendnp3/gen/ScanStatus.h" 24 | 25 | namespace opendnp3 26 | { 27 | 28 | /** 29 | * A struct to hold status information about a particular poll/scan 30 | */ 31 | struct ScanResult 32 | { 33 | ScanStatus status; 34 | }; 35 | 36 | } // namespace opendnp3 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /java/bindings/src/main/java/com/automatak/dnp3/ChangeSet.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | package com.automatak.dnp3; 21 | 22 | /** 23 | * A set of measurement changes that can be applied to a database 24 | */ 25 | public interface ChangeSet 26 | { 27 | /** 28 | * Apply the change set 29 | * @param database The database to which to apply the changes 30 | */ 31 | void apply(Database database); 32 | } -------------------------------------------------------------------------------- /java/bindings/src/main/java/com/automatak/dnp3/LogHandler.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | package com.automatak.dnp3; 21 | 22 | /** 23 | * Interface used to bind to a stream of log messages 24 | */ 25 | public interface LogHandler { 26 | 27 | /** 28 | * Called when a new message is available 29 | * @param entry LogEntry corresponding to the event 30 | */ 31 | void log(LogEntry entry); 32 | 33 | } 34 | -------------------------------------------------------------------------------- /cpp/lib/src/app/IINValue.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | #ifndef OPENDNP3_IINVALUE_H 21 | #define OPENDNP3_IINVALUE_H 22 | 23 | namespace opendnp3 24 | { 25 | // a simple wrapper type to differentiate an IIN from a bool 26 | class IINValue 27 | { 28 | public: 29 | IINValue() : value(false) {} 30 | 31 | IINValue(bool value_) : value(value_) {} 32 | 33 | bool value; 34 | }; 35 | } // namespace opendnp3 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /cpp/lib/src/outstation/event/EventState.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | #ifndef OPENDNP3_EVENTSTATE_H 21 | #define OPENDNP3_EVENTSTATE_H 22 | 23 | #include 24 | 25 | namespace opendnp3 26 | { 27 | 28 | /* 29 | * The states of events in the event buffer 30 | */ 31 | enum class EventState : uint8_t 32 | { 33 | unselected, 34 | selected, 35 | written 36 | }; 37 | 38 | } // namespace opendnp3 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /cpp/lib/src/app/Functions.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | 21 | #ifndef OPENDNP3_FUNCTIONS_H 22 | #define OPENDNP3_FUNCTIONS_H 23 | 24 | #include "opendnp3/gen/FunctionCode.h" 25 | #include "opendnp3/util/StaticOnly.h" 26 | 27 | namespace opendnp3 28 | { 29 | 30 | class Functions : private StaticOnly 31 | { 32 | public: 33 | static bool IsNoAckFuncCode(FunctionCode code); 34 | }; 35 | 36 | } // namespace opendnp3 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /cpp/lib/src/app/parsing/Functions.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | 21 | #ifndef OPENDNP3_FUNCTIONS_H 22 | #define OPENDNP3_FUNCTIONS_H 23 | 24 | #include 25 | 26 | namespace opendnp3 27 | { 28 | 29 | // a function that reads a type from a buffer and returns true if successful 30 | template using ReadFunction = bool (*)(ser4cpp::rseq_t& buffer, T& output); 31 | 32 | } // namespace opendnp3 33 | 34 | #endif -------------------------------------------------------------------------------- /dotnet/CLRInterface/src/IListener.cs: -------------------------------------------------------------------------------- 1 | // Copyright 2013-2022 Step Function I/O, LLC 2 | // 3 | // Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 4 | // LLC (https://stepfunc.io) under one or more contributor license agreements. 5 | // See the NOTICE file distributed with this work for additional information 6 | // regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 7 | // this file to you under the Apache License, Version 2.0 (the "License"); you 8 | // may not use this file except in compliance with the License. You may obtain 9 | // a copy of the License at: 10 | // 11 | // http://www.apache.org/licenses/LICENSE-2.0 12 | // 13 | // Unless required by applicable law or agreed to in writing, software 14 | // distributed under the License is distributed on an "AS IS" BASIS, 15 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | // See the License for the specific language governing permissions and 17 | // limitations under the License. 18 | 19 | using System; 20 | using System.Collections.Generic; 21 | using System.Linq; 22 | using System.Text; 23 | using System.Threading.Tasks; 24 | 25 | namespace Automatak.DNP3.Interface 26 | { 27 | public interface IListener 28 | { 29 | /// 30 | /// Begin shutting down the listener 31 | /// 32 | void BeginShutdown(); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /cpp/lib/include/opendnp3/util/StaticOnly.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | #ifndef OPENDNP3_STATICONLY_H 21 | #define OPENDNP3_STATICONLY_H 22 | 23 | namespace opendnp3 24 | { 25 | 26 | class StaticOnly 27 | { 28 | private: 29 | // prevent these functions 30 | StaticOnly() = delete; 31 | StaticOnly(const StaticOnly&) = delete; 32 | StaticOnly& operator=(const StaticOnly&) = delete; 33 | }; 34 | 35 | } // namespace opendnp3 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /cpp/lib/src/app/APDURequest.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | #include "APDURequest.h" 21 | 22 | namespace opendnp3 23 | { 24 | 25 | APDURequest::APDURequest(const ser4cpp::wseq_t& aBuffer) : APDUWrapper(aBuffer) {} 26 | 27 | void APDURequest::ConfigureHeader(FunctionCode /*code*/, uint8_t seq) 28 | { 29 | this->SetFunction(FunctionCode::AUTH_REQUEST); 30 | this->SetControl(AppControlField::Request(seq)); 31 | } 32 | 33 | } // namespace opendnp3 34 | -------------------------------------------------------------------------------- /dotnet/CLRInterface/src/IMaster.cs: -------------------------------------------------------------------------------- 1 | // Copyright 2013-2022 Step Function I/O, LLC 2 | // 3 | // Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 4 | // LLC (https://stepfunc.io) under one or more contributor license agreements. 5 | // See the NOTICE file distributed with this work for additional information 6 | // regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 7 | // this file to you under the Apache License, Version 2.0 (the "License"); you 8 | // may not use this file except in compliance with the License. You may obtain 9 | // a copy of the License at: 10 | // 11 | // http://www.apache.org/licenses/LICENSE-2.0 12 | // 13 | // Unless required by applicable law or agreed to in writing, software 14 | // distributed under the License is distributed on an "AS IS" BASIS, 15 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | // See the License for the specific language governing permissions and 17 | // limitations under the License. 18 | 19 | using System; 20 | using System.Collections.Generic; 21 | using System.Linq; 22 | using System.Text; 23 | using System.Threading.Tasks; 24 | 25 | namespace Automatak.DNP3.Interface 26 | { 27 | /// 28 | /// Interface representing a master station 29 | /// 30 | 31 | public interface IMaster : IStack, IMasterOperations 32 | { 33 | 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /cpp/lib/src/outstation/IEventRecorder.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | #ifndef OPENDNP3_IEVENTRECORDER_H 21 | #define OPENDNP3_IEVENTRECORDER_H 22 | 23 | #include "opendnp3/app/EventType.h" 24 | 25 | namespace opendnp3 26 | { 27 | 28 | class IEventRecorder 29 | { 30 | public: 31 | virtual bool HasMoreUnwrittenEvents() const = 0; 32 | 33 | virtual void RecordWritten(EventClass ec, EventType et) = 0; 34 | }; 35 | 36 | } // namespace opendnp3 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /java/bindings/src/main/java/com/automatak/dnp3/Outstation.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | package com.automatak.dnp3; 21 | 22 | /** 23 | * Interface representing an outstation 24 | */ 25 | public interface Outstation extends Stack { 26 | 27 | /** 28 | * Load some new measurement values into the outstation 29 | * @param changes set of measurement changes to apply to the outstation 30 | */ 31 | void apply(ChangeSet changes); 32 | 33 | } 34 | -------------------------------------------------------------------------------- /java/bindings/src/main/java/com/automatak/dnp3/PointClassMasks.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | package com.automatak.dnp3; 21 | 22 | import com.automatak.dnp3.enums.PointClass; 23 | 24 | public final class PointClassMasks { 25 | private PointClassMasks() {} 26 | 27 | public static int ALL_EVENTS = PointClass.Class1.toType() | PointClass.Class2.toType() | PointClass.Class3.toType(); 28 | public static int ALL_CLASSES = ALL_EVENTS | PointClass.Class0.toType(); 29 | } 30 | -------------------------------------------------------------------------------- /cpp/lib/include/opendnp3/decoder/IDecoderCallbacks.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | #ifndef OPENDNP3_IDECODERCALLBACKS_H 21 | #define OPENDNP3_IDECODERCALLBACKS_H 22 | 23 | #include "opendnp3/util/Uncopyable.h" 24 | 25 | namespace opendnp3 26 | { 27 | 28 | class IDecoderCallbacks : Uncopyable 29 | { 30 | friend class Indent; 31 | 32 | protected: 33 | virtual void PushIndent(){}; 34 | virtual void PopIndent(){}; 35 | }; 36 | 37 | } // namespace opendnp3 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /cpp/lib/src/link/Addresses.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | #include "opendnp3/link/Addresses.h" 21 | 22 | #include "link/LinkLayerConstants.h" 23 | 24 | namespace opendnp3 25 | { 26 | 27 | bool Addresses::IsBroadcast() const 28 | { 29 | return this->destination == LinkBroadcastAddress::DontConfirm 30 | || this->destination == LinkBroadcastAddress::ShallConfirm 31 | || this->destination == LinkBroadcastAddress::OptionalConfirm; 32 | } 33 | 34 | } // namespace opendnp3 35 | -------------------------------------------------------------------------------- /dotnet/CLRInterface/src/IMasterSession.cs: -------------------------------------------------------------------------------- 1 | // Copyright 2013-2022 Step Function I/O, LLC 2 | // 3 | // Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 4 | // LLC (https://stepfunc.io) under one or more contributor license agreements. 5 | // See the NOTICE file distributed with this work for additional information 6 | // regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 7 | // this file to you under the Apache License, Version 2.0 (the "License"); you 8 | // may not use this file except in compliance with the License. You may obtain 9 | // a copy of the License at: 10 | // 11 | // http://www.apache.org/licenses/LICENSE-2.0 12 | // 13 | // Unless required by applicable law or agreed to in writing, software 14 | // distributed under the License is distributed on an "AS IS" BASIS, 15 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | // See the License for the specific language governing permissions and 17 | // limitations under the License. 18 | 19 | using System; 20 | using System.Collections.Generic; 21 | using System.Linq; 22 | using System.Text; 23 | using System.Threading.Tasks; 24 | 25 | namespace Automatak.DNP3.Interface 26 | { 27 | /// 28 | /// Interface representing an ephemeral master session 29 | /// 30 | public interface IMasterSession : IMasterOperations 31 | { 32 | void BeginShutdown(); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /cpp/lib/src/master/DefaultMasterApplication.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | #include "opendnp3/master/DefaultMasterApplication.h" 21 | 22 | #include 23 | 24 | namespace opendnp3 25 | { 26 | 27 | UTCTimestamp DefaultMasterApplication::Now() 28 | { 29 | uint64_t time 30 | = std::chrono::duration_cast(std::chrono::system_clock::now().time_since_epoch()) 31 | .count(); 32 | return {time}; 33 | } 34 | 35 | } // namespace opendnp3 36 | -------------------------------------------------------------------------------- /cpp/tests/unit/utils/CallbackQueue.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | #ifndef OPENDNP3_UNITTESTS_CALLBACK_QUEUE_H 21 | #define OPENDNP3_UNITTESTS_CALLBACK_QUEUE_H 22 | 23 | #include 24 | #include 25 | 26 | template class CallbackQueue 27 | { 28 | public: 29 | std::function Callback() 30 | { 31 | return [this](const T& rsp) -> void { responses.push_back(rsp); }; 32 | } 33 | 34 | std::deque responses; 35 | }; 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /java/cpp/jni/JNITaskConfig.h: -------------------------------------------------------------------------------- 1 | // 2 | // _ _ ______ _ _ _ _ _ _ _ 3 | // | \ | | | ____| | (_) | (_) | | | | 4 | // | \| | ___ | |__ __| |_| |_ _ _ __ __ _| | | | 5 | // | . ` |/ _ \ | __| / _` | | __| | '_ \ / _` | | | | 6 | // | |\ | (_) | | |___| (_| | | |_| | | | | (_| |_|_|_| 7 | // |_| \_|\___/ |______\__,_|_|\__|_|_| |_|\__, (_|_|_) 8 | // __/ | 9 | // |___/ 10 | // 11 | // This file is auto-generated. Do not edit manually 12 | // 13 | // Copyright 2016 Step Function I/O LLC 14 | // 15 | // Step Function I/O LLC (https://stepfunc.io) licenses this file 16 | // to you under the the Apache License Version 2.0 (the "License"): 17 | // 18 | // http://www.apache.org/licenses/LICENSE-2.0.html 19 | // 20 | 21 | #ifndef OPENDNP3JAVA_JNITASKCONFIG_H 22 | #define OPENDNP3JAVA_JNITASKCONFIG_H 23 | 24 | #include 25 | 26 | namespace jni 27 | { 28 | class TaskConfig 29 | { 30 | friend struct JCache; 31 | 32 | bool init(JNIEnv* env); 33 | void cleanup(JNIEnv* env); 34 | 35 | public: 36 | 37 | // constructor methods 38 | jobject init2(JNIEnv* env, jobject arg0, jobject arg1); 39 | 40 | private: 41 | 42 | jclass clazz = nullptr; 43 | 44 | // constructor method ids 45 | jmethodID init2Constructor = nullptr; 46 | }; 47 | } 48 | 49 | #endif 50 | -------------------------------------------------------------------------------- /cpp/lib/include/opendnp3/util/Buffer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | #ifndef OPENDNP3_BUFFER_H 21 | #define OPENDNP3_BUFFER_H 22 | 23 | #include 24 | #include 25 | 26 | namespace opendnp3 27 | { 28 | 29 | struct Buffer 30 | { 31 | Buffer() = default; 32 | Buffer(const uint8_t* data, std::size_t length) : data(data), length(length) {} 33 | 34 | const uint8_t* data = nullptr; 35 | std::size_t length = 0; 36 | }; 37 | 38 | } // namespace opendnp3 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /dotnet/CLRAdapter/src/Lock.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | #ifndef OPENDNP3CLR_LOCK_H 21 | #define OPENDNP3CLR_LOCK_H 22 | 23 | using namespace System::Threading; 24 | 25 | private ref class Lock 26 | { 27 | public: 28 | Lock( Object^ pObject ) : m_pObject( pObject ) 29 | { 30 | Monitor::Enter( m_pObject ); 31 | } 32 | 33 | ~Lock() 34 | { 35 | Monitor::Exit( m_pObject ); 36 | } 37 | 38 | private: 39 | 40 | Object^ m_pObject; 41 | }; 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /java/bindings/src/main/java/com/automatak/dnp3/ChannelListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | package com.automatak.dnp3; 21 | 22 | import com.automatak.dnp3.enums.ChannelState; 23 | 24 | /** 25 | * Callback interface invoked when the state of a communication channel changes 26 | */ 27 | public interface ChannelListener { 28 | 29 | /** 30 | * Invoked when the state changes 31 | * @param state State enumeration 32 | */ 33 | void onStateChange(ChannelState state); 34 | } 35 | -------------------------------------------------------------------------------- /cpp/lib/src/channel/ASIOSerialHelpers.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | #ifndef OPENDNP3_ASIOSERIALHELPERS_H 21 | #define OPENDNP3_ASIOSERIALHELPERS_H 22 | 23 | #include "opendnp3/channel/SerialSettings.h" 24 | 25 | #include 26 | 27 | namespace opendnp3 28 | { 29 | 30 | // Serial port configuration functions "free" to keep the classes simple. 31 | bool Configure(const SerialSettings& settings, asio::serial_port& port, std::error_code& ec); 32 | 33 | } // namespace opendnp3 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /cpp/lib/include/opendnp3/channel/IListener.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | #ifndef OPENDNP3_ILISTENER_H 21 | #define OPENDNP3_ILISTENER_H 22 | 23 | #include "opendnp3/IResource.h" 24 | 25 | namespace opendnp3 26 | { 27 | 28 | /** 29 | * Represents a running TCP or TLS listener that can be shutdown 30 | * so that no new connections are accepted. 31 | */ 32 | class IListener : public IResource 33 | { 34 | public: 35 | virtual ~IListener() {} 36 | }; 37 | 38 | } // namespace opendnp3 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /cpp/lib/include/opendnp3/app/AppConstants.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | 21 | #ifndef OPENDNP3_APPCONSTANTS_H 22 | #define OPENDNP3_APPCONSTANTS_H 23 | 24 | #include "opendnp3/util/TimeDuration.h" 25 | 26 | #include 27 | 28 | namespace opendnp3 29 | { 30 | // the default size for an APDU 31 | const uint32_t DEFAULT_MAX_APDU_SIZE = 2048; 32 | 33 | // default timeout for the application layer 34 | const TimeDuration DEFAULT_APP_TIMEOUT = TimeDuration::Seconds(5); 35 | } // namespace opendnp3 36 | 37 | #endif -------------------------------------------------------------------------------- /cpp/lib/include/opendnp3/master/IMasterScan.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | #ifndef OPENDNP3_IMASTERSCAN_H 21 | #define OPENDNP3_IMASTERSCAN_H 22 | 23 | namespace opendnp3 24 | { 25 | 26 | /** 27 | * Interface for interacting w/ a permanently bound scan 28 | */ 29 | class IMasterScan 30 | { 31 | public: 32 | virtual ~IMasterScan() = default; 33 | 34 | // Request that the scan be performed as soon as possible 35 | virtual void Demand() = 0; 36 | }; 37 | 38 | } // namespace opendnp3 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /java/bindings/src/main/java/com/automatak/dnp3/LogMasks.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | package com.automatak.dnp3; 21 | 22 | public final class LogMasks 23 | { 24 | public static final int NONE = 0; 25 | public static final int ALL = ~NONE; 26 | public static final int NORMAL = LogLevels.EVENT | LogLevels.ERROR | LogLevels.WARNING | LogLevels.INFO; 27 | public static final int APP_COMMS = LogLevels.APP_HEADER_RX | LogLevels.APP_HEADER_TX | LogLevels.APP_OBJECT_RX | LogLevels.APP_OBJECT_TX; 28 | } 29 | -------------------------------------------------------------------------------- /cpp/lib/include/opendnp3/master/IMaster.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | #ifndef OPENDNP3_IMASTER_H 21 | #define OPENDNP3_IMASTER_H 22 | 23 | #include "opendnp3/IStack.h" 24 | #include "opendnp3/master/IMasterOperations.h" 25 | 26 | namespace opendnp3 27 | { 28 | 29 | /** 30 | * Interface that represents a running master session. 31 | */ 32 | class IMaster : public IMasterOperations, public IStack 33 | { 34 | public: 35 | virtual ~IMaster() = default; 36 | }; 37 | 38 | } // namespace opendnp3 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /cpp/tests/unit/TestCRC.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | #include "utils/BufferHelpers.h" 21 | 22 | #include 23 | #include 24 | 25 | #include 26 | #include 27 | #include 28 | #include 29 | 30 | using namespace opendnp3; 31 | 32 | #define SUITE(name) "CRC - " name 33 | 34 | TEST_CASE(SUITE("CrcTest")) 35 | { 36 | HexSequence hs("05 64 05 C0 01 00 00 04 E9 21"); 37 | REQUIRE(hs.Size() == 10); 38 | REQUIRE(CRC::CalcCrc(hs, 8) == 0x21E9); 39 | } 40 | -------------------------------------------------------------------------------- /java/bindings/src/main/java/com/automatak/dnp3/Measurement.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | package com.automatak.dnp3; 21 | 22 | /** 23 | * Base class for all measurements that provides time and quality bit-fields 24 | */ 25 | public abstract class Measurement { 26 | 27 | public final Flags quality; 28 | public final DNPTime timestamp; 29 | 30 | public Measurement(Flags quality, DNPTime timestamp) 31 | { 32 | this.quality = quality; 33 | this.timestamp = timestamp; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /cpp/lib/include/opendnp3/master/ICommandCollection.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | #ifndef OPENDNP3_ICOMMAND_COLLECTION_H 21 | #define OPENDNP3_ICOMMAND_COLLECTION_H 22 | 23 | #include 24 | 25 | namespace opendnp3 26 | { 27 | 28 | /// A collection type for command to which the user can add by type and index 29 | template class ICommandCollection 30 | { 31 | public: 32 | virtual ICommandCollection& Add(const T& command, uint16_t index) = 0; 33 | }; 34 | 35 | } // namespace opendnp3 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /cpp/lib/src/app/Functions.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | 21 | #include "Functions.h" 22 | 23 | namespace opendnp3 24 | { 25 | bool Functions::IsNoAckFuncCode(FunctionCode code) 26 | { 27 | switch (code) 28 | { 29 | case (FunctionCode::DIRECT_OPERATE_NR): 30 | case (FunctionCode::IMMED_FREEZE_NR): 31 | case (FunctionCode::FREEZE_AT_TIME_NR): 32 | case (FunctionCode::FREEZE_CLEAR_NR): 33 | return true; 34 | default: 35 | return false; 36 | } 37 | } 38 | } // namespace opendnp3 39 | -------------------------------------------------------------------------------- /cpp/lib/src/outstation/IEventSelector.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | #ifndef OPENDNP3_IEVENTSELECTOR_H 21 | #define OPENDNP3_IEVENTSELECTOR_H 22 | 23 | #include "app/GroupVariationRecord.h" 24 | 25 | #include "opendnp3/app/IINField.h" 26 | 27 | namespace opendnp3 28 | { 29 | 30 | class IEventSelector 31 | { 32 | public: 33 | virtual IINField SelectAll(GroupVariation gv) = 0; 34 | 35 | virtual IINField SelectCount(GroupVariation gv, uint16_t count) = 0; 36 | }; 37 | 38 | } // namespace opendnp3 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /generation/dnp3/src/main/scala/com/automatak/render/dnp3/objects/groups/Group110.scala: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | package com.automatak.render.dnp3.objects.groups 21 | 22 | import com.automatak.render.dnp3.objects.{SizedByVariation, ObjectGroup} 23 | 24 | object Group110 extends ObjectGroup { 25 | def objects = List(Group110AnyVar) 26 | def group: Byte = 110 27 | def desc: String = "Octet String" 28 | def isEventGroup: Boolean = false 29 | } 30 | 31 | object Group110AnyVar extends SizedByVariation(Group110, 0) 32 | -------------------------------------------------------------------------------- /generation/dnp3/src/main/scala/com/automatak/render/dnp3/objects/groups/Group111.scala: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | package com.automatak.render.dnp3.objects.groups 21 | 22 | import com.automatak.render.dnp3.objects.{SizedByVariation, ObjectGroup} 23 | 24 | object Group111 extends ObjectGroup { 25 | def objects = List(Group111AnyVar) 26 | def group: Byte = 111 27 | def desc: String = "Octet String Event" 28 | def isEventGroup: Boolean = false 29 | } 30 | 31 | object Group111AnyVar extends SizedByVariation(Group111, 0) -------------------------------------------------------------------------------- /cpp/lib/src/channel/IChannelCallbacks.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | #ifndef OPENDNP3_ICHANNELCALLBACKS_H 21 | #define OPENDNP3_ICHANNELCALLBACKS_H 22 | 23 | #include 24 | 25 | namespace opendnp3 26 | { 27 | 28 | struct IChannelCallbacks 29 | { 30 | virtual ~IChannelCallbacks(){}; 31 | 32 | virtual void OnReadComplete(const std::error_code& ec, size_t num) = 0; 33 | virtual void OnWriteComplete(const std::error_code& ec, size_t num) = 0; 34 | }; 35 | 36 | } // namespace opendnp3 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /cpp/lib/src/outstation/IINHelpers.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | #include "outstation/IINHelpers.h" 21 | 22 | namespace opendnp3 23 | { 24 | 25 | IINField IINFromParseResult(ParseResult result) 26 | { 27 | switch (result) 28 | { 29 | case (ParseResult::OK): 30 | return IINField::Empty(); 31 | case (ParseResult::UNKNOWN_OBJECT): 32 | return IINField(IINBit::OBJECT_UNKNOWN); 33 | default: 34 | return IINField(IINBit::PARAM_ERROR); 35 | } 36 | } 37 | 38 | } // namespace opendnp3 39 | -------------------------------------------------------------------------------- /cpp/lib/src/outstation/OutstationSeqNum.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | #ifndef OPENDNP3_OUTSTATIONSEQNUM_H 21 | #define OPENDNP3_OUTSTATIONSEQNUM_H 22 | 23 | #include "app/AppSeqNum.h" 24 | 25 | #include 26 | 27 | namespace opendnp3 28 | { 29 | 30 | /// 31 | /// Sequence numbers for one channel (sol or unsol) 32 | /// 33 | class OutstationSeqNum 34 | { 35 | public: 36 | OutstationSeqNum() {} 37 | 38 | AppSeqNum num; 39 | AppSeqNum confirmNum; 40 | }; 41 | 42 | } // namespace opendnp3 43 | 44 | #endif 45 | -------------------------------------------------------------------------------- /generation/dnp3/src/main/scala/com/automatak/render/dnp3/objects/groups/Group113.scala: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | package com.automatak.render.dnp3.objects.groups 21 | 22 | import com.automatak.render.dnp3.objects.{SizedByVariation, ObjectGroup} 23 | 24 | object Group113 extends ObjectGroup { 25 | def objects = List(Group113AnyVar) 26 | def group: Byte = 113 27 | def desc: String = "Virtual Terminal Event Data" 28 | def isEventGroup: Boolean = true 29 | } 30 | 31 | object Group113AnyVar extends SizedByVariation(Group113, 0) -------------------------------------------------------------------------------- /java/bindings/src/main/java/com/automatak/dnp3/LinkStatistics.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | package com.automatak.dnp3; 21 | 22 | 23 | /** 24 | * Combined channel and link parser statistics 25 | */ 26 | public class LinkStatistics { 27 | 28 | public LinkStatistics(ChannelStatistics channel, ParserStatistics parser) 29 | { 30 | this.channel = channel; 31 | this.parser = parser; 32 | } 33 | 34 | public final ChannelStatistics channel; 35 | public final ParserStatistics parser; 36 | } 37 | -------------------------------------------------------------------------------- /cpp/lib/src/app/parsing/IWhiteList.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | #ifndef OPENDNP3_IWHITELIST_H 21 | #define OPENDNP3_IWHITELIST_H 22 | 23 | #include "opendnp3/gen/GroupVariation.h" 24 | #include "opendnp3/gen/QualifierCode.h" 25 | 26 | namespace opendnp3 27 | { 28 | 29 | /** 30 | * Whitelist interface for APDU object headers 31 | */ 32 | class IWhiteList 33 | { 34 | public: 35 | virtual bool IsAllowed(uint32_t headerCount, GroupVariation gv, QualifierCode qc) = 0; 36 | }; 37 | 38 | } // namespace opendnp3 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /generation/dnp3/src/main/scala/com/automatak/render/dnp3/objects/groups/Group112.scala: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | package com.automatak.render.dnp3.objects.groups 21 | 22 | import com.automatak.render.dnp3.objects.{SizedByVariation, ObjectGroup} 23 | 24 | object Group112 extends ObjectGroup { 25 | def objects = List(Group112AnyVar) 26 | def group: Byte = 112 27 | def desc: String = "Virtual Terminal Output Block" 28 | def isEventGroup: Boolean = false 29 | } 30 | 31 | object Group112AnyVar extends SizedByVariation(Group112, 0) -------------------------------------------------------------------------------- /cpp/lib/include/opendnp3/master/PrintingCommandResultCallback.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | #ifndef OPENDNP3_PRINTINGCOMMANDRESULTCALLBACK_H 21 | #define OPENDNP3_PRINTINGCOMMANDRESULTCALLBACK_H 22 | 23 | #include "opendnp3/util/StaticOnly.h" 24 | 25 | #include "opendnp3/master/CommandResultCallbackT.h" 26 | 27 | namespace opendnp3 28 | { 29 | 30 | class PrintingCommandResultCallback : public StaticOnly 31 | { 32 | 33 | public: 34 | static CommandResultCallbackT Get(); 35 | }; 36 | 37 | } // namespace opendnp3 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /cpp/lib/include/opendnp3/util/UTCTimestamp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | #ifndef OPENDNP3_UTCTIMESTAMP_H 21 | #define OPENDNP3_UTCTIMESTAMP_H 22 | 23 | #include 24 | 25 | namespace opendnp3 26 | { 27 | 28 | /** 29 | * Strong typing for UTCTimestamps 30 | */ 31 | class UTCTimestamp 32 | { 33 | 34 | public: 35 | UTCTimestamp() = default; 36 | 37 | UTCTimestamp(uint64_t msSinceEpoch) : msSinceEpoch(msSinceEpoch) {} 38 | 39 | uint64_t msSinceEpoch = 0; 40 | }; 41 | 42 | } // namespace opendnp3 43 | 44 | #endif 45 | -------------------------------------------------------------------------------- /cpp/lib/src/app/QualityFlags.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | #ifndef OPENDNP3_QUALITYFLAGS_H 21 | #define OPENDNP3_QUALITYFLAGS_H 22 | 23 | #include "opendnp3/app/Flags.h" 24 | 25 | #include 26 | 27 | namespace opendnp3 28 | { 29 | 30 | namespace flags 31 | { 32 | 33 | const Flags ONLINE(0x01); 34 | const Flags RESTART(0x02); 35 | 36 | bool GetBinaryValue(Flags flags); 37 | 38 | Flags GetBinaryFlags(Flags flags, bool value); 39 | 40 | } // namespace flags 41 | 42 | } // namespace opendnp3 43 | 44 | #endif 45 | -------------------------------------------------------------------------------- /dotnet/CLRInterface/src/IMasterScan.cs: -------------------------------------------------------------------------------- 1 | // Copyright 2013-2022 Step Function I/O, LLC 2 | // 3 | // Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 4 | // LLC (https://stepfunc.io) under one or more contributor license agreements. 5 | // See the NOTICE file distributed with this work for additional information 6 | // regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 7 | // this file to you under the Apache License, Version 2.0 (the "License"); you 8 | // may not use this file except in compliance with the License. You may obtain 9 | // a copy of the License at: 10 | // 11 | // http://www.apache.org/licenses/LICENSE-2.0 12 | // 13 | // Unless required by applicable law or agreed to in writing, software 14 | // distributed under the License is distributed on an "AS IS" BASIS, 15 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | // See the License for the specific language governing permissions and 17 | // limitations under the License. 18 | using System; 19 | using System.Collections.Generic; 20 | using System.Linq; 21 | using System.Text; 22 | using System.Threading.Tasks; 23 | 24 | namespace Automatak.DNP3.Interface 25 | { 26 | /// 27 | /// Interface for controlling a permanently bound scan 28 | /// 29 | public interface IMasterScan 30 | { 31 | /// 32 | /// Ask the scan to run ASAP 33 | /// 34 | void Demand(); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /cpp/lib/src/master/MasterScan.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | #include "master/MasterScan.h" 21 | 22 | #include "master/IMasterTask.h" 23 | #include "master/MasterContext.h" 24 | 25 | #include 26 | 27 | namespace opendnp3 28 | { 29 | 30 | MasterScan::MasterScan(std::shared_ptr task, std::shared_ptr scheduler) 31 | : task(std::move(task)), scheduler(std::move(scheduler)) 32 | { 33 | } 34 | 35 | void MasterScan::Demand() 36 | { 37 | scheduler->Demand(task); 38 | } 39 | 40 | } // namespace opendnp3 41 | -------------------------------------------------------------------------------- /cpp/lib/include/opendnp3/master/IUTCTimeSource.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | #ifndef OPENDNP3_IUTCTIMESOURCE_H 21 | #define OPENDNP3_IUTCTIMESOURCE_H 22 | 23 | #include "opendnp3/util/UTCTimestamp.h" 24 | 25 | namespace opendnp3 26 | { 27 | 28 | /** 29 | * Interface that defines a method to get UTC timestamps 30 | */ 31 | class IUTCTimeSource 32 | { 33 | 34 | public: 35 | /** 36 | * Returns a UTCTimestamp of the current time 37 | */ 38 | virtual UTCTimestamp Now() = 0; 39 | }; 40 | 41 | } // namespace opendnp3 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /cpp/tests/unit/utils/ProtocolUtil.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | #ifndef OPENDNP3_UNITTESTS_PROTOCOL_UTIL_H 21 | #define OPENDNP3_UNITTESTS_PROTOCOL_UTIL_H 22 | 23 | #include 24 | 25 | // Given a buffer and max packet size, calculcate the 26 | // maximum number of packets the buffer can hold 27 | uint32_t CalcMaxPackets(uint32_t aBuffer, uint32_t aPayload); 28 | 29 | // Given a buffer and max packet size, calculcate the 30 | // size of the last packet. 31 | uint32_t CalcLastPacketSize(uint32_t aBuffer, uint32_t aPayload); 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /cpp/lib/src/app/parsing/BitReader.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | #ifndef OPENDNP3_BITREADER_H 21 | #define OPENDNP3_BITREADER_H 22 | 23 | #include "opendnp3/gen/DoubleBit.h" 24 | 25 | #include 26 | 27 | namespace opendnp3 28 | { 29 | 30 | size_t NumBytesInBits(size_t numBits); 31 | bool GetBit(const ser4cpp::rseq_t& buffer, size_t position); 32 | 33 | size_t NumBytesInDoubleBits(size_t numBits); 34 | DoubleBit GetDoubleBit(const ser4cpp::rseq_t& buffer, size_t index); 35 | 36 | } // namespace opendnp3 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /cpp/lib/src/master/HeaderConversions.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | #include "master/HeaderConversions.h" 21 | 22 | namespace opendnp3 23 | { 24 | 25 | HeaderBuilderT ConvertToLambda(const std::vector
& headers) 26 | { 27 | return [headers](HeaderWriter& writer) -> bool { 28 | for (auto& header : headers) 29 | { 30 | if (!header.WriteTo(writer)) 31 | { 32 | return false; 33 | } 34 | } 35 | 36 | return true; 37 | }; 38 | } 39 | 40 | } // namespace opendnp3 41 | -------------------------------------------------------------------------------- /dotnet/CLRInterface/src/ISessionAcceptor.cs: -------------------------------------------------------------------------------- 1 | // Copyright 2013-2022 Step Function I/O, LLC 2 | // 3 | // Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 4 | // LLC (https://stepfunc.io) under one or more contributor license agreements. 5 | // See the NOTICE file distributed with this work for additional information 6 | // regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 7 | // this file to you under the Apache License, Version 2.0 (the "License"); you 8 | // may not use this file except in compliance with the License. You may obtain 9 | // a copy of the License at: 10 | // 11 | // http://www.apache.org/licenses/LICENSE-2.0 12 | // 13 | // Unless required by applicable law or agreed to in writing, software 14 | // distributed under the License is distributed on an "AS IS" BASIS, 15 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | // See the License for the specific language governing permissions and 17 | // limitations under the License. 18 | using System; 19 | using System.Collections.Generic; 20 | using System.Linq; 21 | using System.Text; 22 | using System.Threading.Tasks; 23 | 24 | namespace Automatak.DNP3.Interface 25 | { 26 | /// 27 | /// Interface used to create an ephemeral master session 28 | /// 29 | public interface ISessionAcceptor 30 | { 31 | IMasterSession AcceptSession(string loggerid, ISOEHandler SOEHandler, IMasterApplication application, MasterStackConfig config); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /java/bindings/src/main/java/com/automatak/dnp3/IPEndpoint.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | package com.automatak.dnp3; 21 | 22 | /** 23 | * An IP endpoint 24 | */ 25 | public class IPEndpoint 26 | { 27 | public final String address; 28 | public final int port; 29 | 30 | public IPEndpoint(String address, int port) 31 | { 32 | this.address = address; 33 | this.port = port; 34 | } 35 | 36 | @Override 37 | public String toString() 38 | { 39 | return String.format("%s - %d", address, port); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /cpp/lib/src/app/Message.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | #ifndef OPENDNP3_MESSAGE_H 21 | #define OPENDNP3_MESSAGE_H 22 | 23 | #include "opendnp3/link/Addresses.h" 24 | 25 | #include 26 | 27 | namespace opendnp3 28 | { 29 | 30 | struct Message 31 | { 32 | Message() = default; 33 | 34 | Message(const Addresses& addresses, const ser4cpp::rseq_t& payload) : addresses(addresses), payload(payload) {} 35 | 36 | Addresses addresses; 37 | ser4cpp::rseq_t payload; 38 | }; 39 | 40 | } // namespace opendnp3 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /cpp/lib/src/link/ILinkLayer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | #ifndef OPENDNP3_ILINKLAYER_H 21 | #define OPENDNP3_ILINKLAYER_H 22 | 23 | #include "LayerInterfaces.h" 24 | #include "link/ITransportSegment.h" 25 | 26 | #include 27 | 28 | namespace opendnp3 29 | { 30 | 31 | class ILinkLayer 32 | { 33 | 34 | public: 35 | virtual ~ILinkLayer() {} 36 | 37 | /// Transmit a buffer that can be iterated over in no greater than 250 byte segments 38 | virtual bool Send(ITransportSegment& segment) = 0; 39 | }; 40 | 41 | } // namespace opendnp3 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /cpp/lib/src/outstation/event/TypedStorage.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | 21 | #ifndef OPENDNP3_TYPEDSTORAGE_H 22 | #define OPENDNP3_TYPEDSTORAGE_H 23 | 24 | #include "List.h" 25 | #include "TypedEventRecord.h" 26 | 27 | namespace opendnp3 28 | { 29 | 30 | template struct TypedStorage : private StaticOnly 31 | { 32 | 33 | static inline Node>* Retrieve(EventRecord& record) 34 | { 35 | return reinterpret_cast>*>(record.storage_node); 36 | } 37 | }; 38 | 39 | } // namespace opendnp3 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /dotnet/CLRInterface/src/DNP3Exception.cs: -------------------------------------------------------------------------------- 1 | // Copyright 2013-2022 Step Function I/O, LLC 2 | // 3 | // Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 4 | // LLC (https://stepfunc.io) under one or more contributor license agreements. 5 | // See the NOTICE file distributed with this work for additional information 6 | // regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 7 | // this file to you under the Apache License, Version 2.0 (the "License"); you 8 | // may not use this file except in compliance with the License. You may obtain 9 | // a copy of the License at: 10 | // 11 | // http://www.apache.org/licenses/LICENSE-2.0 12 | // 13 | // Unless required by applicable law or agreed to in writing, software 14 | // distributed under the License is distributed on an "AS IS" BASIS, 15 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | // See the License for the specific language governing permissions and 17 | // limitations under the License. 18 | 19 | using System; 20 | using System.Collections.Generic; 21 | using System.Linq; 22 | using System.Text; 23 | using System.Threading.Tasks; 24 | using System.Runtime.CompilerServices; 25 | 26 | namespace Automatak.DNP3.Interface 27 | { 28 | /// 29 | /// Exception generated by IDNP3Manager 30 | /// 31 | public class DNP3Exception : Exception 32 | { 33 | public DNP3Exception(string message) 34 | : base(message) 35 | { 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /java/bindings/src/main/java/com/automatak/dnp3/CounterConfig.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | package com.automatak.dnp3; 21 | 22 | import com.automatak.dnp3.enums.EventCounterVariation; 23 | import com.automatak.dnp3.enums.StaticCounterVariation; 24 | 25 | public class CounterConfig extends EventConfig { 26 | 27 | public CounterConfig() {} 28 | 29 | public int deadband = 0; 30 | public EventCounterVariation eventVariation = EventCounterVariation.Group22Var1; 31 | public StaticCounterVariation staticVariation = StaticCounterVariation.Group20Var1; 32 | } 33 | -------------------------------------------------------------------------------- /cpp/lib/src/outstation/OctetStringSerializer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | 21 | #ifndef OPENDNP3_OCTETSTRINGSERIALIZER_H 22 | #define OPENDNP3_OCTETSTRINGSERIALIZER_H 23 | 24 | #include "app/DNP3Serializer.h" 25 | 26 | #include "opendnp3/app/OctetString.h" 27 | 28 | namespace opendnp3 29 | { 30 | 31 | struct OctetStringSerializer : public DNP3Serializer 32 | { 33 | OctetStringSerializer(bool isEvent, uint8_t size); 34 | 35 | static bool Write(const OctetString& value, ser4cpp::wseq_t& buffer); 36 | }; 37 | 38 | } // namespace opendnp3 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /generation/dnp3/src/main/scala/com/automatak/render/dnp3/enums/LinkStatus.scala: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | package com.automatak.render.dnp3.enums 21 | 22 | import com.automatak.render._ 23 | 24 | object LinkStatus { 25 | 26 | private val comments = List("Enumeration for reset/unreset states of a link layer") 27 | 28 | def apply(): EnumModel = EnumModel("LinkStatus", comments, EnumModel.UInt8, codes, None, Base10) 29 | 30 | private val codes = List( 31 | EnumValue("UNRESET", 0, "DOWN"), 32 | EnumValue("RESET", 1, "UP") 33 | ) 34 | 35 | } 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /cpp/lib/src/link/LinkHeaderFields.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | #include "opendnp3/link/LinkHeaderFields.h" 21 | 22 | namespace opendnp3 23 | { 24 | LinkHeaderFields::LinkHeaderFields() 25 | : func(LinkFunction::INVALID), isFromMaster(false), fcb(false), fcvdfc(false), addresses(Addresses()) 26 | { 27 | } 28 | 29 | LinkHeaderFields::LinkHeaderFields(LinkFunction func_, bool isMaster_, bool fcb_, bool fcvdfc_, Addresses addresses_) 30 | : func(func_), isFromMaster(isMaster_), fcb(fcb_), fcvdfc(fcvdfc_), addresses(addresses_) 31 | { 32 | } 33 | 34 | } // namespace opendnp3 35 | -------------------------------------------------------------------------------- /cpp/tests/fuzz/fuzzdecoder.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | #include 21 | #include 22 | #include 23 | 24 | using namespace opendnp3; 25 | 26 | extern "C" int LLVMFuzzerTestOneInput(const uint8_t* Data, size_t Size) 27 | { 28 | Buffer buffer(Data, Size); 29 | Logger logger(ConsoleLogger::Create(), ModuleId(), "decoder", levels::NOTHING); 30 | IDecoderCallbacks callback; 31 | Decoder decoder(callback, logger); 32 | 33 | decoder.DecodeLPDU(buffer); 34 | 35 | return 0; 36 | } 37 | -------------------------------------------------------------------------------- /java/bindings/src/main/java/com/automatak/dnp3/StackStatistics.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | package com.automatak.dnp3; 21 | 22 | /** 23 | * Combined statistics for an outstation or master stack 24 | */ 25 | public class StackStatistics 26 | { 27 | public StackStatistics( 28 | LinkLayerStatistics link, 29 | TransportStatistics transport 30 | ) 31 | { 32 | this.link = link; 33 | this.transport = transport; 34 | } 35 | 36 | public final LinkLayerStatistics link; 37 | public final TransportStatistics transport; 38 | } 39 | 40 | -------------------------------------------------------------------------------- /dotnet/CLRInterface/src/IDnpTimeSource.cs: -------------------------------------------------------------------------------- 1 | // Copyright 2013-2022 Step Function I/O, LLC 2 | // 3 | // Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 4 | // LLC (https://stepfunc.io) under one or more contributor license agreements. 5 | // See the NOTICE file distributed with this work for additional information 6 | // regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 7 | // this file to you under the Apache License, Version 2.0 (the "License"); you 8 | // may not use this file except in compliance with the License. You may obtain 9 | // a copy of the License at: 10 | // 11 | // http://www.apache.org/licenses/LICENSE-2.0 12 | // 13 | // Unless required by applicable law or agreed to in writing, software 14 | // distributed under the License is distributed on an "AS IS" BASIS, 15 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | // See the License for the specific language governing permissions and 17 | // limitations under the License. 18 | 19 | using System; 20 | using System.Collections.Generic; 21 | using System.Linq; 22 | using System.Text; 23 | 24 | namespace Automatak.DNP3.Interface 25 | { 26 | /// 27 | /// Interface that defines a method to get DNPTime source 28 | /// 29 | public interface IDnpTimeSource 30 | { 31 | /// 32 | /// Returns a DNPTime of the current time. 33 | /// This value is used when freezing counters. 34 | /// 35 | DNPTime Now(); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /generation/dnp3/src/main/scala/com/automatak/render/dnp3/enums/LogLevel.scala: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | package com.automatak.render.dnp3.enums 21 | 22 | import com.automatak.render._ 23 | 24 | object LogLevel { 25 | 26 | private val comments = List("Enumeration for log levels") 27 | 28 | def apply(): EnumModel = EnumModel("LogLevel", comments, EnumModel.UInt32, codes, None, Hex) 29 | 30 | private val codes = EnumValues.bitmask(levels) 31 | 32 | private def levels = List("Event", "Error", "Warning", "Info", "Interpret", "Comm", "Debug") 33 | 34 | 35 | } 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /cpp/tests/dnp3mocks/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(dnp3mocks_public_headers 2 | ./include/dnp3mocks/DatabaseHelpers.h 3 | ./include/dnp3mocks/DataSink.h 4 | ./include/dnp3mocks/MockAPDUHeaderHandler.h 5 | ./include/dnp3mocks/MockCommandHandler.h 6 | ./include/dnp3mocks/MockEventWriteHandler.h 7 | ./include/dnp3mocks/MockFrameSink.h 8 | ./include/dnp3mocks/MockLinkLayer.h 9 | ./include/dnp3mocks/MockLinkListener.h 10 | ./include/dnp3mocks/MockLogHandler.h 11 | ./include/dnp3mocks/MockLowerLayer.h 12 | ./include/dnp3mocks/MockMasterApplication.h 13 | ./include/dnp3mocks/MockOutstationApplication.h 14 | ./include/dnp3mocks/MockSOEHandler.h 15 | ./include/dnp3mocks/MockTaskCallback.h 16 | ./include/dnp3mocks/MockTransportLayer.h 17 | ./include/dnp3mocks/MockUpperLayer.h 18 | ) 19 | 20 | set(dnp3mocks_src 21 | ./src/DatabaseHelpers.cpp 22 | ./src/DataSink.cpp 23 | ./src/MockFrameSink.cpp 24 | ./src/MockLogHandler.cpp 25 | ./src/MockLowerLayer.cpp 26 | ./src/MockTransportLayer.cpp 27 | ./src/MockUpperLayer.cpp 28 | ) 29 | 30 | source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} 31 | FILES ${dnp3mocks_public_headers} ${dnp3mocks_src} 32 | ) 33 | 34 | add_library(dnp3mocks 35 | ${dnp3mocks_public_headers} ${dnp3mocks_src} 36 | ) 37 | target_link_libraries(dnp3mocks PUBLIC opendnp3 ser4cpp exe4cpp asio) 38 | target_include_directories(dnp3mocks PUBLIC ./include ../../lib/src) 39 | set_target_properties(dnp3mocks PROPERTIES FOLDER cpp/tests) 40 | 41 | clang_format(dnp3mocks) 42 | clang_tidy(dnp3mocks) 43 | -------------------------------------------------------------------------------- /generation/dnp3/src/main/scala/com/automatak/render/dnp3/objects/groups/Group80.scala: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | package com.automatak.render.dnp3.objects.groups 21 | 22 | import com.automatak.render.dnp3.objects.{SingleBitfield, ObjectGroup} 23 | import com.automatak.render.dnp3.objects.VariationNames._ 24 | 25 | object Group80 extends ObjectGroup { 26 | def objects = List(Group80Var1) 27 | def group: Byte = 80 28 | def desc: String = "Internal Indications" 29 | def isEventGroup: Boolean = false 30 | } 31 | 32 | object Group80Var1 extends SingleBitfield(Group80, 1, packedFormat) 33 | 34 | -------------------------------------------------------------------------------- /java/bindings/src/main/java/com/automatak/dnp3/AnalogConfig.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | package com.automatak.dnp3; 21 | 22 | import com.automatak.dnp3.enums.EventAnalogVariation; 23 | import com.automatak.dnp3.enums.StaticAnalogVariation; 24 | 25 | public class AnalogConfig extends EventConfig { 26 | 27 | public AnalogConfig() { 28 | super(); 29 | } 30 | 31 | public double deadband = 0; 32 | public EventAnalogVariation eventVariation = EventAnalogVariation.Group32Var1; 33 | public StaticAnalogVariation staticVariation = StaticAnalogVariation.Group30Var1; 34 | } 35 | -------------------------------------------------------------------------------- /java/bindings/src/main/java/com/automatak/dnp3/TaskId.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | package com.automatak.dnp3; 21 | 22 | public class TaskId 23 | { 24 | public final int id; 25 | public final boolean isValid; 26 | 27 | public TaskId(int id, boolean isDefined) 28 | { 29 | this.id = id; 30 | this.isValid = isDefined; 31 | } 32 | 33 | public static TaskId defined(int id) 34 | { 35 | return new TaskId(id, true); 36 | } 37 | 38 | public static TaskId undefined() 39 | { 40 | return new TaskId(-1, false); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /cpp/lib/include/opendnp3/app/GroupVariationID.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | #ifndef OPENDNP3_GROUPVARIATIONID_H 21 | #define OPENDNP3_GROUPVARIATIONID_H 22 | 23 | #include 24 | 25 | namespace opendnp3 26 | { 27 | 28 | /// Simple uint8_t/uint8_t tuple for group and variation 29 | struct GroupVariationID 30 | { 31 | GroupVariationID() : group(0xFF), variation(0xFF) {} 32 | 33 | GroupVariationID(uint8_t aGroup, uint8_t aVariation) : group(aGroup), variation(aVariation) {} 34 | 35 | uint8_t group; 36 | uint8_t variation; 37 | }; 38 | 39 | } // namespace opendnp3 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /cpp/lib/src/channel/IOpenDelayStrategy.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 Step Function I/O, LLC 3 | * 4 | * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O 5 | * LLC (https://stepfunc.io) under one or more contributor license agreements. 6 | * See the NOTICE file distributed with this work for additional information 7 | * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license 8 | * this file to you under the Apache License, Version 2.0 (the "License"); you 9 | * may not use this file except in compliance with the License. You may obtain 10 | * a copy of the License at: 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | #include "opendnp3/channel/IOpenDelayStrategy.h" 21 | 22 | namespace opendnp3 23 | { 24 | 25 | ExponentialBackoffStrategy ExponentialBackoffStrategy::instance; 26 | 27 | IOpenDelayStrategy& ExponentialBackoffStrategy::Instance() 28 | { 29 | return instance; 30 | } 31 | 32 | TimeDuration ExponentialBackoffStrategy::GetNextDelay(const TimeDuration& current, const TimeDuration& max) const 33 | { 34 | const auto doubled = current.Double(); 35 | return (doubled > max) ? max : doubled; 36 | } 37 | 38 | } // namespace opendnp3 39 | --------------------------------------------------------------------------------