├── .gitignore ├── HowTo_ADI-DALwithSerialTerminal750-652 ├── License ├── README.md └── ptxproj │ ├── rules │ ├── wago-demo-004-kbusdemo652.in │ └── wago-demo-004-kbusdemo652.make │ └── src │ └── kbusdemo652 │ ├── Makefile │ ├── kbus652.c │ ├── kbus652.h │ └── kbusdemo652.c ├── HowTo_ADI-MyKBusApplikation ├── HowTo_ADI-MyKBusApplication.txt ├── License ├── README.md ├── a800010_en - ADI-DAL for PFC firmware 11 patch 2.pdf └── ptxproj │ ├── rules │ ├── wago-demo-004-kbusdemo.in │ └── wago-demo-004-kbusdemo.make │ └── src_kbusdemo │ ├── Makefile │ ├── adi_functions.txt │ ├── getkbusheader.c │ ├── getkbusinfo.c │ └── kbusdemo.c ├── HowTo_AccessRetainVariables ├── License ├── README.md └── ptxproj │ ├── rules │ ├── wago-demo-wretain_example.in │ └── wago-demo-wretain_example.make │ └── src │ └── wretain_example-1.0.0.tgz ├── HowTo_AddCertmonger ├── README.md └── ptxproj │ ├── patches │ └── talloc-2.3.2 │ │ ├── 0001-Change-dependency-for-python-to-version-3.5.2.patch │ │ └── series │ └── rules │ ├── certmonger.in │ ├── certmonger.make │ ├── openldap.in │ ├── openldap.make │ ├── talloc.in │ ├── talloc.make │ ├── tevent.in │ └── tevent.make ├── HowTo_AddKbusModbusSlave ├── License ├── README.md ├── packages │ └── kbusmodbusslave_1.6.0_armhf.ipk ├── pfc │ └── etc_init.d │ │ └── kbusmodbusslave └── ptxproj │ ├── rules │ ├── kbusmodbusslave.in │ └── kbusmodbusslave.make │ └── src │ └── kbusmodbusslave-1.6.0.tar.bz2 ├── HowTo_AddMono ├── License ├── README.md └── ptxdist │ └── rules │ ├── host-mono.in │ ├── host-mono.make │ ├── mono.in │ └── mono.make ├── HowTo_AddMosquittoBroker ├── README.md ├── control ├── debian-binary ├── package │ └── mosquittoBroker_1.4.14_armhf.ipk ├── postinst └── ptxproj │ └── rules │ ├── mosquitto.in │ └── mosquitto.make ├── HowTo_AddOpenDDS ├── README.md └── ptxproj │ ├── patches │ └── OpenDDS-3.16 │ │ └── 0001-removePerlScriptAddShellScript.patch │ └── rules │ ├── opendds.in │ └── opendds.make ├── HowTo_AddPerfTool ├── LICENSE ├── README.md ├── package │ ├── kernel_4.9.115_armhf.ipk │ ├── libelf_0.170_armhf.ipk │ └── slang_2.3.0_armhf.ipk └── pfc │ └── rules │ ├── binutils.in │ └── binutils.make ├── HowTo_AddSQLiteCommandLineTool ├── README.md └── packages │ └── sqlite_3220000_armhf.ipk ├── HowTo_AddSer2Net ├── LICENSE ├── README.md ├── package │ ├── gensio_1.1_armhf.ipk │ ├── libyaml_0.2.2_armhf.ipk │ └── ser2net_4.0_armhf.ipk ├── pfc │ └── etc │ │ ├── init.d │ │ └── ser2net │ │ └── ser2net │ │ └── ser2net.yaml └── ptxproj │ ├── rules │ ├── gensio.in │ ├── gensio.make │ ├── libyaml.in │ ├── libyaml.make │ ├── ser2net.in │ └── ser2net.make │ └── src │ ├── gensio-1.1.tar.gz │ ├── libyaml-dist-0.2.2.tar.gz │ └── ser2net-4.0.tar.gz ├── HowTo_AddTRDP ├── LICENSE ├── README.md ├── packages │ └── trdp_1.4.1.0_armhf.ipk └── ptxproj │ ├── local_src │ └── trdp-1.4.1.0 │ │ ├── Deviation Request.txt │ │ ├── Doxyfile │ │ ├── Makefile │ │ ├── Makefile_Ladder │ │ ├── Makefile_MDLadder │ │ ├── Makefile_SE │ │ ├── Makefile_TAUL │ │ ├── Makefile_TAUL_library │ │ ├── Makefile_TAUL_library_APP │ │ ├── VSExpress2015 │ │ ├── TRDP │ │ │ └── TRDP.vcxproj │ │ ├── TRDP_DLL │ │ │ └── TRDP_DLL.vcxproj │ │ ├── TRDP_MDRepetitionCaller │ │ │ └── TRDP_MDRepetitionCaller.vcxproj │ │ ├── TRDP_MDRepetitionReplier │ │ │ └── TRDP_MDRepetitionReplier.vcxproj │ │ ├── TRDP_MDTest │ │ │ └── TRDP_MDTest.vcxproj │ │ ├── TRDP_MDTestBasic │ │ │ └── TRDP_MDTestBasic.vcxproj │ │ ├── TRDP_MDTests │ │ │ ├── MDtests.sln │ │ │ ├── trdp-light.vcproj │ │ │ └── trdp-md-test.vcproj │ │ ├── TRDP_MarshallTest │ │ │ └── TRDP_MarshallTest.vcxproj │ │ ├── TRDP_PDTest │ │ │ └── TRDP_PDTest.vcxproj │ │ ├── TRDP_PDTest_CB │ │ │ └── TRDP_PDTest_CB.vcxproj │ │ ├── TRDP_PDTests │ │ │ ├── PDtests.sln │ │ │ ├── trdp-light.vcproj │ │ │ └── trdp-pd-test.vcproj │ │ ├── TRDP_StatisticsTest │ │ │ └── TRDP_StatisticsTest.vcxproj │ │ ├── TRDP_Tests │ │ │ └── TRDP_Tests.vcxproj │ │ ├── TRDP_TrafficShapingTest │ │ │ └── TRDP_TrafficShapingTest.vcxproj │ │ ├── TRDP_VOSTest │ │ │ └── TRDP_VOSTest.vcxproj │ │ ├── TRDP_XMLPDTest │ │ │ └── TRDP_XMLPDTest.vcxproj │ │ ├── TRDP_XMLPrintTest │ │ │ └── TRDP_XMLPrintTest.vcxproj │ │ ├── TRDP_XMLTests │ │ │ ├── XMLtests.sln │ │ │ ├── trdp-xmlpd-test.vcproj │ │ │ └── trdp-xmlprint-test.vcproj │ │ └── Win_TRDP_VS2015.sln │ │ ├── Xcode │ │ └── trdp.xcodeproj │ │ │ └── project.pbxproj │ │ ├── component.mk │ │ ├── config │ │ ├── LINUX_PPC_config │ │ ├── LINUX_X86_64_config │ │ ├── LINUX_X86_config │ │ ├── LINUX_config │ │ ├── LINUX_imx7_config │ │ ├── OSX_X86_64_config │ │ ├── OSX_X86_config │ │ ├── POSIX_X86_config │ │ ├── QNX_X86_config │ │ ├── VXWORKS_KMODE_PPC_config │ │ ├── VXWORKS_PPC_config │ │ ├── WAGO_PFC_config │ │ ├── buildsettings_posix_TEMPLATE │ │ └── buildsettings_vxworks_TEMPLATE │ │ ├── doc │ │ ├── License Agreements │ │ │ └── Mozilla Public License, version 2.0.htm │ │ ├── TCN-TRDP2-D-BOM-033-xx - TRDP Reference Manual.pdf │ │ ├── TCN-TRDP4-D-BOM-030-12_-_TRDP_Release_Notes.pdf │ │ ├── images │ │ │ ├── SingleThreadedWorkflowPD.eps │ │ │ ├── SingleThreadedWorkflowPD.pdf │ │ │ └── TCNOpen.png │ │ └── memory.xls │ │ ├── example │ │ ├── SenderDemo │ │ │ ├── Controller.h │ │ │ ├── Controller.m │ │ │ ├── English.lproj │ │ │ │ ├── InfoPlist.strings │ │ │ │ └── MainMenu.xib │ │ │ ├── Info.plist │ │ │ ├── Resources │ │ │ │ ├── Bombardier.png │ │ │ │ ├── Engineering.png │ │ │ │ ├── FARsystems.png │ │ │ │ ├── NewTec.png │ │ │ │ └── Siemens.png │ │ │ ├── SenderDemo.xcodeproj │ │ │ │ ├── TemplateIcon.icns │ │ │ │ ├── bernd.mode1v3 │ │ │ │ ├── bernd.pbxuser │ │ │ │ ├── bloehr.mode1v3 │ │ │ │ ├── bloehr.pbxuser │ │ │ │ ├── project.pbxproj │ │ │ │ ├── project.xcworkspace │ │ │ │ │ ├── contents.xcworkspacedata │ │ │ │ │ └── xcuserdata │ │ │ │ │ │ └── bernd.xcuserdatad │ │ │ │ │ │ └── UserInterfaceState.xcuserstate │ │ │ │ └── xcuserdata │ │ │ │ │ └── bernd.xcuserdatad │ │ │ │ │ ├── xcdebugger │ │ │ │ │ └── Breakpoints.xcbkptlist │ │ │ │ │ └── xcschemes │ │ │ │ │ ├── SenderDemo.xcscheme │ │ │ │ │ └── xcschememanagement.plist │ │ │ ├── SenderDemo_Prefix.pch │ │ │ ├── main.m │ │ │ ├── pdsend.c │ │ │ └── pdsend.h │ │ ├── TAUL_PD │ │ │ ├── taulApp_PD_sample.c │ │ │ ├── taulApp_PD_sample.h │ │ │ └── xmlconfig.xml │ │ ├── echoCallback.c │ │ ├── echoPolling.c │ │ ├── example.xml │ │ ├── interoperability_test.xml │ │ ├── receiveHello.c │ │ ├── sendData.c │ │ ├── sendHello.c │ │ └── sourceFilter │ │ │ ├── NTT_CommonHeader.h │ │ │ └── sourceFiltering.c │ │ ├── ladder │ │ ├── readme-Ladder-support.txt │ │ ├── tau_ladder.c │ │ ├── tau_ladder.h │ │ ├── tau_ldLadder.c │ │ ├── tau_ldLadder.h │ │ ├── tau_ldLadder_config.c │ │ ├── tau_ldLadder_config.h │ │ └── tau_ldLadder_config_def.h │ │ ├── readme-makefile.txt │ │ ├── readme.txt │ │ ├── resources │ │ └── windows │ │ │ └── getopt │ │ │ ├── getopt.c │ │ │ └── getopt.h │ │ ├── rules.mk │ │ ├── spy │ │ ├── doc │ │ │ └── user-guide-a4.pdf │ │ ├── linux32 │ │ │ ├── readme.txt │ │ │ └── trdp_spy.so │ │ ├── linux64 │ │ │ ├── readme.txt │ │ │ └── trdp_spy.so │ │ ├── src │ │ │ ├── CMakeListsCustom.txt │ │ │ ├── README.txt │ │ │ ├── scripts │ │ │ │ ├── runIDE.bat │ │ │ │ └── setupEnv.bat │ │ │ └── trdp_spy │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── Doxyfile │ │ │ │ ├── Makefile.am │ │ │ │ ├── README.txt │ │ │ │ ├── TCN-TRDP2- TRDP SPY Reference Manual.pdf │ │ │ │ ├── doc │ │ │ │ └── custom │ │ │ │ │ ├── TCNOpen.png │ │ │ │ │ ├── blueTitleGraphic.png │ │ │ │ │ ├── docend.tex │ │ │ │ │ ├── docstart.tex │ │ │ │ │ ├── interfaceDiagram.png │ │ │ │ │ └── seqDiagram.png │ │ │ │ ├── moduleinfo.h │ │ │ │ ├── packet-trdp_spy.cpp │ │ │ │ ├── packet-trdp_spy.h │ │ │ │ ├── plugin.c │ │ │ │ ├── plugin.rc.in │ │ │ │ ├── trdpConfigHandler.cpp │ │ │ │ ├── trdpConfigHandler.h │ │ │ │ ├── trdp_env.cpp │ │ │ │ └── trdp_env.h │ │ └── win64 │ │ │ ├── Qt5Xmld.dll │ │ │ ├── readme.txt │ │ │ └── trdp_spy.dll │ │ ├── src │ │ ├── api │ │ │ ├── iec61375-2-3.h │ │ │ ├── tau_ctrl.h │ │ │ ├── tau_ctrl_types.h │ │ │ ├── tau_dnr.h │ │ │ ├── tau_dnr_types.h │ │ │ ├── tau_marshall.h │ │ │ ├── tau_tti.h │ │ │ ├── tau_tti_types.h │ │ │ ├── tau_xml.h │ │ │ ├── trdp-config.xsd │ │ │ ├── trdp_if_light.h │ │ │ └── trdp_types.h │ │ ├── common │ │ │ ├── tau_cstinfo.c │ │ │ ├── tau_ctrl.c │ │ │ ├── tau_dnr.c │ │ │ ├── tau_marshall.c │ │ │ ├── tau_tti.c │ │ │ ├── tau_xml.c │ │ │ ├── trdp_dllmain.c │ │ │ ├── trdp_if.c │ │ │ ├── trdp_if.h │ │ │ ├── trdp_mdcom.c │ │ │ ├── trdp_mdcom.h │ │ │ ├── trdp_pdcom.c │ │ │ ├── trdp_pdcom.h │ │ │ ├── trdp_private.h │ │ │ ├── trdp_stats.c │ │ │ ├── trdp_stats.h │ │ │ ├── trdp_utils.c │ │ │ ├── trdp_utils.h │ │ │ ├── trdp_xml.c │ │ │ └── trdp_xml.h │ │ └── vos │ │ │ ├── api │ │ │ ├── vos_mem.h │ │ │ ├── vos_shared_mem.h │ │ │ ├── vos_sock.h │ │ │ ├── vos_thread.h │ │ │ ├── vos_types.h │ │ │ └── vos_utils.h │ │ │ ├── common │ │ │ ├── vos_mem.c │ │ │ └── vos_utils.c │ │ │ ├── esp │ │ │ ├── vos_private.h │ │ │ ├── vos_sock.c │ │ │ └── vos_thread.c │ │ │ ├── posix │ │ │ ├── vos_private.h │ │ │ ├── vos_shared_mem.c │ │ │ ├── vos_sock.c │ │ │ └── vos_thread.c │ │ │ ├── vxworks │ │ │ ├── vos_private.h │ │ │ ├── vos_shared_mem.c │ │ │ ├── vos_sock.c │ │ │ └── vos_thread.c │ │ │ └── windows │ │ │ ├── vos_private.h │ │ │ ├── vos_shared_mem.c │ │ │ ├── vos_sock.c │ │ │ └── vos_thread.c │ │ └── test │ │ ├── diverse │ │ ├── LibraryTests.c │ │ ├── MCreceiver.c │ │ ├── crc-test.c │ │ ├── getStats.c │ │ ├── hosts_example │ │ ├── inaugTest.c │ │ ├── pdPull.c │ │ ├── pd_md_responder.c │ │ ├── subTest.c │ │ ├── test_mdSingle.c │ │ ├── test_memSizes.c │ │ ├── test_tau_dnr.c │ │ ├── test_tau_tti.c │ │ ├── test_trafficShaping.c │ │ ├── vtest.c │ │ └── vtest.h │ │ ├── laddermdtest │ │ ├── mdErrMode1 │ │ ├── mdErrMode2 │ │ ├── mdErrMode3 │ │ ├── mdErrMode4 │ │ ├── mdLiteral1 │ │ ├── mdLiteral2 │ │ ├── mdLiteral3 │ │ ├── mdLiteral4 │ │ ├── mdLiteral5 │ │ ├── mdLiteral6 │ │ ├── mdTest.txt │ │ ├── mdTestApp.h │ │ ├── mdTestCaller.c │ │ ├── mdTestCommon.c │ │ ├── mdTestLog.c │ │ ├── mdTestMain.c │ │ ├── mdTestMdReceiveManager.c │ │ └── mdTestReplier.c │ │ ├── ladderpdtest │ │ ├── ladderApplication_multiPD.c │ │ ├── ladderApplication_publisher.c │ │ ├── ladderApplication_subscriber.c │ │ └── pdTest.txt │ │ ├── lint │ │ ├── Lint_posix.bat │ │ ├── Lint_win.bat │ │ ├── _LINT_POS.TMP │ │ ├── _LINT_WIN.TMP │ │ ├── au-misra2.lnt │ │ ├── co-gnu3.lnt │ │ ├── std_posix.lnt │ │ └── std_win.lnt │ │ ├── localtest │ │ ├── api_test.c │ │ ├── hostsfile.txt │ │ └── test6.xml │ │ ├── marshalling │ │ ├── getStatsMarshall.c │ │ ├── test_marshalling.c │ │ ├── test_marshalling2.c │ │ ├── trdp_reserved.c │ │ └── trdp_reserved.h │ │ ├── mdpatterns │ │ ├── patterns.txt │ │ ├── rep-testcaller.c │ │ ├── rep-testreplier.c │ │ ├── trdp-md-test.c │ │ └── trdp-md-test.xml │ │ ├── pdpatterns │ │ ├── patterns.txt │ │ ├── readme.txt │ │ └── trdp-pd-test.c │ │ ├── udpmdcom │ │ ├── TRDP_UDPMDCom_TestPatterns.xlsx │ │ ├── mdTest4.c │ │ └── readme.txt │ │ └── xml │ │ ├── device1.xml │ │ ├── device2.xml │ │ ├── example.xml │ │ ├── pdsend_example.xml │ │ ├── readme.txt │ │ ├── trdp-xmlpd-test.c │ │ └── trdp-xmlprint-test.c │ └── rules │ ├── trdp.in │ └── trdp.make ├── HowTo_AddUserOrGroup └── README.md ├── HowTo_AddZeroMQ ├── README.md └── ptxproj │ └── rules │ ├── libzmq.in │ └── libzmq.make ├── HowTo_AutoCopySD-CardImage2InternalFlash ├── HowTo_AutoCopySD-CardImage2InternalFlashOnBoot.txt ├── LICENSE ├── README.md └── pfc │ ├── etc_init.d │ └── cpsd2intern │ └── usr_bin │ └── omsreader ├── HowTo_BuildRustExecutables └── README.md ├── HowTo_GenerateWUPFile └── README.md ├── HowTo_ReadOperatingModeSwitches ├── HowTo_ReadOperatingModeSwitches.txt ├── LICENSE ├── README.md ├── package │ └── omsreader_1.0_armhf.ipk └── pfc │ ├── rules │ ├── omsreader.in │ └── omsreader.make │ └── src_omsreader │ ├── Makefile │ └── omsreader.c ├── HowTo_Register-access-65x-demo ├── License ├── README.md ├── rules │ ├── wago-demo-register-access-65x.in │ └── wago-demo-register-access-65x.make └── src │ └── register-access-65x-demo │ ├── .gitignore │ ├── Doxyfile │ ├── Makefile │ └── register-access-65x-demo.c ├── HowTo_SplitAdminUser └── README.md ├── HowTo_libkbus-register-settings ├── License ├── Makefile ├── README.md ├── rules │ ├── wago-libkbus-register-settings-bin.in │ └── wago-libkbus-register-settings-bin.make └── src │ └── libkbus-register-settings-bin │ ├── .gitignore │ ├── Doxyfile │ ├── Makefile │ ├── kbus_register_settings.h │ ├── kbus_register_settings_common.h │ ├── libkbus-register-settings.a │ └── libkbus-register-settings.so.0.2.0 ├── LICENSE └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | # Packages # 2 | ############ 3 | # it's better to unpack these files and commit the raw source 4 | # git has its own built in compression methods 5 | *.7z 6 | *.dmg 7 | *.gz 8 | *.iso 9 | *.jar 10 | *.rar 11 | *.tar 12 | *.zip 13 | -------------------------------------------------------------------------------- /HowTo_ADI-DALwithSerialTerminal750-652/License: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 WAGO Kontakttechnik GmbH & Co. KG 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /HowTo_ADI-DALwithSerialTerminal750-652/README.md: -------------------------------------------------------------------------------- 1 | # HowTo: Utilize serial terminal 750-652 via DAL/ADI 2 | 3 | This HowTo descripes steps for using serial interface terminal "750-652" 4 | within your C/C++ application via DAL/ADI-API. 5 | 6 | Terminal 750-652 able to operate as RS232, RS422 or RS485. 7 | Terminal 750-652 use 6, 22 or 46 bytes in process image for data exchange. 8 | Data exchange controlled/monitored by 2 additional bytes. 9 | 10 | Use tool "Wago-IO-Check.exe" to configure terminals data width: 11 | - " 8byte": 2 control/status bytes + 6 data bytes(default) 12 | - "24byte": 2 control/status bytes + 22 data bytes 13 | - "48byte": 2 control/status bytes + 46 data bytes 14 | 15 | Use tool "Wago-IO-Check.exe" to configure terminals: 16 | - Operating-Mode: RS232, RS422 or RS485(default) 17 | - Baudrate, Databytes, Parity, Stopbits, FlowControl, Duplex-Mode 18 | 19 | File "kbus652.h" offer a set of functions for using serial interface terminal 750-652. 20 | 21 | IMPORTANT: 22 | Set "PISIZE_652" depending on terminals current data width. 23 | 24 | The KBUS could only be used by one master, it could be the CoDeSys-Runtime 25 | or your own application. But not both. 26 | Take care to stop CoDeSys-Runtime "plclinux_rt" before run this demo. 27 | 28 | The KBUS-API self is published in "adi_application_interface.h". 29 | 30 | ## 1) Copy content of attached folder "rules" into ~/\/rules. 31 | ``` 32 | >cp rules/* ~/wago//rules/ 33 | ``` 34 | 35 | ## 2) Copy folder "kbusdemo652" into ~/wago/\/src/ 36 | ``` 37 | >cp -R ./src/kbusdemo652 ~/wago//src/kbusdemo652 38 | ``` 39 | 40 | ## 3) Take a look into the source code files for additional information 41 | 42 | ## 4) Select kbusdemo652 in ptxdist to be build 43 | ``` 44 | >cd ~/wago/ 45 | >ptxdist menuconfig 46 | 47 | Wago Specific --> 48 | Demo --> 49 | [*] KBUS demo on using 750-652 50 | 51 | Save changes and exit. 52 | ``` 53 | 54 | ## 5) Build examples 55 | ``` 56 | >ptxdist clean kbusdemo652 && ptxdist targetinstall kbusdemo652 57 | ``` 58 | ## 6) Copy binaries to PFC200 and install it. 59 | ``` 60 | >cd ~/wago/ 61 | scp platform-wago-pfcXXX/packages/kbusdemo652_0.1.6_armhf.ipk root@:/root 62 | ``` 63 | Login to PFC via SSH 64 | 65 | ``` 66 | $ssh root@ 67 | 68 | >opkg install kbusdemo652_0.1.6_armhf.ipk 69 | ``` 70 | 71 | ## 7) Run executable 72 | ``` 73 | >/usr/bin/kbusdemo652 74 | ``` 75 | 76 | # Compatibility list: 77 | | PFC | Compatible | 78 | |:-------------|:------------:| 79 | | **PFC 100** | | 80 | | 750-8100 | Y | 81 | | 750-8101 | Y | 82 | | 750-8102 | Y | 83 | | | | 84 | | **PFC 200** | | 85 | | 750-8202 | Y | 86 | | 750-8203 | Y | 87 | | 750-8204 | Y | 88 | | 750-8206 | Y | 89 | | 750-8207 | Y | 90 | | 750-8208 | Y | 91 | | | | 92 | | **PFC 200 G2** | | 93 | | 750-8212 | Y | 94 | | 750-8213 | Y | 95 | | 750-8214 | Y | 96 | | 750-8216 | Y | 97 | 98 | -------------------------------------------------------------------------------- /HowTo_ADI-DALwithSerialTerminal750-652/ptxproj/rules/wago-demo-004-kbusdemo652.in: -------------------------------------------------------------------------------- 1 | ## SECTION=wago_specific_demo 2 | 3 | config KBUSDEMO652 4 | bool 5 | prompt "KBUS demo on using 750-652" 6 | help 7 | Demo Programs for using serial terminal 750-652 8 | -------------------------------------------------------------------------------- /HowTo_ADI-DALwithSerialTerminal750-652/ptxproj/src/kbusdemo652/Makefile: -------------------------------------------------------------------------------- 1 | ##---------------------------------------------------------------------------------------------------------------------- 2 | ### Copyright (c) WAGO Kontakttechnik GmbH & Co. KG 3 | ### 4 | ### PROPRIETARY RIGHTS of WAGO Kontakttechnik GmbH & Co. KG are involved in 5 | ### the subject matter of this material. All manufacturing, reproduction, 6 | ### use, and sales rights pertaining to this subject matter are governed 7 | ### by the license agreement. The recipient of this software implicitly 8 | ### accepts the terms of the license. 9 | ### 10 | ##---------------------------------------------------------------------------------------------------------------------- 11 | ##---------------------------------------------------------------------------------------------------------------------- 12 | ### 13 | ### \file makefile 14 | ### 15 | ### \version $Revision: $ 16 | ### 17 | ### \brief Makefile of the "C" Application 18 | ### 19 | ### \author cm : WAGO Kontakttechnik GmbH & Co. KG 20 | ##---------------------------------------------------------------------------------------------------------------------- 21 | 22 | #------------------------------------------------------------------------------ 23 | # Defines 24 | #------------------------------------------------------------------------------ 25 | CC=$(CROSS_COMPILE)gcc 26 | LD=$(CROSS_COMPILE)ld 27 | 28 | # Executabels name 29 | EXE = kbusdemo652 30 | # Source files 31 | SRC = kbusdemo652.c kbus652.c 32 | 33 | # Debug (compile with debugging information and without optimization) 34 | DEBUG = y 35 | 36 | #------------------------------------------------------------------------------ 37 | # Compiler flags 38 | #------------------------------------------------------------------------------ 39 | # Debug 40 | ifeq ($(DEBUG),n) 41 | CFLAGS += -O2 42 | else 43 | CFLAGS += -O0 -g3 44 | endif 45 | # warning flags 46 | CFLAGS += -Wall -Wstrict-prototypes -fno-strict-aliasing 47 | # use thread save versions 48 | CFLAGS += -D_GNU_SOURCE -pthread 49 | # Compiler includes 50 | CFLAGS += -I$(DIST_DIR)/sysroot-target/usr/include 51 | CFLAGS += -I$(DIST_DIR)/sysroot-target/usr/include/glib-2.0 52 | CFLAGS += -I$(DIST_DIR)/sysroot-target/usr/lib/glib-2.0/include 53 | 54 | #------------------------------------------------------------------------------ 55 | # Linker flags 56 | #------------------------------------------------------------------------------ 57 | LDFLAGS += -ldal -lglib-2.0 -lpthread -lgthread-2.0 -lffi -llibloader -ldl 58 | # Linker search directories 59 | EXTRALIBS += $(DIST_DIR)/sysroot-target/usr/lib/libdal.a 60 | 61 | #------------------------------------------------------------------------------ 62 | # Generate a object list from the source files 63 | #------------------------------------------------------------------------------ 64 | OBJ = $(SRC:.c=.o) 65 | 66 | #------------------------------------------------------------------------------ 67 | # Rules 68 | #------------------------------------------------------------------------------ 69 | 70 | all: $(OBJ) $(EXE) 71 | 72 | $(EXE): $(OBJ) 73 | $(CC) $(CFLAGS) $(OBJ) $(LDFLAGS) $(EXTRALIBS) -o $@ 74 | 75 | %.c%.o: 76 | $(CC) $(CFLAGS) $< -o $@ 77 | 78 | clean: 79 | @rm -f $(EXE) *.o 80 | -------------------------------------------------------------------------------- /HowTo_ADI-MyKBusApplikation/License: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 WAGO Kontakttechnik GmbH & Co. KG 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /HowTo_ADI-MyKBusApplikation/a800010_en - ADI-DAL for PFC firmware 11 patch 2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WAGO/pfc-howtos/7830974caec0023016e8096fcbf968283904db24/HowTo_ADI-MyKBusApplikation/a800010_en - ADI-DAL for PFC firmware 11 patch 2.pdf -------------------------------------------------------------------------------- /HowTo_ADI-MyKBusApplikation/ptxproj/rules/wago-demo-004-kbusdemo.in: -------------------------------------------------------------------------------- 1 | ## SECTION=wago_specific 2 | 3 | config KBUSDEMO 4 | bool 5 | prompt "KBUS demo programs on using ADI/DAL" 6 | help 7 | Demo Programs for kbus access 8 | -------------------------------------------------------------------------------- /HowTo_ADI-MyKBusApplikation/ptxproj/src_kbusdemo/Makefile: -------------------------------------------------------------------------------- 1 | ##---------------------------------------------------------------------------------------------------------------------- 2 | ### Copyright (c) WAGO Kontakttechnik GmbH & Co. KG 3 | ### 4 | ### PROPRIETARY RIGHTS of WAGO Kontakttechnik GmbH & Co. KG are involved in 5 | ### the subject matter of this material. All manufacturing, reproduction, 6 | ### use, and sales rights pertaining to this subject matter are governed 7 | ### by the license agreement. The recipient of this software implicitly 8 | ### accepts the terms of the license. 9 | ### 10 | ##---------------------------------------------------------------------------------------------------------------------- 11 | ##---------------------------------------------------------------------------------------------------------------------- 12 | ### 13 | ### \file Makefile 14 | ### 15 | ### \version $Revision: 6613 $ 16 | ### 17 | ### \brief Makefile for a set of "C" examples application 18 | ### Using KBUS interface 19 | ### 20 | ### \authors cm : WAGO Kontakttechnik GmbH & Co. KG 21 | ### ow : FH Bielefeld, 30.03.2015, add getkbusheader 22 | ##---------------------------------------------------------------------------------------------------------------------- 23 | 24 | # 25 | # add more flags here, but don't remove the "+=" 26 | # 27 | CFLAGS += -O0 -g3 -Wall 28 | #CFLAGS += -O2 -g -Wsign-compare -Wfloat-equal -Wformat-security #-Werror 29 | 30 | CFLAGS += -I$(SYSROOT)/usr/include/OsLinux/ 31 | CFLAGS += -I$(SYSROOT)/usr/include/dal/ 32 | #------------------------------------------------------------------------------ 33 | # Linker flags 34 | #------------------------------------------------------------------------------ 35 | LDFLAGS += -ldal -llibloader -lpthread -lffi -lrt -ldbus-glib-1 -lglib-2.0 36 | LDFLAGS += -ltypelabel -loslinux -ldbuskbuscommon 37 | 38 | 39 | all: kbusdemo getkbusinfo 40 | 41 | kbusdemo: kbusdemo.o 42 | $(CC) -o kbusdemo kbusdemo.o $(LDFLAGS) 43 | 44 | getkbusinfo: getkbusinfo.o 45 | $(CC) -o getkbusinfo getkbusinfo.o $(LDFLAGS) 46 | 47 | 48 | #$(EXTRALIBS) 49 | 50 | clean: 51 | -rm -f kbusdemo 52 | -rm -f getkbusinfo 53 | 54 | install: 55 | 56 | 57 | .PHONY: all install clean 58 | 59 | # end of development makefile 60 | 61 | -------------------------------------------------------------------------------- /HowTo_AccessRetainVariables/ptxproj/rules/wago-demo-wretain_example.in: -------------------------------------------------------------------------------- 1 | ## SECTION=wago_specific_demo 2 | 3 | config WRETAIN_EXAMPLE 4 | bool 5 | prompt "Retain Variables API usage: C & C++" 6 | select WRETAIN 7 | help 8 | Examples of usage of Retain Variables API (C/C++). 9 | 10 | -------------------------------------------------------------------------------- /HowTo_AccessRetainVariables/ptxproj/src/wretain_example-1.0.0.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WAGO/pfc-howtos/7830974caec0023016e8096fcbf968283904db24/HowTo_AccessRetainVariables/ptxproj/src/wretain_example-1.0.0.tgz -------------------------------------------------------------------------------- /HowTo_AddCertmonger/README.md: -------------------------------------------------------------------------------- 1 | # Add certmonger (certmonger-0.79.15) 2 | 3 | ## This HowTo describes the procedure of compiling "certmonger" for PFC-G2. 4 | 5 | # Introduction 6 | The certmonger daemon monitors certificates for impending expiration, and can optionally refresh soon-to-be-expired certificates with the help of a CA. If told to, it can drive the entire enrollment process from key generation through enrollment and refresh. 7 | 8 | It can work with either flat files, like those used by OpenSSL, or with NSS databases. 9 | 10 | # PREREQUISITES: 11 | This HowTo is based on a clean installation of Ubuntu LTS, with an installed 12 | and working WAGO Board-Support Package for PFC200-G2. 13 | Working means that you successfully built the standard image “sd.hdimg”. 14 | 15 | # Installation and usage 16 | 17 | ## 1) On development host (Ubuntu) 18 | ### 1.1) Copy rule and patch files to your ptxdist-project directory 19 | ``` 20 | >cp -v ptxproj/rules/* ~//rules/ 21 | >cp -vR ptxproj/patches/* -//patches/ 22 | ``` 23 | 24 | ### 1.2) Select package "certmonger" for build in ptxdist 25 | ``` 26 | >cd ~// 27 | >ptxdist menuconfig 28 | ``` 29 | 30 | ``` 31 | Networking Tools --> 32 | 33 | [*] certmonger ( Select with [Space] and press [enter] ) 34 | 35 | Leave window with [Exit], [Exit], and [Yes] 36 | ``` 37 | 38 | ### 1.3) Clean the "certmonger" package 39 | ``` 40 | >cd ~// 41 | >ptxdist clean certmonger 42 | ``` 43 | 44 | ### 1.4) Build the "certmonger" package 45 | ``` 46 | >cd ~// 47 | >ptxdist targetinstall certmonger # Build certmonger package only. 48 | ``` 49 | 50 | If you see the "finished target certmonger.targetinstall.post" at the end of the run,it is time for a :) 51 | 52 | Afterward you will find the OPKG installer package file: 53 | - ~//platform-wago-pfcXXX/packages/certmonger_0.79.15_armhf.ipk 54 | 55 | ## ATTENTION 56 | Keep in mind certmonger depends on several libraries and tools. For example: 57 | * TALLOC 58 | * TEVENT 59 | * DBUS 60 | * NSS 61 | * LIBXML2 62 | * LIBCURL 63 | * JANSSON 64 | * KRB5 65 | * OPENLDAP 66 | * LIBPOPT 67 | 68 | To use certmonger all of theses packages has to be install separately on the PFC. There are also more 69 | dependencies for the above listed ones. So the best idea is to build a complete image to deploy to the 70 | PFC-G2 71 | 72 | ### 1.5) Build complete firmware image "sd.hdimg" which includes packages certmonger and all dependencies. 73 | ``` 74 | >cd ~// 75 | >ptxdist images 76 | ``` 77 | 78 | After successfully build copy the image file "sd.hdimg" with command "dd" to SD-Card and boot the PFC200-G2 from it. 79 | 80 | # Compatibility list: 81 | It's only compatible with PFC-G2 because of memory-limitation of PFC-G1 and PFC100 82 | 83 | | PFC | Compatible | 84 | |:-------------|:------------:| 85 | | **PFC 100** | | 86 | | 750-8100 | N | 87 | | 750-8101 | N | 88 | | 750-8102 | N | 89 | | | | 90 | | **PFC 200** | | 91 | | 750-8202 | N | 92 | | 750-8203 | N | 93 | | 750-8204 | N | 94 | | 750-8206 | N | 95 | | 750-8207 | N | 96 | | 750-8208 | N | 97 | | | | 98 | | **PFC 200 G2** | | 99 | | 750-8212 | Y | 100 | | 750-8213 | Y | 101 | | 750-8214 | Y | 102 | | 750-8216 | Y | 103 | -------------------------------------------------------------------------------- /HowTo_AddCertmonger/ptxproj/patches/talloc-2.3.2/0001-Change-dependency-for-python-to-version-3.5.2.patch: -------------------------------------------------------------------------------- 1 | From d75ec13a6ed8b864f0524827f268a8dedc4325df Mon Sep 17 00:00:00 2001 2 | From: Thomas Brandt 3 | Date: Tue, 25 Jan 2022 13:27:02 +0100 4 | Subject: [PATCH 1/1] Change dependency for python to version 3.5.2 5 | 6 | Signed-off-by: Thomas Brandt 7 | --- 8 | buildtools/wafsamba/samba_python.py | 2 +- 9 | 1 file changed, 1 insertion(+), 1 deletion(-) 10 | 11 | diff --git a/buildtools/wafsamba/samba_python.py b/buildtools/wafsamba/samba_python.py 12 | index 002357b..05b7bbc 100644 13 | --- a/buildtools/wafsamba/samba_python.py 14 | +++ b/buildtools/wafsamba/samba_python.py 15 | @@ -5,7 +5,7 @@ from waflib import Build, Logs, Utils, Configure, Errors 16 | from waflib.Configure import conf 17 | 18 | @conf 19 | -def SAMBA_CHECK_PYTHON(conf, version=(3,6,0)): 20 | +def SAMBA_CHECK_PYTHON(conf, version=(3,5,2)): 21 | 22 | if conf.env.enable_fuzzing: 23 | version=(3,5,0) 24 | -- 25 | 2.34.1 26 | 27 | -------------------------------------------------------------------------------- /HowTo_AddCertmonger/ptxproj/patches/talloc-2.3.2/series: -------------------------------------------------------------------------------- 1 | 0001-Change-dependency-for-python-to-version-3.5.2.patch 2 | -------------------------------------------------------------------------------- /HowTo_AddCertmonger/ptxproj/rules/certmonger.in: -------------------------------------------------------------------------------- 1 | ## SECTION=networking 2 | 3 | config CERTMONGER 4 | bool 5 | select TALLOC 6 | select TEVENT 7 | select DBUS 8 | select NSS 9 | select LIBXML2 10 | select LIBCURL 11 | select JANSSON 12 | select KRB5 13 | select OPENLDAP 14 | select LIBPOPT 15 | prompt "certmonger" 16 | help 17 | The certmonger daemon monitors certificates for impending expiration, and can optionally refresh soon-to-be-expired certificates with the help of a CA. 18 | -------------------------------------------------------------------------------- /HowTo_AddCertmonger/ptxproj/rules/openldap.in: -------------------------------------------------------------------------------- 1 | ## SECTION=networking 2 | 3 | menuconfig OPENLDAP 4 | tristate 5 | prompt "openldap " 6 | select ZLIB 7 | select LIBC_RESOLV 8 | select LIBC_PTHREAD 9 | select OPENSSL if OPENLDAP_TLS_OPENSSL 10 | select GNUTLS if OPENLDAP_TLS_GNUTLS 11 | help 12 | OpenLDAP Software is an open source implementation of the Lightweight 13 | Directory Access Protocol. The suite includes: 14 | 15 | - slapd: stand-alone LDAP daemon (server) 16 | - libraries implementing the LDAP protocol, and 17 | - utilities, tools, and sample clients. 18 | 19 | if OPENLDAP 20 | 21 | config OPENLDAP_SLAPD 22 | bool 23 | prompt "slapd support" 24 | help 25 | Enable/disable building and installation of slapd (the server). 26 | 27 | choice 28 | prompt "TLS/SSL support " 29 | 30 | config OPENLDAP_TLS_DISABLED 31 | bool "disabled" 32 | 33 | config OPENLDAP_TLS_OPENSSL 34 | bool "openssl" 35 | 36 | config OPENLDAP_TLS_GNUTLS 37 | depends on BROKEN 38 | bool "gnutls" 39 | 40 | endchoice 41 | 42 | config OPENLDAP_INSTALL_UTILITIES 43 | bool 44 | prompt "install utilities" 45 | help 46 | Installs various utilities: ldapadd, ldapcompare, ldapdelete, ldapexop, 47 | ldapmodify, ldapmodrdn, ldappasswd, ldapsearch, ldapurl, ldapwhoami. 48 | 49 | endif 50 | -------------------------------------------------------------------------------- /HowTo_AddCertmonger/ptxproj/rules/talloc.in: -------------------------------------------------------------------------------- 1 | ## SECTION=system_libraries 2 | 3 | config TALLOC 4 | tristate 5 | prompt "talloc" 6 | select LIBBSD 7 | select HOST_SYSTEM_PYTHON3 8 | help 9 | hierarchical pool based memory allocator 10 | -------------------------------------------------------------------------------- /HowTo_AddCertmonger/ptxproj/rules/talloc.make: -------------------------------------------------------------------------------- 1 | # -*-makefile-*- 2 | # 3 | # Copyright (C) 2021 by Michael Olbrich 4 | # 5 | # For further information about the PTXdist project and license conditions 6 | # see the README file. 7 | # 8 | 9 | # 10 | # We provide this package 11 | # 12 | PACKAGES-$(PTXCONF_TALLOC) += talloc 13 | 14 | # 15 | # Paths and names 16 | # 17 | TALLOC_VERSION := 2.3.2 18 | TALLOC_MD5 := 3376a86bdf9dd4abc6b8d8d645390902 19 | TALLOC := talloc-$(TALLOC_VERSION) 20 | TALLOC_SUFFIX := tar.gz 21 | TALLOC_URL := https://www.samba.org/ftp/talloc/$(TALLOC).$(TALLOC_SUFFIX) 22 | TALLOC_SOURCE := $(SRCDIR)/$(TALLOC).$(TALLOC_SUFFIX) 23 | TALLOC_DIR := $(BUILDDIR)/$(TALLOC) 24 | TALLOC_LICENSE := GPL-3.0-or-later AND LGPL-3.0-or-later 25 | # cross-compile runtime checks. Initial file generated with 26 | # --cross-execute=$(PTXDIST_SYSROOT_CROSS)/bin/qemu-cross 27 | TALLOC_CONFIG = $(call ptx/get-alternative, config/talloc, cross-answers) 28 | 29 | # ---------------------------------------------------------------------------- 30 | # Prepare 31 | # ---------------------------------------------------------------------------- 32 | 33 | TALLOC_CONF_TOOL := NO 34 | TALLOC_CONF_OPT := \ 35 | --without-gettext \ 36 | --disable-python \ 37 | --prefix=/usr \ 38 | --sysconfdir=/etc \ 39 | --localstatedir=/var \ 40 | --libdir=/usr/lib \ 41 | --bundled-libraries=NONE \ 42 | --disable-rpath \ 43 | --disable-rpath-install \ 44 | --disable-rpath-private-install \ 45 | --pidl-developer \ 46 | --disable-warnings-as-errors \ 47 | --fatal-errors \ 48 | --enable-gccdeps \ 49 | --pedantic \ 50 | --cross-compile \ 51 | --cross-execute=/does/not/exist/and/triggers/exceptions \ 52 | --cross-answers=$(TALLOC_DIR)/cross-answers 53 | 54 | 55 | $(STATEDIR)/talloc.prepare: 56 | @$(call targetinfo) 57 | @UNAME_M=$(PTXCONF_ARCH_STRING) \ 58 | UNAME_R=$(KERNEL_VERSION) \ 59 | UNAME_V=$(if $(KERNEL_HEADER_VERSION),$(KERNEL_HEADER_VERSION),$(KERNEL_VERSION)) \ 60 | HAS_64BIT=$(call ptx/ifdef,PTXCONF_ARCH_LP64,OK,NO) \ 61 | ptxd_replace_magic $(TALLOC_CONFIG) > $(TALLOC_DIR)/cross-answers 62 | @echo ----------------------------------------- 63 | @echo $(HOST_SYSTEM_PYTHON) 64 | @echo ----------------------------------------- 65 | @$(call world/execute, TALLOC, $(SYSTEMPYTHON3) ./buildtools/bin/waf configure $(TALLOC_CONF_OPT)) 66 | @$(call touch) 67 | 68 | # ---------------------------------------------------------------------------- 69 | # Target-Install 70 | # ---------------------------------------------------------------------------- 71 | 72 | $(STATEDIR)/talloc.targetinstall: 73 | @$(call targetinfo) 74 | 75 | @$(call install_init, talloc) 76 | @$(call install_fixup, talloc,PRIORITY,optional) 77 | @$(call install_fixup, talloc,SECTION,base) 78 | @$(call install_fixup, talloc,AUTHOR,"Michael Olbrich ") 79 | @$(call install_fixup, talloc,DESCRIPTION,missing) 80 | 81 | @$(call install_lib, talloc, 0, 0, 0644, libtalloc) 82 | 83 | @$(call install_finish, talloc) 84 | 85 | @$(call touch) 86 | 87 | # vim: syntax=make 88 | -------------------------------------------------------------------------------- /HowTo_AddCertmonger/ptxproj/rules/tevent.in: -------------------------------------------------------------------------------- 1 | ## SECTION=system_libraries 2 | 3 | config TEVENT 4 | bool 5 | prompt "tevent" 6 | select TALLOC 7 | help 8 | event system based on the talloc memory management library 9 | -------------------------------------------------------------------------------- /HowTo_AddCertmonger/ptxproj/rules/tevent.make: -------------------------------------------------------------------------------- 1 | # -*-makefile-*- 2 | # 3 | # Copyright (C) 2022 by WAGO GmbH (Thomas.Brandt@wago.com) 4 | # 5 | # For further information about the PTXdist project and license conditions 6 | # see the README file. 7 | # 8 | 9 | # 10 | # We provide this package 11 | # 12 | PACKAGES-$(PTXCONF_TEVENT) += tevent 13 | 14 | # 15 | # Paths and names 16 | # 17 | TEVENT_VERSION := 0.9.8 18 | TEVENT_MD5 := edc29f20fb508b6b860d70f0f07ccd3f 19 | TEVENT := tevent-$(TEVENT_VERSION) 20 | TEVENT_SUFFIX := tar.gz 21 | TEVENT_URL := https://www.samba.org/ftp/tevent/$(TEVENT).$(TEVENT_SUFFIX) 22 | TEVENT_SOURCE := $(SRCDIR)/$(TEVENT).$(TEVENT_SUFFIX) 23 | TEVENT_DIR := $(BUILDDIR)/$(TEVENT) 24 | TEVENT_LICENSE := GPL-3.0-or-later AND LGPL-3.0-or-later 25 | # cross-compile runtime checks. Initial file generated with 26 | # --cross-execute=$(PTXDIST_SYSROOT_CROSS)/bin/qemu-cross 27 | TEVENT_CONFIG = $(call ptx/get-alternative, config/tevent, cross-answers) 28 | 29 | # ---------------------------------------------------------------------------- 30 | # Prepare 31 | # ---------------------------------------------------------------------------- 32 | 33 | TEVENT_CONF_TOOL := autoconf 34 | TEVENT_CONF_OPT := $(CROSS_AUTOCONF_USR) \ 35 | PKG_CONFIG_PATH=$(PTXDIST_SYSROOT_TARGET)/usr/lib/pkgconfig 36 | 37 | # ---------------------------------------------------------------------------- 38 | # Target-Install 39 | # ---------------------------------------------------------------------------- 40 | 41 | $(STATEDIR)/tevent.targetinstall: 42 | @$(call targetinfo) 43 | 44 | @$(call install_init, tevent) 45 | @$(call install_fixup, tevent,PRIORITY,optional) 46 | @$(call install_fixup, tevent,SECTION,base) 47 | @$(call install_fixup, tevent,AUTHOR,"Thomas Brandt ") 48 | @$(call install_fixup, tevent,DESCRIPTION,missing) 49 | 50 | @$(call install_lib, tevent, 0, 0, 0644, libtevent) 51 | 52 | @$(call install_finish, tevent) 53 | 54 | @$(call touch) 55 | 56 | # vim: syntax=make 57 | -------------------------------------------------------------------------------- /HowTo_AddKbusModbusSlave/packages/kbusmodbusslave_1.6.0_armhf.ipk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WAGO/pfc-howtos/7830974caec0023016e8096fcbf968283904db24/HowTo_AddKbusModbusSlave/packages/kbusmodbusslave_1.6.0_armhf.ipk -------------------------------------------------------------------------------- /HowTo_AddKbusModbusSlave/pfc/etc_init.d/kbusmodbusslave: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # Starts and stops kbusmodbusslave 3 | # /etc/init.d/kbusmodbusslave 4 | ### BEGIN INIT INFO 5 | # Provides: kbusmodbusslave 6 | # Required-Start: $syslog 7 | # Required-Stop: $syslog 8 | # Default-Start: 2 3 4 5 9 | # Default-Stop: 0 1 6 10 | # Short-Description: kbusmodbusslave initialisation 11 | ### END INIT INFO 12 | 13 | DAEMON_PATH="/usr/bin" 14 | DAEMON="kbusmodbusslave" 15 | DAEMONOPTS="" 16 | 17 | NAME=kbusmodbusslave 18 | DESC="KBUS Modbus Slave for PFC" 19 | 20 | PIDFILE=/var/run/$NAME.pid 21 | SCRIPTNAME=/etc/init.d/$NAME 22 | 23 | case "$1" in 24 | start) 25 | printf "%-50s" "Starting $NAME..." 26 | cd $DAEMON_PATH 27 | PID=`$DAEMON $DAEMONOPTS > /dev/null 2>&1 & echo $!` 28 | #echo "Saving PID" $PID " to " $PIDFILE 29 | if [ -z $PID ]; then 30 | printf "%s\n" "Fail" 31 | else 32 | echo $PID > $PIDFILE 33 | printf "%s\n" "Ok" 34 | fi 35 | ;; 36 | status) 37 | printf "%-50s" "Checking $NAME..." 38 | if [ -f $PIDFILE ]; then 39 | PID=`cat $PIDFILE` 40 | if [ -z "`ps axf | grep ${PID} | grep -v grep`" ]; then 41 | printf "%s\n" "Process dead but pidfile exists" 42 | else 43 | echo "Running" 44 | fi 45 | else 46 | printf "%s\n" "Service not running" 47 | fi 48 | ;; 49 | stop) 50 | printf "%-50s" "Stopping $NAME" 51 | PID=`cat $PIDFILE` 52 | cd $DAEMON_PATH 53 | if [ -f $PIDFILE ]; then 54 | kill -HUP $PID 55 | printf "%s\n" "Ok" 56 | rm -f $PIDFILE 57 | else 58 | printf "%s\n" "pidfile not found" 59 | fi 60 | ;; 61 | 62 | restart) 63 | $0 stop 64 | $0 start 65 | ;; 66 | 67 | *) 68 | echo "Usage: $0 {status|start|stop|restart}" 69 | exit 1 70 | esac 71 | -------------------------------------------------------------------------------- /HowTo_AddKbusModbusSlave/ptxproj/rules/kbusmodbusslave.in: -------------------------------------------------------------------------------- 1 | ## SECTION=wago_specific_dal 2 | 3 | config KBUSMODBUSSLAVE 4 | bool 5 | default n 6 | prompt "Modbus-PFC-Slave" 7 | select LIBMODBUS 8 | help 9 | Standalone Modbus slave which mimics the 750-352 coupler. IO-Terminals accessed via KBUS. 10 | -------------------------------------------------------------------------------- /HowTo_AddKbusModbusSlave/ptxproj/src/kbusmodbusslave-1.6.0.tar.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WAGO/pfc-howtos/7830974caec0023016e8096fcbf968283904db24/HowTo_AddKbusModbusSlave/ptxproj/src/kbusmodbusslave-1.6.0.tar.bz2 -------------------------------------------------------------------------------- /HowTo_AddMono/License: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 WAGO Kontakttechnik GmbH & Co. KG 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /HowTo_AddMono/ptxdist/rules/host-mono.in: -------------------------------------------------------------------------------- 1 | ## SECTION=hosttools_noprompt 2 | 3 | config HOST_MONO 4 | tristate 5 | select GLIB 6 | prompt "host-mono" 7 | help 8 | mono is a runtime implementation of the ECMA Common Language 9 | Infrastructure. It can be used to run ECMA and .NET applications. 10 | -------------------------------------------------------------------------------- /HowTo_AddMono/ptxdist/rules/host-mono.make: -------------------------------------------------------------------------------- 1 | # -*-makefile-*- 2 | # 3 | # Copyright (C) 2017 by Georg Schöffl 4 | # 5 | # See CREDITS for details about who has contributed to this project. 6 | # 7 | # For further information about the PTXdist project and license conditions 8 | # see the README file. 9 | # 10 | 11 | # 12 | # We provide this package 13 | # 14 | HOST_PACKAGES-$(PTXCONF_HOST_MONO) += host-mono 15 | 16 | # 17 | # Paths and names 18 | # 19 | #http://download.mono-project.com/sources/mono/mono-6.4.0.198.tar.xz 20 | HOST_MONO_VERSION := 6.4.0.198 21 | HOST_MONO_MD5 := e7936bca6838002daf5018bc382adb11 22 | HOST_MONO := mono-$(HOST_MONO_VERSION) 23 | HOST_MONO_SUFFIX := tar.xz 24 | HOST_MONO_URL := http://download.mono-project.com/sources/mono/$(HOST_MONO).$(HOST_MONO_SUFFIX) 25 | HOST_MONO_SOURCE := $(SRCDIR)/$(HOST_MONO).$(HOST_MONO_SUFFIX) 26 | HOST_MONO_DIR := $(HOST_BUILDDIR)/$(HOST_MONO) 27 | HOST_MONO_LICENSE := unknown 28 | 29 | # ---------------------------------------------------------------------------- 30 | # Extract 31 | # ---------------------------------------------------------------------------- 32 | 33 | $(STATEDIR)/host-mono.extract: 34 | @$(call targetinfo) 35 | @$(call clean, $(HOST_MONO_DIR)) 36 | @$(call extract, HOST_MONO) 37 | @$(call patchin, HOST_MONO) 38 | @$(call touch) 39 | 40 | # ---------------------------------------------------------------------------- 41 | # Prepare 42 | # ---------------------------------------------------------------------------- 43 | 44 | HOST_MONO_CONF_ENV := \ 45 | $(HOST_ENV) \ 46 | CPPFLAGS="$(HOST_CPPFLAGS)" 47 | # 48 | # autoconf 49 | # 50 | HOST_MONO_CONF_TOOL := autoconf 51 | HOST_MONO_CONF_OPT := \ 52 | $(HOST_AUTOCONF_USR) \ 53 | --with-sigaltstack=no \ 54 | --disable-gtk-doc \ 55 | --with-mcs-docs=no \ 56 | --with-moonlight=no \ 57 | --with-ikvm-native=no \ 58 | --enable-minimal=profiler,debug 59 | # mono_cv_uscore=no \ 60 | 61 | # ---------------------------------------------------------------------------- 62 | # Host-Install 63 | # ---------------------------------------------------------------------------- 64 | # The host build is needed by MONO. Installation see MONO package. 65 | 66 | # vim: syntax=make 67 | -------------------------------------------------------------------------------- /HowTo_AddMono/ptxdist/rules/mono.in: -------------------------------------------------------------------------------- 1 | ## SECTION=bytecode_engines 2 | 3 | config MONO 4 | tristate 5 | select HOST_MONO 6 | select HOST_CMAKE 7 | prompt "mono" 8 | help 9 | mono is a runtime implementation of the ECMA Common Language 10 | Infrastructure. It can be used to run ECMA and .NET applications. 11 | -------------------------------------------------------------------------------- /HowTo_AddMosquittoBroker/control: -------------------------------------------------------------------------------- 1 | Package: mosquitto 2 | Priority: optional 3 | Version: 1.4.14 4 | Section: base 5 | Architecture: armhf 6 | Maintainer: "Helmut.Saal@wago.com" 7 | Depends: openssl, util-linux-ng 8 | Source: 9 | Description: mosquitto broker 10 | -------------------------------------------------------------------------------- /HowTo_AddMosquittoBroker/debian-binary: -------------------------------------------------------------------------------- 1 | 2.0 2 | -------------------------------------------------------------------------------- /HowTo_AddMosquittoBroker/package/mosquittoBroker_1.4.14_armhf.ipk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WAGO/pfc-howtos/7830974caec0023016e8096fcbf968283904db24/HowTo_AddMosquittoBroker/package/mosquittoBroker_1.4.14_armhf.ipk -------------------------------------------------------------------------------- /HowTo_AddMosquittoBroker/postinst: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # IPKG post inst script: 3 | # WAGO Kontakttechnik GmbH & Co. KG / Helmut.Saal@wago.com 4 | 5 | mkdir /etc/mosquitto/ 6 | touch /etc/mosquitto/mosquitto.conf 7 | echo "user user" > /etc/mosquitto/mosquitto.conf 8 | chmod 644 /etc/mosquitto/mosquitto.conf 9 | 10 | touch /etc/init.d/startmosquitto 11 | echo "mosquitto -c /etc/mosquitto/mosquitto.conf -d" > /etc/init.d/startmosquitto 12 | chmod 744 /etc/init.d/startmosquitto 13 | 14 | ln -s /etc/init.d/startmosquitto /etc/rc.d/S99_startmosquitto 15 | 16 | mosquitto -c /etc/mosquitto/mosquitto.conf -d 17 | -------------------------------------------------------------------------------- /HowTo_AddMosquittoBroker/ptxproj/rules/mosquitto.in: -------------------------------------------------------------------------------- 1 | ## SECTION=networking 2 | 3 | menuconfig MOSQUITTO 4 | tristate 5 | prompt "mosquitto " 6 | select OPENSSL if MOSQUITTO_TLS 7 | select C_ARES if MOSQUITTO_SRV 8 | select LIBUUID if MOSQUITTO_UUID 9 | help 10 | Open source MQTT message broker, library, and client. 11 | 12 | if MOSQUITTO 13 | 14 | config MOSQUITTO_BROKER 15 | bool 16 | prompt "Broker" 17 | 18 | config MOSQUITTO_CLIENTS 19 | bool 20 | prompt "Clients" 21 | 22 | config MOSQUITTO_TLS 23 | bool 24 | prompt "TLS support" 25 | 26 | config MOSQUITTO_SRV 27 | bool 28 | prompt "SRV lookup support" 29 | 30 | config MOSQUITTO_UUID 31 | bool 32 | prompt "UUID as client id" 33 | 34 | endif 35 | 36 | # vim: ft=kconfig noet tw=72 37 | -------------------------------------------------------------------------------- /HowTo_AddMosquittoBroker/ptxproj/rules/mosquitto.make: -------------------------------------------------------------------------------- 1 | # -*-makefile-*- 2 | # 3 | # Copyright (C) 2017 by Alexander Dahl 4 | # 5 | # See CREDITS for details about who has contributed to this project. 6 | # 7 | # For further information about the PTXdist project and license conditions 8 | # see the README file. 9 | # 10 | 11 | # 12 | # We provide this package 13 | # 14 | PACKAGES-$(PTXCONF_MOSQUITTO) += mosquitto 15 | 16 | # 17 | # Paths and names 18 | # 19 | MOSQUITTO_VERSION := 1.4.14 20 | MOSQUITTO_MD5 := 6b0966e93f118bc71ad7b61600a6c2d3 21 | MOSQUITTO := mosquitto-$(MOSQUITTO_VERSION) 22 | MOSQUITTO_SUFFIX := tar.gz 23 | MOSQUITTO_URL := https://mosquitto.org/files/source/$(MOSQUITTO).$(MOSQUITTO_SUFFIX) 24 | MOSQUITTO_SOURCE := $(SRCDIR)/$(MOSQUITTO).$(MOSQUITTO_SUFFIX) 25 | MOSQUITTO_DIR := $(BUILDDIR)/$(MOSQUITTO) 26 | # "Eclipse Distribution License - v 1.0" is in fact BSD-3-Clause 27 | MOSQUITTO_LICENSE := EPL-1.0 AND BSD-3-Clause 28 | MOSQUITTO_LICENSE_FILES := file://epl-v10;md5=8d383c379e91d20ba18a52c3e7d3a979 \ 29 | file://edl-v10;md5=c09f121939f063aeb5235972be8c722c 30 | 31 | # ---------------------------------------------------------------------------- 32 | # Prepare 33 | # ---------------------------------------------------------------------------- 34 | 35 | MOSQUITTO_CONF_TOOL := NO 36 | MOSQUITTO_MAKE_ENV := $(CROSS_ENV) 37 | MOSQUITTO_MAKE_OPT := \ 38 | UNAME=Linux \ 39 | prefix=/usr \ 40 | WITH_WRAP=no \ 41 | WITH_TLS=$(call ptx/yesno, PTXCONF_MOSQUITTO_TLS) \ 42 | WITH_TLS_PSK=$(call ptx/yesno, PTXCONF_MOSQUITTO_TLS) \ 43 | WITH_THREADING=yes \ 44 | WITH_BRIDGE=yes \ 45 | WITH_PERSISTENCE=yes \ 46 | WITH_MEMORY_TRACKING=yes \ 47 | WITH_SYS_TREE=yes \ 48 | WITH_SRV=$(call ptx/yesno, PTXCONF_MOSQUITTO_SRV) \ 49 | WITH_UUID=$(call ptx/yesno, PTXCONF_MOSQUITTO_UUID) \ 50 | WITH_WEBSOCKETS=no \ 51 | WITH_EC=yes \ 52 | WITH_DOCS=no \ 53 | WITH_SOCKS=yes \ 54 | WITH_ADNS=no 55 | MOSQUITTO_INSTALL_OPT := \ 56 | $(MOSQUITTO_MAKE_OPT) \ 57 | install 58 | 59 | # ---------------------------------------------------------------------------- 60 | # Target-Install 61 | # ---------------------------------------------------------------------------- 62 | 63 | $(STATEDIR)/mosquitto.targetinstall: 64 | @$(call targetinfo) 65 | 66 | @$(call install_init, mosquitto) 67 | @$(call install_fixup, mosquitto,PRIORITY,optional) 68 | @$(call install_fixup, mosquitto,SECTION,base) 69 | @$(call install_fixup, mosquitto,AUTHOR,"Alexander Dahl ") 70 | @$(call install_fixup, mosquitto,DESCRIPTION,missing) 71 | 72 | @$(call install_lib, mosquitto, 0, 0, 0644, libmosquitto) 73 | @$(call install_lib, mosquitto, 0, 0, 0644, libmosquittopp) 74 | 75 | ifdef PTXCONF_MOSQUITTO_CLIENTS 76 | @$(call install_copy, mosquitto, 0, 0, 0755, -, /usr/bin/mosquitto_pub) 77 | @$(call install_copy, mosquitto, 0, 0, 0755, -, /usr/bin/mosquitto_sub) 78 | endif 79 | 80 | ifdef PTXCONF_MOSQUITTO_BROKER 81 | @$(call install_copy, mosquitto, 0, 0, 0755, -, /usr/sbin/mosquitto) 82 | endif 83 | 84 | @$(call install_finish, mosquitto) 85 | 86 | @$(call touch) 87 | 88 | # vim: ft=make noet ts=8 sw=8 89 | -------------------------------------------------------------------------------- /HowTo_AddOpenDDS/ptxproj/rules/opendds.in: -------------------------------------------------------------------------------- 1 | ## SECTION=networking 2 | 3 | config OPENDDS 4 | bool "OpenDDS" 5 | help 6 | OpenDDS is an open source C++ implementation of the Object Management Group (OMG) Data Distribution Service (DDS). Java applications can use OpenDDS through JNI bindings. OpenDDS is supported by OCI and the source code is hosted on GitHub. 7 | 8 | if OPENDDS 9 | 10 | config OPENDDS_EXAMPLE 11 | bool "OpenDDS-Example" 12 | help 13 | OpenDDS example applications 14 | 15 | endif 16 | -------------------------------------------------------------------------------- /HowTo_AddPerfTool/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 WAGO Kontakttechnik GmbH & Co. KG, author Thomas Brandt 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /HowTo_AddPerfTool/package/kernel_4.9.115_armhf.ipk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WAGO/pfc-howtos/7830974caec0023016e8096fcbf968283904db24/HowTo_AddPerfTool/package/kernel_4.9.115_armhf.ipk -------------------------------------------------------------------------------- /HowTo_AddPerfTool/package/libelf_0.170_armhf.ipk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WAGO/pfc-howtos/7830974caec0023016e8096fcbf968283904db24/HowTo_AddPerfTool/package/libelf_0.170_armhf.ipk -------------------------------------------------------------------------------- /HowTo_AddPerfTool/package/slang_2.3.0_armhf.ipk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WAGO/pfc-howtos/7830974caec0023016e8096fcbf968283904db24/HowTo_AddPerfTool/package/slang_2.3.0_armhf.ipk -------------------------------------------------------------------------------- /HowTo_AddPerfTool/pfc/rules/binutils.in: -------------------------------------------------------------------------------- 1 | ## SECTION=debug_tools 2 | 3 | menuconfig BINUTILS 4 | tristate 5 | select GCCLIBS_GCC_S 6 | select ZLIB 7 | prompt "binutils " 8 | help 9 | The GNU binutils are needed for some debug utilities, like oprofile. 10 | 11 | if BINUTILS 12 | 13 | config BINUTILS_READELF 14 | bool 15 | prompt "readelf" 16 | 17 | config BINUTILS_OBJDUMP 18 | bool 19 | prompt "objdump" 20 | 21 | endif 22 | -------------------------------------------------------------------------------- /HowTo_AddPerfTool/pfc/rules/binutils.make: -------------------------------------------------------------------------------- 1 | # -*-makefile-*- 2 | # 3 | # Copyright (C) 2006 by Robert Schwebel 4 | # 2010 by Marc Kleine-Budde 5 | # 2019 by Thomas Brandt 6 | # 7 | # See CREDITS for details about who has contributed to this project. 8 | # 9 | # For further information about the PTXdist project and license conditions 10 | # see the README file. 11 | # 12 | 13 | # 14 | # We provide this package 15 | # 16 | PACKAGES-$(PTXCONF_BINUTILS) += binutils 17 | 18 | # 19 | # Paths and names 20 | # 21 | BINUTILS_VERSION := 2.32 22 | BINUTILS_MD5 := none 23 | BINUTILS := binutils-$(BINUTILS_VERSION) 24 | BINUTILS_SUFFIX := tar.bz2 25 | BINUTILS_URL := $(call ptx/mirror, GNU, binutils/$(BINUTILS).$(BINUTILS_SUFFIX)) 26 | BINUTILS_SOURCE := $(SRCDIR)/$(BINUTILS).$(BINUTILS_SUFFIX) 27 | BINUTILS_DIR := $(BUILDDIR)/$(BINUTILS) 28 | 29 | # ---------------------------------------------------------------------------- 30 | # Prepare 31 | # ---------------------------------------------------------------------------- 32 | 33 | BINUTILS_CONF_ENV := \ 34 | $(CROSS_ENV) \ 35 | host_configargs='$(strip \ 36 | --enable-targets=$(PTXCONF_GNU_TARGET) \ 37 | --disable-nls \ 38 | --enable-commonbfdlib \ 39 | --enable-install-libiberty \ 40 | --disable-multilib)' 41 | # 42 | # autoconf 43 | # 44 | BINUTILS_AUTOCONF := \ 45 | $(CROSS_AUTOCONF_USR) \ 46 | --target=$(PTXCONF_GNU_TARGET) \ 47 | --disable-werror 48 | 49 | BINUTILS_CFLAGS := \ 50 | -fPIC 51 | 52 | # ---------------------------------------------------------------------------- 53 | # Target-Install 54 | # ---------------------------------------------------------------------------- 55 | 56 | $(STATEDIR)/binutils.targetinstall: 57 | @$(call targetinfo) 58 | 59 | @$(call install_init, binutils) 60 | @$(call install_fixup, binutils,PRIORITY,optional) 61 | @$(call install_fixup, binutils,SECTION,base) 62 | @$(call install_fixup, binutils,AUTHOR,"Thomas Brandt ") 63 | @$(call install_fixup, binutils,DESCRIPTION,missing) 64 | 65 | ifdef PTXCONF_BINUTILS_READELF 66 | @$(call install_copy, binutils, 0, 0, 0755, -, /usr/bin/readelf) 67 | endif 68 | ifdef PTXCONF_BINUTILS_OBJDUMP 69 | @$(call install_copy, binutils, 0, 0, 0755, -, /usr/bin/objdump) 70 | endif 71 | @$(call install_finish, binutils) 72 | 73 | @$(call touch) 74 | 75 | # vim: syntax=make 76 | 77 | -------------------------------------------------------------------------------- /HowTo_AddSQLiteCommandLineTool/packages/sqlite_3220000_armhf.ipk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WAGO/pfc-howtos/7830974caec0023016e8096fcbf968283904db24/HowTo_AddSQLiteCommandLineTool/packages/sqlite_3220000_armhf.ipk -------------------------------------------------------------------------------- /HowTo_AddSer2Net/package/gensio_1.1_armhf.ipk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WAGO/pfc-howtos/7830974caec0023016e8096fcbf968283904db24/HowTo_AddSer2Net/package/gensio_1.1_armhf.ipk -------------------------------------------------------------------------------- /HowTo_AddSer2Net/package/libyaml_0.2.2_armhf.ipk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WAGO/pfc-howtos/7830974caec0023016e8096fcbf968283904db24/HowTo_AddSer2Net/package/libyaml_0.2.2_armhf.ipk -------------------------------------------------------------------------------- /HowTo_AddSer2Net/package/ser2net_4.0_armhf.ipk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WAGO/pfc-howtos/7830974caec0023016e8096fcbf968283904db24/HowTo_AddSer2Net/package/ser2net_4.0_armhf.ipk -------------------------------------------------------------------------------- /HowTo_AddSer2Net/pfc/etc/init.d/ser2net: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # Starts and stops ser2net 3 | # /etc/init.d/ser2net 4 | ### BEGIN INIT INFO 5 | # Provides: ser2net 6 | # Required-Start: $syslog 7 | # Required-Stop: $syslog 8 | # Default-Start: 2 3 4 5 9 | # Default-Stop: 0 1 6 10 | # Short-Description: kbusmodbusslave initialisation 11 | ### END INIT INFO 12 | 13 | NAME="ser2net" 14 | DESC="serial to network application" 15 | 16 | PIDFILE=/var/run/$NAME.pid 17 | SCRIPTNAME=/etc/init.d/$NAME 18 | 19 | DAEMON_PATH="/sbin" 20 | DAEMON="ser2net" 21 | DAEMONOPTS="-P $PIDFILE" 22 | 23 | case "$1" in 24 | start) 25 | printf "%-50s" "Starting $NAME..." 26 | cd $DAEMON_PATH 27 | PID=`$DAEMON $DAEMONOPTS > /dev/null 2>&1 & echo $!` 28 | #echo "Saving PID" $PID " to " $PIDFILE 29 | if [ -z $PID ]; then 30 | printf "%s\n" "Fail" 31 | else 32 | echo $PID > $PIDFILE 33 | printf "%s\n" "Ok" 34 | fi 35 | ;; 36 | status) 37 | printf "%-50s" "Checking $NAME..." 38 | if [ -f $PIDFILE ]; then 39 | PID=`cat $PIDFILE` 40 | if [ -z "`ps axf | grep ${PID} | grep -v grep`" ]; then 41 | printf "%s\n" "Process dead but pidfile exists" 42 | else 43 | echo "Running" 44 | fi 45 | else 46 | printf "%s\n" "Service not running" 47 | fi 48 | ;; 49 | stop) 50 | printf "%-50s" "Stopping $NAME" 51 | PID=`cat $PIDFILE` 52 | cd $DAEMON_PATH 53 | if [ -f $PIDFILE ]; then 54 | kill -HUP $PID 55 | printf "%s\n" "Ok" 56 | rm -f $PIDFILE 57 | else 58 | printf "%s\n" "pidfile not found" 59 | fi 60 | ;; 61 | 62 | restart) 63 | $0 stop 64 | $0 start 65 | ;; 66 | 67 | *) 68 | echo "Usage: $0 {status|start|stop|restart}" 69 | exit 1 70 | esac 71 | -------------------------------------------------------------------------------- /HowTo_AddSer2Net/pfc/etc/ser2net/ser2net.yaml: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | --- 3 | # 4 | # This is a ser2net configuration file, showing examples of all 5 | # sorts of things. It's all commented out so it's safe to put 6 | # in /etc/ser2net/ser2net.yaml. 7 | # 8 | # This is described in ser2net.yaml(5) 9 | 10 | # YAML gives an error on empty files, just add something so the 11 | # error doesn't happen. 12 | define: &confver 1.0 13 | 14 | # # Set all baud rates to 115200n81 by default. 15 | default: 16 | name: speed 17 | value: 115200n81 18 | 19 | connection: &test 20 | accepter: telnet(rfc2217),tcp,2000 21 | connector: serialdev,/dev/serial,local 22 | 23 | -------------------------------------------------------------------------------- /HowTo_AddSer2Net/ptxproj/rules/gensio.in: -------------------------------------------------------------------------------- 1 | ## SECTION=networking 2 | 3 | config GENSIO 4 | bool 5 | default n 6 | prompt "gensio" 7 | help 8 | A library to abstract stream I/O like serial port, TCP, telnet, UDP, SSL, IPMI SOL, etc. 9 | -------------------------------------------------------------------------------- /HowTo_AddSer2Net/ptxproj/rules/gensio.make: -------------------------------------------------------------------------------- 1 | # -*-makefile-*- 2 | # 3 | # Copyright (C) 2019 by 4 | # 5 | # See CREDITS for details about who has contributed to this project. 6 | # 7 | # For further information about the PTXdist project and license conditions 8 | # see the README file. 9 | # 10 | 11 | # 12 | # We provide this package 13 | # 14 | PACKAGES-$(PTXCONF_GENSIO) += gensio 15 | 16 | # 17 | # Paths and names 18 | # 19 | GENSIO := gensio 20 | GENSIO_VERSION := 1.1 21 | GENSIO_SOURCE := $(SRCDIR)/$(GENSIO)-$(GENSIO_VERSION).tar.gz 22 | GENSIO_DIR := $(BUILDDIR)/$(GENSIO)-$(GENSIO_VERSION) 23 | GENSIO_LICENSE := GPLv2 24 | 25 | # ---------------------------------------------------------------------------- 26 | # Get 27 | # ---------------------------------------------------------------------------- 28 | $(STATEDIR)/gensio.get: 29 | @$(call targetinfo, $@) 30 | @$(call touch, $@) 31 | 32 | # ---------------------------------------------------------------------------- 33 | # Prepare 34 | # ---------------------------------------------------------------------------- 35 | #GENSIO_PATH := PATH=$(CROSS_PATH) 36 | #GENSIO_ENV := $(CROSS_ENV) 37 | 38 | GENSIO_CONF_OPT := $(CROSS_AUTOCONF_USR) 39 | GENSIO_CONF_OPT += --with-python=no 40 | 41 | #$(STATEDIR)/gensio.prepare: 42 | # @$(call targetinfo) 43 | # @$(call touch) 44 | 45 | # ---------------------------------------------------------------------------- 46 | # Compile 47 | # ---------------------------------------------------------------------------- 48 | #$(STATEDIR)/gensio.compile: 49 | # @$(call targetinfo) 50 | # @cd $(GENSIO_DIR) && \ 51 | # $(GENSIO_ENV) $(GENSIO_PATH) \ 52 | # env \ 53 | # CROSS_COMPILE=$(COMPILER_PREFIX) \ 54 | # $(MAKE) 55 | # @$(call touch) 56 | 57 | # ---------------------------------------------------------------------------- 58 | # Install 59 | # ---------------------------------------------------------------------------- 60 | #$(STATEDIR)/gensio.install: 61 | # @$(call targetinfo) 62 | # @$(call touch) 63 | 64 | # ---------------------------------------------------------------------------- 65 | # Target-Install 66 | # ---------------------------------------------------------------------------- 67 | 68 | $(STATEDIR)/gensio.targetinstall: 69 | @$(call targetinfo) 70 | 71 | @$(call install_init, gensio) 72 | @$(call install_fixup, gensio,PRIORITY,optional) 73 | @$(call install_fixup, gensio,VERSION,$(GENSIO_VERSION)) 74 | @$(call install_fixup, gensio,SECTION,base) 75 | @$(call install_fixup, gensio,AUTHOR,"Thomas.Brandt@wago.com") 76 | @$(call install_fixup, gensio,DESCRIPTION,missing) 77 | 78 | @$(call install_lib, gensio, 0, 0, 0644, libgensio) 79 | 80 | 81 | @$(call install_finish, gensio) 82 | @$(call touch) 83 | # ---------------------------------------------------------------------------- 84 | # Clean 85 | # ---------------------------------------------------------------------------- 86 | 87 | $(STATEDIR)/gensio.clean: 88 | @$(call targetinfo) 89 | # rm -rf $(STATEDIR)/kbusmodbusslave.* 90 | # rm -rf $(PKGDIR)/kbusmodbusslave_* 91 | # rm -rf $(KBUSMODBUSSLAVE_DIR) 92 | @$(call clean_pkg, GENSIO) 93 | 94 | # vim: syntax=make 95 | 96 | -------------------------------------------------------------------------------- /HowTo_AddSer2Net/ptxproj/rules/libyaml.in: -------------------------------------------------------------------------------- 1 | ## SECTION=system_libraries 2 | 3 | config LIBYAML 4 | bool 5 | default n 6 | prompt "libyaml" 7 | help 8 | LibYAML is a YAML parser and emitter library. 9 | 10 | 11 | -------------------------------------------------------------------------------- /HowTo_AddSer2Net/ptxproj/rules/libyaml.make: -------------------------------------------------------------------------------- 1 | # -*-makefile-*- 2 | # 3 | # Copyright (C) 2019 by 4 | # 5 | # See CREDITS for details about who has contributed to this project. 6 | # 7 | # For further information about the PTXdist project and license conditions 8 | # see the README file. 9 | # 10 | 11 | # 12 | # We provide this package 13 | # 14 | PACKAGES-$(PTXCONF_LIBYAML) += libyaml 15 | 16 | # 17 | # Paths and names 18 | # 19 | LIBYAML := libyaml-dist 20 | LIBYAML_VERSION := 0.2.2 21 | LIBYAML_SOURCE := $(SRCDIR)/$(LIBYAML)-$(LIBYAML_VERSION).tar.gz 22 | LIBYAML_DIR := $(BUILDDIR)/$(LIBYAML)-$(LIBYAML_VERSION) 23 | LIBYAML_LICENSE := MIT 24 | 25 | # ---------------------------------------------------------------------------- 26 | # Get 27 | # ---------------------------------------------------------------------------- 28 | $(STATEDIR)/libyaml.get: 29 | @$(call targetinfo, $@) 30 | @$(call touch, $@) 31 | 32 | # ---------------------------------------------------------------------------- 33 | # Prepare 34 | # ---------------------------------------------------------------------------- 35 | #LIBYAML_PATH := PATH=$(CROSS_PATH) 36 | #LIBYAML_ENV := $(CROSS_ENV) 37 | 38 | LIBYAML_CONF_TOOL := autoconf 39 | LIBYAML_CONF_OPT := $(CROSS_AUTOCONF_USR) 40 | 41 | #$(STATEDIR)/libyaml.prepare: 42 | # @$(call targetinfo) 43 | # @$(call touch) 44 | 45 | # ---------------------------------------------------------------------------- 46 | # Compile 47 | # ---------------------------------------------------------------------------- 48 | #$(STATEDIR)/libyaml.compile: 49 | # @$(call targetinfo) 50 | # @cd $(LIBYAML_DIR) && \ 51 | # $(LIBYAML_ENV) $(LIBYAML_PATH) \ 52 | # env \ 53 | # CROSS_COMPILE=$(COMPILER_PREFIX) \ 54 | # $(MAKE) 55 | # @$(call touch) 56 | 57 | # ---------------------------------------------------------------------------- 58 | # Install 59 | # ---------------------------------------------------------------------------- 60 | #$(STATEDIR)/libyaml.install: 61 | # @$(call targetinfo) 62 | # @$(call touch) 63 | 64 | # ---------------------------------------------------------------------------- 65 | # Target-Install 66 | # ---------------------------------------------------------------------------- 67 | 68 | $(STATEDIR)/libyaml.targetinstall: 69 | @$(call targetinfo) 70 | 71 | @$(call install_init, libyaml) 72 | @$(call install_fixup, libyaml,PRIORITY,optional) 73 | @$(call install_fixup, libyaml,VERSION,$(LIBYAML_VERSION)) 74 | @$(call install_fixup, libyaml,SECTION,base) 75 | @$(call install_fixup, libyaml,AUTHOR,"Thomas.Brandt@wago.com") 76 | @$(call install_fixup, libyaml,DESCRIPTION,missing) 77 | 78 | @$(call install_lib, libyaml, 0, 0, 0644, libyaml-0) 79 | 80 | 81 | @$(call install_finish, libyaml) 82 | @$(call touch) 83 | # ---------------------------------------------------------------------------- 84 | # Clean 85 | # ---------------------------------------------------------------------------- 86 | 87 | $(STATEDIR)/libyaml.clean: 88 | @$(call targetinfo) 89 | @$(call clean_pkg, LIBYAML) 90 | 91 | # vim: syntax=make 92 | 93 | -------------------------------------------------------------------------------- /HowTo_AddSer2Net/ptxproj/rules/ser2net.in: -------------------------------------------------------------------------------- 1 | ## SECTION=networking 2 | 3 | config SER2NET 4 | bool 5 | select GENSIO 6 | select LIBYAML 7 | default n 8 | prompt "ser2net" 9 | help 10 | Allows a pyhsical serial port to be accessed over ethernet 11 | -------------------------------------------------------------------------------- /HowTo_AddSer2Net/ptxproj/rules/ser2net.make: -------------------------------------------------------------------------------- 1 | # -*-makefile-*- 2 | # 3 | # Copyright (C) 2017 by 4 | # 5 | # See CREDITS for details about who has contributed to this project. 6 | # 7 | # For further information about the PTXdist project and license conditions 8 | # see the README file. 9 | # 10 | 11 | # 12 | # We provide this package 13 | # 14 | PACKAGES-$(PTXCONF_SER2NET) += ser2net 15 | 16 | # 17 | # Paths and names 18 | # 19 | SER2NET := ser2net 20 | SER2NET_VERSION := 4.0 21 | SER2NET_SOURCE := $(SRCDIR)/$(SER2NET)-$(SER2NET_VERSION).tar.gz 22 | SER2NET_DIR := $(BUILDDIR)/$(SER2NET) 23 | SER2NET_LICENSE := GPLv2 24 | 25 | # ---------------------------------------------------------------------------- 26 | # Get 27 | # ---------------------------------------------------------------------------- 28 | $(STATEDIR)/ser2net.get: 29 | @$(call targetinfo, $@) 30 | @$(call touch, $@) 31 | 32 | # ---------------------------------------------------------------------------- 33 | # Prepare 34 | # ---------------------------------------------------------------------------- 35 | SER2NET_PATH := PATH=$(CROSS_PATH) 36 | SER2NET_ENV := $(CROSS_ENV) 37 | 38 | #$(STATEDIR)/ser2net.prepare: 39 | # @$(call targetinfo) 40 | # @$(call touch) 41 | 42 | # ---------------------------------------------------------------------------- 43 | # Compile 44 | # ---------------------------------------------------------------------------- 45 | $(STATEDIR)/ser2net.compile: 46 | @$(call targetinfo) 47 | @cd $(SER2NET_DIR) && \ 48 | $(SER2NET_ENV) $(SER2NET_PATH) \ 49 | env \ 50 | CROSS_COMPILE=$(COMPILER_PREFIX) \ 51 | $(MAKE) 52 | @$(call touch) 53 | 54 | # ---------------------------------------------------------------------------- 55 | # Install 56 | # ---------------------------------------------------------------------------- 57 | $(STATEDIR)/ser2net.install: 58 | @$(call targetinfo) 59 | @$(call touch) 60 | 61 | # ---------------------------------------------------------------------------- 62 | # Target-Install 63 | # ---------------------------------------------------------------------------- 64 | 65 | $(STATEDIR)/ser2net.targetinstall: 66 | @$(call targetinfo) 67 | 68 | @$(call install_init, ser2net) 69 | @$(call install_fixup, ser2net,PRIORITY,optional) 70 | @$(call install_fixup, ser2net,VERSION,$(SER2NET_VERSION)) 71 | @$(call install_fixup, ser2net,SECTION,base) 72 | @$(call install_fixup, ser2net,AUTHOR,"Thomas.Brandt@wago.com") 73 | @$(call install_fixup, ser2net,DESCRIPTION,missing) 74 | @$(call install_copy, ser2net, 0, 0, 0644, $(SER2NET_DIR)/ser2net.yaml, /etc/ser2net/ser2net.yaml) 75 | @$(call install_copy, ser2net, 0, 0, 0755, $(SER2NET_DIR)/ser2net, /usr/sbin/ser2net) 76 | @$(call install_finish, ser2net) 77 | @$(call touch) 78 | # ---------------------------------------------------------------------------- 79 | # Clean 80 | # ---------------------------------------------------------------------------- 81 | 82 | $(STATEDIR)/ser2net.clean: 83 | @$(call targetinfo) 84 | # rm -rf $(STATEDIR)/kbusmodbusslave.* 85 | # rm -rf $(PKGDIR)/kbusmodbusslave_* 86 | # rm -rf $(KBUSMODBUSSLAVE_DIR) 87 | @$(call clean_pkg, NODE) 88 | 89 | # vim: syntax=make 90 | 91 | -------------------------------------------------------------------------------- /HowTo_AddSer2Net/ptxproj/src/gensio-1.1.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WAGO/pfc-howtos/7830974caec0023016e8096fcbf968283904db24/HowTo_AddSer2Net/ptxproj/src/gensio-1.1.tar.gz -------------------------------------------------------------------------------- /HowTo_AddSer2Net/ptxproj/src/libyaml-dist-0.2.2.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WAGO/pfc-howtos/7830974caec0023016e8096fcbf968283904db24/HowTo_AddSer2Net/ptxproj/src/libyaml-dist-0.2.2.tar.gz -------------------------------------------------------------------------------- /HowTo_AddSer2Net/ptxproj/src/ser2net-4.0.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WAGO/pfc-howtos/7830974caec0023016e8096fcbf968283904db24/HowTo_AddSer2Net/ptxproj/src/ser2net-4.0.tar.gz -------------------------------------------------------------------------------- /HowTo_AddTRDP/packages/trdp_1.4.1.0_armhf.ipk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WAGO/pfc-howtos/7830974caec0023016e8096fcbf968283904db24/HowTo_AddTRDP/packages/trdp_1.4.1.0_armhf.ipk -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/Deviation Request.txt: -------------------------------------------------------------------------------- 1 | TCNOpen TRDP prototype stack 2 | $Id: Deviation Request.txt 754 2013-05-03 13:23:03Z 97025 $ 3 | 4 | 5 | Deviation Requests: 6 | Exceptions from the Coding Rules TCN-TRDP1-A-BOM-008-04 7 | 8 | 1. Rule 20106 (M) File names shall be unique within the project. 9 | - Because of the multi-target nature and the implementation of the Virtual Operating System (vos), filenames for the same 10 | functionality in different targets are kept equal. 11 | Each file without unique filename has a check for the corresponding target define (POSIX, WIN32 etc.) 12 | 13 | 2. Rule 20601 (M) Use standard type names for commonly used types 14 | - In the target-dependent VOS implementation files, the standard types of that target will be used to fit the OS API. 15 | 16 | 3. Rule 30103 (M) Every function definition shall be documented with an introductory comment. 17 | - The format should be compatible with the Doxygen commenting rules. 18 | 19 | 4. Rule 40006 (M) Accesses to fix addresses in memory (for example registers) and members in communication telegrams 20 | shall be done by address constants. 21 | - PD and MD Header definitions are defined as packed structs respecting target compilers (GCC and MS-VC). 22 | Definitions nevertheless follow natural alignement (UINT32 on 4 Bytes, UINT16 on 2 Byte boundaries, no padding involved). 23 | 24 | -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/Makefile_SE: -------------------------------------------------------------------------------- 1 | # 2 | # diego.quagreda@SairaElectronics.com 3 | # 4 | # Makefile for MD test 5 | # 6 | # the posix target is used to build TRDP for 7 | # 1.Linux Debian 6 8 | # 2.Linux Slackware 14 9 | # 3.QNX 650SP1 10 | # 11 | # v0.3 19-mar-2013 12 | # 13 | 14 | UNAME := $(shell uname) 15 | 16 | VOS_POSIX=src/vos/posix 17 | VOS_CMM=src/vos/common 18 | VOS_API=src/vos/api 19 | COM_CMM=src/common 20 | API_INC=src/api 21 | 22 | RM=rm -f 23 | MD=mkdir -p 24 | 25 | BLDDIR=bld/posix 26 | 27 | PROJ1=$(BLDDIR)/mdTest4 28 | 29 | TRDPLIB=$(BLDDIR)/libtrdp.a 30 | 31 | OSLIB= -ltrdp 32 | ifeq ($(UNAME),Linux) 33 | OSLIB += -lpthread 34 | OSLIB += -luuid 35 | OSLIB += -lrt 36 | endif 37 | ifeq ($(UNAME),QNX) 38 | OSLIB += -lsocket 39 | endif 40 | 41 | OBJLIB=\ 42 | $(COM_CMM)/trdp_stats.o \ 43 | $(COM_CMM)/trdp_mdcom.o \ 44 | $(COM_CMM)/trdp_pdcom.o \ 45 | $(COM_CMM)/trdp_utils.o \ 46 | $(COM_CMM)/trdp_if.o \ 47 | \ 48 | $(VOS_CMM)/vos_utils.o \ 49 | $(VOS_CMM)/vos_mem.o \ 50 | \ 51 | $(VOS_POSIX)/vos_sock.o \ 52 | $(VOS_POSIX)/vos_thread.o 53 | 54 | OBJPRJ1= test/udpmdcom/mdTest4.o 55 | 56 | CFLAGS=-Wall -D_GNU_SOURCE -DPOSIX -I$(VOS_POSIX) -I$(VOS_API) -I$(COM_CMM) -I$(API_INC) -DMD_SUPPORT=1 57 | 58 | .PHONY: all clean 59 | 60 | all: $(TRDPLIB) $(PROJ1) 61 | 62 | clean: 63 | $(RM) $(OBJLIB) $(TRDPLIB) $(OBJPRJ1) $(PROJ1) 64 | 65 | $(PROJ1) : $(TRDPLIB) $(OBJPRJ1) 66 | $(CC) -o $(PROJ1) $(OBJPRJ1) -L $(BLDDIR) $(OSLIB) 67 | 68 | $(TRDPLIB) : $(OBJLIB) 69 | $(AR) cr $(TRDPLIB) $(OBJLIB) 70 | -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/VSExpress2015/TRDP_MDTests/MDtests.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 9.00 3 | # Visual Studio 2005 4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "trdp-light", "..\Win32TRDP\Win32TRDP_VS8.vcproj", "{DA0967D7-832E-43E4-A5C6-38F1855BE0CD}" 5 | EndProject 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "trdp-md-test", "trdp-md-test.vcproj", "{D2E0ED26-E4B3-4833-9697-E52321B206D8}" 7 | ProjectSection(ProjectDependencies) = postProject 8 | {DA0967D7-832E-43E4-A5C6-38F1855BE0CD} = {DA0967D7-832E-43E4-A5C6-38F1855BE0CD} 9 | EndProjectSection 10 | EndProject 11 | Global 12 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 13 | Debug|Win32 = Debug|Win32 14 | Release|Win32 = Release|Win32 15 | EndGlobalSection 16 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 17 | {DA0967D7-832E-43E4-A5C6-38F1855BE0CD}.Debug|Win32.ActiveCfg = Debug|Win32 18 | {DA0967D7-832E-43E4-A5C6-38F1855BE0CD}.Debug|Win32.Build.0 = Debug|Win32 19 | {DA0967D7-832E-43E4-A5C6-38F1855BE0CD}.Release|Win32.ActiveCfg = Release|Win32 20 | {DA0967D7-832E-43E4-A5C6-38F1855BE0CD}.Release|Win32.Build.0 = Release|Win32 21 | {D2E0ED26-E4B3-4833-9697-E52321B206D8}.Debug|Win32.ActiveCfg = Debug|Win32 22 | {D2E0ED26-E4B3-4833-9697-E52321B206D8}.Debug|Win32.Build.0 = Debug|Win32 23 | {D2E0ED26-E4B3-4833-9697-E52321B206D8}.Release|Win32.ActiveCfg = Release|Win32 24 | {D2E0ED26-E4B3-4833-9697-E52321B206D8}.Release|Win32.Build.0 = Release|Win32 25 | EndGlobalSection 26 | GlobalSection(SolutionProperties) = preSolution 27 | HideSolutionNode = FALSE 28 | EndGlobalSection 29 | EndGlobal 30 | -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/VSExpress2015/TRDP_PDTests/PDtests.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 9.00 3 | # Visual Studio 2005 4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "trdp-pd-test", "trdp-pd-test.vcproj", "{5DBAEC28-AEEC-49FC-96E4-7B73871FB13C}" 5 | ProjectSection(ProjectDependencies) = postProject 6 | {DA0967D7-832E-43E4-A5C6-38F1855BE0CD} = {DA0967D7-832E-43E4-A5C6-38F1855BE0CD} 7 | EndProjectSection 8 | EndProject 9 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "trdp-light", "..\Win32TRDP\Win32TRDP_VS8.vcproj", "{DA0967D7-832E-43E4-A5C6-38F1855BE0CD}" 10 | EndProject 11 | Global 12 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 13 | Debug|Win32 = Debug|Win32 14 | Release|Win32 = Release|Win32 15 | EndGlobalSection 16 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 17 | {5DBAEC28-AEEC-49FC-96E4-7B73871FB13C}.Debug|Win32.ActiveCfg = Debug|Win32 18 | {5DBAEC28-AEEC-49FC-96E4-7B73871FB13C}.Debug|Win32.Build.0 = Debug|Win32 19 | {5DBAEC28-AEEC-49FC-96E4-7B73871FB13C}.Release|Win32.ActiveCfg = Release|Win32 20 | {5DBAEC28-AEEC-49FC-96E4-7B73871FB13C}.Release|Win32.Build.0 = Release|Win32 21 | {DA0967D7-832E-43E4-A5C6-38F1855BE0CD}.Debug|Win32.ActiveCfg = Debug|Win32 22 | {DA0967D7-832E-43E4-A5C6-38F1855BE0CD}.Debug|Win32.Build.0 = Debug|Win32 23 | {DA0967D7-832E-43E4-A5C6-38F1855BE0CD}.Release|Win32.ActiveCfg = Release|Win32 24 | {DA0967D7-832E-43E4-A5C6-38F1855BE0CD}.Release|Win32.Build.0 = Release|Win32 25 | EndGlobalSection 26 | GlobalSection(SolutionProperties) = preSolution 27 | HideSolutionNode = FALSE 28 | EndGlobalSection 29 | EndGlobal 30 | -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/VSExpress2015/TRDP_XMLTests/XMLtests.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 9.00 3 | # Visual Studio 2005 4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "trdp-xmlprint-test", "trdp-xmlprint-test.vcproj", "{C9C4B9B1-EE42-4D8C-BED8-FD483912EFF2}" 5 | ProjectSection(ProjectDependencies) = postProject 6 | {DA0967D7-832E-43E4-A5C6-38F1855BE0CD} = {DA0967D7-832E-43E4-A5C6-38F1855BE0CD} 7 | EndProjectSection 8 | EndProject 9 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "trdp-xmlpd-test", "trdp-xmlpd-test.vcproj", "{5D1178E6-CC15-448D-85AB-C6DAF86664F9}" 10 | ProjectSection(ProjectDependencies) = postProject 11 | {DA0967D7-832E-43E4-A5C6-38F1855BE0CD} = {DA0967D7-832E-43E4-A5C6-38F1855BE0CD} 12 | EndProjectSection 13 | EndProject 14 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "trdp-light-xml", "..\Win32TRDP\Win32TRDP_VS8_xml.vcproj", "{DA0967D7-832E-43E4-A5C6-38F1855BE0CD}" 15 | EndProject 16 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "trdp-xmlmd-test", "trdp-xmlmd-test.vcproj", "{B1470EF8-67D8-47D3-98A5-D629D97209DB}" 17 | ProjectSection(ProjectDependencies) = postProject 18 | {DA0967D7-832E-43E4-A5C6-38F1855BE0CD} = {DA0967D7-832E-43E4-A5C6-38F1855BE0CD} 19 | EndProjectSection 20 | EndProject 21 | Global 22 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 23 | Debug|Win32 = Debug|Win32 24 | Release|Win32 = Release|Win32 25 | EndGlobalSection 26 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 27 | {C9C4B9B1-EE42-4D8C-BED8-FD483912EFF2}.Debug|Win32.ActiveCfg = Debug|Win32 28 | {C9C4B9B1-EE42-4D8C-BED8-FD483912EFF2}.Debug|Win32.Build.0 = Debug|Win32 29 | {C9C4B9B1-EE42-4D8C-BED8-FD483912EFF2}.Release|Win32.ActiveCfg = Release|Win32 30 | {C9C4B9B1-EE42-4D8C-BED8-FD483912EFF2}.Release|Win32.Build.0 = Release|Win32 31 | {5D1178E6-CC15-448D-85AB-C6DAF86664F9}.Debug|Win32.ActiveCfg = Debug|Win32 32 | {5D1178E6-CC15-448D-85AB-C6DAF86664F9}.Debug|Win32.Build.0 = Debug|Win32 33 | {5D1178E6-CC15-448D-85AB-C6DAF86664F9}.Release|Win32.ActiveCfg = Release|Win32 34 | {5D1178E6-CC15-448D-85AB-C6DAF86664F9}.Release|Win32.Build.0 = Release|Win32 35 | {DA0967D7-832E-43E4-A5C6-38F1855BE0CD}.Debug|Win32.ActiveCfg = Debug|Win32 36 | {DA0967D7-832E-43E4-A5C6-38F1855BE0CD}.Debug|Win32.Build.0 = Debug|Win32 37 | {DA0967D7-832E-43E4-A5C6-38F1855BE0CD}.Release|Win32.ActiveCfg = Release|Win32 38 | {DA0967D7-832E-43E4-A5C6-38F1855BE0CD}.Release|Win32.Build.0 = Release|Win32 39 | {B1470EF8-67D8-47D3-98A5-D629D97209DB}.Debug|Win32.ActiveCfg = Debug|Win32 40 | {B1470EF8-67D8-47D3-98A5-D629D97209DB}.Debug|Win32.Build.0 = Debug|Win32 41 | {B1470EF8-67D8-47D3-98A5-D629D97209DB}.Release|Win32.ActiveCfg = Release|Win32 42 | {B1470EF8-67D8-47D3-98A5-D629D97209DB}.Release|Win32.Build.0 = Release|Win32 43 | EndGlobalSection 44 | GlobalSection(SolutionProperties) = preSolution 45 | HideSolutionNode = FALSE 46 | EndGlobalSection 47 | EndGlobal 48 | -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/component.mk: -------------------------------------------------------------------------------- 1 | #**********************************************************************************************************************/ 2 | # 3 | #* @file component.mk 4 | #* 5 | #* @brief Component Makefile for the Expressif IDF v3.0 6 | #* 7 | #* @details To use the TRDP stack with the Expressive Integrated Development Framework, 8 | #* this Makefile must be placed inside the component directory. It will be included by 9 | #* the main IDF Makefile. 10 | #* 11 | #* @note Project: TCNOpen TRDP prototype stack 12 | #* 13 | #* @author Bernd Loehr 14 | #* 15 | #* @remarks This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. 16 | #* If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 17 | #* Copyright 2018. All rights reserved. 18 | #* 19 | #* $Id: component.mk 1742 2018-06-22 16:53:53Z bloehr $ 20 | # 21 | # 22 | 23 | COMPONENT_ADD_INCLUDEDIRS := \ 24 | src/api \ 25 | src/vos/api \ 26 | src/vos/esp 27 | 28 | COMPONENT_SRCDIRS := \ 29 | src/common src/vos/common \ 30 | src/vos/esp 31 | 32 | CFLAGS += -Wall -DESP32 -I src/vos/esp -I src/api -Wno-unknown-pragmas -Wno-char-subscripts -Wno-format -DL_ENDIAN 33 | 34 | -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/config/LINUX_PPC_config: -------------------------------------------------------------------------------- 1 | #// 2 | #// $Id: LINUX_PPC_config 1634 2017-05-31 13:39:15Z bloehr $ 3 | #// 4 | #// DESCRIPTION Config file to make TRDP for LINUX_PPC target 5 | #// 6 | #// AUTHOR Bombardier Transportation GmbH 7 | #// 8 | #// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0 9 | #// If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/ 10 | #// Copyright Bombardier Transportation Inc. or its subsidiaries and others, 2014. All rights reserved. 11 | #// 12 | 13 | # path to compiler incl. the trailing slash 14 | TCPATH = /scm/gbe/repository/toolchain/nrtos/1.0.0.0/x86-linux2/bin/ 15 | 16 | # verbose description for the target 17 | # ARCH controls the output path for the binaries 18 | ARCH = powerpc-linux-gnu 19 | CPU = 20 | TARGET_VOS = posix 21 | TARGET_OS = LINUX 22 | 23 | # the required cross compile prefix incl. the dash 24 | TCPREFIX = powerpc-linux-gnu- 25 | TCPOSTFIX = 26 | DOXYPATH = /usr/local/bin/ 27 | 28 | # path to sysroot includes also the trailing slash 29 | CFLAGS += -Wall -DPOSIX -D_GNU_SOURCE -DB_ENDIAN --sysroot=/scm/gbe/repository/sysroot/nrtos/2.4.0.1/sysroot/ 30 | 31 | LDFLAGS += -lrt 32 | 33 | #LINT section 34 | LINT_SYSINCLUDE_DIRECTIVES = -D__linux -D__GNUC__ -i "./src/vos/posix" -i "/scm/gbe/repository/sysroot/nrtos/2.4.0.1/sysroot/usr/include" -i "/scm/gbe/repository/sysroot/nrtos/2.4.0.1/sysroot/usr/include/linux" -i "/opt/cross/freescale-2010.09/lib/gcc/powerpc-linux-gnu/4.5.1/include" +libdir "/scm/gbe/repository/sysroot/nrtos/2.4.0.1/sysroot/usr/include" -wlib 0 35 | -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/config/LINUX_X86_64_config: -------------------------------------------------------------------------------- 1 | #// 2 | #// $Id: LINUX_X86_64_config 1634 2017-05-31 13:39:15Z bloehr $ 3 | #// 4 | #// DESCRIPTION Config file to make TRDP for POSIX_X86 target 5 | #// 6 | #// AUTHOR NewTec GmbH 7 | #// 8 | #// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0 9 | #// If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/ 10 | #// Copyright NewTec GmbH, 2017. All rights reserved. 11 | #// 12 | 13 | ARCH = linux-x86_64 14 | TARGET_VOS = posix 15 | TARGET_OS = LINUX 16 | TCPREFIX = 17 | TCPOSTFIX = 18 | DOXYPATH = /usr/local/bin/ 19 | 20 | # the _GNU_SOURCE is needed to get the extended poll feature for the POSIX socket 21 | 22 | CFLAGS += -Wall -m64 -fstrength-reduce -fno-builtin -fsigned-char -pthread -fPIC -D_GNU_SOURCE -DPOSIX -DL_ENDIAN 23 | LDFLAGS += -lrt 24 | 25 | LINT_SYSINCLUDE_DIRECTIVES = -i ./src/vos/posix -wlib 0 -DL_ENDIAN 26 | -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/config/LINUX_X86_config: -------------------------------------------------------------------------------- 1 | #// 2 | #// $Id: LINUX_X86_config 1634 2017-05-31 13:39:15Z bloehr $ 3 | #// 4 | #// DESCRIPTION Config file to make TRDP for POSIX_X86 target 5 | #// 6 | #// AUTHOR Bombardier Transportation GmbH 7 | #// 8 | #// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0 9 | #// If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/ 10 | #// Copyright Bombardier Transportation Inc. or its subsidiaries and others, 2014. All rights reserved. 11 | #// 12 | 13 | ARCH = linux-x86 14 | TARGET_VOS = posix 15 | TARGET_OS = LINUX 16 | TCPREFIX = 17 | TCPOSTFIX = 18 | DOXYPATH = /usr/local/bin/ 19 | 20 | # the _GNU_SOURCE is needed to get the extended poll feature for the POSIX socket 21 | 22 | CFLAGS += -Wall -m32 -fstrength-reduce -fno-builtin -fsigned-char -pthread -fPIC -D_GNU_SOURCE -DPOSIX -DL_ENDIAN 23 | LDFLAGS += -lrt 24 | 25 | LINT_SYSINCLUDE_DIRECTIVES = -i ./src/vos/posix -wlib 0 -DL_ENDIAN 26 | -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/config/LINUX_config: -------------------------------------------------------------------------------- 1 | #// 2 | #// $Id: LINUX_config 1634 2017-05-31 13:39:15Z bloehr $ 3 | #// 4 | #// DESCRIPTION Config file to make TRDP for native Linux 5 | #// 6 | #// AUTHOR B. Loehr 7 | #// 8 | #// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0 9 | #// If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/ 10 | #// Copyright NewTec GmbH, 2015. All rights reserved. 11 | #// 12 | 13 | ARCH = linux 14 | TARGET_VOS = posix 15 | TARGET_OS = LINUX 16 | TCPREFIX = 17 | TCPOSTFIX = 18 | DOXYPATH = /usr/local/bin/ 19 | 20 | # the _GNU_SOURCE is needed to get the extended poll feature for the POSIX socket 21 | 22 | CFLAGS += -Wall -Wno-unknown-pragmas -Wno-format -fstrength-reduce -fno-builtin -fsigned-char -pthread -fPIC -D_GNU_SOURCE -DPOSIX 23 | LDFLAGS += -lrt 24 | 25 | LINT_SYSINCLUDE_DIRECTIVES = -i ./src/vos/posix -wlib 0 -DL_ENDIAN 26 | -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/config/LINUX_imx7_config: -------------------------------------------------------------------------------- 1 | #// 2 | #// $Id: $ 3 | #// 4 | #// DESCRIPTION Config file to make TRDP for YOCTO Linux 5 | #// 6 | #// AUTHOR B. Loehr 7 | #// 8 | #// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0 9 | #// If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/ 10 | #// Copyright NewTec GmbH, 2018. All rights reserved. 11 | #// 12 | 13 | # The yocto directory must be set/exported as environment variable 14 | TCPATH = $(YOCTO_DIR)/build/tmp/sysroots/x86_64-linux/usr/bin/arm-poky-linux-gnueabi/ 15 | 16 | ARCH = imx7d-phyboard-zeta-001 17 | TARGET_VOS = posix 18 | TARGET_OS = LINUX 19 | TCPREFIX = arm-poky-linux-gnueabi- 20 | TCPOSTFIX = 21 | DOXYPATH = /usr/local/bin/ 22 | 23 | # the _GNU_SOURCE is needed to get the extended poll feature for the POSIX socket 24 | 25 | CFLAGS += --sysroot=$(YOCTO_DIR)/build/tmp/sysroots/$(ARCH) 26 | CFLAGS += -Wall -Wno-unknown-pragmas -Wno-format -fstrength-reduce -fno-builtin -fsigned-char 27 | CFLAGS += -pthread -fPIC -D_GNU_SOURCE -DPOSIX -mfloat-abi=hard 28 | 29 | LDFLAGS += -lrt -mfloat-abi=hard 30 | 31 | LINT_SYSINCLUDE_DIRECTIVES = -i ./src/vos/posix -wlib 0 -DL_ENDIAN 32 | -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/config/OSX_X86_64_config: -------------------------------------------------------------------------------- 1 | #// 2 | #// $Id: OSX_X86_64_config 1639 2017-06-08 09:04:15Z bloehr $ 3 | #// 4 | #// DESCRIPTION Config file to make TRDP for OSX_X86_64 target 5 | #// 6 | #// AUTHOR Bernd Loehr, NewTec GmbH GmbH 7 | #// 8 | #// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. 9 | #// If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 10 | #// Copyright Bombardier Transportation Inc. or its subsidiaries and others, 2013. All rights reserved. 11 | #// 12 | 13 | ARCH = osx_x86_64 14 | TARGET_VOS = posix 15 | TARGET_OS = POSIX 16 | TCPREFIX = 17 | TCPOSTFIX = 18 | DOXYPATH = /Applications/Doxygen.app/Contents/Resources/ 19 | 20 | CFLAGS += -Wall -m64 -fno-builtin -fsigned-char -pthread -fPIC -D__USE_BSD -D_DARWIN_C_SOURCE -DPOSIX -DL_ENDIAN 21 | CFLAGS += -Wno-unused-label -Wno-unused-function -Wno-int-to-void-pointer-cast 22 | INCPATH += -I /usr/include/uuid 23 | -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/config/OSX_X86_config: -------------------------------------------------------------------------------- 1 | #// 2 | #// $Id: OSX_X86_config 1639 2017-06-08 09:04:15Z bloehr $ 3 | #// 4 | #// DESCRIPTION Config file to make TRDP for OSX_X86 target 5 | #// 6 | #// AUTHOR Christoph Schneider, Bombardier Transportation GmbH 7 | #// 8 | #// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. 9 | #// If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 10 | #// Copyright Bombardier Transportation Inc. or its subsidiaries and others, 2013. All rights reserved. 11 | #// 12 | 13 | ARCH = osx_x86 14 | TARGET_VOS = posix 15 | TARGET_OS = POSIX 16 | TCPREFIX = 17 | TCPOSTFIX = 18 | DOXYPATH = /Applications/Doxygen.app/Contents/Resources/ 19 | 20 | CFLAGS += -Wall -m32 -fno-builtin -fsigned-char -pthread -fPIC -D__USE_BSD -D_DARWIN_C_SOURCE -DPOSIX -DL_ENDIAN 21 | CFLAGS += -Wno-unused-label -Wno-unused-function 22 | INCPATH += -I /usr/include/uuid 23 | -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/config/POSIX_X86_config: -------------------------------------------------------------------------------- 1 | #// 2 | #// $Id: POSIX_X86_config 1634 2017-05-31 13:39:15Z bloehr $ 3 | #// 4 | #// DESCRIPTION Config file to make TRDP for POSIX_X86 target 5 | #// 6 | #// AUTHOR Christoph Schneider, Bombardier Transportation GmbH 7 | #// 8 | #// All rights reserved. Reproduction, modification, use or disclosure 9 | #// to third parties without express authority is forbidden. 10 | #// Copyright Bombardier Transportation GmbH, Germany, 2013. 11 | #// 12 | 13 | TARGET_VOS = posix 14 | TARGET_FLAG = POSIX 15 | TCPREFIX = 16 | TCPOSTFIX = 17 | DOXYPATH = /usr/local/bin/ 18 | 19 | CFLAGS += -O2 -Wall -fstrength-reduce -fno-builtin -fsigned-char -D$(TARGET_FLAG) -pthread -fPIC -DL_ENDIAN 20 | LDFLAGS += -lrt 21 | INCPATH += -I /usr/include/uuid 22 | -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/config/QNX_X86_config: -------------------------------------------------------------------------------- 1 | #// 2 | #// $Id: QNX_X86_config 1634 2017-05-31 13:39:15Z bloehr $ 3 | #// 4 | #// DESCRIPTION Config file to make TRDP for QNX_X86 target 5 | #// 6 | #// AUTHOR Bombardier Transportation GmbH 7 | #// 8 | #// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. 9 | #// If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 10 | #// Copyright Bombardier Transportation Inc. or its subsidiaries and others, 2013. All rights reserved. 11 | #// 12 | 13 | ARCH = qnx_x86 14 | TARGET_VOS = posix 15 | TARGET_OS = POSIX 16 | TCPREFIX = 17 | TCPOSTFIX = 18 | DOXYPATH = /usr/local/bin/ 19 | 20 | CFLAGS += -Wall -fstrength-reduce -fno-builtin -fsigned-char -pthread -fPIC -D__USE_BSD -D_DARWIN_C_SOURCE -DPOSIX -DL_ENDIAN 21 | LDFLAGS += -lrt 22 | -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/config/VXWORKS_KMODE_PPC_config: -------------------------------------------------------------------------------- 1 | #// 2 | #// $Id: VXWORKS_KMODE_PPC_config 1634 2017-05-31 13:39:15Z bloehr $ 3 | #// 4 | #// DESCRIPTION Config file to make TRDP for VXWORKS_PPC target 5 | #// 6 | #// AUTHOR Bombardier Transportation GmbH 7 | #// 8 | #// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0 9 | #// If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/ 10 | #// Copyright Bombardier Transportation Inc. or its subsidiaries and others, 2014. All rights reserved. 11 | #// 12 | 13 | # Setup all relevant variables for the VxWorks 6.6 toolchain if not already provided as env. variables 14 | 15 | ifndef WIND_PLATFORM 16 | WIND_PLATFORM=vxworks-6.6 17 | endif 18 | 19 | ifndef WIND_HOST_TYPE 20 | WIND_HOST_TYPE=x86-linux2 21 | endif 22 | 23 | ifndef WIND_HOME 24 | WIND_HOME=/opt/cross/vxworks-6.6 25 | endif 26 | 27 | # as a 'standard' VxWorks installation shall be assumed the following variables only depend from the 28 | # variables above 29 | 30 | WIND_BASE=$(WIND_HOME)/$(WIND_PLATFORM) 31 | WIND_GNU_PATH=$(WIND_HOME)/gnu/4.1.2-vxworks-6.6 32 | TCPATH = $(WIND_HOME)/gnu/4.1.2-vxworks-6.6/x86-linux2/bin/ 33 | 34 | ARCH = vxworks-ppc 35 | CPU = PPC603 36 | TARGET_VOS = vxworks 37 | TARGET_OS = VXWORKS 38 | TCPREFIX = $(TCPATH) 39 | TCPOSTFIX = ppc 40 | DOXYPATH = /usr/local/bin/ 41 | 42 | CFLAGS += -ansi -Wall -fstrength-reduce -fno-builtin -mlongcall -fsigned-char -DCPU=$(CPU) -I$(WIND_BASE)/target/h -I$(WIND_BASE)/target/h/wrn/coreip -DB_ENDIAN 43 | 44 | 45 | #LINT section 46 | LINT_SYSINCLUDE_DIRECTIVES = -D_WRS_KERNEL -D_POSIX_C_SOURCE -DCPU=$(CPU) -I./src/vos/vxworks -I$(WIND_BASE)/target/usr/h -I$(WIND_BASE)/target/h -I$(WIND_BASE)/target/h/wrn/coreip +libdir $(WIND_BASE)/target/usr/h,$(WIND_BASE)/target/h,$(WIND_BASE)/target/h/wrn/coreip -wlib 0 47 | -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/config/VXWORKS_PPC_config: -------------------------------------------------------------------------------- 1 | #// 2 | #// $Id: VXWORKS_PPC_config 1634 2017-05-31 13:39:15Z bloehr $ 3 | #// 4 | #// DESCRIPTION Config file to make TRDP for VXWORKS_PPC target 5 | #// 6 | #// AUTHOR Christoph Schneider, Bombardier Transportation GmbH 7 | #// 8 | #// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0 9 | #// If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/ 10 | #// Copyright Bombardier Transportation Inc. or its subsidiaries and others, 2014. All rights reserved. 11 | #// 12 | 13 | TARGET_VOS = vxworks 14 | TARGET_FLAG = VXWORKS 15 | TCPREFIX = 16 | TCPOSTFIX = ppc 17 | DOXYPATH = /usr/local/bin/ 18 | 19 | CFLAGS += -O2 -Wall -DO_DC -fstrength-reduce -fno-builtin -mlongcall -fsigned-char -D$(TARGET_FLAG) -lpthread -DB_ENDIAN -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/config/WAGO_PFC_config: -------------------------------------------------------------------------------- 1 | #// 2 | #// $Id: WAGO_PFC_config 2016-03-16 12:00:00Z cmoeller $ 3 | #// 4 | #// DESCRIPTION Config file to make TRDP for WAGO PFC 5 | #// 6 | #// AUTHOR WAGO Kontakttechnik GmbH & Co. KG - Thomas Brandt 7 | #// 8 | #// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0 9 | #// If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/ 10 | #// Copyright WAGO Kontakttechnik GmbH & Co KG, 2016. All rights reserved. 11 | #// 12 | 13 | ARCH = linux 14 | TARGET_VOS = posix 15 | TARGET_OS = LINUX 16 | TCPREFIX = /opt/LINARO.Toolchain-2017.10/arm-linux-gnueabihf/bin/arm-linux-gnueabihf- 17 | TCPOSTFIX = 18 | DOXYPATH = /usr/local/bin/ 19 | LIB_PATH = ../../platform-wago-pfcXXX/sysroot-target/ 20 | 21 | # the _GNU_SOURCE is needed to get the extended poll feature for the POSIX socket 22 | 23 | CFLAGS += -Wall -fstrength-reduce -fno-builtin -fsigned-char -pthread -fPIC -D_GNU_SOURCE -DPOSIX 24 | LDFLAGS += -lrt -L $(LIB_PATH)usr/lib/ 25 | 26 | LINT_SYSINCLUDE_DIRECTIVES = -i ./src/vos/posix -wlib 0 -DL_ENDIAN 27 | -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/config/buildsettings_posix_TEMPLATE: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | #// 3 | #// $Id: buildsettings_posix_TEMPLATE 1417 2015-08-03 14:31:38Z bloehr $ 4 | #// 5 | #// DESCRIPTION TRDP build settings for posix target 6 | #// 7 | #// AUTHOR Christoph Schneider, Bombardier Transportation GmbH 8 | #// 9 | #// All rights reserved. Reproduction, modification, use or disclosure 10 | #// to third parties without express authority is forbidden. 11 | #// Copyright Bombardier Transportation GmbH, Germany, 2013. 12 | #// 13 | export DOXYPATH="/usr/local/bin/" 14 | unset INCPATH 15 | -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/config/buildsettings_vxworks_TEMPLATE: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | #// 3 | #// $Id: buildsettings_vxworks_TEMPLATE 1417 2015-08-03 14:31:38Z bloehr $ 4 | #// 5 | #// DESCRIPTION TRDP build settings for vxworks target 6 | #// 7 | #// AUTHOR Christoph Schneider, Bombardier Transportation GmbH 8 | #// 9 | #// All rights reserved. Reproduction, modification, use or disclosure 10 | #// to third parties without express authority is forbidden. 11 | #// Copyright Bombardier Transportation GmbH, Germany, 2013. 12 | #// 13 | export WIND_HOME="/opt/cross/vxworks-6.6" 14 | export WIND_BASE=$WIND_HOME"/vxworks-6.6" 15 | export WIND_LIC_PROXY=$WIND_HOME"/setup/x86-linux2/bin" 16 | export PATH=":/usr/bin" 17 | export PATH+=":/bin" 18 | export PATH+=:$WIND_HOME"/gnu/4.1.2-vxworks-6.6/x86-linux2/bin" 19 | export INCPATH="-I "$WIND_BASE"/target/h" 20 | export DOXYPATH="/usr/local/bin" 21 | -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/doc/TCN-TRDP2-D-BOM-033-xx - TRDP Reference Manual.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WAGO/pfc-howtos/7830974caec0023016e8096fcbf968283904db24/HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/doc/TCN-TRDP2-D-BOM-033-xx - TRDP Reference Manual.pdf -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/doc/TCN-TRDP4-D-BOM-030-12_-_TRDP_Release_Notes.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WAGO/pfc-howtos/7830974caec0023016e8096fcbf968283904db24/HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/doc/TCN-TRDP4-D-BOM-030-12_-_TRDP_Release_Notes.pdf -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/doc/images/SingleThreadedWorkflowPD.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WAGO/pfc-howtos/7830974caec0023016e8096fcbf968283904db24/HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/doc/images/SingleThreadedWorkflowPD.pdf -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/doc/images/TCNOpen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WAGO/pfc-howtos/7830974caec0023016e8096fcbf968283904db24/HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/doc/images/TCNOpen.png -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/doc/memory.xls: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WAGO/pfc-howtos/7830974caec0023016e8096fcbf968283904db24/HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/doc/memory.xls -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/example/SenderDemo/Controller.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************/ 2 | /** 3 | * @file Controller.h 4 | * 5 | * @brief SenderDemo for Cocoa 6 | * 7 | * @details 8 | * 9 | * @note Project: TCNOpen TRDP prototype stack 10 | * 11 | * @author Bernd Loehr, NewTec GmbH 12 | * 13 | * @remarks This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. 14 | * If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 15 | * Copyright NewTec GmbH System-Entwicklung und Beratung, 2013. All rights reserved. 16 | * 17 | * $Id: Controller.h 1732 2018-05-14 08:05:07Z bloehr $ 18 | * 19 | */ 20 | 21 | #import 22 | 23 | 24 | @interface Controller : NSResponder { 25 | 26 | // PD Sender: 27 | IBOutlet id textField; 28 | IBOutlet id sliderField1; 29 | IBOutlet id sliderField2; 30 | IBOutlet id ipAddress; 31 | IBOutlet id comID; 32 | IBOutlet id interval; 33 | 34 | // PD Receiver: 35 | IBOutlet id rec1IP; 36 | IBOutlet id rec1ComID; 37 | IBOutlet id rec1Color; 38 | IBOutlet id rec1Count; 39 | IBOutlet id rec1Message; 40 | IBOutlet id rec2IP; 41 | IBOutlet id rec2ComID; 42 | IBOutlet id rec2Color; 43 | IBOutlet id rec2Count; 44 | IBOutlet id rec2Message; 45 | IBOutlet id rec3IP; 46 | IBOutlet id rec3ComID; 47 | IBOutlet id rec3Color; 48 | IBOutlet id rec3Count; 49 | IBOutlet id rec3Message; 50 | IBOutlet id rec4IP; 51 | IBOutlet id rec4ComID; 52 | IBOutlet id rec4Color; 53 | IBOutlet id rec4Count; 54 | IBOutlet id rec4Message; 55 | IBOutlet id rec5IP; 56 | IBOutlet id rec5ComID; 57 | IBOutlet id rec5Color; 58 | IBOutlet id rec5Bar; 59 | 60 | // MD Sender: 61 | IBOutlet id MDOutMessage; 62 | IBOutlet id MDcomID; 63 | IBOutlet id MRinMessage; 64 | IBOutlet id MDipAddress; 65 | IBOutlet id MRcomID; 66 | IBOutlet id MDrecColor; 67 | 68 | IBOutlet id MsgView; 69 | 70 | Boolean isActive; 71 | 72 | NSTimer *timer; 73 | 74 | uint32_t dataArray[5]; 75 | Boolean dataChanged; 76 | } 77 | 78 | - (IBAction) button1:(id)sender; 79 | - (IBAction) button2:(id)sender; 80 | - (IBAction) button3:(id)sender; 81 | - (IBAction) slider1:(id)sender; 82 | - (IBAction) slider2:(id)sender; 83 | - (IBAction) enable1:(id)sender; 84 | - (IBAction) ipChanged:(id)sender; 85 | - (IBAction) comIDChanged:(id)sender; 86 | - (IBAction) intervalChanged:(id)sender; 87 | 88 | - (IBAction) ipChangedRec1:(id)sender; 89 | - (IBAction) comIDChangedRec1:(id)sender; 90 | - (IBAction) ipChangedRec2:(id)sender; 91 | - (IBAction) comIDChangedRec2:(id)sender; 92 | - (IBAction) ipChangedRec3:(id)sender; 93 | - (IBAction) comIDChangedRec3:(id)sender; 94 | - (IBAction) ipChangedRec4:(id)sender; 95 | - (IBAction) comIDChangedRec4:(id)sender; 96 | - (IBAction) ipChangedRec5:(id)sender; 97 | - (IBAction) comIDChangedRec5:(id)sender; 98 | 99 | // MD Sender 100 | 101 | - (IBAction) MDRequest:(id)sender; 102 | - (IBAction) MDComIDChanged:(id)sender; 103 | - (IBAction) MDIPChanged:(id)sender; 104 | 105 | 106 | @end 107 | -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/example/SenderDemo/English.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WAGO/pfc-howtos/7830974caec0023016e8096fcbf968283904db24/HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/example/SenderDemo/English.lproj/InfoPlist.strings -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/example/SenderDemo/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | dev 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 2.1 25 | LSApplicationCategoryType 26 | public.app-category.utilities 27 | NSMainNibFile 28 | MainMenu 29 | NSPrincipalClass 30 | NSApplication 31 | 32 | 33 | -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/example/SenderDemo/Resources/Bombardier.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WAGO/pfc-howtos/7830974caec0023016e8096fcbf968283904db24/HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/example/SenderDemo/Resources/Bombardier.png -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/example/SenderDemo/Resources/Engineering.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WAGO/pfc-howtos/7830974caec0023016e8096fcbf968283904db24/HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/example/SenderDemo/Resources/Engineering.png -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/example/SenderDemo/Resources/FARsystems.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WAGO/pfc-howtos/7830974caec0023016e8096fcbf968283904db24/HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/example/SenderDemo/Resources/FARsystems.png -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/example/SenderDemo/Resources/NewTec.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WAGO/pfc-howtos/7830974caec0023016e8096fcbf968283904db24/HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/example/SenderDemo/Resources/NewTec.png -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/example/SenderDemo/Resources/Siemens.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WAGO/pfc-howtos/7830974caec0023016e8096fcbf968283904db24/HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/example/SenderDemo/Resources/Siemens.png -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/example/SenderDemo/SenderDemo.xcodeproj/TemplateIcon.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WAGO/pfc-howtos/7830974caec0023016e8096fcbf968283904db24/HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/example/SenderDemo/SenderDemo.xcodeproj/TemplateIcon.icns -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/example/SenderDemo/SenderDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/example/SenderDemo/SenderDemo.xcodeproj/project.xcworkspace/xcuserdata/bernd.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WAGO/pfc-howtos/7830974caec0023016e8096fcbf968283904db24/HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/example/SenderDemo/SenderDemo.xcodeproj/project.xcworkspace/xcuserdata/bernd.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/example/SenderDemo/SenderDemo.xcodeproj/xcuserdata/bernd.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/example/SenderDemo/SenderDemo.xcodeproj/xcuserdata/bernd.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | SenderDemo.xcscheme 8 | 9 | orderHint 10 | 14 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 8D1107260486CEB800E47090 16 | 17 | primary 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/example/SenderDemo/SenderDemo_Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'SenderDemo' target in the 'SenderDemo' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #endif 8 | -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/example/SenderDemo/main.m: -------------------------------------------------------------------------------- 1 | /******************************************************************************/ 2 | /** 3 | * @file main.m 4 | * 5 | * @brief SenderDemo for Cocoa 6 | * 7 | * @details 8 | * 9 | * @note Project: TCNOpen TRDP prototype stack 10 | * 11 | * @author Bernd Loehr, NewTec GmbH 12 | * 13 | * @remarks This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. 14 | * If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 15 | * Copyright NewTec GmbH System-Entwicklung und Beratung, 2013. All rights reserved. 16 | * 17 | * $Id: main.m 1098 2013-10-10 12:42:38Z bloehr $ 18 | * 19 | */ 20 | 21 | #import 22 | 23 | int main(int argc, char *argv[]) 24 | { 25 | return NSApplicationMain(argc, (const char **) argv); 26 | } 27 | -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/example/SenderDemo/pdsend.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************/ 2 | /** 3 | * @file pdsend.h 4 | * 5 | * @brief SenderDemo for Cocoa 6 | * 7 | * @details 8 | * 9 | * @note Project: TCNOpen TRDP prototype stack 10 | * 11 | * @author Bernd Loehr, NewTec GmbH 12 | * 13 | * @remarks This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. 14 | * If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 15 | * Copyright NewTec GmbH System-Entwicklung und Beratung, 2013. All rights reserved. 16 | * 17 | * $Id: pdsend.h 1732 2018-05-14 08:05:07Z bloehr $ 18 | * 19 | */ 20 | 21 | #include "trdp_if_light.h" 22 | #include "vos_thread.h" 23 | 24 | #define PD_COMID0 2000 25 | #define PD_COMID0_CYCLE 1000000 26 | #define PD_COMID0_TIMEOUT 3200000 27 | 28 | #define PD_COMID1 2001 29 | #define PD_COMID1_CYCLE 100000 30 | #define PD_COMID1_TIMEOUT 1200000 31 | 32 | #define PD_COMID2 2002 33 | #define PD_COMID2_CYCLE 100000 34 | #define PD_COMID2_TIMEOUT 1200000 35 | 36 | #define PD_COMID3 2003 37 | #define PD_COMID3_CYCLE 100000 38 | #define PD_COMID3_TIMEOUT 1200000 39 | 40 | 41 | typedef struct pd_receive_packet { 42 | TRDP_SUB_T subHandle; 43 | uint32_t comID; 44 | uint32_t timeout; 45 | char srcIP[16]; 46 | uint32_t counter; 47 | uint8_t message[64]; 48 | int changed; 49 | int invalid; 50 | } PD_RECEIVE_PACKET_T; 51 | 52 | typedef struct md_receive_packet { 53 | TRDP_LIS_T lisHandle; 54 | TRDP_UUID_T sessionId; 55 | uint32_t comID; 56 | uint32_t timeout; 57 | char srcIP[16]; 58 | uint8_t message[64]; 59 | uint32_t msgsize; 60 | uint32_t replies; 61 | int changed; 62 | int invalid; 63 | } MD_RECEIVE_PACKET_T; 64 | 65 | 66 | int pd_init ( 67 | const char* pDestAddress, 68 | uint32_t comID, 69 | uint32_t interval); 70 | 71 | void pd_deinit (void); 72 | 73 | void pd_stop (int redundant); 74 | 75 | void pd_updatePublisher (int stop); 76 | void pd_updateSubscriber (int index); 77 | void pd_updateData (uint8_t *pData, size_t dataSize); 78 | void pd_sub (PD_RECEIVE_PACKET_T* recPacket); 79 | PD_RECEIVE_PACKET_T* pd_get(int index); 80 | 81 | void setIP (const char* ipAddr); 82 | void setComID (uint32_t comID); 83 | void setInterval (uint32_t interval); 84 | 85 | void setIPRec (int index, const char* ipAddr); 86 | void setComIDRec (int index, uint32_t comID); 87 | 88 | int pd_loop2 (void); 89 | 90 | // MD requester 91 | //void md_changeListener(uint32_t, uint32_t); 92 | void md_listen(MD_RECEIVE_PACKET_T*); 93 | int md_request (const char* ipAddr, uint32_t, char*); 94 | MD_RECEIVE_PACKET_T* md_get (void); 95 | 96 | 97 | -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/ladder/readme-Ladder-support.txt: -------------------------------------------------------------------------------- 1 | TCNOpen TRDP Ladder Support Readme 2 | $Id$ 3 | 4 | 1. Ladder network for TRDP Ladder Support 5 | 6 | TRDP Ladder Support is designed to work with the ladder network defined in IEC 61375-3-4 AnnexD. 7 | When other type of ladder network is used, it might be necessary that failures of the network are managed by the application. 8 | 9 | 2. To compile TRDP Ladder Support library 10 | 11 | Makefile_TAUL_library is the file to make TRDP Ladder Support library. 12 | In order to make TRDP Ladder Support library, you need to rename Makefile_TAUL_library to Makefile. 13 | 14 | 3. Sample application using TRDP Ladder Support 15 | 16 | The source code for sample application using TRDP Ladder Support library is found in the directiry of example/TAUL_PD. 17 | Makefile_TAUL_library_APP is the file to make sample application using TRDP Ladder Support library. 18 | In order to make a sample application using TRDP Ladder Support library, you need to rename Makefile_TAUL_library_APP to Makefile. 19 | 20 | 4. To use TAUL (TRDP Application Utilities for Ladder Support) 21 | 22 | For using TAUL, refer to the document TCN-TRDP2-D-TOS-003 TRDP Ladder Topology Support Architecture. 23 | -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/ladder/tau_ldLadder_config.c: -------------------------------------------------------------------------------- 1 | /**********************************************************************************************************************/ 2 | /** 3 | * @file tau_ldLadder_config.c 4 | * 5 | * @brief Configuration for TRDP Ladder Topology Support 6 | * 7 | * @details 8 | * 9 | * @note Project: TCNOpen TRDP prototype stack 10 | * 11 | * @author Kazumasa Aiba, Toshiba Corporation 12 | * 13 | * @remarks This source code corresponds to TRDP_LADDER open source software. 14 | * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. 15 | * If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 16 | * Copyright Toshiba Corporation, Japan, 2013. All rights reserved. 17 | * 18 | */ 19 | 20 | #ifdef TRDP_OPTION_LADDER 21 | /******************************************************************************* 22 | * INCLUDES 23 | */ 24 | 25 | #include "tau_xml.h" 26 | #include "tau_ldLadder.h" 27 | #include "tau_ldLadder_config.h" 28 | 29 | /****************************************************************************** 30 | * Globals 31 | */ 32 | /* TRDP Config *****************************************************/ 33 | #ifdef XML_CONFIG_ENABLE 34 | /* XML Config File : Enable */ 35 | 36 | /* XML Config File Name */ 37 | CHAR8 xmlConfigFileName[FILE_NAME_MAX_SIZE] = {0}; /* XML Config File Name */ 38 | TRDP_XML_DOC_HANDLE_T xmlConfigHandle; /* XML Config Handle */ 39 | TAU_LD_CONFIG_T *pTaulConfig; /* TAUL Config */ 40 | TAU_LD_CONFIG_T taulConfig = {0}; /* TAUL Config */ 41 | 42 | /* General parameters from xml configuration file */ 43 | TRDP_MEM_CONFIG_T memoryConfigTAUL; 44 | TRDP_DBG_CONFIG_T debugConfigTAUL; 45 | UINT32 numComPar = 0; 46 | TRDP_COM_PAR_T *pComPar = NULL; 47 | UINT32 numIfConfig = 0; 48 | TRDP_IF_CONFIG_T *pIfConfig = NULL; 49 | 50 | /* Dataset configuration from xml configuration file */ 51 | UINT32 numComId = 0; 52 | TRDP_COMID_DSID_MAP_T *pComIdDsIdMap = NULL; 53 | UINT32 numDataset = 0; 54 | apTRDP_DATASET_T apDataset = NULL; 55 | 56 | TRDP_APP_SESSION_T appHandle; /* Sub-network Id1 identifier to the library instance */ 57 | TRDP_APP_SESSION_T appHandle2; /* Sub-network Id2 identifier to the library instance */ 58 | 59 | /* Array of session configurations - one for each interface, only numIfConfig elements actually used */ 60 | sSESSION_CONFIG_T arraySessionConfigTAUL[MAX_SESSIONS]; 61 | /* Array of Exchange Parameter */ 62 | TRDP_EXCHG_PAR_T *arrayExchgPar[LADDER_IF_NUMBER] = {0}; 63 | /* Exchange Parameter from xml configuration file */ 64 | UINT32 numExchgPar = 0; /* Number of Exchange Parameter */ 65 | 66 | #endif /* ifdef XML_CONFIG_ENABLE */ 67 | #endif /* TRDP_OPTION_LADDER */ 68 | -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/readme-makefile.txt: -------------------------------------------------------------------------------- 1 | TCNOpen TRDP Makefile Readme 2 | $Id: readme-makefile.txt 770 2013-05-06 11:58:47Z cschneider $ 3 | 4 | *** Hints for usage of Makefile in build shells *** 5 | 1) Edit 'buildsettings_%TARGET%_TEMPLATE' in 'config' folder and change its file name (e.g. to 6 | 'buildsettings_%TARGET%'), so that it is not overwritten on svn update. Adapt the specified 7 | paths to your build system environment. 8 | 9 | 2) Apply buildsettings in build shell using 'source config/buildsettings_%TARGET%' 10 | 11 | 3) Make configuration settings for target. These are stored in the files ending with '_config' in 12 | the 'config' folder (e.g. POSIX_X86_config or VXWORKS_PPC_config). Use 'make POSIX_X86_config' 13 | which copies the settings for the specified target to 'config/config.mk', which is then included 14 | automatically every time make is called. 15 | Steps 1-3 need to be done once. Only Step 2 must be repeated every time the shell is changed / closed. 16 | 17 | 4) Use 'make help' to view available parameters and further make information. As the target has already been 18 | defined by the config settings in Step 3, no more information needs to be passed to make. 19 | -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/readme.txt: -------------------------------------------------------------------------------- 1 | TCNOpen TRDP prototype stack 2 | 3 | ******************************************************************************************************* 4 | * Please see 'doc/TCN-TRDP2-D-BOM-019-01 - System Architecture & Design.doc for build instructions.doc' 5 | ******************************************************************************************************* 6 | 7 | -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/resources/windows/getopt/getopt.c: -------------------------------------------------------------------------------- 1 | /* 2 | POSIX getopt for Windows 3 | 4 | AT&T Public License 5 | 6 | Code given out at the 1985 UNIFORUM conference in Dallas. 7 | */ 8 | 9 | #ifndef __GNUC__ 10 | 11 | #include "getopt.h" 12 | #include 13 | #include 14 | 15 | #define EOF (-1) 16 | #define ERR(s, c) if(opterr){\ 17 | char errbuf[2];\ 18 | errbuf[0] = c; errbuf[1] = '\n';\ 19 | fputs(argv[0], stderr);\ 20 | fputs(s, stderr);\ 21 | fputc(c, stderr);} 22 | //(void) write(2, argv[0], (unsigned)strlen(argv[0]));\ 23 | //(void) write(2, s, (unsigned)strlen(s));\ 24 | //(void) write(2, errbuf, 2);} 25 | 26 | int opterr = 1; 27 | int optind = 1; 28 | int optopt; 29 | char *optarg; 30 | 31 | int 32 | getopt(argc, argv, opts) 33 | int argc; 34 | char **argv, *opts; 35 | { 36 | static int sp = 1; 37 | register int c; 38 | register char *cp; 39 | 40 | if(sp == 1) 41 | if(optind >= argc || 42 | argv[optind][0] != '-' || argv[optind][1] == '\0') 43 | return(EOF); 44 | else if(strcmp(argv[optind], "--") == 0) { 45 | optind++; 46 | return(EOF); 47 | } 48 | optopt = c = argv[optind][sp]; 49 | if(c == ':' || (cp=strchr(opts, c)) == NULL) { 50 | ERR(": illegal option -- ", c); 51 | if(argv[optind][++sp] == '\0') { 52 | optind++; 53 | sp = 1; 54 | } 55 | return('?'); 56 | } 57 | if(*++cp == ':') { 58 | if(argv[optind][sp+1] != '\0') 59 | optarg = &argv[optind++][sp+1]; 60 | else if(++optind >= argc) { 61 | ERR(": option requires an argument -- ", c); 62 | sp = 1; 63 | return('?'); 64 | } else 65 | optarg = argv[optind++]; 66 | sp = 1; 67 | } else { 68 | if(argv[optind][++sp] == '\0') { 69 | sp = 1; 70 | optind++; 71 | } 72 | optarg = NULL; 73 | } 74 | return(c); 75 | } 76 | 77 | #endif /* __GNUC__ */ 78 | -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/resources/windows/getopt/getopt.h: -------------------------------------------------------------------------------- 1 | /* 2 | POSIX getopt for Windows 3 | 4 | AT&T Public License 5 | 6 | Code given out at the 1985 UNIFORUM conference in Dallas. 7 | */ 8 | 9 | #ifdef POSIX 10 | #include 11 | #endif 12 | #ifndef POSIX 13 | 14 | #ifndef _WINGETOPT_H_ 15 | #define _WINGETOPT_H_ 16 | 17 | #ifdef __cplusplus 18 | extern "C" { 19 | #endif 20 | 21 | extern int opterr; 22 | extern int optind; 23 | extern int optopt; 24 | extern char *optarg; 25 | extern int getopt(int argc, char **argv, char *opts); 26 | 27 | #ifdef __cplusplus 28 | } 29 | #endif 30 | 31 | #endif /* _GETOPT_H_ */ 32 | #endif /* __GNUC__ */ 33 | -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/rules.mk: -------------------------------------------------------------------------------- 1 | #// 2 | #// $Id: $ 3 | #// 4 | #// DESCRIPTION Basic Make Rules to create TRDP 5 | #// 6 | #// AUTHOR Bombardier Transportation GmbH 7 | #// 8 | #// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0 9 | #// If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/ 10 | #// Copyright Bombardier Transportation Inc. or its subsidiaries and others, 2014. All rights reserved. 11 | #// 12 | 13 | # 14 | # Include the make variables (CC, etc...) 15 | # 16 | 17 | ECHO = echo 18 | 19 | ifeq ($(TARGET_OS), VXWORKS) 20 | AS = $(TCPATH)as$(TCPOSTFIX) 21 | LD = $(TCPATH)ld$(TCPOSTFIX) 22 | CC = $(TCPATH)cc$(TCPOSTFIX) 23 | CPP = $(CC) -E 24 | AR = $(TCPATH)ar$(TCPOSTFIX) 25 | NM = $(TCPATH)nm$(TCPOSTFIX) 26 | STRIP = @echo "No stripping in VxWorks" 27 | OBJCOPY = $(TCPATH)objcopy$(TCPOSTFIX) 28 | OBJDUMP = $(TCPATH)objdump$(TCPOSTFIX) 29 | RANLIB = $(TCPATH)RANLIB$(TCPOSTFIX) 30 | else 31 | ifeq ($(TARGET_OS), INTEGRITY) 32 | CC = cc$(TCPOSTFIX) 33 | else 34 | #WINDOWS, LINUX and all other 35 | AS = $(TCPATH)$(TCPREFIX)as 36 | LD = $(TCPATH)$(TCPREFIX)ld 37 | CC = $(TCPATH)$(TCPREFIX)gcc 38 | CPP = $(TCPATH)$(CC) -E 39 | AR = $(TCPATH)$(TCPREFIX)ar 40 | NM = $(TCPATH)$(TCPREFIX)nm 41 | STRIP = $(TCPATH)$(TCPREFIX)strip 42 | OBJCOPY = $(TCPATH)$(TCPREFIX)objcopy 43 | OBJDUMP = $(TCPATH)$(TCPREFIX)objdump 44 | RANLIB = $(TCPATH)$(TCPREFIX)RANLIB 45 | LN = ln -s 46 | endif 47 | endif 48 | 49 | ifeq ($(DEBUG), TRUE) 50 | ifneq ($(TARGET_OS), INTEGRITY) 51 | DBGFLAGS= -g 52 | else 53 | DBGFLAGS= -G 54 | endif 55 | else 56 | ifneq ($(TARGET_OS), INTEGRITY) 57 | OPTFLAGS= -O2 58 | ifneq ($(TARGET_OS), ARM_TI) 59 | WARNFLAGS= -Wall 60 | endif 61 | else 62 | OPTFLAGS= -Ospeed -OI 63 | WARNFLAGS= -Wall 64 | endif 65 | endif 66 | 67 | 68 | -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/spy/doc/user-guide-a4.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WAGO/pfc-howtos/7830974caec0023016e8096fcbf968283904db24/HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/spy/doc/user-guide-a4.pdf -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/spy/linux32/readme.txt: -------------------------------------------------------------------------------- 1 | TRDP SPY 2 | ---------------------------------- 3 | Requirements: 4 | Wireshark version 2.2.7 5 | 6 | Features: 7 | 1. User data interpretation support 8 | 9 | Installation Instruction: 10 | Copy trdp_spy.so into plugin directory 11 | Set in Edit/Preferences/TRDP your specific trdp_config.xml. 12 | This is needed to interpret the transmitted user data. 13 | -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/spy/linux32/trdp_spy.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WAGO/pfc-howtos/7830974caec0023016e8096fcbf968283904db24/HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/spy/linux32/trdp_spy.so -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/spy/linux64/readme.txt: -------------------------------------------------------------------------------- 1 | TRDP SPY 2 | ---------------------------------- 3 | Requirements: 4 | Wireshark version 2.2.7 5 | 6 | Features: 7 | 1. User data interpretation support 8 | 9 | Installation Instruction: 10 | Copy trdp_spy.so into plugin directory 11 | Set in Edit/Preferences/TRDP your specific trdp_config.xml. 12 | This is needed to interpret the transmitted user data. 13 | -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/spy/linux64/trdp_spy.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WAGO/pfc-howtos/7830974caec0023016e8096fcbf968283904db24/HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/spy/linux64/trdp_spy.so -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/spy/src/CMakeListsCustom.txt: -------------------------------------------------------------------------------- 1 | # CMakeListsCustom.txt 2 | # 3 | # Wireshark - Network traffic analyzer 4 | # By Gerald Combs 5 | # Copyright 1998 Gerald Combs 6 | # 7 | # This program is free software; you can redistribute it and/or 8 | # modify it under the terms of the GNU General Public License 9 | # as published by the Free Software Foundation; either version 2 10 | # of the License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with this program; if not, write to the Free Software 19 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 20 | # 21 | # Add a list of your custom plugins SRC dir here including the path 22 | # 23 | 24 | set(CUSTOM_PLUGIN_SRC_DIR 25 | plugins/trdp_spy 26 | ) 27 | 28 | # 29 | # Editor modelines - http://www.wireshark.org/tools/modelines.html 30 | # 31 | # Local variables: 32 | # c-basic-offset: 8 33 | # tab-width: 8 34 | # indent-tabs-mode: t 35 | # End: 36 | # 37 | # vi: set shiftwidth=8 tabstop=8 noexpandtab: 38 | # :indentSize=8:tabSize=8:noTabs=false: 39 | # 40 | -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/spy/src/README.txt: -------------------------------------------------------------------------------- 1 | 2 | _____ _____ ____ _____ _____ _____ __ __ 3 | |_ _| __ | \| _ | | __| _ | | | 4 | | | | -| | | __| |__ | __|_ _| 5 | |_| |__|__|____/|__| |_____|__| |_| 6 | 7 | 8 | 9 | This Plugin can be used to display packages containing TRDP (Train Realtime Data Protocol). 10 | 11 | The Plugin was developed for wireshark version 2.2.7. 12 | 13 | S E T U P 14 | ========= 15 | 16 | Download the source code from wireshark for the project's homepage [1]. 17 | Follow the build instructions for the used operating system [2]. 18 | 19 | *Copy* the *trdp_spy* folder into the "plugins" subfolder of your wireshark source directory. 20 | *Copy CMakeListsCustom.txt* into the root of the wirshark sources, (next to the plugins folder). 21 | 22 | 23 | 24 | [1] http://www.wireshark.org/download.html 25 | [2] http://www.wireshark.org/docs/wsdg_html_chunked/ChapterSetup.html 26 | 27 | 28 | B U I L D I N G 29 | =============== 30 | 31 | Generate a new folder, as described in the build instructions, next to the source code. E.g. wireshark-custom 32 | 33 | Windows 34 | ------- 35 | 36 | Copy (and probalby adapt) the two deliverd bat files from the subfolder scripts into the new generated wireshark-custom folder. 37 | Open there a command prompt and execute the following commands: 38 | > setupEnv.bat 39 | > cmake ../wireshark-2.2.7/ 40 | > runIDE.bat 41 | 42 | Now Visual Studio is opened, where the complete solution can be rebuilt. 43 | 44 | 45 | Linux 46 | ----- 47 | 48 | In the folder wireshark-custom, the following command will generate wireshark with the plugin: 49 | $ cd wireshark-custom/ 50 | $ cmake ../wireshark-2.2.7/ 51 | $ make 52 | 53 | Hint: The following packages where installed on ubuntu: 54 | $ sudo apt install qttools5-dev qttools5-dev-tools libqt5svg5-dev qtmultimedia5-dev cmake libkrb5-dev libkrb5-26-heimdal byacc flex libpcap-dev 55 | -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/spy/src/scripts/runIDE.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | rem Start Visual Studio 2017 3 | call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\devenv.exe" wireshark.vcxproj -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/spy/src/scripts/setupEnv.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | set WORKDIR=%cd% 3 | set CYGWIN=nodosfilewarning 4 | set WIRESHARK_BASE_DIR=%WORKDIR% 5 | set WIRESHARK_TARGET_PLATFORM=win64 6 | set QT5_BASE_DIR=C:\Qt\5.9.5\msvc2017_64 7 | 8 | set WIRESHARK_VERSION_EXTRA=TRDP 9 | set POWERSHELL=C:\Windows\winsxs\amd64_microsoft-windows-powershell-exe_31bf3856ad364e35_6.1.7600.16385_none_c50af05b1be3aa2b\ 10 | set PATH=%POWERSHELL%;%PATH%;C:\Program Files\CMake\bin 11 | set PLATFORM=win64 12 | set VisualStudioVersion=17.0 13 | 14 | rem Add the Visual Studio Build script 15 | rem set PATH=%PATH%;C:\Program Files (x86)\MSBuild\10.0\Bin 16 | 17 | rem If your Cygwin installation path is not automatically detected by CMake: 18 | set WIRESHARK_CYGWIN_INSTALL_PATH=C:\cygwin 19 | 20 | rem Python with PIP: python module installation tool; 21 | set PATH=%PATH%;C:\Python37;C:\Python37\Scripts;%WIRESHARK_CYGWIN_INSTALL_PATH%\bin 22 | 23 | rem SET Proxy if necessary 24 | rem set http_proxy=http://:8080 25 | rem set https_proxy=http://:8080 26 | 27 | echo ============================================= 28 | echo 29 | echo Run the following command to setup the IDE 30 | rem cmake -DENABLE_CHM_GUIDES=on -G "Visual Studio 10 2010" ..\wireshark 31 | echo cmake -DENABLE_CHM_GUIDES=on -G "Visual Studio 15 2017 Win64" ..\wireshark 32 | -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/spy/src/trdp_spy/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # CMakeLists.txt 2 | # 3 | # Wireshark - Network traffic analyzer 4 | # By Gerald Combs 5 | # Copyright 1998 Gerald Combs 6 | # 7 | # This program is free software; you can redistribute it and/or 8 | # modify it under the terms of the GNU General Public License 9 | # as published by the Free Software Foundation; either version 2 10 | # of the License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with this program; if not, write to the Free Software 19 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 20 | # 21 | cmake_minimum_required(VERSION 2.8.3) 22 | 23 | # Debug print lines (for development) 24 | #add_definitions(-DPRINT_DEBUG) 25 | 26 | # Debug Output activate: 27 | set ( CMAKE_VERBOSE_MAKEFILE true ) 28 | 29 | # Find the QtWidgets library 30 | find_package(Qt5Xml) 31 | 32 | # Add the include directories for the Qt 5 Widgets module to 33 | # the compile lines. 34 | include_directories(${Qt5Widgets_INCLUDE_DIRS}) 35 | 36 | include(WiresharkPlugin) 37 | 38 | # Add compiler flags for building executables (-fPIE) 39 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS}") 40 | 41 | # Plugin name and version info (major minor micro extra) 42 | set_module_info(trdp_spy 1 3 0 1) 43 | 44 | #find_package(Qt5Xml) 45 | 46 | set(DISSECTOR_SRC 47 | packet-trdp_spy.cpp 48 | trdp_env.cpp 49 | trdpConfigHandler.cpp 50 | ) 51 | 52 | set(PLUGIN_FILES 53 | plugin.c 54 | ${DISSECTOR_SRC} 55 | ) 56 | 57 | set(CLEAN_FILES 58 | ${PLUGIN_FILES} 59 | ) 60 | 61 | if (WERROR_COMMON_FLAGS) 62 | set_source_files_properties( 63 | ${CLEAN_FILES} 64 | PROPERTIES 65 | COMPILE_FLAGS ${WERROR_COMMON_FLAGS} 66 | ) 67 | endif() 68 | 69 | include_directories(${CMAKE_CURRENT_SOURCE_DIR}) 70 | 71 | register_dissector_files(plugin.c 72 | plugin 73 | ${DISSECTOR_SRC} 74 | ) 75 | 76 | add_plugin_library(trdp_spy) 77 | 78 | target_link_libraries(trdp_spy epan Qt5::Xml) 79 | 80 | install(TARGETS trdp_spy 81 | LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION} NAMELINK_SKIP 82 | RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION} 83 | ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION} 84 | ) 85 | 86 | file(GLOB DISSECTOR_HEADERS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "*.h") 87 | CHECKAPI( 88 | NAME 89 | trdp_spy 90 | SWITCHES 91 | -g abort -g termoutput -build 92 | SOURCES 93 | ${DISSECTOR_SRC} 94 | ${DISSECTOR_HEADERS} 95 | ) 96 | -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/spy/src/trdp_spy/Makefile.am: -------------------------------------------------------------------------------- 1 | # Makefile.am 2 | # 3 | # Wireshark - Network traffic analyzer 4 | # By Gerald Combs 5 | # Copyright 1998 Gerald Combs 6 | # 7 | # This program is free software; you can redistribute it and/or 8 | # modify it under the terms of the GNU General Public License 9 | # as published by the Free Software Foundation; either version 2 10 | # of the License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with this program; if not, write to the Free Software 19 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 20 | 21 | include $(top_srcdir)/Makefile.am.inc 22 | include ../Makefile.am.inc 23 | 24 | # the name of the plugin 25 | PLUGIN_NAME = trdp_spy 26 | 27 | # Non-generated sources to be scanned for registration routines 28 | NONGENERATED_REGISTER_C_FILES = \ 29 | lookuptype.c \ 30 | packet-trdp_spy.c \ 31 | parsebody.c \ 32 | trdp_env.c 33 | 34 | # Non-generated sources 35 | NONGENERATED_C_FILES = \ 36 | $(NONGENERATED_REGISTER_C_FILES) 37 | 38 | # Headers. 39 | CLEAN_HEADER_FILES = \ 40 | lookuptype.h \ 41 | packet-trdp_spy.h \ 42 | parsebody.h \ 43 | trdp_env.h 44 | 45 | HEADER_FILES = \ 46 | $(CLEAN_HEADER_FILES) 47 | 48 | plugin_LTLIBRARIES = trdp_spy.la 49 | 50 | plugin.c: $(NONGENERATED_REGISTER_C_FILES) $(top_srcdir)/tools/make-dissector-reg \ 51 | $(top_srcdir)/tools/make-dissector-reg.py 52 | @if test -n "$(PYTHON)"; then \ 53 | echo Making plugin.c with python ; \ 54 | $(PYTHON) $(top_srcdir)/tools/make-dissector-reg.py $(srcdir) \ 55 | plugin $(NONGENERATED_REGISTER_C_FILES) ; \ 56 | else \ 57 | echo Making plugin.c with shell script ; \ 58 | $(top_srcdir)/tools/make-dissector-reg $(srcdir) \ 59 | $(plugin_src) plugin $(NONGENERATED_REGISTER_C_FILES) ; \ 60 | fi 61 | 62 | trdp_spy_la_SOURCES = \ 63 | plugin.c \ 64 | moduleinfo.h \ 65 | $(SRC_FILES) \ 66 | $(HEADER_FILES) 67 | 68 | trdp_spy_la_CPPFLAGS = $(AM_CPPFLAGS) $(PLUGIN_CPPFLAGS) 69 | 70 | trdp_spy_la_CFLAGS = $(AM_CFLAGS) $(PLUGIN_CFLAGS) 71 | 72 | trdp_spy_la_LDFLAGS = $(PLUGIN_LDFLAGS) 73 | 74 | CLEANFILES = \ 75 | trdp_spy \ 76 | *~ 77 | 78 | MAINTAINERCLEANFILES = \ 79 | Makefile.in \ 80 | plugin.c 81 | 82 | EXTRA_DIST = \ 83 | plugin.rc.in \ 84 | CMakeLists.txt 85 | -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/spy/src/trdp_spy/README.txt: -------------------------------------------------------------------------------- 1 | 2 | _____ _____ ____ _____ _____ _____ __ __ 3 | |_ _| __ | \| _ | | __| _ | | | 4 | | | | -| | | __| |__ | __|_ _| 5 | |_| |__|__|____/|__| |_____|__| |_| 6 | 7 | 8 | 9 | 10 | D E V E L O P M E N T 11 | ===================== 12 | 13 | plugin.c was generated with the following command: 14 | python ../../tools/make-dissector-reg.py "$(pwd)" plugin *.c -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/spy/src/trdp_spy/TCN-TRDP2- TRDP SPY Reference Manual.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WAGO/pfc-howtos/7830974caec0023016e8096fcbf968283904db24/HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/spy/src/trdp_spy/TCN-TRDP2- TRDP SPY Reference Manual.pdf -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/spy/src/trdp_spy/doc/custom/TCNOpen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WAGO/pfc-howtos/7830974caec0023016e8096fcbf968283904db24/HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/spy/src/trdp_spy/doc/custom/TCNOpen.png -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/spy/src/trdp_spy/doc/custom/blueTitleGraphic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WAGO/pfc-howtos/7830974caec0023016e8096fcbf968283904db24/HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/spy/src/trdp_spy/doc/custom/blueTitleGraphic.png -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/spy/src/trdp_spy/doc/custom/docend.tex: -------------------------------------------------------------------------------- 1 | \printindex 2 | 3 | \label{lastpage} 4 | 5 | \end{document} 6 | -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/spy/src/trdp_spy/doc/custom/docstart.tex: -------------------------------------------------------------------------------- 1 | \documentclass[a4paper]{book} 2 | \usepackage[top=10mm, bottom=50mm, left=18mm, right=10mm]{geometry} 3 | \usepackage{makeidx} 4 | \usepackage{natbib} 5 | \usepackage{graphicx} 6 | \usepackage{multicol} 7 | \usepackage{float} 8 | \usepackage{listings} 9 | \usepackage[usenames,dvipsnames]{color} 10 | \usepackage{ifthen} 11 | \usepackage[table]{xcolor} 12 | \usepackage{textcomp} 13 | \usepackage{alltt} 14 | \usepackage{ifpdf} 15 | \ifpdf 16 | \usepackage[pdftex, 17 | pagebackref=true, 18 | colorlinks=true, 19 | linkcolor=blue, 20 | unicode 21 | ]{hyperref} 22 | \else 23 | \usepackage[ps2pdf, 24 | pagebackref=true, 25 | colorlinks=true, 26 | linkcolor=blue, 27 | unicode 28 | ]{hyperref} 29 | \usepackage{pspicture} 30 | \fi 31 | \usepackage[utf8]{inputenc} 32 | \usepackage{mathptmx} 33 | \usepackage[scaled=.90]{helvet} 34 | \usepackage{courier} 35 | \usepackage{sectsty} 36 | \usepackage[titles]{tocloft} 37 | \usepackage{doxygen} 38 | \usepackage{moresize} 39 | \lstset{language=C,inputencoding=utf8,basicstyle=\footnotesize,breaklines=true,breakatwhitespace=true,tabsize=4,numbers=left } 40 | \makeindex 41 | \setcounter{tocdepth}{3} 42 | \renewcommand{\footrulewidth}{0.4pt} 43 | \renewcommand{\familydefault}{\sfdefault} 44 | \hfuzz=15pt 45 | \setlength{\emergencystretch}{15pt} 46 | \hbadness=750 47 | \tolerance=750 48 | 49 | 50 | \newcommand{\documentTitle}{TRDP SPY - Reference Manual} 51 | 52 | \graphicspath{{../custom/}} 53 | \fancyhead[LE,RO]{{\bfseries Page \thepage / \pageref*{lastpage}} \\ \documentTitle \\ \leftmark} 54 | \fancyhead[CE,CO]{} 55 | \fancyhead[RE,LO]{\fancyplain{}{\includegraphics[width=5cm]{TCNOpen}}} 56 | 57 | \fancypagestyle{plain} 58 | { 59 | \fancyhead[LE,RO]{{\bfseries Page \thepage / \pageref*{lastpage}} \\ \documentTitle \\ \leftmark} 60 | \fancyhead[CE,CO]{} 61 | \fancyhead[RE,LO]{\fancyplain{}{\includegraphics[width=5cm]{TCNOpen}}} 62 | } 63 | 64 | \addtolength{\headheight}{20mm} 65 | 66 | \begin{document} 67 | \hypersetup{pageanchor=false,citecolor=blue} 68 | 69 | \begin{titlepage} 70 | \pagestyle{empty} 71 | 72 | \hspace{-1cm} 73 | \begin{minipage}[c]{0.40\linewidth} 74 | \includegraphics[width=7cm]{TCNOpen} 75 | \end{minipage} 76 | \hspace{3.0cm} 77 | \begin{minipage}[c]{0.70\linewidth} 78 | {\huge Open Source Development} 79 | \end{minipage} 80 | 81 | \vspace{2.5cm} 82 | 83 | \begin{minipage}[c]{2cm} 84 | \includegraphics[width=1.5cm]{blueTitleGraphic} 85 | \end{minipage} 86 | \hspace{0.0cm} 87 | \begin{minipage}[c]{0.90\linewidth} 88 | \textcolor{Blue}{\fontsize{80}{80} \selectfont \emph{TRDP}} 89 | 90 | \vspace*{1.0cm} 91 | 92 | {\fontsize{24}{24} \selectfont \emph{Train Real Time Data Protocol}} 93 | 94 | \end{minipage} 95 | 96 | \vspace*{1.0cm} 97 | 98 | \begin{center} 99 | {\fontsize{38}{38} \selectfont \documentTitle}\\ 100 | \vspace*{1cm} 101 | \end{center} 102 | 103 | 104 | \end{titlepage} 105 | 106 | \pagestyle{fancy} 107 | 108 | \clearemptydoublepage 109 | \pagenumbering{roman} 110 | \tableofcontents 111 | \clearemptydoublepage 112 | \pagenumbering{arabic} 113 | \hypersetup{pageanchor=true,citecolor=blue} 114 | -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/spy/src/trdp_spy/doc/custom/interfaceDiagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WAGO/pfc-howtos/7830974caec0023016e8096fcbf968283904db24/HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/spy/src/trdp_spy/doc/custom/interfaceDiagram.png -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/spy/src/trdp_spy/doc/custom/seqDiagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WAGO/pfc-howtos/7830974caec0023016e8096fcbf968283904db24/HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/spy/src/trdp_spy/doc/custom/seqDiagram.png -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/spy/src/trdp_spy/moduleinfo.h: -------------------------------------------------------------------------------- 1 | /* Included *after* config.h, in order to re-define these macros */ 2 | 3 | #ifdef PACKAGE 4 | #undef PACKAGE 5 | #endif 6 | 7 | /* Name of package */ 8 | #define PACKAGE "trdp_spy" 9 | 10 | 11 | #ifdef VERSION 12 | #undef VERSION 13 | #endif 14 | 15 | /* Version number of package */ 16 | #define VERSION "1.3.0" 17 | 18 | 19 | -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/spy/src/trdp_spy/plugin.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Do not modify this file. 3 | * 4 | * It is created automatically by Makefile or Makefile.nmake. 5 | */ 6 | 7 | #ifdef HAVE_CONFIG_H 8 | # include "config.h" 9 | #endif 10 | 11 | #include 12 | 13 | #include "moduleinfo.h" 14 | 15 | #ifndef ENABLE_STATIC 16 | G_MODULE_EXPORT const gchar version[] = VERSION; 17 | 18 | /* Start the functions we need for the plugin stuff */ 19 | 20 | G_MODULE_EXPORT void 21 | plugin_register (void) 22 | { 23 | {extern void proto_register_trdp (void); proto_register_trdp ();} 24 | } 25 | 26 | G_MODULE_EXPORT void 27 | plugin_reg_handoff(void) 28 | { 29 | {extern void proto_reg_handoff_trdp (void); proto_reg_handoff_trdp ();} 30 | } 31 | #endif 32 | -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/spy/src/trdp_spy/plugin.rc.in: -------------------------------------------------------------------------------- 1 | #include "winver.h" 2 | 3 | VS_VERSION_INFO VERSIONINFO 4 | FILEVERSION @RC_MODULE_VERSION@ 5 | PRODUCTVERSION @RC_VERSION@ 6 | FILEFLAGSMASK 0x0L 7 | #ifdef _DEBUG 8 | FILEFLAGS VS_FF_DEBUG 9 | #else 10 | FILEFLAGS 0 11 | #endif 12 | FILEOS VOS_NT_WINDOWS32 13 | FILETYPE VFT_DLL 14 | BEGIN 15 | BLOCK "StringFileInfo" 16 | BEGIN 17 | BLOCK "040904b0" 18 | BEGIN 19 | VALUE "CompanyName", "The Wireshark developer community, http://www.wireshark.org/\0" 20 | VALUE "FileDescription", "@PACKAGE@ dissector\0" 21 | VALUE "FileVersion", "@MODULE_VERSION@\0" 22 | VALUE "InternalName", "@PACKAGE@ @MODULE_VERSION@\0" 23 | VALUE "LegalCopyright", "Copyright © 1998 Gerald Combs , Gilbert Ramirez and others\0" 24 | VALUE "OriginalFilename", "@PLUGIN_NAME@.dll\0" 25 | VALUE "ProductName", "Wireshark\0" 26 | VALUE "ProductVersion", "@VERSION@\0" 27 | VALUE "Comments", "Built with @MSVC_VARIANT@\0" 28 | END 29 | END 30 | BLOCK "VarFileInfo" 31 | BEGIN 32 | VALUE "Translation", 0x409, 1200 33 | END 34 | END 35 | -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/spy/win64/Qt5Xmld.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WAGO/pfc-howtos/7830974caec0023016e8096fcbf968283904db24/HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/spy/win64/Qt5Xmld.dll -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/spy/win64/readme.txt: -------------------------------------------------------------------------------- 1 | TRDP SPY 2 | ---------------------------------- 3 | Requirements: 4 | Wireshark version 2.4.11 5 | 6 | Features: 7 | 1. TRDP header parser 8 | 2. TRDP XML parser 9 | 10 | Installation: 11 | Copy Qt5Xmld.dll and Qt5Xmld.pdb into our wireshark directory 12 | Copy trdp_spy.dll into wireshark/plugins directory -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/spy/win64/trdp_spy.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WAGO/pfc-howtos/7830974caec0023016e8096fcbf968283904db24/HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/spy/win64/trdp_spy.dll -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/src/common/trdp_dllmain.c: -------------------------------------------------------------------------------- 1 | /**********************************************************************************************************************/ 2 | /** 3 | * @file trdp_dllmain.c 4 | * 5 | * @brief Windows DLL main function 6 | * 7 | * @details 8 | * 9 | * @note Project: TCNOpen TRDP prototype stack 10 | * 11 | * @author Armin-H. Weiss, Bombardier 12 | * 13 | * @remarks This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. 14 | * If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 15 | * Copyright Bombardier Transportation Inc. or its subsidiaries and others, 2013. All rights reserved. 16 | * 17 | * $Id: trdp_dllmain.c 1763 2018-09-21 16:03:13Z ahweiss $ 18 | * 19 | */ 20 | 21 | /*********************************************************************************************************************** 22 | * INCLUDES 23 | */ 24 | #if (defined (WIN32) || defined (WIN64)) 25 | #ifdef DLL_EXPORT 26 | 27 | #define WIN32_LEAN_AND_MEAN 28 | 29 | #include 30 | 31 | 32 | /*********************************************************************************************************************** 33 | * GLOBAL FUNCTIONS 34 | */ 35 | 36 | BOOL APIENTRY DllMain( HMODULE hModule, 37 | DWORD ul_reason_for_call, 38 | LPVOID lpReserved 39 | ) 40 | { 41 | switch (ul_reason_for_call) 42 | { 43 | case DLL_PROCESS_ATTACH: 44 | case DLL_THREAD_ATTACH: 45 | case DLL_THREAD_DETACH: 46 | case DLL_PROCESS_DETACH: 47 | break; 48 | } 49 | return TRUE; 50 | } 51 | 52 | #endif 53 | #endif 54 | 55 | -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/src/common/trdp_if.h: -------------------------------------------------------------------------------- 1 | /**********************************************************************************************************************/ 2 | /** 3 | * @file trdp_if.h 4 | * 5 | * @brief Typedefs for TRDP communication 6 | * 7 | * @details 8 | * 9 | * @note Project: TCNOpen TRDP prototype stack 10 | * 11 | * @author Bernd Loehr, NewTec GmbH 12 | * 13 | * @remarks This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. 14 | * If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 15 | * Copyright Bombardier Transportation Inc. or its subsidiaries and others, 2013. All rights reserved. 16 | * 17 | * $Id: trdp_if.h 1264 2014-07-14 15:54:26Z bloehr $ 18 | * 19 | * BL 2014-07-14: Ticket #46: Protocol change: operational topocount needed 20 | */ 21 | 22 | #ifndef TRDP_IF_H 23 | #define TRDP_IF_H 24 | 25 | /*********************************************************************************************************************** 26 | * INCLUDES 27 | */ 28 | 29 | #include "trdp_if_light.h" 30 | 31 | #ifdef __cplusplus 32 | extern "C" { 33 | #endif 34 | 35 | /*********************************************************************************************************************** 36 | * DEFINES 37 | */ 38 | 39 | 40 | /*********************************************************************************************************************** 41 | * TYPEDEFS 42 | */ 43 | 44 | /*********************************************************************************************************************** 45 | * PROTOTYPES 46 | */ 47 | 48 | /**********************************************************************************************************************/ 49 | /** Check if the session handle is valid 50 | * 51 | * 52 | * @param[in] pSessionHandle pointer to packet data (dataset) 53 | * @retval TRUE is valid 54 | * @retval FALSE is invalid 55 | */ 56 | BOOL8 trdp_isValidSession (TRDP_APP_SESSION_T pSessionHandle); 57 | 58 | /**********************************************************************************************************************/ 59 | /** Get the session queue head pointer 60 | * 61 | * @retval &sSession 62 | */ 63 | TRDP_APP_SESSION_T *trdp_sessionQueue (void); 64 | 65 | #ifdef __cplusplus 66 | } 67 | #endif 68 | 69 | #endif /* TRDP_IF_LIGHT_H */ 70 | -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/src/common/trdp_pdcom.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************/ 2 | /** 3 | * @file trdp_pdcom.h 4 | * 5 | * @brief Functions for PD communication 6 | * 7 | * @details 8 | * 9 | * @note Project: TCNOpen TRDP prototype stack 10 | * 11 | * @author Bernd Loehr, NewTec GmbH 12 | * 13 | * @remarks This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. 14 | * If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 15 | * Copyright Bombardier Transportation Inc. or its subsidiaries and others, 2013. All rights reserved. 16 | * 17 | * $Id: trdp_pdcom.h 1740 2018-06-20 16:03:12Z bloehr $ 18 | * 19 | * BL 2018-06-20: Ticket #184: Building with VS 2015: WIN64 and Windows threads (SOCKET instead of INT32) 20 | * BL 2014-07-14: Ticket #46: Protocol change: operational topocount needed 21 | * Ticket #47: Protocol change: no FCS for data part of telegrams 22 | */ 23 | 24 | 25 | #ifndef TRDP_PDCOM_H 26 | #define TRDP_PDCOM_H 27 | 28 | /******************************************************************************* 29 | * INCLUDES 30 | */ 31 | 32 | #include "trdp_private.h" 33 | 34 | /******************************************************************************* 35 | * DEFINES 36 | */ 37 | 38 | 39 | /******************************************************************************* 40 | * TYPEDEFS 41 | */ 42 | 43 | /******************************************************************************* 44 | * GLOBAL FUNCTIONS 45 | */ 46 | 47 | void trdp_pdInit( 48 | PD_ELE_T *, 49 | TRDP_MSG_T, 50 | UINT32 topoCount, 51 | UINT32 optopoCount, 52 | UINT32 replyComId, 53 | UINT32 replyIpAddress); 54 | 55 | void trdp_pdUpdate ( 56 | PD_ELE_T *); 57 | 58 | TRDP_ERR_T trdp_pdPut ( 59 | PD_ELE_T *, 60 | TRDP_MARSHALL_T func, 61 | void *refCon, 62 | const UINT8 *pData, 63 | UINT32 dataSize); 64 | 65 | TRDP_ERR_T trdp_pdCheck ( 66 | PD_HEADER_T *pPacket, 67 | UINT32 packetSize); 68 | 69 | TRDP_ERR_T trdp_pdSend ( 70 | SOCKET pdSock, 71 | PD_ELE_T *pPacket, 72 | UINT16 port); 73 | 74 | TRDP_ERR_T trdp_pdGet ( 75 | PD_ELE_T *pPacket, 76 | TRDP_UNMARSHALL_T unmarshall, 77 | void *refCon, 78 | const UINT8 *pData, 79 | UINT32 *pDataSize); 80 | 81 | TRDP_ERR_T trdp_pdSendQueued ( 82 | TRDP_SESSION_PT appHandle); 83 | 84 | TRDP_ERR_T trdp_pdReceive ( 85 | TRDP_SESSION_PT pSessionHandle, 86 | SOCKET sock); 87 | 88 | void trdp_pdCheckPending ( 89 | TRDP_APP_SESSION_T appHandle, 90 | TRDP_FDS_T *pFileDesc, 91 | INT32 *pNoDesc); 92 | 93 | void trdp_pdHandleTimeOuts ( 94 | TRDP_SESSION_PT appHandle); 95 | 96 | TRDP_ERR_T trdp_pdCheckListenSocks ( 97 | TRDP_SESSION_PT appHandle, 98 | TRDP_FDS_T *pRfds, 99 | INT32 *pCount); 100 | 101 | TRDP_ERR_T trdp_pdDistribute ( 102 | PD_ELE_T *pSndQueue); 103 | 104 | #endif 105 | -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/src/common/trdp_stats.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************/ 2 | /** 3 | * @file trdp_stats.h 4 | * 5 | * @brief Statistics for TRDP communication 6 | * 7 | * @details 8 | * 9 | * @note Project: TCNOpen TRDP prototype stack 10 | * 11 | * @author Bernd Loehr, NewTec GmbH 12 | * 13 | * @remarks This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. 14 | * If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 15 | * Copyright Bombardier Transportation Inc. or its subsidiaries and others, 2013. All rights reserved. 16 | * 17 | * $Id: trdp_stats.h 1065 2013-09-06 08:12:09Z aweiss $ 18 | * 19 | */ 20 | 21 | 22 | #ifndef TRDP_STATS_H 23 | #define TRDP_STATS_H 24 | 25 | /******************************************************************************* 26 | * INCLUDES 27 | */ 28 | 29 | #include "trdp_if_light.h" 30 | #include "trdp_private.h" 31 | #include "vos_utils.h" 32 | 33 | /******************************************************************************* 34 | * DEFINES 35 | */ 36 | 37 | 38 | /******************************************************************************* 39 | * TYPEDEFS 40 | */ 41 | 42 | 43 | /******************************************************************************* 44 | * GLOBAL FUNCTIONS 45 | */ 46 | 47 | void trdp_initStats(TRDP_APP_SESSION_T appHandle); 48 | void trdp_pdPrepareStats (TRDP_APP_SESSION_T appHandle, PD_ELE_T *pPacket); 49 | 50 | 51 | #endif 52 | -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/src/vos/esp/vos_private.h: -------------------------------------------------------------------------------- 1 | /**********************************************************************************************************************/ 2 | /** 3 | * @file esp/vos_private.h 4 | * 5 | * @brief Private definitions for the OS abstraction layer 6 | * 7 | * @details 8 | * 9 | * @note Project: TCNOpen TRDP prototype stack 10 | * 11 | * @author Bernd Loehr 12 | * 13 | * @remarks This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. 14 | * If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 15 | * Copyright 2018. All rights reserved. 16 | * 17 | * $Id: vos_private.h 1740 2018-06-20 16:03:12Z bloehr $ 18 | * 19 | * BL 2018-06-20: Ticket #184: Building with VS 2015: WIN64 and Windows threads (SOCKET instead of INT32) 20 | * 21 | */ 22 | 23 | #ifndef VOS_PRIVATE_H 24 | #define VOS_PRIVATE_H 25 | 26 | /*********************************************************************************************************************** 27 | * INCLUDES 28 | */ 29 | 30 | #include 31 | #include 32 | #include 33 | #include "vos_types.h" 34 | #include "vos_thread.h" 35 | 36 | #ifdef __cplusplus 37 | extern "C" { 38 | #endif 39 | 40 | /*********************************************************************************************************************** 41 | * DEFINES 42 | */ 43 | 44 | /* The VOS version can be predefined as CFLAG */ 45 | #ifndef VOS_VERSION 46 | #define VOS_VERSION 0u 47 | #define VOS_RELEASE 1u 48 | #define VOS_UPDATE 0u 49 | #define VOS_EVOLUTION 0u 50 | #endif 51 | 52 | struct VOS_MUTEX 53 | { 54 | UINT32 magicNo; 55 | pthread_mutex_t mutexId; 56 | }; 57 | 58 | struct VOS_SEMA 59 | { 60 | SemaphoreHandle_t semHandle; 61 | }; 62 | 63 | 64 | #define STRING_ERR(pStrBuf) (void)strerror_r(errno, pStrBuf, VOS_MAX_ERR_STR_SIZE); 65 | 66 | #ifdef __cplusplus 67 | } 68 | #endif 69 | 70 | #endif /* VOS_UTILS_H */ 71 | -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/src/vos/posix/vos_private.h: -------------------------------------------------------------------------------- 1 | /**********************************************************************************************************************/ 2 | /** 3 | * @file posix/vos_private.h 4 | * 5 | * @brief Private definitions for the OS abstraction layer 6 | * 7 | * @details 8 | * 9 | * @note Project: TCNOpen TRDP prototype stack 10 | * 11 | * @author Bernd Loehr, NewTec GmbH 12 | * 13 | * @remarks This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. 14 | * If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 15 | * Copyright Bombardier Transportation Inc. or its subsidiaries and others, 2013. All rights reserved. 16 | * 17 | * $Id: vos_private.h 1651 2017-07-12 07:54:17Z bloehr $ 18 | * 19 | */ 20 | 21 | #ifndef VOS_PRIVATE_H 22 | #define VOS_PRIVATE_H 23 | 24 | /*********************************************************************************************************************** 25 | * INCLUDES 26 | */ 27 | 28 | #include 29 | #include 30 | 31 | #include "vos_types.h" 32 | #include "vos_thread.h" 33 | 34 | #ifdef __cplusplus 35 | extern "C" { 36 | #endif 37 | 38 | /*********************************************************************************************************************** 39 | * DEFINES 40 | */ 41 | 42 | /* The VOS version can be predefined as CFLAG */ 43 | #ifndef VOS_VERSION 44 | #define VOS_VERSION 1u 45 | #define VOS_RELEASE 0u 46 | #define VOS_UPDATE 3u 47 | #define VOS_EVOLUTION 0u 48 | #endif 49 | 50 | struct VOS_MUTEX 51 | { 52 | UINT32 magicNo; 53 | pthread_mutex_t mutexId; 54 | }; 55 | 56 | struct VOS_SHRD 57 | { 58 | INT32 fd; /* File descriptor */ 59 | CHAR8 *sharedMemoryName; /* shared memory Name */ 60 | }; 61 | 62 | VOS_ERR_T vos_mutexLocalCreate (struct VOS_MUTEX *pMutex); 63 | void vos_mutexLocalDelete (struct VOS_MUTEX *pMutex); 64 | 65 | #if (((_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600) && !_GNU_SOURCE) || __APPLE__) 66 | # define STRING_ERR(pStrBuf) (void)strerror_r(errno, pStrBuf, VOS_MAX_ERR_STR_SIZE); 67 | #elif INTEGRITY 68 | # define STRING_ERR(pStrBuf) \ 69 | { \ 70 | char *pStr = strerror(errno); \ 71 | if (pStr != NULL) \ 72 | { \ 73 | strncpy(pStrBuf, pStr, VOS_MAX_ERR_STR_SIZE); \ 74 | } \ 75 | } 76 | #else 77 | # define STRING_ERR(pStrBuf) \ 78 | { \ 79 | char *pStr = strerror_r(errno, pStrBuf, VOS_MAX_ERR_STR_SIZE); \ 80 | if (pStr != NULL) \ 81 | { \ 82 | strncpy(pStrBuf, pStr, VOS_MAX_ERR_STR_SIZE); \ 83 | } \ 84 | } 85 | #endif 86 | 87 | #ifdef __cplusplus 88 | } 89 | #endif 90 | 91 | #endif /* VOS_UTILS_H */ 92 | -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/src/vos/vxworks/vos_private.h: -------------------------------------------------------------------------------- 1 | /**********************************************************************************************************************/ 2 | /** 3 | * @file vxworks/vos_private.h 4 | * 5 | * @brief Private definitions for the OS abstraction layer 6 | * 7 | * @details 8 | * 9 | * @note Project: TCNOpen TRDP prototype stack 10 | * 11 | * @author Christoph Schneider, Bombardier Transportation GmbH 12 | * 13 | * @remarks This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. 14 | * If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 15 | * Copyright Bombardier Transportation Inc. or its subsidiaries and others, 2013. All rights reserved. 16 | * 17 | * $Id: vos_private.h 1771 2018-10-29 12:35:42Z bloehr $ 18 | * 19 | */ 20 | 21 | #ifndef VOS_PRIVATE_H 22 | #define VOS_PRIVATE_H 23 | 24 | /*********************************************************************************************************************** 25 | * INCLUDES 26 | */ 27 | 28 | #include 29 | #include "string.h" 30 | 31 | #include "vos_types.h" 32 | #include "vos_thread.h" 33 | 34 | #ifdef __cplusplus 35 | extern "C" { 36 | #endif 37 | 38 | /*********************************************************************************************************************** 39 | * DEFINES 40 | */ 41 | 42 | /* The VOS version can be predefined as CFLAG */ 43 | #ifndef VOS_VERSION 44 | #define VOS_VERSION 1u 45 | #define VOS_RELEASE 0u 46 | #define VOS_UPDATE 3u 47 | #define VOS_EVOLUTION 0u 48 | #endif 49 | 50 | struct VOS_MUTEX 51 | { 52 | UINT32 magicNo; 53 | SEM_ID mutexId; 54 | }; 55 | 56 | struct VOS_SEMA 57 | { 58 | SEM_ID semaphore; 59 | }; 60 | 61 | struct VOS_SHRD 62 | { 63 | INT32 fd; /* File Descriptor */ 64 | CHAR8 *sharedMemoryName; /* shared Memory Name */ 65 | }; 66 | 67 | VOS_ERR_T vos_mutexLocalCreate (struct VOS_MUTEX *pMutex); 68 | void vos_mutexLocalDelete (struct VOS_MUTEX *pMutex); 69 | 70 | #if (((_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600) && !_GNU_SOURCE) || __APPLE__) 71 | # define STRING_ERR(pStrBuf) (void)strerror_r(errno, pStrBuf, VOS_MAX_ERR_STR_SIZE); 72 | #else 73 | # define STRING_ERR(pStrBuf) \ 74 | { \ 75 | strncpy(buff, strerror(errno), VOS_MAX_ERR_STR_SIZE - 1); \ 76 | buff[VOS_MAX_ERR_STR_SIZE - 1] = '\0'; \ 77 | } 78 | #endif 79 | 80 | #ifdef __cplusplus 81 | } 82 | #endif 83 | 84 | #endif /* VOS_UTILS_H */ 85 | -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/src/vos/windows/vos_private.h: -------------------------------------------------------------------------------- 1 | /**********************************************************************************************************************/ 2 | /** 3 | * @file windows/vos_private.h 4 | * 5 | * @brief Private definitions for the OS abstraction layer 6 | * 7 | * @details 8 | * 9 | * @note Project: TCNOpen TRDP prototype stack 10 | * 11 | * @author Bernd Loehr, NewTec GmbH 12 | * 13 | * @remarks This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. 14 | * If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 15 | * Copyright Bombardier Transportation Inc. or its subsidiaries and others, 2013. All rights reserved. 16 | * 17 | * $Id: vos_private.h 1763 2018-09-21 16:03:13Z ahweiss $ 18 | * 19 | * BL 2018-06-20: Ticket #184: Building with VS 2015: WIN64 and Windows threads (SOCKET instead of INT32) 20 | */ 21 | 22 | #ifndef VOS_PRIVATE_H 23 | #define VOS_PRIVATE_H 24 | 25 | /*********************************************************************************************************************** 26 | * INCLUDES 27 | */ 28 | 29 | #if (defined (WIN32) || defined (WIN64)) 30 | #include 31 | #else 32 | #include 33 | #endif 34 | 35 | #include "vos_types.h" 36 | #include "vos_thread.h" 37 | 38 | #ifdef __cplusplus 39 | extern "C" { 40 | #endif 41 | 42 | /*********************************************************************************************************************** 43 | * DEFINES 44 | */ 45 | 46 | #define VOS_VERSION 1u 47 | #define VOS_RELEASE 1u 48 | #define VOS_UPDATE 0u 49 | #define VOS_EVOLUTION 0u 50 | 51 | #if (defined (WIN32) || defined (WIN64)) 52 | 53 | #define MAX_SEM_COUNT 10 54 | 55 | struct VOS_MUTEX 56 | { 57 | UINT32 magicNo; 58 | HANDLE mutexId; 59 | }; 60 | 61 | struct VOS_SEMA 62 | { 63 | HANDLE semaphore; 64 | }; 65 | 66 | #else 67 | 68 | struct VOS_MUTEX 69 | { 70 | UINT32 magicNo; 71 | pthread_mutex_t mutexId; 72 | }; 73 | 74 | struct VOS_SEMA 75 | { 76 | struct sem_t_ *semaphore; 77 | }; 78 | #endif 79 | 80 | struct VOS_SHRD 81 | { 82 | HANDLE fd; /* File descriptor */ 83 | CHAR8 *sharedMemoryName; /* shared memory Name */ 84 | }; 85 | 86 | VOS_ERR_T vos_mutexLocalCreate (struct VOS_MUTEX *pMutex); 87 | void vos_mutexLocalDelete (struct VOS_MUTEX *pMutex); 88 | 89 | #ifdef __cplusplus 90 | } 91 | #endif 92 | 93 | #endif /* VOS_UTILS_H */ 94 | -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/test/diverse/crc-test.c: -------------------------------------------------------------------------------- 1 | /**********************************************************************************************************************/ 2 | /** 3 | * @file crc-test.c 4 | * 5 | * @brief Test application for crc 6 | * 7 | * @note Project: TCNOpen TRDP prototype stack 8 | * 9 | * @author Bernd Loehr, NewTec GmbH 10 | * 11 | * @remarks This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. 12 | * If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 13 | * Copyright Bombardier Transportation Inc. or its subsidiaries and others, 2013. All rights reserved. 14 | * 15 | * $Id: crc-test.c 1732 2018-05-14 08:05:07Z bloehr $ 16 | * 17 | * BL 2017-06-30: Compiler warnings, local prototypes added 18 | */ 19 | 20 | #include 21 | #include 22 | #include 23 | 24 | #include "vos_utils.h" 25 | 26 | UINT8 gSampleDATA[] = 27 | { 28 | 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, /* Testdata */ 29 | 0x0, 0x0, 0x0, 0x0 /* CRC */ 30 | }; 31 | 32 | int main () 33 | { 34 | /* Compute CRC and store in little endian * / */ 35 | UINT32 myCrc; 36 | 37 | myCrc = vos_crc32(0, gSampleDATA, 8); 38 | gSampleDATA[8] = (UINT8) myCrc; 39 | gSampleDATA[9] = (UINT8) myCrc >> 8; 40 | gSampleDATA[10] = (UINT8) myCrc >> 16; 41 | gSampleDATA[11] = (UINT8) myCrc >> 24; 42 | 43 | printf("CRC: %08x\n", myCrc); 44 | printf("LE in memory (from low to high): %02hhx %02hhx %02hhx %02hhx\n", 45 | gSampleDATA[8], 46 | gSampleDATA[9], 47 | gSampleDATA[10], 48 | gSampleDATA[11]); 49 | 50 | /* CRC Check on Null */ 51 | 52 | /* Verify CRC * / */ 53 | myCrc = vos_crc32(0, gSampleDATA, 12); 54 | printf("Checked CRC over all: %08x\n", myCrc); 55 | 56 | if (myCrc == 0) 57 | { 58 | printf(" = Correct behavior!\n"); 59 | } 60 | else 61 | { 62 | printf(" = Wrong!!\n"); 63 | } 64 | 65 | /* Compute CRC and store as big endian */ 66 | myCrc = vos_crc32(0, gSampleDATA, 8); 67 | gSampleDATA[8] = (UINT8) myCrc >> 24; 68 | gSampleDATA[9] = (UINT8) myCrc >> 16; 69 | gSampleDATA[10] = (UINT8) myCrc >> 8; 70 | gSampleDATA[11] = (UINT8) myCrc; 71 | 72 | printf("CRC: %08x\n", myCrc); 73 | printf("BE in memory (from low to high): %02hhx %02hhx %02hhx %02hhx\n", 74 | gSampleDATA[8], 75 | gSampleDATA[9], 76 | gSampleDATA[10], 77 | gSampleDATA[11]); 78 | 79 | /* CRC Check on Null */ 80 | 81 | /* Verify CRC * / */ 82 | myCrc = vos_crc32(0, gSampleDATA, 12); 83 | printf("Checked CRC over all: %08x\n", myCrc); 84 | 85 | if (myCrc == 0) 86 | { 87 | printf(" = Correct behavior!\n"); 88 | } 89 | else 90 | { 91 | printf(" = Wrong!!\n"); 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/test/diverse/hosts_example: -------------------------------------------------------------------------------- 1 | ############################# 2 | # Hosts example file 3 | # 4 | # 5 | ############################# 6 | 7 | 10.64.8.3 berndsmac 8 | 10.64.10.24 raspi24 9 | 10.64.10.22 itsbox 10 | 10.64.0.2 helena.newtec.zz 11 | 12 | 13 | -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/test/laddermdtest/mdErrMode1: -------------------------------------------------------------------------------- 1 | MDerr01 2 | -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/test/laddermdtest/mdErrMode2: -------------------------------------------------------------------------------- 1 | MDerr02 2 | -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/test/laddermdtest/mdErrMode3: -------------------------------------------------------------------------------- 1 | MDerr03 2 | -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/test/laddermdtest/mdErrMode4: -------------------------------------------------------------------------------- 1 | MDerr04 2 | -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/test/laddermdtest/mdLiteral1: -------------------------------------------------------------------------------- 1 | 1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/test/laddermdtest/mdLiteral6: -------------------------------------------------------------------------------- 1 | 66666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666 -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/test/laddermdtest/mdTest.txt: -------------------------------------------------------------------------------- 1 | ./mdTestLadder -b 0 -c 0 -d 1 -e 1 -E 200001 -g 10.0.1.17 -i 0 -j 0 -k 0 -l 0 -m 1000000 -n 1 -r 5000000 -t 1 -L 1 2 | ./mdTestLadder -b 0 -c 0 -d 0 -e 1 -E 200002 -g 10.0.1.17 -i 0 -j 0 -k 0 -l 0 -m 1000000 -n 1 -r 5000000 -t 1 -L 1 3 | ./mdTestLadder -b 0 -c 0 -d 0 -e 1 -E 200003 -g 239.255.1.1 -i 0 -j 0 -k 0 -l 0 -m 1000000 -n 1 -r 5000000 -t 1 -L 1 4 | -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/test/ladderpdtest/pdTest.txt: -------------------------------------------------------------------------------- 1 | ./ladderApplication_multiPD -1 0x1100 -p 10000 -i 1 -c 10001 -f 239.255.1.1 -o 1000000 -d 10000 -T 1 -L 1 -k 0 2 | ./ladderApplication_multiPD -1 0x1180 -p 10000 -i 1 -c 10002 -f 239.255.1.1 -o 1000000 -d 10000 -T 1 -L 1 -k 0 3 | -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/test/lint/Lint_posix.bat: -------------------------------------------------------------------------------- 1 | echo off 2 | type _LINT_POS.TMP 3 | "C:\Program Files (x86)\Lint\lint-nt.exe" +v -i"C:\Program Files (x86)\Lint\lnt" std_posix.lnt -DPOSIX;MD_SUPPORT=1;B_ENDIAN;__LITTLE_ENDIAN__=0;__BIG_ENDIAN__=1 -os(_LINT_POS.TMP) vos_mem.c vos_utils.c posix/vos_thread.c posix/vos_sock.c posix/vos_shared_mem.c trdp_if.c trdp_mdcom.c trdp_pdcom.c trdp_utils.c trdp_stats.c tau_marshall.c tau_ctrl.c tau_dnr.c tau_tti.c 4 | REM type _LINT_POS.TMP | more 5 | @echo off 6 | echo --- 7 | echo output placed in _LINT_POS.TMP 8 | echo --- 9 | -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/test/lint/Lint_win.bat: -------------------------------------------------------------------------------- 1 | "c:\Program Files (x86)\Lint\Lint-nt" +v -i"c:\Program Files (x86)\Lint\lnt" std_win.lnt -DWIN32;MD_SUPPORT=1;L_ENDIAN;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS -os(_LINT_WIN.TMP) vos_utils.c vos_mem.c vos_thread.c vos_sock.c vos_shared_mem.c trdp_if.c trdp_mdcom.c trdp_pdcom.c trdp_utils.c trdp_stats.c tau_marshall.c trdp_xml.c tau_xml.c tau_ctrl.c tau_dnr.c tau_tti.c 2 | type _LINT_WIN.TMP | more 3 | @echo off 4 | echo --- 5 | echo output placed in _LINT_WIN.TMP 6 | echo --- 7 | -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/test/lint/std_posix.lnt: -------------------------------------------------------------------------------- 1 | // Gnu C/C++, -si4 -sp4, lib-stl.lnt 2 | // Standard lint options 3 | 4 | co-gnu3.lnt 5 | lib-stl.lnt 6 | au-misra.lnt 7 | -si4 -sp4 8 | 9 | -i"..\..\src\api" 10 | -i"..\..\src\common" 11 | -i"..\..\src\vos\posix" 12 | -i"..\..\src\vos\api" 13 | -i"..\..\src\vos\common" 14 | -i"..\..\src\vos" 15 | -i"posix\usr\lib\gcc\i486-linux-gnu\4.2.4\include" 16 | -i"posix\usr\include" 17 | 18 | -D__ARMEB__=0 19 | -D__MIPSEB__=0 20 | -D__AARCH64EB__=0 21 | 22 | -D__GNUC__=1 23 | -D_GNU_SOURCE=1 24 | -DNO_DEBUG=1 25 | -D__linux=1 26 | -D__USE_GNU=1 27 | 28 | -w2 29 | +macros 30 | +ppw(warning) 31 | -cpp 32 | 33 | +libdir(posix\usr\lib\gcc\i486-linux-gnu\4.2.4\include) 34 | +libdir(posix\usr\include) 35 | 36 | -elib(*) 37 | -e537 // "Repeated include file 'FileName'" 38 | -e755 // "global macro 'Symbol' (Location) not referenced" 39 | -e40 // undefined 'errno' 40 | -emacro((530,526,628,516,78,26,10,155,1055),ALIGNOF) // due to definition of internal used __alignof 41 | -e655 // bit-wise operation uses (compatible) enum's 42 | -e641 // Converting enum to int 43 | -e586 // Deprecated snprintf 44 | -e451 // Repeated includes 45 | -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/test/lint/std_win.lnt: -------------------------------------------------------------------------------- 1 | // Gnu C/C++, -si4 -sp4, lib-stl.lnt 2 | // Standard lint options 3 | 4 | co-msc80.lnt 5 | lib-w32.lnt lib-wnt.lnt 6 | //lib-stl.lnt 7 | au-misra.lnt 8 | -si4 -sp4 9 | 10 | -i"..\..\src\api" 11 | -i"..\..\src\common" 12 | -i"..\..\src\vos\api" 13 | -i"..\..\src\vos\common" 14 | -i"..\..\src\vos\windows" 15 | 16 | -i"C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt" 17 | -i"C:\Program Files (x86)\Windows Kits\8.1\Include\um" 18 | -i"C:\Program Files (x86)\Windows Kits\8.1\Include\shared" 19 | -i"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include" 20 | 21 | -D__ARMEB__=0 22 | -D__MIPSEB__=0 23 | -D__AARCH64EB__=0 24 | 25 | -w2 26 | -passes(2) 27 | +macros 28 | +ppw(warning) 29 | 30 | +libdir(C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include) 31 | +libdir(C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Include) 32 | -elib(*) 33 | -e537 // "Repeated include file 'FileName'" 34 | -e755 // "global macro 'Symbol' (Location) not referenced" 35 | -e40 // undefeined errno 36 | -emacro({26},vos_printLog) // due to definition of internal used __VA_ARGS__ if used without arguments 37 | -emacro((10),MAKEWORD) // due to definition of internal used macros 38 | -e131 39 | -emacro((530,526,628,516,78,26,10,155,1055),ALIGNOF) // due to definition of internal used __alignof 40 | -e131 41 | -e655 // bit-wise operation uses (compatible) enum's 42 | -e641 // Converting enum to int 43 | -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/test/localtest/hostsfile.txt: -------------------------------------------------------------------------------- 1 | # used for api_test 2 | # Hosts Database 3 | # 4 | ## 5 | 6 | 10.64.8.3 dev1Test 7 | 10.64.8.12 dev2Test 8 | 239.0.0.21 grpDevTest 9 | 10.0.0.1 devECSP.anyVeh.lCst 10 | 10.0.0.1 devECSP.anyVeh.lCst.lClTrn.lTrn -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/test/mdpatterns/patterns.txt: -------------------------------------------------------------------------------- 1 | Message data tests 2 | ------------------------------------------------------------ 3 | 4 | MD tests verify exchange of message data between two devices A and B. 5 | All defined MD patterns are tested on both supported transmission protocols TCP and UDP. 6 | Test cases and their parameters are summarized in table bellow. 7 | 8 | Protocol Pattern Destination Replies Data size Direction 9 | -------------------------------------------------------------------------------------- 10 | UDP notify unicast 0 64B/32kB A->B 11 | UDP request/reply unicast/unicast 1 64B/32kB A->B->A 12 | UDP request/reply/confirm unicast/unicast 1 64B/32kB A->B->A->B 13 | UDP notify multicast 0 64B/32kB A->B 14 | UDP request/reply multicast/unicast 1 64B/32kB A->B->A 15 | UDP request/reply/confirm multicast/unicast 1 64B/32kB A->B->A->B 16 | UDP request/reply multicast/unicast ? 64B/32kB A->B->A 17 | UDP request/reply/confirm multicast/unicast ? 64B/32kB A->B->A->B 18 | TCP notify --- 0 64B/32kB A->B 19 | TCP request/reply --- 1 64B/32kB A->B->A 20 | TCP request/reply/confirm --- 1 64B/32kB A->B->A->B 21 | 22 | All the test cases are run on two target plattforms - Linux and Windows. 23 | TCNOpen implementation of TRDP stack is also tested against TRDP implementation developed by UniControls. 24 | Following table sumarizes the tests performed on the two plattforms and implementations: 25 | 26 | Device A Device B 27 | ------------------------------------ 28 | Windows/TCNOpen Linux/TCNOpen 29 | Linux/TCNOpen Windows/TCNOpen 30 | Windows/TCNOpen Windows/TCNOpen 31 | Windows/UC Linux/TCNOpen 32 | Linux/TCNOpen Windows/UC 33 | -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/test/pdpatterns/patterns.txt: -------------------------------------------------------------------------------- 1 | Process data tests 2 | ------------------------------------------------------------ 3 | 4 | PD tests verify exchange of process data between two devices A and B. All defined PD patterns are tested. 5 | Test cases and their parameters are summarized in table bellow. 6 | All the test cases are run in parallel during the test session. 7 | 8 | Pattern Destination Data size PD Period Direction 9 | ------------------------------------------------------------------------- 10 | PUSH unicast 256B 100ms A->B, B->A 11 | PUSH unicast 256B 250ms A->B, B->A 12 | PUSH unicast 1432B 100ms A->B, B->A 13 | PUSH unicast 1432B 250ms A->B, B->A 14 | PUSH multicast 256B 100ms A->B, B->A 15 | PUSH multicast 256B 250ms A->B, B->A 16 | PUSH multicast 1432B 100ms A->B, B->A 17 | PUSH multicast 1432B 250ms A->B, B->A 18 | PULL unicast/unicast 256B 500ms A->B->A, B->A->B 19 | PULL unicast/unicast 1432B 500ms A->B->A, B->A->B 20 | PULL multicast/multicast 256B 500ms A->B->A, B->A->B 21 | PULL multicast/multicast 1432B 500ms A->B->A, B->A->B 22 | 23 | All the test cases are run on two target plattforms - Linux and Windows. 24 | TCNOpen implementation of TRDP stack is also tested against TRDP implementation developed by UniControls. 25 | Following table sumarizes the tests performed on the two plattforms and implementations: 26 | 27 | Device A Device B 28 | ------------------------------------ 29 | Windows/TCNOpen Linux/TCNOpen 30 | Linux/TCNOpen Windows/TCNOpen 31 | Windows/TCNOpen Windows/TCNOpen 32 | Windows/UC Linux/TCNOpen 33 | -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/test/udpmdcom/TRDP_UDPMDCom_TestPatterns.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WAGO/pfc-howtos/7830974caec0023016e8096fcbf968283904db24/HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/test/udpmdcom/TRDP_UDPMDCom_TestPatterns.xlsx -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/test/udpmdcom/readme.txt: -------------------------------------------------------------------------------- 1 | (29/11/2012 - s.pachera, FAR Systems s.p.a.) 2 | Add partial multicast test support (Notify, Request, Reply without confirmation) 3 | To execute UDPMDCom test use 3 devices Dev1 (IP1), Dev2 (IP2) e Dev2 (IP3). 4 | 5 | 6 | On Dev1 7 | ./mdTest0001 --testmode 1 --dest 8 | A command line interface will be shown 9 | Type "h" and return to get available commands 10 | To execute test type related char and next return 11 | Result will be shown on Dev1, Dev2 and Dev3 console. 12 | 13 | On Dev2 (used for singlecast and multicast test) 14 | ./mdTest0001 --testmode 2 15 | 16 | 17 | On Dev2 (used only for multicast test) 18 | ./mdTest0001 --testmode 3 19 | -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/local_src/trdp-1.4.1.0/test/xml/readme.txt: -------------------------------------------------------------------------------- 1 | trdp-xmlprint-test 2 | ------------------ 3 | Parses all available configuration data from provided XML configuration file 4 | into TRDP structures. 5 | Prints content of all structures with parsed configuration data. 6 | 7 | Usage: 8 | trdp-xmlprint-test 9 | 10 | trdp-xmlpd-test 11 | --------------- 12 | Configures TRDP PD according to the supplied XML configuration file, 13 | send and receives telegrams, prints out the contet of sent and received data. 14 | Following general steps are performed: 15 | - General configuration parameters are read from XML file using tau_readXmlConfig 16 | - TRDP stack is initialized with configured memory structure 17 | - Dataset configuration is read using tau_readXmlDatasetConfig 18 | - TRDP marshalling is initialized using dataset configuration 19 | - One session for each configured interface is initialized 20 | - Telegrams are configured for each session (interface). 21 | When some parameters are missing, default values are used. 22 | - Telegram is published for each configured destination 23 | (IP address expected in destination URI). 24 | - Telegram is subscribed for each configured source. 25 | IP addresses are expected in source URI parameters. 26 | First multicast address found among telegram destinations (if any) 27 | is used as destination address. 28 | - Periodically telegrams are sent and received: 29 | - All dataset elements in published telegrams are set to value of global counter 30 | (incremented each period). Datatype of each element is taken into account 31 | (TIMEDATE types not yet supported). 32 | - Updated datasets are passed to TRDP stack using tlp_put. 33 | - tlc_process is called for each configured session. 34 | - Received telegrams are read using tlp_get. 35 | - Content of all sent and received telegrams is printed out. 36 | Dataset elements are printed according to their data type. 37 | 38 | Usage: 39 | trdp-xmlpd-test 40 | 41 | -------------------------------------------------------------------------------- /HowTo_AddTRDP/ptxproj/rules/trdp.in: -------------------------------------------------------------------------------- 1 | ## SECTION=networking 2 | 3 | config TRDP 4 | tristate 5 | prompt "TCNOpen - TRDP" 6 | help 7 | TCNOpen - Train Real Time Data Protocol 8 | -------------------------------------------------------------------------------- /HowTo_AddUserOrGroup/README.md: -------------------------------------------------------------------------------- 1 | # HowTo add a user or group to firmware 2 | 3 | To add a user or a group, the PFC firmware includes the commands **useradd** and **groupadd**. But until firmare 19 the commands **adduser** and **addgroup** have to be used. 4 | 5 | ## FW20 and later 6 | To add a user in a firmware with version 20 or later, use command ```useradd ```. This will add a new user as well as a new group with the same name. The user will not yet have a password now and will not be allowed to login. So add a password with ```passwd ```. Now the new user will be albe to login. 7 | 8 | To add a group in a firmware with version 20 or later, use command ```groupadd ```. 9 | 10 | ## FW19 and previous 11 | To add a user in a firmware with version 19 or previous, use command ```adduser ```. This will add a new user as well as a new group with the same name. The command will automatically ask for a password. So no further ```passwd``` command is needed. 12 | 13 | To add a group in a firmware with version 19 or previous, use command ```addgroup ```. 14 | 15 | ## Reserved areas for IDs 16 | The commands ```useradd/groupadd``` or ```adduser/addgroup``` will automatically choose group and user ids, that are valid. But in case you want to choose ids by yourselve, you should consider following ranges: 17 | 18 | ### By WAGO reserved areas 19 | + 500 to 1003 20 | + 3540 21 | + 5000 and up 22 | 23 | ### Free areas for user and group ids 24 | + < 500 25 | + 1003 to 3539 26 | + 3541 to 5000 27 | 28 | 29 | # Compatibility list: 30 | | PFC | Compatible | 31 | |:-------------|:------------:| 32 | | **PFC 100** | | 33 | | 750-8100 | Y | 34 | | 750-8101 | Y | 35 | | 750-8102 | Y | 36 | | | | 37 | | **PFC 200** | | 38 | | 750-8202 | Y | 39 | | 750-8203 | Y | 40 | | 750-8204 | Y | 41 | | 750-8206 | Y | 42 | | 750-8207 | Y | 43 | | 750-8208 | Y | 44 | | | | 45 | | **PFC 200 G2** | | 46 | | 750-8212 | Y | 47 | | 750-8213 | Y | 48 | | 750-8214 | Y | 49 | | 750-8216 | Y | -------------------------------------------------------------------------------- /HowTo_AddZeroMQ/README.md: -------------------------------------------------------------------------------- 1 | # Add ZeroMQ library (libzmq-4.3.4) 2 | 3 | ## This HowTo describes the procedure of compiling "libzmq" for PFC. 4 | 5 | # PREREQUISITES: 6 | This HowTo is based on a clean installation of Ubuntu LTS, with an installed 7 | and working WAGO Board-Support Package for PFC200. 8 | Working means that you successfully built the standard image “sd.hdimg”. 9 | 10 | # Installation and usage 11 | 12 | ## 1) On development host (Ubuntu) 13 | ### 1.1) Copy rule files and sources to into ptxdist-rulefiles 14 | ``` 15 | >cp -v ptxproj/rules/* ~//rules/ 16 | ``` 17 | 18 | ### 1.2) Select package "libzmq" for build in ptxdist 19 | ``` 20 | >cd ~// 21 | >ptxdist menuconfig 22 | ``` 23 | 24 | ``` 25 | Networking Tools --> 26 | 27 | [*] libzmq ( Select with [Space] and press [enter] ) 28 | 29 | Leave window with [Exit] [Exit], [Exit], and [Yes] 30 | ``` 31 | 32 | ### 1.3) Clean the "libzmq" package 33 | ``` 34 | >cd ~// 35 | >ptxdist clean libzmq 36 | ``` 37 | 38 | ### 1.4) Build the "libzmq" package 39 | ``` 40 | >cd ~// 41 | >ptxdist targetinstall libzmq # Build libzmq package only. 42 | ``` 43 | 44 | If you see the "finished target libzmq.targetinstall.post" at the end of the run,it is time for a :) 45 | 46 | Afterward you will find the OPKG installer package file: 47 | - ~//platform-wago-pfcXXX/packages/libzmq_4.0.4_arm.ipk 48 | 49 | ### 1.5) Build complete firmware image "sd.hdimg" which includes packages libzmq and libsodium. 50 | ``` 51 | >cd ~// 52 | >ptxdist images 53 | ``` 54 | 55 | As usual, you can: 56 | - copy image file "sd.hdimg" with command "dd" to SD-Card and boot PFC200 from it. 57 | - transfer package into PFC200 file system and call "opkg install < pkg-name >.ipk 58 | - utilize Web-Based-Management(WBM) feature "Software-Upload" 59 | 60 | --- 61 | # Testing the library 62 | 63 | What you have to do is write a ZeroMQ application for PFC 64 | Feelfree to take a look at https://github.com/zeromq 65 | There you will find many examples in different languages. 66 | 67 | -------------------------------------------------------------------------------- /HowTo_AddZeroMQ/ptxproj/rules/libzmq.in: -------------------------------------------------------------------------------- 1 | ## SECTION=networking 2 | 3 | config LIBZMQ 4 | tristate 5 | prompt "libzmq" 6 | help 7 | The zeroMQ lightweight messaging kernel is a library which extends the 8 | standard socket interfaces with features traditionally provided by 9 | specialised messaging middleware products. zeroMQ sockets provide an 10 | abstraction of asynchronous message queues, multiple messaging patterns, 11 | message filtering (subscriptions), seamless access to multiple transport 12 | protocols and more. 13 | -------------------------------------------------------------------------------- /HowTo_AddZeroMQ/ptxproj/rules/libzmq.make: -------------------------------------------------------------------------------- 1 | # -*-makefile-*- 2 | # 3 | # Copyright (C) 2021 by WAGO Kontakttechnik GmbH & Co. KG, author Thomas Brandt 4 | # 5 | # See CREDITS for details about who has contributed to this project. 6 | # 7 | # For further information about the PTXdist project and license conditions 8 | # see the README file. 9 | # 10 | 11 | # 12 | # We provide this package 13 | # 14 | PACKAGES-$(PTXCONF_LIBZMQ) += libzmq 15 | 16 | # 17 | # Paths and names 18 | # 19 | LIBZMQ_VERSION := 4.3.4 20 | LIBZMQ_MD5 := c897d4005a3f0b8276b00b7921412379 21 | LIBZMQ := zeromq-$(LIBZMQ_VERSION) 22 | LIBZMQ_SUFFIX := tar.gz 23 | LIBZMQ_URL := https://github.com/zeromq/libzmq/releases/download/v$(LIBZMQ_VERSION)/$(LIBZMQ).$(LIBZMQ_SUFFIX) 24 | LIBZMQ_SOURCE := $(SRCDIR)/$(LIBZMQ).$(LIBZMQ_SUFFIX) 25 | LIBZMQ_DIR := $(BUILDDIR)/$(LIBZMQ) 26 | LIBZMQ_LICENSE := LGPL-3.0+ 27 | 28 | # 29 | # autoconf 30 | # 31 | LIBZMQ_CONF_TOOL := autoconf 32 | LIBZMQ_CONF_OPT := \ 33 | $(CROSS_AUTOCONF_USR) \ 34 | --enable-shared \ 35 | --disable-static \ 36 | --with-gnu-ld \ 37 | --without-documentation 38 | 39 | # ---------------------------------------------------------------------------- 40 | # Target-Install 41 | # ---------------------------------------------------------------------------- 42 | 43 | $(STATEDIR)/libzmq.targetinstall: 44 | @$(call targetinfo) 45 | 46 | @$(call install_init, libzmq) 47 | @$(call install_fixup, libzmq,PRIORITY,optional) 48 | @$(call install_fixup, libzmq,SECTION,base) 49 | @$(call install_fixup, libzmq,AUTHOR,"thomas.brandt@wago.com") 50 | @$(call install_fixup, libzmq,DESCRIPTION,missing) 51 | 52 | @$(call install_lib, libzmq, 0, 0, 0644, libzmq) 53 | @$(call install_copy, libzmq, 0, 0, 0755, -, /usr/bin/curve_keygen) 54 | 55 | @$(call install_finish, libzmq) 56 | 57 | @$(call touch) 58 | 59 | # vim: syntax=make 60 | -------------------------------------------------------------------------------- /HowTo_AutoCopySD-CardImage2InternalFlash/HowTo_AutoCopySD-CardImage2InternalFlashOnBoot.txt: -------------------------------------------------------------------------------- 1 | ----------------------------------------------------------------------------------------- 2 | --- HowTo: Automatically copy SD-Card image into Internal-Flash on boot 3 | ----------------------------------------------------------------------------------------- 4 | This HowTo show a way to update firmware of a given PFCx00 without using additional tools 5 | other then just an SD-Card. 6 | 7 | Basic is System-Init-Script "cpsd2intern", called on boot, checks actual boot location. 8 | In case booted from "SD-Card", standard copy script is used to update internal flash with 9 | firmware on SD-Card. 10 | 11 | ______________ 12 | /.--------------.\ 13 | // \\ 14 | // \\ 15 | || .-..----. .-. .--. || Make sure that the on board operation switch is 16 | ||( ( '-..-'|.-.||.-.||| in STOP position. Otherwise no copy operation will 17 | || \ \ || || ||||_|||| take action. 18 | ||._) ) || \'-'/||-' || 19 | \\'-' `' `-' `' // Also keep in mind if you use the prepared SD-Card you 20 | \\ // will not be able to boot in your normal system, while 21 | \\______________// using this SD-Card. 22 | '--------------' 23 | |_|_ 24 | ____ _/ _)_) 25 | ' | (_) 26 | .--'"\| () 27 | | | 28 | | | 29 | |_| 30 | 31 | ------------------------------------------------------------------ 32 | Installation and usage of copy from SD card into internal flash: 33 | ------------------------------------------------------------------ 34 | 35 | 1) Prepare your SD card with the normal firmware image 36 | 37 | 2) Copy attached System-Init-Script "cpsd2intern" into folder "/etc/init.d" 38 | also the "omsreader" into folder "/usr/bin" 39 | 40 | 2) Create symbolic link "S95_cpsd2intern" in folder "/etc/rc.d" 41 | 42 | > cd /etc/rc.d 43 | > ln -s ../init.d/cpsd2intern S95_cpsd2intern 44 | 45 | With "S95_" copy process started before CoDeSys runtime(plclinux_rt). 46 | 47 | ------------------------------------------------------------------ 48 | Execution: 49 | 50 | 1) Plug your SD Card into PFC 51 | 52 | 2) Power on. 53 | The script is executed during startup. 54 | The progress of firmware update is displayed via LED's U1 to U4 55 | - YELLOW: Copy process is active(approx. 1 minute) 56 | - GREEN: Successful done! 57 | - RED: Finished with ERROR! 58 | 59 | 3) After successfully copied your data. Power off. 60 | 61 | 4) Unplug your SD Card. 62 | 63 | 5) Power on. The PFC is starting from the internal flash and the Symbolic link in 64 | /etc/rc.d/ automatically removed on first boot. 65 | 66 | REMARK: 67 | Not all settings, such as "Owner of Serial-Interface(ttyO0)" shipped with firmware 68 | image on SD-Card. ttyO0-Ownership stored inside electronic-type-label(EEPROM) on device. 69 | 70 | \eof 71 | -------------------------------------------------------------------------------- /HowTo_AutoCopySD-CardImage2InternalFlash/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 WAGO Kontakttechnik GmbH & Co. KG, author Thomas Brandt 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /HowTo_AutoCopySD-CardImage2InternalFlash/README.md: -------------------------------------------------------------------------------- 1 | # Automatically copy SD-Card image into Internal-Flash on boot 2 | 3 | ## For Version 2019.3.1 4 | 5 | This HowTo show a way to update firmware of a given PFC200 without using additional tools other then just an SD-Card. 6 | 7 | > Please see also: HowTo_AutoCopySD-CardImage2InternalFlashOnBoot.txt 8 | 9 | # Compatibility list: 10 | | PFC | Compatible | 11 | |:-------------|:------------:| 12 | | **PFC 100** | | 13 | | 750-8100 | Y | 14 | | 750-8101 | Y | 15 | | 750-8102 | Y | 16 | | | | 17 | | **PFC 200** | | 18 | | 750-8202 | Y | 19 | | 750-8203 | Y | 20 | | 750-8204 | Y | 21 | | 750-8206 | Y | 22 | | 750-8207 | Y | 23 | | 750-8208 | Y | 24 | | | | 25 | | **PFC 200 G2** | | 26 | | 750-8212 | N | 27 | | 750-8213 | N | 28 | | 750-8214 | N | 29 | | 750-8216 | N | 30 | 31 | -------------------------------------------------------------------------------- /HowTo_AutoCopySD-CardImage2InternalFlash/pfc/usr_bin/omsreader: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WAGO/pfc-howtos/7830974caec0023016e8096fcbf968283904db24/HowTo_AutoCopySD-CardImage2InternalFlash/pfc/usr_bin/omsreader -------------------------------------------------------------------------------- /HowTo_BuildRustExecutables/README.md: -------------------------------------------------------------------------------- 1 | # Build RUST Execuables 2 | 3 | ## Every package is bundled to a specific firmware version: For Version 17 - FW:03.05.10(99) 4 | 5 | This HowTo shows how to cross-compile executables written in [RUST](https://www.rust-lang.org/) for PFC's. 6 | 7 | ## 1) Install PFC Firmware SDK 8 | 9 | Follow the instructions on [https://github.com/WAGO/pfc-firmware-sdk](https://github.com/WAGO/pfc-firmware-sdk) to install PFC Firmware SDK. 10 | 11 | ## 2) Install rustup (https://rustup.rs/) 12 | 13 | Follow the instructions on [https://rustup.rs/](https://rustup.rs/) to install `rustup`, 14 | the RUST toolchain manager. 15 | 16 | ## 3) Add Rust Target 17 | 18 | In order to compile executables for PFC's the `armv7-unknown-linux-gnueabihf` target is needed. 19 | Use `rustup` to add this target. 20 | 21 | rustup target add armv7-unknown-linux-gnueabihf 22 | 23 | ## 4) Setup Cargo 24 | 25 | To link execuables, Rust needs to know which linker should be used. 26 | The linker is part of the toolchain installed along with the PFC firmware SDK. 27 | 28 | It is assumed, the toolchain was installed to `/opt/LINARO.Toolchain-2017.10`. 29 | 30 | Add the following lines to `~/.cargo/config` file. 31 | _(Create this file, if it does not exists.)_ 32 | 33 | ```` 34 | [build] 35 | target = "armv7-unknown-linux-gnueabihf" 36 | 37 | [target.armv7-unknown-linux-gnueabihf] 38 | linker = "/opt/LINARO.Toolchain-2017.10/arm-linux-gnueabihf/bin/arm-linux-gnueabihf-gcc" 39 | ```` 40 | 41 | ## 5) Create a Rust Project 42 | 43 | Create a directory and use `cargo` to create a Hello-World project. 44 | 45 | ```` 46 | mkdir hello 47 | cd hello 48 | cargo init 49 | ```` 50 | 51 | Compile the project using `cargo`. 52 | 53 | cargo build --target armv7-unknown-linux-gnueabihf 54 | 55 | The resulting binary can be found at `target/armv7-unknown-linux-gnueabihf/release/hello`. 56 | 57 | ## 6) Create stripped Release Build (Optional) 58 | 59 | The resulting binary of step 5) is a little large. 60 | 61 | ```` 62 | ls -lah target/armv7-unknown-linux-gnueabihf/debug/hello 63 | -rwxrwxr-x 2 user user 3,1M Nov 10 00:03 target/armv7-unknown-linux-gnueabihf/debug/hello 64 | ```` 65 | 66 | For release purposes, it should be build optimized and stripped. 67 | 68 | ### 6.1) Add Release Profile to Cargo.toml 69 | 70 | Add the following lines to `Cargo.toml`. 71 | 72 | ```` 73 | [profile.release] 74 | opt-level = "z" 75 | lto = true 76 | ```` 77 | 78 | These lines activate optimization for size (`opt-level = "z"`) and link time 79 | optimization (`lto = true`). 80 | 81 | ## 6.2) Compile Release 82 | 83 | To compile release binary, use `cargo`. 84 | 85 | cargo build --target armv7-unknown-linux-gnueabihf --release 86 | 87 | The resulting binary can be found at `target/armv7-unknown-linux-gnueabihf/release/hello`. 88 | 89 | ## 6.3) Strip Binary 90 | 91 | Finally, the binary should be stripped to ge rid of any unnecessary symbols. 92 | Therefore, the tool `strip` of PFC's toolchain is used. 93 | 94 | /opt/LINARO.Toolchain-2017.10/arm-linux-gnueabihf/bin/arm-linux-gnueabihf-strip target/armv7-unknown-linux-gnueabihf/release/hello 95 | 96 | The size of resulting binary should now be much smaller. 97 | 98 | ```` 99 | ls -lah target/armv7-unknown-linux-gnueabihf/release/hello 100 | -rwxrwxr-x 2 user user 226K Nov 10 00:36 target/armv7-unknown-linux-gnueabihf/release/hello 101 | ```` 102 | -------------------------------------------------------------------------------- /HowTo_ReadOperatingModeSwitches/HowTo_ReadOperatingModeSwitches.txt: -------------------------------------------------------------------------------- 1 | ------------------------------------------------------------------------ 2 | - HowTo: Utilize liboms Operating-Mode-Switches-Reader 3 | ------------------------------------------------------------------------ 4 | This HowTo shows usage of liboms to recive current state of: 5 | - RUN-STOP-RESET switch 6 | - RST_ALL switch 7 | 8 | The application will: 9 | - read both switches RUN-STOP-RESET and RESET-ALL 10 | - deliver state of switches as text 11 | 12 | The output could look like this: 13 | 14 | >/usr/bin/omsreader 15 | RUN 16 | 17 | ------------------------------------------------------------------------ 18 | - Installation: 19 | ------------------------------------------------------------------------ 20 | 1) Copy content of attached folder rules into ~/wago/bsp/ptxproj/rules. 21 | >cp rules/* ~/wago/bsp/ptxproj/rules/ 22 | 23 | 2) Create folder ~/wago/bsp/ptxproj/src/omsreader. 24 | >mkdir ~/wago/bsp/ptxproj/src/omsreader 25 | 26 | 3) Copy content of folder src_omsdemos into newly created folder. 27 | >cp src_omsreader/* ~/wago/bsp/ptxproj/src/omsreader/ 28 | 29 | 4) Take a look into the source code file 30 | >cd ~/wago/bsp/ptxproj/src/omsreader 31 | >cat omsreader.c 32 | 33 | 5) Select package "omsreader" for build in ptxdist 34 | >cd ~/wago/bsp/ptxproj/ 35 | >ptxdist menuconfig 36 | 37 | Wago Specific --> 38 | Tools --> 39 | [*] Operating-Mode-Switches reader tool 40 | 41 | Save changes and exit. 42 | 43 | 6) Build examples 44 | >ptxdist targetinstall omsreader 45 | 46 | 7) Copy executables to PFC 47 | 8) Make them executable 48 | >chmod a+x /usr/bin/omsreader 49 | 50 | 9) Start executable 51 | >/usr/bin/omsreader 52 | 53 | 10) The actual switch position will be printed to stdout 54 | 55 | This could be: 56 | RUN 57 | STOP 58 | RESET 59 | or with the additon of '-RESET_ALL' like: 60 | RUN-RESET_ALL 61 | STOP-RESET_ALL 62 | RESET-RESET_ALL (which will reboot the pfc by intend ;) ) 63 | 64 | 11) Have fun 65 | /eof 66 | -------------------------------------------------------------------------------- /HowTo_ReadOperatingModeSwitches/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 WAGO Kontakttechnik GmbH & Co. KG, author Thomas Brandt 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /HowTo_ReadOperatingModeSwitches/README.md: -------------------------------------------------------------------------------- 1 | # Utilize liboms Operating-Mode-Switches-Reader 2 | 3 | ## For Version 2019.3.1 4 | 5 | This HowTo shows usage of liboms to recive current state of RUN-STOP-RESET switch and RST_ALL switch 6 | 7 | > Please see also: HowTo_ReadOperatingModeSwitches.txt 8 | 9 | # Compatibility list: 10 | | PFC | Compatible | 11 | |:-------------|:------------:| 12 | | **PFC 100** | | 13 | | 750-8100 | Y | 14 | | 750-8101 | Y | 15 | | 750-8102 | Y | 16 | | | | 17 | | **PFC 200** | | 18 | | 750-8202 | Y | 19 | | 750-8203 | Y | 20 | | 750-8204 | Y | 21 | | 750-8206 | Y | 22 | | 750-8207 | Y | 23 | | 750-8208 | Y | 24 | | | | 25 | | **PFC 200 G2** | | 26 | | 750-8212 | Y | 27 | | 750-8213 | Y | 28 | | 750-8214 | Y | 29 | | 750-8216 | Y | 30 | 31 | -------------------------------------------------------------------------------- /HowTo_ReadOperatingModeSwitches/package/omsreader_1.0_armhf.ipk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WAGO/pfc-howtos/7830974caec0023016e8096fcbf968283904db24/HowTo_ReadOperatingModeSwitches/package/omsreader_1.0_armhf.ipk -------------------------------------------------------------------------------- /HowTo_ReadOperatingModeSwitches/pfc/rules/omsreader.in: -------------------------------------------------------------------------------- 1 | ## SECTION=wago_specific_tools 2 | 3 | config OMSREADER 4 | bool 5 | prompt "Operating-Mode-Switches reader tool" 6 | help 7 | Reading START-STOP-RESET and RST_ALL-switch. The exit value will give information about the 8 | switch position. 9 | -------------------------------------------------------------------------------- /HowTo_ReadOperatingModeSwitches/pfc/rules/omsreader.make: -------------------------------------------------------------------------------- 1 | # -*-makefile-*- 2 | # 3 | # Copyright (C) 2018 by 4 | # 5 | # See CREDITS for details about who has contributed to this project. 6 | # 7 | # For further information about the PTXdist project and license conditions 8 | # see the README file. 9 | # 10 | 11 | # 12 | # We provide this package 13 | # 14 | PACKAGES-$(PTXCONF_OMSREADER) += omsreader 15 | 16 | # 17 | # Paths and names 18 | # 19 | OMSREADER_VERSION := 1.0 20 | OMSREADER := omsreader 21 | OMSREADER_URL := file://src/$(OMSREADER) 22 | OMSREADER_DIR := $(BUILDDIR)/$(OMSREADER) 23 | OMSREADER_LICENSE := MIT 24 | 25 | # ---------------------------------------------------------------------------- 26 | # Prepare 27 | # ---------------------------------------------------------------------------- 28 | 29 | #OMSREADER_PATH := PATH=$(CROSS_PATH) 30 | OMSREADER_CONF_TOOL := NO 31 | OMSREADER_MAKE_ENV := $(CROSS_ENV) 32 | 33 | # ---------------------------------------------------------------------------- 34 | # Target-Install 35 | # ---------------------------------------------------------------------------- 36 | 37 | $(STATEDIR)/omsreader.targetinstall: 38 | @$(call targetinfo) 39 | 40 | @$(call install_init, omsreader) 41 | @$(call install_fixup, omsreader,PRIORITY,optional) 42 | @$(call install_fixup, omsreader,SECTION,base) 43 | @$(call install_fixup, omsreader,AUTHOR,"Thomas.Brandt@wago.com") 44 | @$(call install_fixup, omsreader,DESCRIPTION,missing) 45 | 46 | @$(call install_copy, omsreader, 0, 0, 0755, $(OMSREADER_DIR)/omsreader, /usr/bin/omsreader) 47 | 48 | @$(call install_finish, omsreader) 49 | 50 | @$(call touch) 51 | 52 | # ---------------------------------------------------------------------------- 53 | # Clean 54 | # ---------------------------------------------------------------------------- 55 | 56 | $(STATEDIR)/omsreader.clean: 57 | @$(call targetinfo) 58 | @-cd $(OMSREADER_DIR) && \ 59 | $(OMSREADER_ENV) $(OMSREADER_PATH) $(MAKE) clean 60 | @$(call clean_pkg, OMSREADER) 61 | 62 | # vim: syntax=make 63 | -------------------------------------------------------------------------------- /HowTo_ReadOperatingModeSwitches/pfc/src_omsreader/Makefile: -------------------------------------------------------------------------------- 1 | ##---------------------------------------------------------------------------------------------------------------------- 2 | ### Copyright (c) WAGO Kontakttechnik GmbH & Co. KG 3 | ### 4 | ### PROPRIETARY RIGHTS of WAGO Kontakttechnik GmbH & Co. KG are involved in 5 | ### the subject matter of this material. All manufacturing, reproduction, 6 | ### use, and sales rights pertaining to this subject matter are governed 7 | ### by the license agreement. The recipient of this software implicitly 8 | ### accepts the terms of the license. 9 | ### 10 | ##---------------------------------------------------------------------------------------------------------------------- 11 | ##---------------------------------------------------------------------------------------------------------------------- 12 | ### 13 | ### \file Makefile 14 | ### 15 | ### \version 16 | ### 17 | ### \brief Makefile for example applications using liboms 18 | ### 19 | ### \author Thomas Brandt : WAGO Kontakttechnik GmbH & Co. KG 20 | ##---------------------------------------------------------------------------------------------------------------------- 21 | 22 | CFLAGS += -O2 -g -Wall 23 | CPPFLAGS += 24 | LDFLAGS += -llibloader -loms -ldl 25 | 26 | all: omsreader 27 | 28 | clean: 29 | -rm -f omsreader 30 | 31 | install: 32 | 33 | .PHONY: all clean install 34 | 35 | -------------------------------------------------------------------------------- /HowTo_Register-access-65x-demo/License: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 WAGO Kontakttechnik GmbH & Co. KG 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /HowTo_Register-access-65x-demo/rules/wago-demo-register-access-65x.in: -------------------------------------------------------------------------------- 1 | ## SECTION=wago_specific_demo 2 | 3 | config REGISTER_ACCESS_65X_DEMO 4 | bool 5 | prompt "KBUS register access demo" 6 | select LIBKBUS_REGISTER_SETTINGS 7 | help 8 | Demo Program for configuring serial terminals via adi/dal + libpackbus 9 | 10 | if REGISTER_ACCESS_65X_DEMO 11 | 12 | config REGISTER_ACCESS_65X_DEMO_DEBUG 13 | bool 14 | default y 15 | prompt "debug build" 16 | help 17 | build with additional debug info and without optimisations 18 | 19 | choice 20 | prompt "static/dynamic linking" 21 | 22 | config REGISTER_ACCESS_65X_DEMO_SHARED 23 | bool 24 | select LIBKBUS_REGISTER_SETTINGS_SHARED 25 | prompt "link against shared kbus-register-settings library" 26 | 27 | config REGISTER_ACCESS_65X_DEMO_STATIC 28 | bool 29 | select LIBKBUS_REGISTER_SETTINGS_STATIC 30 | prompt "link against static kbus-register-settings library" 31 | 32 | endchoice 33 | endif 34 | -------------------------------------------------------------------------------- /HowTo_Register-access-65x-demo/rules/wago-demo-register-access-65x.make: -------------------------------------------------------------------------------- 1 | # -*-makefile-*- 2 | 3 | # 4 | # We provide this package 5 | # 6 | PACKAGES-$(PTXCONF_REGISTER_ACCESS_65X_DEMO) += register-access-65x-demo 7 | 8 | # 9 | # Paths and names 10 | # 11 | REGISTER_ACCESS_65X_DEMO_VERSION := 0.1 12 | REGISTER_ACCESS_65X_DEMO := register-access-65x-demo 13 | REGISTER_ACCESS_65X_DEMO_URL := file://$(SRCDIR)/register-access-65x-demo 14 | REGISTER_ACCESS_65X_DEMO_DIR := $(BUILDDIR)/$(REGISTER_ACCESS_65X_DEMO) 15 | REGISTER_ACCESS_65X_DEMO_SOURCE := $(SRCDIR)/$(REGISTER_ACCESS_65X_DEMO) 16 | 17 | # we use a plain makefile 18 | REGISTER_ACCESS_65X_DEMO_CONF_TOOL := NO 19 | 20 | EXE_CONF := 21 | ifdef PTXCONF_REGISTER_ACCESS_65X_DEMO_SHARED 22 | EXE_CONF += force_link_static=n 23 | endif 24 | ifdef PTXCONF_REGISTER_ACCESS_65X_DEMO_STATIC 25 | EXE_CONF += force_link_static=y 26 | endif 27 | ifdef PTXCONF_REGISTER_ACCESS_65X_DEMO_SHARED 28 | ifdef PTXCONF_REGISTER_ACCESS_65X_DEMO_STATIC 29 | $(error cannot link both static and dynamic (both PTXCONF_KBUS_SETTINGS_65X_SHARED and PTXCONF_KBUS_SETTINGS_65X_STATIC are defined)) 30 | endif 31 | endif 32 | ifdef PTXCONF_REGISTER_ACCESS_65X_DEMO_DEBUG 33 | EXE_CONF += DEBUG=y 34 | else 35 | EXE_CONF += DEBUG=n 36 | endif 37 | 38 | # explicitly move CROSS_ENV into MAKE_ENV, because ptxdist just doesn't do it ¯\_(ツ)_/¯ 39 | REGISTER_ACCESS_65X_DEMO_MAKE_ENV := $(CROSS_ENV) 40 | 41 | # our own variables for the build 42 | REGISTER_ACCESS_65X_DEMO_MAKE_ENV += $(EXE_CONF) 43 | 44 | 45 | # ---------------------------------------------------------------------------- 46 | # Get 47 | # ---------------------------------------------------------------------------- 48 | 49 | $(STATEDIR)/register-access-65x-demo.get: 50 | @$(call targetinfo, $@) 51 | @$(call touch, $@) 52 | 53 | # ---------------------------------------------------------------------------- 54 | # Extract 55 | # ---------------------------------------------------------------------------- 56 | 57 | $(STATEDIR)/register-access-65x-demo.extract: 58 | @$(call targetinfo, $@) 59 | @$(call clean, $(REGISTER_ACCESS_65X_DEMO_DIR)) 60 | cp -rd $(REGISTER_ACCESS_65X_DEMO_SOURCE) $(REGISTER_ACCESS_65X_DEMO_DIR) 61 | @$(call touch, $@) 62 | 63 | # we use ptxdist's default prepare, compile and install stages 64 | 65 | # ---------------------------------------------------------------------------- 66 | # Target-Install 67 | # ---------------------------------------------------------------------------- 68 | 69 | $(STATEDIR)/register-access-65x-demo.targetinstall: 70 | @$(call targetinfo, $@) 71 | @$(call install_init, register-access-65x-demo) 72 | @$(call install_fixup,register-access-65x-demo,PRIORITY,optional) 73 | @$(call install_fixup,register-access-65x-demo,VERSION,$(REGISTER_ACCESS_65X_DEMO_VERSION)) 74 | @$(call install_fixup,register-access-65x-demo,SECTION,base) 75 | @$(call install_fixup,register-access-65x-demo,AUTHOR,"cm") 76 | @$(call install_copy,register-access-65x-demo, 0, 0, 0755, -, /usr/bin/register-access-65x-demo) 77 | @$(call install_finish,register-access-65x-demo) 78 | @$(call touch, $@) 79 | 80 | # vim: syntax=make 81 | -------------------------------------------------------------------------------- /HowTo_Register-access-65x-demo/src/register-access-65x-demo/.gitignore: -------------------------------------------------------------------------------- 1 | docs/ 2 | -------------------------------------------------------------------------------- /HowTo_Register-access-65x-demo/src/register-access-65x-demo/Makefile: -------------------------------------------------------------------------------- 1 | # Executabels name 2 | EXE = register-access-65x-demo 3 | # Source files 4 | SRC = register-access-65x-demo.c 5 | 6 | # Debug (compile with debugging information and without optimization) 7 | ifndef DEBUG 8 | DEBUG = y 9 | endif 10 | 11 | #------------------------------------------------------------------------------ 12 | # Compiler flags 13 | #------------------------------------------------------------------------------ 14 | # Debug 15 | ifeq ($(DEBUG),n) 16 | CFLAGS += -O2 17 | else 18 | CFLAGS += -O0 -g3 19 | endif 20 | # warning flags 21 | CFLAGS += -Wall -Wstrict-prototypes -fno-strict-aliasing 22 | # use thread save versions 23 | CFLAGS += -D_GNU_SOURCE -pthread 24 | # Compiler includes 25 | CFLAGS += -I$(SYSROOT)/usr/include 26 | CFLAGS += -I$(SYSROOT)/usr/include/glib-2.0 27 | CFLAGS += -I$(SYSROOT)/usr/lib/glib-2.0/include 28 | 29 | ifndef force_link_static 30 | force_link_static := n 31 | endif 32 | 33 | #------------------------------------------------------------------------------ 34 | # Linker flags 35 | #------------------------------------------------------------------------------ 36 | LDFLAGS += -ldal -lglib-2.0 -lpthread -lgthread-2.0 -lffi -llibloader -ldl 37 | # usually, the linker prefers shared libaries. 38 | # E. g., if both shared and static version are available, the linker automatically 39 | # links against the shared libary. 40 | # Because that may not be wanted, force the linker to use the static library with the syntax below 41 | ifeq ($(force_link_static),y) 42 | LDFLAGS += -l:libkbus-register-settings.a 43 | else 44 | LDFLAGS += -lkbus-register-settings 45 | endif 46 | # Linker search directories 47 | EXTRALIBS += $(SYSROOT)/usr/lib/libdal.a 48 | 49 | #------------------------------------------------------------------------------ 50 | # Generate a object list from the source files 51 | #------------------------------------------------------------------------------ 52 | OBJ = $(SRC:.c=.o) 53 | 54 | #------------------------------------------------------------------------------ 55 | # Rules 56 | #------------------------------------------------------------------------------ 57 | 58 | all: $(EXE) 59 | 60 | install: 61 | cp $(EXE) $(DESTDIR)/usr/bin/ 62 | 63 | $(EXE): $(OBJ) 64 | $(CC) $(CFLAGS) $(OBJ) $(LDFLAGS) $(EXTRALIBS) -o $@ 65 | 66 | clean: 67 | @rm -f $(EXE) *.o 68 | -------------------------------------------------------------------------------- /HowTo_SplitAdminUser/README.md: -------------------------------------------------------------------------------- 1 | # HowTo split 'admin' user 2 | 3 | In firmware 19 and below, the user **admin** for codesys and the web based management *(wbm)* are two different users, which can be configured with different passwords. With firmware 20 and later, this is not the case anymore. This HowTo describes how to seperate those users again. 4 | 5 | To do so, three steps are necessary. 6 | 7 | 1. Revoke the group **wmbadmin** from the user **admin** 8 | ``` 9 | gruppen=$(groups admin | sed 's/wbmadmin //' | sed 's/ /,/g'); usermod --groups "${gruppen}" admin 10 | ``` 11 | 12 | 2. Forbid user **admin** to login with **ssh**. 13 | ``` 14 | usermod -s /sbin/nologin admin 15 | ``` 16 | 17 | 3. Create a new user with the group **wbmadmin**. This user will have admin rights in wbm. **testadmin** in this example. Do not forget to create a password. 18 | ``` 19 | useradd --groups wbmadmin testadmin 20 | passwd testadmin 21 | ``` 22 | Now you have two different users to access a PFC. User **admin** to upload an IEC-project and user **testadmin** to access the web based management with admin rights. Both users are linux users, but only testadmin can login with ssh. If both users need to login with ssh, ignore step 2. 23 | 24 | 25 | # Compatibility list: 26 | | PFC | Compatible | 27 | |:-------------|:------------:| 28 | | **PFC 100** | | 29 | | 750-8100 | Y | 30 | | 750-8101 | Y | 31 | | 750-8102 | Y | 32 | | | | 33 | | **PFC 200** | | 34 | | 750-8202 | Y | 35 | | 750-8203 | Y | 36 | | 750-8204 | Y | 37 | | 750-8206 | Y | 38 | | 750-8207 | Y | 39 | | 750-8208 | Y | 40 | | | | 41 | | **PFC 200 G2** | | 42 | | 750-8212 | Y | 43 | | 750-8213 | Y | 44 | | 750-8214 | Y | 45 | | 750-8216 | Y | -------------------------------------------------------------------------------- /HowTo_libkbus-register-settings/License: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 WAGO Kontakttechnik GmbH & Co. KG 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /HowTo_libkbus-register-settings/Makefile: -------------------------------------------------------------------------------- 1 | 2 | ifndef PTXPROJ_PATH 3 | PTXPROJ_PATH := ~/wago/ptxproj 4 | $(warning PTXPROJ_PATH is not set; assuming default of ~/wago/ptxproj) 5 | endif 6 | 7 | ifndef PTXPROJ_PLATFORM_DIR 8 | PTXPROJ_PLATFORM_DIR := platform-wago-pfcXXX 9 | endif 10 | 11 | all: copy 12 | 13 | build: 14 | @echo Building library with ptxdist: 15 | cd $(PTXPROJ_PATH) && ptxdist targetinstall libkbus-register-settings 16 | 17 | copy: build 18 | @echo Copying shared library and headers [if this fails, make sure both static and shared build is selected]: 19 | cp $(PTXPROJ_PATH)/$(PTXPROJ_PLATFORM_DIR)/sysroot-target/usr/lib/libkbus-register-settings.so* src/libkbus-register-settings-bin 20 | cp $(PTXPROJ_PATH)/$(PTXPROJ_PLATFORM_DIR)/sysroot-target/usr/lib/libkbus-register-settings.a src/libkbus-register-settings-bin 21 | cp $(PTXPROJ_PATH)/$(PTXPROJ_PLATFORM_DIR)/sysroot-target/usr/include/kbus_register_settings.h src/libkbus-register-settings-bin 22 | cp $(PTXPROJ_PATH)/$(PTXPROJ_PLATFORM_DIR)/sysroot-target/usr/include/kbus_register_settings_common.h src/libkbus-register-settings-bin 23 | # remove symlinked files (the wildcard variant + subsequent removal is used so that it's not needed to pin a specific library version for this makefile :p) 24 | rm src/libkbus-register-settings-bin/libkbus-register-settings.so 25 | rm src/libkbus-register-settings-bin/libkbus-register-settings.so.? 26 | 27 | clean: 28 | -rm src/libkbus-register-settings-bin/kbus_register_settings*.h 29 | -rm src/libkbus-register-settings-bin/libkbus-register-settings.a 30 | -rm src/libkbus-register-settings-bin/libkbus-register-settings.so* 31 | -------------------------------------------------------------------------------- /HowTo_libkbus-register-settings/README.md: -------------------------------------------------------------------------------- 1 | # libkbus-register-settings (bin) 2 | 3 | Precompiled version of kbus-register-settings. 4 | 5 | It is intended as a 1-to-1 replacement of the kbus-register-settings libary, 6 | and it ***cannot be used together with kbus-register-settings in one ptxdist project***. 7 | 8 | ## Thread Safety 9 | 10 | None. *Do not use the methods and structures across multiple threads*. 11 | 12 | ## Update from Source 13 | 14 | `make` in the top-level directory, with a ptxdist project configured to build the source version (both static and dynamic) of kbus-register-settings. 15 | The provided [makefile](./Makefile) automatically builds the kbus-register-settings package and copies the library and headers into the correct locations in this repository. 16 | Usually, the build files do not need to be changed. 17 | 18 | It is recommended to run the `clean` task before that (*warning*: The `clean` task ***will delete*** the previously copied library and headers). 19 | 20 | -------------------------------------------------------------------------------- /HowTo_libkbus-register-settings/rules/wago-libkbus-register-settings-bin.in: -------------------------------------------------------------------------------- 1 | ## SECTION=wago_specific 2 | 3 | config LIBKBUS_REGISTER_SETTINGS 4 | bool 5 | prompt "KBUS register access library (precompiled)" 6 | select DAL 7 | select LIBPACKBUS 8 | help 9 | C library for configuring serial terminals via adi/dal + libpackbus 10 | 11 | if LIBKBUS_REGISTER_SETTINGS 12 | config LIBKBUS_REGISTER_SETTINGS_SHARED 13 | bool 14 | default y 15 | prompt "install shared library" 16 | 17 | config LIBKBUS_REGISTER_SETTINGS_STATIC 18 | bool 19 | default n 20 | prompt "install static library" 21 | endif 22 | -------------------------------------------------------------------------------- /HowTo_libkbus-register-settings/rules/wago-libkbus-register-settings-bin.make: -------------------------------------------------------------------------------- 1 | # -*-makefile-*- 2 | 3 | # 4 | # We provide this package 5 | # 6 | PACKAGES-$(PTXCONF_LIBKBUS_REGISTER_SETTINGS) += libkbus-register-settings 7 | 8 | # 9 | # Paths and names 10 | # 11 | LIBKBUS_REGISTER_SETTINGS_VERSION := 0.2.0 12 | LIBKBUS_REGISTER_SETTINGS := libkbus-register-settings 13 | LIBKBUS_REGISTER_SETTINGS_URL := file://$(SRCDIR)/libkbus-register-settings-bin 14 | LIBKBUS_REGISTER_SETTINGS_DIR := $(BUILDDIR)/$(LIBKBUS_REGISTER_SETTINGS) 15 | LIBKBUS_REGISTER_SETTINGS_SOURCE := $(SRCDIR)/$(LIBKBUS_REGISTER_SETTINGS)-bin 16 | 17 | # we use a plain makefile 18 | LIBKBUS_REGISTER_SETTINGS_CONF_TOOL := NO 19 | 20 | LIBRARY_CONF := 21 | ifdef PTXCONF_LIBKBUS_REGISTER_SETTINGS_SHARED 22 | LIBRARY_CONF += build_shared=y 23 | else 24 | LIBRARY_CONF += build_shared=n 25 | endif 26 | ifdef PTXCONF_LIBKBUS_REGISTER_SETTINGS_STATIC 27 | LIBRARY_CONF += build_static=y 28 | else 29 | LIBRARY_CONF += build_static=n 30 | endif 31 | ifdef PTXCONF_LIBKBUS_REGISTER_SETTINGS_DEBUG 32 | LIBRARY_CONF += DEBUG=y 33 | else 34 | LIBRARY_CONF += DEBUG=n 35 | endif 36 | 37 | 38 | # explicitly move CROSS_ENV into MAKE_ENV, because ptxdist just doesn't do it ¯\_(ツ)_/¯ 39 | LIBKBUS_REGISTER_SETTINGS_MAKE_ENV := $(CROSS_ENV) 40 | 41 | # our own variables for the build: 42 | LIBKBUS_REGISTER_SETTINGS_MAKE_ENV += LIBKBUS_REGISTER_SETTINGS_VERSION=$(LIBKBUS_REGISTER_SETTINGS_VERSION) $(LIBRARY_CONF) 43 | 44 | # Get 45 | # ---------------------------------------------------------------------------- 46 | 47 | $(STATEDIR)/libkbus-register-settings.get: 48 | @$(call targetinfo, $@) 49 | @$(call touch, $@) 50 | 51 | # ---------------------------------------------------------------------------- 52 | # Extract 53 | # ---------------------------------------------------------------------------- 54 | 55 | $(STATEDIR)/libkbus-register-settings.extract: 56 | @$(call targetinfo, $@) 57 | @$(call clean, $(KBUS_REGISTER_SETTINGS_DIR)) 58 | cp -rd $(LIBKBUS_REGISTER_SETTINGS_SOURCE) $(LIBKBUS_REGISTER_SETTINGS_DIR) 59 | @$(call touch, $@) 60 | 61 | 62 | # use ptxdist defaults for prepare, compile and install 63 | 64 | $(STATEDIR)/libkbus-register-settings.targetinstall: 65 | @$(call targetinfo, $@) 66 | @$(call install_init, libkbus-register-settings) 67 | @$(call install_fixup,libkbus-register-settings,PRIORITY,optional) 68 | @$(call install_fixup,libkbus-register-settings,VERSION,$(LIBKBUS_REGISTER_SETTINGS_VERSION)) 69 | @$(call install_fixup,libkbus-register-settings,SECTION,base) 70 | @$(call install_fixup,libkbus-register-settings,AUTHOR,"cm") 71 | ifdef PTXCONF_LIBKBUS_REGISTER_SETTINGS_SHARED 72 | @$(call install_lib, libkbus-register-settings, 0, 0, 0755, libkbus-register-settings) 73 | endif 74 | @$(call install_finish,libkbus-register-settings) 75 | @$(call touch, $@) 76 | 77 | # vim: syntax=make 78 | -------------------------------------------------------------------------------- /HowTo_libkbus-register-settings/src/libkbus-register-settings-bin/.gitignore: -------------------------------------------------------------------------------- 1 | docs/ 2 | -------------------------------------------------------------------------------- /HowTo_libkbus-register-settings/src/libkbus-register-settings-bin/Makefile: -------------------------------------------------------------------------------- 1 | ifdef LIBKBUS_REGISTER_SETTINGS_VERSION 2 | VERSION := $(LIBKBUS_REGISTER_SETTINGS_VERSION) 3 | else 4 | $(error LIBKBUS_REGISTER_SETTINGS_VERSION not defined) 5 | endif 6 | MAJOR_VERSION := $(firstword $(subst ., ,$(VERSION))) 7 | 8 | STATIC_LIB = libkbus-register-settings.a 9 | DYN_LIB = libkbus-register-settings.so 10 | 11 | PUBLIC_API = kbus_register_settings.h kbus_register_settings_common.h 12 | 13 | #------------------------------------------------------------------------------ 14 | # Rules 15 | #------------------------------------------------------------------------------ 16 | 17 | ifndef build_static 18 | build_static := n 19 | endif 20 | ifndef build_shared 21 | build_shared := y 22 | endif 23 | 24 | ifeq ($(build_static),y) 25 | all: $(STATIC_LIB) 26 | install: $(STATIC_LIB) 27 | endif 28 | ifeq ($(build_shared),y) 29 | all: $(DYN_LIB).$(VERSION) 30 | install: $(DYN_LIB).$(VERSION) 31 | endif 32 | 33 | # no need to build anything here, since it's already compiled 34 | 35 | install: 36 | cp $(PUBLIC_API) $(DESTDIR)/usr/include/ 37 | ifeq ($(build_static),y) 38 | cp $(STATIC_LIB) $(DESTDIR)/usr/lib/ 39 | endif 40 | ifeq ($(build_shared),y) 41 | cp $(DYN_LIB).$(VERSION) $(DESTDIR)/usr/lib/ 42 | ln -s $(DESTDIR)/usr/lib/$(DYN_LIB).$(VERSION) $(DESTDIR)/usr/lib/$(DYN_LIB) 43 | ln -s $(DESTDIR)/usr/lib/$(DYN_LIB).$(VERSION) $(DESTDIR)/usr/lib/$(DYN_LIB).$(MAJOR_VERSION) 44 | endif 45 | 46 | clean: 47 | @rm -f $(DYN_LIB)* $(STATIC_LIB) 48 | -------------------------------------------------------------------------------- /HowTo_libkbus-register-settings/src/libkbus-register-settings-bin/libkbus-register-settings.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WAGO/pfc-howtos/7830974caec0023016e8096fcbf968283904db24/HowTo_libkbus-register-settings/src/libkbus-register-settings-bin/libkbus-register-settings.a -------------------------------------------------------------------------------- /HowTo_libkbus-register-settings/src/libkbus-register-settings-bin/libkbus-register-settings.so.0.2.0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WAGO/pfc-howtos/7830974caec0023016e8096fcbf968283904db24/HowTo_libkbus-register-settings/src/libkbus-register-settings-bin/libkbus-register-settings.so.0.2.0 -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # This repo includes all the HowTos available for PFC 2 | 3 | # Overview of existing HowTos 4 | 5 | | Name | for Version | Description | 6 | | :--------------------------------- | :---------- | :---------- | 7 | | AccessRetainVariables | FW17 | Accessing retain variables using C or C++ | 8 | | AddPerfTool | FW12 | Adding perf tool | 9 | | AddTRDP | FW12 | Adding TRDP/TCNopen | 10 | | AddSQLiteCommandLineTool | FW12 | Install the command-Line-Tool "sqlite3"| 11 | | ADI-MyKBusApplikation | FW12 | Demo C Application for KBUS | 12 | | ADI-DALwithSerialTerminal750-652 | FW20.1 | Utilize serial terminal 750-652 via DAL/ADI | 13 | | AutoCopySD-CardImage2InternalFlash | FW12 | Automaticaly copies SD card image to internal flash | 14 | | BuildRustExecutables | FW17 | Cross-compile RUST executables | 15 | | Certmonger | FW20.1 | Daemon monitors certificates for impending expiration | 16 | | HowTo_GenerateWUPFile | FW12 | Generate WAGO-Upload-File | 17 | | KbusModbusSlave | FW14 | Adding KbusModbusSlave | 18 | | Mono | FW14 | Mono is a runtime implementation| 19 | | mosquittoBroker | FW12.1 | Adding a Mosquitto Broker | 20 | | OpenDDS | FW18 | Open source C++ implementation of DDS | 21 | | ReadOperatingModeSwitches | FW12 | Reads out the switch position | 22 | | Ser2Net | FW13 | Serial to Network Proxy | 23 | | ZeroMQ | FW18 | High-performance asynchronous messaging library | 24 | | Libkbus-register-settings | FW20.1 | Precompiled version of kbus-register-settings | 25 | | Register-access-65x-demo | FW20.1 | Demo usage of the `libkbus-register-settings` library | 26 | | AddUserOrGroup | FW20 | Add a user or a group in different FW-versions | 27 | | SplitAdminUser | FW20 | Seperate admin user for codesys3 and wbm | 28 | 29 | --- 30 | 31 | You will find in any specific HowTo a dedicaded README.md which included a table that shows you the compatibiliy 32 | of this how to. 33 | 34 | For example: 35 | 36 | | PFC | Compatible | 37 | |:-------------|:------------:| 38 | | **PFC 100** | | 39 | | 750-8100 | Y | 40 | | 750-8101 | Y | 41 | | 750-8102 | Y | 42 | | | | 43 | | **PFC 200** | | 44 | | 750-8202 | Y | 45 | | 750-8203 | Y | 46 | | 750-8204 | Y | 47 | | 750-8206 | Y | 48 | | 750-8207 | Y | 49 | | 750-8208 | Y | 50 | | | | 51 | | **PFC 200 G2** | | 52 | | 750-8212 | Y | 53 | | 750-8213 | Y | 54 | | 750-8214 | Y | 55 | | 750-8216 | Y | 56 | 57 | Also you will find a version information that show exactly the firmware version on which this 58 | Howto was created. This means if you will find an older HowTo for a newer firmware it might 59 | require a little extra effort to transfer it to the actual firmware version. 60 | Pleasw keep in mind that some HowTos includes a precompiled package. Those could work on older versions but we recommend to recompile them within the actual firmware. 61 | 62 | A version Information looks like this: 63 | 64 | 65 | --- 66 | **HowTo XY - For Version BSP2017.17.1** 67 | 68 | --- 69 | 70 | Inside the HowTo directory you will find for older HowTos a **HowTo_XY.txt** file. This file contains a setup guide and provides some extra informations. 71 | 72 | 73 | --------------------------------------------------------------------------------