├── .github └── workflows │ ├── cifuzz.yml │ ├── codeql-analysis.yml │ └── greetings.yml ├── .gitignore ├── .travis.yml ├── CHANGELOG ├── CMakeLists.txt ├── COPYING ├── Makefile ├── README.md ├── SECURITY.md ├── config ├── stack_config.h └── stack_config.h.cmake ├── demos └── beaglebone │ ├── CMakeLists.txt │ ├── Makefile │ ├── beagle_client.c │ ├── beagle_demo.c │ ├── beagle_demo.icd │ ├── beagle_demo.iid │ ├── beaglebone_leds.c │ ├── beaglebone_leds.h │ ├── static_model.c │ └── static_model.h ├── dotnet ├── IEC61850forCSharp │ ├── AssemblyInfo.cs │ ├── Control.cs │ ├── DataSet.cs │ ├── GooseControlBlock.cs │ ├── GooseSubscriber.cs │ ├── IEC61850.NET.csproj │ ├── IEC61850ClientAPI.cs │ ├── IEC61850CommonAPI.cs │ ├── IEC61850ServerAPI.cs │ ├── IedServerConfig.cs │ ├── IsoConnectionParameters.cs │ ├── MmsValue.cs │ ├── MmsVariableSpecification.cs │ ├── ReportControlBlock.cs │ ├── Reporting.cs │ ├── SampledValuesControlBlock.cs │ ├── SampledValuesSubscriber.cs │ └── TLS.cs ├── authenticate │ ├── AssemblyInfo.cs │ ├── Main.cs │ └── authenticate.csproj ├── client_example_async │ ├── Program.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ └── client_example_async.csproj ├── client_example_setting_groups │ ├── Program.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ └── client_example_setting_groups.csproj ├── control │ ├── AssemblyInfo.cs │ ├── ControlExample.cs │ └── control.csproj ├── core │ └── 2.0 │ │ ├── IEC61850.NET.core.2.0.sln │ │ ├── IEC61850.NET.core.2.0 │ │ └── IEC61850.NET.core.2.0.csproj │ │ ├── client_example1 │ │ └── client_example1.csproj │ │ ├── client_example2 │ │ └── client_example2.csproj │ │ ├── client_example3 │ │ └── client_example3.csproj │ │ ├── client_example_authenticate │ │ └── client_example_authenticate.csproj │ │ ├── client_example_control │ │ └── client_example_control.csproj │ │ ├── client_example_datasets │ │ └── client_example_datasets.csproj │ │ ├── client_example_files │ │ └── client_example_files.csproj │ │ ├── client_example_log │ │ └── client_example_log.csproj │ │ ├── client_example_model_browsing │ │ └── client_example_model_browsing.csproj │ │ ├── client_example_reporting │ │ └── client_example_reporting.csproj │ │ ├── client_example_tls │ │ └── client_example_tls.csproj │ │ ├── goose_subscriber_example │ │ └── goose_subscriber_example.csproj │ │ ├── server_example1 │ │ └── server_example1.csproj │ │ └── sv_subscriber_example │ │ └── sv_subscriber_example.csproj ├── datasets │ ├── AssemblyInfo.cs │ ├── DataSetExample.cs │ └── datasets.csproj ├── dotnet.sln ├── example1 │ ├── AssemblyInfo.cs │ ├── Main.cs │ └── example1.csproj ├── example2 │ ├── AssemblyInfo.cs │ ├── WriteValueExample.cs │ └── example2.csproj ├── example3 │ ├── AssemblyInfo.cs │ ├── Main.cs │ └── example3.csproj ├── files │ ├── AssemblyInfo.cs │ ├── FileServicesExample.cs │ └── files.csproj ├── goose_subscriber │ ├── Program.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ └── goose_subscriber.csproj ├── log_client │ ├── Program.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ └── log_client.csproj ├── model_browsing │ ├── AssemblyInfo.cs │ ├── ModelBrowsing.cs │ └── model_browsing.csproj ├── report_new_dataset │ ├── AssemblyInfo.cs │ ├── Main.cs │ └── report_new_dataset.csproj ├── reporting │ ├── AssemblyInfo.cs │ ├── ReportingExample.cs │ ├── Settings.cs │ └── reporting.csproj ├── server1 │ ├── Program.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── model.cfg │ └── server1.csproj ├── server_goose_publisher │ ├── App.config │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── ServerExampleWithGoosePublisher.cs │ ├── server_goose_publisher.csproj │ ├── simpleIO_direct_control_goose.cfg │ └── simpleIO_direct_control_goose.cid ├── sv_subscriber │ ├── Program.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ └── sv_subscriber.csproj ├── tests │ ├── Test.cs │ ├── model.cfg │ ├── model2.cfg │ ├── simpleIO_control_tests.scd │ ├── test.icd │ └── tests.csproj ├── tls_client_example │ ├── Program.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── client1-key.pem │ ├── client1.cer │ ├── root.cer │ └── tls_client_example.csproj └── tls_server_example │ ├── Program.cs │ ├── Properties │ └── AssemblyInfo.cs │ ├── model.cfg │ ├── root.cer │ ├── server-key.pem │ ├── server.cer │ └── tls_server_example.csproj ├── examples ├── CMakeLists.txt ├── Makefile ├── goose_observer │ ├── CMakeLists.txt │ ├── Makefile │ └── goose_observer.c ├── goose_publisher │ ├── CMakeLists.txt │ ├── Makefile │ └── goose_publisher_example.c ├── goose_subscriber │ ├── CMakeLists.txt │ ├── Makefile │ └── goose_subscriber_example.c ├── iec61850_9_2_LE_example │ ├── CMakeLists.txt │ ├── Makefile │ ├── README │ ├── iec61850_9_2_LE_example.c │ ├── static_model.c │ ├── static_model.h │ └── sv.icd ├── iec61850_client_example1 │ ├── CMakeLists.txt │ ├── Makefile │ └── client_example1.c ├── iec61850_client_example2 │ ├── CMakeLists.txt │ ├── Makefile │ └── client_example2.c ├── iec61850_client_example4 │ ├── CMakeLists.txt │ ├── Makefile │ └── client_example4.c ├── iec61850_client_example5 │ ├── CMakeLists.txt │ ├── Makefile │ └── client_example5.c ├── iec61850_client_example_ClientGooseControl │ ├── CMakeLists.txt │ ├── Makefile │ └── client_example_ClientGooseControl.c ├── iec61850_client_example_ClientGooseControlAsync │ ├── CMakeLists.txt │ ├── Makefile │ └── client_example_ClientGooseControlAsync.c ├── iec61850_client_example_array │ ├── CMakeLists.txt │ ├── Makefile │ └── client_example_array.c ├── iec61850_client_example_async │ ├── CMakeLists.txt │ ├── Makefile │ └── client_example_async.c ├── iec61850_client_example_control │ ├── CMakeLists.txt │ ├── Makefile │ └── client_example_control.c ├── iec61850_client_example_files │ ├── CMakeLists.txt │ ├── Makefile │ └── file-tool.c ├── iec61850_client_example_log │ ├── CMakeLists.txt │ ├── Makefile │ └── client_example_log.c ├── iec61850_client_example_no_thread │ ├── CMakeLists.txt │ ├── Makefile │ └── client_example_no_thread.c ├── iec61850_client_example_rcbAsync │ ├── CMakeLists.txt │ ├── Makefile │ └── client_example_rcbAsync.c ├── iec61850_client_example_reporting │ ├── CMakeLists.txt │ ├── Makefile │ └── client_example_reporting.c ├── iec61850_client_file_async │ ├── CMakeLists.txt │ └── client_example_async.c ├── iec61850_sv_client_example │ ├── CMakeLists.txt │ ├── Makefile │ └── sv_client_example.c ├── mms_utility │ ├── CMakeLists.txt │ ├── Makefile │ └── mms_utility.c ├── r_goose_publisher_example │ ├── CMakeLists.txt │ └── r_goose_publisher_example.c ├── r_goose_receiver_example │ ├── CMakeLists.txt │ └── r_goose_subscriber_example.c ├── rsv_publisher_example │ ├── CMakeLists.txt │ └── r_sv_publisher_example.c ├── rsv_subscriber_example │ ├── CMakeLists.txt │ └── r_sv_subscriber_example.c ├── server_example_61400_25 │ ├── CMakeLists.txt │ ├── Makefile │ ├── server_example_61400_25.c │ ├── static_model.c │ ├── static_model.h │ └── wtur.cid ├── server_example_access_control │ ├── CMakeLists.txt │ ├── Makefile │ ├── server_example_access_control.c │ ├── static_model.c │ └── static_model.h ├── server_example_basic_io │ ├── CMakeLists.txt │ ├── Makefile │ ├── Makefile.standalone │ ├── server_example_basic_io.c │ ├── simpleIO_direct_control.cid │ ├── simpleIO_direct_control.icd │ ├── static_model.c │ └── static_model.h ├── server_example_complex_array │ ├── CMakeLists.txt │ ├── Makefile │ ├── mhai_array.cid │ ├── server_example_ca.c │ ├── static_model.c │ └── static_model.h ├── server_example_config_file │ ├── CMakeLists.txt │ ├── Makefile │ ├── model.cfg │ ├── server_example_config_file.c │ └── simpleIO_direct_control_goose.cid ├── server_example_control │ ├── CMakeLists.txt │ ├── Makefile │ ├── server_example_control.c │ ├── simpleIO_control_tests.cid │ ├── static_model.c │ └── static_model.h ├── server_example_deadband │ ├── CMakeLists.txt │ ├── Makefile │ ├── cid_example_deadband.cid │ ├── server_example_deadband.c │ ├── static_model.c │ └── static_model.h ├── server_example_dynamic │ ├── CMakeLists.txt │ ├── Makefile │ └── server_example_dynamic.c ├── server_example_files │ ├── CMakeLists.txt │ ├── Makefile │ ├── server_example_files.c │ ├── simpleIO_direct_control.cid │ ├── static_model.c │ ├── static_model.h │ └── vmd-filestore │ │ └── test ├── server_example_goose │ ├── CMakeLists.txt │ ├── Makefile │ ├── server_example_goose.c │ ├── simpleIO_direct_control_goose.cid │ ├── static_model.c │ └── static_model.h ├── server_example_logging │ ├── CMakeLists.txt │ ├── Makefile │ ├── Makefile.sqliteStatic │ ├── Makefile.standalone │ ├── README │ ├── server_example_logging.c │ ├── simpleIO_direct_control.cid │ ├── static_model.c │ └── static_model.h ├── server_example_password_auth │ ├── CMakeLists.txt │ ├── Makefile │ ├── server_example_password_auth.c │ ├── simpleIO_direct_control.cid │ ├── static_model.c │ └── static_model.h ├── server_example_service_tracking │ ├── CMakeLists.txt │ ├── server_example_service_tracking.c │ ├── simpleIO_ltrk_tests.icd │ ├── static_model.c │ └── static_model.h ├── server_example_setting_groups │ ├── CMakeLists.txt │ ├── Makefile │ ├── server_example_sg.c │ ├── sg_demo.cid │ ├── static_model.c │ └── static_model.h ├── server_example_simple │ ├── CMakeLists.txt │ ├── Makefile │ ├── sampleModel_with_dataset.cid │ ├── server_example_simple.c │ ├── static_model.c │ └── static_model.h ├── server_example_substitution │ ├── CMakeLists.txt │ ├── Makefile │ ├── server_example_substitution.c │ ├── static_model.c │ ├── static_model.h │ └── substitution_example.cid ├── server_example_threadless │ ├── CMakeLists.txt │ ├── Makefile │ ├── server_example_threadless.c │ ├── simpleIO_direct_control.cid │ ├── static_model.c │ ├── static_model.h │ └── vmd-filestore │ │ └── SYSTEM.BIN ├── server_example_write_handler │ ├── CMakeLists.txt │ ├── Makefile │ ├── complexModel.cid │ ├── server_example_write_handler.c │ ├── static_model.c │ └── static_model.h ├── sntp_example │ ├── CMakeLists.txt │ └── sntp_example.c ├── sv_publisher │ ├── CMakeLists.txt │ ├── Makefile │ └── sv_publisher_example.c ├── sv_subscriber │ ├── CMakeLists.txt │ ├── Makefile │ └── sv_subscriber_example.c ├── tls_client_example │ ├── CMakeLists.txt │ ├── Makefile │ ├── client_CA1_1.key │ ├── client_CA1_1.pem │ ├── root_CA1.pem │ ├── server_CA1_1.key │ ├── server_CA1_1.pem │ └── tls_client_example.c └── tls_server_example │ ├── CMakeLists.txt │ ├── Makefile │ ├── client_CA1_1.pem │ ├── client_CA1_2.pem │ ├── root_CA1.pem │ ├── server_CA1_1.key │ ├── server_CA1_1.pem │ ├── static_model.c │ ├── static_model.h │ └── tls_server_example.c ├── fuzz ├── fuzz_goose_subscriber.c ├── fuzz_mms_decode.c ├── fuzz_mms_server_decode_mms_pdu.c └── fuzz_pres_userdata.c ├── hal ├── CMakeLists.txt ├── ethernet │ ├── bsd │ │ └── ethernet_bsd.c │ ├── linux │ │ └── ethernet_linux.c │ └── win32 │ │ └── ethernet_win32.c ├── filesystem │ ├── linux │ │ └── file_provider_linux.c │ └── win32 │ │ └── file_provider_win32.c ├── inc │ ├── hal_base.h │ ├── hal_ethernet.h │ ├── hal_filesystem.h │ ├── hal_serial.h │ ├── hal_socket.h │ ├── hal_thread.h │ ├── hal_time.h │ ├── lib_memory.h │ ├── platform_endian.h │ ├── tls_ciphers.h │ ├── tls_config.h │ └── tls_socket.h ├── memory │ └── lib_memory.c ├── serial │ ├── linux │ │ └── serial_port_linux.c │ └── win32 │ │ └── serial_port_win32.c ├── socket │ ├── bsd │ │ └── socket_bsd.c │ ├── linux │ │ └── socket_linux.c │ └── win32 │ │ └── socket_win32.c ├── thread │ ├── bsd │ │ └── thread_bsd.c │ ├── linux │ │ └── thread_linux.c │ ├── macos │ │ └── thread_macos.c │ └── win32 │ │ └── thread_win32.c ├── time │ ├── unix │ │ └── time.c │ └── win32 │ │ └── time.c └── tls │ ├── mbedtls │ ├── mbedtls_config.h │ └── tls_mbedtls.c │ └── mbedtls3 │ ├── mbedtls_config.h │ └── tls_mbedtls.c ├── make ├── common_targets.mk ├── stack_includes.mk └── target_system.mk ├── pyiec61850 ├── CMakeLists.txt ├── README.md ├── eventHandlers │ ├── commandTermHandler.hpp │ ├── controlActionHandler.hpp │ ├── eventHandler.hpp │ ├── gooseHandler.hpp │ └── reportControlBlockHandler.hpp ├── examples │ ├── dispServerStruct.py │ └── rcbSubscriptionExample.py ├── iec61850.i ├── servicePythonWrapper.hpp └── test_pyiec61850.py ├── src ├── CMakeLists.txt ├── Doxyfile.in ├── common │ ├── buffer_chain.c │ ├── byte_buffer.c │ ├── conversions.c │ ├── inc │ │ ├── buffer_chain.h │ │ ├── byte_buffer.h │ │ ├── conversions.h │ │ ├── libiec61850_common_api.h │ │ ├── libiec61850_platform_includes.h │ │ ├── linked_list.h │ │ ├── map.h │ │ ├── mem_alloc_linked_list.h │ │ ├── simple_allocator.h │ │ ├── sntp_client.h │ │ ├── string_map.h │ │ └── string_utilities.h │ ├── linked_list.c │ ├── map.c │ ├── mem_alloc_linked_list.c │ ├── simple_allocator.c │ ├── string_map.c │ └── string_utilities.c ├── doxygen │ ├── Doxyfile.NET.in │ ├── DoxygenLayout.xml │ ├── doxygen.css │ ├── doxygen.mod.css │ ├── footer.html │ ├── header.html │ ├── libIEC61850_server.png │ ├── mainpage.doxygen │ ├── mainpage_net.md │ ├── mz-automation.ico │ └── stylesheet.css ├── goose │ ├── goose_publisher.c │ ├── goose_publisher.h │ ├── goose_receiver.c │ ├── goose_receiver.h │ ├── goose_receiver_internal.h │ ├── goose_subscriber.c │ ├── goose_subscriber.h │ └── iec61850_goose.asn ├── iec61850 │ ├── client │ │ ├── client_control.c │ │ ├── client_goose_control.c │ │ ├── client_report.c │ │ ├── client_report_control.c │ │ ├── client_sv_control.c │ │ └── ied_connection.c │ ├── common │ │ └── iec61850_common.c │ ├── inc │ │ ├── iec61850_cdc.h │ │ ├── iec61850_client.h │ │ ├── iec61850_common.h │ │ ├── iec61850_config_file_parser.h │ │ ├── iec61850_dynamic_model.h │ │ ├── iec61850_model.h │ │ └── iec61850_server.h │ ├── inc_private │ │ ├── control.h │ │ ├── iec61850_common_internal.h │ │ ├── ied_connection_private.h │ │ ├── ied_server_private.h │ │ ├── logging.h │ │ ├── mms_goose.h │ │ ├── mms_mapping.h │ │ ├── mms_mapping_internal.h │ │ ├── mms_sv.h │ │ └── reporting.h │ └── server │ │ ├── impl │ │ ├── client_connection.c │ │ ├── ied_server.c │ │ └── ied_server_config.c │ │ ├── mms_mapping │ │ ├── control.c │ │ ├── logging.c │ │ ├── mms_goose.c │ │ ├── mms_mapping.c │ │ ├── mms_sv.c │ │ └── reporting.c │ │ └── model │ │ ├── cdc.c │ │ ├── config_file_parser.c │ │ ├── dynamic_model.c │ │ └── model.c ├── libiec61850.pc.in ├── logging │ ├── drivers │ │ ├── README │ │ └── sqlite │ │ │ └── log_storage_sqlite.c │ ├── log_storage.c │ └── logging_api.h ├── mms │ ├── asn1 │ │ ├── asn1_ber_primitive_value.c │ │ ├── ber_decode.c │ │ ├── ber_encoder.c │ │ └── ber_integer.c │ ├── inc │ │ ├── iso_connection_parameters.h │ │ ├── mms_client_connection.h │ │ ├── mms_common.h │ │ ├── mms_server.h │ │ ├── mms_type_spec.h │ │ ├── mms_types.h │ │ └── mms_value.h │ ├── inc_private │ │ ├── acse.h │ │ ├── asn1_ber_primitive_value.h │ │ ├── ber_decode.h │ │ ├── ber_encoder.h │ │ ├── ber_integer.h │ │ ├── cotp.h │ │ ├── iso_client_connection.h │ │ ├── iso_presentation.h │ │ ├── iso_server.h │ │ ├── iso_server_private.h │ │ ├── iso_session.h │ │ ├── mms_client_internal.h │ │ ├── mms_common_internal.h │ │ ├── mms_device_model.h │ │ ├── mms_named_variable_list.h │ │ ├── mms_server_connection.h │ │ ├── mms_server_internal.h │ │ ├── mms_server_libinternal.h │ │ ├── mms_value_cache.h │ │ └── mms_value_internal.h │ ├── iso_acse │ │ └── acse.c │ ├── iso_client │ │ └── iso_client_connection.c │ ├── iso_common │ │ └── iso_connection_parameters.c │ ├── iso_cotp │ │ └── cotp.c │ ├── iso_mms │ │ ├── asn1c │ │ │ ├── AccessResult.c │ │ │ ├── AccessResult.h │ │ │ ├── Address.c │ │ │ ├── Address.h │ │ │ ├── AlternateAccess.c │ │ │ ├── AlternateAccess.h │ │ │ ├── AlternateAccessSelection.c │ │ │ ├── AlternateAccessSelection.h │ │ │ ├── BIT_STRING.c │ │ │ ├── BIT_STRING.h │ │ │ ├── BOOLEAN.c │ │ │ ├── BOOLEAN.h │ │ │ ├── ConcludeRequestPDU.c │ │ │ ├── ConcludeRequestPDU.h │ │ │ ├── ConcludeResponsePDU.c │ │ │ ├── ConcludeResponsePDU.h │ │ │ ├── ConfirmedErrorPDU.c │ │ │ ├── ConfirmedErrorPDU.h │ │ │ ├── ConfirmedRequestPdu.c │ │ │ ├── ConfirmedRequestPdu.h │ │ │ ├── ConfirmedResponsePdu.c │ │ │ ├── ConfirmedResponsePdu.h │ │ │ ├── ConfirmedServiceRequest.c │ │ │ ├── ConfirmedServiceRequest.h │ │ │ ├── ConfirmedServiceResponse.c │ │ │ ├── ConfirmedServiceResponse.h │ │ │ ├── Data.c │ │ │ ├── Data.h │ │ │ ├── DataAccessError.c │ │ │ ├── DataAccessError.h │ │ │ ├── DataSequence.c │ │ │ ├── DataSequence.h │ │ │ ├── DefineNamedVariableListRequest.c │ │ │ ├── DefineNamedVariableListRequest.h │ │ │ ├── DefineNamedVariableListResponse.c │ │ │ ├── DefineNamedVariableListResponse.h │ │ │ ├── DeleteNamedVariableListRequest.c │ │ │ ├── DeleteNamedVariableListRequest.h │ │ │ ├── DeleteNamedVariableListResponse.c │ │ │ ├── DeleteNamedVariableListResponse.h │ │ │ ├── FloatingPoint.c │ │ │ ├── FloatingPoint.h │ │ │ ├── GeneralizedTime.c │ │ │ ├── GeneralizedTime.h │ │ │ ├── GetNameListRequest.c │ │ │ ├── GetNameListRequest.h │ │ │ ├── GetNameListResponse.c │ │ │ ├── GetNameListResponse.h │ │ │ ├── GetNamedVariableListAttributesRequest.c │ │ │ ├── GetNamedVariableListAttributesRequest.h │ │ │ ├── GetNamedVariableListAttributesResponse.c │ │ │ ├── GetNamedVariableListAttributesResponse.h │ │ │ ├── GetVariableAccessAttributesRequest.c │ │ │ ├── GetVariableAccessAttributesRequest.h │ │ │ ├── GetVariableAccessAttributesResponse.c │ │ │ ├── GetVariableAccessAttributesResponse.h │ │ │ ├── INTEGER.c │ │ │ ├── INTEGER.h │ │ │ ├── Identifier.c │ │ │ ├── Identifier.h │ │ │ ├── IndexRangeSeq.c │ │ │ ├── IndexRangeSeq.h │ │ │ ├── InformationReport.c │ │ │ ├── InformationReport.h │ │ │ ├── InitRequestDetail.c │ │ │ ├── InitRequestDetail.h │ │ │ ├── InitResponseDetail.c │ │ │ ├── InitResponseDetail.h │ │ │ ├── InitiateErrorPdu.c │ │ │ ├── InitiateErrorPdu.h │ │ │ ├── InitiateRequestPdu.c │ │ │ ├── InitiateRequestPdu.h │ │ │ ├── InitiateResponsePdu.c │ │ │ ├── InitiateResponsePdu.h │ │ │ ├── Integer16.c │ │ │ ├── Integer16.h │ │ │ ├── Integer32.c │ │ │ ├── Integer32.h │ │ │ ├── Integer8.c │ │ │ ├── Integer8.h │ │ │ ├── ListOfVariableSeq.c │ │ │ ├── ListOfVariableSeq.h │ │ │ ├── MMSString.c │ │ │ ├── MMSString.h │ │ │ ├── MmsPdu.c │ │ │ ├── MmsPdu.h │ │ │ ├── NULL.c │ │ │ ├── NULL.h │ │ │ ├── NativeEnumerated.c │ │ │ ├── NativeEnumerated.h │ │ │ ├── NativeInteger.c │ │ │ ├── NativeInteger.h │ │ │ ├── OCTET_STRING.c │ │ │ ├── OCTET_STRING.h │ │ │ ├── ObjectClass.c │ │ │ ├── ObjectClass.h │ │ │ ├── ObjectName.c │ │ │ ├── ObjectName.h │ │ │ ├── ParameterSupportOptions.c │ │ │ ├── ParameterSupportOptions.h │ │ │ ├── ReadRequest.c │ │ │ ├── ReadRequest.h │ │ │ ├── ReadResponse.c │ │ │ ├── ReadResponse.h │ │ │ ├── RejectPDU.c │ │ │ ├── RejectPDU.h │ │ │ ├── ScatteredAccessDescription.c │ │ │ ├── ScatteredAccessDescription.h │ │ │ ├── ServiceError.c │ │ │ ├── ServiceError.h │ │ │ ├── ServiceSupportOptions.c │ │ │ ├── ServiceSupportOptions.h │ │ │ ├── StructComponent.c │ │ │ ├── StructComponent.h │ │ │ ├── TimeOfDay.c │ │ │ ├── TimeOfDay.h │ │ │ ├── TypeSpecification.c │ │ │ ├── TypeSpecification.h │ │ │ ├── UTF8String.c │ │ │ ├── UTF8String.h │ │ │ ├── UnconfirmedPDU.c │ │ │ ├── UnconfirmedPDU.h │ │ │ ├── UnconfirmedService.c │ │ │ ├── UnconfirmedService.h │ │ │ ├── Unsigned16.c │ │ │ ├── Unsigned16.h │ │ │ ├── Unsigned32.c │ │ │ ├── Unsigned32.h │ │ │ ├── Unsigned8.c │ │ │ ├── Unsigned8.h │ │ │ ├── UtcTime.c │ │ │ ├── UtcTime.h │ │ │ ├── VariableAccessSpecification.c │ │ │ ├── VariableAccessSpecification.h │ │ │ ├── VariableSpecification.c │ │ │ ├── VariableSpecification.h │ │ │ ├── VisibleString.c │ │ │ ├── VisibleString.h │ │ │ ├── WriteRequest.c │ │ │ ├── WriteRequest.h │ │ │ ├── WriteResponse.c │ │ │ ├── WriteResponse.h │ │ │ ├── asn_SEQUENCE_OF.c │ │ │ ├── asn_SEQUENCE_OF.h │ │ │ ├── asn_SET_OF.c │ │ │ ├── asn_SET_OF.h │ │ │ ├── asn_application.h │ │ │ ├── asn_codecs.h │ │ │ ├── asn_codecs_prim.c │ │ │ ├── asn_codecs_prim.h │ │ │ ├── asn_internal.h │ │ │ ├── asn_system.h │ │ │ ├── ber_decoder.c │ │ │ ├── ber_decoder.h │ │ │ ├── ber_tlv_length.c │ │ │ ├── ber_tlv_length.h │ │ │ ├── ber_tlv_tag.c │ │ │ ├── ber_tlv_tag.h │ │ │ ├── constr_CHOICE.c │ │ │ ├── constr_CHOICE.h │ │ │ ├── constr_SEQUENCE.c │ │ │ ├── constr_SEQUENCE.h │ │ │ ├── constr_SEQUENCE_OF.c │ │ │ ├── constr_SEQUENCE_OF.h │ │ │ ├── constr_SET_OF.c │ │ │ ├── constr_SET_OF.h │ │ │ ├── constr_TYPE.c │ │ │ ├── constr_TYPE.h │ │ │ ├── constraints.c │ │ │ ├── constraints.h │ │ │ ├── der_encoder.c │ │ │ ├── der_encoder.h │ │ │ ├── per_decoder.c │ │ │ ├── per_decoder.h │ │ │ ├── per_encoder.c │ │ │ ├── per_encoder.h │ │ │ ├── per_support.c │ │ │ ├── per_support.h │ │ │ ├── xer_decoder.c │ │ │ ├── xer_decoder.h │ │ │ ├── xer_encoder.c │ │ │ ├── xer_encoder.h │ │ │ ├── xer_support.c │ │ │ └── xer_support.h │ │ ├── client │ │ │ ├── mms_client_common.c │ │ │ ├── mms_client_connection.c │ │ │ ├── mms_client_files.c │ │ │ ├── mms_client_get_namelist.c │ │ │ ├── mms_client_get_var_access.c │ │ │ ├── mms_client_identify.c │ │ │ ├── mms_client_initiate.c │ │ │ ├── mms_client_journals.c │ │ │ ├── mms_client_named_variable_list.c │ │ │ ├── mms_client_read.c │ │ │ ├── mms_client_status.c │ │ │ └── mms_client_write.c │ │ ├── common │ │ │ ├── mms_common_msg.c │ │ │ ├── mms_type_spec.c │ │ │ └── mms_value.c │ │ └── server │ │ │ ├── mms_access_result.c │ │ │ ├── mms_association_service.c │ │ │ ├── mms_device.c │ │ │ ├── mms_domain.c │ │ │ ├── mms_file_service.c │ │ │ ├── mms_get_namelist_service.c │ │ │ ├── mms_get_var_access_service.c │ │ │ ├── mms_identify_service.c │ │ │ ├── mms_information_report.c │ │ │ ├── mms_journal.c │ │ │ ├── mms_journal_service.c │ │ │ ├── mms_named_variable_list.c │ │ │ ├── mms_named_variable_list_service.c │ │ │ ├── mms_read_service.c │ │ │ ├── mms_server.c │ │ │ ├── mms_server_common.c │ │ │ ├── mms_server_connection.c │ │ │ ├── mms_status_service.c │ │ │ ├── mms_value_cache.c │ │ │ └── mms_write_service.c │ ├── iso_presentation │ │ └── iso_presentation.c │ ├── iso_server │ │ ├── iso_connection.c │ │ └── iso_server.c │ └── iso_session │ │ └── iso_session.c ├── r_session │ ├── r_session.c │ ├── r_session.h │ ├── r_session_crypto.h │ ├── r_session_crypto_mbedtls.c │ └── r_session_internal.h ├── sampled_values │ ├── sv_publisher.c │ ├── sv_publisher.h │ ├── sv_subscriber.c │ └── sv_subscriber.h ├── sntp │ └── sntp_client.c ├── version.rc.in └── vs │ └── stdbool.h ├── third_party ├── cmake │ └── modules │ │ └── Findsqlite.cmake ├── mbedtls │ └── README ├── sqlite │ └── README └── winpcap │ └── README └── tools └── model_generator ├── .classpath ├── .project ├── .settings └── org.eclipse.jdt.core.prefs ├── build-dyn-code-gen.sh ├── build-modelviewer.sh ├── build.sh ├── build2.sh ├── complexModel.icd ├── genconfig.jar ├── gendyncode.jar ├── genericIO.icd ├── genmodel.jar ├── inverter3ph.icd ├── inverter_with_report.icd ├── manifest-dynamic.mf ├── manifest-dyncCode.mf ├── manifest-modelviewer.mf ├── manifest.mf ├── modelviewer.jar ├── sampleModel.icd ├── sampleModel_errors.icd ├── sampleModel_with_dataset.icd ├── simpleIO_direct_control_goose.scd └── src └── com └── libiec61850 ├── scl ├── DataAttributeDefinition.java ├── DataObjectDefinition.java ├── ParserUtils.java ├── SclParser.java ├── SclParserException.java ├── communication │ ├── Address.java │ ├── Communication.java │ ├── ConnectedAP.java │ ├── GSE.java │ ├── P.java │ ├── PhyComAddress.java │ ├── SMV.java │ └── SubNetwork.java ├── model │ ├── AccessPoint.java │ ├── AttributeType.java │ ├── Authentication.java │ ├── ClientLN.java │ ├── DataAttribute.java │ ├── DataModelNode.java │ ├── DataModelValue.java │ ├── DataObject.java │ ├── DataSet.java │ ├── FunctionalConstraint.java │ ├── FunctionalConstraintData.java │ ├── GSEControl.java │ ├── IED.java │ ├── Log.java │ ├── LogControl.java │ ├── LogicalDevice.java │ ├── LogicalNode.java │ ├── OptionFields.java │ ├── ReportControlBlock.java │ ├── ReportSettings.java │ ├── RptEnabled.java │ ├── SampledValueControl.java │ ├── Server.java │ ├── Services.java │ ├── SettingControl.java │ ├── SmpMod.java │ ├── SmvOpts.java │ └── TriggerOptions.java └── types │ ├── DataAttributeType.java │ ├── DataObjectType.java │ ├── EnumerationType.java │ ├── EnumerationValue.java │ ├── IllegalValueException.java │ ├── LogicalNodeType.java │ ├── SclType.java │ └── TypeDeclarations.java └── tools ├── DynamicCodeGenerator.java ├── DynamicModelGenerator.java ├── ModelViewer.java └── StaticModelGenerator.java /.github/workflows/cifuzz.yml: -------------------------------------------------------------------------------- 1 | name: CIFuzz 2 | on: [pull_request] 3 | jobs: 4 | Fuzzing: 5 | runs-on: ubuntu-latest 6 | steps: 7 | - name: Build Fuzzers 8 | id: build 9 | uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master 10 | with: 11 | oss-fuzz-project-name: 'libiec61850' 12 | dry-run: false 13 | language: c 14 | - name: Run Fuzzers 15 | uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master 16 | with: 17 | oss-fuzz-project-name: 'libiec61850' 18 | fuzz-seconds: 300 19 | dry-run: false 20 | language: c 21 | - name: Upload Crash 22 | uses: actions/upload-artifact@v3 23 | if: failure() && steps.build.outcome == 'success' 24 | with: 25 | name: artifacts 26 | path: ./out/artifacts 27 | -------------------------------------------------------------------------------- /.github/workflows/greetings.yml: -------------------------------------------------------------------------------- 1 | name: Greetings 2 | 3 | on: [pull_request, issues] 4 | 5 | jobs: 6 | greeting: 7 | runs-on: ubuntu-latest 8 | steps: 9 | - uses: actions/first-interaction@v1 10 | with: 11 | repo-token: ${{ secrets.GITHUB_TOKEN }} 12 | pr-message: 'Push requests and other code contributions can only be accepted from authorized persons that have signed our contributor license agreement(CLA). When in doubt please write to info@libiec61850.com.' 13 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | build/ 2 | /Debug/ 3 | third_party/mbedtls 4 | third_party/winpcap 5 | third_party/sqlite 6 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: c 2 | 3 | compiler: 4 | - clang 5 | - gcc 6 | 7 | addons: 8 | apt: 9 | packages: 10 | - cmake 11 | - swig 12 | - libsqlite3-dev 13 | - python-dev 14 | 15 | before_install: 16 | - if [ "$TRAVIS_OS_NAME" == "osx" ]; then 17 | brew update; 18 | brew install swig python sqlite; 19 | fi 20 | - mkdir -p build && cd build 21 | 22 | script: 23 | - cmake .. -DBUILD_PYTHON_BINDINGS=ON 24 | - make 25 | - make test 26 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | ## Reporting a Vulnerability 4 | 5 | Please report security issues to `info@libiec61850.com` -------------------------------------------------------------------------------- /demos/beaglebone/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( 2 | . 3 | ) 4 | 5 | set(beagle_demo_SRCS 6 | beagle_demo.c 7 | static_model.c 8 | ) 9 | 10 | IF(WIN32) 11 | set_source_files_properties(${beagle_demo_SRCS} 12 | PROPERTIES LANGUAGE CXX) 13 | ENDIF(WIN32) 14 | 15 | add_executable(server_example3 16 | ${beagle_demo_SRCS} 17 | ) 18 | 19 | target_link_libraries(server_example3 20 | iec61850 21 | ) 22 | -------------------------------------------------------------------------------- /demos/beaglebone/Makefile: -------------------------------------------------------------------------------- 1 | LIBIEC_HOME=../.. 2 | 3 | PROJECT_BINARY_NAME = beagle_demo 4 | PROJECT_SOURCES = beagle_demo.c 5 | PROJECT_SOURCES += beaglebone_leds.c 6 | PROJECT_SOURCES += static_model.c 7 | 8 | include $(LIBIEC_HOME)/make/target_system.mk 9 | include $(LIBIEC_HOME)/make/stack_includes.mk 10 | 11 | all: $(PROJECT_BINARY_NAME) 12 | 13 | include $(LIBIEC_HOME)/make/common_targets.mk 14 | 15 | LDLIBS += -lm 16 | 17 | $(PROJECT_BINARY_NAME): $(PROJECT_SOURCES) $(LIB_NAME) 18 | $(CC) $(CFLAGS) $(LDFLAGS) -o $(PROJECT_BINARY_NAME) $(PROJECT_SOURCES) $(INCLUDES) $(LIB_NAME) $(LDLIBS) 19 | 20 | beagle_client: beagle_client.c $(LIB_NAME) 21 | $(CC) $(CFLAGS) $(LDFLAGS) -o beagle_client beagle_client.c $(INCLUDES) $(LIB_NAME) $(LDLIBS) 22 | 23 | clean: 24 | rm -f $(PROJECT_BINARY_NAME) beagle_client 25 | 26 | 27 | -------------------------------------------------------------------------------- /demos/beaglebone/beaglebone_leds.c: -------------------------------------------------------------------------------- 1 | /* 2 | * beaglebone_leds.c 3 | */ 4 | 5 | #include 6 | #include "beaglebone_leds.h" 7 | 8 | #ifndef SIMULATED 9 | static void 10 | writeToFile(char* filename, char* text) 11 | { 12 | FILE* file = fopen(filename, "w"); 13 | fprintf(file, "%s", text); 14 | fclose(file); 15 | } 16 | #endif /* SIMULATED */ 17 | 18 | void 19 | flashLED(char* led) 20 | { 21 | #ifndef SIMULATED 22 | char filename[255]; 23 | 24 | sprintf(filename, "%s/trigger", led); 25 | writeToFile(filename, "timer"); 26 | 27 | sprintf(filename, "%s/delay_on", led); 28 | writeToFile(filename, "200"); 29 | 30 | sprintf(filename, "%s/delay_off", led); 31 | writeToFile(filename, "200"); 32 | #else 33 | printf("FLASH: %s\n", led); 34 | #endif 35 | } 36 | 37 | void 38 | switchLED(char* led, int value) 39 | { 40 | #ifndef SIMULATED 41 | char filename[255]; 42 | char valueStr[10]; 43 | 44 | sprintf(filename, "%s/trigger", led); 45 | writeToFile(filename, "none"); 46 | 47 | sprintf(filename, "%s/brightness", led); 48 | sprintf(valueStr, "%i", value); 49 | 50 | writeToFile(filename, valueStr); 51 | #else 52 | printf("SWITCH: %s %i\n", led, value); 53 | #endif 54 | } 55 | 56 | void 57 | initLEDs() 58 | { 59 | switchLED(LED1, 0); 60 | switchLED(LED2, 0); 61 | switchLED(LED3, 0); 62 | switchLED(LED4, 0); 63 | } 64 | -------------------------------------------------------------------------------- /demos/beaglebone/beaglebone_leds.h: -------------------------------------------------------------------------------- 1 | /* 2 | * beaglebone_leds.h 3 | */ 4 | 5 | #ifndef BEAGLEBONE_LEDS_H_ 6 | #define BEAGLEBONE_LEDS_H_ 7 | 8 | 9 | /* define SIMULATED if you want to run the demo on a PC */ 10 | #define SIMULATED 11 | 12 | 13 | /* select correct file paths to access LEDs - depends on beaglebones linux distro/version */ 14 | #if 0 15 | #define LED1 "/sys/class/leds/beaglebone::usr0" 16 | #define LED2 "/sys/class/leds/beaglebone::usr1" 17 | #define LED3 "/sys/class/leds/beaglebone::usr2" 18 | #define LED4 "/sys/class/leds/beaglebone::usr3" 19 | #endif 20 | 21 | #if 1 22 | #define LED1 "/sys/class/leds/beaglebone:green:usr0" 23 | #define LED2 "/sys/class/leds/beaglebone:green:usr1" 24 | #define LED3 "/sys/class/leds/beaglebone:green:usr2" 25 | #define LED4 "/sys/class/leds/beaglebone:green:usr3" 26 | #endif 27 | 28 | void 29 | flashLED(char* led); 30 | 31 | void 32 | switchLED(char* led, int value); 33 | 34 | void 35 | initLEDs(); 36 | 37 | #endif /* BEAGLEBONE_LEDS_H_ */ 38 | -------------------------------------------------------------------------------- /dotnet/IEC61850forCSharp/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | 4 | // Information about this assembly is defined by the following attributes. 5 | // Change them to the values specific to your project. 6 | 7 | [assembly: AssemblyTitle("IEC61850 API for C#")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("MZ Automation GmbH")] 11 | [assembly: AssemblyProduct("")] 12 | [assembly: AssemblyCopyright("Michael Zillgith")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". 17 | // The form "{Major}.{Minor}.*" will automatically update the build and revision, 18 | // and "{Major}.{Minor}.{Build}.*" will update just the revision. 19 | 20 | [assembly: AssemblyVersion("1.0.*")] 21 | 22 | // The following attributes are used to specify the signing key for the assembly, 23 | // if desired. See the Mono documentation for more information about signing. 24 | 25 | //[assembly: AssemblyDelaySign(false)] 26 | //[assembly: AssemblyKeyFile("")] 27 | 28 | -------------------------------------------------------------------------------- /dotnet/authenticate/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | 4 | // Information about this assembly is defined by the following attributes. 5 | // Change them to the values specific to your project. 6 | 7 | [assembly: AssemblyTitle("authenticate")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("")] 11 | [assembly: AssemblyProduct("")] 12 | [assembly: AssemblyCopyright("mzillgit")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". 17 | // The form "{Major}.{Minor}.*" will automatically update the build and revision, 18 | // and "{Major}.{Minor}.{Build}.*" will update just the revision. 19 | 20 | [assembly: AssemblyVersion("1.0.*")] 21 | 22 | // The following attributes are used to specify the signing key for the assembly, 23 | // if desired. See the Mono documentation for more information about signing. 24 | 25 | //[assembly: AssemblyDelaySign(false)] 26 | //[assembly: AssemblyKeyFile("")] 27 | 28 | -------------------------------------------------------------------------------- /dotnet/authenticate/Main.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | using IEC61850.Client; 5 | using IEC61850.Common; 6 | 7 | namespace authenticate 8 | { 9 | class MainClass 10 | { 11 | public static void Main (string[] args) 12 | { 13 | IedConnection con = new IedConnection (); 14 | 15 | string hostname; 16 | 17 | if (args.Length > 0) 18 | hostname = args[0]; 19 | else 20 | hostname = "localhost"; 21 | 22 | Console.WriteLine("Connect to " + hostname); 23 | 24 | try 25 | { 26 | IsoConnectionParameters parameters = con.GetConnectionParameters(); 27 | 28 | parameters.UsePasswordAuthentication("top secret"); 29 | 30 | con.Connect(hostname, 102); 31 | 32 | List serverDirectory = con.GetServerDirectory(false); 33 | 34 | foreach (string entry in serverDirectory) 35 | { 36 | Console.WriteLine("LD: " + entry); 37 | } 38 | 39 | con.Release(); 40 | } 41 | catch (IedConnectionException e) 42 | { 43 | Console.WriteLine(e.Message); 44 | } 45 | 46 | 47 | // release all resources - do NOT use the object after this call!! 48 | con.Dispose (); 49 | } 50 | } 51 | } -------------------------------------------------------------------------------- /dotnet/client_example_async/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | 4 | // Information about this assembly is defined by the following attributes. 5 | // Change them to the values specific to your project. 6 | 7 | [assembly: AssemblyTitle("client_example_async")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("")] 11 | [assembly: AssemblyProduct("")] 12 | [assembly: AssemblyCopyright("mzillgit")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". 17 | // The form "{Major}.{Minor}.*" will automatically update the build and revision, 18 | // and "{Major}.{Minor}.{Build}.*" will update just the revision. 19 | 20 | [assembly: AssemblyVersion("1.0.*")] 21 | 22 | // The following attributes are used to specify the signing key for the assembly, 23 | // if desired. See the Mono documentation for more information about signing. 24 | 25 | //[assembly: AssemblyDelaySign(false)] 26 | //[assembly: AssemblyKeyFile("")] 27 | 28 | -------------------------------------------------------------------------------- /dotnet/client_example_setting_groups/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | 4 | // Information about this assembly is defined by the following attributes. 5 | // Change them to the values specific to your project. 6 | 7 | [assembly: AssemblyTitle("client-example-setting-group")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("")] 11 | [assembly: AssemblyProduct("")] 12 | [assembly: AssemblyCopyright("mzillgit")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". 17 | // The form "{Major}.{Minor}.*" will automatically update the build and revision, 18 | // and "{Major}.{Minor}.{Build}.*" will update just the revision. 19 | 20 | [assembly: AssemblyVersion("1.0.*")] 21 | 22 | // The following attributes are used to specify the signing key for the assembly, 23 | // if desired. See the Mono documentation for more information about signing. 24 | 25 | //[assembly: AssemblyDelaySign(false)] 26 | //[assembly: AssemblyKeyFile("")] 27 | 28 | -------------------------------------------------------------------------------- /dotnet/control/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | 4 | // Information about this assembly is defined by the following attributes. 5 | // Change them to the values specific to your project. 6 | 7 | [assembly: AssemblyTitle("control")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("")] 11 | [assembly: AssemblyProduct("")] 12 | [assembly: AssemblyCopyright("mzillgit")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". 17 | // The form "{Major}.{Minor}.*" will automatically update the build and revision, 18 | // and "{Major}.{Minor}.{Build}.*" will update just the revision. 19 | 20 | [assembly: AssemblyVersion("1.0.*")] 21 | 22 | // The following attributes are used to specify the signing key for the assembly, 23 | // if desired. See the Mono documentation for more information about signing. 24 | 25 | //[assembly: AssemblyDelaySign(false)] 26 | //[assembly: AssemblyKeyFile("")] 27 | 28 | -------------------------------------------------------------------------------- /dotnet/core/2.0/client_example1/client_example1.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | netcoreapp2.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /dotnet/core/2.0/client_example2/client_example2.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | netcoreapp2.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /dotnet/core/2.0/client_example3/client_example3.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | netcoreapp2.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /dotnet/core/2.0/client_example_authenticate/client_example_authenticate.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | netcoreapp2.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /dotnet/core/2.0/client_example_control/client_example_control.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | netcoreapp2.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /dotnet/core/2.0/client_example_datasets/client_example_datasets.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | netcoreapp2.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /dotnet/core/2.0/client_example_files/client_example_files.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | netcoreapp2.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /dotnet/core/2.0/client_example_log/client_example_log.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | netcoreapp2.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /dotnet/core/2.0/client_example_model_browsing/client_example_model_browsing.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | netcoreapp2.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /dotnet/core/2.0/client_example_reporting/client_example_reporting.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | netcoreapp2.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /dotnet/core/2.0/client_example_tls/client_example_tls.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | netcoreapp2.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | PreserveNewest 15 | 16 | 17 | PreserveNewest 18 | 19 | 20 | PreserveNewest 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /dotnet/core/2.0/goose_subscriber_example/goose_subscriber_example.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | netcoreapp2.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /dotnet/core/2.0/server_example1/server_example1.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | netcoreapp2.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | PreserveNewest 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /dotnet/core/2.0/sv_subscriber_example/sv_subscriber_example.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | netcoreapp2.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /dotnet/datasets/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | 4 | // Information about this assembly is defined by the following attributes. 5 | // Change them to the values specific to your project. 6 | 7 | [assembly: AssemblyTitle("datasets")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("")] 11 | [assembly: AssemblyProduct("")] 12 | [assembly: AssemblyCopyright("mzillgit")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". 17 | // The form "{Major}.{Minor}.*" will automatically update the build and revision, 18 | // and "{Major}.{Minor}.{Build}.*" will update just the revision. 19 | 20 | [assembly: AssemblyVersion("1.0.*")] 21 | 22 | // The following attributes are used to specify the signing key for the assembly, 23 | // if desired. See the Mono documentation for more information about signing. 24 | 25 | //[assembly: AssemblyDelaySign(false)] 26 | //[assembly: AssemblyKeyFile("")] 27 | 28 | -------------------------------------------------------------------------------- /dotnet/example1/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | 4 | // Information about this assembly is defined by the following attributes. 5 | // Change them to the values specific to your project. 6 | 7 | [assembly: AssemblyTitle("example1")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("")] 11 | [assembly: AssemblyProduct("")] 12 | [assembly: AssemblyCopyright("mzillgit")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". 17 | // The form "{Major}.{Minor}.*" will automatically update the build and revision, 18 | // and "{Major}.{Minor}.{Build}.*" will update just the revision. 19 | 20 | [assembly: AssemblyVersion("1.0.*")] 21 | 22 | // The following attributes are used to specify the signing key for the assembly, 23 | // if desired. See the Mono documentation for more information about signing. 24 | 25 | //[assembly: AssemblyDelaySign(false)] 26 | //[assembly: AssemblyKeyFile("")] 27 | 28 | -------------------------------------------------------------------------------- /dotnet/example2/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | 4 | // Information about this assembly is defined by the following attributes. 5 | // Change them to the values specific to your project. 6 | 7 | [assembly: AssemblyTitle("example2")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("")] 11 | [assembly: AssemblyProduct("")] 12 | [assembly: AssemblyCopyright("mzillgit")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". 17 | // The form "{Major}.{Minor}.*" will automatically update the build and revision, 18 | // and "{Major}.{Minor}.{Build}.*" will update just the revision. 19 | 20 | [assembly: AssemblyVersion("1.0.*")] 21 | 22 | // The following attributes are used to specify the signing key for the assembly, 23 | // if desired. See the Mono documentation for more information about signing. 24 | 25 | //[assembly: AssemblyDelaySign(false)] 26 | //[assembly: AssemblyKeyFile("")] 27 | 28 | -------------------------------------------------------------------------------- /dotnet/example2/WriteValueExample.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using IEC61850.Client; 4 | using IEC61850.Common; 5 | 6 | namespace example2 7 | { 8 | class WriteValueExample 9 | { 10 | public static void Main (string[] args) 11 | { 12 | IedConnection con = new IedConnection (); 13 | 14 | string hostname; 15 | 16 | if (args.Length > 0) 17 | hostname = args[0]; 18 | else 19 | hostname = "localhost"; 20 | 21 | Console.WriteLine("Connect to " + hostname); 22 | 23 | try 24 | { 25 | con.Connect(hostname, 102); 26 | 27 | float setMagF = con.ReadFloatValue("ied1Inverter/ZINV1.OutWSet.setMag.f", FunctionalConstraint.SP); 28 | 29 | Console.WriteLine("ied1Inverter/ZINV1.OutWSet.setMag.f: " + setMagF); 30 | 31 | setMagF += 1.0f; 32 | 33 | con.WriteValue("ied1Inverter/ZINV1.OutWSet.setMag.f", FunctionalConstraint.SP, new MmsValue(setMagF)); 34 | 35 | con.Abort(); 36 | } 37 | catch (IedConnectionException e) 38 | { 39 | Console.WriteLine("IED connection exception: " + e.Message + " err: " + e.GetIedClientError().ToString()); 40 | } 41 | 42 | // release all resources - do NOT use the object after this call!! 43 | con.Dispose (); 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /dotnet/example3/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | 4 | // Information about this assembly is defined by the following attributes. 5 | // Change them to the values specific to your project. 6 | 7 | [assembly: AssemblyTitle("example3")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("")] 11 | [assembly: AssemblyProduct("")] 12 | [assembly: AssemblyCopyright("mzillgit")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". 17 | // The form "{Major}.{Minor}.*" will automatically update the build and revision, 18 | // and "{Major}.{Minor}.{Build}.*" will update just the revision. 19 | 20 | [assembly: AssemblyVersion("1.0.*")] 21 | 22 | // The following attributes are used to specify the signing key for the assembly, 23 | // if desired. See the Mono documentation for more information about signing. 24 | 25 | //[assembly: AssemblyDelaySign(false)] 26 | //[assembly: AssemblyKeyFile("")] 27 | 28 | -------------------------------------------------------------------------------- /dotnet/files/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | 4 | // Information about this assembly is defined by the following attributes. 5 | // Change them to the values specific to your project. 6 | 7 | [assembly: AssemblyTitle("files")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("")] 11 | [assembly: AssemblyProduct("")] 12 | [assembly: AssemblyCopyright("mzillgit")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". 17 | // The form "{Major}.{Minor}.*" will automatically update the build and revision, 18 | // and "{Major}.{Minor}.{Build}.*" will update just the revision. 19 | 20 | [assembly: AssemblyVersion("1.0.*")] 21 | 22 | // The following attributes are used to specify the signing key for the assembly, 23 | // if desired. See the Mono documentation for more information about signing. 24 | 25 | //[assembly: AssemblyDelaySign(false)] 26 | //[assembly: AssemblyKeyFile("")] 27 | 28 | -------------------------------------------------------------------------------- /dotnet/goose_subscriber/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | 4 | // Information about this assembly is defined by the following attributes. 5 | // Change them to the values specific to your project. 6 | 7 | [assembly: AssemblyTitle ("goose_subscriber")] 8 | [assembly: AssemblyDescription ("")] 9 | [assembly: AssemblyConfiguration ("")] 10 | [assembly: AssemblyCompany ("")] 11 | [assembly: AssemblyProduct ("")] 12 | [assembly: AssemblyCopyright ("mzillgit")] 13 | [assembly: AssemblyTrademark ("")] 14 | [assembly: AssemblyCulture ("")] 15 | 16 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". 17 | // The form "{Major}.{Minor}.*" will automatically update the build and revision, 18 | // and "{Major}.{Minor}.{Build}.*" will update just the revision. 19 | 20 | [assembly: AssemblyVersion ("1.0.*")] 21 | 22 | // The following attributes are used to specify the signing key for the assembly, 23 | // if desired. See the Mono documentation for more information about signing. 24 | 25 | //[assembly: AssemblyDelaySign(false)] 26 | //[assembly: AssemblyKeyFile("")] 27 | 28 | -------------------------------------------------------------------------------- /dotnet/log_client/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | 4 | // Information about this assembly is defined by the following attributes. 5 | // Change them to the values specific to your project. 6 | 7 | [assembly: AssemblyTitle ("log_client")] 8 | [assembly: AssemblyDescription ("")] 9 | [assembly: AssemblyConfiguration ("")] 10 | [assembly: AssemblyCompany ("")] 11 | [assembly: AssemblyProduct ("")] 12 | [assembly: AssemblyCopyright ("mzillgit")] 13 | [assembly: AssemblyTrademark ("")] 14 | [assembly: AssemblyCulture ("")] 15 | 16 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". 17 | // The form "{Major}.{Minor}.*" will automatically update the build and revision, 18 | // and "{Major}.{Minor}.{Build}.*" will update just the revision. 19 | 20 | [assembly: AssemblyVersion ("1.0.*")] 21 | 22 | // The following attributes are used to specify the signing key for the assembly, 23 | // if desired. See the Mono documentation for more information about signing. 24 | 25 | //[assembly: AssemblyDelaySign(false)] 26 | //[assembly: AssemblyKeyFile("")] 27 | 28 | -------------------------------------------------------------------------------- /dotnet/model_browsing/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | 4 | // Information about this assembly is defined by the following attributes. 5 | // Change them to the values specific to your project. 6 | 7 | [assembly: AssemblyTitle("model_browsing")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("")] 11 | [assembly: AssemblyProduct("")] 12 | [assembly: AssemblyCopyright("mzillgit")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". 17 | // The form "{Major}.{Minor}.*" will automatically update the build and revision, 18 | // and "{Major}.{Minor}.{Build}.*" will update just the revision. 19 | 20 | [assembly: AssemblyVersion("1.0.*")] 21 | 22 | // The following attributes are used to specify the signing key for the assembly, 23 | // if desired. See the Mono documentation for more information about signing. 24 | 25 | //[assembly: AssemblyDelaySign(false)] 26 | //[assembly: AssemblyKeyFile("")] 27 | 28 | -------------------------------------------------------------------------------- /dotnet/report_new_dataset/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | 4 | // Information about this assembly is defined by the following attributes. 5 | // Change them to the values specific to your project. 6 | 7 | [assembly: AssemblyTitle("report_new_dataset")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("")] 11 | [assembly: AssemblyProduct("")] 12 | [assembly: AssemblyCopyright("mzillgit")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". 17 | // The form "{Major}.{Minor}.*" will automatically update the build and revision, 18 | // and "{Major}.{Minor}.{Build}.*" will update just the revision. 19 | 20 | [assembly: AssemblyVersion("1.0.*")] 21 | 22 | // The following attributes are used to specify the signing key for the assembly, 23 | // if desired. See the Mono documentation for more information about signing. 24 | 25 | //[assembly: AssemblyDelaySign(false)] 26 | //[assembly: AssemblyKeyFile("")] 27 | 28 | -------------------------------------------------------------------------------- /dotnet/reporting/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | 4 | // Information about this assembly is defined by the following attributes. 5 | // Change them to the values specific to your project. 6 | 7 | [assembly: AssemblyTitle("reporting")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("")] 11 | [assembly: AssemblyProduct("")] 12 | [assembly: AssemblyCopyright("mzillgit")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". 17 | // The form "{Major}.{Minor}.*" will automatically update the build and revision, 18 | // and "{Major}.{Minor}.{Build}.*" will update just the revision. 19 | 20 | [assembly: AssemblyVersion("1.0.*")] 21 | 22 | // The following attributes are used to specify the signing key for the assembly, 23 | // if desired. See the Mono documentation for more information about signing. 24 | 25 | //[assembly: AssemblyDelaySign(false)] 26 | //[assembly: AssemblyKeyFile("")] 27 | 28 | -------------------------------------------------------------------------------- /dotnet/reporting/Settings.cs: -------------------------------------------------------------------------------- 1 | namespace reporting.Properties { 2 | 3 | 4 | // This class allows you to handle specific events on the settings class: 5 | // The SettingChanging event is raised before a setting's value is changed. 6 | // The PropertyChanged event is raised after a setting's value is changed. 7 | // The SettingsLoaded event is raised after the setting values are loaded. 8 | // The SettingsSaving event is raised before the setting values are saved. 9 | internal sealed partial class Settings { 10 | 11 | public Settings() { 12 | // // To add event handlers for saving and changing settings, uncomment the lines below: 13 | // 14 | // this.SettingChanging += this.SettingChangingEventHandler; 15 | // 16 | // this.SettingsSaving += this.SettingsSavingEventHandler; 17 | // 18 | } 19 | 20 | private void SettingChangingEventHandler(object sender, System.Configuration.SettingChangingEventArgs e) { 21 | // Add code to handle the SettingChangingEvent event here. 22 | } 23 | 24 | private void SettingsSavingEventHandler(object sender, System.ComponentModel.CancelEventArgs e) { 25 | // Add code to handle the SettingsSaving event here. 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /dotnet/server1/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | 4 | // Information about this assembly is defined by the following attributes. 5 | // Change them to the values specific to your project. 6 | 7 | [assembly: AssemblyTitle ("server1")] 8 | [assembly: AssemblyDescription ("")] 9 | [assembly: AssemblyConfiguration ("")] 10 | [assembly: AssemblyCompany ("")] 11 | [assembly: AssemblyProduct ("")] 12 | [assembly: AssemblyCopyright ("mzillgit")] 13 | [assembly: AssemblyTrademark ("")] 14 | [assembly: AssemblyCulture ("")] 15 | 16 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". 17 | // The form "{Major}.{Minor}.*" will automatically update the build and revision, 18 | // and "{Major}.{Minor}.{Build}.*" will update just the revision. 19 | 20 | [assembly: AssemblyVersion ("1.0.*")] 21 | 22 | // The following attributes are used to specify the signing key for the assembly, 23 | // if desired. See the Mono documentation for more information about signing. 24 | 25 | //[assembly: AssemblyDelaySign(false)] 26 | //[assembly: AssemblyKeyFile("")] 27 | 28 | -------------------------------------------------------------------------------- /dotnet/server_goose_publisher/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /dotnet/sv_subscriber/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | 4 | // Information about this assembly is defined by the following attributes. 5 | // Change them to the values specific to your project. 6 | 7 | [assembly: AssemblyTitle ("sv_subscriber")] 8 | [assembly: AssemblyDescription ("")] 9 | [assembly: AssemblyConfiguration ("")] 10 | [assembly: AssemblyCompany ("")] 11 | [assembly: AssemblyProduct ("")] 12 | [assembly: AssemblyCopyright ("mzillgit")] 13 | [assembly: AssemblyTrademark ("")] 14 | [assembly: AssemblyCulture ("")] 15 | 16 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". 17 | // The form "{Major}.{Minor}.*" will automatically update the build and revision, 18 | // and "{Major}.{Minor}.{Build}.*" will update just the revision. 19 | 20 | [assembly: AssemblyVersion ("1.0.*")] 21 | 22 | // The following attributes are used to specify the signing key for the assembly, 23 | // if desired. See the Mono documentation for more information about signing. 24 | 25 | //[assembly: AssemblyDelaySign(false)] 26 | //[assembly: AssemblyKeyFile("")] 27 | 28 | -------------------------------------------------------------------------------- /dotnet/tls_client_example/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | 4 | // Information about this assembly is defined by the following attributes. 5 | // Change them to the values specific to your project. 6 | 7 | [assembly: AssemblyTitle ("tls_client_example")] 8 | [assembly: AssemblyDescription ("")] 9 | [assembly: AssemblyConfiguration ("")] 10 | [assembly: AssemblyCompany ("")] 11 | [assembly: AssemblyProduct ("")] 12 | [assembly: AssemblyCopyright ("mzillgit")] 13 | [assembly: AssemblyTrademark ("")] 14 | [assembly: AssemblyCulture ("")] 15 | 16 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". 17 | // The form "{Major}.{Minor}.*" will automatically update the build and revision, 18 | // and "{Major}.{Minor}.{Build}.*" will update just the revision. 19 | 20 | [assembly: AssemblyVersion ("1.0.*")] 21 | 22 | // The following attributes are used to specify the signing key for the assembly, 23 | // if desired. See the Mono documentation for more information about signing. 24 | 25 | //[assembly: AssemblyDelaySign(false)] 26 | //[assembly: AssemblyKeyFile("")] 27 | 28 | -------------------------------------------------------------------------------- /dotnet/tls_client_example/client1.cer: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mz-automation/libiec61850/3a1480e5948ca53b4dcc5fa15b05598fa3322bb9/dotnet/tls_client_example/client1.cer -------------------------------------------------------------------------------- /dotnet/tls_client_example/root.cer: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mz-automation/libiec61850/3a1480e5948ca53b4dcc5fa15b05598fa3322bb9/dotnet/tls_client_example/root.cer -------------------------------------------------------------------------------- /dotnet/tls_server_example/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | 4 | // Information about this assembly is defined by the following attributes. 5 | // Change them to the values specific to your project. 6 | 7 | [assembly: AssemblyTitle ("tls_server_example")] 8 | [assembly: AssemblyDescription ("")] 9 | [assembly: AssemblyConfiguration ("")] 10 | [assembly: AssemblyCompany ("")] 11 | [assembly: AssemblyProduct ("")] 12 | [assembly: AssemblyCopyright ("mzillgit")] 13 | [assembly: AssemblyTrademark ("")] 14 | [assembly: AssemblyCulture ("")] 15 | 16 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". 17 | // The form "{Major}.{Minor}.*" will automatically update the build and revision, 18 | // and "{Major}.{Minor}.{Build}.*" will update just the revision. 19 | 20 | [assembly: AssemblyVersion ("1.0.*")] 21 | 22 | // The following attributes are used to specify the signing key for the assembly, 23 | // if desired. See the Mono documentation for more information about signing. 24 | 25 | //[assembly: AssemblyDelaySign(false)] 26 | //[assembly: AssemblyKeyFile("")] 27 | 28 | -------------------------------------------------------------------------------- /dotnet/tls_server_example/root.cer: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mz-automation/libiec61850/3a1480e5948ca53b4dcc5fa15b05598fa3322bb9/dotnet/tls_server_example/root.cer -------------------------------------------------------------------------------- /dotnet/tls_server_example/server.cer: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mz-automation/libiec61850/3a1480e5948ca53b4dcc5fa15b05598fa3322bb9/dotnet/tls_server_example/server.cer -------------------------------------------------------------------------------- /examples/goose_observer/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | set(goose_observer_SRCS 3 | goose_observer.c 4 | ) 5 | 6 | IF(MSVC) 7 | 8 | set_source_files_properties(${goose_observer_SRCS} 9 | PROPERTIES LANGUAGE CXX) 10 | 11 | ENDIF(MSVC) 12 | 13 | add_executable(goose_observer 14 | ${goose_observer_SRCS} 15 | ) 16 | 17 | target_link_libraries(goose_observer 18 | iec61850 19 | ) 20 | 21 | 22 | -------------------------------------------------------------------------------- /examples/goose_observer/Makefile: -------------------------------------------------------------------------------- 1 | LIBIEC_HOME=../.. 2 | 3 | PROJECT_BINARY_NAME = goose_observer 4 | PROJECT_SOURCES = goose_observer.c 5 | 6 | include $(LIBIEC_HOME)/make/target_system.mk 7 | include $(LIBIEC_HOME)/make/stack_includes.mk 8 | 9 | all: $(PROJECT_BINARY_NAME) 10 | 11 | include $(LIBIEC_HOME)/make/common_targets.mk 12 | 13 | $(PROJECT_BINARY_NAME): $(PROJECT_SOURCES) $(LIB_NAME) 14 | $(CC) $(CFLAGS) $(LDFLAGS) -o $(PROJECT_BINARY_NAME) $(PROJECT_SOURCES) $(INCLUDES) $(LIB_NAME) $(LDLIBS) 15 | 16 | clean: 17 | rm -f $(PROJECT_BINARY_NAME) 18 | -------------------------------------------------------------------------------- /examples/goose_publisher/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | set(goose_publisher_example_SRCS 3 | goose_publisher_example.c 4 | ) 5 | 6 | IF(MSVC) 7 | 8 | set_source_files_properties(${goose_publisher_example_SRCS} 9 | PROPERTIES LANGUAGE CXX) 10 | ENDIF(MSVC) 11 | 12 | add_executable(goose_publisher_example 13 | ${goose_publisher_example_SRCS} 14 | ) 15 | 16 | target_link_libraries(goose_publisher_example 17 | iec61850 18 | ) 19 | 20 | 21 | -------------------------------------------------------------------------------- /examples/goose_publisher/Makefile: -------------------------------------------------------------------------------- 1 | LIBIEC_HOME=../.. 2 | 3 | PROJECT_BINARY_NAME = goose_publisher_example 4 | PROJECT_SOURCES = goose_publisher_example.c 5 | 6 | include $(LIBIEC_HOME)/make/target_system.mk 7 | include $(LIBIEC_HOME)/make/stack_includes.mk 8 | 9 | all: $(PROJECT_BINARY_NAME) 10 | 11 | include $(LIBIEC_HOME)/make/common_targets.mk 12 | 13 | $(PROJECT_BINARY_NAME): $(PROJECT_SOURCES) $(LIB_NAME) 14 | $(CC) $(CFLAGS) $(LDFLAGS) -o $(PROJECT_BINARY_NAME) $(PROJECT_SOURCES) $(INCLUDES) $(LIB_NAME) $(LDLIBS) 15 | 16 | clean: 17 | rm -f $(PROJECT_BINARY_NAME) 18 | -------------------------------------------------------------------------------- /examples/goose_subscriber/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | set(goose_subscriber_example_SRCS 3 | goose_subscriber_example.c 4 | ) 5 | 6 | IF(MSVC) 7 | 8 | set_source_files_properties(${goose_subscriber_example_SRCS} 9 | PROPERTIES LANGUAGE CXX) 10 | ENDIF(MSVC) 11 | 12 | add_executable(goose_subscriber_example 13 | ${goose_subscriber_example_SRCS} 14 | ) 15 | 16 | target_link_libraries(goose_subscriber_example 17 | iec61850 18 | ) 19 | 20 | 21 | -------------------------------------------------------------------------------- /examples/goose_subscriber/Makefile: -------------------------------------------------------------------------------- 1 | LIBIEC_HOME=../.. 2 | 3 | PROJECT_BINARY_NAME = goose_subscriber_example 4 | PROJECT_SOURCES = goose_subscriber_example.c 5 | 6 | include $(LIBIEC_HOME)/make/target_system.mk 7 | include $(LIBIEC_HOME)/make/stack_includes.mk 8 | 9 | all: $(PROJECT_BINARY_NAME) 10 | 11 | include $(LIBIEC_HOME)/make/common_targets.mk 12 | 13 | $(PROJECT_BINARY_NAME): $(PROJECT_SOURCES) $(LIB_NAME) 14 | $(CC) $(CFLAGS) $(LDFLAGS) -o $(PROJECT_BINARY_NAME) $(PROJECT_SOURCES) $(INCLUDES) $(LIB_NAME) $(LDLIBS) 15 | 16 | clean: 17 | rm -f $(PROJECT_BINARY_NAME) 18 | -------------------------------------------------------------------------------- /examples/iec61850_9_2_LE_example/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( 2 | . 3 | ) 4 | 5 | set(sv_9_2_LE_example_SRCS 6 | iec61850_9_2_LE_example.c 7 | static_model.c 8 | ) 9 | 10 | IF(MSVC) 11 | set_source_files_properties(${sv_9_2_LE_example_SRCS} 12 | PROPERTIES LANGUAGE CXX) 13 | ENDIF(MSVC) 14 | 15 | add_executable(sv_9_2_LE_example 16 | ${sv_9_2_LE_example_SRCS} 17 | ) 18 | 19 | target_link_libraries(sv_9_2_LE_example 20 | iec61850 21 | ) 22 | -------------------------------------------------------------------------------- /examples/iec61850_9_2_LE_example/Makefile: -------------------------------------------------------------------------------- 1 | LIBIEC_HOME=../.. 2 | 3 | PROJECT_BINARY_NAME = sv_9_2LE_example 4 | PROJECT_SOURCES = iec61850_9_2_LE_example.c 5 | PROJECT_SOURCES += static_model.c 6 | 7 | PROJECT_ICD_FILE = sv.icd 8 | 9 | include $(LIBIEC_HOME)/make/target_system.mk 10 | include $(LIBIEC_HOME)/make/stack_includes.mk 11 | 12 | LDFLAGS += -lm 13 | 14 | all: $(PROJECT_BINARY_NAME) 15 | 16 | include $(LIBIEC_HOME)/make/common_targets.mk 17 | 18 | model: $(PROJECT_ICD_FILE) 19 | java -jar $(LIBIEC_HOME)/tools/model_generator/genmodel.jar $(PROJECT_ICD_FILE) 20 | 21 | $(PROJECT_BINARY_NAME): $(PROJECT_SOURCES) $(LIB_NAME) 22 | $(CC) $(CFLAGS) $(LDFLAGS) -o $(PROJECT_BINARY_NAME) $(PROJECT_SOURCES) $(INCLUDES) $(LIB_NAME) $(LDFLAGS) $(LDLIBS) 23 | 24 | clean: 25 | rm -f $(PROJECT_BINARY_NAME) 26 | 27 | -------------------------------------------------------------------------------- /examples/iec61850_9_2_LE_example/README: -------------------------------------------------------------------------------- 1 | 2 | The default ethernet interface is eth0. You can specify another interface at the command line. 3 | 4 | ./sv_9_2LE_example eth1 5 | 6 | In order for the SV publisher to start the SVCB has to be enabled by an MMS client. 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /examples/iec61850_client_example1/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | set(iec61850_client_example1_SRCS 3 | client_example1.c 4 | ) 5 | 6 | IF(MSVC) 7 | set_source_files_properties(${iec61850_client_example1_SRCS} 8 | PROPERTIES LANGUAGE CXX) 9 | ENDIF(MSVC) 10 | 11 | add_executable(iec61850_client_example1 12 | ${iec61850_client_example1_SRCS} 13 | ) 14 | 15 | target_link_libraries(iec61850_client_example1 16 | iec61850 17 | ) 18 | -------------------------------------------------------------------------------- /examples/iec61850_client_example1/Makefile: -------------------------------------------------------------------------------- 1 | LIBIEC_HOME=../.. 2 | 3 | PROJECT_BINARY_NAME = client_example1 4 | PROJECT_SOURCES = client_example1.c 5 | 6 | include $(LIBIEC_HOME)/make/target_system.mk 7 | include $(LIBIEC_HOME)/make/stack_includes.mk 8 | 9 | all: $(PROJECT_BINARY_NAME) 10 | 11 | include $(LIBIEC_HOME)/make/common_targets.mk 12 | 13 | $(PROJECT_BINARY_NAME): $(PROJECT_SOURCES) $(LIB_NAME) 14 | $(CC) $(CFLAGS) $(LDFLAGS) -o $(PROJECT_BINARY_NAME) $(PROJECT_SOURCES) $(INCLUDES) $(LIB_NAME) $(LDLIBS) 15 | 16 | clean: 17 | rm -f $(PROJECT_BINARY_NAME) 18 | -------------------------------------------------------------------------------- /examples/iec61850_client_example2/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | set(iec61850_client_example2_SRCS 3 | client_example2.c 4 | ) 5 | 6 | IF(MSVC) 7 | set_source_files_properties(${iec61850_client_example2_SRCS} 8 | PROPERTIES LANGUAGE CXX) 9 | ENDIF(MSVC) 10 | 11 | add_executable(iec61850_client_example2 12 | ${iec61850_client_example2_SRCS} 13 | ) 14 | 15 | target_link_libraries(iec61850_client_example2 16 | iec61850 17 | ) 18 | -------------------------------------------------------------------------------- /examples/iec61850_client_example2/Makefile: -------------------------------------------------------------------------------- 1 | LIBIEC_HOME=../.. 2 | 3 | PROJECT_BINARY_NAME = client_example2 4 | PROJECT_SOURCES = client_example2.c 5 | 6 | include $(LIBIEC_HOME)/make/target_system.mk 7 | include $(LIBIEC_HOME)/make/stack_includes.mk 8 | 9 | all: $(PROJECT_BINARY_NAME) 10 | 11 | include $(LIBIEC_HOME)/make/common_targets.mk 12 | 13 | $(PROJECT_BINARY_NAME): $(PROJECT_SOURCES) $(LIB_NAME) 14 | $(CC) $(CFLAGS) $(LDFLAGS) -o $(PROJECT_BINARY_NAME) $(PROJECT_SOURCES) $(INCLUDES) $(LIB_NAME) $(LDLIBS) 15 | 16 | clean: 17 | rm -f $(PROJECT_BINARY_NAME) 18 | -------------------------------------------------------------------------------- /examples/iec61850_client_example4/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | set(iec61850_client_example4_SRCS 3 | client_example4.c 4 | ) 5 | 6 | IF(MSVC) 7 | set_source_files_properties(${iec61850_client_example4_SRCS} 8 | PROPERTIES LANGUAGE CXX) 9 | ENDIF(MSVC) 10 | 11 | add_executable(iec61850_client_example4 12 | ${iec61850_client_example4_SRCS} 13 | ) 14 | 15 | target_link_libraries(iec61850_client_example4 16 | iec61850 17 | ) 18 | -------------------------------------------------------------------------------- /examples/iec61850_client_example4/Makefile: -------------------------------------------------------------------------------- 1 | LIBIEC_HOME=../.. 2 | 3 | PROJECT_BINARY_NAME = client_example4 4 | PROJECT_SOURCES = client_example4.c 5 | 6 | include $(LIBIEC_HOME)/make/target_system.mk 7 | include $(LIBIEC_HOME)/make/stack_includes.mk 8 | 9 | all: $(PROJECT_BINARY_NAME) 10 | 11 | include $(LIBIEC_HOME)/make/common_targets.mk 12 | 13 | $(PROJECT_BINARY_NAME): $(PROJECT_SOURCES) $(LIB_NAME) 14 | $(CC) $(CFLAGS) $(LDFLAGS) -o $(PROJECT_BINARY_NAME) $(PROJECT_SOURCES) $(INCLUDES) $(LIB_NAME) $(LDLIBS) 15 | 16 | clean: 17 | rm -f $(PROJECT_BINARY_NAME) 18 | -------------------------------------------------------------------------------- /examples/iec61850_client_example5/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | set(iec61850_client_example5_SRCS 3 | client_example5.c 4 | ) 5 | 6 | IF(MSVC) 7 | set_source_files_properties(${iec61850_client_example5_SRCS} 8 | PROPERTIES LANGUAGE CXX) 9 | ENDIF(MSVC) 10 | 11 | add_executable(iec61850_client_example5 12 | ${iec61850_client_example5_SRCS} 13 | ) 14 | 15 | target_link_libraries(iec61850_client_example5 16 | iec61850 17 | ) 18 | -------------------------------------------------------------------------------- /examples/iec61850_client_example5/Makefile: -------------------------------------------------------------------------------- 1 | LIBIEC_HOME=../.. 2 | 3 | PROJECT_BINARY_NAME = client_example5 4 | PROJECT_SOURCES = client_example5.c 5 | 6 | include $(LIBIEC_HOME)/make/target_system.mk 7 | include $(LIBIEC_HOME)/make/stack_includes.mk 8 | 9 | all: $(PROJECT_BINARY_NAME) 10 | 11 | include $(LIBIEC_HOME)/make/common_targets.mk 12 | 13 | $(PROJECT_BINARY_NAME): $(PROJECT_SOURCES) $(LIB_NAME) 14 | $(CC) $(CFLAGS) $(LDFLAGS) -o $(PROJECT_BINARY_NAME) $(PROJECT_SOURCES) $(INCLUDES) $(LIB_NAME) $(LDLIBS) 15 | 16 | clean: 17 | rm -f $(PROJECT_BINARY_NAME) 18 | -------------------------------------------------------------------------------- /examples/iec61850_client_example_ClientGooseControl/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | set(iec61850_client_example_ClientGooseControl_SRCS 3 | client_example_ClientGooseControl.c 4 | ) 5 | 6 | IF(MSVC) 7 | set_source_files_properties(${iec61850_client_example_ClientGooseControl_SRCS} 8 | PROPERTIES LANGUAGE CXX) 9 | ENDIF(MSVC) 10 | 11 | add_executable(iec61850_client_example_ClientGooseControl 12 | ${iec61850_client_example_ClientGooseControl_SRCS} 13 | ) 14 | 15 | target_link_libraries(iec61850_client_example_ClientGooseControl 16 | iec61850 17 | ) -------------------------------------------------------------------------------- /examples/iec61850_client_example_ClientGooseControl/Makefile: -------------------------------------------------------------------------------- 1 | LIBIEC_HOME=../.. 2 | 3 | PROJECT_BINARY_NAME = client_example_ClientGooseControl 4 | PROJECT_SOURCES = client_example_ClientGooseControl.c 5 | 6 | include $(LIBIEC_HOME)/make/target_system.mk 7 | include $(LIBIEC_HOME)/make/stack_includes.mk 8 | 9 | all: $(PROJECT_BINARY_NAME) 10 | 11 | include $(LIBIEC_HOME)/make/common_targets.mk 12 | 13 | $(PROJECT_BINARY_NAME): $(PROJECT_SOURCES) $(LIB_NAME) 14 | $(CC) $(CFLAGS) $(LDFLAGS) -o $(PROJECT_BINARY_NAME) $(PROJECT_SOURCES) $(INCLUDES) $(LIB_NAME) $(LDLIBS) 15 | 16 | clean: 17 | rm -f $(PROJECT_BINARY_NAME) 18 | -------------------------------------------------------------------------------- /examples/iec61850_client_example_ClientGooseControlAsync/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | set(iec61850_client_example_ClientGooseControlAsync_SRCS 3 | client_example_ClientGooseControlAsync.c 4 | ) 5 | 6 | IF(MSVC) 7 | set_source_files_properties(${iec61850_client_example_ClientGooseControlAsync_SRCS} 8 | PROPERTIES LANGUAGE CXX) 9 | ENDIF(MSVC) 10 | 11 | add_executable(iec61850_client_example_ClientGooseControlAsync 12 | ${iec61850_client_example_ClientGooseControlAsync_SRCS} 13 | ) 14 | 15 | target_link_libraries(iec61850_client_example_ClientGooseControlAsync 16 | iec61850 17 | ) -------------------------------------------------------------------------------- /examples/iec61850_client_example_ClientGooseControlAsync/Makefile: -------------------------------------------------------------------------------- 1 | LIBIEC_HOME=../.. 2 | 3 | PROJECT_BINARY_NAME = client_example_ClientGooseControlAsync 4 | PROJECT_SOURCES = client_example_ClientGooseControlAsync.c 5 | 6 | include $(LIBIEC_HOME)/make/target_system.mk 7 | include $(LIBIEC_HOME)/make/stack_includes.mk 8 | 9 | all: $(PROJECT_BINARY_NAME) 10 | 11 | include $(LIBIEC_HOME)/make/common_targets.mk 12 | 13 | $(PROJECT_BINARY_NAME): $(PROJECT_SOURCES) $(LIB_NAME) 14 | $(CC) $(CFLAGS) $(LDFLAGS) -o $(PROJECT_BINARY_NAME) $(PROJECT_SOURCES) $(INCLUDES) $(LIB_NAME) $(LDLIBS) 15 | 16 | clean: 17 | rm -f $(PROJECT_BINARY_NAME) 18 | -------------------------------------------------------------------------------- /examples/iec61850_client_example_array/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | set(iec61850_client_example_array_SRCS 3 | client_example_array.c 4 | ) 5 | 6 | IF(MSVC) 7 | set_source_files_properties(${iec61850_client_example_array_SRCS} 8 | PROPERTIES LANGUAGE CXX) 9 | ENDIF(MSVC) 10 | 11 | add_executable(iec61850_client_example_array 12 | ${iec61850_client_example_array_SRCS} 13 | ) 14 | 15 | target_link_libraries(iec61850_client_example_array 16 | iec61850 17 | ) 18 | -------------------------------------------------------------------------------- /examples/iec61850_client_example_array/Makefile: -------------------------------------------------------------------------------- 1 | LIBIEC_HOME=../.. 2 | 3 | PROJECT_BINARY_NAME = client_example_array 4 | PROJECT_SOURCES = client_example_array.c 5 | 6 | include $(LIBIEC_HOME)/make/target_system.mk 7 | include $(LIBIEC_HOME)/make/stack_includes.mk 8 | 9 | all: $(PROJECT_BINARY_NAME) 10 | 11 | include $(LIBIEC_HOME)/make/common_targets.mk 12 | 13 | $(PROJECT_BINARY_NAME): $(PROJECT_SOURCES) $(LIB_NAME) 14 | $(CC) $(CFLAGS) $(LDFLAGS) -o $(PROJECT_BINARY_NAME) $(PROJECT_SOURCES) $(INCLUDES) $(LIB_NAME) $(LDLIBS) 15 | 16 | clean: 17 | rm -f $(PROJECT_BINARY_NAME) 18 | -------------------------------------------------------------------------------- /examples/iec61850_client_example_async/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | set(iec61850_client_async_SRCS 3 | client_example_async.c 4 | ) 5 | 6 | IF(MSVC) 7 | set_source_files_properties(${iec61850_client_async_SRCS} 8 | PROPERTIES LANGUAGE CXX) 9 | ENDIF(MSVC) 10 | 11 | add_executable(iec61850_client_async 12 | ${iec61850_client_async_SRCS} 13 | ) 14 | 15 | target_link_libraries(iec61850_client_async 16 | iec61850 17 | ) 18 | -------------------------------------------------------------------------------- /examples/iec61850_client_example_async/Makefile: -------------------------------------------------------------------------------- 1 | LIBIEC_HOME=../.. 2 | 3 | PROJECT_BINARY_NAME = client_example_async 4 | PROJECT_SOURCES = client_example_async.c 5 | 6 | include $(LIBIEC_HOME)/make/target_system.mk 7 | include $(LIBIEC_HOME)/make/stack_includes.mk 8 | 9 | all: $(PROJECT_BINARY_NAME) 10 | 11 | include $(LIBIEC_HOME)/make/common_targets.mk 12 | 13 | $(PROJECT_BINARY_NAME): $(PROJECT_SOURCES) $(LIB_NAME) 14 | $(CC) $(CFLAGS) $(LDFLAGS) -o $(PROJECT_BINARY_NAME) $(PROJECT_SOURCES) $(INCLUDES) $(LIB_NAME) $(LDLIBS) 15 | 16 | clean: 17 | rm -f $(PROJECT_BINARY_NAME) 18 | -------------------------------------------------------------------------------- /examples/iec61850_client_example_control/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | set(iec61850_client_example_control_SRCS 3 | client_example_control.c 4 | ) 5 | 6 | IF(MSVC) 7 | set_source_files_properties(${iec61850_client_example_control_SRCS} 8 | PROPERTIES LANGUAGE CXX) 9 | ENDIF(MSVC) 10 | 11 | add_executable(client_example_control 12 | ${iec61850_client_example_control_SRCS} 13 | ) 14 | 15 | target_link_libraries(client_example_control 16 | iec61850 17 | ) 18 | -------------------------------------------------------------------------------- /examples/iec61850_client_example_control/Makefile: -------------------------------------------------------------------------------- 1 | LIBIEC_HOME=../.. 2 | 3 | PROJECT_BINARY_NAME = client_example_control 4 | PROJECT_SOURCES = client_example_control.c 5 | 6 | include $(LIBIEC_HOME)/make/target_system.mk 7 | include $(LIBIEC_HOME)/make/stack_includes.mk 8 | 9 | all: $(PROJECT_BINARY_NAME) 10 | 11 | include $(LIBIEC_HOME)/make/common_targets.mk 12 | 13 | $(PROJECT_BINARY_NAME): $(PROJECT_SOURCES) $(LIB_NAME) 14 | $(CC) $(CFLAGS) $(LDFLAGS) -o $(PROJECT_BINARY_NAME) $(PROJECT_SOURCES) $(INCLUDES) $(LIB_NAME) $(LDLIBS) 15 | 16 | clean: 17 | rm -f $(PROJECT_BINARY_NAME) 18 | -------------------------------------------------------------------------------- /examples/iec61850_client_example_files/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | set(iec61850_client_example_files_SRCS 3 | file-tool.c 4 | ) 5 | 6 | IF(MSVC) 7 | set_source_files_properties(${iec61850_client_example_files_SRCS} 8 | PROPERTIES LANGUAGE CXX) 9 | ENDIF(MSVC) 10 | 11 | add_executable(file-tool 12 | ${iec61850_client_example_files_SRCS} 13 | ) 14 | 15 | target_link_libraries(file-tool 16 | iec61850 17 | ) 18 | -------------------------------------------------------------------------------- /examples/iec61850_client_example_files/Makefile: -------------------------------------------------------------------------------- 1 | LIBIEC_HOME=../.. 2 | 3 | PROJECT_BINARY_NAME = file-tool 4 | PROJECT_SOURCES = file-tool.c 5 | 6 | include $(LIBIEC_HOME)/make/target_system.mk 7 | include $(LIBIEC_HOME)/make/stack_includes.mk 8 | 9 | all: $(PROJECT_BINARY_NAME) 10 | 11 | include $(LIBIEC_HOME)/make/common_targets.mk 12 | 13 | $(PROJECT_BINARY_NAME): $(PROJECT_SOURCES) $(LIB_NAME) 14 | $(CC) $(CFLAGS) $(LDFLAGS) -o $(PROJECT_BINARY_NAME) $(PROJECT_SOURCES) $(INCLUDES) $(LIB_NAME) $(LDLIBS) 15 | 16 | clean: 17 | rm -f $(PROJECT_BINARY_NAME) 18 | -------------------------------------------------------------------------------- /examples/iec61850_client_example_log/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | set(iec61850_client_example_log_SRCS 3 | client_example_log.c 4 | ) 5 | 6 | IF(MSVC) 7 | set_source_files_properties(${iec61850_client_example_log_SRCS} 8 | PROPERTIES LANGUAGE CXX) 9 | ENDIF(MSVC) 10 | 11 | add_executable(iec61850_client_example_log 12 | ${iec61850_client_example_log_SRCS} 13 | ) 14 | 15 | target_link_libraries(iec61850_client_example_log 16 | iec61850 17 | ) 18 | -------------------------------------------------------------------------------- /examples/iec61850_client_example_log/Makefile: -------------------------------------------------------------------------------- 1 | LIBIEC_HOME=../.. 2 | 3 | PROJECT_BINARY_NAME = client_example_log 4 | PROJECT_SOURCES = client_example_log.c 5 | 6 | include $(LIBIEC_HOME)/make/target_system.mk 7 | include $(LIBIEC_HOME)/make/stack_includes.mk 8 | 9 | all: $(PROJECT_BINARY_NAME) 10 | 11 | include $(LIBIEC_HOME)/make/common_targets.mk 12 | 13 | $(PROJECT_BINARY_NAME): $(PROJECT_SOURCES) $(LIB_NAME) 14 | $(CC) $(CFLAGS) $(LDFLAGS) -o $(PROJECT_BINARY_NAME) $(PROJECT_SOURCES) $(INCLUDES) $(LIB_NAME) $(LDLIBS) 15 | 16 | clean: 17 | rm -f $(PROJECT_BINARY_NAME) 18 | -------------------------------------------------------------------------------- /examples/iec61850_client_example_no_thread/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | set(iec61850_client_no_thread_SRCS 3 | client_example_no_thread.c 4 | ) 5 | 6 | IF(MSVC) 7 | set_source_files_properties(${iec61850_client_no_thread_SRCS} 8 | PROPERTIES LANGUAGE CXX) 9 | ENDIF(MSVC) 10 | 11 | add_executable(iec61850_client_no_thread 12 | ${iec61850_client_no_thread_SRCS} 13 | ) 14 | 15 | target_link_libraries(iec61850_client_no_thread 16 | iec61850 17 | ) 18 | -------------------------------------------------------------------------------- /examples/iec61850_client_example_no_thread/Makefile: -------------------------------------------------------------------------------- 1 | LIBIEC_HOME=../.. 2 | 3 | PROJECT_BINARY_NAME = client_example_no_thread 4 | PROJECT_SOURCES = client_example_no_thread.c 5 | 6 | include $(LIBIEC_HOME)/make/target_system.mk 7 | include $(LIBIEC_HOME)/make/stack_includes.mk 8 | 9 | all: $(PROJECT_BINARY_NAME) 10 | 11 | include $(LIBIEC_HOME)/make/common_targets.mk 12 | 13 | $(PROJECT_BINARY_NAME): $(PROJECT_SOURCES) $(LIB_NAME) 14 | $(CC) $(CFLAGS) $(LDFLAGS) -o $(PROJECT_BINARY_NAME) $(PROJECT_SOURCES) $(INCLUDES) $(LIB_NAME) $(LDLIBS) 15 | 16 | clean: 17 | rm -f $(PROJECT_BINARY_NAME) 18 | -------------------------------------------------------------------------------- /examples/iec61850_client_example_rcbAsync/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | set(iec61850_client_example_rcbAsync_SRCS 3 | client_example_rcbAsync.c 4 | ) 5 | 6 | IF(MSVC) 7 | set_source_files_properties(${iec61850_client_example_rcbAsync_SRCS} 8 | PROPERTIES LANGUAGE CXX) 9 | ENDIF(MSVC) 10 | 11 | add_executable(iec61850_client_example_rcbAsync 12 | ${iec61850_client_example_rcbAsync_SRCS} 13 | ) 14 | 15 | target_link_libraries(iec61850_client_example_rcbAsync 16 | iec61850 17 | ) 18 | -------------------------------------------------------------------------------- /examples/iec61850_client_example_rcbAsync/Makefile: -------------------------------------------------------------------------------- 1 | LIBIEC_HOME=../.. 2 | 3 | PROJECT_BINARY_NAME = client_example_rcbAsync 4 | PROJECT_SOURCES = client_example_rcbAsync.c 5 | 6 | include $(LIBIEC_HOME)/make/target_system.mk 7 | include $(LIBIEC_HOME)/make/stack_includes.mk 8 | 9 | all: $(PROJECT_BINARY_NAME) 10 | 11 | include $(LIBIEC_HOME)/make/common_targets.mk 12 | 13 | $(PROJECT_BINARY_NAME): $(PROJECT_SOURCES) $(LIB_NAME) 14 | $(CC) $(CFLAGS) $(LDFLAGS) -o $(PROJECT_BINARY_NAME) $(PROJECT_SOURCES) $(INCLUDES) $(LIB_NAME) $(LDLIBS) 15 | 16 | clean: 17 | rm -f $(PROJECT_BINARY_NAME) 18 | -------------------------------------------------------------------------------- /examples/iec61850_client_example_reporting/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | set(iec61850_client_example_reporting_SRCS 3 | client_example_reporting.c 4 | ) 5 | 6 | IF(MSVC) 7 | set_source_files_properties(${iec61850_client_example_reporting_SRCS} 8 | PROPERTIES LANGUAGE CXX) 9 | ENDIF(MSVC) 10 | 11 | add_executable(iec61850_client_example_reporting 12 | ${iec61850_client_example_reporting_SRCS} 13 | ) 14 | 15 | target_link_libraries(iec61850_client_example_reporting 16 | iec61850 17 | ) 18 | -------------------------------------------------------------------------------- /examples/iec61850_client_example_reporting/Makefile: -------------------------------------------------------------------------------- 1 | LIBIEC_HOME=../.. 2 | 3 | PROJECT_BINARY_NAME = client_example_reporting 4 | PROJECT_SOURCES = client_example_reporting.c 5 | 6 | include $(LIBIEC_HOME)/make/target_system.mk 7 | include $(LIBIEC_HOME)/make/stack_includes.mk 8 | 9 | all: $(PROJECT_BINARY_NAME) 10 | 11 | include $(LIBIEC_HOME)/make/common_targets.mk 12 | 13 | $(PROJECT_BINARY_NAME): $(PROJECT_SOURCES) $(LIB_NAME) 14 | $(CC) $(CFLAGS) $(LDFLAGS) -o $(PROJECT_BINARY_NAME) $(PROJECT_SOURCES) $(INCLUDES) $(LIB_NAME) $(LDLIBS) 15 | 16 | clean: 17 | rm -f $(PROJECT_BINARY_NAME) 18 | -------------------------------------------------------------------------------- /examples/iec61850_client_file_async/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | set(iec61850_client_file_async_SRCS 3 | client_example_async.c 4 | ) 5 | 6 | IF(MSVC) 7 | set_source_files_properties(${iec61850_client_file_async_SRCS} 8 | PROPERTIES LANGUAGE CXX) 9 | ENDIF(MSVC) 10 | 11 | add_executable(iec61850_client_file_async 12 | ${iec61850_client_file_async_SRCS} 13 | ) 14 | 15 | target_link_libraries(iec61850_client_file_async 16 | iec61850 17 | ) 18 | -------------------------------------------------------------------------------- /examples/iec61850_sv_client_example/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | set(iec61850_sv_client_example_SRCS 3 | sv_client_example.c 4 | ) 5 | 6 | IF(MSVC) 7 | set_source_files_properties(${iec61850_sv_client_example_SRCS} 8 | PROPERTIES LANGUAGE CXX) 9 | ENDIF(MSVC) 10 | 11 | add_executable(iec61850_sv_client_example 12 | ${iec61850_sv_client_example_SRCS} 13 | ) 14 | 15 | target_link_libraries(iec61850_sv_client_example 16 | iec61850 17 | ) 18 | -------------------------------------------------------------------------------- /examples/iec61850_sv_client_example/Makefile: -------------------------------------------------------------------------------- 1 | LIBIEC_HOME=../.. 2 | 3 | PROJECT_BINARY_NAME = sv_client_example 4 | PROJECT_SOURCES = sv_client_example.c 5 | 6 | include $(LIBIEC_HOME)/make/target_system.mk 7 | include $(LIBIEC_HOME)/make/stack_includes.mk 8 | 9 | all: $(PROJECT_BINARY_NAME) 10 | 11 | include $(LIBIEC_HOME)/make/common_targets.mk 12 | 13 | $(PROJECT_BINARY_NAME): $(PROJECT_SOURCES) $(LIB_NAME) 14 | $(CC) $(CFLAGS) $(LDFLAGS) -o $(PROJECT_BINARY_NAME) $(PROJECT_SOURCES) $(INCLUDES) $(LIB_NAME) $(LDLIBS) 15 | 16 | clean: 17 | rm -f $(PROJECT_BINARY_NAME) 18 | -------------------------------------------------------------------------------- /examples/mms_utility/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | set(mms_utility_SRCS 3 | mms_utility.c 4 | ) 5 | 6 | IF(MSVC) 7 | set_source_files_properties(${mms_utility_SRCS} 8 | PROPERTIES LANGUAGE CXX) 9 | ENDIF(MSVC) 10 | 11 | add_executable(mms_utility 12 | ${mms_utility_SRCS} 13 | ) 14 | 15 | target_link_libraries(mms_utility 16 | iec61850 17 | ) 18 | -------------------------------------------------------------------------------- /examples/mms_utility/Makefile: -------------------------------------------------------------------------------- 1 | LIBIEC_HOME=../.. 2 | 3 | PROJECT_BINARY_NAME = mms_utility 4 | PROJECT_SOURCES = mms_utility.c 5 | 6 | include $(LIBIEC_HOME)/make/target_system.mk 7 | include $(LIBIEC_HOME)/make/stack_includes.mk 8 | 9 | all: $(PROJECT_BINARY_NAME) 10 | 11 | include $(LIBIEC_HOME)/make/common_targets.mk 12 | 13 | $(PROJECT_BINARY_NAME): $(PROJECT_SOURCES) $(LIB_NAME) 14 | $(CC) $(CFLAGS) $(LDFLAGS) -o $(PROJECT_BINARY_NAME) $(PROJECT_SOURCES) $(INCLUDES) $(LIB_NAME) $(LDLIBS) 15 | 16 | clean: 17 | rm -f $(PROJECT_BINARY_NAME) 18 | -------------------------------------------------------------------------------- /examples/r_goose_publisher_example/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | set(r_goose_publisher_example_SRCS 3 | r_goose_publisher_example.c 4 | ) 5 | 6 | IF(MSVC) 7 | 8 | set_source_files_properties(${r_goose_publisher_example_SRCS} 9 | PROPERTIES LANGUAGE CXX) 10 | ENDIF(MSVC) 11 | 12 | add_executable(r_goose_publisher_example 13 | ${r_goose_publisher_example_SRCS} 14 | ) 15 | 16 | target_link_libraries(r_goose_publisher_example 17 | iec61850 18 | ) 19 | 20 | 21 | -------------------------------------------------------------------------------- /examples/r_goose_receiver_example/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | set(r_goose_subscriber_example_SRCS 3 | r_goose_subscriber_example.c 4 | ) 5 | 6 | IF(MSVC) 7 | 8 | set_source_files_properties(${r_goose_subscriber_example_SRCS} 9 | PROPERTIES LANGUAGE CXX) 10 | ENDIF(MSVC) 11 | 12 | add_executable(r_goose_subscriber_example 13 | ${r_goose_subscriber_example_SRCS} 14 | ) 15 | 16 | target_link_libraries(r_goose_subscriber_example 17 | iec61850 18 | ) 19 | 20 | 21 | -------------------------------------------------------------------------------- /examples/rsv_publisher_example/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | set(r_sv_publisher_example_SRCS 3 | r_sv_publisher_example.c 4 | ) 5 | 6 | IF(WIN32) 7 | 8 | set_source_files_properties(${r_sv_publisher_example_SRCS} 9 | PROPERTIES LANGUAGE CXX) 10 | add_executable(r_sv_publisher_example 11 | ${r_sv_publisher_example_SRCS} 12 | ) 13 | 14 | target_link_libraries(r_sv_publisher_example 15 | iec61850 16 | ) 17 | 18 | ELSE(WIN32) 19 | 20 | add_executable(r_sv_publisher_example 21 | ${r_sv_publisher_example_SRCS} 22 | ) 23 | 24 | target_link_libraries(r_sv_publisher_example 25 | iec61850 26 | ) 27 | 28 | ENDIF(WIN32) 29 | -------------------------------------------------------------------------------- /examples/rsv_subscriber_example/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | set(r_sv_subscriber_example_SRCS 3 | r_sv_subscriber_example.c 4 | ) 5 | 6 | IF(WIN32) 7 | 8 | set_source_files_properties(${r_sv_subscriber_example_SRCS} 9 | PROPERTIES LANGUAGE CXX) 10 | add_executable(r_sv_subscriber_example 11 | ${r_sv_subscriber_example_SRCS} 12 | ) 13 | 14 | target_link_libraries(r_sv_subscriber_example 15 | iec61850 16 | ) 17 | 18 | ELSE(WIN32) 19 | 20 | add_executable(r_sv_subscriber_example 21 | ${r_sv_subscriber_example_SRCS} 22 | ) 23 | 24 | target_link_libraries(r_sv_subscriber_example 25 | iec61850 26 | ) 27 | 28 | ENDIF(WIN32) 29 | 30 | 31 | -------------------------------------------------------------------------------- /examples/server_example_61400_25/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( 2 | . 3 | ) 4 | 5 | set(server_example_61400_25_SRCS 6 | server_example_61400_25.c 7 | static_model.c 8 | ) 9 | 10 | IF(MSVC) 11 | set_source_files_properties(${server_example_61400_25_SRCS} 12 | PROPERTIES LANGUAGE CXX) 13 | ENDIF(MSVC) 14 | 15 | add_executable(server_example_61400_25 16 | ${server_example_61400_25_SRCS} 17 | ) 18 | 19 | target_link_libraries(server_example_61400_25 20 | iec61850 21 | ) 22 | -------------------------------------------------------------------------------- /examples/server_example_61400_25/Makefile: -------------------------------------------------------------------------------- 1 | LIBIEC_HOME=../.. 2 | 3 | PROJECT_BINARY_NAME = server_example_61400_25 4 | PROJECT_SOURCES = server_example_61400_25.c 5 | PROJECT_SOURCES += static_model.c 6 | 7 | PROJECT_ICD_FILE = wtur.cid 8 | 9 | include $(LIBIEC_HOME)/make/target_system.mk 10 | include $(LIBIEC_HOME)/make/stack_includes.mk 11 | 12 | all: $(PROJECT_BINARY_NAME) 13 | 14 | include $(LIBIEC_HOME)/make/common_targets.mk 15 | 16 | model: $(PROJECT_ICD_FILE) 17 | java -jar $(LIBIEC_HOME)/tools/model_generator/genmodel.jar $(PROJECT_ICD_FILE) 18 | 19 | $(PROJECT_BINARY_NAME): $(PROJECT_SOURCES) $(LIB_NAME) 20 | $(CC) $(CFLAGS) $(LDFLAGS) -o $(PROJECT_BINARY_NAME) $(PROJECT_SOURCES) $(INCLUDES) $(LIB_NAME) $(LDLIBS) 21 | 22 | clean: 23 | rm -f $(PROJECT_BINARY_NAME) 24 | 25 | 26 | -------------------------------------------------------------------------------- /examples/server_example_access_control/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( 2 | . 3 | ) 4 | 5 | set(server_example_SRCS 6 | server_example_access_control.c 7 | static_model.c 8 | ) 9 | 10 | IF(MSVC) 11 | set_source_files_properties(${server_example_SRCS} 12 | PROPERTIES LANGUAGE CXX) 13 | ENDIF(MSVC) 14 | 15 | add_executable(server_example_access_control 16 | ${server_example_SRCS} 17 | ) 18 | 19 | target_link_libraries(server_example_access_control 20 | iec61850 21 | ) 22 | -------------------------------------------------------------------------------- /examples/server_example_access_control/Makefile: -------------------------------------------------------------------------------- 1 | LIBIEC_HOME=../.. 2 | 3 | PROJECT_BINARY_NAME = server_example_access_control 4 | PROJECT_SOURCES = server_example_access_control.c 5 | PROJECT_SOURCES += static_model.c 6 | 7 | PROJECT_ICD_FILE = simpleIO_direct_control.cid 8 | 9 | include $(LIBIEC_HOME)/make/target_system.mk 10 | include $(LIBIEC_HOME)/make/stack_includes.mk 11 | 12 | all: $(PROJECT_BINARY_NAME) 13 | 14 | include $(LIBIEC_HOME)/make/common_targets.mk 15 | 16 | LDLIBS += -lm 17 | 18 | CP = cp 19 | 20 | model: $(PROJECT_ICD_FILE) 21 | java -jar $(LIBIEC_HOME)/tools/model_generator/genmodel.jar $(PROJECT_ICD_FILE) 22 | 23 | $(PROJECT_BINARY_NAME): $(PROJECT_SOURCES) $(LIB_NAME) 24 | $(CC) $(CFLAGS) $(LDFLAGS) -o $(PROJECT_BINARY_NAME) $(PROJECT_SOURCES) $(INCLUDES) $(LIB_NAME) $(LDLIBS) 25 | mkdir -p vmd-filestore 26 | $(CP) $(PROJECT_BINARY_NAME) vmd-filestore/IEDSERVER.BIN 27 | 28 | clean: 29 | rm -f $(PROJECT_BINARY_NAME) 30 | rm -f vmd-filestore/IEDSERVER.BIN 31 | 32 | 33 | -------------------------------------------------------------------------------- /examples/server_example_basic_io/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( 2 | . 3 | ) 4 | 5 | set(server_example_SRCS 6 | server_example_basic_io.c 7 | static_model.c 8 | ) 9 | 10 | IF(MSVC) 11 | set_source_files_properties(${server_example_SRCS} 12 | PROPERTIES LANGUAGE CXX) 13 | ENDIF(MSVC) 14 | 15 | add_executable(server_example_basic_io 16 | ${server_example_SRCS} 17 | ) 18 | 19 | target_link_libraries(server_example_basic_io 20 | iec61850 21 | ) 22 | -------------------------------------------------------------------------------- /examples/server_example_basic_io/Makefile: -------------------------------------------------------------------------------- 1 | LIBIEC_HOME=../.. 2 | 3 | PROJECT_BINARY_NAME = server_example_basic_io 4 | PROJECT_SOURCES = server_example_basic_io.c 5 | PROJECT_SOURCES += static_model.c 6 | 7 | PROJECT_ICD_FILE = simpleIO_direct_control.cid 8 | 9 | include $(LIBIEC_HOME)/make/target_system.mk 10 | include $(LIBIEC_HOME)/make/stack_includes.mk 11 | 12 | all: $(PROJECT_BINARY_NAME) 13 | 14 | include $(LIBIEC_HOME)/make/common_targets.mk 15 | 16 | LDLIBS += -lm 17 | 18 | CP = cp 19 | 20 | model: $(PROJECT_ICD_FILE) 21 | java -jar $(LIBIEC_HOME)/tools/model_generator/genmodel.jar $(PROJECT_ICD_FILE) 22 | 23 | $(PROJECT_BINARY_NAME): $(PROJECT_SOURCES) $(LIB_NAME) 24 | $(CC) $(CFLAGS) $(LDFLAGS) -o $(PROJECT_BINARY_NAME) $(PROJECT_SOURCES) $(INCLUDES) $(LIB_NAME) $(LDLIBS) 25 | mkdir -p vmd-filestore 26 | $(CP) $(PROJECT_BINARY_NAME) vmd-filestore/IEDSERVER.BIN 27 | 28 | clean: 29 | rm -f $(PROJECT_BINARY_NAME) 30 | rm -f vmd-filestore/IEDSERVER.BIN 31 | 32 | 33 | -------------------------------------------------------------------------------- /examples/server_example_basic_io/Makefile.standalone: -------------------------------------------------------------------------------- 1 | LIBIEC_HOME=../.. 2 | 3 | PROJECT_BINARY_NAME = server_example_basic_io 4 | PROJECT_SOURCES = server_example_basic_io.c 5 | PROJECT_SOURCES += static_model.c 6 | 7 | PROJECT_ICD_FILE = simpleIO_direct_control.cid 8 | 9 | all: $(PROJECT_BINARY_NAME) 10 | 11 | LDLIBS += -lm -lpthread 12 | 13 | CP = cp 14 | 15 | LIBIEC61850_INSTALL_DIR = ../../.install 16 | 17 | LIBIEC61850_LIB_DIR = $(LIBIEC61850_INSTALL_DIR)/lib 18 | LIBIEC61850_INC_DIR = $(LIBIEC61850_INSTALL_DIR)/include 19 | LIBIEC61850_INCLUDES = -I$(LIBIEC61850_INC_DIR) 20 | 21 | INCLUDES += $(LIBIEC61850_INCLUDES) 22 | 23 | model: $(PROJECT_ICD_FILE) 24 | java -jar $(LIBIEC_HOME)/tools/model_generator/genmodel.jar $(PROJECT_ICD_FILE) 25 | 26 | $(PROJECT_BINARY_NAME): $(PROJECT_SOURCES) $(LIB_NAME) 27 | $(CC) $(CFLAGS) $(LDFLAGS) -o $(PROJECT_BINARY_NAME) $(PROJECT_SOURCES) $(INCLUDES) -L$(LIBIEC61850_LIB_DIR) -liec61850 $(LDLIBS) 28 | mkdir -p vmd-filestore 29 | $(CP) $(PROJECT_BINARY_NAME) vmd-filestore/IEDSERVER.BIN 30 | 31 | clean: 32 | rm -f $(PROJECT_BINARY_NAME) 33 | rm -f vmd-filestore/IEDSERVER.BIN 34 | 35 | 36 | -------------------------------------------------------------------------------- /examples/server_example_complex_array/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( 2 | . 3 | ) 4 | 5 | set(server_example_ca_SRCS 6 | server_example_ca.c 7 | static_model.c 8 | ) 9 | 10 | IF(MSVC) 11 | set_source_files_properties(${server_example_ca_SRCS} 12 | PROPERTIES LANGUAGE CXX) 13 | ENDIF(MSVC) 14 | 15 | add_executable(server_example_ca 16 | ${server_example_ca_SRCS} 17 | ) 18 | 19 | target_link_libraries(server_example_ca 20 | iec61850 21 | ) 22 | -------------------------------------------------------------------------------- /examples/server_example_complex_array/Makefile: -------------------------------------------------------------------------------- 1 | LIBIEC_HOME=../.. 2 | 3 | PROJECT_BINARY_NAME = server_example_ca 4 | PROJECT_SOURCES = server_example_ca.c 5 | PROJECT_SOURCES += static_model.c 6 | 7 | PROJECT_ICD_FILE = mhai_array.cid 8 | 9 | include $(LIBIEC_HOME)/make/target_system.mk 10 | include $(LIBIEC_HOME)/make/stack_includes.mk 11 | 12 | all: $(PROJECT_BINARY_NAME) 13 | 14 | include $(LIBIEC_HOME)/make/common_targets.mk 15 | 16 | model: $(PROJECT_ICD_FILE) 17 | java -jar $(LIBIEC_HOME)/tools/model_generator/genmodel.jar $(PROJECT_ICD_FILE) 18 | 19 | 20 | $(PROJECT_BINARY_NAME): $(PROJECT_SOURCES) $(LIB_NAME) 21 | $(CC) $(CFLAGS) $(LDFLAGS) -o $(PROJECT_BINARY_NAME) $(PROJECT_SOURCES) $(INCLUDES) $(LIB_NAME) $(LDLIBS) 22 | 23 | clean: 24 | rm -f $(PROJECT_BINARY_NAME) 25 | 26 | 27 | -------------------------------------------------------------------------------- /examples/server_example_config_file/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( 2 | . 3 | ) 4 | 5 | set(server_example_config_file_SRCS 6 | server_example_config_file.c 7 | ) 8 | 9 | IF(MSVC) 10 | set_source_files_properties(${server_example_config_file_SRCS} 11 | PROPERTIES LANGUAGE CXX) 12 | ENDIF(MSVC) 13 | 14 | add_executable(server_example_config_file 15 | ${server_example_config_file_SRCS} 16 | ) 17 | 18 | target_link_libraries(server_example_config_file 19 | iec61850 20 | ) 21 | -------------------------------------------------------------------------------- /examples/server_example_config_file/Makefile: -------------------------------------------------------------------------------- 1 | LIBIEC_HOME=../.. 2 | 3 | PROJECT_BINARY_NAME = server_example_config_file 4 | PROJECT_SOURCES = server_example_config_file.c 5 | 6 | PROJECT_ICD_FILE = simpleIO_direct_control_goose.icd 7 | 8 | include $(LIBIEC_HOME)/make/target_system.mk 9 | include $(LIBIEC_HOME)/make/stack_includes.mk 10 | 11 | all: $(PROJECT_BINARY_NAME) 12 | 13 | include $(LIBIEC_HOME)/make/common_targets.mk 14 | 15 | model: $(PROJECT_ICD_FILE) 16 | java -jar $(LIBIEC_HOME)/tools/model_generator/genconfig.jar $(PROJECT_ICD_FILE) model.cfg 17 | 18 | $(PROJECT_BINARY_NAME): $(PROJECT_SOURCES) $(LIB_NAME) 19 | $(CC) $(CFLAGS) $(LDFLAGS) -o $(PROJECT_BINARY_NAME) $(PROJECT_SOURCES) $(INCLUDES) $(LIB_NAME) $(LDLIBS) 20 | 21 | clean: 22 | rm -f $(PROJECT_BINARY_NAME) 23 | 24 | 25 | -------------------------------------------------------------------------------- /examples/server_example_control/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( 2 | . 3 | ) 4 | 5 | set(server_example_control_SRCS 6 | server_example_control.c 7 | static_model.c 8 | ) 9 | 10 | IF(MSVC) 11 | set_source_files_properties(${server_example_control_SRCS} 12 | PROPERTIES LANGUAGE CXX) 13 | ENDIF(MSVC) 14 | 15 | add_executable(server_example_control 16 | ${server_example_control_SRCS} 17 | ) 18 | 19 | target_link_libraries(server_example_control 20 | iec61850 21 | ) 22 | -------------------------------------------------------------------------------- /examples/server_example_control/Makefile: -------------------------------------------------------------------------------- 1 | LIBIEC_HOME=../.. 2 | 3 | PROJECT_BINARY_NAME = server_example_control 4 | PROJECT_SOURCES = server_example_control.c 5 | PROJECT_SOURCES += static_model.c 6 | 7 | PROJECT_ICD_FILE = simpleIO_control_tests.cid 8 | 9 | 10 | include $(LIBIEC_HOME)/make/target_system.mk 11 | include $(LIBIEC_HOME)/make/stack_includes.mk 12 | 13 | all: $(PROJECT_BINARY_NAME) 14 | 15 | include $(LIBIEC_HOME)/make/common_targets.mk 16 | 17 | model: $(PROJECT_ICD_FILE) 18 | java -jar $(LIBIEC_HOME)/tools/model_generator/genmodel.jar $(PROJECT_ICD_FILE) 19 | 20 | $(PROJECT_BINARY_NAME): $(PROJECT_SOURCES) $(LIB_NAME) 21 | $(CC) $(CFLAGS) $(LDFLAGS) -o $(PROJECT_BINARY_NAME) $(PROJECT_SOURCES) $(INCLUDES) $(LIB_NAME) $(LDLIBS) 22 | 23 | clean: 24 | rm -f $(PROJECT_BINARY_NAME) 25 | 26 | 27 | -------------------------------------------------------------------------------- /examples/server_example_deadband/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( 2 | . 3 | ) 4 | 5 | set(server_example_SRCS 6 | server_example_deadband.c 7 | static_model.c 8 | ) 9 | 10 | IF(MSVC) 11 | set_source_files_properties(${server_example_SRCS} 12 | PROPERTIES LANGUAGE CXX) 13 | ENDIF(MSVC) 14 | 15 | add_executable(server_example_deadband 16 | ${server_example_SRCS} 17 | ) 18 | 19 | target_link_libraries(server_example_deadband 20 | iec61850 21 | ) 22 | -------------------------------------------------------------------------------- /examples/server_example_deadband/Makefile: -------------------------------------------------------------------------------- 1 | LIBIEC_HOME=../.. 2 | 3 | PROJECT_BINARY_NAME = server_example_deadband 4 | 5 | PROJECT_SOURCES = server_example_deadband.c 6 | PROJECT_SOURCES += static_model.c 7 | 8 | PROJECT_ICD_FILE = cid_example_deadband.cid 9 | 10 | include $(LIBIEC_HOME)/make/target_system.mk 11 | include $(LIBIEC_HOME)/make/stack_includes.mk 12 | 13 | all: $(PROJECT_BINARY_NAME) 14 | 15 | include $(LIBIEC_HOME)/make/common_targets.mk 16 | 17 | LDLIBS += -lm 18 | 19 | CP = cp 20 | 21 | model: $(PROJECT_ICD_FILE) 22 | java -jar $(LIBIEC_HOME)/tools/model_generator/genmodel.jar $(PROJECT_ICD_FILE) 23 | 24 | $(PROJECT_BINARY_NAME): $(PROJECT_SOURCES) $(LIB_NAME) 25 | $(CC) $(CFLAGS) $(LDFLAGS) -o $(PROJECT_BINARY_NAME) $(PROJECT_SOURCES) $(INCLUDES) $(LIB_NAME) $(LDLIBS) 26 | 27 | clean: 28 | rm -f $(PROJECT_BINARY_NAME) 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /examples/server_example_dynamic/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( 2 | . 3 | ) 4 | 5 | set(server_example_dynamic_SRCS 6 | server_example_dynamic.c 7 | ) 8 | 9 | IF(MSVC) 10 | set_source_files_properties(${server_example_dynamic_SRCS} 11 | PROPERTIES LANGUAGE CXX) 12 | ENDIF(MSVC) 13 | 14 | add_executable(server_example_dynamic 15 | ${server_example_dynamic_SRCS} 16 | ) 17 | 18 | target_link_libraries(server_example_dynamic 19 | iec61850 20 | ) 21 | -------------------------------------------------------------------------------- /examples/server_example_dynamic/Makefile: -------------------------------------------------------------------------------- 1 | LIBIEC_HOME=../.. 2 | 3 | PROJECT_BINARY_NAME = server_example_dynamic 4 | PROJECT_SOURCES = server_example_dynamic.c 5 | 6 | include $(LIBIEC_HOME)/make/target_system.mk 7 | include $(LIBIEC_HOME)/make/stack_includes.mk 8 | 9 | all: $(PROJECT_BINARY_NAME) 10 | 11 | include $(LIBIEC_HOME)/make/common_targets.mk 12 | 13 | $(PROJECT_BINARY_NAME): $(PROJECT_SOURCES) $(LIB_NAME) 14 | $(CC) $(CFLAGS) $(LDFLAGS) -o $(PROJECT_BINARY_NAME) $(PROJECT_SOURCES) $(INCLUDES) $(LIB_NAME) $(LDLIBS) 15 | 16 | clean: 17 | rm -f $(PROJECT_BINARY_NAME) 18 | 19 | 20 | -------------------------------------------------------------------------------- /examples/server_example_files/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( 2 | . 3 | ) 4 | 5 | set(server_example_SRCS 6 | server_example_files.c 7 | static_model.c 8 | ) 9 | 10 | IF(MSVC) 11 | set_source_files_properties(${server_example_SRCS} 12 | PROPERTIES LANGUAGE CXX) 13 | ENDIF(MSVC) 14 | 15 | add_executable(server_example_files 16 | ${server_example_SRCS} 17 | ) 18 | 19 | target_link_libraries(server_example_files 20 | iec61850 21 | ) 22 | -------------------------------------------------------------------------------- /examples/server_example_files/Makefile: -------------------------------------------------------------------------------- 1 | LIBIEC_HOME=../.. 2 | 3 | PROJECT_BINARY_NAME = server_example_files 4 | PROJECT_SOURCES = server_example_files.c 5 | PROJECT_SOURCES += static_model.c 6 | 7 | PROJECT_ICD_FILE = simpleIO_direct_control.cid 8 | 9 | include $(LIBIEC_HOME)/make/target_system.mk 10 | include $(LIBIEC_HOME)/make/stack_includes.mk 11 | 12 | all: $(PROJECT_BINARY_NAME) 13 | 14 | include $(LIBIEC_HOME)/make/common_targets.mk 15 | 16 | LDLIBS += -lm 17 | 18 | CP = cp 19 | 20 | model: $(PROJECT_ICD_FILE) 21 | java -jar $(LIBIEC_HOME)/tools/model_generator/genmodel.jar $(PROJECT_ICD_FILE) 22 | 23 | $(PROJECT_BINARY_NAME): $(PROJECT_SOURCES) $(LIB_NAME) 24 | $(CC) $(CFLAGS) $(LDFLAGS) -o $(PROJECT_BINARY_NAME) $(PROJECT_SOURCES) $(INCLUDES) $(LIB_NAME) $(LDLIBS) 25 | $(CP) $(PROJECT_BINARY_NAME) vmd-filestore/IEDSERVER.BIN 26 | 27 | clean: 28 | rm -f $(PROJECT_BINARY_NAME) 29 | rm -f vmd-filestore/IEDSERVER.BIN 30 | 31 | 32 | -------------------------------------------------------------------------------- /examples/server_example_files/vmd-filestore/test: -------------------------------------------------------------------------------- 1 | test 2 | -------------------------------------------------------------------------------- /examples/server_example_goose/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( 2 | . 3 | ) 4 | 5 | set(server_example_goose_SRCS 6 | server_example_goose.c 7 | static_model.c 8 | ) 9 | 10 | IF(MSVC) 11 | set_source_files_properties(${server_example_goose_SRCS} 12 | PROPERTIES LANGUAGE CXX) 13 | ENDIF(MSVC) 14 | 15 | add_executable(server_example_goose 16 | ${server_example_goose_SRCS} 17 | ) 18 | 19 | target_link_libraries(server_example_goose 20 | iec61850 21 | ) 22 | 23 | 24 | -------------------------------------------------------------------------------- /examples/server_example_goose/Makefile: -------------------------------------------------------------------------------- 1 | LIBIEC_HOME=../.. 2 | 3 | PROJECT_BINARY_NAME = server_example_goose 4 | PROJECT_SOURCES = server_example_goose.c 5 | PROJECT_SOURCES += static_model.c 6 | 7 | PROJECT_ICD_FILE = simpleIO_direct_control_goose.cid 8 | 9 | include $(LIBIEC_HOME)/make/target_system.mk 10 | include $(LIBIEC_HOME)/make/stack_includes.mk 11 | 12 | all: $(PROJECT_BINARY_NAME) 13 | 14 | include $(LIBIEC_HOME)/make/common_targets.mk 15 | 16 | model: $(PROJECT_ICD_FILE) 17 | java -jar $(LIBIEC_HOME)/tools/model_generator/genmodel.jar $(PROJECT_ICD_FILE) 18 | 19 | $(PROJECT_BINARY_NAME): $(PROJECT_SOURCES) $(LIB_NAME) 20 | $(CC) $(CFLAGS) $(LDFLAGS) -o $(PROJECT_BINARY_NAME) $(PROJECT_SOURCES) $(INCLUDES) $(LIB_NAME) $(LDLIBS) 21 | 22 | clean: 23 | rm -f $(PROJECT_BINARY_NAME) 24 | 25 | 26 | -------------------------------------------------------------------------------- /examples/server_example_logging/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/../../third_party/sqlite/sqlite3.h") 3 | message("Found sqlite source code -> compile sqlite-log driver with static sqlite library") 4 | 5 | include_directories( 6 | . 7 | ${CMAKE_SOURCE_DIR}/third_party/sqlite 8 | ) 9 | 10 | set(server_example_SRCS 11 | server_example_logging.c 12 | static_model.c 13 | ${CMAKE_CURRENT_LIST_DIR}/../../src/logging/drivers/sqlite/log_storage_sqlite.c 14 | ) 15 | 16 | set(sqlite_SRCS 17 | ${CMAKE_CURRENT_LIST_DIR}/../../third_party/sqlite/sqlite3.c 18 | ) 19 | 20 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION") 21 | 22 | IF(MSVC) 23 | set_source_files_properties(${server_example_SRCS} 24 | PROPERTIES LANGUAGE CXX) 25 | ENDIF(MSVC) 26 | 27 | add_executable(server_example_logging 28 | ${server_example_SRCS} 29 | ${sqlite_SRCS} 30 | ) 31 | 32 | target_link_libraries(server_example_logging 33 | iec61850 34 | ) 35 | 36 | ELSE() 37 | 38 | message("server-example-logging: sqlite not found") 39 | 40 | ENDIF() 41 | 42 | -------------------------------------------------------------------------------- /examples/server_example_logging/Makefile: -------------------------------------------------------------------------------- 1 | LIBIEC_HOME=../.. 2 | 3 | PROJECT_BINARY_NAME = server_example_logging 4 | PROJECT_SOURCES = server_example_logging.c 5 | PROJECT_SOURCES += static_model.c 6 | PROJECT_SOURCES += $(LIBIEC_HOME)/src/logging/drivers/sqlite/log_storage_sqlite.c 7 | 8 | PROJECT_ICD_FILE = simpleIO_direct_control.cid 9 | 10 | include $(LIBIEC_HOME)/make/target_system.mk 11 | include $(LIBIEC_HOME)/make/stack_includes.mk 12 | 13 | all: $(PROJECT_BINARY_NAME) 14 | 15 | include $(LIBIEC_HOME)/make/common_targets.mk 16 | 17 | LDLIBS += -lm -lsqlite3 18 | 19 | CP = cp 20 | 21 | model: $(PROJECT_ICD_FILE) 22 | java -jar $(LIBIEC_HOME)/tools/model_generator/genmodel.jar $(PROJECT_ICD_FILE) 23 | 24 | $(PROJECT_BINARY_NAME): $(PROJECT_SOURCES) $(LIB_NAME) 25 | $(CC) $(CFLAGS) $(LDFLAGS) -o $(PROJECT_BINARY_NAME) $(PROJECT_SOURCES) $(INCLUDES) $(LIB_NAME) $(LDLIBS) 26 | 27 | clean: 28 | rm -f $(PROJECT_BINARY_NAME) 29 | 30 | 31 | -------------------------------------------------------------------------------- /examples/server_example_logging/Makefile.sqliteStatic: -------------------------------------------------------------------------------- 1 | LIBIEC_HOME=../.. 2 | 3 | PROJECT_BINARY_NAME = server_example_logging 4 | PROJECT_SOURCES = server_example_logging.c 5 | PROJECT_SOURCES += static_model.c 6 | PROJECT_SOURCES += $(LIBIEC_HOME)/src/logging/drivers/sqlite/log_storage_sqlite.c 7 | PROJECT_SOURCES += $(LIBIEC_HOME)/third_party/sqlite/sqlite3.c 8 | 9 | PROJECT_ICD_FILE = simpleIO_direct_control.icd 10 | 11 | include $(LIBIEC_HOME)/make/target_system.mk 12 | include $(LIBIEC_HOME)/make/stack_includes.mk 13 | 14 | all: $(PROJECT_BINARY_NAME) 15 | 16 | include $(LIBIEC_HOME)/make/common_targets.mk 17 | 18 | CFLAGS += -I$(LIBIEC_HOME)/third_party/sqlite 19 | CFLAGS += -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION -DHAVE_USLEEP 20 | 21 | LDLIBS += -lm 22 | 23 | CP = cp 24 | 25 | model: $(PROJECT_ICD_FILE) 26 | java -jar $(LIBIEC_HOME)/tools/model_generator/genmodel.jar $(PROJECT_ICD_FILE) 27 | 28 | $(PROJECT_BINARY_NAME): $(PROJECT_SOURCES) $(LIB_NAME) 29 | $(CC) $(CFLAGS) $(LDFLAGS) -o $(PROJECT_BINARY_NAME) $(PROJECT_SOURCES) $(INCLUDES) $(LIB_NAME) $(LDLIBS) 30 | 31 | clean: 32 | rm -f $(PROJECT_BINARY_NAME) 33 | 34 | 35 | -------------------------------------------------------------------------------- /examples/server_example_logging/Makefile.standalone: -------------------------------------------------------------------------------- 1 | LIBIEC_HOME=../.. 2 | 3 | PROJECT_BINARY_NAME = server_example_logging 4 | PROJECT_SOURCES = server_example_logging.c 5 | PROJECT_SOURCES += static_model.c 6 | PROJECT_SOURCES += $(LIBIEC_HOME)/src/logging/drivers/sqlite/log_storage_sqlite.c 7 | 8 | PROJECT_ICD_FILE = simpleIO_direct_control.cid 9 | 10 | all: $(PROJECT_BINARY_NAME) 11 | 12 | LDLIBS += -lm -lpthread -lsqlite3 13 | 14 | CP = cp 15 | 16 | LIBIEC61850_INSTALL_DIR = ../../.install 17 | 18 | LIBIEC61850_LIB_DIR = $(LIBIEC61850_INSTALL_DIR)/lib 19 | LIBIEC61850_INC_DIR = $(LIBIEC61850_INSTALL_DIR)/include 20 | LIBIEC61850_INCLUDES = -I$(LIBIEC61850_INC_DIR) 21 | 22 | INCLUDES += $(LIBIEC61850_INCLUDES) 23 | 24 | model: $(PROJECT_ICD_FILE) 25 | java -jar $(LIBIEC_HOME)/tools/model_generator/genmodel.jar $(PROJECT_ICD_FILE) 26 | 27 | $(PROJECT_BINARY_NAME): $(PROJECT_SOURCES) $(LIB_NAME) 28 | $(CC) $(CFLAGS) $(LDFLAGS) -o $(PROJECT_BINARY_NAME) $(PROJECT_SOURCES) $(INCLUDES) -L$(LIBIEC61850_LIB_DIR) -liec61850 $(LDLIBS) 29 | 30 | clean: 31 | rm -f $(PROJECT_BINARY_NAME) 32 | 33 | 34 | -------------------------------------------------------------------------------- /examples/server_example_logging/README: -------------------------------------------------------------------------------- 1 | BUILD THE EXAMPLE: 2 | 3 | To build the logging example it is required to have sqlite present! 4 | 5 | If you have sqlite installed on the system (including the header files) e.g. in an Ubuntu installation with the sqlite3 package installed, you can simply use the Makefile. 6 | 7 | If you don't have sqlite installed you have to download the sqlite amalgamation package and install the files sqlite3.c, sqlite3.h in the libiec61850/third_party/sqlite folder and use the Makefile.sqliteStatic instead. This will build a version of the example with the sqlite code statically linked. 8 | 9 | -------------------------------------------------------------------------------- /examples/server_example_password_auth/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( 2 | . 3 | ) 4 | 5 | set(server_example_SRCS 6 | server_example_password_auth.c 7 | static_model.c 8 | ) 9 | 10 | IF(MSVC) 11 | set_source_files_properties(${server_example_SRCS} 12 | PROPERTIES LANGUAGE CXX) 13 | ENDIF(MSVC) 14 | 15 | add_executable(server_example_password_auth 16 | ${server_example_SRCS} 17 | ) 18 | 19 | target_link_libraries(server_example_password_auth 20 | iec61850 21 | ) 22 | -------------------------------------------------------------------------------- /examples/server_example_password_auth/Makefile: -------------------------------------------------------------------------------- 1 | LIBIEC_HOME=../.. 2 | 3 | PROJECT_BINARY_NAME = server_example_password_auth 4 | PROJECT_SOURCES = server_example_password_auth.c 5 | PROJECT_SOURCES += static_model.c 6 | 7 | PROJECT_ICD_FILE = simpleIO_direct_control.cid 8 | 9 | include $(LIBIEC_HOME)/make/target_system.mk 10 | include $(LIBIEC_HOME)/make/stack_includes.mk 11 | 12 | all: $(PROJECT_BINARY_NAME) 13 | 14 | include $(LIBIEC_HOME)/make/common_targets.mk 15 | 16 | model: $(PROJECT_ICD_FILE) 17 | java -jar $(LIBIEC_HOME)/tools/model_generator/genmodel.jar $(PROJECT_ICD_FILE) 18 | 19 | $(PROJECT_BINARY_NAME): $(PROJECT_SOURCES) $(LIB_NAME) 20 | $(CC) $(CFLAGS) $(LDFLAGS) -o $(PROJECT_BINARY_NAME) $(PROJECT_SOURCES) $(INCLUDES) $(LIB_NAME) $(LDLIBS) 21 | 22 | clean: 23 | rm -f $(PROJECT_BINARY_NAME) 24 | 25 | 26 | -------------------------------------------------------------------------------- /examples/server_example_service_tracking/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( 2 | . 3 | ) 4 | 5 | set(server_example_SRCS 6 | server_example_service_tracking.c 7 | static_model.c 8 | ) 9 | 10 | IF(MSVC) 11 | set_source_files_properties(${server_example_SRCS} 12 | PROPERTIES LANGUAGE CXX) 13 | ENDIF(MSVC) 14 | 15 | add_executable(server_example_service_tracking 16 | ${server_example_SRCS} 17 | ) 18 | 19 | target_link_libraries(server_example_service_tracking 20 | iec61850 21 | ) 22 | -------------------------------------------------------------------------------- /examples/server_example_setting_groups/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( 2 | . 3 | ) 4 | 5 | set(server_example_sg_SRCS 6 | server_example_sg.c 7 | static_model.c 8 | ) 9 | 10 | IF(MSVC) 11 | set_source_files_properties(${server_example_sg_SRCS} 12 | PROPERTIES LANGUAGE CXX) 13 | ENDIF(MSVC) 14 | 15 | add_executable(server_example_sg 16 | ${server_example_sg_SRCS} 17 | ) 18 | 19 | target_link_libraries(server_example_sg 20 | iec61850 21 | ) 22 | -------------------------------------------------------------------------------- /examples/server_example_setting_groups/Makefile: -------------------------------------------------------------------------------- 1 | LIBIEC_HOME=../.. 2 | 3 | PROJECT_BINARY_NAME = server_example_sg 4 | PROJECT_SOURCES = server_example_sg.c 5 | PROJECT_SOURCES += static_model.c 6 | 7 | PROJECT_ICD_FILE = sg_demo.cid 8 | 9 | include $(LIBIEC_HOME)/make/target_system.mk 10 | include $(LIBIEC_HOME)/make/stack_includes.mk 11 | 12 | all: $(PROJECT_BINARY_NAME) 13 | 14 | include $(LIBIEC_HOME)/make/common_targets.mk 15 | 16 | model: $(PROJECT_ICD_FILE) 17 | java -jar $(LIBIEC_HOME)/tools/model_generator/genmodel.jar $(PROJECT_ICD_FILE) 18 | 19 | $(PROJECT_BINARY_NAME): $(PROJECT_SOURCES) $(LIB_NAME) 20 | $(CC) $(CFLAGS) $(LDFLAGS) -o $(PROJECT_BINARY_NAME) $(PROJECT_SOURCES) $(INCLUDES) $(LIB_NAME) $(LDFLAGS) $(LDLIBS) 21 | 22 | clean: 23 | rm -f $(PROJECT_BINARY_NAME) 24 | 25 | -------------------------------------------------------------------------------- /examples/server_example_simple/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( 2 | . 3 | ) 4 | 5 | set(server_example_SRCS 6 | server_example_simple.c 7 | static_model.c 8 | ) 9 | 10 | IF(MSVC) 11 | set_source_files_properties(${server_example_SRCS} 12 | PROPERTIES LANGUAGE CXX) 13 | ENDIF(MSVC) 14 | 15 | add_executable(server_example_simple 16 | ${server_example_SRCS} 17 | ) 18 | 19 | target_link_libraries(server_example_simple 20 | iec61850 21 | ) 22 | -------------------------------------------------------------------------------- /examples/server_example_simple/Makefile: -------------------------------------------------------------------------------- 1 | LIBIEC_HOME=../.. 2 | 3 | PROJECT_BINARY_NAME = server_example_simple 4 | PROJECT_SOURCES = server_example_simple.c 5 | PROJECT_SOURCES += static_model.c 6 | 7 | PROJECT_ICD_FILE = sampleModel_with_dataset.cid 8 | 9 | include $(LIBIEC_HOME)/make/target_system.mk 10 | include $(LIBIEC_HOME)/make/stack_includes.mk 11 | 12 | all: $(PROJECT_BINARY_NAME) 13 | 14 | include $(LIBIEC_HOME)/make/common_targets.mk 15 | 16 | model: $(PROJECT_ICD_FILE) 17 | java -jar $(LIBIEC_HOME)/tools/model_generator/genmodel.jar $(PROJECT_ICD_FILE) 18 | 19 | $(PROJECT_BINARY_NAME): $(PROJECT_SOURCES) $(LIB_NAME) 20 | $(CC) $(CFLAGS) $(LDFLAGS) -o $(PROJECT_BINARY_NAME) $(PROJECT_SOURCES) $(INCLUDES) $(LIB_NAME) $(LDLIBS) 21 | 22 | clean: 23 | rm -f $(PROJECT_BINARY_NAME) 24 | 25 | 26 | -------------------------------------------------------------------------------- /examples/server_example_substitution/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( 2 | . 3 | ) 4 | 5 | set(server_example_SRCS 6 | server_example_substitution.c 7 | static_model.c 8 | ) 9 | 10 | IF(MSVC) 11 | set_source_files_properties(${server_example_SRCS} 12 | PROPERTIES LANGUAGE CXX) 13 | ENDIF(MSVC) 14 | 15 | add_executable(server_example_substitution 16 | ${server_example_SRCS} 17 | ) 18 | 19 | target_link_libraries(server_example_substitution 20 | iec61850 21 | ) 22 | -------------------------------------------------------------------------------- /examples/server_example_substitution/Makefile: -------------------------------------------------------------------------------- 1 | LIBIEC_HOME=../.. 2 | 3 | PROJECT_BINARY_NAME = server_example_substitution 4 | PROJECT_SOURCES = server_example_substitution.c 5 | PROJECT_SOURCES += static_model.c 6 | 7 | PROJECT_ICD_FILE = substitution_example.cid 8 | 9 | include $(LIBIEC_HOME)/make/target_system.mk 10 | include $(LIBIEC_HOME)/make/stack_includes.mk 11 | 12 | all: $(PROJECT_BINARY_NAME) 13 | 14 | include $(LIBIEC_HOME)/make/common_targets.mk 15 | 16 | LDLIBS += -lm 17 | 18 | CP = cp 19 | 20 | model: $(PROJECT_ICD_FILE) 21 | java -jar $(LIBIEC_HOME)/tools/model_generator/genmodel.jar $(PROJECT_ICD_FILE) 22 | 23 | $(PROJECT_BINARY_NAME): $(PROJECT_SOURCES) $(LIB_NAME) 24 | $(CC) $(CFLAGS) $(LDFLAGS) -o $(PROJECT_BINARY_NAME) $(PROJECT_SOURCES) $(INCLUDES) $(LIB_NAME) $(LDLIBS) 25 | 26 | clean: 27 | rm -f $(PROJECT_BINARY_NAME) 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /examples/server_example_threadless/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( 2 | . 3 | ) 4 | 5 | set(server_example_threadless_SRCS 6 | server_example_threadless.c 7 | static_model.c 8 | ) 9 | 10 | IF(MSVC) 11 | set_source_files_properties(${server_example_threadless_SRCS} 12 | PROPERTIES LANGUAGE CXX) 13 | ENDIF(MSVC) 14 | 15 | add_executable(server_example_threadless 16 | ${server_example_threadless_SRCS} 17 | ) 18 | 19 | target_link_libraries(server_example_threadless 20 | iec61850 21 | ) 22 | -------------------------------------------------------------------------------- /examples/server_example_threadless/Makefile: -------------------------------------------------------------------------------- 1 | LIBIEC_HOME=../.. 2 | 3 | PROJECT_BINARY_NAME = server_example_threadless 4 | PROJECT_SOURCES = server_example_threadless.c 5 | PROJECT_SOURCES += static_model.c 6 | 7 | PROJECT_ICD_FILE = simpleIO_direct_control.cid 8 | 9 | include $(LIBIEC_HOME)/make/target_system.mk 10 | include $(LIBIEC_HOME)/make/stack_includes.mk 11 | 12 | all: $(PROJECT_BINARY_NAME) 13 | 14 | include $(LIBIEC_HOME)/make/common_targets.mk 15 | 16 | LDLIBS += -lm 17 | 18 | CP = cp 19 | 20 | model: $(PROJECT_ICD_FILE) 21 | java -jar $(LIBIEC_HOME)/tools/model_generator/genmodel.jar $(PROJECT_ICD_FILE) 22 | 23 | $(PROJECT_BINARY_NAME): $(PROJECT_SOURCES) $(LIB_NAME) 24 | $(CC) $(CFLAGS) $(LDFLAGS) -o $(PROJECT_BINARY_NAME) $(PROJECT_SOURCES) $(INCLUDES) $(LIB_NAME) $(LDLIBS) 25 | $(CP) $(PROJECT_BINARY_NAME) vmd-filestore/IEDSERVER.BIN 26 | 27 | clean: 28 | rm -f $(PROJECT_BINARY_NAME) 29 | rm -f vmd-filestore/IEDSERVER.BIN 30 | 31 | 32 | -------------------------------------------------------------------------------- /examples/server_example_threadless/vmd-filestore/SYSTEM.BIN: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mz-automation/libiec61850/3a1480e5948ca53b4dcc5fa15b05598fa3322bb9/examples/server_example_threadless/vmd-filestore/SYSTEM.BIN -------------------------------------------------------------------------------- /examples/server_example_write_handler/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( 2 | . 3 | ) 4 | 5 | set(server_example_SRCS 6 | server_example_write_handler.c 7 | static_model.c 8 | ) 9 | 10 | IF(MSVC) 11 | set_source_files_properties(${server_example_SRCS} 12 | PROPERTIES LANGUAGE CXX) 13 | ENDIF(MSVC) 14 | 15 | add_executable(server_example_write_handler 16 | ${server_example_SRCS} 17 | ) 18 | 19 | target_link_libraries(server_example_write_handler 20 | iec61850 21 | ) 22 | -------------------------------------------------------------------------------- /examples/server_example_write_handler/Makefile: -------------------------------------------------------------------------------- 1 | LIBIEC_HOME=../.. 2 | 3 | PROJECT_BINARY_NAME = server_example_write_handler 4 | PROJECT_SOURCES = server_example_write_handler.c 5 | PROJECT_SOURCES += static_model.c 6 | 7 | PROJECT_ICD_FILE = complexModel.cid 8 | 9 | include $(LIBIEC_HOME)/make/target_system.mk 10 | include $(LIBIEC_HOME)/make/stack_includes.mk 11 | 12 | all: $(PROJECT_BINARY_NAME) 13 | 14 | include $(LIBIEC_HOME)/make/common_targets.mk 15 | 16 | model: $(PROJECT_ICD_FILE) 17 | java -jar $(LIBIEC_HOME)/tools/model_generator/genmodel.jar $(PROJECT_ICD_FILE) 18 | 19 | $(PROJECT_BINARY_NAME): $(PROJECT_SOURCES) $(LIB_NAME) 20 | $(CC) $(CFLAGS) $(LDFLAGS) -o $(PROJECT_BINARY_NAME) $(PROJECT_SOURCES) $(INCLUDES) $(LIB_NAME) $(LDLIBS) 21 | 22 | clean: 23 | rm -f $(PROJECT_BINARY_NAME) 24 | 25 | 26 | -------------------------------------------------------------------------------- /examples/sntp_example/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | set(sntp_example_SRCS 3 | sntp_example.c 4 | ) 5 | 6 | IF(WIN32) 7 | 8 | set_source_files_properties(${sntp_example_SRCS} 9 | PROPERTIES LANGUAGE CXX) 10 | add_executable(sntp_example 11 | ${sntp_example_SRCS} 12 | ) 13 | 14 | target_link_libraries(sntp_example 15 | iec61850 16 | ) 17 | 18 | ELSE(WIN32) 19 | 20 | add_executable(sntp_example 21 | ${sntp_example_SRCS} 22 | ) 23 | 24 | target_link_libraries(sntp_example 25 | iec61850 26 | ) 27 | 28 | ENDIF(WIN32) 29 | 30 | 31 | -------------------------------------------------------------------------------- /examples/sntp_example/sntp_example.c: -------------------------------------------------------------------------------- 1 | /* 2 | * sntp_example.c 3 | */ 4 | 5 | #include "sntp_client.h" 6 | #include "hal_thread.h" 7 | #include 8 | #include 9 | 10 | static bool running = true; 11 | 12 | void 13 | sigint_handler(int signalId) 14 | { 15 | running = false; 16 | } 17 | 18 | static void 19 | sntpUserCallback(void* parameter, bool isSynced) 20 | { 21 | if (isSynced) 22 | printf("SNTP: Clock synchronized\n"); 23 | else 24 | printf("SNTP: Clock not synchronized\n"); 25 | } 26 | 27 | int 28 | main(int argc, char** argv) 29 | { 30 | SNTPClient client = SNTPClient_create(); 31 | 32 | SNTPClient_addServer(client, "192.168.178.74", 123); 33 | 34 | SNTPClient_setUserCallback(client, sntpUserCallback, NULL); 35 | 36 | SNTPClient_setPollInterval(client, 16); 37 | 38 | SNTPClient_start(client); 39 | 40 | signal(SIGINT, sigint_handler); 41 | 42 | while (running) { 43 | Thread_sleep(100); 44 | } 45 | 46 | SNTPClient_destroy(client); 47 | } 48 | 49 | -------------------------------------------------------------------------------- /examples/sv_publisher/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | set(sv_publisher_example_SRCS 3 | sv_publisher_example.c 4 | ) 5 | 6 | IF(MSVC) 7 | 8 | set_source_files_properties(${sv_publisher_example_SRCS} 9 | PROPERTIES LANGUAGE CXX) 10 | ENDIF(MSVC) 11 | 12 | add_executable(sv_publisher_example 13 | ${sv_publisher_example_SRCS} 14 | ) 15 | 16 | target_link_libraries(sv_publisher_example 17 | iec61850 18 | ) 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /examples/sv_publisher/Makefile: -------------------------------------------------------------------------------- 1 | LIBIEC_HOME=../.. 2 | 3 | PROJECT_BINARY_NAME = sv_publisher 4 | PROJECT_SOURCES += sv_publisher_example.c 5 | 6 | INCLUDES += -I. 7 | 8 | include $(LIBIEC_HOME)/make/target_system.mk 9 | include $(LIBIEC_HOME)/make/stack_includes.mk 10 | 11 | all: $(PROJECT_BINARY_NAME) 12 | 13 | include $(LIBIEC_HOME)/make/common_targets.mk 14 | 15 | $(PROJECT_BINARY_NAME): $(PROJECT_SOURCES) $(LIB_NAME) 16 | $(CC) $(CFLAGS) $(LDFLAGS) -o $(PROJECT_BINARY_NAME) $(PROJECT_SOURCES) $(INCLUDES) $(LIB_NAME) $(LDLIBS) 17 | 18 | clean: 19 | rm -f $(PROJECT_BINARY_NAME) 20 | 21 | 22 | -------------------------------------------------------------------------------- /examples/sv_subscriber/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | set(sv_subscriber_example_SRCS 3 | sv_subscriber_example.c 4 | ) 5 | 6 | IF(MSVC) 7 | 8 | set_source_files_properties(${sv_subscriber_example_SRCS} 9 | PROPERTIES LANGUAGE CXX) 10 | ENDIF(MSVC) 11 | 12 | add_executable(sv_subscriber_example 13 | ${sv_subscriber_example_SRCS} 14 | ) 15 | 16 | target_link_libraries(sv_subscriber_example 17 | iec61850 18 | ) 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /examples/sv_subscriber/Makefile: -------------------------------------------------------------------------------- 1 | LIBIEC_HOME=../.. 2 | 3 | PROJECT_BINARY_NAME = sv_subscriber 4 | PROJECT_SOURCES += sv_subscriber_example.c 5 | 6 | INCLUDES += -I. 7 | 8 | include $(LIBIEC_HOME)/make/target_system.mk 9 | include $(LIBIEC_HOME)/make/stack_includes.mk 10 | 11 | all: $(PROJECT_BINARY_NAME) 12 | 13 | include $(LIBIEC_HOME)/make/common_targets.mk 14 | 15 | $(PROJECT_BINARY_NAME): $(PROJECT_SOURCES) $(LIB_NAME) 16 | $(CC) $(CFLAGS) $(LDFLAGS) -o $(PROJECT_BINARY_NAME) $(PROJECT_SOURCES) $(INCLUDES) $(LIB_NAME) $(LDLIBS) 17 | 18 | clean: 19 | rm -f $(PROJECT_BINARY_NAME) 20 | 21 | 22 | -------------------------------------------------------------------------------- /examples/tls_client_example/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | set(example_SRCS 3 | tls_client_example.c 4 | ) 5 | 6 | IF(MSVC) 7 | set_source_files_properties(${example_SRCS} 8 | PROPERTIES LANGUAGE CXX) 9 | ENDIF(MSVC) 10 | 11 | configure_file(client_CA1_1.key client_CA1_1.key COPYONLY) 12 | configure_file(client_CA1_1.pem client_CA1_1.pem COPYONLY) 13 | configure_file(root_CA1.pem root_CA1.pem COPYONLY) 14 | 15 | add_executable(tls_client_example 16 | ${example_SRCS} 17 | ) 18 | 19 | target_link_libraries(tls_client_example 20 | iec61850 21 | ) 22 | -------------------------------------------------------------------------------- /examples/tls_client_example/Makefile: -------------------------------------------------------------------------------- 1 | LIBIEC_HOME=../.. 2 | 3 | PROJECT_BINARY_NAME = tls_client_example 4 | PROJECT_SOURCES = tls_client_example.c 5 | 6 | include $(LIBIEC_HOME)/make/target_system.mk 7 | include $(LIBIEC_HOME)/make/stack_includes.mk 8 | 9 | all: $(PROJECT_BINARY_NAME) 10 | 11 | include $(LIBIEC_HOME)/make/common_targets.mk 12 | 13 | $(PROJECT_BINARY_NAME): $(PROJECT_SOURCES) $(LIB_NAME) 14 | $(CC) $(CFLAGS) $(LDFLAGS) -o $(PROJECT_BINARY_NAME) $(PROJECT_SOURCES) $(INCLUDES) $(LIB_NAME) $(LDLIBS) 15 | 16 | clean: 17 | rm -f $(PROJECT_BINARY_NAME) 18 | -------------------------------------------------------------------------------- /examples/tls_client_example/client_CA1_1.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIDWzCCAkMCFFTJkICEIidmnrisIFxZ99KKLhDFMA0GCSqGSIb3DQEBCwUAMGox 3 | CzAJBgNVBAYTAkRFMQswCQYDVQQIDAJCVzERMA8GA1UEBwwIRnJlaWJ1cmcxGzAZ 4 | BgNVBAoMEk1aIEF1dG9tYXRpb24gR21iSDEMMAoGA1UECwwDUiZEMRAwDgYDVQQD 5 | DAdyb290X0NBMB4XDTIyMDMxODA5MzMxOFoXDTIyMDQxNzA5MzMxOFowajELMAkG 6 | A1UEBhMCREUxCzAJBgNVBAgMAkJXMREwDwYDVQQHDAhGcmVpYnVyZzEbMBkGA1UE 7 | CgwSTVogQXV0b21hdGlvbiBHbWJIMQwwCgYDVQQLDANSJkQxEDAOBgNVBAMMB2Ns 8 | aWVudDEwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDY+5cw1Rg7jc1s 9 | S8GYQCu7+4vUl1TqAW6Ewou5k49o4aMaG2EmIM70CydQbMoCTeb1Bn9iEDNj0KIR 10 | 5iycZo94jQ4F2SBaanPmT0XD5upqqXFhBPIHDr3+RhvA3IyYaxvxepcpm+E9d0uh 11 | rGRWZL4AyXFVw3/tzaV1kZNMOuEG0md+48qsaYf1wWD5dW9SyQ9CxQjAm2fWw36e 12 | Jn76GS6ILOahngD6bvdAAKW11yvto20cmaFpT+nVuYsiFh9vEabK+bZ9onyG1i5p 13 | EGPoNxmrjgjIMbPYtOGZ1bOkhxhui8LMHZc+fbpvQFexcGk36m1/bGkAQNYN3NpH 14 | pengGAnBAgMBAAEwDQYJKoZIhvcNAQELBQADggEBADSnrKdPqeUr3F1MIk6P8SKo 15 | yR1VrPmNCljaC1i3realDlG+7jlPHfTCkwZwlEfKGa/yANJAw4hv+2tR5m4CsgMB 16 | x6FkKG9p6NTXyv4gXZeLa3ivqFqz7awTVMBf1C1VVeTi/H2kvHSBRmbj6Z5p7/MN 17 | 9E1t5NsgbKKfbj4hQD+f7r6zgFdgTK8C5OYT2ijYryFl1Qqrl5CYPpswm3vL0KkM 18 | e3RMOBqamkFqr4OCZw5juNpGrp3bK3dLF+N6Ceb+PGnS0YU29NpUXo64lzIxdwxs 19 | NDqbFMYXEXGKqUDVQAuj1374M85Cvqlso0Jenc+hWN2/kfAgHGE1Ne3sD9oJg5w= 20 | -----END CERTIFICATE----- 21 | -------------------------------------------------------------------------------- /examples/tls_client_example/root_CA1.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIDtTCCAp2gAwIBAgIUJysTAOCqE3IaNO1QgtOPxMq6M8EwDQYJKoZIhvcNAQEL 3 | BQAwajELMAkGA1UEBhMCREUxCzAJBgNVBAgMAkJXMREwDwYDVQQHDAhGcmVpYnVy 4 | ZzEbMBkGA1UECgwSTVogQXV0b21hdGlvbiBHbWJIMQwwCgYDVQQLDANSJkQxEDAO 5 | BgNVBAMMB3Jvb3RfQ0EwHhcNMjIwMzE4MDkyNzEwWhcNMzIwMzE1MDkyNzEwWjBq 6 | MQswCQYDVQQGEwJERTELMAkGA1UECAwCQlcxETAPBgNVBAcMCEZyZWlidXJnMRsw 7 | GQYDVQQKDBJNWiBBdXRvbWF0aW9uIEdtYkgxDDAKBgNVBAsMA1ImRDEQMA4GA1UE 8 | AwwHcm9vdF9DQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOMyaDaT 9 | +a4DT0s2NCrjUN8coLPfFrLRdN0Gx0hRViuLUFxd001jXruRgXKt2g8lR+YnzUeA 10 | PQHbcIfRQhL+jy/ZMXpmz4Nrl7vyOWFdu8nBKU6c7y9LmSGbnOJZjDXwlX6ERwui 11 | qFzAvRA6YXbPN8gY0B3Ou+T/mjkWN9L1x+V+7bGs9rVIoM78fVyM2FERBfsBtT76 12 | QVQv3KZ+a9EOLxqcZ/nGqsFFysFOSkiRC6Cy4mC5CSik9S5D7X9lz/bdga7O+hqd 13 | SKfir6YMlQGV37JPqmz69N6vvb9UOX/G989T4qdVB/zQOvMdcIWXkqb3vSAXYi/c 14 | ClVS1Pymsy/MXQ0CAwEAAaNTMFEwHQYDVR0OBBYEFGYgIECdrhTsmgCKpVM0RHeC 15 | kFUmMB8GA1UdIwQYMBaAFGYgIECdrhTsmgCKpVM0RHeCkFUmMA8GA1UdEwEB/wQF 16 | MAMBAf8wDQYJKoZIhvcNAQELBQADggEBACsiuHFQjqOglenp/fcNbU034m/vvkyV 17 | SZXau9amXBWdeTEpc1HaPOYO7jFFnu/QoH6AbGZkpL0yWZJA2rf102AkOdAe6E0g 18 | 2H77/hHoHVCfxOiOl3+icsLXJ4VXqV2vmUOEVnWfHRtej4My6avT9uCNMO2bw9hm 19 | 56RAZrs82T9Mpg/1XQ9YUO1q4/JfP/+dCzPXAdwJ/h2cJ/q6Q9g1gRns8IzVlGOZ 20 | 0ZBQCLqLl8vUei+t6YgjyBbeNCz4CEcmXKIJeqMB1jhpsgr6BBMTNTU2Q60b9fzU 21 | OCGLw94EnKYtHWGy2WHMFNbwkNCR0/jwhxKkU0HXy1aNMUBWp99M7P8= 22 | -----END CERTIFICATE----- 23 | -------------------------------------------------------------------------------- /examples/tls_client_example/server_CA1_1.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIDWzCCAkMCFFTJkICEIidmnrisIFxZ99KKLhDIMA0GCSqGSIb3DQEBCwUAMGox 3 | CzAJBgNVBAYTAkRFMQswCQYDVQQIDAJCVzERMA8GA1UEBwwIRnJlaWJ1cmcxGzAZ 4 | BgNVBAoMEk1aIEF1dG9tYXRpb24gR21iSDEMMAoGA1UECwwDUiZEMRAwDgYDVQQD 5 | DAdyb290X0NBMB4XDTIyMDUyNjEwNDc0NFoXDTMwMDgxMjEwNDc0NFowajELMAkG 6 | A1UEBhMCREUxCzAJBgNVBAgMAkJXMREwDwYDVQQHDAhGcmVpYnVyZzEbMBkGA1UE 7 | CgwSTVogQXV0b21hdGlvbiBHbWJIMQwwCgYDVQQLDANSJkQxEDAOBgNVBAMMB3Nl 8 | cnZlcjEwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDYUV+nESoiZ3TU 9 | D1D5xxNEOuhWnPzjR6S1evjlXRFCSnPzNK4i/kZc+oFfBKApeyiOguQJgr5WaVfg 10 | ZDrFduUAoB39+VRL5ZWxSr2Qv1y53fR3BgqHZXj9Ob829SJmxhXdvn/xF9SljBU0 11 | Fb95Jxs1etUc2SIGtwgm2LGu4qzIf52tyQ/sriP4BmHjcsawro1j6ml/nAcFy0ZY 12 | U4IV0lKtptyTih6bzTsI4pf0+FN8Pzs6eMFByp0eS6zxZk/9IadlX7pzWTRI3g7Q 13 | TgxqGlaSvwPZmOxuEYUhbwBTg12huyiEKVYBnQwNHU3iijSyPgeBjaEZHYBtH/lj 14 | YsfiRFylAgMBAAEwDQYJKoZIhvcNAQELBQADggEBANPRnvfByVoKwfMcQYUnYT6l 15 | 5OhYt8f2tQfoa0EXirP0O2xG052ZBl3Z5ZzBCcsq1zveaPoeqXFl6HjqIqURB5NS 16 | imJIi7kB7o6C2z19yxOndPm3urKGyfvxtSy2iyzTMZ8eL8RFMJC5DVV+n5Y+1EgC 17 | pYIu//I0ojnFOemEJXVjfxQhiUbx6Nw8HalHOhW1i017XcOWMKji/lwHfWF2PFmn 18 | pIWZCFPCUtHzBUkXCRzn9ESeMDcMXN6qLb2wGJkRUDw+Ls1RGJd6dnB811vOuOd+ 19 | QQc8lyyBZ1byARcxQ8lAtof6Mv7Yzebv1OxRr7NcrV/+ujnSFyJWKrJdcMx7+10= 20 | -----END CERTIFICATE----- 21 | -------------------------------------------------------------------------------- /examples/tls_server_example/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( 2 | . 3 | ) 4 | 5 | set(example_SRCS 6 | tls_server_example.c 7 | static_model.c 8 | ) 9 | 10 | IF(MSVC) 11 | set_source_files_properties(${example_SRCS} 12 | PROPERTIES LANGUAGE CXX) 13 | ENDIF(MSVC) 14 | 15 | configure_file(server_CA1_1.key server_CA1_1.key COPYONLY) 16 | configure_file(server_CA1_1.pem server_CA1_1.pem COPYONLY) 17 | configure_file(client_CA1_1.pem client_CA1_1.pem COPYONLY) 18 | configure_file(client_CA1_2.pem client_CA1_2.pem COPYONLY) 19 | configure_file(root_CA1.pem root_CA1.pem COPYONLY) 20 | 21 | add_executable(tls_server_example 22 | ${example_SRCS} 23 | ) 24 | 25 | target_link_libraries(tls_server_example 26 | iec61850 27 | ) 28 | -------------------------------------------------------------------------------- /examples/tls_server_example/Makefile: -------------------------------------------------------------------------------- 1 | LIBIEC_HOME=../.. 2 | 3 | PROJECT_BINARY_NAME = tls_server_example 4 | PROJECT_SOURCES = tls_server_example.c 5 | PROJECT_SOURCES += static_model.c 6 | 7 | PROJECT_ICD_FILE = simpleIO_direct_control.icd 8 | 9 | include $(LIBIEC_HOME)/make/target_system.mk 10 | include $(LIBIEC_HOME)/make/stack_includes.mk 11 | 12 | all: $(PROJECT_BINARY_NAME) 13 | 14 | include $(LIBIEC_HOME)/make/common_targets.mk 15 | 16 | LDLIBS += -lm 17 | 18 | model: $(PROJECT_ICD_FILE) 19 | java -jar $(LIBIEC_HOME)/tools/model_generator/genmodel.jar $(PROJECT_ICD_FILE) 20 | 21 | $(PROJECT_BINARY_NAME): $(PROJECT_SOURCES) $(LIB_NAME) 22 | $(CC) $(CFLAGS) $(LDFLAGS) -o $(PROJECT_BINARY_NAME) $(PROJECT_SOURCES) $(INCLUDES) $(LIB_NAME) $(LDLIBS) 23 | 24 | clean: 25 | rm -f $(PROJECT_BINARY_NAME) 26 | 27 | 28 | -------------------------------------------------------------------------------- /examples/tls_server_example/client_CA1_1.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIDWzCCAkMCFFTJkICEIidmnrisIFxZ99KKLhDFMA0GCSqGSIb3DQEBCwUAMGox 3 | CzAJBgNVBAYTAkRFMQswCQYDVQQIDAJCVzERMA8GA1UEBwwIRnJlaWJ1cmcxGzAZ 4 | BgNVBAoMEk1aIEF1dG9tYXRpb24gR21iSDEMMAoGA1UECwwDUiZEMRAwDgYDVQQD 5 | DAdyb290X0NBMB4XDTIyMDMxODA5MzMxOFoXDTIyMDQxNzA5MzMxOFowajELMAkG 6 | A1UEBhMCREUxCzAJBgNVBAgMAkJXMREwDwYDVQQHDAhGcmVpYnVyZzEbMBkGA1UE 7 | CgwSTVogQXV0b21hdGlvbiBHbWJIMQwwCgYDVQQLDANSJkQxEDAOBgNVBAMMB2Ns 8 | aWVudDEwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDY+5cw1Rg7jc1s 9 | S8GYQCu7+4vUl1TqAW6Ewou5k49o4aMaG2EmIM70CydQbMoCTeb1Bn9iEDNj0KIR 10 | 5iycZo94jQ4F2SBaanPmT0XD5upqqXFhBPIHDr3+RhvA3IyYaxvxepcpm+E9d0uh 11 | rGRWZL4AyXFVw3/tzaV1kZNMOuEG0md+48qsaYf1wWD5dW9SyQ9CxQjAm2fWw36e 12 | Jn76GS6ILOahngD6bvdAAKW11yvto20cmaFpT+nVuYsiFh9vEabK+bZ9onyG1i5p 13 | EGPoNxmrjgjIMbPYtOGZ1bOkhxhui8LMHZc+fbpvQFexcGk36m1/bGkAQNYN3NpH 14 | pengGAnBAgMBAAEwDQYJKoZIhvcNAQELBQADggEBADSnrKdPqeUr3F1MIk6P8SKo 15 | yR1VrPmNCljaC1i3realDlG+7jlPHfTCkwZwlEfKGa/yANJAw4hv+2tR5m4CsgMB 16 | x6FkKG9p6NTXyv4gXZeLa3ivqFqz7awTVMBf1C1VVeTi/H2kvHSBRmbj6Z5p7/MN 17 | 9E1t5NsgbKKfbj4hQD+f7r6zgFdgTK8C5OYT2ijYryFl1Qqrl5CYPpswm3vL0KkM 18 | e3RMOBqamkFqr4OCZw5juNpGrp3bK3dLF+N6Ceb+PGnS0YU29NpUXo64lzIxdwxs 19 | NDqbFMYXEXGKqUDVQAuj1374M85Cvqlso0Jenc+hWN2/kfAgHGE1Ne3sD9oJg5w= 20 | -----END CERTIFICATE----- 21 | -------------------------------------------------------------------------------- /examples/tls_server_example/client_CA1_2.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIDWzCCAkMCFFTJkICEIidmnrisIFxZ99KKLhDGMA0GCSqGSIb3DQEBCwUAMGox 3 | CzAJBgNVBAYTAkRFMQswCQYDVQQIDAJCVzERMA8GA1UEBwwIRnJlaWJ1cmcxGzAZ 4 | BgNVBAoMEk1aIEF1dG9tYXRpb24gR21iSDEMMAoGA1UECwwDUiZEMRAwDgYDVQQD 5 | DAdyb290X0NBMB4XDTIyMDMxODA5MzY0OVoXDTIyMDQxNzA5MzY0OVowajELMAkG 6 | A1UEBhMCREUxCzAJBgNVBAgMAkJXMREwDwYDVQQHDAhGcmVpYnVyZzEbMBkGA1UE 7 | CgwSTVogQXV0b21hdGlvbiBHbWJIMQwwCgYDVQQLDANSJkQxEDAOBgNVBAMMB2Ns 8 | aWVudDIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC8hnd/sd/nLJrN 9 | wfei5lphgS71fpP567xgkrGaEy0/lyISeuYK8nkrHI3T5cz0IHsVRGai0cQPdrP5 10 | 0Vdn7kj2rM/WzD7RzSRZIBydd4tnCZBz/bktTRtYNVve7+HaP9t4FxQdkMF4K3Jm 11 | E/j/gYSYimR49DFjXI2om9kXWZ6pdQUyaKUr+zxgmovtQjtc7wdTdKmsKFQxQQhd 12 | zWQajEpaNTL+JTJyrCZctryaILgYv4cvQbpF54zbcRsdoPRkP6azsR9GDhCYydwz 13 | UGMr2CZ2C4BRwB8ChswDsU6iww5enF2vWIUY36VvjmSDDrsH1w4V9UCkSjYMg0VQ 14 | Mmwc8kerAgMBAAEwDQYJKoZIhvcNAQELBQADggEBALYG8KSPm82uvgmeto76kL+N 15 | nUgV1ojxj+X9yBrbrkgo4rnsXFU1NUqncdCfpvA7u9mqAjZ4KN+ORZIUp1SXUl3Z 16 | TIpBClO5ML7wz1Iy6QrExeFwb2783Gl1jeq0lSQwWffNMwkPEqG1QYr/2IK9eSRJ 17 | hDrure/Ys3s5F7grQ6vTWBQrEXynd81YqqZuBFFs7FuLhg0GK/OdpJ5i2BsLS+B3 18 | nEOxmgxZ1qLSqbYDjhawsjiSItvO8XxZjA99n3MpBVharqqwp0Xpkm+X30rWolUp 19 | wur154X0dMZh8jF98KVrB/3Te9aidtyuO9EiGU2Qbkre7jK+Ol3nITR50Gy8yYU= 20 | -----END CERTIFICATE----- 21 | -------------------------------------------------------------------------------- /examples/tls_server_example/root_CA1.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIDtTCCAp2gAwIBAgIUJysTAOCqE3IaNO1QgtOPxMq6M8EwDQYJKoZIhvcNAQEL 3 | BQAwajELMAkGA1UEBhMCREUxCzAJBgNVBAgMAkJXMREwDwYDVQQHDAhGcmVpYnVy 4 | ZzEbMBkGA1UECgwSTVogQXV0b21hdGlvbiBHbWJIMQwwCgYDVQQLDANSJkQxEDAO 5 | BgNVBAMMB3Jvb3RfQ0EwHhcNMjIwMzE4MDkyNzEwWhcNMzIwMzE1MDkyNzEwWjBq 6 | MQswCQYDVQQGEwJERTELMAkGA1UECAwCQlcxETAPBgNVBAcMCEZyZWlidXJnMRsw 7 | GQYDVQQKDBJNWiBBdXRvbWF0aW9uIEdtYkgxDDAKBgNVBAsMA1ImRDEQMA4GA1UE 8 | AwwHcm9vdF9DQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOMyaDaT 9 | +a4DT0s2NCrjUN8coLPfFrLRdN0Gx0hRViuLUFxd001jXruRgXKt2g8lR+YnzUeA 10 | PQHbcIfRQhL+jy/ZMXpmz4Nrl7vyOWFdu8nBKU6c7y9LmSGbnOJZjDXwlX6ERwui 11 | qFzAvRA6YXbPN8gY0B3Ou+T/mjkWN9L1x+V+7bGs9rVIoM78fVyM2FERBfsBtT76 12 | QVQv3KZ+a9EOLxqcZ/nGqsFFysFOSkiRC6Cy4mC5CSik9S5D7X9lz/bdga7O+hqd 13 | SKfir6YMlQGV37JPqmz69N6vvb9UOX/G989T4qdVB/zQOvMdcIWXkqb3vSAXYi/c 14 | ClVS1Pymsy/MXQ0CAwEAAaNTMFEwHQYDVR0OBBYEFGYgIECdrhTsmgCKpVM0RHeC 15 | kFUmMB8GA1UdIwQYMBaAFGYgIECdrhTsmgCKpVM0RHeCkFUmMA8GA1UdEwEB/wQF 16 | MAMBAf8wDQYJKoZIhvcNAQELBQADggEBACsiuHFQjqOglenp/fcNbU034m/vvkyV 17 | SZXau9amXBWdeTEpc1HaPOYO7jFFnu/QoH6AbGZkpL0yWZJA2rf102AkOdAe6E0g 18 | 2H77/hHoHVCfxOiOl3+icsLXJ4VXqV2vmUOEVnWfHRtej4My6avT9uCNMO2bw9hm 19 | 56RAZrs82T9Mpg/1XQ9YUO1q4/JfP/+dCzPXAdwJ/h2cJ/q6Q9g1gRns8IzVlGOZ 20 | 0ZBQCLqLl8vUei+t6YgjyBbeNCz4CEcmXKIJeqMB1jhpsgr6BBMTNTU2Q60b9fzU 21 | OCGLw94EnKYtHWGy2WHMFNbwkNCR0/jwhxKkU0HXy1aNMUBWp99M7P8= 22 | -----END CERTIFICATE----- 23 | -------------------------------------------------------------------------------- /examples/tls_server_example/server_CA1_1.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIDWzCCAkMCFFTJkICEIidmnrisIFxZ99KKLhDIMA0GCSqGSIb3DQEBCwUAMGox 3 | CzAJBgNVBAYTAkRFMQswCQYDVQQIDAJCVzERMA8GA1UEBwwIRnJlaWJ1cmcxGzAZ 4 | BgNVBAoMEk1aIEF1dG9tYXRpb24gR21iSDEMMAoGA1UECwwDUiZEMRAwDgYDVQQD 5 | DAdyb290X0NBMB4XDTIyMDUyNjEwNDc0NFoXDTMwMDgxMjEwNDc0NFowajELMAkG 6 | A1UEBhMCREUxCzAJBgNVBAgMAkJXMREwDwYDVQQHDAhGcmVpYnVyZzEbMBkGA1UE 7 | CgwSTVogQXV0b21hdGlvbiBHbWJIMQwwCgYDVQQLDANSJkQxEDAOBgNVBAMMB3Nl 8 | cnZlcjEwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDYUV+nESoiZ3TU 9 | D1D5xxNEOuhWnPzjR6S1evjlXRFCSnPzNK4i/kZc+oFfBKApeyiOguQJgr5WaVfg 10 | ZDrFduUAoB39+VRL5ZWxSr2Qv1y53fR3BgqHZXj9Ob829SJmxhXdvn/xF9SljBU0 11 | Fb95Jxs1etUc2SIGtwgm2LGu4qzIf52tyQ/sriP4BmHjcsawro1j6ml/nAcFy0ZY 12 | U4IV0lKtptyTih6bzTsI4pf0+FN8Pzs6eMFByp0eS6zxZk/9IadlX7pzWTRI3g7Q 13 | TgxqGlaSvwPZmOxuEYUhbwBTg12huyiEKVYBnQwNHU3iijSyPgeBjaEZHYBtH/lj 14 | YsfiRFylAgMBAAEwDQYJKoZIhvcNAQELBQADggEBANPRnvfByVoKwfMcQYUnYT6l 15 | 5OhYt8f2tQfoa0EXirP0O2xG052ZBl3Z5ZzBCcsq1zveaPoeqXFl6HjqIqURB5NS 16 | imJIi7kB7o6C2z19yxOndPm3urKGyfvxtSy2iyzTMZ8eL8RFMJC5DVV+n5Y+1EgC 17 | pYIu//I0ojnFOemEJXVjfxQhiUbx6Nw8HalHOhW1i017XcOWMKji/lwHfWF2PFmn 18 | pIWZCFPCUtHzBUkXCRzn9ESeMDcMXN6qLb2wGJkRUDw+Ls1RGJd6dnB811vOuOd+ 19 | QQc8lyyBZ1byARcxQ8lAtof6Mv7Yzebv1OxRr7NcrV/+ujnSFyJWKrJdcMx7+10= 20 | -----END CERTIFICATE----- 21 | -------------------------------------------------------------------------------- /fuzz/fuzz_goose_subscriber.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #include "goose_receiver.h" 5 | #include "goose_subscriber.h" 6 | #include "hal_thread.h" 7 | 8 | static void 9 | test_GooseSubscriberWithFixedLengthEncoding_gooseListener(GooseSubscriber subscriber, void* parameter) 10 | { 11 | } 12 | 13 | int LLVMFuzzerTestOneInput(const char* data, size_t size) 14 | { 15 | GooseReceiver receiver = GooseReceiver_create(); 16 | 17 | GooseSubscriber subscriber = GooseSubscriber_create("KEMASIMLD1/LLN0$GO$PingPRVDO", NULL); 18 | 19 | uint8_t dstMac[6] = {0x01,0x0c,0xcd,0x01,0x00,0xee}; 20 | GooseSubscriber_setDstMac(subscriber, dstMac); 21 | GooseSubscriber_setAppId(subscriber, 4656); 22 | 23 | GooseSubscriber_setListener(subscriber, test_GooseSubscriberWithFixedLengthEncoding_gooseListener, NULL); 24 | 25 | GooseReceiver_addSubscriber(receiver, subscriber); 26 | 27 | GooseReceiver_startThreadless(receiver); 28 | 29 | GooseReceiver_handleMessage(receiver, data, size); 30 | 31 | GooseReceiver_stop(receiver); 32 | 33 | GooseReceiver_destroy(receiver); 34 | } -------------------------------------------------------------------------------- /fuzz/fuzz_mms_decode.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #include "iec61850_server.h" 5 | #include "hal_thread.h" 6 | 7 | int LLVMFuzzerTestOneInput(const char *data, size_t size) { 8 | int out; 9 | MmsValue* value = NULL; 10 | value = MmsValue_decodeMmsData(data, 0, size, &out); 11 | 12 | if (value != NULL) { 13 | MmsValue_delete(value); 14 | } 15 | 16 | return 0; 17 | } 18 | -------------------------------------------------------------------------------- /fuzz/fuzz_pres_userdata.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #include "iec61850_server.h" 5 | #include "iso_presentation.h" 6 | 7 | int LLVMFuzzerTestOneInput(const char *data, size_t size) { 8 | IsoPresentation pres; 9 | 10 | ByteBuffer byteBuffer; 11 | byteBuffer.buffer = (uint8_t*) data; 12 | byteBuffer.maxSize = size; 13 | byteBuffer.size = size; 14 | 15 | int res = IsoPresentation_parseAcceptMessage(&pres, &byteBuffer); 16 | 17 | return 0; 18 | } 19 | -------------------------------------------------------------------------------- /hal/inc/hal_base.h: -------------------------------------------------------------------------------- 1 | /* 2 | * hal_base.h 3 | * 4 | * Copyright 2013-2021 Michael Zillgith 5 | * 6 | * This file is part of Platform Abstraction Layer (libpal) 7 | * for libiec61850, libmms, and lib60870. 8 | */ 9 | 10 | #ifndef HAL_INC_HAL_BASE_H_ 11 | #define HAL_INC_HAL_BASE_H_ 12 | 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | 19 | #ifdef __GNUC__ 20 | #define ATTRIBUTE_PACKED __attribute__ ((__packed__)) 21 | #else 22 | #define ATTRIBUTE_PACKED 23 | #endif 24 | 25 | #ifndef DEPRECATED 26 | #if defined(__GNUC__) || defined(__clang__) 27 | #define DEPRECATED __attribute__((deprecated)) 28 | #else 29 | #define DEPRECATED 30 | #endif 31 | #endif 32 | 33 | #if defined _WIN32 || defined __CYGWIN__ 34 | #ifdef EXPORT_FUNCTIONS_FOR_DLL 35 | #define PAL_API __declspec(dllexport) 36 | #else 37 | #define PAL_API 38 | #endif 39 | 40 | #define PAL_INTERNAL 41 | #else 42 | #if __GNUC__ >= 4 43 | #define PAL_API __attribute__ ((visibility ("default"))) 44 | #define PAL_INTERNAL __attribute__ ((visibility ("hidden"))) 45 | #else 46 | #define PAL_API 47 | #define PAL_INTERNAL 48 | #endif 49 | #endif 50 | 51 | #endif /* HAL_INC_HAL_BASE_H_ */ 52 | -------------------------------------------------------------------------------- /hal/inc/lib_memory.h: -------------------------------------------------------------------------------- 1 | /* 2 | * lib_memory.h 3 | * 4 | * Copyright 2014-2021 Michael Zillgith 5 | * 6 | * This file is part of Platform Abstraction Layer (libpal) 7 | * for libiec61850, libmms, and lib60870. 8 | */ 9 | 10 | #ifndef MEMORY_H_ 11 | #define MEMORY_H_ 12 | 13 | #include "hal_base.h" 14 | 15 | #define CALLOC(nmemb, size) Memory_calloc(nmemb, size) 16 | #define MALLOC(size) Memory_malloc(size) 17 | #define REALLOC(oldptr, size) Memory_realloc(oldptr, size) 18 | #define FREEMEM(ptr) Memory_free(ptr) 19 | 20 | #define GLOBAL_CALLOC(nmemb, size) Memory_calloc(nmemb, size) 21 | #define GLOBAL_MALLOC(size) Memory_malloc(size) 22 | #define GLOBAL_REALLOC(oldptr, size) Memory_realloc(oldptr, size) 23 | #define GLOBAL_FREEMEM(ptr) Memory_free(ptr) 24 | 25 | #ifdef __cplusplus 26 | extern "C" { 27 | #endif 28 | 29 | #include 30 | 31 | typedef void 32 | (*MemoryExceptionHandler) (void* parameter); 33 | 34 | PAL_API void 35 | Memory_installExceptionHandler(MemoryExceptionHandler handler, void* parameter); 36 | 37 | PAL_API void* 38 | Memory_malloc(size_t size); 39 | 40 | PAL_API void* 41 | Memory_calloc(size_t nmemb, size_t size); 42 | 43 | PAL_API void * 44 | Memory_realloc(void *ptr, size_t size); 45 | 46 | PAL_API void 47 | Memory_free(void* memb); 48 | 49 | #ifdef __cplusplus 50 | } 51 | #endif 52 | 53 | #endif /* MEMORY_H_ */ 54 | -------------------------------------------------------------------------------- /hal/inc/platform_endian.h: -------------------------------------------------------------------------------- 1 | /* 2 | * platform_endian.h 3 | * 4 | * Copyright 2013-2021 Michael Zillgith 5 | * 6 | * This file is part of Platform Abstraction Layer (libpal) 7 | * for libiec61850, libmms, and lib60870. 8 | */ 9 | 10 | #ifndef ENDIAN_H_ 11 | #define ENDIAN_H_ 12 | 13 | #ifndef PLATFORM_IS_BIGENDIAN 14 | #ifdef __GNUC__ 15 | #ifdef __BYTE_ORDER__ 16 | #if (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__) 17 | #define PLATFORM_IS_BIGENDIAN 1 18 | #endif 19 | 20 | #else 21 | 22 | /* older versions of GCC have __BYTE_ORDER__ not defined! */ 23 | #ifdef __PPC__ 24 | #define PLATFORM_IS_BIGENDIAN 1 25 | #endif 26 | 27 | #endif /* __BYTE_ORDER__ */ 28 | #endif /* __GNUC__ */ 29 | #endif 30 | 31 | #if (PLATFORM_IS_BIGENDIAN == 1) 32 | # define ORDER_LITTLE_ENDIAN 0 33 | #else 34 | # define ORDER_LITTLE_ENDIAN 1 35 | #endif 36 | 37 | #endif /* ENDIAN_H_ */ 38 | -------------------------------------------------------------------------------- /hal/memory/lib_memory.c: -------------------------------------------------------------------------------- 1 | /* 2 | * lib_memory.c 3 | * 4 | * Copyright 2014-2021 Michael Zillgith 5 | * 6 | * This file is part of Platform Abstraction Layer (libpal) 7 | * for libiec61850, libmms, and lib60870. 8 | */ 9 | 10 | #include 11 | #include "lib_memory.h" 12 | 13 | static MemoryExceptionHandler exceptionHandler = NULL; 14 | static void* exceptionHandlerParameter = NULL; 15 | 16 | static void 17 | noMemoryAvailableHandler(void) 18 | { 19 | if (exceptionHandler != NULL) 20 | exceptionHandler(exceptionHandlerParameter); 21 | } 22 | 23 | void 24 | Memory_installExceptionHandler(MemoryExceptionHandler handler, void* parameter) 25 | { 26 | exceptionHandler = handler; 27 | exceptionHandlerParameter = parameter; 28 | } 29 | 30 | void* 31 | Memory_malloc(size_t size) 32 | { 33 | void* memory = malloc(size); 34 | 35 | if (memory == NULL) 36 | noMemoryAvailableHandler(); 37 | 38 | return memory; 39 | } 40 | 41 | void* 42 | Memory_calloc(size_t nmemb, size_t size) 43 | { 44 | void* memory = calloc(nmemb, size); 45 | 46 | if (memory == NULL) 47 | noMemoryAvailableHandler(); 48 | 49 | return memory; 50 | } 51 | 52 | void * 53 | Memory_realloc(void *ptr, size_t size) 54 | { 55 | void* memory = realloc(ptr, size); 56 | 57 | if (memory == NULL) 58 | noMemoryAvailableHandler(); 59 | 60 | return memory; 61 | } 62 | 63 | void 64 | Memory_free(void* memb) 65 | { 66 | free(memb); 67 | } 68 | -------------------------------------------------------------------------------- /hal/time/unix/time.c: -------------------------------------------------------------------------------- 1 | /* 2 | * time.c 3 | * 4 | * Copyright 2013-2021 Michael Zillgith 5 | * 6 | * This file is part of Platform Abstraction Layer (libpal) 7 | * for libiec61850, libmms, and lib60870. 8 | */ 9 | 10 | #include "hal_time.h" 11 | #include 12 | 13 | #ifdef CONFIG_SYSTEM_HAS_CLOCK_GETTIME 14 | uint64_t 15 | Hal_getTimeInMs() 16 | { 17 | struct timespec tp; 18 | 19 | clock_gettime(CLOCK_REALTIME, &tp); 20 | 21 | return ((uint64_t) tp.tv_sec) * 1000LL + (tp.tv_nsec / 1000000); 22 | } 23 | #else 24 | 25 | #include 26 | 27 | msSinceEpoch 28 | Hal_getTimeInMs() 29 | { 30 | struct timeval now; 31 | 32 | gettimeofday(&now, NULL); 33 | 34 | return ((uint64_t) now.tv_sec * 1000LL) + (now.tv_usec / 1000); 35 | } 36 | 37 | nsSinceEpoch 38 | Hal_getTimeInNs() 39 | { 40 | struct timespec now; 41 | 42 | clock_gettime(CLOCK_REALTIME, &now); 43 | 44 | nsSinceEpoch nsTime = now.tv_sec * 1000000000UL; 45 | nsTime += now.tv_nsec; 46 | 47 | return nsTime; 48 | } 49 | 50 | bool 51 | Hal_setTimeInNs(nsSinceEpoch nsTime) 52 | { 53 | struct timespec tv; 54 | 55 | tv.tv_sec = nsTime / 1000000000UL; 56 | tv.tv_nsec = nsTime % 1000000000UL; 57 | 58 | if (clock_settime(CLOCK_REALTIME, &tv) < 0) { 59 | return false; 60 | } 61 | 62 | return true; 63 | } 64 | 65 | 66 | #endif 67 | 68 | -------------------------------------------------------------------------------- /hal/time/win32/time.c: -------------------------------------------------------------------------------- 1 | /* 2 | * time.c 3 | * 4 | * Copyright 2013-2021 Michael Zillgith 5 | * 6 | * This file is part of Platform Abstraction Layer (libpal) 7 | * for libiec61850, libmms, and lib60870. 8 | */ 9 | 10 | #include "hal_time.h" 11 | #include 12 | #include 13 | 14 | uint64_t 15 | Hal_getTimeInMs() 16 | { 17 | FILETIME ft; 18 | uint64_t now; 19 | 20 | static const uint64_t DIFF_TO_UNIXTIME = 11644473600000ULL; 21 | 22 | GetSystemTimeAsFileTime(&ft); 23 | 24 | now = (LONGLONG)ft.dwLowDateTime + ((LONGLONG)(ft.dwHighDateTime) << 32LL); 25 | 26 | return (now / 10000LL) - DIFF_TO_UNIXTIME; 27 | } 28 | 29 | nsSinceEpoch 30 | Hal_getTimeInNs() 31 | { 32 | FILETIME ft; 33 | 34 | static const uint64_t DIFF_TO_UNIXTIME = 11644473600000000000ULL; 35 | 36 | GetSystemTimeAsFileTime(&ft); 37 | 38 | nsSinceEpoch nsTime = (LONGLONG)ft.dwLowDateTime + ((LONGLONG)(ft.dwHighDateTime) << 32LL); 39 | 40 | nsTime = nsTime * 100LL - DIFF_TO_UNIXTIME; 41 | 42 | return nsTime; 43 | } 44 | 45 | bool 46 | Hal_setTimeInNs(nsSinceEpoch nsTime) 47 | { 48 | uint64_t t = (nsTime / 100ULL) + 116444736000000000ULL; 49 | 50 | FILETIME ft; 51 | 52 | ft.dwLowDateTime = (uint32_t)(t & 0xffffffff); 53 | ft.dwHighDateTime = (uint32_t)(t >> 32); 54 | 55 | SYSTEMTIME st; 56 | 57 | FileTimeToSystemTime(&ft, &st); 58 | 59 | return SetSystemTime(&st); 60 | } 61 | 62 | -------------------------------------------------------------------------------- /make/common_targets.mk: -------------------------------------------------------------------------------- 1 | $(LIB_NAME): 2 | cd $(LIBIEC_HOME); $(MAKE) -f Makefile 3 | 4 | lib: $(LIB_NAME) 5 | 6 | libclean: clean 7 | cd $(LIBIEC_HOME); $(MAKE) -f Makefile clean 8 | -------------------------------------------------------------------------------- /make/stack_includes.mk: -------------------------------------------------------------------------------- 1 | INCLUDES = -I$(LIBIEC_HOME)/config 2 | INCLUDES += -I$(LIBIEC_HOME)/hal/inc 3 | INCLUDES += -I$(LIBIEC_HOME)/src/common/inc 4 | INCLUDES += -I$(LIBIEC_HOME)/src/mms/inc 5 | INCLUDES += -I$(LIBIEC_HOME)/src/mms/inc_private 6 | INCLUDES += -I$(LIBIEC_HOME)/src/mms/asn1 7 | INCLUDES += -I$(LIBIEC_HOME)/src/iec61850/inc 8 | INCLUDES += -I$(LIBIEC_HOME)/src/iec61850/inc_private 9 | INCLUDES += -I$(LIBIEC_HOME)/src/goose 10 | INCLUDES += -I$(LIBIEC_HOME)/src/sampled_values 11 | INCLUDES += -I$(LIBIEC_HOME)/src/logging 12 | INCLUDES += -I$(LIBIEC_HOME)/src/tls 13 | INCLUDES += -I$(LIBIEC_HOME)/src/r_session 14 | -------------------------------------------------------------------------------- /pyiec61850/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.12) 2 | 3 | cmake_policy(SET CMP0078 NEW) 4 | 5 | if (${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.14.0") 6 | cmake_policy(SET CMP0086 NEW) 7 | endif() 8 | 9 | find_package(SWIG REQUIRED) 10 | include(${SWIG_USE_FILE}) 11 | 12 | find_package(Python COMPONENTS Interpreter Development REQUIRED) 13 | 14 | include_directories(${Python_INCLUDE_DIRS}) 15 | include_directories(${CMAKE_CURRENT_SOURCE_DIR}) 16 | 17 | set(CMAKE_SWIG_FLAGS "") 18 | set_property(SOURCE iec61850.i PROPERTY CPLUSPLUS ON) 19 | set_property(SOURCE iec61850.i PROPERTY SWIG_MODULE_NAME pyiec61850) 20 | 21 | if(WIN32) 22 | set(LIBS iec61850 ws2_32) 23 | else() 24 | set(LIBS iec61850-shared) 25 | endif() 26 | 27 | swig_add_library(pyiec61850 28 | LANGUAGE python 29 | SOURCES iec61850.i 30 | ) 31 | 32 | swig_link_libraries(pyiec61850 ${LIBS}) 33 | 34 | # Finding python modules install path 35 | execute_process( 36 | COMMAND ${Python_EXECUTABLE} -c 37 | "from sysconfig import get_path; import sys; sys.stdout.write(get_path('platlib'))" 38 | OUTPUT_VARIABLE PYTHON_SITE_DIR 39 | ) 40 | 41 | install(FILES ${CMAKE_CURRENT_BINARY_DIR}/pyiec61850.py DESTINATION ${PYTHON_SITE_DIR}) 42 | install(TARGETS pyiec61850 LIBRARY DESTINATION ${PYTHON_SITE_DIR}) 43 | 44 | add_test(test_pyiec61850 ${Python_EXECUTABLE} ${CMAKE_CURRENT_LIST_DIR}/test_pyiec61850.py) 45 | -------------------------------------------------------------------------------- /src/common/inc/libiec61850_common_api.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libiec61850_common_api.h 3 | */ 4 | 5 | #ifndef LIBIEC61850_COMMON_API_INCLUDES_H_ 6 | #define LIBIEC61850_COMMON_API_INCLUDES_H_ 7 | 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | 14 | #ifdef __GNUC__ 15 | #define ATTRIBUTE_PACKED __attribute__ ((__packed__)) 16 | #else 17 | #define ATTRIBUTE_PACKED 18 | #endif 19 | 20 | #ifndef DEPRECATED 21 | #if defined(__GNUC__) || defined(__clang__) 22 | #define DEPRECATED __attribute__((deprecated)) 23 | #else 24 | #define DEPRECATED 25 | #endif 26 | #endif 27 | 28 | #if defined _WIN32 || defined __CYGWIN__ 29 | #ifdef EXPORT_FUNCTIONS_FOR_DLL 30 | #define LIB61850_API __declspec(dllexport) 31 | #else 32 | #define LIB61850_API 33 | #endif 34 | 35 | #define LIB61850_INTERNAL 36 | #else 37 | #if __GNUC__ >= 4 38 | #define LIB61850_API __attribute__ ((visibility ("default"))) 39 | #define LIB61850_INTERNAL __attribute__ ((visibility ("hidden"))) 40 | #else 41 | #define LIB61850_API 42 | #define LIB61850_INTERNAL 43 | #endif 44 | #endif 45 | 46 | #include "hal_time.h" 47 | #include "mms_value.h" 48 | 49 | #endif /* LIBIEC61850_COMMON_API_INCLUDES_H_ */ 50 | -------------------------------------------------------------------------------- /src/common/inc/libiec61850_platform_includes.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libiec61850_platform_includes.h 3 | */ 4 | 5 | #ifndef LIBIEC61850_PLATFORM_INCLUDES_H_ 6 | #define LIBIEC61850_PLATFORM_INCLUDES_H_ 7 | 8 | #include "stack_config.h" 9 | 10 | #include "libiec61850_common_api.h" 11 | 12 | #include "string_utilities.h" 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "platform_endian.h" 19 | 20 | #define LIBIEC61850_VERSION "1.6.0" 21 | 22 | #ifndef CONFIG_DEFAULT_MMS_VENDOR_NAME 23 | #define CONFIG_DEFAULT_MMS_VENDOR_NAME "libiec61850.com" 24 | #endif 25 | 26 | #ifndef CONFIG_DEFAULT_MMS_MODEL_NAME 27 | #define CONFIG_DEFAULT_MMS_MODEL_NAME "LIBIEC61850" 28 | #endif 29 | 30 | #ifndef CONFIG_DEFAULT_MMS_REVISION 31 | #define CONFIG_DEFAULT_MMS_REVISION LIBIEC61850_VERSION 32 | #endif 33 | 34 | #ifndef CONFIG_IEC61850_SAMPLED_VALUES_SUPPORT 35 | #define CONFIG_IEC61850_SAMPLED_VALUES_SUPPORT 0 36 | #endif 37 | 38 | #if (DEBUG != 1) 39 | #define NDEBUG 1 40 | #endif 41 | 42 | #include 43 | 44 | #include "lib_memory.h" 45 | 46 | #endif /* LIBIEC61850_PLATFORM_INCLUDES_H_ */ 47 | -------------------------------------------------------------------------------- /src/common/inc/simple_allocator.h: -------------------------------------------------------------------------------- 1 | /* 2 | * simple_allocator.h 3 | * 4 | * Copyright 2013-2018 Michael Zillgith 5 | * 6 | * This file is part of libIEC61850. 7 | * 8 | * libIEC61850 is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * libIEC61850 is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with libIEC61850. If not, see . 20 | * 21 | * See COPYING file for the complete license text. 22 | */ 23 | 24 | #ifndef SIMPLE_ALLOCATOR_H_ 25 | #define SIMPLE_ALLOCATOR_H_ 26 | 27 | typedef struct { 28 | char* memoryBlock; 29 | char* currentPtr; 30 | int size; 31 | } MemoryAllocator; 32 | 33 | LIB61850_INTERNAL void 34 | MemoryAllocator_init(MemoryAllocator* self, char* memoryBlock, int size); 35 | 36 | LIB61850_INTERNAL int 37 | MemoryAllocator_getAlignedSize(int size); 38 | 39 | LIB61850_INTERNAL char* 40 | MemoryAllocator_allocate(MemoryAllocator* self, int size); 41 | 42 | #endif /* SIMPLE_ALLOCATOR_H_ */ 43 | -------------------------------------------------------------------------------- /src/common/inc/string_map.h: -------------------------------------------------------------------------------- 1 | /* 2 | * string_map.h 3 | * 4 | * Copyright 2013 Michael Zillgith 5 | * 6 | * This file is part of libIEC61850. 7 | * 8 | * libIEC61850 is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * libIEC61850 is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with libIEC61850. If not, see . 20 | * 21 | * See COPYING file for the complete license text. 22 | */ 23 | 24 | #include "map.h" 25 | 26 | LIB61850_INTERNAL Map 27 | StringMap_create(void); 28 | 29 | -------------------------------------------------------------------------------- /src/common/string_map.c: -------------------------------------------------------------------------------- 1 | /* 2 | * string_map.c 3 | * 4 | * Copyright 2013 Michael Zillgith 5 | * 6 | * This file is part of libIEC61850. 7 | * 8 | * libIEC61850 is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * libIEC61850 is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with libIEC61850. If not, see . 20 | * 21 | * See COPYING file for the complete license text. 22 | */ 23 | 24 | #include "libiec61850_platform_includes.h" 25 | #include "string_map.h" 26 | 27 | Map 28 | StringMap_create() { 29 | Map map = Map_create(); 30 | map->compareKeys = (int (*) (void*, void*)) strcmp; 31 | return map; 32 | } 33 | -------------------------------------------------------------------------------- /src/doxygen/footer.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 12 | 13 | 14 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/doxygen/libIEC61850_server.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mz-automation/libiec61850/3a1480e5948ca53b4dcc5fa15b05598fa3322bb9/src/doxygen/libIEC61850_server.png -------------------------------------------------------------------------------- /src/doxygen/mainpage_net.md: -------------------------------------------------------------------------------- 1 | # API Documentation 2 | 3 | Copyright 2022 Michael Zillgith 4 | 5 | This is the documentation for IEC61850.NET a .NET wrapper for the libiec61850 IEC 61850 protocol library. 6 | 7 | ##Building the library and the .NET wrapper 8 | 9 | ### Build the library (native DLL or .so file) 10 | 11 | *CMake is required* 12 | 13 | Example on linux: 14 | 15 | 1) create a build folder 16 | 17 | mkdir build 18 | 19 | 2) configure and create the makefiles 20 | 21 | ``` 22 | cd build 23 | cmake .. 24 | ``` 25 | 26 | 3) Build the library 27 | 28 | ``` 29 | make 30 | ``` 31 | 32 | Example for Visual Studio 2015 (see cmake --help for other "generator" options) 33 | 34 | 3a) For 32 bit build 35 | 36 | ``` 37 | cd build 38 | cmake -G "Visual Studio 14 2015" .. 39 | ``` 40 | 41 | 3b) For 64 bit build 42 | 43 | ``` 44 | cd build 45 | cmake -G "Visual Studio 14 2015 Win64" .. 46 | ``` 47 | 48 | 4) Installing the native DLL/shared library 49 | 50 | Put the library in a folder where the OS can find it: 51 | 52 | e.g /usr/lib for Linux or C:/Windows/System32 for Windows. 53 | 54 | ### Build the .NET wrapper: 55 | 56 | 57 | Open the dotnet.sln solution file in the dotnet folder with Visual Studio or MonoDevelop. 58 | 59 | You can build all the targets there or only the IEC61850.NET project. 60 | -------------------------------------------------------------------------------- /src/doxygen/mz-automation.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mz-automation/libiec61850/3a1480e5948ca53b4dcc5fa15b05598fa3322bb9/src/doxygen/mz-automation.ico -------------------------------------------------------------------------------- /src/libiec61850.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@CMAKE_INSTALL_PREFIX@ 2 | exec_prefix=@CMAKE_INSTALL_PREFIX@/bin 3 | libdir=@CMAKE_INSTALL_PREFIX@/lib 4 | sharedlibdir=@CMAKE_INSTALL_PREFIX@/lib 5 | includedir=@CMAKE_INSTALL_PREFIX@/include 6 | 7 | Name: @PROJECT_NAME@ 8 | Description: @CPACK_PACKAGE_DESCRIPTION@ 9 | Version: @LIB_VERSION_MAJOR@.@LIB_VERSION_MINOR@.@LIB_VERSION_PATCH@ 10 | 11 | Requires: 12 | Libs: -L${libdir} -L${sharedlibdir} -liec61850 13 | Cflags: -I${includedir} 14 | -------------------------------------------------------------------------------- /src/logging/drivers/README: -------------------------------------------------------------------------------- 1 | This directory contains the log driver implementation that implements the logging API. The logging API is a service provider interface that has to be implemented by the log driver. 2 | An application can use different log drivers at the same time. 3 | Each log driver provides a public constructor for the driver specific implementation of the LogStorage class. The constructor has to fill the virtual function table of the LogStorage instance with its own implementation functions. 4 | -------------------------------------------------------------------------------- /src/mms/iso_mms/asn1c/Address.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by asn1c-0.9.21 (http://lionet.info/asn1c) 3 | * From ASN.1 module "MMS" 4 | * found in "../mms-extended.asn" 5 | * `asn1c -fskeletons-copy` 6 | */ 7 | 8 | #ifndef _Address_H_ 9 | #define _Address_H_ 10 | 11 | 12 | #include 13 | 14 | /* Including external dependencies */ 15 | #include "Unsigned32.h" 16 | #include 17 | #include 18 | #include 19 | 20 | #ifdef __cplusplus 21 | extern "C" { 22 | #endif 23 | 24 | /* Dependencies */ 25 | typedef enum Address_PR { 26 | Address_PR_NOTHING, /* No components present */ 27 | Address_PR_numericAddress, 28 | Address_PR_symbolicAddress, 29 | Address_PR_unconstrainedAddress 30 | } Address_PR; 31 | 32 | /* Address */ 33 | typedef struct Address { 34 | Address_PR present; 35 | union Address_u { 36 | Unsigned32_t numericAddress; 37 | VisibleString_t symbolicAddress; 38 | OCTET_STRING_t unconstrainedAddress; 39 | } choice; 40 | 41 | /* Context for parsing across buffer boundaries */ 42 | asn_struct_ctx_t _asn_ctx; 43 | } Address_t; 44 | 45 | /* Implementation */ 46 | LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_Address; 47 | 48 | #ifdef __cplusplus 49 | } 50 | #endif 51 | 52 | #endif /* _Address_H_ */ 53 | -------------------------------------------------------------------------------- /src/mms/iso_mms/asn1c/BIT_STRING.h: -------------------------------------------------------------------------------- 1 | /*- 2 | * Copyright (c) 2003 Lev Walkin . All rights reserved. 3 | * Redistribution and modifications are permitted subject to BSD license. 4 | */ 5 | #ifndef _BIT_STRING_H_ 6 | #define _BIT_STRING_H_ 7 | 8 | #include /* Some help from OCTET STRING */ 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | typedef struct BIT_STRING_s { 15 | uint8_t *buf; /* BIT STRING body */ 16 | int size; /* Size of the above buffer */ 17 | 18 | int bits_unused;/* Unused trailing bits in the last octet (0..7) */ 19 | 20 | asn_struct_ctx_t _asn_ctx; /* Parsing across buffer boundaries */ 21 | } BIT_STRING_t; 22 | 23 | LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_BIT_STRING; 24 | 25 | LIB61850_INTERNAL asn_struct_print_f BIT_STRING_print; /* Human-readable output */ 26 | LIB61850_INTERNAL asn_constr_check_f BIT_STRING_constraint; 27 | LIB61850_INTERNAL xer_type_encoder_f BIT_STRING_encode_xer; 28 | 29 | #ifdef __cplusplus 30 | } 31 | #endif 32 | 33 | #endif /* _BIT_STRING_H_ */ 34 | -------------------------------------------------------------------------------- /src/mms/iso_mms/asn1c/BOOLEAN.h: -------------------------------------------------------------------------------- 1 | /*- 2 | * Copyright (c) 2003 Lev Walkin . All rights reserved. 3 | * Redistribution and modifications are permitted subject to BSD license. 4 | */ 5 | #ifndef _BOOLEAN_H_ 6 | #define _BOOLEAN_H_ 7 | 8 | #include 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | /* 15 | * The underlying integer may contain various values, but everything 16 | * non-zero is capped to 0xff by the DER encoder. The BER decoder may 17 | * yield non-zero values different from 1, beware. 18 | */ 19 | typedef int BOOLEAN_t; 20 | 21 | extern asn_TYPE_descriptor_t asn_DEF_BOOLEAN; 22 | 23 | LIB61850_INTERNAL asn_struct_free_f BOOLEAN_free; 24 | LIB61850_INTERNAL asn_struct_print_f BOOLEAN_print; 25 | LIB61850_INTERNAL ber_type_decoder_f BOOLEAN_decode_ber; 26 | LIB61850_INTERNAL der_type_encoder_f BOOLEAN_encode_der; 27 | LIB61850_INTERNAL xer_type_decoder_f BOOLEAN_decode_xer; 28 | LIB61850_INTERNAL xer_type_encoder_f BOOLEAN_encode_xer; 29 | LIB61850_INTERNAL per_type_decoder_f BOOLEAN_decode_uper; 30 | LIB61850_INTERNAL per_type_encoder_f BOOLEAN_encode_uper; 31 | 32 | #ifdef __cplusplus 33 | } 34 | #endif 35 | 36 | #endif /* _BOOLEAN_H_ */ 37 | -------------------------------------------------------------------------------- /src/mms/iso_mms/asn1c/ConcludeRequestPDU.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by asn1c-0.9.21 (http://lionet.info/asn1c) 3 | * From ASN.1 module "MMS" 4 | * found in "../mms-extended.asn" 5 | * `asn1c -fskeletons-copy` 6 | */ 7 | 8 | #ifndef _ConcludeRequestPDU_H_ 9 | #define _ConcludeRequestPDU_H_ 10 | 11 | 12 | #include 13 | 14 | /* Including external dependencies */ 15 | #include 16 | 17 | #ifdef __cplusplus 18 | extern "C" { 19 | #endif 20 | 21 | /* ConcludeRequestPDU */ 22 | typedef NULL_t ConcludeRequestPDU_t; 23 | 24 | /* Implementation */ 25 | LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_ConcludeRequestPDU; 26 | LIB61850_INTERNAL asn_struct_free_f ConcludeRequestPDU_free; 27 | LIB61850_INTERNAL asn_struct_print_f ConcludeRequestPDU_print; 28 | LIB61850_INTERNAL asn_constr_check_f ConcludeRequestPDU_constraint; 29 | LIB61850_INTERNAL ber_type_decoder_f ConcludeRequestPDU_decode_ber; 30 | LIB61850_INTERNAL der_type_encoder_f ConcludeRequestPDU_encode_der; 31 | LIB61850_INTERNAL xer_type_decoder_f ConcludeRequestPDU_decode_xer; 32 | LIB61850_INTERNAL xer_type_encoder_f ConcludeRequestPDU_encode_xer; 33 | 34 | #ifdef __cplusplus 35 | } 36 | #endif 37 | 38 | #endif /* _ConcludeRequestPDU_H_ */ 39 | -------------------------------------------------------------------------------- /src/mms/iso_mms/asn1c/ConcludeResponsePDU.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by asn1c-0.9.21 (http://lionet.info/asn1c) 3 | * From ASN.1 module "MMS" 4 | * found in "../mms-extended.asn" 5 | * `asn1c -fskeletons-copy` 6 | */ 7 | 8 | #ifndef _ConcludeResponsePDU_H_ 9 | #define _ConcludeResponsePDU_H_ 10 | 11 | 12 | #include 13 | 14 | /* Including external dependencies */ 15 | #include 16 | 17 | #ifdef __cplusplus 18 | extern "C" { 19 | #endif 20 | 21 | /* ConcludeResponsePDU */ 22 | typedef NULL_t ConcludeResponsePDU_t; 23 | 24 | /* Implementation */ 25 | LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_ConcludeResponsePDU; 26 | LIB61850_INTERNAL asn_struct_free_f ConcludeResponsePDU_free; 27 | LIB61850_INTERNAL asn_struct_print_f ConcludeResponsePDU_print; 28 | LIB61850_INTERNAL asn_constr_check_f ConcludeResponsePDU_constraint; 29 | LIB61850_INTERNAL ber_type_decoder_f ConcludeResponsePDU_decode_ber; 30 | LIB61850_INTERNAL der_type_encoder_f ConcludeResponsePDU_encode_der; 31 | LIB61850_INTERNAL xer_type_decoder_f ConcludeResponsePDU_decode_xer; 32 | LIB61850_INTERNAL xer_type_encoder_f ConcludeResponsePDU_encode_xer; 33 | 34 | #ifdef __cplusplus 35 | } 36 | #endif 37 | 38 | #endif /* _ConcludeResponsePDU_H_ */ 39 | -------------------------------------------------------------------------------- /src/mms/iso_mms/asn1c/ConfirmedErrorPDU.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by asn1c-0.9.21 (http://lionet.info/asn1c) 3 | * From ASN.1 module "MMS" 4 | * found in "../mms-extended.asn" 5 | * `asn1c -fskeletons-copy` 6 | */ 7 | 8 | #ifndef _ConfirmedErrorPDU_H_ 9 | #define _ConfirmedErrorPDU_H_ 10 | 11 | 12 | #include 13 | 14 | /* Including external dependencies */ 15 | #include "Unsigned32.h" 16 | #include "ServiceError.h" 17 | #include 18 | 19 | #ifdef __cplusplus 20 | extern "C" { 21 | #endif 22 | 23 | /* ConfirmedErrorPDU */ 24 | typedef struct ConfirmedErrorPDU { 25 | Unsigned32_t invokeID; 26 | ServiceError_t serviceError; 27 | 28 | /* Context for parsing across buffer boundaries */ 29 | asn_struct_ctx_t _asn_ctx; 30 | } ConfirmedErrorPDU_t; 31 | 32 | /* Implementation */ 33 | LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_ConfirmedErrorPDU; 34 | 35 | #ifdef __cplusplus 36 | } 37 | #endif 38 | 39 | #endif /* _ConfirmedErrorPDU_H_ */ 40 | -------------------------------------------------------------------------------- /src/mms/iso_mms/asn1c/ConfirmedRequestPdu.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by asn1c-0.9.21 (http://lionet.info/asn1c) 3 | * From ASN.1 module "MMS" 4 | * found in "../mms-extended.asn" 5 | * `asn1c -fskeletons-copy` 6 | */ 7 | 8 | #ifndef _ConfirmedRequestPdu_H_ 9 | #define _ConfirmedRequestPdu_H_ 10 | 11 | 12 | #include 13 | 14 | /* Including external dependencies */ 15 | #include "Unsigned32.h" 16 | #include "ConfirmedServiceRequest.h" 17 | #include 18 | 19 | #ifdef __cplusplus 20 | extern "C" { 21 | #endif 22 | 23 | /* ConfirmedRequestPdu */ 24 | typedef struct ConfirmedRequestPdu { 25 | Unsigned32_t invokeID; 26 | ConfirmedServiceRequest_t confirmedServiceRequest; 27 | 28 | /* Context for parsing across buffer boundaries */ 29 | asn_struct_ctx_t _asn_ctx; 30 | } ConfirmedRequestPdu_t; 31 | 32 | /* Implementation */ 33 | LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_ConfirmedRequestPdu; 34 | 35 | #ifdef __cplusplus 36 | } 37 | #endif 38 | 39 | #endif /* _ConfirmedRequestPdu_H_ */ 40 | -------------------------------------------------------------------------------- /src/mms/iso_mms/asn1c/ConfirmedResponsePdu.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by asn1c-0.9.21 (http://lionet.info/asn1c) 3 | * From ASN.1 module "MMS" 4 | * found in "../mms-extended.asn" 5 | * `asn1c -fskeletons-copy` 6 | */ 7 | 8 | #ifndef _ConfirmedResponsePdu_H_ 9 | #define _ConfirmedResponsePdu_H_ 10 | 11 | 12 | #include 13 | 14 | /* Including external dependencies */ 15 | #include "Unsigned32.h" 16 | #include "ConfirmedServiceResponse.h" 17 | #include 18 | 19 | #ifdef __cplusplus 20 | extern "C" { 21 | #endif 22 | 23 | /* ConfirmedResponsePdu */ 24 | typedef struct ConfirmedResponsePdu { 25 | Unsigned32_t invokeID; 26 | ConfirmedServiceResponse_t confirmedServiceResponse; 27 | 28 | /* Context for parsing across buffer boundaries */ 29 | asn_struct_ctx_t _asn_ctx; 30 | } ConfirmedResponsePdu_t; 31 | 32 | /* Implementation */ 33 | LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_ConfirmedResponsePdu; 34 | 35 | #ifdef __cplusplus 36 | } 37 | #endif 38 | 39 | #endif /* _ConfirmedResponsePdu_H_ */ 40 | -------------------------------------------------------------------------------- /src/mms/iso_mms/asn1c/DataSequence.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by asn1c-0.9.21 (http://lionet.info/asn1c) 3 | * From ASN.1 module "MMS" 4 | * found in "../mms-extended.asn" 5 | * `asn1c -fskeletons-copy` 6 | */ 7 | 8 | #ifndef _DataSequence_H_ 9 | #define _DataSequence_H_ 10 | 11 | 12 | #include 13 | 14 | /* Including external dependencies */ 15 | #include 16 | #include 17 | 18 | #ifdef __cplusplus 19 | extern "C" { 20 | #endif 21 | 22 | /* Forward declarations */ 23 | struct Data; 24 | 25 | /* DataSequence */ 26 | typedef struct DataSequence { 27 | A_SEQUENCE_OF(struct Data) list; 28 | 29 | /* Context for parsing across buffer boundaries */ 30 | asn_struct_ctx_t _asn_ctx; 31 | } DataSequence_t; 32 | 33 | /* Implementation */ 34 | LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_DataSequence; 35 | 36 | #ifdef __cplusplus 37 | } 38 | #endif 39 | 40 | /* Referred external types */ 41 | #include "Data.h" 42 | 43 | #endif /* _DataSequence_H_ */ 44 | -------------------------------------------------------------------------------- /src/mms/iso_mms/asn1c/DefineNamedVariableListResponse.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by asn1c-0.9.21 (http://lionet.info/asn1c) 3 | * From ASN.1 module "MMS" 4 | * found in "../mms-extended.asn" 5 | * `asn1c -fskeletons-copy` 6 | */ 7 | 8 | #ifndef _DefineNamedVariableListResponse_H_ 9 | #define _DefineNamedVariableListResponse_H_ 10 | 11 | 12 | #include 13 | 14 | /* Including external dependencies */ 15 | #include 16 | 17 | #ifdef __cplusplus 18 | extern "C" { 19 | #endif 20 | 21 | /* DefineNamedVariableListResponse */ 22 | typedef NULL_t DefineNamedVariableListResponse_t; 23 | 24 | /* Implementation */ 25 | LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_DefineNamedVariableListResponse; 26 | LIB61850_INTERNAL asn_struct_free_f DefineNamedVariableListResponse_free; 27 | LIB61850_INTERNAL asn_struct_print_f DefineNamedVariableListResponse_print; 28 | LIB61850_INTERNAL asn_constr_check_f DefineNamedVariableListResponse_constraint; 29 | LIB61850_INTERNAL ber_type_decoder_f DefineNamedVariableListResponse_decode_ber; 30 | LIB61850_INTERNAL der_type_encoder_f DefineNamedVariableListResponse_encode_der; 31 | LIB61850_INTERNAL xer_type_decoder_f DefineNamedVariableListResponse_decode_xer; 32 | LIB61850_INTERNAL xer_type_encoder_f DefineNamedVariableListResponse_encode_xer; 33 | 34 | #ifdef __cplusplus 35 | } 36 | #endif 37 | 38 | #endif /* _DefineNamedVariableListResponse_H_ */ 39 | -------------------------------------------------------------------------------- /src/mms/iso_mms/asn1c/DeleteNamedVariableListResponse.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by asn1c-0.9.21 (http://lionet.info/asn1c) 3 | * From ASN.1 module "MMS" 4 | * found in "../mms-extended.asn" 5 | * `asn1c -fskeletons-copy` 6 | */ 7 | 8 | #ifndef _DeleteNamedVariableListResponse_H_ 9 | #define _DeleteNamedVariableListResponse_H_ 10 | 11 | 12 | #include 13 | 14 | /* Including external dependencies */ 15 | #include "Unsigned32.h" 16 | #include 17 | 18 | #ifdef __cplusplus 19 | extern "C" { 20 | #endif 21 | 22 | /* DeleteNamedVariableListResponse */ 23 | typedef struct DeleteNamedVariableListResponse { 24 | Unsigned32_t numberMatched; 25 | Unsigned32_t numberDeleted; 26 | 27 | /* Context for parsing across buffer boundaries */ 28 | asn_struct_ctx_t _asn_ctx; 29 | } DeleteNamedVariableListResponse_t; 30 | 31 | /* Implementation */ 32 | LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_DeleteNamedVariableListResponse; 33 | 34 | #ifdef __cplusplus 35 | } 36 | #endif 37 | 38 | #endif /* _DeleteNamedVariableListResponse_H_ */ 39 | -------------------------------------------------------------------------------- /src/mms/iso_mms/asn1c/FloatingPoint.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by asn1c-0.9.21 (http://lionet.info/asn1c) 3 | * From ASN.1 module "MMS" 4 | * found in "../mms-extended.asn" 5 | * `asn1c -fskeletons-copy` 6 | */ 7 | 8 | #ifndef _FloatingPoint_H_ 9 | #define _FloatingPoint_H_ 10 | 11 | 12 | #include 13 | 14 | /* Including external dependencies */ 15 | #include 16 | 17 | #ifdef __cplusplus 18 | extern "C" { 19 | #endif 20 | 21 | /* FloatingPoint */ 22 | typedef OCTET_STRING_t FloatingPoint_t; 23 | 24 | /* Implementation */ 25 | LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_FloatingPoint; 26 | LIB61850_INTERNAL asn_struct_free_f FloatingPoint_free; 27 | LIB61850_INTERNAL asn_struct_print_f FloatingPoint_print; 28 | LIB61850_INTERNAL asn_constr_check_f FloatingPoint_constraint; 29 | LIB61850_INTERNAL ber_type_decoder_f FloatingPoint_decode_ber; 30 | LIB61850_INTERNAL der_type_encoder_f FloatingPoint_encode_der; 31 | LIB61850_INTERNAL xer_type_decoder_f FloatingPoint_decode_xer; 32 | LIB61850_INTERNAL xer_type_encoder_f FloatingPoint_encode_xer; 33 | 34 | #ifdef __cplusplus 35 | } 36 | #endif 37 | 38 | #endif /* _FloatingPoint_H_ */ 39 | -------------------------------------------------------------------------------- /src/mms/iso_mms/asn1c/GetNameListResponse.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by asn1c-0.9.21 (http://lionet.info/asn1c) 3 | * From ASN.1 module "MMS" 4 | * found in "../mms-extended.asn" 5 | * `asn1c -fskeletons-copy` 6 | */ 7 | 8 | #ifndef _GetNameListResponse_H_ 9 | #define _GetNameListResponse_H_ 10 | 11 | 12 | #include 13 | 14 | /* Including external dependencies */ 15 | #include 16 | #include "Identifier.h" 17 | #include 18 | #include 19 | #include 20 | 21 | #ifdef __cplusplus 22 | extern "C" { 23 | #endif 24 | 25 | /* GetNameListResponse */ 26 | typedef struct GetNameListResponse { 27 | struct GetNameListResponse__listOfIdentifier { 28 | A_SEQUENCE_OF(Identifier_t) list; 29 | 30 | /* Context for parsing across buffer boundaries */ 31 | asn_struct_ctx_t _asn_ctx; 32 | } listOfIdentifier; 33 | BOOLEAN_t *moreFollows /* DEFAULT TRUE */; 34 | 35 | /* Context for parsing across buffer boundaries */ 36 | asn_struct_ctx_t _asn_ctx; 37 | } GetNameListResponse_t; 38 | 39 | /* Implementation */ 40 | LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_GetNameListResponse; 41 | 42 | #ifdef __cplusplus 43 | } 44 | #endif 45 | 46 | #endif /* _GetNameListResponse_H_ */ 47 | -------------------------------------------------------------------------------- /src/mms/iso_mms/asn1c/GetVariableAccessAttributesResponse.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by asn1c-0.9.21 (http://lionet.info/asn1c) 3 | * From ASN.1 module "MMS" 4 | * found in "../mms-extended.asn" 5 | * `asn1c -fskeletons-copy` 6 | */ 7 | 8 | #ifndef _GetVariableAccessAttributesResponse_H_ 9 | #define _GetVariableAccessAttributesResponse_H_ 10 | 11 | 12 | #include 13 | 14 | /* Including external dependencies */ 15 | #include 16 | #include "TypeSpecification.h" 17 | #include 18 | 19 | #ifdef __cplusplus 20 | extern "C" { 21 | #endif 22 | 23 | /* Forward declarations */ 24 | struct Address; 25 | 26 | /* GetVariableAccessAttributesResponse */ 27 | typedef struct GetVariableAccessAttributesResponse { 28 | BOOLEAN_t mmsDeletable; 29 | struct Address *address /* OPTIONAL */; 30 | TypeSpecification_t typeSpecification; 31 | 32 | /* Context for parsing across buffer boundaries */ 33 | asn_struct_ctx_t _asn_ctx; 34 | } GetVariableAccessAttributesResponse_t; 35 | 36 | /* Implementation */ 37 | LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_GetVariableAccessAttributesResponse; 38 | 39 | #ifdef __cplusplus 40 | } 41 | #endif 42 | 43 | /* Referred external types */ 44 | #include "Address.h" 45 | 46 | #endif /* _GetVariableAccessAttributesResponse_H_ */ 47 | -------------------------------------------------------------------------------- /src/mms/iso_mms/asn1c/Identifier.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by asn1c-0.9.21 (http://lionet.info/asn1c) 3 | * From ASN.1 module "MMS" 4 | * found in "../mms-extended.asn" 5 | * `asn1c -fskeletons-copy` 6 | */ 7 | 8 | #ifndef _Identifier_H_ 9 | #define _Identifier_H_ 10 | 11 | 12 | #include 13 | 14 | /* Including external dependencies */ 15 | #include 16 | 17 | #ifdef __cplusplus 18 | extern "C" { 19 | #endif 20 | 21 | /* Identifier */ 22 | typedef VisibleString_t Identifier_t; 23 | 24 | /* Implementation */ 25 | LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_Identifier; 26 | LIB61850_INTERNAL asn_struct_free_f Identifier_free; 27 | LIB61850_INTERNAL asn_struct_print_f Identifier_print; 28 | LIB61850_INTERNAL asn_constr_check_f Identifier_constraint; 29 | LIB61850_INTERNAL ber_type_decoder_f Identifier_decode_ber; 30 | LIB61850_INTERNAL der_type_encoder_f Identifier_encode_der; 31 | LIB61850_INTERNAL xer_type_decoder_f Identifier_decode_xer; 32 | LIB61850_INTERNAL xer_type_encoder_f Identifier_encode_xer; 33 | 34 | #ifdef __cplusplus 35 | } 36 | #endif 37 | 38 | #endif /* _Identifier_H_ */ 39 | -------------------------------------------------------------------------------- /src/mms/iso_mms/asn1c/IndexRangeSeq.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by asn1c-0.9.21 (http://lionet.info/asn1c) 3 | * From ASN.1 module "MMS" 4 | * found in "../mms-extended.asn" 5 | * `asn1c -fskeletons-copy` 6 | */ 7 | 8 | #ifndef _IndexRangeSeq_H_ 9 | #define _IndexRangeSeq_H_ 10 | 11 | 12 | #include 13 | 14 | /* Including external dependencies */ 15 | #include "Unsigned32.h" 16 | #include 17 | 18 | #ifdef __cplusplus 19 | extern "C" { 20 | #endif 21 | 22 | /* IndexRangeSeq */ 23 | typedef struct IndexRangeSeq { 24 | Unsigned32_t lowIndex; 25 | Unsigned32_t numberOfElements; 26 | 27 | /* Context for parsing across buffer boundaries */ 28 | asn_struct_ctx_t _asn_ctx; 29 | } IndexRangeSeq_t; 30 | 31 | /* Implementation */ 32 | LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_IndexRangeSeq; 33 | 34 | #ifdef __cplusplus 35 | } 36 | #endif 37 | 38 | #endif /* _IndexRangeSeq_H_ */ 39 | -------------------------------------------------------------------------------- /src/mms/iso_mms/asn1c/InformationReport.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by asn1c-0.9.21 (http://lionet.info/asn1c) 3 | * From ASN.1 module "MMS" 4 | * found in "../mms-extended.asn" 5 | * `asn1c -fskeletons-copy` 6 | */ 7 | 8 | #ifndef _InformationReport_H_ 9 | #define _InformationReport_H_ 10 | 11 | 12 | #include 13 | 14 | /* Including external dependencies */ 15 | #include "VariableAccessSpecification.h" 16 | #include 17 | #include 18 | #include 19 | 20 | #ifdef __cplusplus 21 | extern "C" { 22 | #endif 23 | 24 | /* Forward declarations */ 25 | struct AccessResult; 26 | 27 | /* InformationReport */ 28 | typedef struct InformationReport { 29 | VariableAccessSpecification_t variableAccessSpecification; 30 | struct InformationReport__listOfAccessResult { 31 | A_SEQUENCE_OF(struct AccessResult) list; 32 | 33 | /* Context for parsing across buffer boundaries */ 34 | asn_struct_ctx_t _asn_ctx; 35 | } listOfAccessResult; 36 | 37 | /* Context for parsing across buffer boundaries */ 38 | asn_struct_ctx_t _asn_ctx; 39 | } InformationReport_t; 40 | 41 | /* Implementation */ 42 | LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_InformationReport; 43 | 44 | #ifdef __cplusplus 45 | } 46 | #endif 47 | 48 | /* Referred external types */ 49 | #include "AccessResult.h" 50 | 51 | #endif /* _InformationReport_H_ */ 52 | -------------------------------------------------------------------------------- /src/mms/iso_mms/asn1c/InitRequestDetail.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by asn1c-0.9.21 (http://lionet.info/asn1c) 3 | * From ASN.1 module "MMS" 4 | * found in "../mms-extended.asn" 5 | * `asn1c -fskeletons-copy` 6 | */ 7 | 8 | #ifndef _InitRequestDetail_H_ 9 | #define _InitRequestDetail_H_ 10 | 11 | 12 | #include 13 | 14 | /* Including external dependencies */ 15 | #include "Integer16.h" 16 | #include "ParameterSupportOptions.h" 17 | #include "ServiceSupportOptions.h" 18 | #include 19 | 20 | #ifdef __cplusplus 21 | extern "C" { 22 | #endif 23 | 24 | /* InitRequestDetail */ 25 | typedef struct InitRequestDetail { 26 | Integer16_t proposedVersionNumber; 27 | ParameterSupportOptions_t proposedParameterCBB; 28 | ServiceSupportOptions_t servicesSupportedCalling; 29 | 30 | /* Context for parsing across buffer boundaries */ 31 | asn_struct_ctx_t _asn_ctx; 32 | } InitRequestDetail_t; 33 | 34 | /* Implementation */ 35 | LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_InitRequestDetail; 36 | 37 | #ifdef __cplusplus 38 | } 39 | #endif 40 | 41 | #endif /* _InitRequestDetail_H_ */ 42 | -------------------------------------------------------------------------------- /src/mms/iso_mms/asn1c/InitResponseDetail.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by asn1c-0.9.21 (http://lionet.info/asn1c) 3 | * From ASN.1 module "MMS" 4 | * found in "../mms-extended.asn" 5 | * `asn1c -fskeletons-copy` 6 | */ 7 | 8 | #ifndef _InitResponseDetail_H_ 9 | #define _InitResponseDetail_H_ 10 | 11 | 12 | #include 13 | 14 | /* Including external dependencies */ 15 | #include "Integer16.h" 16 | #include "ParameterSupportOptions.h" 17 | #include "ServiceSupportOptions.h" 18 | #include 19 | 20 | #ifdef __cplusplus 21 | extern "C" { 22 | #endif 23 | 24 | /* InitResponseDetail */ 25 | typedef struct InitResponseDetail { 26 | Integer16_t negotiatedVersionNumber; 27 | ParameterSupportOptions_t negotiatedParameterCBB; 28 | ServiceSupportOptions_t servicesSupportedCalled; 29 | 30 | /* Context for parsing across buffer boundaries */ 31 | asn_struct_ctx_t _asn_ctx; 32 | } InitResponseDetail_t; 33 | 34 | /* Implementation */ 35 | LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_InitResponseDetail; 36 | 37 | #ifdef __cplusplus 38 | } 39 | #endif 40 | 41 | #endif /* _InitResponseDetail_H_ */ 42 | -------------------------------------------------------------------------------- /src/mms/iso_mms/asn1c/InitiateErrorPdu.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by asn1c-0.9.21 (http://lionet.info/asn1c) 3 | * From ASN.1 module "MMS" 4 | * found in "../mms-extended.asn" 5 | * `asn1c -fskeletons-copy` 6 | */ 7 | 8 | #ifndef _InitiateErrorPdu_H_ 9 | #define _InitiateErrorPdu_H_ 10 | 11 | 12 | #include 13 | 14 | /* Including external dependencies */ 15 | #include "ServiceError.h" 16 | 17 | #ifdef __cplusplus 18 | extern "C" { 19 | #endif 20 | 21 | /* InitiateErrorPdu */ 22 | typedef ServiceError_t InitiateErrorPdu_t; 23 | 24 | /* Implementation */ 25 | LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_InitiateErrorPdu; 26 | LIB61850_INTERNAL asn_struct_free_f InitiateErrorPdu_free; 27 | LIB61850_INTERNAL asn_struct_print_f InitiateErrorPdu_print; 28 | LIB61850_INTERNAL asn_constr_check_f InitiateErrorPdu_constraint; 29 | LIB61850_INTERNAL ber_type_decoder_f InitiateErrorPdu_decode_ber; 30 | LIB61850_INTERNAL der_type_encoder_f InitiateErrorPdu_encode_der; 31 | LIB61850_INTERNAL xer_type_decoder_f InitiateErrorPdu_decode_xer; 32 | LIB61850_INTERNAL xer_type_encoder_f InitiateErrorPdu_encode_xer; 33 | 34 | #ifdef __cplusplus 35 | } 36 | #endif 37 | 38 | #endif /* _InitiateErrorPdu_H_ */ 39 | -------------------------------------------------------------------------------- /src/mms/iso_mms/asn1c/InitiateRequestPdu.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by asn1c-0.9.21 (http://lionet.info/asn1c) 3 | * From ASN.1 module "MMS" 4 | * found in "../mms-extended.asn" 5 | * `asn1c -fskeletons-copy` 6 | */ 7 | 8 | #ifndef _InitiateRequestPdu_H_ 9 | #define _InitiateRequestPdu_H_ 10 | 11 | 12 | #include 13 | 14 | /* Including external dependencies */ 15 | #include "Integer32.h" 16 | #include "Integer16.h" 17 | #include "Integer8.h" 18 | #include "InitRequestDetail.h" 19 | #include 20 | 21 | #ifdef __cplusplus 22 | extern "C" { 23 | #endif 24 | 25 | /* InitiateRequestPdu */ 26 | typedef struct InitiateRequestPdu { 27 | Integer32_t *localDetailCalling /* OPTIONAL */; 28 | Integer16_t proposedMaxServOutstandingCalling; 29 | Integer16_t proposedMaxServOutstandingCalled; 30 | Integer8_t *proposedDataStructureNestingLevel /* OPTIONAL */; 31 | InitRequestDetail_t mmsInitRequestDetail; 32 | 33 | /* Context for parsing across buffer boundaries */ 34 | asn_struct_ctx_t _asn_ctx; 35 | } InitiateRequestPdu_t; 36 | 37 | /* Implementation */ 38 | LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_InitiateRequestPdu; 39 | 40 | #ifdef __cplusplus 41 | } 42 | #endif 43 | 44 | #endif /* _InitiateRequestPdu_H_ */ 45 | -------------------------------------------------------------------------------- /src/mms/iso_mms/asn1c/InitiateResponsePdu.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by asn1c-0.9.21 (http://lionet.info/asn1c) 3 | * From ASN.1 module "MMS" 4 | * found in "../mms-extended.asn" 5 | * `asn1c -fskeletons-copy` 6 | */ 7 | 8 | #ifndef _InitiateResponsePdu_H_ 9 | #define _InitiateResponsePdu_H_ 10 | 11 | 12 | #include 13 | 14 | /* Including external dependencies */ 15 | #include "Integer32.h" 16 | #include "Integer16.h" 17 | #include "Integer8.h" 18 | #include "InitResponseDetail.h" 19 | #include 20 | 21 | #ifdef __cplusplus 22 | extern "C" { 23 | #endif 24 | 25 | /* InitiateResponsePdu */ 26 | typedef struct InitiateResponsePdu { 27 | Integer32_t *localDetailCalled /* OPTIONAL */; 28 | Integer16_t negotiatedMaxServOutstandingCalling; 29 | Integer16_t negotiatedMaxServOutstandingCalled; 30 | Integer8_t *negotiatedDataStructureNestingLevel /* OPTIONAL */; 31 | InitResponseDetail_t mmsInitResponseDetail; 32 | 33 | /* Context for parsing across buffer boundaries */ 34 | asn_struct_ctx_t _asn_ctx; 35 | } InitiateResponsePdu_t; 36 | 37 | /* Implementation */ 38 | LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_InitiateResponsePdu; 39 | 40 | #ifdef __cplusplus 41 | } 42 | #endif 43 | 44 | #endif /* _InitiateResponsePdu_H_ */ 45 | -------------------------------------------------------------------------------- /src/mms/iso_mms/asn1c/Integer16.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by asn1c-0.9.21 (http://lionet.info/asn1c) 3 | * From ASN.1 module "MMS" 4 | * found in "../mms-extended.asn" 5 | * `asn1c -fskeletons-copy` 6 | */ 7 | 8 | #ifndef _Integer16_H_ 9 | #define _Integer16_H_ 10 | 11 | 12 | #include 13 | 14 | /* Including external dependencies */ 15 | #include 16 | 17 | #ifdef __cplusplus 18 | extern "C" { 19 | #endif 20 | 21 | /* Integer16 */ 22 | typedef long Integer16_t; 23 | 24 | /* Implementation */ 25 | LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_Integer16; 26 | LIB61850_INTERNAL asn_struct_free_f Integer16_free; 27 | LIB61850_INTERNAL asn_struct_print_f Integer16_print; 28 | LIB61850_INTERNAL asn_constr_check_f Integer16_constraint; 29 | LIB61850_INTERNAL ber_type_decoder_f Integer16_decode_ber; 30 | LIB61850_INTERNAL der_type_encoder_f Integer16_encode_der; 31 | LIB61850_INTERNAL xer_type_decoder_f Integer16_decode_xer; 32 | LIB61850_INTERNAL xer_type_encoder_f Integer16_encode_xer; 33 | 34 | #ifdef __cplusplus 35 | } 36 | #endif 37 | 38 | #endif /* _Integer16_H_ */ 39 | -------------------------------------------------------------------------------- /src/mms/iso_mms/asn1c/Integer32.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by asn1c-0.9.21 (http://lionet.info/asn1c) 3 | * From ASN.1 module "MMS" 4 | * found in "../mms-extended.asn" 5 | * `asn1c -fskeletons-copy` 6 | */ 7 | 8 | #ifndef _Integer32_H_ 9 | #define _Integer32_H_ 10 | 11 | 12 | #include 13 | 14 | /* Including external dependencies */ 15 | #include 16 | 17 | #ifdef __cplusplus 18 | extern "C" { 19 | #endif 20 | 21 | /* Integer32 */ 22 | typedef long Integer32_t; 23 | 24 | /* Implementation */ 25 | LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_Integer32; 26 | LIB61850_INTERNAL asn_struct_free_f Integer32_free; 27 | LIB61850_INTERNAL asn_struct_print_f Integer32_print; 28 | LIB61850_INTERNAL asn_constr_check_f Integer32_constraint; 29 | LIB61850_INTERNAL ber_type_decoder_f Integer32_decode_ber; 30 | LIB61850_INTERNAL der_type_encoder_f Integer32_encode_der; 31 | LIB61850_INTERNAL xer_type_decoder_f Integer32_decode_xer; 32 | LIB61850_INTERNAL xer_type_encoder_f Integer32_encode_xer; 33 | 34 | #ifdef __cplusplus 35 | } 36 | #endif 37 | 38 | #endif /* _Integer32_H_ */ 39 | -------------------------------------------------------------------------------- /src/mms/iso_mms/asn1c/Integer8.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by asn1c-0.9.21 (http://lionet.info/asn1c) 3 | * From ASN.1 module "MMS" 4 | * found in "../mms-extended.asn" 5 | * `asn1c -fskeletons-copy` 6 | */ 7 | 8 | #ifndef _Integer8_H_ 9 | #define _Integer8_H_ 10 | 11 | 12 | #include 13 | 14 | /* Including external dependencies */ 15 | #include 16 | 17 | #ifdef __cplusplus 18 | extern "C" { 19 | #endif 20 | 21 | /* Integer8 */ 22 | typedef long Integer8_t; 23 | 24 | /* Implementation */ 25 | LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_Integer8; 26 | LIB61850_INTERNAL asn_struct_free_f Integer8_free; 27 | LIB61850_INTERNAL asn_struct_print_f Integer8_print; 28 | LIB61850_INTERNAL asn_constr_check_f Integer8_constraint; 29 | LIB61850_INTERNAL ber_type_decoder_f Integer8_decode_ber; 30 | LIB61850_INTERNAL der_type_encoder_f Integer8_encode_der; 31 | LIB61850_INTERNAL xer_type_decoder_f Integer8_decode_xer; 32 | LIB61850_INTERNAL xer_type_encoder_f Integer8_encode_xer; 33 | 34 | #ifdef __cplusplus 35 | } 36 | #endif 37 | 38 | #endif /* _Integer8_H_ */ 39 | -------------------------------------------------------------------------------- /src/mms/iso_mms/asn1c/ListOfVariableSeq.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by asn1c-0.9.21 (http://lionet.info/asn1c) 3 | * From ASN.1 module "MMS" 4 | * found in "../mms-extended.asn" 5 | * `asn1c -fskeletons-copy` 6 | */ 7 | 8 | #ifndef _ListOfVariableSeq_H_ 9 | #define _ListOfVariableSeq_H_ 10 | 11 | 12 | #include 13 | 14 | /* Including external dependencies */ 15 | #include "VariableSpecification.h" 16 | #include 17 | 18 | #ifdef __cplusplus 19 | extern "C" { 20 | #endif 21 | 22 | /* Forward declarations */ 23 | struct AlternateAccess; 24 | 25 | /* ListOfVariableSeq */ 26 | typedef struct ListOfVariableSeq { 27 | VariableSpecification_t variableSpecification; 28 | struct AlternateAccess *alternateAccess /* OPTIONAL */; 29 | 30 | /* Context for parsing across buffer boundaries */ 31 | asn_struct_ctx_t _asn_ctx; 32 | } ListOfVariableSeq_t; 33 | 34 | /* Implementation */ 35 | LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_ListOfVariableSeq; 36 | 37 | #ifdef __cplusplus 38 | } 39 | #endif 40 | 41 | /* Referred external types */ 42 | #include "AlternateAccess.h" 43 | 44 | #endif /* _ListOfVariableSeq_H_ */ 45 | -------------------------------------------------------------------------------- /src/mms/iso_mms/asn1c/MMSString.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by asn1c-0.9.21 (http://lionet.info/asn1c) 3 | * From ASN.1 module "MMS" 4 | * found in "../mms-extended.asn" 5 | * `asn1c -fskeletons-copy` 6 | */ 7 | 8 | #ifndef _MMSString_H_ 9 | #define _MMSString_H_ 10 | 11 | 12 | #include 13 | 14 | /* Including external dependencies */ 15 | #include 16 | 17 | #ifdef __cplusplus 18 | extern "C" { 19 | #endif 20 | 21 | /* MMSString */ 22 | typedef UTF8String_t MMSString_t; 23 | 24 | /* Implementation */ 25 | LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_MMSString; 26 | LIB61850_INTERNAL asn_struct_free_f MMSString_free; 27 | LIB61850_INTERNAL asn_struct_print_f MMSString_print; 28 | LIB61850_INTERNAL asn_constr_check_f MMSString_constraint; 29 | LIB61850_INTERNAL ber_type_decoder_f MMSString_decode_ber; 30 | LIB61850_INTERNAL der_type_encoder_f MMSString_encode_der; 31 | LIB61850_INTERNAL xer_type_decoder_f MMSString_decode_xer; 32 | LIB61850_INTERNAL xer_type_encoder_f MMSString_encode_xer; 33 | 34 | #ifdef __cplusplus 35 | } 36 | #endif 37 | 38 | #endif /* _MMSString_H_ */ 39 | -------------------------------------------------------------------------------- /src/mms/iso_mms/asn1c/NULL.h: -------------------------------------------------------------------------------- 1 | /*- 2 | * Copyright (c) 2003 Lev Walkin . All rights reserved. 3 | * Redistribution and modifications are permitted subject to BSD license. 4 | */ 5 | #ifndef ASN_TYPE_NULL_H 6 | #define ASN_TYPE_NULL_H 7 | 8 | #include 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | /* 15 | * The value of the NULL type is meaningless: see BOOLEAN if you want to 16 | * carry true/false semantics. 17 | */ 18 | typedef int NULL_t; 19 | 20 | LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_NULL; 21 | 22 | LIB61850_INTERNAL asn_struct_print_f NULL_print; 23 | LIB61850_INTERNAL der_type_encoder_f NULL_encode_der; 24 | LIB61850_INTERNAL xer_type_decoder_f NULL_decode_xer; 25 | LIB61850_INTERNAL xer_type_encoder_f NULL_encode_xer; 26 | LIB61850_INTERNAL per_type_decoder_f NULL_decode_uper; 27 | LIB61850_INTERNAL per_type_encoder_f NULL_encode_uper; 28 | 29 | #ifdef __cplusplus 30 | } 31 | #endif 32 | 33 | #endif /* NULL_H */ 34 | -------------------------------------------------------------------------------- /src/mms/iso_mms/asn1c/NativeEnumerated.h: -------------------------------------------------------------------------------- 1 | /*- 2 | * Copyright (c) 2004, 2005, 2006 Lev Walkin . 3 | * All rights reserved. 4 | * Redistribution and modifications are permitted subject to BSD license. 5 | */ 6 | /* 7 | * This type differs from the standard ENUMERATED in that it is modelled using 8 | * the fixed machine type (long, int, short), so it can hold only values of 9 | * limited length. There is no type (i.e., NativeEnumerated_t, any integer type 10 | * will do). 11 | * This type may be used when integer range is limited by subtype constraints. 12 | */ 13 | #ifndef _NativeEnumerated_H_ 14 | #define _NativeEnumerated_H_ 15 | 16 | #include 17 | 18 | #ifdef __cplusplus 19 | extern "C" { 20 | #endif 21 | 22 | LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_NativeEnumerated; 23 | 24 | LIB61850_INTERNAL xer_type_encoder_f NativeEnumerated_encode_xer; 25 | LIB61850_INTERNAL per_type_decoder_f NativeEnumerated_decode_uper; 26 | LIB61850_INTERNAL per_type_encoder_f NativeEnumerated_encode_uper; 27 | 28 | #ifdef __cplusplus 29 | } 30 | #endif 31 | 32 | #endif /* _NativeEnumerated_H_ */ 33 | -------------------------------------------------------------------------------- /src/mms/iso_mms/asn1c/ReadRequest.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by asn1c-0.9.21 (http://lionet.info/asn1c) 3 | * From ASN.1 module "MMS" 4 | * found in "../mms-extended.asn" 5 | * `asn1c -fskeletons-copy` 6 | */ 7 | 8 | #ifndef _ReadRequest_H_ 9 | #define _ReadRequest_H_ 10 | 11 | 12 | #include 13 | 14 | /* Including external dependencies */ 15 | #include 16 | #include "VariableAccessSpecification.h" 17 | #include 18 | 19 | #ifdef __cplusplus 20 | extern "C" { 21 | #endif 22 | 23 | /* ReadRequest */ 24 | typedef struct ReadRequest { 25 | BOOLEAN_t *specificationWithResult /* DEFAULT FALSE */; 26 | VariableAccessSpecification_t variableAccessSpecification; 27 | 28 | /* Context for parsing across buffer boundaries */ 29 | asn_struct_ctx_t _asn_ctx; 30 | } ReadRequest_t; 31 | 32 | /* Implementation */ 33 | LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_ReadRequest; 34 | 35 | #ifdef __cplusplus 36 | } 37 | #endif 38 | 39 | #endif /* _ReadRequest_H_ */ 40 | -------------------------------------------------------------------------------- /src/mms/iso_mms/asn1c/ReadResponse.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by asn1c-0.9.21 (http://lionet.info/asn1c) 3 | * From ASN.1 module "MMS" 4 | * found in "../mms-extended.asn" 5 | * `asn1c -fskeletons-copy` 6 | */ 7 | 8 | #ifndef _ReadResponse_H_ 9 | #define _ReadResponse_H_ 10 | 11 | 12 | #include 13 | 14 | /* Including external dependencies */ 15 | #include 16 | #include 17 | #include 18 | 19 | #ifdef __cplusplus 20 | extern "C" { 21 | #endif 22 | 23 | /* Forward declarations */ 24 | struct VariableAccessSpecification; 25 | struct AccessResult; 26 | 27 | struct ReadResponse__listOfAccessResult { 28 | A_SEQUENCE_OF(struct AccessResult) list; 29 | 30 | /* Context for parsing across buffer boundaries */ 31 | asn_struct_ctx_t _asn_ctx; 32 | }; 33 | 34 | /* ReadResponse */ 35 | typedef struct ReadResponse { 36 | struct VariableAccessSpecification *variableAccessSpecification /* OPTIONAL */; 37 | struct ReadResponse__listOfAccessResult listOfAccessResult; 38 | 39 | /* Context for parsing across buffer boundaries */ 40 | asn_struct_ctx_t _asn_ctx; 41 | } ReadResponse_t; 42 | 43 | /* Implementation */ 44 | LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_ReadResponse; 45 | 46 | #ifdef __cplusplus 47 | } 48 | #endif 49 | 50 | /* Referred external types */ 51 | #include "VariableAccessSpecification.h" 52 | #include "AccessResult.h" 53 | 54 | #endif /* _ReadResponse_H_ */ 55 | -------------------------------------------------------------------------------- /src/mms/iso_mms/asn1c/StructComponent.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by asn1c-0.9.21 (http://lionet.info/asn1c) 3 | * From ASN.1 module "MMS" 4 | * found in "../mms-extended.asn" 5 | * `asn1c -fskeletons-copy` 6 | */ 7 | 8 | #ifndef _StructComponent_H_ 9 | #define _StructComponent_H_ 10 | 11 | 12 | #include 13 | 14 | /* Including external dependencies */ 15 | #include "Identifier.h" 16 | #include 17 | 18 | #ifdef __cplusplus 19 | extern "C" { 20 | #endif 21 | 22 | /* Forward declarations */ 23 | struct TypeSpecification; 24 | 25 | /* StructComponent */ 26 | typedef struct StructComponent { 27 | Identifier_t *componentName /* OPTIONAL */; 28 | struct TypeSpecification *componentType; 29 | 30 | /* Context for parsing across buffer boundaries */ 31 | asn_struct_ctx_t _asn_ctx; 32 | } StructComponent_t; 33 | 34 | /* Implementation */ 35 | LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_StructComponent; 36 | 37 | #ifdef __cplusplus 38 | } 39 | #endif 40 | 41 | /* Referred external types */ 42 | #include "TypeSpecification.h" 43 | 44 | #endif /* _StructComponent_H_ */ 45 | -------------------------------------------------------------------------------- /src/mms/iso_mms/asn1c/TimeOfDay.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by asn1c-0.9.21 (http://lionet.info/asn1c) 3 | * From ASN.1 module "MMS" 4 | * found in "../mms-extended.asn" 5 | * `asn1c -fskeletons-copy` 6 | */ 7 | 8 | #ifndef _TimeOfDay_H_ 9 | #define _TimeOfDay_H_ 10 | 11 | 12 | #include 13 | 14 | /* Including external dependencies */ 15 | #include 16 | 17 | #ifdef __cplusplus 18 | extern "C" { 19 | #endif 20 | 21 | /* TimeOfDay */ 22 | typedef OCTET_STRING_t TimeOfDay_t; 23 | 24 | /* Implementation */ 25 | LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_TimeOfDay; 26 | LIB61850_INTERNAL asn_struct_free_f TimeOfDay_free; 27 | LIB61850_INTERNAL asn_struct_print_f TimeOfDay_print; 28 | LIB61850_INTERNAL asn_constr_check_f TimeOfDay_constraint; 29 | LIB61850_INTERNAL ber_type_decoder_f TimeOfDay_decode_ber; 30 | LIB61850_INTERNAL der_type_encoder_f TimeOfDay_encode_der; 31 | LIB61850_INTERNAL xer_type_decoder_f TimeOfDay_decode_xer; 32 | LIB61850_INTERNAL xer_type_encoder_f TimeOfDay_encode_xer; 33 | 34 | #ifdef __cplusplus 35 | } 36 | #endif 37 | 38 | #endif /* _TimeOfDay_H_ */ 39 | -------------------------------------------------------------------------------- /src/mms/iso_mms/asn1c/UnconfirmedPDU.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by asn1c-0.9.21 (http://lionet.info/asn1c) 3 | * From ASN.1 module "MMS" 4 | * found in "../mms-extended.asn" 5 | * `asn1c -fskeletons-copy` 6 | */ 7 | 8 | #ifndef _UnconfirmedPDU_H_ 9 | #define _UnconfirmedPDU_H_ 10 | 11 | 12 | #include 13 | 14 | /* Including external dependencies */ 15 | #include "UnconfirmedService.h" 16 | #include 17 | 18 | #ifdef __cplusplus 19 | extern "C" { 20 | #endif 21 | 22 | /* UnconfirmedPDU */ 23 | typedef struct UnconfirmedPDU { 24 | UnconfirmedService_t unconfirmedService; 25 | 26 | /* Context for parsing across buffer boundaries */ 27 | asn_struct_ctx_t _asn_ctx; 28 | } UnconfirmedPDU_t; 29 | 30 | /* Implementation */ 31 | LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_UnconfirmedPDU; 32 | 33 | #ifdef __cplusplus 34 | } 35 | #endif 36 | 37 | #endif /* _UnconfirmedPDU_H_ */ 38 | -------------------------------------------------------------------------------- /src/mms/iso_mms/asn1c/UnconfirmedService.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by asn1c-0.9.21 (http://lionet.info/asn1c) 3 | * From ASN.1 module "MMS" 4 | * found in "../mms-extended.asn" 5 | * `asn1c -fskeletons-copy` 6 | */ 7 | 8 | #ifndef _UnconfirmedService_H_ 9 | #define _UnconfirmedService_H_ 10 | 11 | 12 | #include 13 | 14 | /* Including external dependencies */ 15 | #include "InformationReport.h" 16 | #include 17 | 18 | #ifdef __cplusplus 19 | extern "C" { 20 | #endif 21 | 22 | /* Dependencies */ 23 | typedef enum UnconfirmedService_PR { 24 | UnconfirmedService_PR_NOTHING, /* No components present */ 25 | UnconfirmedService_PR_informationReport 26 | } UnconfirmedService_PR; 27 | 28 | /* UnconfirmedService */ 29 | typedef struct UnconfirmedService { 30 | UnconfirmedService_PR present; 31 | union UnconfirmedService_u { 32 | InformationReport_t informationReport; 33 | } choice; 34 | 35 | /* Context for parsing across buffer boundaries */ 36 | asn_struct_ctx_t _asn_ctx; 37 | } UnconfirmedService_t; 38 | 39 | /* Implementation */ 40 | LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_UnconfirmedService; 41 | 42 | #ifdef __cplusplus 43 | } 44 | #endif 45 | 46 | #endif /* _UnconfirmedService_H_ */ 47 | -------------------------------------------------------------------------------- /src/mms/iso_mms/asn1c/Unsigned16.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by asn1c-0.9.21 (http://lionet.info/asn1c) 3 | * From ASN.1 module "MMS" 4 | * found in "../mms-extended.asn" 5 | * `asn1c -fskeletons-copy` 6 | */ 7 | 8 | #ifndef _Unsigned16_H_ 9 | #define _Unsigned16_H_ 10 | 11 | 12 | #include 13 | 14 | /* Including external dependencies */ 15 | #include 16 | 17 | #ifdef __cplusplus 18 | extern "C" { 19 | #endif 20 | 21 | /* Unsigned16 */ 22 | typedef long Unsigned16_t; 23 | 24 | /* Implementation */ 25 | LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_Unsigned16; 26 | LIB61850_INTERNAL asn_struct_free_f Unsigned16_free; 27 | LIB61850_INTERNAL asn_struct_print_f Unsigned16_print; 28 | LIB61850_INTERNAL asn_constr_check_f Unsigned16_constraint; 29 | LIB61850_INTERNAL ber_type_decoder_f Unsigned16_decode_ber; 30 | LIB61850_INTERNAL der_type_encoder_f Unsigned16_encode_der; 31 | LIB61850_INTERNAL xer_type_decoder_f Unsigned16_decode_xer; 32 | LIB61850_INTERNAL xer_type_encoder_f Unsigned16_encode_xer; 33 | 34 | #ifdef __cplusplus 35 | } 36 | #endif 37 | 38 | #endif /* _Unsigned16_H_ */ 39 | -------------------------------------------------------------------------------- /src/mms/iso_mms/asn1c/Unsigned32.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by asn1c-0.9.21 (http://lionet.info/asn1c) 3 | * From ASN.1 module "MMS" 4 | * found in "../mms-extended.asn" 5 | * `asn1c -fskeletons-copy` 6 | */ 7 | 8 | #ifndef _Unsigned32_H_ 9 | #define _Unsigned32_H_ 10 | 11 | 12 | #include 13 | 14 | /* Including external dependencies */ 15 | #include 16 | 17 | #ifdef __cplusplus 18 | extern "C" { 19 | #endif 20 | 21 | /* Unsigned32 */ 22 | typedef INTEGER_t Unsigned32_t; 23 | 24 | /* Implementation */ 25 | LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_Unsigned32; 26 | LIB61850_INTERNAL asn_struct_free_f Unsigned32_free; 27 | LIB61850_INTERNAL asn_struct_print_f Unsigned32_print; 28 | LIB61850_INTERNAL asn_constr_check_f Unsigned32_constraint; 29 | LIB61850_INTERNAL ber_type_decoder_f Unsigned32_decode_ber; 30 | LIB61850_INTERNAL der_type_encoder_f Unsigned32_encode_der; 31 | LIB61850_INTERNAL xer_type_decoder_f Unsigned32_decode_xer; 32 | LIB61850_INTERNAL xer_type_encoder_f Unsigned32_encode_xer; 33 | 34 | #ifdef __cplusplus 35 | } 36 | #endif 37 | 38 | #endif /* _Unsigned32_H_ */ 39 | -------------------------------------------------------------------------------- /src/mms/iso_mms/asn1c/Unsigned8.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by asn1c-0.9.21 (http://lionet.info/asn1c) 3 | * From ASN.1 module "MMS" 4 | * found in "../mms-extended.asn" 5 | * `asn1c -fskeletons-copy` 6 | */ 7 | 8 | #ifndef _Unsigned8_H_ 9 | #define _Unsigned8_H_ 10 | 11 | 12 | #include 13 | 14 | /* Including external dependencies */ 15 | #include 16 | 17 | #ifdef __cplusplus 18 | extern "C" { 19 | #endif 20 | 21 | /* Unsigned8 */ 22 | typedef long Unsigned8_t; 23 | 24 | /* Implementation */ 25 | LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_Unsigned8; 26 | LIB61850_INTERNAL asn_struct_free_f Unsigned8_free; 27 | LIB61850_INTERNAL asn_struct_print_f Unsigned8_print; 28 | LIB61850_INTERNAL asn_constr_check_f Unsigned8_constraint; 29 | LIB61850_INTERNAL ber_type_decoder_f Unsigned8_decode_ber; 30 | LIB61850_INTERNAL der_type_encoder_f Unsigned8_encode_der; 31 | LIB61850_INTERNAL xer_type_decoder_f Unsigned8_decode_xer; 32 | LIB61850_INTERNAL xer_type_encoder_f Unsigned8_encode_xer; 33 | 34 | #ifdef __cplusplus 35 | } 36 | #endif 37 | 38 | #endif /* _Unsigned8_H_ */ 39 | -------------------------------------------------------------------------------- /src/mms/iso_mms/asn1c/UtcTime.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by asn1c-0.9.21 (http://lionet.info/asn1c) 3 | * From ASN.1 module "MMS" 4 | * found in "../mms-extended.asn" 5 | * `asn1c -fskeletons-copy` 6 | */ 7 | 8 | #ifndef _UtcTime_H_ 9 | #define _UtcTime_H_ 10 | 11 | 12 | #include 13 | 14 | /* Including external dependencies */ 15 | #include 16 | 17 | #ifdef __cplusplus 18 | extern "C" { 19 | #endif 20 | 21 | /* UtcTime */ 22 | typedef OCTET_STRING_t UtcTime_t; 23 | 24 | /* Implementation */ 25 | LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_UtcTime; 26 | LIB61850_INTERNAL asn_struct_free_f UtcTime_free; 27 | LIB61850_INTERNAL asn_struct_print_f UtcTime_print; 28 | LIB61850_INTERNAL asn_constr_check_f UtcTime_constraint; 29 | LIB61850_INTERNAL ber_type_decoder_f UtcTime_decode_ber; 30 | LIB61850_INTERNAL der_type_encoder_f UtcTime_encode_der; 31 | LIB61850_INTERNAL xer_type_decoder_f UtcTime_decode_xer; 32 | LIB61850_INTERNAL xer_type_encoder_f UtcTime_encode_xer; 33 | 34 | #ifdef __cplusplus 35 | } 36 | #endif 37 | 38 | #endif /* _UtcTime_H_ */ 39 | -------------------------------------------------------------------------------- /src/mms/iso_mms/asn1c/VisibleString.h: -------------------------------------------------------------------------------- 1 | /*- 2 | * Copyright (c) 2003 Lev Walkin . All rights reserved. 3 | * Redistribution and modifications are permitted subject to BSD license. 4 | */ 5 | #ifndef _VisibleString_H_ 6 | #define _VisibleString_H_ 7 | 8 | #include 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | typedef OCTET_STRING_t VisibleString_t; /* Implemented via OCTET STRING */ 15 | 16 | LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_VisibleString; 17 | 18 | LIB61850_INTERNAL asn_constr_check_f VisibleString_constraint; 19 | 20 | #ifdef __cplusplus 21 | } 22 | #endif 23 | 24 | #endif /* _VisibleString_H_ */ 25 | -------------------------------------------------------------------------------- /src/mms/iso_mms/asn1c/WriteRequest.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by asn1c-0.9.21 (http://lionet.info/asn1c) 3 | * From ASN.1 module "MMS" 4 | * found in "../mms-extended.asn" 5 | * `asn1c -fskeletons-copy` 6 | */ 7 | 8 | #ifndef _WriteRequest_H_ 9 | #define _WriteRequest_H_ 10 | 11 | 12 | #include 13 | 14 | /* Including external dependencies */ 15 | #include "VariableAccessSpecification.h" 16 | #include 17 | #include 18 | #include 19 | 20 | #ifdef __cplusplus 21 | extern "C" { 22 | #endif 23 | 24 | /* Forward declarations */ 25 | struct Data; 26 | 27 | struct WriteRequest__listOfData { 28 | A_SEQUENCE_OF(struct Data) list; 29 | 30 | /* Context for parsing across buffer boundaries */ 31 | asn_struct_ctx_t _asn_ctx; 32 | }; 33 | 34 | /* WriteRequest */ 35 | typedef struct WriteRequest { 36 | VariableAccessSpecification_t variableAccessSpecification; 37 | struct WriteRequest__listOfData listOfData; 38 | 39 | /* Context for parsing across buffer boundaries */ 40 | asn_struct_ctx_t _asn_ctx; 41 | } WriteRequest_t; 42 | 43 | /* Implementation */ 44 | LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_WriteRequest; 45 | 46 | #ifdef __cplusplus 47 | } 48 | #endif 49 | 50 | /* Referred external types */ 51 | #include "Data.h" 52 | 53 | #endif /* _WriteRequest_H_ */ 54 | -------------------------------------------------------------------------------- /src/mms/iso_mms/asn1c/asn_SEQUENCE_OF.c: -------------------------------------------------------------------------------- 1 | /*- 2 | * Copyright (c) 2003, 2004 Lev Walkin . All rights reserved. 3 | * Redistribution and modifications are permitted subject to BSD license. 4 | */ 5 | #include 6 | #include 7 | 8 | typedef A_SEQUENCE_OF(void) asn_sequence; 9 | 10 | void 11 | asn_sequence_del(void *asn_sequence_of_x, int number, int _do_free) { 12 | asn_sequence *as = (asn_sequence *)asn_sequence_of_x; 13 | 14 | if(as) { 15 | void *ptr; 16 | int n; 17 | 18 | if(number < 0 || number >= as->count) 19 | return; /* Nothing to delete */ 20 | 21 | if(_do_free && as->free) { 22 | ptr = as->array[number]; 23 | } else { 24 | ptr = 0; 25 | } 26 | 27 | /* 28 | * Shift all elements to the left to hide the gap. 29 | */ 30 | --as->count; 31 | for(n = number; n < as->count; n++) 32 | as->array[n] = as->array[n+1]; 33 | 34 | /* 35 | * Invoke the third-party function only when the state 36 | * of the parent structure is consistent. 37 | */ 38 | if(ptr) as->free(ptr); 39 | } 40 | } 41 | 42 | -------------------------------------------------------------------------------- /src/mms/iso_mms/asn1c/constr_SEQUENCE_OF.h: -------------------------------------------------------------------------------- 1 | /*- 2 | * Copyright (c) 2003, 2005 Lev Walkin . All rights reserved. 3 | * Redistribution and modifications are permitted subject to BSD license. 4 | */ 5 | #ifndef _CONSTR_SEQUENCE_OF_H_ 6 | #define _CONSTR_SEQUENCE_OF_H_ 7 | 8 | #include 9 | #include /* Implemented using SET OF */ 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | /* 16 | * A set specialized functions dealing with the SEQUENCE OF type. 17 | * Generally implemented using SET OF. 18 | */ 19 | #define SEQUENCE_OF_free SET_OF_free 20 | #define SEQUENCE_OF_print SET_OF_print 21 | #define SEQUENCE_OF_constraint SET_OF_constraint 22 | #define SEQUENCE_OF_decode_ber SET_OF_decode_ber 23 | #define SEQUENCE_OF_decode_xer SET_OF_decode_xer 24 | #define SEQUENCE_OF_decode_uper SET_OF_decode_uper 25 | LIB61850_INTERNAL der_type_encoder_f SEQUENCE_OF_encode_der; 26 | LIB61850_INTERNAL xer_type_encoder_f SEQUENCE_OF_encode_xer; 27 | LIB61850_INTERNAL per_type_encoder_f SEQUENCE_OF_encode_uper; 28 | 29 | #ifdef __cplusplus 30 | } 31 | #endif 32 | 33 | #endif /* _CONSTR_SET_OF_H_ */ 34 | -------------------------------------------------------------------------------- /src/mms/iso_mms/asn1c/constr_SET_OF.h: -------------------------------------------------------------------------------- 1 | /*- 2 | * Copyright (c) 2003 Lev Walkin . All rights reserved. 3 | * Redistribution and modifications are permitted subject to BSD license. 4 | */ 5 | #ifndef _CONSTR_SET_OF_H_ 6 | #define _CONSTR_SET_OF_H_ 7 | 8 | #include 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | typedef struct asn_SET_OF_specifics_s { 15 | /* 16 | * Target structure description. 17 | */ 18 | int struct_size; /* Size of the target structure. */ 19 | int ctx_offset; /* Offset of the asn_struct_ctx_t member */ 20 | 21 | /* XER-specific stuff */ 22 | int as_XMLValueList; /* The member type must be encoded like this */ 23 | } asn_SET_OF_specifics_t; 24 | 25 | /* 26 | * A set specialized functions dealing with the SET OF type. 27 | */ 28 | LIB61850_INTERNAL asn_struct_free_f SET_OF_free; 29 | LIB61850_INTERNAL asn_struct_print_f SET_OF_print; 30 | LIB61850_INTERNAL asn_constr_check_f SET_OF_constraint; 31 | LIB61850_INTERNAL ber_type_decoder_f SET_OF_decode_ber; 32 | LIB61850_INTERNAL der_type_encoder_f SET_OF_encode_der; 33 | LIB61850_INTERNAL xer_type_decoder_f SET_OF_decode_xer; 34 | LIB61850_INTERNAL xer_type_encoder_f SET_OF_encode_xer; 35 | LIB61850_INTERNAL per_type_decoder_f SET_OF_decode_uper; 36 | LIB61850_INTERNAL per_type_encoder_f SET_OF_encode_uper; 37 | 38 | #ifdef __cplusplus 39 | } 40 | #endif 41 | 42 | #endif /* _CONSTR_SET_OF_H_ */ 43 | -------------------------------------------------------------------------------- /src/mms/iso_mms/asn1c/per_decoder.h: -------------------------------------------------------------------------------- 1 | /*- 2 | * Copyright (c) 2005 Lev Walkin . All rights reserved. 3 | * Redistribution and modifications are permitted subject to BSD license. 4 | */ 5 | #ifndef _PER_DECODER_H_ 6 | #define _PER_DECODER_H_ 7 | 8 | #include 9 | #include 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | struct asn_TYPE_descriptor_s; /* Forward declaration */ 16 | 17 | /* 18 | * Unaligned PER decoder of any ASN.1 type. May be invoked by the application. 19 | */ 20 | LIB61850_INTERNAL 21 | asn_dec_rval_t uper_decode(struct asn_codec_ctx_s *opt_codec_ctx, 22 | struct asn_TYPE_descriptor_s *type_descriptor, /* Type to decode */ 23 | void **struct_ptr, /* Pointer to a target structure's pointer */ 24 | const void *buffer, /* Data to be decoded */ 25 | size_t size, /* Size of data buffer */ 26 | int skip_bits, /* Number of unused leading bits, 0..7 */ 27 | int unused_bits /* Number of unused tailing bits, 0..7 */ 28 | ); 29 | 30 | 31 | /* 32 | * Type of the type-specific PER decoder function. 33 | */ 34 | typedef asn_dec_rval_t (per_type_decoder_f)(asn_codec_ctx_t *opt_codec_ctx, 35 | struct asn_TYPE_descriptor_s *type_descriptor, 36 | asn_per_constraints_t *constraints, 37 | void **struct_ptr, 38 | asn_per_data_t *per_data 39 | ); 40 | 41 | #ifdef __cplusplus 42 | } 43 | #endif 44 | 45 | #endif /* _PER_DECODER_H_ */ 46 | -------------------------------------------------------------------------------- /src/version.rc.in: -------------------------------------------------------------------------------- 1 | 1 VERSIONINFO 2 | FILEVERSION @LIB_VERSION_MAJOR@,@LIB_VERSION_MINOR@,@LIB_VERSION_PATCH@,0 3 | PRODUCTVERSION @LIB_VERSION_MAJOR@,@LIB_VERSION_MINOR@,@LIB_VERSION_PATCH@,0 4 | BEGIN 5 | BLOCK "StringFileInfo" 6 | BEGIN 7 | BLOCK "040904E4" 8 | BEGIN 9 | VALUE "FileVersion", "@LIB_VERSION_MAJOR@.@LIB_VERSION_MINOR@.@LIB_VERSION_PATCH@.0" 10 | VALUE "ProductVersion", "@LIB_VERSION_MAJOR@.@LIB_VERSION_MINOR@.@LIB_VERSION_PATCH@.0" 11 | VALUE "ProductName", "libIEC61850" 12 | VALUE "FileDescription", "libIEC61850 - open source library for IEC 61850" 13 | VALUE "LegalCopyright", "Dual license : Commercial or GPLv3" 14 | END 15 | END 16 | BLOCK "VarFileInfo" 17 | BEGIN 18 | VALUE "Translation", 0x400, 1252 19 | END 20 | END 21 | -------------------------------------------------------------------------------- /src/vs/stdbool.h: -------------------------------------------------------------------------------- 1 | /* just to make Visual Studio Compiler happy! */ 2 | #define bool int 3 | -------------------------------------------------------------------------------- /third_party/mbedtls/README: -------------------------------------------------------------------------------- 1 | README 2 | ------ 3 | 4 | At the moment libiec61850 provides support for two versions of mbedtls (2.28 and 3.6). 5 | 6 | mbedtls version 2.28 support different TLS versions up to TLS 1.2. 7 | 8 | mbedtls version 3.6 only support TLS 1.2 and TLS 1.3. Older versions are not supported. 9 | 10 | It is recommended that you use version 3.6 unless you need support for older versions of TLS. 11 | 12 | mbedtls-2.28 13 | ------------ 14 | 15 | Download the latest source tarball from version 2.27.x and extract it here in the subfolder mbedtls-2.28 16 | 17 | After extracting of the archive you may have to rename the folder to match the exact name "mbedtls-2.28". Otherwise the build system will not find the library. 18 | 19 | wget https://github.com/Mbed-TLS/mbedtls/archive/refs/tags/v2.28.8.tar.gz 20 | 21 | tar xzf v2.28.8.tar.gz 22 | 23 | mv mbedtls-2.28.8 mbedtls-2.28 24 | 25 | mbedtls-3.6.0 26 | ------------- 27 | 28 | You just have to download the archive and extract it in this folder. 29 | 30 | wget https://github.com/Mbed-TLS/mbedtls/archive/refs/tags/v3.6.0.tar.gz 31 | 32 | tar xzf v3.6.0.tar.gz 33 | 34 | -------------------------------------------------------------------------------- /third_party/sqlite/README: -------------------------------------------------------------------------------- 1 | Copy the sqlite amalagamation source code files (sqlite3.c sqlite3ext.h sqlite3.h) in this directory. You can download an archive with the files here: https://www.sqlite.org/download.html 2 | 3 | -------------------------------------------------------------------------------- /third_party/winpcap/README: -------------------------------------------------------------------------------- 1 | For GOOSE support add winpcap source and headers here. Rerun cmake to configure the build system for GOOSE support. 2 | 3 | You can get the winpcap headers and libraries here: https://www.winpcap.org/install/bin/WpdPack_4_1_2.zip 4 | 5 | From this package copy the "Lib" and "Include" folders in this directory. On 64 bit systems you have to replace the lib files from the "Lib" folder by the files in "Lib\x64". 6 | 7 | -------------------------------------------------------------------------------- /tools/model_generator/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /tools/model_generator/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | model_generator 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.jdt.core.javanature 16 | 17 | 18 | -------------------------------------------------------------------------------- /tools/model_generator/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 4 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve 5 | org.eclipse.jdt.core.compiler.compliance=1.6 6 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate 7 | org.eclipse.jdt.core.compiler.debug.localVariable=generate 8 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate 9 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 10 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 11 | org.eclipse.jdt.core.compiler.source=1.6 12 | -------------------------------------------------------------------------------- /tools/model_generator/build-dyn-code-gen.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | mkdir build 4 | 5 | find src/ -name "*.java" > listFile.tmp 6 | 7 | javac -target 1.6 -source 1.6 -d build @listFile.tmp 8 | 9 | jar cfm gendyncode.jar manifest-dyncCode.mf -C build/ com/ 10 | 11 | rm listFile.tmp 12 | rm -r build 13 | -------------------------------------------------------------------------------- /tools/model_generator/build-modelviewer.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | mkdir build 4 | 5 | find src/ -name "*.java" > listFile.tmp 6 | 7 | javac -target 1.6 -source 1.6 -d build @listFile.tmp 8 | 9 | jar cfm modelviewer.jar manifest-modelviewer.mf -C build/ com/ 10 | 11 | rm listFile.tmp 12 | rm -r build 13 | -------------------------------------------------------------------------------- /tools/model_generator/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | mkdir build 4 | 5 | find src/ -name "*.java" > listFile.tmp 6 | 7 | javac -target 1.6 -source 1.6 -d build @listFile.tmp 8 | 9 | jar cfm genmodel.jar manifest.mf -C build/ com/ 10 | 11 | rm listFile.tmp 12 | rm -r build 13 | -------------------------------------------------------------------------------- /tools/model_generator/build2.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | mkdir build 4 | 5 | find src/ -name "*.java" > listFile.tmp 6 | 7 | javac -target 1.8 -source 1.8 -d build @listFile.tmp 8 | 9 | jar cfm genconfig.jar manifest-dynamic.mf -C build/ com/ 10 | 11 | rm listFile.tmp 12 | rm -r build 13 | -------------------------------------------------------------------------------- /tools/model_generator/genconfig.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mz-automation/libiec61850/3a1480e5948ca53b4dcc5fa15b05598fa3322bb9/tools/model_generator/genconfig.jar -------------------------------------------------------------------------------- /tools/model_generator/gendyncode.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mz-automation/libiec61850/3a1480e5948ca53b4dcc5fa15b05598fa3322bb9/tools/model_generator/gendyncode.jar -------------------------------------------------------------------------------- /tools/model_generator/genmodel.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mz-automation/libiec61850/3a1480e5948ca53b4dcc5fa15b05598fa3322bb9/tools/model_generator/genmodel.jar -------------------------------------------------------------------------------- /tools/model_generator/manifest-dynamic.mf: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Main-Class: com.libiec61850.tools.DynamicModelGenerator 3 | -------------------------------------------------------------------------------- /tools/model_generator/manifest-dyncCode.mf: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Main-Class: com.libiec61850.tools.DynamicCodeGenerator 3 | -------------------------------------------------------------------------------- /tools/model_generator/manifest-modelviewer.mf: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Main-Class: com.libiec61850.tools.ModelViewer 3 | -------------------------------------------------------------------------------- /tools/model_generator/manifest.mf: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Main-Class: com.libiec61850.tools.StaticModelGenerator 3 | -------------------------------------------------------------------------------- /tools/model_generator/modelviewer.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mz-automation/libiec61850/3a1480e5948ca53b4dcc5fa15b05598fa3322bb9/tools/model_generator/modelviewer.jar -------------------------------------------------------------------------------- /tools/model_generator/src/com/libiec61850/scl/communication/Address.java: -------------------------------------------------------------------------------- 1 | package com.libiec61850.scl.communication; 2 | 3 | import java.util.LinkedList; 4 | import java.util.List; 5 | 6 | import org.w3c.dom.Node; 7 | 8 | import com.libiec61850.scl.ParserUtils; 9 | import com.libiec61850.scl.SclParserException; 10 | 11 | public class Address 12 | { 13 | Node node; 14 | 15 | private List

addressParameters = new LinkedList

(); 16 | 17 | public Address(Node addressNode) 18 | throws SclParserException 19 | { 20 | node = addressNode; 21 | 22 | List pNodes = ParserUtils.getChildNodesWithTag(node, "P"); 23 | 24 | for (Node pNode : pNodes) 25 | addressParameters.add(new P(pNode)); 26 | } 27 | 28 | public List

getAddressParameters() 29 | { 30 | return addressParameters; 31 | } 32 | 33 | public P getAddressParameter(String type) 34 | { 35 | for (P p : addressParameters) { 36 | if (p.getType().equals(type)) 37 | return p; 38 | } 39 | 40 | return null; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /tools/model_generator/src/com/libiec61850/scl/communication/P.java: -------------------------------------------------------------------------------- 1 | package com.libiec61850.scl.communication; 2 | 3 | import org.w3c.dom.Node; 4 | 5 | import com.libiec61850.scl.ParserUtils; 6 | import com.libiec61850.scl.SclParserException; 7 | 8 | public class P 9 | { 10 | private Node node; 11 | 12 | private String type; 13 | 14 | public P(Node pNode) throws SclParserException 15 | { 16 | node = pNode; 17 | 18 | this.type = ParserUtils.parseAttribute(node, "type"); 19 | 20 | if (this.type == null) 21 | throw new SclParserException(node, "type is missing in P element!"); 22 | } 23 | 24 | public String getType() 25 | { 26 | return type; 27 | } 28 | 29 | public String getText() 30 | { 31 | return node.getTextContent(); 32 | } 33 | 34 | public void setText(String text) 35 | { 36 | node.setTextContent(text); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /tools/model_generator/src/com/libiec61850/scl/model/Authentication.java: -------------------------------------------------------------------------------- 1 | package com.libiec61850.scl.model; 2 | 3 | /* 4 | * Authentication.java 5 | * 6 | * Copyright 2013 Michael Zillgith 7 | * 8 | * This file is part of libIEC61850. 9 | * 10 | * libIEC61850 is free software: you can redistribute it and/or modify 11 | * it under the terms of the GNU General Public License as published by 12 | * the Free Software Foundation, either version 3 of the License, or 13 | * (at your option) any later version. 14 | * 15 | * libIEC61850 is distributed in the hope that it will be useful, 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | * GNU General Public License for more details. 19 | * 20 | * You should have received a copy of the GNU General Public License 21 | * along with libIEC61850. If not, see . 22 | * 23 | * See COPYING file for the complete license text. 24 | */ 25 | 26 | import org.w3c.dom.Node; 27 | 28 | public class Authentication { 29 | 30 | public Authentication(Node authenticationNode) { 31 | // TODO Auto-generated constructor stub 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /tools/model_generator/src/com/libiec61850/scl/model/DataModelNode.java: -------------------------------------------------------------------------------- 1 | package com.libiec61850.scl.model; 2 | 3 | /* 4 | * DataModelNode.java 5 | * 6 | * Copyright 2013 Michael Zillgith 7 | * 8 | * This file is part of libIEC61850. 9 | * 10 | * libIEC61850 is free software: you can redistribute it and/or modify 11 | * it under the terms of the GNU General Public License as published by 12 | * the Free Software Foundation, either version 3 of the License, or 13 | * (at your option) any later version. 14 | * 15 | * libIEC61850 is distributed in the hope that it will be useful, 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | * GNU General Public License for more details. 19 | * 20 | * You should have received a copy of the GNU General Public License 21 | * along with libIEC61850. If not, see . 22 | * 23 | * See COPYING file for the complete license text. 24 | */ 25 | 26 | import com.libiec61850.scl.types.SclType; 27 | 28 | public interface DataModelNode { 29 | public String getName(); 30 | public DataModelNode getChildByName(String childName); 31 | public SclType getSclType(); 32 | public DataModelNode getParent(); 33 | } 34 | -------------------------------------------------------------------------------- /tools/model_generator/src/com/libiec61850/scl/model/Log.java: -------------------------------------------------------------------------------- 1 | package com.libiec61850.scl.model; 2 | 3 | import org.w3c.dom.Node; 4 | 5 | import com.libiec61850.scl.ParserUtils; 6 | import com.libiec61850.scl.SclParserException; 7 | 8 | /* 9 | * Copyright 2014 Michael Zillgith 10 | * 11 | * This file is part of libIEC61850. 12 | * 13 | * libIEC61850 is free software: you can redistribute it and/or modify 14 | * it under the terms of the GNU General Public License as published by 15 | * the Free Software Foundation, either version 3 of the License, or 16 | * (at your option) any later version. 17 | * 18 | * libIEC61850 is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | * GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with libIEC61850. If not, see . 25 | * 26 | * See COPYING file for the complete license text. 27 | */ 28 | 29 | public class Log { 30 | 31 | private String name; 32 | 33 | public Log(Node logNode) throws SclParserException { 34 | name = ParserUtils.parseAttribute(logNode, "name"); 35 | 36 | if (name == null) { 37 | /* Use default log name */ 38 | name = "GeneralLog"; 39 | } 40 | } 41 | 42 | public String getName() { 43 | return name; 44 | } 45 | 46 | } 47 | -------------------------------------------------------------------------------- /tools/model_generator/src/com/libiec61850/scl/model/RptEnabled.java: -------------------------------------------------------------------------------- 1 | package com.libiec61850.scl.model; 2 | 3 | import java.util.LinkedList; 4 | import java.util.List; 5 | 6 | import org.w3c.dom.Node; 7 | 8 | import com.libiec61850.scl.ParserUtils; 9 | 10 | public class RptEnabled { 11 | 12 | private int maxInstances = 1; 13 | private String desc = null; 14 | 15 | private List clientLNs = new LinkedList(); 16 | 17 | public RptEnabled(Node rptEnabledNode) { 18 | this.desc = ParserUtils.parseAttribute(rptEnabledNode, "desc"); 19 | String maxString = ParserUtils.parseAttribute(rptEnabledNode, "max"); 20 | 21 | if (maxString != null) { 22 | maxInstances = new Integer(maxString); 23 | } 24 | 25 | List clientLNNodes = ParserUtils.getChildNodesWithTag(rptEnabledNode, "ClientLN"); 26 | 27 | for (Node clientLNNode : clientLNNodes) { 28 | ClientLN clientLN = new ClientLN(clientLNNode); 29 | 30 | clientLNs.add(clientLN); 31 | } 32 | } 33 | 34 | public int getMaxInstances() { 35 | return maxInstances; 36 | } 37 | 38 | public String getDesc() { 39 | return desc; 40 | } 41 | 42 | public List getClientLNs() 43 | { 44 | return clientLNs; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /tools/model_generator/src/com/libiec61850/scl/types/IllegalValueException.java: -------------------------------------------------------------------------------- 1 | package com.libiec61850.scl.types; 2 | 3 | /* 4 | * Copyright 2013 Michael Zillgith 5 | * 6 | * This file is part of libIEC61850. 7 | * 8 | * libIEC61850 is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * libIEC61850 is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with libIEC61850. If not, see . 20 | * 21 | * See COPYING file for the complete license text. 22 | */ 23 | 24 | public class IllegalValueException extends Exception { 25 | public IllegalValueException(String message) { 26 | super(message); 27 | } 28 | 29 | } 30 | --------------------------------------------------------------------------------