├── .cproject ├── .editorconfig ├── .gitignore ├── .project ├── AUTHORS ├── CHANGELOG ├── CMakeLists.txt ├── README.md ├── config ├── CMakeLists.txt ├── FreeRTOSConfig.h ├── lwipopts.h └── parametres.txt ├── dev ├── CMakeLists.txt ├── include │ ├── 24AAxx.h │ ├── display.h │ ├── graphics.h │ └── st7735.h └── src │ ├── 24AAxx.c │ ├── display.c │ ├── graphics.c │ └── st7735.c ├── drivers ├── CMakeLists.txt ├── include │ ├── beep.h │ ├── bitbanding.h │ ├── board.h │ ├── clock.h │ ├── drivers.h │ ├── enco.h │ ├── gpio.h │ ├── i2c.h │ ├── key.h │ ├── ledpwm.h │ ├── pvd.h │ ├── rng.h │ ├── rtc.h │ ├── spi.h │ ├── stm32f4x7_eth.h │ ├── stm32f4x7_eth_bsp.h │ ├── stm32f4x7_eth_conf.h │ ├── uart.h │ └── uniqueDeviceId.h └── src │ ├── beep.c │ ├── clock.c │ ├── drivers.c │ ├── enco.c │ ├── gpio.c │ ├── i2c.c │ ├── key.c │ ├── ledpwm.c │ ├── pvd.c │ ├── rng.c │ ├── rtc.c │ ├── spi.c │ ├── stm32f4x7_eth.c │ ├── stm32f4x7_eth_bsp.c │ ├── uart.c │ └── uniqueDeviceId.c ├── embeddedfiles.cmake ├── lib ├── CMSIS │ ├── CMakeLists.txt │ ├── Device │ │ └── ST │ │ │ └── STM32F4xx │ │ │ ├── Include │ │ │ ├── stm32f401xc.h │ │ │ ├── stm32f401xe.h │ │ │ ├── stm32f405xx.h │ │ │ ├── stm32f407xx.h │ │ │ ├── stm32f410cx.h │ │ │ ├── stm32f410rx.h │ │ │ ├── stm32f410tx.h │ │ │ ├── stm32f411xe.h │ │ │ ├── stm32f412cx.h │ │ │ ├── stm32f412rx.h │ │ │ ├── stm32f412vx.h │ │ │ ├── stm32f412zx.h │ │ │ ├── stm32f413xx.h │ │ │ ├── stm32f415xx.h │ │ │ ├── stm32f417xx.h │ │ │ ├── stm32f423xx.h │ │ │ ├── stm32f427xx.h │ │ │ ├── stm32f429xx.h │ │ │ ├── stm32f437xx.h │ │ │ ├── stm32f439xx.h │ │ │ ├── stm32f446xx.h │ │ │ ├── stm32f469xx.h │ │ │ ├── stm32f479xx.h │ │ │ ├── stm32f4xx.h │ │ │ └── system_stm32f4xx.h │ │ │ └── Source │ │ │ └── Templates │ │ │ └── system_stm32f4xx.c │ └── Include │ │ ├── cmsis_armcc.h │ │ ├── cmsis_armclang.h │ │ ├── cmsis_compiler.h │ │ ├── cmsis_gcc.h │ │ ├── cmsis_iccarm.h │ │ ├── cmsis_version.h │ │ ├── core_armv8mbl.h │ │ ├── core_armv8mml.h │ │ ├── core_cm0.h │ │ ├── core_cm0plus.h │ │ ├── core_cm1.h │ │ ├── core_cm23.h │ │ ├── core_cm3.h │ │ ├── core_cm33.h │ │ ├── core_cm4.h │ │ ├── core_cm7.h │ │ ├── core_sc000.h │ │ ├── core_sc300.h │ │ ├── mpu_armv7.h │ │ ├── mpu_armv8.h │ │ └── tz_context.h ├── IQmathLib-cm4 │ ├── CMakeLists.txt │ ├── IQmathLib-cm4.a │ └── include │ │ └── IQmathLib.h ├── freertos │ ├── CMakeLists.txt │ ├── include │ │ ├── FreeRTOS.h │ │ ├── StackMacros.h │ │ ├── atomic.h │ │ ├── croutine.h │ │ ├── deprecated_definitions.h │ │ ├── event_groups.h │ │ ├── list.h │ │ ├── message_buffer.h │ │ ├── mpu_prototypes.h │ │ ├── mpu_wrappers.h │ │ ├── portable.h │ │ ├── portmacro.h │ │ ├── projdefs.h │ │ ├── queue.h │ │ ├── semphr.h │ │ ├── stack_macros.h │ │ ├── stdint.readme │ │ ├── stream_buffer.h │ │ ├── task.h │ │ └── timers.h │ └── src │ │ ├── History.txt │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── croutine.c │ │ ├── event_groups.c │ │ ├── heap_4.c │ │ ├── list.c │ │ ├── port.c │ │ ├── queue.c │ │ ├── stream_buffer.c │ │ ├── tasks.c │ │ └── timers.c └── lwip │ ├── CMakeLists.txt │ ├── lwip-STABLE-2_2_0_RELEASE │ ├── BUILDING │ ├── CHANGELOG │ ├── CMakeLists.txt │ ├── COPYING │ ├── FEATURES │ ├── FILES │ ├── README │ ├── UPGRADING │ ├── codespell_changed_files.sh │ ├── codespell_check.sh │ ├── contrib │ │ ├── Coverity │ │ │ └── coverity.c │ │ ├── Filelists.cmake │ │ ├── Filelists.mk │ │ ├── addons │ │ │ ├── dhcp_extra_opts │ │ │ │ ├── README │ │ │ │ ├── dhcp_extra_opts.c │ │ │ │ └── dhcp_extra_opts.h │ │ │ ├── ipv6_static_routing │ │ │ │ ├── README │ │ │ │ ├── ip6_route_table.c │ │ │ │ └── ip6_route_table.h │ │ │ ├── netconn │ │ │ │ └── external_resolve │ │ │ │ │ ├── dnssd.c │ │ │ │ │ └── dnssd.h │ │ │ ├── tcp_isn │ │ │ │ ├── tcp_isn.c │ │ │ │ └── tcp_isn.h │ │ │ └── tcp_md5 │ │ │ │ ├── README │ │ │ │ ├── tcp_md5.c │ │ │ │ └── tcp_md5.h │ │ ├── apps │ │ │ ├── LwipMibCompiler │ │ │ │ ├── CCodeGeneration │ │ │ │ │ ├── CCodeGeneration.csproj │ │ │ │ │ ├── CFile.cs │ │ │ │ │ ├── CGenerator.cs │ │ │ │ │ ├── Code.cs │ │ │ │ │ ├── CodeContainerBase.cs │ │ │ │ │ ├── CodeElement.cs │ │ │ │ │ ├── Comment.cs │ │ │ │ │ ├── EmptyLine.cs │ │ │ │ │ ├── Function.cs │ │ │ │ │ ├── FunctionDeclaration.cs │ │ │ │ │ ├── IfThenElse.cs │ │ │ │ │ ├── PP_If.cs │ │ │ │ │ ├── PP_Ifdef.cs │ │ │ │ │ ├── PP_Include.cs │ │ │ │ │ ├── PP_Macro.cs │ │ │ │ │ ├── PlainText.cs │ │ │ │ │ ├── Properties │ │ │ │ │ │ └── AssemblyInfo.cs │ │ │ │ │ ├── Switch.cs │ │ │ │ │ ├── VariableDeclaration.cs │ │ │ │ │ ├── VariablePrototype.cs │ │ │ │ │ └── VariableType.cs │ │ │ │ ├── LwipMibCompiler.sln │ │ │ │ ├── LwipMibCompiler │ │ │ │ │ ├── LwipMibCompiler.csproj │ │ │ │ │ ├── Program.cs │ │ │ │ │ ├── Properties │ │ │ │ │ │ └── AssemblyInfo.cs │ │ │ │ │ └── app.config │ │ │ │ ├── LwipSnmpCodeGeneration │ │ │ │ │ ├── IRestriction.cs │ │ │ │ │ ├── LwipSnmp.cs │ │ │ │ │ ├── LwipSnmpCodeGeneration.csproj │ │ │ │ │ ├── MibCFile.cs │ │ │ │ │ ├── MibHeaderFile.cs │ │ │ │ │ ├── Properties │ │ │ │ │ │ └── AssemblyInfo.cs │ │ │ │ │ ├── SnmpMib.cs │ │ │ │ │ ├── SnmpNode.cs │ │ │ │ │ ├── SnmpScalarAggregationNode.cs │ │ │ │ │ ├── SnmpScalarArrayNode.cs │ │ │ │ │ ├── SnmpScalarNode.cs │ │ │ │ │ ├── SnmpScalarNodeBits.cs │ │ │ │ │ ├── SnmpScalarNodeCounter64.cs │ │ │ │ │ ├── SnmpScalarNodeInt.cs │ │ │ │ │ ├── SnmpScalarNodeObjectIdentifier.cs │ │ │ │ │ ├── SnmpScalarNodeOctetString.cs │ │ │ │ │ ├── SnmpScalarNodeTruthValue.cs │ │ │ │ │ ├── SnmpScalarNodeUint.cs │ │ │ │ │ ├── SnmpTableNode.cs │ │ │ │ │ └── SnmpTreeNode.cs │ │ │ │ ├── MibViewer │ │ │ │ │ ├── FormMain.Designer.cs │ │ │ │ │ ├── FormMain.cs │ │ │ │ │ ├── FormMain.resx │ │ │ │ │ ├── MibViewer.csproj │ │ │ │ │ ├── Program.cs │ │ │ │ │ ├── Properties │ │ │ │ │ │ ├── AssemblyInfo.cs │ │ │ │ │ │ ├── Resources.Designer.cs │ │ │ │ │ │ ├── Resources.resx │ │ │ │ │ │ ├── Settings.Designer.cs │ │ │ │ │ │ └── Settings.settings │ │ │ │ │ └── app.config │ │ │ │ ├── Mibs │ │ │ │ │ ├── IANA-ADDRESS-FAMILY-NUMBERS-MIB │ │ │ │ │ ├── IANA-CHARSET-MIB │ │ │ │ │ ├── IANA │ │ │ │ │ │ ├── IANA-ITU-ALARM-TC-MIB │ │ │ │ │ │ ├── IANA-LANGUAGE-MIB │ │ │ │ │ │ ├── IANA-MALLOC-MIB │ │ │ │ │ │ ├── IANA-MAU-MIB │ │ │ │ │ │ ├── IANA-PRINTER-MIB │ │ │ │ │ │ ├── IANA-RTPROTO-MIB │ │ │ │ │ │ ├── IANATn3270eTC-MIB │ │ │ │ │ │ └── IANAifType-MIB │ │ │ │ │ ├── IF-MIB │ │ │ │ │ ├── INET-ADDRESS-MIB │ │ │ │ │ ├── IP-MIB │ │ │ │ │ ├── RFC-1212 │ │ │ │ │ ├── RFC-1215 │ │ │ │ │ ├── RFC1065-SMI │ │ │ │ │ ├── RFC1155-SMI │ │ │ │ │ ├── RFC1158-MIB │ │ │ │ │ ├── RFC1213-MIB │ │ │ │ │ ├── SNMPv2-CONF │ │ │ │ │ ├── SNMPv2-MIB │ │ │ │ │ ├── SNMPv2-SMI │ │ │ │ │ ├── SNMPv2-TC │ │ │ │ │ ├── SNMPv2-TM │ │ │ │ │ ├── TCP-MIB │ │ │ │ │ └── UDP-MIB │ │ │ │ ├── SharpSnmpLib │ │ │ │ │ ├── Mib │ │ │ │ │ │ ├── DisplayHint.cs │ │ │ │ │ │ ├── Elements │ │ │ │ │ │ │ ├── Entities │ │ │ │ │ │ │ │ ├── AgentCapabilities.cs │ │ │ │ │ │ │ │ ├── EntityBase.cs │ │ │ │ │ │ │ │ ├── IEntity.cs │ │ │ │ │ │ │ │ ├── ModuleCompliance.cs │ │ │ │ │ │ │ │ ├── ModuleIdentity.cs │ │ │ │ │ │ │ │ ├── NotificationGroup.cs │ │ │ │ │ │ │ │ ├── NotificationType.cs │ │ │ │ │ │ │ │ ├── ObjectGroup.cs │ │ │ │ │ │ │ │ ├── ObjectIdentity.cs │ │ │ │ │ │ │ │ ├── ObjectType.cs │ │ │ │ │ │ │ │ └── OidValueAssignment.cs │ │ │ │ │ │ │ ├── Exports.cs │ │ │ │ │ │ │ ├── IDeclaration.cs │ │ │ │ │ │ │ ├── IElement.cs │ │ │ │ │ │ │ ├── ITypeReferrer.cs │ │ │ │ │ │ │ ├── Imports.cs │ │ │ │ │ │ │ ├── ImportsFrom.cs │ │ │ │ │ │ │ ├── TrapType.cs │ │ │ │ │ │ │ └── Types │ │ │ │ │ │ │ │ ├── BaseType.cs │ │ │ │ │ │ │ │ ├── BitsType.cs │ │ │ │ │ │ │ │ ├── Choice.cs │ │ │ │ │ │ │ │ ├── ITypeAssignment.cs │ │ │ │ │ │ │ │ ├── IntegerType.cs │ │ │ │ │ │ │ │ ├── IpAddressType.cs │ │ │ │ │ │ │ │ ├── Macro.cs │ │ │ │ │ │ │ │ ├── ObjectIdentifierType.cs │ │ │ │ │ │ │ │ ├── OctetStringType.cs │ │ │ │ │ │ │ │ ├── OpaqueType.cs │ │ │ │ │ │ │ │ ├── Sequence.cs │ │ │ │ │ │ │ │ ├── SequenceOf.cs │ │ │ │ │ │ │ │ ├── TextualConvention.cs │ │ │ │ │ │ │ │ ├── TypeAssignment.cs │ │ │ │ │ │ │ │ └── UnsignedType.cs │ │ │ │ │ │ ├── IModule.cs │ │ │ │ │ │ ├── ISymbolEnumerator.cs │ │ │ │ │ │ ├── Lexer.cs │ │ │ │ │ │ ├── MaxAccess.cs │ │ │ │ │ │ ├── MibDocument.cs │ │ │ │ │ │ ├── MibException.cs │ │ │ │ │ │ ├── MibModule.cs │ │ │ │ │ │ ├── MibResolver.cs │ │ │ │ │ │ ├── MibTree.cs │ │ │ │ │ │ ├── MibTreeNode.cs │ │ │ │ │ │ ├── MibTypesResolver.cs │ │ │ │ │ │ ├── ObjectIdentifier.cs │ │ │ │ │ │ ├── Status.cs │ │ │ │ │ │ ├── Symbol.cs │ │ │ │ │ │ ├── SymbolList.cs │ │ │ │ │ │ ├── ValueMap.cs │ │ │ │ │ │ └── ValueRange.cs │ │ │ │ │ ├── Properties │ │ │ │ │ │ ├── AssemblyInfo.cs │ │ │ │ │ │ ├── Resources.Designer.cs │ │ │ │ │ │ └── Resources.resx │ │ │ │ │ ├── SharpSnmpLib.Mib.csproj │ │ │ │ │ ├── license.txt │ │ │ │ │ ├── readme.txt │ │ │ │ │ └── sharpsnmplib.snk │ │ │ │ └── example │ │ │ │ │ ├── compile_udp_mib.cmd │ │ │ │ │ └── compile_udp_mib.sh │ │ │ ├── chargen │ │ │ │ ├── README │ │ │ │ ├── chargen.c │ │ │ │ └── chargen.h │ │ │ ├── httpserver │ │ │ │ ├── README │ │ │ │ ├── httpserver-netconn.c │ │ │ │ └── httpserver-netconn.h │ │ │ ├── netio │ │ │ │ ├── netio.c │ │ │ │ └── netio.h │ │ │ ├── ping │ │ │ │ ├── ping.c │ │ │ │ └── ping.h │ │ │ ├── rtp │ │ │ │ ├── rtp.c │ │ │ │ ├── rtp.h │ │ │ │ └── rtpdata.h │ │ │ ├── shell │ │ │ │ ├── shell.c │ │ │ │ └── shell.h │ │ │ ├── socket_examples │ │ │ │ ├── socket_examples.c │ │ │ │ └── socket_examples.h │ │ │ ├── tcpecho │ │ │ │ ├── tcpecho.c │ │ │ │ └── tcpecho.h │ │ │ ├── tcpecho_raw │ │ │ │ ├── tcpecho_raw.c │ │ │ │ └── tcpecho_raw.h │ │ │ ├── udpecho │ │ │ │ ├── udpecho.c │ │ │ │ └── udpecho.h │ │ │ └── udpecho_raw │ │ │ │ ├── udpecho_raw.c │ │ │ │ └── udpecho_raw.h │ │ ├── examples │ │ │ ├── ethernetif │ │ │ │ └── ethernetif.c │ │ │ ├── example_app │ │ │ │ ├── default_netif.h │ │ │ │ ├── lwipcfg.h.ci │ │ │ │ ├── lwipcfg.h.example │ │ │ │ ├── lwipopts.h │ │ │ │ ├── lwippools.h │ │ │ │ ├── ppp_settings.h │ │ │ │ ├── test.c │ │ │ │ └── test_configs │ │ │ │ │ ├── opt_default.h │ │ │ │ │ ├── opt_dualstack.h │ │ │ │ │ ├── opt_ipv4only.h │ │ │ │ │ ├── opt_ipv6only.h │ │ │ │ │ ├── opt_no_tcp_dualstack.h │ │ │ │ │ ├── opt_no_tcp_ipv4only.h │ │ │ │ │ ├── opt_no_tcp_ipv6only.h │ │ │ │ │ ├── opt_no_udp_dualstack.h │ │ │ │ │ ├── opt_no_udp_ipv4only.h │ │ │ │ │ ├── opt_no_udp_ipv6only.h │ │ │ │ │ ├── opt_none.h │ │ │ │ │ ├── opt_nosys_dual.h │ │ │ │ │ ├── opt_nosys_ipv4.h │ │ │ │ │ └── opt_nosys_ipv6.h │ │ │ ├── httpd │ │ │ │ ├── cgi_example │ │ │ │ │ ├── cgi_example.c │ │ │ │ │ └── cgi_example.h │ │ │ │ ├── examples_fs │ │ │ │ │ ├── 404.html │ │ │ │ │ ├── img │ │ │ │ │ │ └── sics.gif │ │ │ │ │ ├── index.html │ │ │ │ │ ├── login.html │ │ │ │ │ ├── loginfail.html │ │ │ │ │ ├── session.html │ │ │ │ │ └── ssi.shtml │ │ │ │ ├── examples_fsdata.c │ │ │ │ ├── fs_example │ │ │ │ │ ├── fs_example.c │ │ │ │ │ └── fs_example.h │ │ │ │ ├── genfiles_example │ │ │ │ │ ├── genfiles_example.c │ │ │ │ │ └── genfiles_example.h │ │ │ │ ├── https_example │ │ │ │ │ ├── https_example.c │ │ │ │ │ └── https_example.h │ │ │ │ ├── post_example │ │ │ │ │ └── post_example.c │ │ │ │ └── ssi_example │ │ │ │ │ ├── ssi_example.c │ │ │ │ │ └── ssi_example.h │ │ │ ├── lwiperf │ │ │ │ ├── lwiperf_example.c │ │ │ │ └── lwiperf_example.h │ │ │ ├── mdns │ │ │ │ ├── mdns_example.c │ │ │ │ └── mdns_example.h │ │ │ ├── mqtt │ │ │ │ ├── mqtt_example.c │ │ │ │ └── mqtt_example.h │ │ │ ├── ppp │ │ │ │ ├── pppos_example.c │ │ │ │ └── pppos_example.h │ │ │ ├── snmp │ │ │ │ ├── snmp_example.c │ │ │ │ ├── snmp_example.h │ │ │ │ ├── snmp_private_mib │ │ │ │ │ ├── lwip_prvmib.c │ │ │ │ │ └── private_mib.h │ │ │ │ └── snmp_v3 │ │ │ │ │ ├── snmpv3_dummy.c │ │ │ │ │ └── snmpv3_dummy.h │ │ │ ├── sntp │ │ │ │ ├── sntp_example.c │ │ │ │ └── sntp_example.h │ │ │ └── tftp │ │ │ │ ├── tftp_example.c │ │ │ │ └── tftp_example.h │ │ └── ports │ │ │ ├── CMakeCommon.cmake │ │ │ ├── Common.allports.mk │ │ │ ├── freertos │ │ │ ├── include │ │ │ │ └── arch │ │ │ │ │ └── sys_arch.h │ │ │ └── sys_arch.c │ │ │ ├── unix │ │ │ ├── Common.mk │ │ │ ├── Filelists.cmake │ │ │ ├── README │ │ │ ├── check │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── Makefile │ │ │ │ ├── README │ │ │ │ └── config.h │ │ │ ├── example_app │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── Makefile │ │ │ │ ├── default_netif.c │ │ │ │ └── iteropts.sh │ │ │ ├── lib │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── README │ │ │ │ └── lwipopts.h │ │ │ ├── port │ │ │ │ ├── include │ │ │ │ │ ├── arch │ │ │ │ │ │ ├── cc.h │ │ │ │ │ │ ├── perf.h │ │ │ │ │ │ └── sys_arch.h │ │ │ │ │ └── netif │ │ │ │ │ │ ├── fifo.h │ │ │ │ │ │ ├── list.h │ │ │ │ │ │ ├── pcapif.h │ │ │ │ │ │ ├── sio.h │ │ │ │ │ │ ├── tapif.h │ │ │ │ │ │ └── vdeif.h │ │ │ │ ├── netif │ │ │ │ │ ├── fifo.c │ │ │ │ │ ├── list.c │ │ │ │ │ ├── pcapif.c │ │ │ │ │ ├── sio.c │ │ │ │ │ ├── tapif.c │ │ │ │ │ └── vdeif.c │ │ │ │ ├── perf.c │ │ │ │ └── sys_arch.c │ │ │ ├── posixlib │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── Uninstall.cmake │ │ │ │ ├── include │ │ │ │ │ └── posix │ │ │ │ │ │ ├── inet.h │ │ │ │ │ │ └── sockets.h │ │ │ │ └── lwipopts.h │ │ │ └── setup-tapif │ │ │ └── win32 │ │ │ ├── Common.mk │ │ │ ├── Filelists.cmake │ │ │ ├── check │ │ │ ├── check_stdint.h │ │ │ ├── config.h │ │ │ ├── stdbool.h │ │ │ ├── sys │ │ │ │ └── time.h │ │ │ ├── time.c │ │ │ └── unistd.h │ │ │ ├── example_app │ │ │ ├── CMakeLists.txt │ │ │ ├── Makefile │ │ │ └── default_netif.c │ │ │ ├── include │ │ │ └── arch │ │ │ │ ├── bpstruct.h │ │ │ │ ├── cc.h │ │ │ │ ├── epstruct.h │ │ │ │ ├── perf.h │ │ │ │ └── sys_arch.h │ │ │ ├── msvc │ │ │ ├── build_coverity.cmd │ │ │ ├── libcheck.vcxproj │ │ │ ├── libcheck.vcxproj.filters │ │ │ ├── lwIP.vcxproj │ │ │ ├── lwIP.vcxproj.filters │ │ │ ├── lwIP_Test.sln │ │ │ ├── lwIP_Test.vcxproj │ │ │ ├── lwIP_Test.vcxproj.filters │ │ │ ├── lwIP_pcapif.vcxproj │ │ │ ├── lwIP_pcapif.vcxproj.filters │ │ │ ├── lwIP_unittests.sln │ │ │ ├── lwip_unittests.vcxproj │ │ │ ├── lwip_unittests.vcxproj.filters │ │ │ ├── makefsdata.vcxproj │ │ │ └── makefsdata.vcxproj.filters │ │ │ ├── pcapif.c │ │ │ ├── pcapif.h │ │ │ ├── pcapif_helper.c │ │ │ ├── pcapif_helper.h │ │ │ ├── readme.txt │ │ │ ├── sio.c │ │ │ └── sys_arch.c │ ├── doc │ │ ├── FILES │ │ ├── NO_SYS_SampleCode.c │ │ ├── ZeroCopyRx.c │ │ ├── contrib.txt │ │ ├── doxygen │ │ │ ├── generate.bat │ │ │ ├── generate.sh │ │ │ ├── lwip.Doxyfile │ │ │ ├── lwip.Doxyfile.cmake.in │ │ │ ├── main_page.h │ │ │ └── output │ │ │ │ └── index.html │ │ ├── mdns.txt │ │ ├── mqtt_client.txt │ │ ├── ppp.txt │ │ └── savannah.txt │ ├── src │ │ ├── FILES │ │ ├── Filelists.cmake │ │ ├── Filelists.mk │ │ ├── api │ │ │ ├── api_lib.c │ │ │ ├── api_msg.c │ │ │ ├── err.c │ │ │ ├── if_api.c │ │ │ ├── netbuf.c │ │ │ ├── netdb.c │ │ │ ├── netifapi.c │ │ │ ├── sockets.c │ │ │ └── tcpip.c │ │ ├── apps │ │ │ ├── altcp_tls │ │ │ │ ├── altcp_tls_mbedtls.c │ │ │ │ ├── altcp_tls_mbedtls_mem.c │ │ │ │ ├── altcp_tls_mbedtls_mem.h │ │ │ │ └── altcp_tls_mbedtls_structs.h │ │ │ ├── http │ │ │ │ ├── altcp_proxyconnect.c │ │ │ │ ├── fs.c │ │ │ │ ├── fs │ │ │ │ │ ├── 404.html │ │ │ │ │ ├── img │ │ │ │ │ │ └── sics.gif │ │ │ │ │ └── index.html │ │ │ │ ├── fsdata.c │ │ │ │ ├── fsdata.h │ │ │ │ ├── http_client.c │ │ │ │ ├── httpd.c │ │ │ │ ├── httpd_structs.h │ │ │ │ └── makefsdata │ │ │ │ │ ├── makefsdata │ │ │ │ │ ├── makefsdata.c │ │ │ │ │ ├── readme.txt │ │ │ │ │ └── tinydir.h │ │ │ ├── lwiperf │ │ │ │ └── lwiperf.c │ │ │ ├── mdns │ │ │ │ ├── mdns.c │ │ │ │ ├── mdns_domain.c │ │ │ │ └── mdns_out.c │ │ │ ├── mqtt │ │ │ │ └── mqtt.c │ │ │ ├── netbiosns │ │ │ │ └── netbiosns.c │ │ │ ├── smtp │ │ │ │ └── smtp.c │ │ │ ├── snmp │ │ │ │ ├── snmp_asn1.c │ │ │ │ ├── snmp_asn1.h │ │ │ │ ├── snmp_core.c │ │ │ │ ├── snmp_core_priv.h │ │ │ │ ├── snmp_mib2.c │ │ │ │ ├── snmp_mib2_icmp.c │ │ │ │ ├── snmp_mib2_interfaces.c │ │ │ │ ├── snmp_mib2_ip.c │ │ │ │ ├── snmp_mib2_snmp.c │ │ │ │ ├── snmp_mib2_system.c │ │ │ │ ├── snmp_mib2_tcp.c │ │ │ │ ├── snmp_mib2_udp.c │ │ │ │ ├── snmp_msg.c │ │ │ │ ├── snmp_msg.h │ │ │ │ ├── snmp_netconn.c │ │ │ │ ├── snmp_pbuf_stream.c │ │ │ │ ├── snmp_pbuf_stream.h │ │ │ │ ├── snmp_raw.c │ │ │ │ ├── snmp_scalar.c │ │ │ │ ├── snmp_snmpv2_framework.c │ │ │ │ ├── snmp_snmpv2_usm.c │ │ │ │ ├── snmp_table.c │ │ │ │ ├── snmp_threadsync.c │ │ │ │ ├── snmp_traps.c │ │ │ │ ├── snmpv3.c │ │ │ │ ├── snmpv3_mbedtls.c │ │ │ │ └── snmpv3_priv.h │ │ │ ├── sntp │ │ │ │ └── sntp.c │ │ │ └── tftp │ │ │ │ └── tftp.c │ │ ├── core │ │ │ ├── altcp.c │ │ │ ├── altcp_alloc.c │ │ │ ├── altcp_tcp.c │ │ │ ├── def.c │ │ │ ├── dns.c │ │ │ ├── inet_chksum.c │ │ │ ├── init.c │ │ │ ├── ip.c │ │ │ ├── ipv4 │ │ │ │ ├── acd.c │ │ │ │ ├── autoip.c │ │ │ │ ├── dhcp.c │ │ │ │ ├── etharp.c │ │ │ │ ├── icmp.c │ │ │ │ ├── igmp.c │ │ │ │ ├── ip4.c │ │ │ │ ├── ip4_addr.c │ │ │ │ └── ip4_frag.c │ │ │ ├── ipv6 │ │ │ │ ├── dhcp6.c │ │ │ │ ├── ethip6.c │ │ │ │ ├── icmp6.c │ │ │ │ ├── inet6.c │ │ │ │ ├── ip6.c │ │ │ │ ├── ip6_addr.c │ │ │ │ ├── ip6_frag.c │ │ │ │ ├── mld6.c │ │ │ │ └── nd6.c │ │ │ ├── mem.c │ │ │ ├── memp.c │ │ │ ├── netif.c │ │ │ ├── pbuf.c │ │ │ ├── raw.c │ │ │ ├── stats.c │ │ │ ├── sys.c │ │ │ ├── tcp.c │ │ │ ├── tcp_in.c │ │ │ ├── tcp_out.c │ │ │ ├── timeouts.c │ │ │ └── udp.c │ │ ├── include │ │ │ ├── compat │ │ │ │ ├── posix │ │ │ │ │ ├── arpa │ │ │ │ │ │ └── inet.h │ │ │ │ │ ├── net │ │ │ │ │ │ └── if.h │ │ │ │ │ ├── netdb.h │ │ │ │ │ └── sys │ │ │ │ │ │ └── socket.h │ │ │ │ └── stdc │ │ │ │ │ └── errno.h │ │ │ ├── lwip │ │ │ │ ├── acd.h │ │ │ │ ├── altcp.h │ │ │ │ ├── altcp_tcp.h │ │ │ │ ├── altcp_tls.h │ │ │ │ ├── api.h │ │ │ │ ├── apps │ │ │ │ │ ├── FILES │ │ │ │ │ ├── altcp_proxyconnect.h │ │ │ │ │ ├── altcp_tls_mbedtls_opts.h │ │ │ │ │ ├── fs.h │ │ │ │ │ ├── http_client.h │ │ │ │ │ ├── httpd.h │ │ │ │ │ ├── httpd_opts.h │ │ │ │ │ ├── lwiperf.h │ │ │ │ │ ├── mdns.h │ │ │ │ │ ├── mdns_domain.h │ │ │ │ │ ├── mdns_opts.h │ │ │ │ │ ├── mdns_out.h │ │ │ │ │ ├── mdns_priv.h │ │ │ │ │ ├── mqtt.h │ │ │ │ │ ├── mqtt_opts.h │ │ │ │ │ ├── mqtt_priv.h │ │ │ │ │ ├── netbiosns.h │ │ │ │ │ ├── netbiosns_opts.h │ │ │ │ │ ├── smtp.h │ │ │ │ │ ├── smtp_opts.h │ │ │ │ │ ├── snmp.h │ │ │ │ │ ├── snmp_core.h │ │ │ │ │ ├── snmp_mib2.h │ │ │ │ │ ├── snmp_opts.h │ │ │ │ │ ├── snmp_scalar.h │ │ │ │ │ ├── snmp_snmpv2_framework.h │ │ │ │ │ ├── snmp_snmpv2_usm.h │ │ │ │ │ ├── snmp_table.h │ │ │ │ │ ├── snmp_threadsync.h │ │ │ │ │ ├── snmpv3.h │ │ │ │ │ ├── sntp.h │ │ │ │ │ ├── sntp_opts.h │ │ │ │ │ ├── tftp_client.h │ │ │ │ │ ├── tftp_common.h │ │ │ │ │ ├── tftp_opts.h │ │ │ │ │ └── tftp_server.h │ │ │ │ ├── arch.h │ │ │ │ ├── autoip.h │ │ │ │ ├── debug.h │ │ │ │ ├── def.h │ │ │ │ ├── dhcp.h │ │ │ │ ├── dhcp6.h │ │ │ │ ├── dns.h │ │ │ │ ├── err.h │ │ │ │ ├── errno.h │ │ │ │ ├── etharp.h │ │ │ │ ├── ethip6.h │ │ │ │ ├── icmp.h │ │ │ │ ├── icmp6.h │ │ │ │ ├── if_api.h │ │ │ │ ├── igmp.h │ │ │ │ ├── inet.h │ │ │ │ ├── inet_chksum.h │ │ │ │ ├── init.h │ │ │ │ ├── init.h.cmake.in │ │ │ │ ├── ip.h │ │ │ │ ├── ip4.h │ │ │ │ ├── ip4_addr.h │ │ │ │ ├── ip4_frag.h │ │ │ │ ├── ip6.h │ │ │ │ ├── ip6_addr.h │ │ │ │ ├── ip6_frag.h │ │ │ │ ├── ip6_zone.h │ │ │ │ ├── ip_addr.h │ │ │ │ ├── mem.h │ │ │ │ ├── memp.h │ │ │ │ ├── mld6.h │ │ │ │ ├── nd6.h │ │ │ │ ├── netbuf.h │ │ │ │ ├── netdb.h │ │ │ │ ├── netif.h │ │ │ │ ├── netifapi.h │ │ │ │ ├── opt.h │ │ │ │ ├── pbuf.h │ │ │ │ ├── priv │ │ │ │ │ ├── altcp_priv.h │ │ │ │ │ ├── api_msg.h │ │ │ │ │ ├── mem_priv.h │ │ │ │ │ ├── memp_priv.h │ │ │ │ │ ├── memp_std.h │ │ │ │ │ ├── nd6_priv.h │ │ │ │ │ ├── raw_priv.h │ │ │ │ │ ├── sockets_priv.h │ │ │ │ │ ├── tcp_priv.h │ │ │ │ │ └── tcpip_priv.h │ │ │ │ ├── prot │ │ │ │ │ ├── acd.h │ │ │ │ │ ├── autoip.h │ │ │ │ │ ├── dhcp.h │ │ │ │ │ ├── dhcp6.h │ │ │ │ │ ├── dns.h │ │ │ │ │ ├── etharp.h │ │ │ │ │ ├── ethernet.h │ │ │ │ │ ├── iana.h │ │ │ │ │ ├── icmp.h │ │ │ │ │ ├── icmp6.h │ │ │ │ │ ├── ieee.h │ │ │ │ │ ├── igmp.h │ │ │ │ │ ├── ip.h │ │ │ │ │ ├── ip4.h │ │ │ │ │ ├── ip6.h │ │ │ │ │ ├── mld6.h │ │ │ │ │ ├── nd6.h │ │ │ │ │ ├── tcp.h │ │ │ │ │ └── udp.h │ │ │ │ ├── raw.h │ │ │ │ ├── sio.h │ │ │ │ ├── snmp.h │ │ │ │ ├── sockets.h │ │ │ │ ├── stats.h │ │ │ │ ├── sys.h │ │ │ │ ├── tcp.h │ │ │ │ ├── tcpbase.h │ │ │ │ ├── tcpip.h │ │ │ │ ├── timeouts.h │ │ │ │ └── udp.h │ │ │ └── netif │ │ │ │ ├── bridgeif.h │ │ │ │ ├── bridgeif_opts.h │ │ │ │ ├── etharp.h │ │ │ │ ├── ethernet.h │ │ │ │ ├── ieee802154.h │ │ │ │ ├── lowpan6.h │ │ │ │ ├── lowpan6_ble.h │ │ │ │ ├── lowpan6_common.h │ │ │ │ ├── lowpan6_opts.h │ │ │ │ ├── ppp │ │ │ │ ├── ccp.h │ │ │ │ ├── chap-md5.h │ │ │ │ ├── chap-new.h │ │ │ │ ├── chap_ms.h │ │ │ │ ├── eap.h │ │ │ │ ├── ecp.h │ │ │ │ ├── eui64.h │ │ │ │ ├── fsm.h │ │ │ │ ├── ipcp.h │ │ │ │ ├── ipv6cp.h │ │ │ │ ├── lcp.h │ │ │ │ ├── magic.h │ │ │ │ ├── mppe.h │ │ │ │ ├── polarssl │ │ │ │ │ ├── arc4.h │ │ │ │ │ ├── des.h │ │ │ │ │ ├── md4.h │ │ │ │ │ ├── md5.h │ │ │ │ │ └── sha1.h │ │ │ │ ├── ppp.h │ │ │ │ ├── ppp_impl.h │ │ │ │ ├── ppp_opts.h │ │ │ │ ├── pppapi.h │ │ │ │ ├── pppcrypt.h │ │ │ │ ├── pppdebug.h │ │ │ │ ├── pppoe.h │ │ │ │ ├── pppol2tp.h │ │ │ │ ├── pppos.h │ │ │ │ ├── upap.h │ │ │ │ └── vj.h │ │ │ │ ├── slipif.h │ │ │ │ └── zepif.h │ │ └── netif │ │ │ ├── FILES │ │ │ ├── bridgeif.c │ │ │ ├── bridgeif_fdb.c │ │ │ ├── ethernet.c │ │ │ ├── lowpan6.c │ │ │ ├── lowpan6_ble.c │ │ │ ├── lowpan6_common.c │ │ │ ├── ppp │ │ │ ├── PPPD_FOLLOWUP │ │ │ ├── auth.c │ │ │ ├── ccp.c │ │ │ ├── chap-md5.c │ │ │ ├── chap-new.c │ │ │ ├── chap_ms.c │ │ │ ├── demand.c │ │ │ ├── eap.c │ │ │ ├── ecp.c │ │ │ ├── eui64.c │ │ │ ├── fsm.c │ │ │ ├── ipcp.c │ │ │ ├── ipv6cp.c │ │ │ ├── lcp.c │ │ │ ├── magic.c │ │ │ ├── mppe.c │ │ │ ├── multilink.c │ │ │ ├── polarssl │ │ │ │ ├── README │ │ │ │ ├── arc4.c │ │ │ │ ├── des.c │ │ │ │ ├── md4.c │ │ │ │ ├── md5.c │ │ │ │ └── sha1.c │ │ │ ├── ppp.c │ │ │ ├── pppapi.c │ │ │ ├── pppcrypt.c │ │ │ ├── pppoe.c │ │ │ ├── pppol2tp.c │ │ │ ├── pppos.c │ │ │ ├── upap.c │ │ │ ├── utils.c │ │ │ └── vj.c │ │ │ ├── slipif.c │ │ │ └── zepif.c │ └── test │ │ ├── fuzz │ │ ├── Makefile │ │ ├── README │ │ ├── config.h │ │ ├── fuzz.c │ │ ├── fuzz2.c │ │ ├── fuzz3.c │ │ ├── fuzz_common.c │ │ ├── fuzz_common.h │ │ ├── inputs │ │ │ ├── arp │ │ │ │ └── arp_req.bin │ │ │ ├── icmp │ │ │ │ └── icmp_ping.bin │ │ │ ├── ipv6 │ │ │ │ ├── neighbor_solicitation.bin │ │ │ │ └── router_adv.bin │ │ │ ├── tcp │ │ │ │ └── tcp_syn.bin │ │ │ └── udp │ │ │ │ └── udp_port_5000.bin │ │ ├── lwipopts.h │ │ └── output_to_pcap.sh │ │ ├── sockets │ │ ├── sockets_stresstest.c │ │ └── sockets_stresstest.h │ │ └── unit │ │ ├── Filelists.cmake │ │ ├── Filelists.mk │ │ ├── Makefile │ │ ├── api │ │ ├── test_sockets.c │ │ └── test_sockets.h │ │ ├── arch │ │ ├── sys_arch.c │ │ └── sys_arch.h │ │ ├── core │ │ ├── test_def.c │ │ ├── test_def.h │ │ ├── test_dns.c │ │ ├── test_dns.h │ │ ├── test_mem.c │ │ ├── test_mem.h │ │ ├── test_netif.c │ │ ├── test_netif.h │ │ ├── test_pbuf.c │ │ ├── test_pbuf.h │ │ ├── test_timers.c │ │ └── test_timers.h │ │ ├── dhcp │ │ ├── test_dhcp.c │ │ └── test_dhcp.h │ │ ├── etharp │ │ ├── test_etharp.c │ │ └── test_etharp.h │ │ ├── ip4 │ │ ├── test_ip4.c │ │ └── test_ip4.h │ │ ├── ip6 │ │ ├── test_ip6.c │ │ └── test_ip6.h │ │ ├── lwip_check.h │ │ ├── lwip_unittests.c │ │ ├── lwipopts.h │ │ ├── mdns │ │ ├── test_mdns.c │ │ └── test_mdns.h │ │ ├── mqtt │ │ ├── test_mqtt.c │ │ └── test_mqtt.h │ │ ├── ppp │ │ ├── test_pppos.c │ │ └── test_pppos.h │ │ ├── tcp │ │ ├── tcp_helper.c │ │ ├── tcp_helper.h │ │ ├── test_tcp.c │ │ ├── test_tcp.h │ │ ├── test_tcp_oos.c │ │ ├── test_tcp_oos.h │ │ ├── test_tcp_state.c │ │ └── test_tcp_state.h │ │ └── udp │ │ ├── test_udp.c │ │ └── test_udp.h │ └── port │ ├── ethernetif.c │ ├── ethernetif.h │ ├── include │ └── arch │ │ ├── bpstruct.h │ │ ├── cc.h │ │ ├── cpu.h │ │ ├── epstruct.h │ │ ├── perf.h │ │ ├── sys_arch.h │ │ └── timers.h │ └── sys_arch.c ├── libmodbus ├── .appveyor.yml ├── .dir-locals.el ├── .gitignore ├── .travis.yml ├── AUTHORS ├── CMakeLists.txt ├── COPYING.LESSER ├── MIGRATION ├── NEWS ├── README.md ├── doc │ ├── Makefile.am │ ├── asciidoc.conf │ ├── libmodbus.txt │ ├── modbus_close.txt │ ├── modbus_connect.txt │ ├── modbus_flush.txt │ ├── modbus_free.txt │ ├── modbus_get_byte_from_bits.txt │ ├── modbus_get_byte_timeout.txt │ ├── modbus_get_float.txt │ ├── modbus_get_float_abcd.txt │ ├── modbus_get_float_badc.txt │ ├── modbus_get_float_cdab.txt │ ├── modbus_get_float_dcba.txt │ ├── modbus_get_header_length.txt │ ├── modbus_get_indication_timeout.txt │ ├── modbus_get_response_timeout.txt │ ├── modbus_get_slave.txt │ ├── modbus_get_socket.txt │ ├── modbus_mapping_free.txt │ ├── modbus_mapping_new.txt │ ├── modbus_mapping_new_start_address.txt │ ├── modbus_mask_write_register.txt │ ├── modbus_new_rtu.txt │ ├── modbus_new_tcp.txt │ ├── modbus_new_tcp_pi.txt │ ├── modbus_read_bits.txt │ ├── modbus_read_input_bits.txt │ ├── modbus_read_input_registers.txt │ ├── modbus_read_registers.txt │ ├── modbus_receive.txt │ ├── modbus_receive_confirmation.txt │ ├── modbus_reply.txt │ ├── modbus_reply_exception.txt │ ├── modbus_report_slave_id.txt │ ├── modbus_rtu_get_rts.txt │ ├── modbus_rtu_get_rts_delay.txt │ ├── modbus_rtu_get_serial_mode.txt │ ├── modbus_rtu_set_custom_rts.txt │ ├── modbus_rtu_set_rts.txt │ ├── modbus_rtu_set_rts_delay.txt │ ├── modbus_rtu_set_serial_mode.txt │ ├── modbus_send_raw_request.txt │ ├── modbus_set_bits_from_byte.txt │ ├── modbus_set_bits_from_bytes.txt │ ├── modbus_set_byte_timeout.txt │ ├── modbus_set_debug.txt │ ├── modbus_set_error_recovery.txt │ ├── modbus_set_float.txt │ ├── modbus_set_float_abcd.txt │ ├── modbus_set_float_badc.txt │ ├── modbus_set_float_cdab.txt │ ├── modbus_set_float_dcba.txt │ ├── modbus_set_indication_timeout.txt │ ├── modbus_set_response_timeout.txt │ ├── modbus_set_slave.txt │ ├── modbus_set_socket.txt │ ├── modbus_strerror.txt │ ├── modbus_tcp_accept.txt │ ├── modbus_tcp_listen.txt │ ├── modbus_tcp_pi_accept.txt │ ├── modbus_tcp_pi_listen.txt │ ├── modbus_write_and_read_registers.txt │ ├── modbus_write_bit.txt │ ├── modbus_write_bits.txt │ ├── modbus_write_register.txt │ └── modbus_write_registers.txt ├── src │ ├── Makefile.am │ ├── config.h │ ├── modbus-data.c │ ├── modbus-private.h │ ├── modbus-rtu-private.h │ ├── modbus-rtu.c │ ├── modbus-rtu.h │ ├── modbus-tcp-private.h │ ├── modbus-tcp.c │ ├── modbus-tcp.h │ ├── modbus-version.h.in │ ├── modbus.c │ └── modbus.h └── tests │ ├── LICENSE │ ├── Makefile.am │ ├── README.md │ ├── bandwidth-client.c │ ├── bandwidth-server-many-up.c │ ├── bandwidth-server-one.c │ ├── random-test-client.c │ ├── random-test-server.c │ ├── unit-test-client.c │ ├── unit-test-server.c │ ├── unit-test.h.in │ ├── unit-tests.sh │ └── version.c ├── libmodbusport ├── CMakeLists.txt ├── modbusprint.c └── rtuport.c ├── main.cpp ├── net ├── CMakeLists.txt ├── include │ ├── htmlPage.h │ ├── httpServerTSK.h │ └── sntp.h ├── resource │ ├── 404.html │ ├── favicon.png │ ├── index.html │ ├── overall.js │ └── styles.css └── src │ ├── htmlPage.c │ ├── httpServerTSK.c │ └── sntp.c ├── prmsystem ├── .gitignore ├── CMakeLists.txt ├── include │ ├── prmSystem.h │ └── prmSystemCallback.h └── src │ ├── prmSystem.cpp │ └── prmSystemCallback.cpp ├── regulator ├── CMakeLists.txt ├── include │ └── regulatorConnTSK.h └── src │ ├── modbusServerTSK.c │ └── regulatorConnTSK.c ├── scripts ├── PS3604LF.launch ├── flash.sh ├── gdb-client.sh ├── gdb-serv.sh ├── gdbinit ├── gdbinitflash └── openocd.cfg ├── systems ├── CMakeLists.txt ├── STM32F407VETx_FLASH.ld ├── include │ ├── debugCore.h │ ├── semihosting.h │ ├── sysTimeMeas.h │ └── write.h └── src │ ├── debugCore.c │ ├── memmgr.c │ ├── semihosting.c │ ├── startup_stm32f407xx.c │ ├── sysTimeMeas.c │ ├── syscall.c │ └── write.c ├── task ├── CMakeLists.txt ├── include │ ├── monitorTSK.h │ ├── startupTSK.h │ └── systemTSK.h └── src │ ├── monitorTSK.c │ └── systemTSK.cpp ├── toolchain.cmake ├── tools ├── prmsytem2json │ ├── .cproject │ ├── .project │ ├── .settings │ │ └── language.settings.xml │ ├── CMakeLists.txt │ └── gen.cpp └── prmtool │ ├── .cproject │ ├── .project │ ├── .settings │ └── language.settings.xml │ ├── CMakeLists.txt │ └── prmtool.cpp ├── utils ├── .gitignore ├── CMakeLists.txt ├── include │ ├── crc.h │ ├── plog.h │ ├── specificMath.h │ ├── timegm.h │ └── version.h.in └── src │ ├── crc.c │ ├── plog.c │ ├── specificMath.c │ └── timegm.c └── window ├── CMakeLists.txt ├── include ├── baseTSK.h ├── chargeTSK.h ├── footer.h ├── image.h ├── menuSystem.h ├── menuTree.h ├── settingTSK.h └── ui.h └── src ├── arial.c ├── baseTSK.cpp ├── chargeTSK.cpp ├── dSegBold8x14.c ├── dsegBold.c ├── font6x8.c ├── font8x12.c ├── footer.cpp ├── ico.c ├── imageLogo.c ├── menuSystem.cpp ├── settingTSK.cpp ├── startupTSK.cpp └── ui.c /.editorconfig: -------------------------------------------------------------------------------- 1 | # root file EditorConfig 2 | root = true 3 | 4 | # for all 5 | [*] 6 | charset = utf-8 7 | indent_style = tab 8 | indent_size = 4 9 | 10 | # for *.c *.h file 11 | [*.{c,h}] 12 | indent_style = tab 13 | indent_size = 4 14 | 15 | # for makefile 16 | [makefile] 17 | indent_style = tab 18 | indent_size = 4 19 | 20 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /.settings 2 | /build 3 | /doc 4 | !/doc/Doxyfile 5 | prmsystem/generated/* 6 | tools/prmsytem2json/build 7 | -------------------------------------------------------------------------------- /.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | PS3604LF 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.cdt.managedbuilder.core.genmakebuilder 10 | clean,full,incremental, 11 | 12 | 13 | 14 | 15 | org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder 16 | full,incremental, 17 | 18 | 19 | 20 | 21 | 22 | org.eclipse.cdt.core.cnature 23 | org.eclipse.cdt.core.ccnature 24 | org.eclipse.cdt.managedbuilder.core.managedBuildNature 25 | org.eclipse.cdt.managedbuilder.core.ScannerConfigNature 26 | 27 | 28 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | Storozhenko Roman: 2 | Ukraine, Kharkiv 3 | d2.718l@gmail.com -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # PS3604LF 2 | 3 | ### Overview 4 | This repository include the source code of the front panel Power Supply [PS3604L](https://github.com/d-el/PS3604L). 5 | MCU: STM32F407VG. 6 | 7 | ### Requirements 8 | toolchain arm-none-eabi 10.3 or higher 9 | gcc / g++ 7.5.0 or higher 10 | cmake 3.14 or higher 11 | libjsoncpp-dev 12 | 13 | ### Build project 14 | >mkdir build 15 | >cd build 16 | >cmake .. -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=../toolchain.cmake 17 | >make -j8 18 | 19 | #### Start debug server 20 | >./scripts/gdb-serv.sh openocd-jlink 21 | 22 | #### Start debug client 23 | >./scripts/gdb-client.sh 24 | -------------------------------------------------------------------------------- /config/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(config INTERFACE) 2 | 3 | target_include_directories(config INTERFACE 4 | ./ ) 5 | -------------------------------------------------------------------------------- /dev/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(dev STATIC 2 | src/24AAxx.c 3 | src/display.c 4 | src/graphics.c 5 | src/st7735.c 6 | ) 7 | 8 | target_include_directories(dev PUBLIC 9 | include 10 | ) 11 | 12 | target_link_libraries(dev freertos drivers utils) 13 | -------------------------------------------------------------------------------- /drivers/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(drivers STATIC 2 | src/beep.c 3 | src/clock.c 4 | src/drivers.c 5 | src/enco.c 6 | src/gpio.c 7 | src/i2c.c 8 | src/key.c 9 | src/ledpwm.c 10 | src/pvd.c 11 | src/rng.c 12 | src/rtc.c 13 | src/spi.c 14 | src/stm32f4x7_eth_bsp.c 15 | src/stm32f4x7_eth.c 16 | src/uart.c 17 | src/uniqueDeviceId.c 18 | ) 19 | 20 | target_include_directories(drivers PUBLIC 21 | include 22 | ) 23 | 24 | target_link_libraries(drivers cmsis freertos task) 25 | -------------------------------------------------------------------------------- /drivers/include/beep.h: -------------------------------------------------------------------------------- 1 |  /*!**************************************************************************** 2 | * @file beep.h 3 | * @author d_el 4 | * @version V1.0 5 | * @date 19.12.2014 6 | * @copyright The MIT License (MIT). Copyright (c) 2017 Storozhenko Roman 7 | * @brief Driver beep 8 | */ 9 | #ifndef beep_H 10 | #define beep_H 11 | 12 | #ifdef __cplusplus 13 | extern "C" { 14 | #endif 15 | 16 | /*!**************************************************************************** 17 | * Include 18 | */ 19 | 20 | /*!**************************************************************************** 21 | * Define 22 | */ 23 | #define F_BEEP ( 4000 ) 24 | #define BEEP_IRQ_Priority ( 15 ) 25 | #define BEEP_TIM ( TIM12 ) 26 | #define TIME_B_TIM ( TIM7 ) 27 | 28 | /*!**************************************************************************** 29 | * Macro functions 30 | */ 31 | #define beepSetFreq(freq) BEEP_TIM->ARR = SYSTEM_FREQUENCY / (freq) / 2; 32 | 33 | /*!**************************************************************************** 34 | * Function declaration 35 | */ 36 | void BeepTime(uint16_t time, uint16_t ferq); 37 | void beep_init(void); 38 | void Dht(void *pvParameters); 39 | 40 | #ifdef __cplusplus 41 | } 42 | #endif 43 | 44 | #endif //beep_H 45 | /******************************** END OF FILE ********************************/ 46 | -------------------------------------------------------------------------------- /drivers/include/clock.h: -------------------------------------------------------------------------------- 1 | /*!**************************************************************************** 2 | * @file clock.h 3 | * @author d_el 4 | * @version V1.0 5 | * @date 17.09.2017 6 | * @copyright The MIT License (MIT). Copyright (c) 2017 Storozhenko Roman 7 | * @brief MCU peripheral initialization 8 | */ 9 | #ifndef clock_H 10 | #define clock_H 11 | 12 | #ifdef __cplusplus 13 | extern "C" { 14 | #endif 15 | 16 | /*!**************************************************************************** 17 | * Include 18 | */ 19 | 20 | /*!**************************************************************************** 21 | * Define 22 | */ 23 | 24 | /*!**************************************************************************** 25 | * Enumeration 26 | */ 27 | 28 | /*!**************************************************************************** 29 | * Typedef 30 | */ 31 | typedef enum { 32 | clockOk, 33 | clockErorHse 34 | }clockState_type; 35 | 36 | /*!**************************************************************************** 37 | * Exported variables 38 | */ 39 | 40 | /*!**************************************************************************** 41 | * Macro functions 42 | */ 43 | 44 | /*!**************************************************************************** 45 | * Function declaration 46 | */ 47 | clockState_type clock_init(void); 48 | 49 | #ifdef __cplusplus 50 | } 51 | #endif 52 | 53 | #endif //clock_H 54 | /******************************** END OF FILE ********************************/ 55 | -------------------------------------------------------------------------------- /drivers/include/drivers.h: -------------------------------------------------------------------------------- 1 | /*!**************************************************************************** 2 | * @file drivers.h 3 | * @author d_el 4 | * @version V1.0 5 | * @date 05.07.2013 6 | * @copyright The MIT License (MIT). Copyright (c) 2017 Storozhenko Roman 7 | */ 8 | #ifndef DRIVERS_H 9 | #define DRIVERS_H 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | /*!**************************************************************************** 16 | * Include 17 | */ 18 | #include "stdint.h" 19 | 20 | /*!**************************************************************************** 21 | * Function declaration 22 | */ 23 | void hardInit(void); 24 | 25 | #ifdef __cplusplus 26 | } 27 | #endif 28 | 29 | #endif //DRIVERS_H 30 | /******************************** END OF FILE ********************************/ 31 | -------------------------------------------------------------------------------- /drivers/include/enco.h: -------------------------------------------------------------------------------- 1 | /*!**************************************************************************** 2 | * @file enco.h 3 | * @author d_el 4 | * @version V2.4 5 | * @date 16.12.2018 6 | * @copyright The MIT License (MIT). Copyright (c) 2018 Storozhenko Roman 7 | * @brief encoder driver 8 | */ 9 | #ifndef ENCO_H 10 | #define ENCO_H 11 | 12 | #ifdef __cplusplus 13 | extern "C" { 14 | #endif 15 | 16 | /*!**************************************************************************** 17 | * Include 18 | */ 19 | #include "stdint.h" 20 | 21 | /*!**************************************************************************** 22 | * Prototypes for the functions 23 | */ 24 | void enco_init(void); 25 | int16_t enco_read(void); 26 | int32_t enco_update(void); 27 | void enco_settic(uint16_t n); 28 | 29 | #ifdef __cplusplus 30 | } 31 | #endif 32 | 33 | #endif //ENCO_H 34 | /******************************** END OF FILE ********************************/ 35 | -------------------------------------------------------------------------------- /drivers/include/ledpwm.h: -------------------------------------------------------------------------------- 1 | /*!**************************************************************************** 2 | * @file ledpwm.h 3 | * @author d_el 4 | * @version V1.0 5 | * @date 27.12.2015 6 | * @copyright The MIT License (MIT). Copyright (c) 2017 Storozhenko Roman 7 | * @brief pwm for lcd led 8 | */ 9 | #ifndef ledpwm_H 10 | #define ledpwm_H 11 | 12 | #ifdef __cplusplus 13 | extern "C" { 14 | #endif 15 | 16 | /*!**************************************************************************** 17 | * Include 18 | */ 19 | #include "stm32f4xx.h" 20 | 21 | /*!**************************************************************************** 22 | * Prototypes for the functions 23 | */ 24 | void ledPwm_init(void); 25 | void setLcdBrightness(uint16_t percent); // [XXX_X %] 26 | 27 | #ifdef __cplusplus 28 | } 29 | #endif 30 | 31 | #endif //ledpwm_H 32 | /******************************** END OF FILE ********************************/ 33 | -------------------------------------------------------------------------------- /drivers/include/pvd.h: -------------------------------------------------------------------------------- 1 | /*!**************************************************************************** 2 | * @file pvd.h 3 | * @author d_el - Storozhenko Roman 4 | * @version V1.0 5 | * @date 01.08.2016 6 | * @copyright The MIT License (MIT). Copyright (c) 2017 Storozhenko Roman 7 | * @brief Driver power voltage detector 8 | */ 9 | #ifndef pvd_H 10 | #define pvd_H 11 | 12 | #ifdef __cplusplus 13 | extern "C" { 14 | #endif 15 | 16 | /*!**************************************************************************** 17 | * Include 18 | */ 19 | 20 | /*!**************************************************************************** 21 | * Define 22 | */ 23 | #define PVD_IRQ_Priority (13) ///< PVD Interrupt priority 24 | 25 | /*!**************************************************************************** 26 | * Typedef 27 | */ 28 | typedef void (*suplyFaultCallBack_type)(void); 29 | 30 | /*!**************************************************************************** 31 | * Prototypes for the functions 32 | */ 33 | void pvd_init(void); 34 | void pvd_disable(void); 35 | void pvd_setSupplyFaultCallBack(suplyFaultCallBack_type callBack); 36 | 37 | #ifdef __cplusplus 38 | } 39 | #endif 40 | 41 | #endif //pvd_H 42 | /******************************** END OF FILE ********************************/ 43 | -------------------------------------------------------------------------------- /drivers/include/rng.h: -------------------------------------------------------------------------------- 1 | /*!**************************************************************************** 2 | * @file rng.h 3 | * @author d_el 4 | * @version V1.0 5 | * @date 24.04.2018 6 | * @copyright The MIT License (MIT). Copyright (c) 2017 Storozhenko Roman 7 | * @brief Random number generator driver 8 | */ 9 | 10 | #ifndef rng_H 11 | #define rng_H 12 | 13 | #ifdef __cplusplus 14 | extern "C" { 15 | #endif 16 | 17 | /*!**************************************************************************** 18 | * Include 19 | */ 20 | #include "stdint.h" 21 | 22 | /*!**************************************************************************** 23 | * Function declaration 24 | */ 25 | void rng_init(void); 26 | int32_t rng_get(void); 27 | 28 | #ifdef __cplusplus 29 | } 30 | #endif 31 | 32 | #endif //rng_H 33 | /******************************** END OF FILE ********************************/ 34 | -------------------------------------------------------------------------------- /drivers/include/rtc.h: -------------------------------------------------------------------------------- 1 | /*!**************************************************************************** 2 | * @file rtc.h 3 | * @author d_el 4 | * @version V1.1 5 | * @date 13.02.2018 6 | * @copyright The MIT License (MIT). Copyright (c) 2017 Storozhenko Roman 7 | * @brief Driver RTC module 8 | */ 9 | #ifndef rtc_H 10 | #define rtc_H 11 | 12 | #ifdef __cplusplus 13 | extern "C" { 14 | #endif 15 | 16 | /*!**************************************************************************** 17 | * Include 18 | */ 19 | #include 20 | #include 21 | #include 22 | 23 | /*!**************************************************************************** 24 | * Function declaration 25 | */ 26 | bool rtc_init(void); 27 | bool rtc_setTime(const struct tm *t); 28 | bool rtc_setTimeUnix(time_t time); 29 | bool rtc_setTimeUnixLocal(time_t time); 30 | 31 | #ifdef __cplusplus 32 | } 33 | #endif 34 | 35 | #endif //rtc_H 36 | /******************************** END OF FILE ********************************/ 37 | -------------------------------------------------------------------------------- /drivers/include/spi.h: -------------------------------------------------------------------------------- 1 | /*!**************************************************************************** 2 | * @file spi.h 3 | * @author d_el 4 | * @version V1.0 5 | * @date 05.12.2023 6 | * @copyright License (MIT). Copyright (c) 2023 Storozhenko Roman 7 | * @brief 8 | */ 9 | 10 | #ifndef spi_H 11 | #define spi_H 12 | 13 | /*!**************************************************************************** 14 | * Include 15 | */ 16 | #include 17 | #include 18 | 19 | /*!**************************************************************************** 20 | * Typedef 21 | */ 22 | typedef void (*spicb_type)(void); 23 | 24 | /*!**************************************************************************** 25 | * Function declaration 26 | */ 27 | void spi_init(void); 28 | void spi_send(uint8_t data); 29 | void spi_initBlock(void); 30 | void spi_writeBlock(uint16_t* block, size_t len, spicb_type cb); 31 | void spi_fillBlock(uint16_t* block, size_t len, const uint16_t* color, spicb_type cb); 32 | 33 | #endif //spi_H 34 | /******************************** END OF FILE ********************************/ 35 | -------------------------------------------------------------------------------- /drivers/include/stm32f4x7_eth_bsp.h: -------------------------------------------------------------------------------- 1 | /*!**************************************************************************** 2 | * @file stm32f4x7_eth_bsp.h 3 | * @author MCD Application Team 4 | * @version V1.0.0 5 | * @date 31-October-2011 6 | * @brief Header for stm32f4x7_eth_bsp.c file. 7 | */ 8 | /* Define to prevent recursive inclusion -------------------------------------*/ 9 | #ifndef __STM32F4x7_ETH_BSP_H 10 | #define __STM32F4x7_ETH_BSP_H 11 | 12 | #ifdef __cplusplus 13 | extern "C" { 14 | #endif 15 | 16 | /* Includes ------------------------------------------------------------------*/ 17 | #include "stm32f4xx.h" 18 | 19 | /* Exported types ------------------------------------------------------------*/ 20 | typedef void (*ETH_IRQHandler_type)(void *arg); 21 | 22 | /* Exported constants --------------------------------------------------------*/ 23 | #define LAN8720_ADDRESS0 0x00 24 | #define LAN8720_ADDRESS1 0x01 25 | #define PHY_ADDRESS LAN8720_ADDRESS0 26 | 27 | /* Exported macro ------------------------------------------------------------*/ 28 | /* Exported functions ------------------------------------------------------- */ 29 | void ETH_BSP_Config(void); 30 | void ETH_BSP_Deinit(void); 31 | void ETH_BSP_setHandler(ETH_IRQHandler_type h); 32 | void ETH_BSP_getMAC(uint8_t mac[6]); 33 | 34 | #ifdef __cplusplus 35 | } 36 | #endif 37 | 38 | #endif /* __STM32F4x7_ETH_BSP_H */ 39 | 40 | 41 | /*********** Portions COPYRIGHT 2012 Embest Tech. Co., Ltd.*****END OF FILE****/ 42 | -------------------------------------------------------------------------------- /drivers/include/uniqueDeviceId.h: -------------------------------------------------------------------------------- 1 | /*!**************************************************************************** 2 | * @file uniqueDeviceId.h 3 | * @author d_el - Storozhenko Roman 4 | * @version V1.0 5 | * @date 26.06.2017 6 | * @copyright The MIT License (MIT). Copyright (c) 2017 Storozhenko Roman 7 | */ 8 | #ifndef uniqueDeviceId_H 9 | #define uniqueDeviceId_H 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | /*!**************************************************************************** 16 | * Include 17 | */ 18 | #include "stdint.h" 19 | 20 | /*!**************************************************************************** 21 | * Function declaration 22 | */ 23 | uint32_t uid_get(void); 24 | 25 | #ifdef __cplusplus 26 | } 27 | #endif 28 | 29 | #endif //uniqueDeviceId_H 30 | /******************************** END OF FILE ********************************/ 31 | -------------------------------------------------------------------------------- /drivers/src/rng.c: -------------------------------------------------------------------------------- 1 | /*!**************************************************************************** 2 | * @file rng.c 3 | * @author d_el 4 | * @version V1.0 5 | * @date 24.04.2018 6 | * @copyright The MIT License (MIT). Copyright (c) 2017 Storozhenko Roman 7 | * @brief Random number generator driver 8 | */ 9 | 10 | /*!**************************************************************************** 11 | * Include 12 | */ 13 | #include "stm32f4xx.h" 14 | 15 | /*!**************************************************************************** 16 | * MEMORY 17 | */ 18 | 19 | /*!**************************************************************************** 20 | * @brief 21 | */ 22 | void rng_init(void){ 23 | RCC->AHB2ENR |= RCC_AHB2ENR_RNGEN; //Clock enable 24 | RCC->AHB2RSTR |= RCC_AHB2RSTR_RNGRST; //Reset 25 | RCC->AHB2RSTR &= ~RCC_AHB2RSTR_RNGRST; 26 | RNG->CR |= RNG_CR_RNGEN; //Random number generator enable 27 | } 28 | 29 | /*!**************************************************************************** 30 | * @brief 31 | */ 32 | int32_t rng_get(void){ 33 | return RNG->DR; 34 | } 35 | 36 | /******************************** END OF FILE ********************************/ 37 | -------------------------------------------------------------------------------- /drivers/src/uniqueDeviceId.c: -------------------------------------------------------------------------------- 1 | /*!**************************************************************************** 2 | * @file uniqueDeviceId.c 3 | * @author d_el - Storozhenko Roman 4 | * @version V1.0 5 | * @date 26.07.2017 6 | * @copyright The MIT License (MIT). Copyright (c) 2017 Storozhenko Roman 7 | */ 8 | 9 | /*!**************************************************************************** 10 | * Include 11 | */ 12 | #include "uniqueDeviceId.h" 13 | 14 | /*!**************************************************************************** 15 | * Define 16 | */ 17 | #define UNIQDEVID_BASE 0x1FFF7A10 18 | 19 | // UID[95:64]: LOT_NUM[55:24] – Lot number (ASCII encoded) 20 | // UID[39:32]: WAF_NUM[7:0] – Wafer number (8-bit unsigned number) 21 | // UID[63:40]: LOT_NUM[23:0] – Lot number (ASCII encoded) 22 | // UID[31:0]: X and Y coordinates on the wafer 23 | 24 | /*!**************************************************************************** 25 | * MEMORY 26 | */ 27 | const uint32_t *const uniqDevId = (uint32_t*)UNIQDEVID_BASE; 28 | 29 | /*!**************************************************************************** 30 | * @retval ID 31 | */ 32 | uint32_t uid_get(void){ 33 | uint32_t dId = uniqDevId[0]; 34 | return dId; 35 | } 36 | 37 | /******************************** END OF FILE ********************************/ 38 | -------------------------------------------------------------------------------- /embeddedfiles.cmake: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.6) 2 | 3 | # Embedded files 4 | set(PROJECT_EMBED_OBJ_FILES "") 5 | foreach(FILENAME ${PROJECT_EMBED_FILES}) 6 | get_filename_component(FILENAME_ONLY ${FILENAME} NAME) 7 | get_filename_component(FILEPATH_ONLY ${FILENAME} PATH) 8 | add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${FILENAME}.o 9 | COMMAND mkdir -p ${CMAKE_CURRENT_BINARY_DIR}/${FILEPATH_ONLY} 10 | WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} 11 | COMMAND ${CMAKE_OBJCOPY} 12 | ARGS -I binary -O elf32-littlearm -B arm --rename-section .data=.rodata ${FILENAME} ${CMAKE_CURRENT_BINARY_DIR}/${FILENAME}.o 13 | DEPENDS ${FILENAME} 14 | ) 15 | list(APPEND PROJECT_EMBED_OBJ_FILES ${CMAKE_CURRENT_BINARY_DIR}/${FILENAME}.o) 16 | message(STATUS "Objcopy'ing ${FILENAME}") 17 | message(STATUS "${CMAKE_CURRENT_BINARY_DIR}/${FILENAME}.o") 18 | message(STATUS "${CMAKE_OBJCOPY} ") 19 | endforeach(FILENAME) 20 | -------------------------------------------------------------------------------- /lib/CMSIS/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(cmsis STATIC 2 | Device/ST/STM32F4xx/Source/Templates/system_stm32f4xx.c 3 | ) 4 | 5 | target_include_directories(cmsis PUBLIC 6 | Include 7 | Device/ST/STM32F4xx/Include 8 | ) 9 | -------------------------------------------------------------------------------- /lib/IQmathLib-cm4/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(iqmathlib-cm4 INTERFACE) 2 | 3 | target_include_directories(iqmathlib-cm4 INTERFACE 4 | include 5 | ) 6 | -------------------------------------------------------------------------------- /lib/IQmathLib-cm4/IQmathLib-cm4.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d-el/PS3604L_Panel/e498f5e43476461b4933d39cc9d6ee77232ff84f/lib/IQmathLib-cm4/IQmathLib-cm4.a -------------------------------------------------------------------------------- /lib/freertos/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(freertos STATIC 2 | src/croutine.c 3 | src/event_groups.c 4 | src/heap_4.c 5 | src/list.c 6 | src/port.c 7 | src/queue.c 8 | src/tasks.c 9 | src/timers.c 10 | ) 11 | 12 | target_include_directories(freertos 13 | PUBLIC include 14 | ) 15 | 16 | target_link_libraries(freertos cmsis config) 17 | -------------------------------------------------------------------------------- /lib/freertos/src/LICENSE.md: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | SOFTWARE. 20 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.10) 2 | 3 | set (CMAKE_CONFIGURATION_TYPES "Debug;Release") 4 | 5 | project(lwIP) 6 | 7 | # Example lwIP application 8 | set(LWIP_DIR ${CMAKE_CURRENT_SOURCE_DIR}) 9 | 10 | set (LWIP_DEFINITIONS LWIP_DEBUG=1) 11 | 12 | if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") 13 | add_subdirectory(${LWIP_DIR}/contrib/ports/win32/example_app) 14 | elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR ${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") 15 | add_subdirectory(${LWIP_DIR}/contrib/ports/unix/example_app) 16 | else() 17 | message(WARNING "Host ${CMAKE_SYSTEM_NAME} is not supported to build example_app") 18 | endif() 19 | 20 | # Source package generation 21 | set(CPACK_SOURCE_GENERATOR "ZIP") 22 | set(CPACK_SOURCE_PACKAGE_DESCRIPTION_SUMMARY "lwIP lightweight IP stack") 23 | set(CPACK_PACKAGE_VERSION_MAJOR "${LWIP_VERSION_MAJOR}") 24 | set(CPACK_PACKAGE_VERSION_MINOR "${LWIP_VERSION_MINOR}") 25 | set(CPACK_PACKAGE_VERSION_PATCH "${LWIP_VERSION_REVISION}") 26 | set(CPACK_SOURCE_IGNORE_FILES "/build/;${CPACK_SOURCE_IGNORE_FILES};.git") 27 | set(CPACK_SOURCE_PACKAGE_FILE_NAME "lwip-${LWIP_VERSION_MAJOR}.${LWIP_VERSION_MINOR}.${LWIP_VERSION_REVISION}") 28 | include(CPack) 29 | 30 | # Generate docs before creating source package 31 | include(src/Filelists.cmake) 32 | add_custom_target(dist COMMAND ${CMAKE_MAKE_PROGRAM} package_source) 33 | if (TARGET lwipdocs) 34 | add_dependencies(dist lwipdocs) 35 | endif() 36 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/COPYING: -------------------------------------------------------------------------------- 1 | Copyright (c) 2001, 2002 Swedish Institute of Computer Science. 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without modification, 5 | are permitted provided that the following conditions are met: 6 | 7 | 1. Redistributions of source code must retain the above copyright notice, 8 | this list of conditions and the following disclaimer. 9 | 2. Redistributions in binary form must reproduce the above copyright notice, 10 | this list of conditions and the following disclaimer in the documentation 11 | and/or other materials provided with the distribution. 12 | 3. The name of the author may not be used to endorse or promote products 13 | derived from this software without specific prior written permission. 14 | 15 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 16 | WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 17 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 18 | SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 19 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 20 | OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 21 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 22 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 23 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 24 | OF SUCH DAMAGE. 25 | 26 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/FEATURES: -------------------------------------------------------------------------------- 1 | lwIP is a small independent implementation of the TCP/IP protocol suite targeted at embedded systems. 2 | 3 | The focus of the lwIP TCP/IP implementation is to reduce resource usage while still having a full scale TCP. This makes lwIP suitable for use in embedded systems with tens of kilobytes of free RAM and room for around 40 kilobytes of code ROM. 4 | 5 | Main features include: 6 | - Protocols: IP, IPv6, ICMP, ND, MLD, UDP, TCP, IGMP, ARP, PPPoS, PPPoE, 6LowPAN (via IEEE 802.15.4, BLE or ZEP; since v2.1.0) 7 | - DHCP client, stateless DHCPv6 (since v2.1.0), DNS client (incl. mDNS hostname resolver), AutoIP/APIPA (Zeroconf), ACD (Address Conflict Detection), SNMP agent (v1, v2c, v3 (since v2.1.0), private MIB support & MIB compiler) 8 | - APIs: specialized APIs for enhanced performance & zero copy, optional Berkeley-alike socket API 9 | - Extended features: IP forwarding over multiple network interfaces 10 | - Extended TCP features: congestion control, RTT estimation and fast recovery/fast retransmit, sending SACKs (since v2.1.0), "altcp": nearly transparent TLS for any tcp pcb (since v2.1.0) 11 | - Addon applications: HTTP server (HTTPS via altcp), HTTP(S) client (since v2.1.0), SNTP client, SMTP client (SMTPS via altcp), ping, NetBIOS nameserver, mDNS responder, MQTT client (TLS support since v2.1.0), TFTP server, iPerf2 counterpart 12 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/FILES: -------------------------------------------------------------------------------- 1 | contrib/ - lwIP examples, ports, and small apps (formerly http://git.savannah.gnu.org/cgit/lwip/lwip-contrib.git/) 2 | src/ - The source code for the lwIP TCP/IP stack. 3 | doc/ - The documentation for lwIP. 4 | test/ - Some code to test whether the sources do what they should. 5 | 6 | See also the FILES file in each subdirectory. 7 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/codespell_changed_files.sh: -------------------------------------------------------------------------------- 1 | # Copyright 2017 Kaspar Schleiser 2 | # Copyright 2014 Ludwig Knüpfer 3 | # Copyright 2014 Hinnerk van Bruinehsen 4 | # Copyright 2020 Jonathan Demeyer 5 | # 6 | # This file is subject to the terms and conditions of the GNU Lesser 7 | # General Public License v2.1. See the file LICENSE in the top level 8 | # directory for more details. 9 | 10 | changed_files() { 11 | : ${FILEREGEX:='\.([CcHh])$'} 12 | : ${EXCLUDE:=''} 13 | : ${DIFFFILTER:='ACMR'} 14 | 15 | DIFFFILTER="--diff-filter=${DIFFFILTER}" 16 | 17 | # select either all or only touched-in-branch files, filter through FILEREGEX 18 | if [ -z "${BASE_BRANCH}" ]; then 19 | FILES="$(git ls-tree -r --full-tree --name-only HEAD | grep -E ${FILEREGEX})" 20 | else 21 | FILES="$(git diff ${DIFFFILTER} --name-only ${BASE_BRANCH} | grep -E ${FILEREGEX})" 22 | fi 23 | 24 | # filter out negatives 25 | echo "${FILES}" | grep -v -E ${EXCLUDE} 26 | } 27 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/contrib/addons/dhcp_extra_opts/README: -------------------------------------------------------------------------------- 1 | A simple example of using LWIP_HOOK_DHCP_PARSE/APPEND_OPTION hooks to implement: 2 | * DHCP_OPTION_MTU (option 26) to update the netif's MTU 3 | * DHCP_OPTION_CLIENT_ID (option 61) to advertize client's HW id of LWIP_IANA_HWTYPE_ETHERNET type 4 | 5 | Please follow the instructions in dhcp_extra_opts.h to add the hooks, definitions in lwipopts.h and enabling the extra options. 6 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/contrib/addons/tcp_md5/README: -------------------------------------------------------------------------------- 1 | This folder provides an example implementation of how to add custom tcp header 2 | options and custom socket options. 3 | 4 | It does this by implementing the (seldom used) tcp md5 signature. 5 | 6 | To enable it, add an LWIP_HOOK_FILENAME hook file, include tcp_md5.h in it and 7 | define these hooks: 8 | 9 | #define LWIP_HOOK_TCP_INPACKET_PCB(pcb, hdr, optlen, opt1len, opt2, p) tcp_md5_check_inpacket(pcb, hdr, optlen, opt1len, opt2, p) 10 | #define LWIP_HOOK_TCP_OPT_LENGTH_SEGMENT(pcb, internal_len) tcp_md5_get_additional_option_length(pcb, internal_len) 11 | #define LWIP_HOOK_TCP_ADD_TX_OPTIONS(p, hdr, pcb, opts) tcp_md5_add_tx_options(p, hdr, pcb, opts) 12 | #define LWIP_HOOK_SOCKETS_SETSOCKOPT(s, sock, level, optname, optval, optlen, err) tcp_md5_setsockopt_hook(sock, level, optname, optval, optlen, err) 13 | 14 | Then, in your sockets application, enable md5 signature on a socket like this: 15 | 16 | struct tcp_md5sig md5; 17 | struct sockaddr_storage addr_remote; /* Initialize this to remote address and port */ 18 | memcpy(&md5.tcpm_addr, &addr_remote, sizeof(addr_remote)); 19 | strcpy(md5.tcpm_key, key); /* this is the md5 key per connection */ 20 | md5.tcpm_keylen = strlen(key); 21 | if ((ret = setsockopt(sockfd, IPPROTO_TCP, TCP_MD5SIG, &md5, sizeof(md5))) < 0) { 22 | perror("setsockopt TCP_MD5SIG"); 23 | return; 24 | } 25 | 26 | After that, your connection (client) or all incoming connections (server) require 27 | tcp md5 signatures. 28 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/contrib/apps/LwipMibCompiler/LwipMibCompiler/app.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/contrib/apps/LwipMibCompiler/MibViewer/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // Dieser Code wurde von einem Tool generiert. 4 | // Laufzeitversion:4.0.30319.225 5 | // 6 | // Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn 7 | // der Code erneut generiert wird. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace LwipMibViewer.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/contrib/apps/LwipMibCompiler/MibViewer/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/contrib/apps/LwipMibCompiler/MibViewer/app.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/contrib/apps/LwipMibCompiler/Mibs/RFC-1215: -------------------------------------------------------------------------------- 1 | RFC-1215 DEFINITIONS ::= BEGIN 2 | 3 | IMPORTS 4 | ObjectName 5 | FROM RFC1155-SMI; 6 | 7 | TRAP-TYPE MACRO ::= 8 | BEGIN 9 | TYPE NOTATION ::= "ENTERPRISE" value 10 | (enterprise OBJECT IDENTIFIER) 11 | VarPart 12 | DescrPart 13 | ReferPart 14 | VALUE NOTATION ::= value (VALUE INTEGER) 15 | 16 | VarPart ::= 17 | "VARIABLES" "{" VarTypes "}" 18 | | empty 19 | VarTypes ::= 20 | VarType | VarTypes "," VarType 21 | VarType ::= 22 | value (vartype ObjectName) 23 | 24 | DescrPart ::= 25 | "DESCRIPTION" value (description DisplayString) 26 | | empty 27 | 28 | ReferPart ::= 29 | "REFERENCE" value (reference DisplayString) 30 | | empty 31 | 32 | END 33 | 34 | END 35 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/contrib/apps/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Entities/AgentCapabilities.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Created by SharpDevelop. 3 | * User: lextm 4 | * Date: 2008/5/31 5 | * Time: 13:18 6 | * 7 | * To change this template use Tools | Options | Coding | Edit Standard Headers. 8 | */ 9 | 10 | namespace Lextm.SharpSnmpLib.Mib.Elements.Entities 11 | { 12 | /// 13 | /// The AGENT-CAPABILITIES construct is used to specify implementation characteristics of an SNMP agent sub-system with respect to object types and events. 14 | /// 15 | public sealed class AgentCapabilities : EntityBase 16 | { 17 | /// 18 | /// Creates an instance. 19 | /// 20 | /// 21 | /// 22 | /// 23 | public AgentCapabilities(IModule module, SymbolList preAssignSymbols, ISymbolEnumerator symbols) 24 | : base(module, preAssignSymbols, symbols) 25 | { 26 | } 27 | 28 | } 29 | } -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/contrib/apps/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Entities/EntityBase.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Lextm.SharpSnmpLib.Mib.Elements.Entities 4 | { 5 | public abstract class EntityBase: IEntity 6 | { 7 | private readonly IModule _module; 8 | private string _parent; 9 | private readonly uint _value; 10 | private readonly string _name; 11 | 12 | public EntityBase(IModule module, SymbolList preAssignSymbols, ISymbolEnumerator symbols) 13 | { 14 | _module = module; 15 | _name = preAssignSymbols[0].ToString(); 16 | 17 | Lexer.ParseOidValue(symbols, out _parent, out _value); 18 | } 19 | 20 | public IModule Module 21 | { 22 | get { return _module; } 23 | } 24 | 25 | public string Parent 26 | { 27 | get { return _parent; } 28 | set { _parent = value; } 29 | } 30 | 31 | public uint Value 32 | { 33 | get { return _value; } 34 | } 35 | 36 | public string Name 37 | { 38 | get { return _name; } 39 | } 40 | 41 | public virtual string Description 42 | { 43 | get { return string.Empty; } 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/contrib/apps/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Entities/ModuleCompliance.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Created by SharpDevelop. 3 | * User: lextm 4 | * Date: 2008/5/21 5 | * Time: 19:35 6 | * 7 | * To change this template use Tools | Options | Coding | Edit Standard Headers. 8 | */ 9 | 10 | namespace Lextm.SharpSnmpLib.Mib.Elements.Entities 11 | { 12 | /// 13 | /// Description of ModuleComplianceNode. 14 | /// 15 | public sealed class ModuleCompliance : EntityBase 16 | { 17 | public ModuleCompliance(IModule module, SymbolList preAssignSymbols, ISymbolEnumerator symbols) 18 | : base(module, preAssignSymbols, symbols) 19 | { 20 | } 21 | 22 | } 23 | } -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/contrib/apps/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Entities/ModuleIdentity.cs: -------------------------------------------------------------------------------- 1 | namespace Lextm.SharpSnmpLib.Mib.Elements.Entities 2 | { 3 | public sealed class ModuleIdentity : EntityBase 4 | { 5 | public ModuleIdentity(IModule module, SymbolList preAssignSymbols, ISymbolEnumerator symbols) 6 | : base(module, preAssignSymbols, symbols) 7 | { 8 | } 9 | } 10 | } -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/contrib/apps/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Entities/NotificationGroup.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Created by SharpDevelop. 3 | * User: lextm 4 | * Date: 2008/5/21 5 | * Time: 19:34 6 | * 7 | * To change this template use Tools | Options | Coding | Edit Standard Headers. 8 | */ 9 | 10 | namespace Lextm.SharpSnmpLib.Mib.Elements.Entities 11 | { 12 | /// 13 | /// Description of NotificationGroupNode. 14 | /// 15 | public sealed class NotificationGroup : EntityBase 16 | { 17 | public NotificationGroup(IModule module, SymbolList preAssignSymbols, ISymbolEnumerator symbols) 18 | : base(module, preAssignSymbols, symbols) 19 | { 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/contrib/apps/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Entities/NotificationType.cs: -------------------------------------------------------------------------------- 1 | 2 | namespace Lextm.SharpSnmpLib.Mib.Elements.Entities 3 | { 4 | public sealed class NotificationType : EntityBase 5 | { 6 | public NotificationType(IModule module, SymbolList preAssignSymbols, ISymbolEnumerator symbols) 7 | : base(module, preAssignSymbols, symbols) 8 | { 9 | } 10 | } 11 | } -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/contrib/apps/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Entities/ObjectGroup.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Created by SharpDevelop. 3 | * User: lextm 4 | * Date: 2008/5/21 5 | * Time: 19:27 6 | * 7 | * To change this template use Tools | Options | Coding | Edit Standard Headers. 8 | */ 9 | 10 | namespace Lextm.SharpSnmpLib.Mib.Elements.Entities 11 | { 12 | /// 13 | /// Description of ObjectGroupNode. 14 | /// 15 | public sealed class ObjectGroup : EntityBase 16 | { 17 | public ObjectGroup(IModule module, SymbolList preAssignSymbols, ISymbolEnumerator symbols) 18 | : base(module, preAssignSymbols, symbols) 19 | { 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/contrib/apps/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Entities/ObjectIdentity.cs: -------------------------------------------------------------------------------- 1 | 2 | namespace Lextm.SharpSnmpLib.Mib.Elements.Entities 3 | { 4 | /// 5 | /// Object identifier node. 6 | /// 7 | public sealed class ObjectIdentity : EntityBase 8 | { 9 | 10 | /// 11 | /// Creates a . 12 | /// 13 | /// Module name 14 | /// Header 15 | /// Lexer 16 | public ObjectIdentity(IModule module, SymbolList preAssignSymbols, ISymbolEnumerator symbols) 17 | : base(module, preAssignSymbols, symbols) 18 | { 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/contrib/apps/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Entities/OidValueAssignment.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Created by SharpDevelop. 3 | * User: lextm 4 | * Date: 2008/5/17 5 | * Time: 20:49 6 | * 7 | * To change this template use Tools | Options | Coding | Edit Standard Headers. 8 | */ 9 | 10 | using System; 11 | 12 | namespace Lextm.SharpSnmpLib.Mib.Elements.Entities 13 | { 14 | /// 15 | /// Object identifier node. 16 | /// 17 | public sealed class OidValueAssignment : EntityBase 18 | { 19 | /// 20 | /// Creates a . 21 | /// 22 | /// Module 23 | /// Name 24 | /// Lexer 25 | public OidValueAssignment(IModule module, SymbolList preAssignSymbols, ISymbolEnumerator symbols) 26 | : base(module, preAssignSymbols, symbols) 27 | { 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/contrib/apps/LwipMibCompiler/SharpSnmpLib/Mib/Elements/IDeclaration.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace Lextm.SharpSnmpLib.Mib.Elements 7 | { 8 | public interface IDeclaration: IElement 9 | { 10 | /// 11 | /// Name. 12 | /// 13 | string Name 14 | { 15 | get; 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/contrib/apps/LwipMibCompiler/SharpSnmpLib/Mib/Elements/IElement.cs: -------------------------------------------------------------------------------- 1 | // Construct interface. 2 | // Copyright (C) 2008-2010 Malcolm Crowe, Lex Li, and other contributors. 3 | // 4 | // This library is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU Lesser General Public 6 | // License as published by the Free Software Foundation; either 7 | // version 2.1 of the License, or (at your option) any later version. 8 | // 9 | // This library is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | // Lesser General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Lesser General Public 15 | // License along with this library; if not, write to the Free Software 16 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 | 18 | namespace Lextm.SharpSnmpLib.Mib.Elements 19 | { 20 | /// 21 | /// Construct interface. 22 | /// 23 | [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1040:AvoidEmptyInterfaces")] 24 | public interface IElement 25 | { 26 | /// 27 | /// Containing module. 28 | /// 29 | IModule Module 30 | { 31 | get; 32 | } 33 | 34 | } 35 | } -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/contrib/apps/LwipMibCompiler/SharpSnmpLib/Mib/Elements/ITypeReferrer.cs: -------------------------------------------------------------------------------- 1 | using Lextm.SharpSnmpLib.Mib.Elements.Types; 2 | 3 | namespace Lextm.SharpSnmpLib.Mib.Elements 4 | { 5 | public interface ITypeReferrer 6 | { 7 | ITypeAssignment ReferredType { get; set; } 8 | ITypeAssignment BaseType { get; } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/contrib/apps/LwipMibCompiler/SharpSnmpLib/Mib/Elements/TrapType.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Created by SharpDevelop. 3 | * User: lextm 4 | * Date: 2008/5/31 5 | * Time: 12:20 6 | * 7 | * To change this template use Tools | Options | Coding | Edit Standard Headers. 8 | */ 9 | 10 | namespace Lextm.SharpSnmpLib.Mib.Elements 11 | { 12 | public sealed class TrapType : IDeclaration 13 | { 14 | private readonly IModule _module; 15 | private readonly string _name; 16 | private readonly int _value; 17 | 18 | public TrapType(IModule module, SymbolList preAssignSymbols, ISymbolEnumerator symbols) 19 | { 20 | _module = module; 21 | _name = preAssignSymbols[0].ToString(); 22 | 23 | Symbol valueSymbol = symbols.NextNonEOLSymbol(); 24 | 25 | bool succeeded = int.TryParse(valueSymbol.ToString(), out _value); 26 | valueSymbol.Assert(succeeded, "not a decimal"); 27 | } 28 | 29 | public int Value 30 | { 31 | get { return _value; } 32 | } 33 | 34 | #region IDeclaration Member 35 | 36 | public IModule Module 37 | { 38 | get { return _module; } 39 | } 40 | 41 | public string Name 42 | { 43 | get { return _name; } 44 | } 45 | 46 | #endregion 47 | } 48 | } -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/contrib/apps/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Types/BitsType.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace Lextm.SharpSnmpLib.Mib.Elements.Types 5 | { 6 | public class BitsType : BaseType 7 | { 8 | private ValueMap _map; 9 | 10 | public BitsType(IModule module, string name, ISymbolEnumerator symbols) 11 | : base(module, name) 12 | { 13 | _map = Lexer.DecodeEnumerations(symbols); 14 | } 15 | 16 | public ValueMap Map 17 | { 18 | get { return _map; } 19 | } 20 | 21 | public string this[int value] 22 | { 23 | get { return _map[value]; } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/contrib/apps/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Types/Choice.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Created by SharpDevelop. 3 | * User: lextm 4 | * Date: 2008/5/31 5 | * Time: 11:39 6 | * 7 | * To change this template use Tools | Options | Coding | Edit Standard Headers. 8 | */ 9 | 10 | namespace Lextm.SharpSnmpLib.Mib.Elements.Types 11 | { 12 | /// 13 | /// The CHOICE type represents a list of alternatives.. 14 | /// 15 | public sealed class Choice : BaseType 16 | { 17 | /// 18 | /// Creates a instance. 19 | /// 20 | /// 21 | /// 22 | /// 23 | public Choice(IModule module, string name, ISymbolEnumerator symbols) 24 | : base(module, name) 25 | { 26 | while (symbols.NextNonEOLSymbol() != Symbol.OpenBracket) 27 | { 28 | } 29 | 30 | while (symbols.NextNonEOLSymbol() != Symbol.CloseBracket) 31 | { 32 | } 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/contrib/apps/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Types/ITypeAssignment.cs: -------------------------------------------------------------------------------- 1 | namespace Lextm.SharpSnmpLib.Mib.Elements.Types 2 | { 3 | public interface ITypeAssignment : IDeclaration 4 | { 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/contrib/apps/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Types/IpAddressType.cs: -------------------------------------------------------------------------------- 1 |  2 | namespace Lextm.SharpSnmpLib.Mib.Elements.Types 3 | { 4 | public class IpAddressType : OctetStringType 5 | { 6 | public IpAddressType(IModule module, string name, ISymbolEnumerator symbols) 7 | : base(module, name, symbols) 8 | { 9 | if (this.Size.Count != 0) 10 | { 11 | throw new MibException("Size definition not allowed for IpAddress type!"); 12 | } 13 | 14 | // IpAddress type is defined as: 15 | // IpAddress ::= 16 | // [APPLICATION 0] 17 | // IMPLICIT OCTET STRING (SIZE (4)) 18 | this.Size.Add(new ValueRange(4, null)); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/contrib/apps/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Types/Macro.cs: -------------------------------------------------------------------------------- 1 |  2 | namespace Lextm.SharpSnmpLib.Mib.Elements.Types 3 | { 4 | public sealed class Macro : ITypeAssignment 5 | { 6 | private IModule _module; 7 | private string _name; 8 | 9 | [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1804:RemoveUnusedLocals", MessageId = "temp")] 10 | public Macro(IModule module, SymbolList preAssignSymbols, ISymbolEnumerator symbols) 11 | { 12 | _module = module; 13 | _name = preAssignSymbols[0].ToString(); 14 | 15 | while (symbols.NextNonEOLSymbol() != Symbol.Begin) 16 | { 17 | } 18 | 19 | while (symbols.NextNonEOLSymbol() != Symbol.End) 20 | { 21 | } 22 | } 23 | 24 | public IModule Module 25 | { 26 | get { return _module; } 27 | } 28 | 29 | public string Name 30 | { 31 | get { return _name; } 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/contrib/apps/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Types/ObjectIdentifierType.cs: -------------------------------------------------------------------------------- 1 |  2 | namespace Lextm.SharpSnmpLib.Mib.Elements.Types 3 | { 4 | public class ObjectIdentifierType : BaseType 5 | { 6 | public ObjectIdentifierType(IModule module, string name, ISymbolEnumerator symbols) 7 | : base(module, name) 8 | { 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/contrib/apps/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Types/OctetStringType.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace Lextm.SharpSnmpLib.Mib.Elements.Types 4 | { 5 | public class OctetStringType : BaseType 6 | { 7 | private ValueRanges _size; 8 | 9 | public OctetStringType(IModule module, string name, ISymbolEnumerator symbols) 10 | : base(module, name) 11 | { 12 | Symbol current = symbols.NextNonEOLSymbol(); 13 | if (current == Symbol.OpenParentheses) 14 | { 15 | symbols.PutBack(current); 16 | _size = Lexer.DecodeRanges(symbols); 17 | current.Assert(_size.IsSizeDeclaration, "SIZE keyword is required for ranges of octet string!"); 18 | } 19 | else 20 | { 21 | symbols.PutBack(current); 22 | _size = new ValueRanges(isSizeDecl: true); 23 | } 24 | } 25 | 26 | public ValueRanges Size 27 | { 28 | get { return _size; } 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/contrib/apps/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Types/OpaqueType.cs: -------------------------------------------------------------------------------- 1 |  2 | namespace Lextm.SharpSnmpLib.Mib.Elements.Types 3 | { 4 | public class OpaqueType : OctetStringType 5 | { 6 | public OpaqueType(IModule module, string name, ISymbolEnumerator symbols) 7 | : base(module, name, symbols) 8 | { 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/contrib/apps/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Types/SequenceOf.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace Lextm.SharpSnmpLib.Mib.Elements.Types 4 | { 5 | /// 6 | /// The SEQUENCE OF type represents a list of data sets.. 7 | /// 8 | public sealed class SequenceOf : BaseType 9 | { 10 | private string _type; 11 | 12 | public SequenceOf(IModule module, string name, ISymbolEnumerator sym) 13 | : base(module, name) 14 | { 15 | _type = sym.NextNonEOLSymbol().ToString(); 16 | } 17 | 18 | public string Type 19 | { 20 | get { return _type; } 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/contrib/apps/LwipMibCompiler/SharpSnmpLib/Mib/ISymbolEnumerator.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace Lextm.SharpSnmpLib.Mib 4 | { 5 | public interface ISymbolEnumerator: IEnumerator 6 | { 7 | bool PutBack(Symbol item); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/contrib/apps/LwipMibCompiler/SharpSnmpLib/Mib/MaxAccess.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace Lextm.SharpSnmpLib.Mib 7 | { 8 | public enum MaxAccess 9 | { 10 | notAccessible, 11 | accessibleForNotify, 12 | readOnly, 13 | readWrite, 14 | readCreate 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/contrib/apps/LwipMibCompiler/SharpSnmpLib/Mib/Status.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace Lextm.SharpSnmpLib.Mib 7 | { 8 | public enum Status 9 | { 10 | current, 11 | deprecated, 12 | obsolete, 13 | mandatory, 14 | optional 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/contrib/apps/LwipMibCompiler/SharpSnmpLib/readme.txt: -------------------------------------------------------------------------------- 1 | See docs in src/apps/snmp/snmp_core.c. 2 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/contrib/apps/LwipMibCompiler/SharpSnmpLib/sharpsnmplib.snk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d-el/PS3604L_Panel/e498f5e43476461b4933d39cc9d6ee77232ff84f/lib/lwip/lwip-STABLE-2_2_0_RELEASE/contrib/apps/LwipMibCompiler/SharpSnmpLib/sharpsnmplib.snk -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/contrib/apps/LwipMibCompiler/example/compile_udp_mib.cmd: -------------------------------------------------------------------------------- 1 | ..\LwipMibCompiler\bin\Debug\LwipMibCompiler.exe ..\Mibs\UDP-MIB .\ ..\Mibs\ 2 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/contrib/apps/LwipMibCompiler/example/compile_udp_mib.sh: -------------------------------------------------------------------------------- 1 | ../LwipMibCompiler/bin/Debug/LwipMibCompiler.exe ../Mibs/UDP-MIB ./ ../Mibs/ 2 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/contrib/apps/chargen/chargen.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_CHARGEN_H 2 | #define LWIP_CHARGEN_H 3 | 4 | #include "lwip/opt.h" 5 | 6 | #if LWIP_SOCKET 7 | 8 | void chargen_init(void); 9 | 10 | #endif /* LWIP_SOCKET */ 11 | 12 | #endif /* LWIP_CHARGEN_H */ 13 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/contrib/apps/httpserver/README: -------------------------------------------------------------------------------- 1 | HTTPSERVER 2 | 3 | This is a demonstration of how to make the most basic kind 4 | of server using lWIP. 5 | 6 | * httpserver-raw.c - uses raw TCP calls (coming soon!) 7 | 8 | * httpserver-netconn.c - uses netconn and netbuf API 9 | 10 | This code updates the examples in Adam Dunkel's original 11 | lwIP documentation to match changes in the code since that 12 | PDF release. 13 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/contrib/apps/httpserver/httpserver-netconn.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_HTTPSERVER_NETCONN_H 2 | #define LWIP_HTTPSERVER_NETCONN_H 3 | 4 | void http_server_netconn_init(void); 5 | 6 | #endif /* LWIP_HTTPSERVER_NETCONN_H */ 7 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/contrib/apps/netio/netio.c: -------------------------------------------------------------------------------- 1 | #include "netio.h" 2 | 3 | #include "lwip/opt.h" 4 | #include "lwip/tcp.h" 5 | 6 | /* See http://www.nwlab.net/art/netio/netio.html to get the netio tool */ 7 | 8 | #if LWIP_TCP && LWIP_CALLBACK_API 9 | static err_t 10 | netio_recv(void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err) 11 | { 12 | LWIP_UNUSED_ARG(arg); 13 | 14 | if (err == ERR_OK && p != NULL) { 15 | tcp_recved(pcb, p->tot_len); 16 | pbuf_free(p); 17 | } else { 18 | pbuf_free(p); 19 | } 20 | 21 | if (err == ERR_OK && p == NULL) { 22 | tcp_arg(pcb, NULL); 23 | tcp_sent(pcb, NULL); 24 | tcp_recv(pcb, NULL); 25 | tcp_close(pcb); 26 | } 27 | 28 | return ERR_OK; 29 | } 30 | 31 | static err_t 32 | netio_accept(void *arg, struct tcp_pcb *pcb, err_t err) 33 | { 34 | LWIP_UNUSED_ARG(arg); 35 | LWIP_UNUSED_ARG(err); 36 | 37 | if (pcb != NULL) { 38 | tcp_arg(pcb, NULL); 39 | tcp_sent(pcb, NULL); 40 | tcp_recv(pcb, netio_recv); 41 | } 42 | return ERR_OK; 43 | } 44 | 45 | void 46 | netio_init(void) 47 | { 48 | struct tcp_pcb *pcb; 49 | 50 | pcb = tcp_new_ip_type(IPADDR_TYPE_ANY); 51 | tcp_bind(pcb, IP_ANY_TYPE, 18767); 52 | pcb = tcp_listen(pcb); 53 | tcp_accept(pcb, netio_accept); 54 | } 55 | #endif /* LWIP_TCP && LWIP_CALLBACK_API */ 56 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/contrib/apps/netio/netio.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_NETIO_H 2 | #define LWIP_NETIO_H 3 | 4 | void netio_init(void); 5 | 6 | #endif /* LWIP_NETIO_H */ 7 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/contrib/apps/ping/ping.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_PING_H 2 | #define LWIP_PING_H 3 | 4 | #include "lwip/ip_addr.h" 5 | 6 | /** 7 | * PING_USE_SOCKETS: Set to 1 to use sockets, otherwise the raw api is used 8 | */ 9 | #ifndef PING_USE_SOCKETS 10 | #define PING_USE_SOCKETS LWIP_SOCKET 11 | #endif 12 | 13 | void ping_init(const ip_addr_t* ping_addr); 14 | 15 | #if !PING_USE_SOCKETS 16 | void ping_send_now(void); 17 | #endif /* !PING_USE_SOCKETS */ 18 | 19 | #endif /* LWIP_PING_H */ 20 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/contrib/apps/rtp/rtp.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_RTP_H 2 | #define LWIP_RTP_H 3 | 4 | #if LWIP_SOCKET && LWIP_IGMP 5 | void rtp_init(void); 6 | #endif /* LWIP_SOCKET && LWIP_IGMP */ 7 | 8 | #endif /* LWIP_RTP_H */ 9 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/contrib/apps/socket_examples/socket_examples.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_SOCKET_EXAMPLES_H 2 | #define LWIP_SOCKET_EXAMPLES_H 3 | 4 | void socket_examples_init(void); 5 | 6 | #endif /* LWIP_SOCKET_EXAMPLES_H */ 7 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/contrib/examples/example_app/lwippools.h: -------------------------------------------------------------------------------- 1 | /* OPTIONAL: Pools to replace heap allocation 2 | * Optional: Pools can be used instead of the heap for mem_malloc. If 3 | * so, these should be defined here, in increasing order according to 4 | * the pool element size. 5 | * 6 | * LWIP_MALLOC_MEMPOOL(number_elements, element_size) 7 | */ 8 | #if MEM_USE_POOLS 9 | LWIP_MALLOC_MEMPOOL_START 10 | LWIP_MALLOC_MEMPOOL(100, 256) 11 | LWIP_MALLOC_MEMPOOL(50, 512) 12 | LWIP_MALLOC_MEMPOOL(20, 1024) 13 | LWIP_MALLOC_MEMPOOL(20, 1536) 14 | LWIP_MALLOC_MEMPOOL_END 15 | #endif /* MEM_USE_POOLS */ 16 | 17 | /* Optional: Your custom pools can go here if you would like to use 18 | * lwIP's memory pools for anything else. 19 | */ 20 | LWIP_MEMPOOL(SYS_MBOX, 22, 100, "SYS_MBOX") 21 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/contrib/examples/example_app/ppp_settings.h: -------------------------------------------------------------------------------- 1 | #ifdef _MSC_VER 2 | #pragma warning (disable: 4242) /* PPP only: conversion from 'x' to 'y', possible loss of data */ 3 | #pragma warning (disable: 4244) /* PPP only: conversion from 'x' to 'y', possible loss of data (again?) */ 4 | #pragma warning (disable: 4310) /* PPP only: cast truncates constant value */ 5 | #pragma warning (disable: 4706) /* PPP only: assignment within conditional expression */ 6 | #endif /* MSC_VER */ 7 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/contrib/examples/example_app/test_configs/opt_no_tcp_dualstack.h: -------------------------------------------------------------------------------- 1 | #include "test_configs/opt_dualstack.h" 2 | 3 | #undef LWIP_TCP 4 | #define LWIP_TCP 0 5 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/contrib/examples/example_app/test_configs/opt_no_tcp_ipv4only.h: -------------------------------------------------------------------------------- 1 | #include "test_configs/opt_ipv4only.h" 2 | 3 | #undef LWIP_TCP 4 | #define LWIP_TCP 0 5 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/contrib/examples/example_app/test_configs/opt_no_tcp_ipv6only.h: -------------------------------------------------------------------------------- 1 | #include "test_configs/opt_ipv6only.h" 2 | 3 | #undef LWIP_TCP 4 | #define LWIP_TCP 0 5 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/contrib/examples/example_app/test_configs/opt_no_udp_dualstack.h: -------------------------------------------------------------------------------- 1 | #include "test_configs/opt_dualstack.h" 2 | 3 | #undef LWIP_UDP 4 | #define LWIP_UDP 0 5 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/contrib/examples/example_app/test_configs/opt_no_udp_ipv4only.h: -------------------------------------------------------------------------------- 1 | #include "test_configs/opt_ipv4only.h" 2 | 3 | #undef LWIP_UDP 4 | #define LWIP_UDP 0 5 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/contrib/examples/example_app/test_configs/opt_no_udp_ipv6only.h: -------------------------------------------------------------------------------- 1 | #include "test_configs/opt_ipv6only.h" 2 | 3 | #undef LWIP_UDP 4 | #define LWIP_UDP 0 5 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/contrib/examples/example_app/test_configs/opt_none.h: -------------------------------------------------------------------------------- 1 | /* test and empty lwipopts.h file */ 2 | 3 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/contrib/examples/httpd/examples_fs/404.html: -------------------------------------------------------------------------------- 1 | 2 | lwIP - A Lightweight TCP/IP Stack 3 | 4 | 5 | 6 | 19 |
7 | SICS logo 9 | 10 |

lwIP - A Lightweight TCP/IP Stack

11 |

404 - Page not found

12 |

13 | Sorry, the page you are requesting was not found on this 14 | server. 15 |

16 |
17 |   18 |
20 | 21 | 22 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/contrib/examples/httpd/examples_fs/img/sics.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d-el/PS3604L_Panel/e498f5e43476461b4933d39cc9d6ee77232ff84f/lib/lwip/lwip-STABLE-2_2_0_RELEASE/contrib/examples/httpd/examples_fs/img/sics.gif -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/contrib/examples/httpd/examples_fs/login.html: -------------------------------------------------------------------------------- 1 | 2 | lwIP - A Lightweight TCP/IP Stack 3 | 4 | 5 | 6 | 7 | 10 | 22 | 25 | 26 |
8 | SICS logo 9 | 11 |

Login

12 |
13 |
14 | 15 | 16 | 17 | 18 | 19 |
20 |
21 |
23 |   24 |
27 | 28 | 29 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/contrib/examples/httpd/examples_fs/loginfail.html: -------------------------------------------------------------------------------- 1 | 2 | lwIP - A Lightweight TCP/IP Stack 3 | 4 | 5 | 6 | 7 | 10 | 19 | 22 | 23 |
8 | SICS logo 9 | 11 |

lwIP - A Lightweight TCP/IP Stack

12 |

13 | Login failed. 14 |

15 |

16 | Click here to retry login. 17 |

18 |
20 |   21 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/contrib/examples/httpd/examples_fs/session.html: -------------------------------------------------------------------------------- 1 | 2 | lwIP - A Lightweight TCP/IP Stack 3 | 4 | 5 | 6 | 7 | 10 | 19 | 22 | 23 |
8 | SICS logo 9 | 11 |

lwIP - A Lightweight TCP/IP Stack

12 |

13 | Login succeeded, session active. 14 |

15 |

16 | Click here to retry login. 17 |

18 |
20 |   21 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/contrib/examples/snmp/snmp_private_mib/private_mib.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * Exports Private lwIP MIB 4 | */ 5 | 6 | #ifndef LWIP_HDR_PRIVATE_MIB_H 7 | #define LWIP_HDR_PRIVATE_MIB_H 8 | 9 | #include "lwip/apps/snmp_opts.h" 10 | 11 | #include "lwip/apps/snmp_core.h" 12 | 13 | #ifdef __cplusplus 14 | extern "C" { 15 | #endif 16 | 17 | /* export MIB */ 18 | extern const struct snmp_mib mib_private; 19 | 20 | void lwip_privmib_init(void); 21 | 22 | #ifdef __cplusplus 23 | } 24 | #endif 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/contrib/examples/tftp/tftp_example.h: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this license header, choose License Headers in Project Properties. 3 | * To change this template file, choose Tools | Templates 4 | * and open the template in the editor. 5 | */ 6 | 7 | /* 8 | * File: tftp_example.h 9 | * Author: dziegel 10 | * 11 | * Created on February 17, 2018, 3:43 PM 12 | */ 13 | 14 | #ifndef TFTP_EXAMPLE_H 15 | #define TFTP_EXAMPLE_H 16 | 17 | #ifdef __cplusplus 18 | extern "C" { 19 | #endif 20 | 21 | void tftp_example_init_server(void); 22 | void tftp_example_init_client(void); 23 | 24 | #ifdef __cplusplus 25 | } 26 | #endif 27 | 28 | #endif /* TFTP_EXAMPLE_H */ 29 | 30 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/contrib/ports/unix/README: -------------------------------------------------------------------------------- 1 | This port contains infrastructure and examples for running lwIP on Unix-like 2 | operating systems (Linux, OpenBSD, cygwin). Much of this is targeted towards 3 | testing lwIP applications. 4 | 5 | * port/sys_arch.c, port/perf.c, port/include/arch/: Generic platform porting, 6 | for both states of NO_SYS. (Mapping debugging to printf, providing 7 | sys_now & co from the system time etc.) 8 | 9 | * check: Runs the unit tests shipped with main lwIP on the Unix port. 10 | 11 | * port/netif, port/include/netif: Various network interface implementations and 12 | their helpers, some explicitly for Unix infrastructure, some generic (but most 13 | useful on an easy to debug system): 14 | 15 | * fifo: Helper for sio 16 | 17 | * list: Helper for unixif 18 | 19 | * pcapif: Network interface that replays packages from a PCAP dump file, and 20 | discards packages sent out from it 21 | 22 | * sio: Mapping Unix character devices to lwIP's sio mechanisms 23 | 24 | * tapif: Network interface that is mapped to a tap interface (Unix user 25 | space layer 2 network device). Uses lwIP threads. 26 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/contrib/ports/unix/check/README: -------------------------------------------------------------------------------- 1 | 2 | Helper files to run lwIP unit tests on unix-like systems. 3 | 4 | 1. Install the check library, through a package manager or from https://libcheck.github.io/check/ 5 | 2. Put the lwip code in a directory called 'lwip' 6 | 3. Run `make check` 7 | 4. Make sure all tests pass 8 | 9 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/contrib/ports/unix/check/config.h: -------------------------------------------------------------------------------- 1 | /* Enable this to simplify debugging */ 2 | /* #define LWIP_UNITTESTS_NOFORK */ 3 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/contrib/ports/unix/example_app/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include(${LWIP_DIR}/contrib/ports/CMakeCommon.cmake) 2 | 3 | set (LWIP_INCLUDE_DIRS 4 | "${LWIP_DIR}/src/include" 5 | "${LWIP_DIR}/contrib/" 6 | "${LWIP_DIR}/contrib/ports/unix/port/include" 7 | "${LWIP_DIR}/contrib/examples/example_app" 8 | ) 9 | 10 | include(${LWIP_DIR}/src/Filelists.cmake) 11 | include(${LWIP_DIR}/contrib/Filelists.cmake) 12 | include(${LWIP_DIR}/contrib/ports/unix/Filelists.cmake) 13 | 14 | if(NOT EXISTS ${LWIP_DIR}/contrib/examples/example_app/lwipcfg.h) 15 | message(WARNING "${LWIP_DIR}/contrib/examples/example_app is missing lwipcfg.h 16 | Copy ${LWIP_DIR}/contrib/examples/example_app/lwipcfg.h.example to ${LWIP_DIR}/contrib/examples/example_app/lwipcfg.h and edit appropriately") 17 | endif() 18 | add_executable(example_app ${LWIP_DIR}/contrib/examples/example_app/test.c default_netif.c) 19 | target_include_directories(example_app PRIVATE ${LWIP_INCLUDE_DIRS}) 20 | target_compile_options(example_app PRIVATE ${LWIP_COMPILER_FLAGS}) 21 | target_compile_definitions(example_app PRIVATE ${LWIP_DEFINITIONS} ${LWIP_MBEDTLS_DEFINITIONS}) 22 | target_link_libraries(example_app ${LWIP_SANITIZER_LIBS} lwipcontribexamples lwipcontribapps lwipcontribaddons lwipallapps lwipcontribportunix lwipcore lwipmbedtls) 23 | 24 | add_executable(makefsdata ${lwipmakefsdata_SRCS}) 25 | target_compile_options(makefsdata PRIVATE ${LWIP_COMPILER_FLAGS}) 26 | target_include_directories(makefsdata PRIVATE ${LWIP_INCLUDE_DIRS}) 27 | target_link_libraries(makefsdata ${LWIP_SANITIZER_LIBS}) 28 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/contrib/ports/unix/example_app/iteropts.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | LOGFILE=iteropts.log 4 | EXAPPDIR=../../../examples/example_app 5 | RETVAL=0 6 | 7 | pushd `dirname "$0"` 8 | pwd 9 | echo Starting Iteropts run >> $LOGFILE 10 | for f in $EXAPPDIR/test_configs/*.h 11 | do 12 | echo Cleaning... 13 | make clean > /dev/null 14 | BUILDLOG=$(basename "$f" ".h").log 15 | echo testing $f 16 | echo testing $f >> $LOGFILE 17 | rm -f $EXAPPDIR/lwipopts_test.h 18 | # cat the file to update its timestamp 19 | cat $f > $EXAPPDIR/lwipopts_test.h 20 | make TESTFLAGS="-DLWIP_OPTTEST_FILE -Wno-documentation" -j 4 1> $BUILDLOG 2>&1 21 | ERR=$? 22 | if [ $ERR != 0 ]; then 23 | cat $BUILDLOG 24 | echo file $f failed with $ERR >> $LOGFILE 25 | echo ++++++++ $f FAILED +++++++ 26 | RETVAL=1 27 | fi 28 | echo test $f done >> $LOGFILE 29 | done 30 | echo done, cleaning 31 | make clean > /dev/null 32 | popd 33 | echo Exit value: $RETVAL 34 | exit $RETVAL 35 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/contrib/ports/unix/lib/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.8) 2 | 3 | project(lwip C) 4 | 5 | set (BUILD_SHARED_LIBS ON) 6 | 7 | if (NOT CMAKE_SYSTEM_NAME STREQUAL "Linux" AND NOT CMAKE_SYSTEM_NAME STREQUAL "GNU") 8 | message(FATAL_ERROR "Lwip shared library is only working on Linux or the Hurd") 9 | endif() 10 | 11 | set(LWIP_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../../..) 12 | include(${LWIP_DIR}/contrib/ports/CMakeCommon.cmake) 13 | 14 | set (LWIP_DEFINITIONS -DLWIP_DEBUG) 15 | set (LWIP_INCLUDE_DIRS 16 | "${LWIP_DIR}/src/include" 17 | "${LWIP_CONTRIB_DIR}/" 18 | "${LWIP_CONTRIB_DIR}/ports/unix/port/include" 19 | "${CMAKE_CURRENT_SOURCE_DIR}/" 20 | ) 21 | 22 | set (LWIP_EXCLUDE_SLIPIF TRUE) 23 | include(${LWIP_CONTRIB_DIR}/ports/unix/Filelists.cmake) 24 | include(${LWIP_DIR}/src/Filelists.cmake) 25 | 26 | add_library(lwip ${lwipnoapps_SRCS} ${lwipcontribportunix_SRCS} ${lwipcontribportunixnetifs_SRCS}) 27 | target_compile_options(lwip PRIVATE ${LWIP_COMPILER_FLAGS}) 28 | target_compile_definitions(lwip PRIVATE ${LWIP_DEFINITIONS} ${LWIP_MBEDTLS_DEFINITIONS}) 29 | target_include_directories(lwip PRIVATE ${LWIP_INCLUDE_DIRS} ${LWIP_MBEDTLS_INCLUDE_DIRS}) 30 | target_link_libraries(lwip ${LWIP_SANITIZER_LIBS}) 31 | 32 | find_library(LIBPTHREAD pthread) 33 | target_link_libraries(lwip ${LIBPTHREAD}) 34 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/contrib/ports/unix/lib/README: -------------------------------------------------------------------------------- 1 | This directory contains an example of how to compile lwIP as a shared library 2 | on Linux. 3 | 4 | Some brief instructions: 5 | 6 | * Compile the code: 7 | 8 | > mkdir build 9 | > cd build 10 | > cmake .. 11 | > make clean all 12 | 13 | This should produce liblwip.so. This is the shared library. 14 | 15 | * Link an application against the shared library 16 | 17 | If you're using gcc you can do this by including -llwip in your link command. 18 | 19 | * Run your application 20 | 21 | Ensure that LD_LIBRARY_PATH includes the directory that contains liblwip.so 22 | (ie. this directory) 23 | 24 | 25 | If you are unsure about shared libraries and libraries on linux in 26 | general, you might find this HOWTO useful: 27 | 28 | 29 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/contrib/ports/unix/port/include/netif/list.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef LWIP_LIST_H 3 | #define LWIP_LIST_H 4 | 5 | struct elem; 6 | 7 | struct list { 8 | struct elem *first, *last; 9 | int size, elems; 10 | }; 11 | 12 | struct elem { 13 | struct elem *next; 14 | void *data; 15 | }; 16 | 17 | struct list *list_new(int size); 18 | int list_push(struct list *list, void *data); 19 | void *list_pop(struct list *list); 20 | void *list_first(struct list *list); 21 | int list_elems(struct list *list); 22 | void list_delete(struct list *list); 23 | int list_remove(struct list *list, void *elem); 24 | void list_map(struct list *list, void (* func)(void *arg)); 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/contrib/ports/unix/posixlib/Uninstall.cmake: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.13) 2 | set(MANIFEST "${CMAKE_CURRENT_BINARY_DIR}/install_manifest.txt") 3 | 4 | if(NOT EXISTS ${MANIFEST}) 5 | message(FATAL_ERROR "Cannot find install manifest: '${MANIFEST}'") 6 | endif() 7 | 8 | file(STRINGS ${MANIFEST} files) 9 | foreach(file ${files}) 10 | if(EXISTS ${file} OR IS_SYMLINK ${file}) 11 | message(STATUS "Removing: ${file}") 12 | 13 | execute_process( 14 | COMMAND rm -f ${file} 15 | RESULT_VARIABLE retcode 16 | ) 17 | 18 | if(NOT "${retcode}" STREQUAL "0") 19 | message(WARNING "Failed to remove: ${file}") 20 | endif() 21 | endif() 22 | endforeach(file) 23 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/contrib/ports/unix/posixlib/include/posix/inet.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d-el/PS3604L_Panel/e498f5e43476461b4933d39cc9d6ee77232ff84f/lib/lwip/lwip-STABLE-2_2_0_RELEASE/contrib/ports/unix/posixlib/include/posix/inet.h -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/contrib/ports/unix/posixlib/include/posix/sockets.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d-el/PS3604L_Panel/e498f5e43476461b4933d39cc9d6ee77232ff84f/lib/lwip/lwip-STABLE-2_2_0_RELEASE/contrib/ports/unix/posixlib/include/posix/sockets.h -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/contrib/ports/unix/posixlib/lwipopts.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d-el/PS3604L_Panel/e498f5e43476461b4933d39cc9d6ee77232ff84f/lib/lwip/lwip-STABLE-2_2_0_RELEASE/contrib/ports/unix/posixlib/lwipopts.h -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/contrib/ports/unix/setup-tapif: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # This script needs bridge-util debian package or similar 4 | # for other distros. 5 | 6 | # Run using "source setup-tapif" to get exported PRECONFIGURED_TAPIF variable 7 | # Alternatively, add "export PRECONFIGURED_TAPIF=tap0" to ~/.bashrc 8 | 9 | # http://backreference.org/2010/03/26/tuntap-interface-tutorial/ 10 | 11 | # After executing this script, start example_app. 12 | # Enter 192.168.1.200 or "http://lwip.local/" (Zeroconf) 13 | # in your webbrowser to see example_app webpage. 14 | 15 | export PRECONFIGURED_TAPIF=tap0 16 | 17 | sudo ip tuntap add dev $PRECONFIGURED_TAPIF mode tap user `whoami` 18 | sudo ip link set $PRECONFIGURED_TAPIF up 19 | sudo brctl addbr lwipbridge 20 | sudo brctl addif lwipbridge $PRECONFIGURED_TAPIF 21 | sudo ip addr add 192.168.1.1/24 dev lwipbridge 22 | sudo ip link set dev lwipbridge up 23 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/contrib/ports/win32/check/check_stdint.h: -------------------------------------------------------------------------------- 1 | /* deliberateliy empty */ 2 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/contrib/ports/win32/check/config.h: -------------------------------------------------------------------------------- 1 | /* config.h for check-0.11.0 on win32 under MSVC/MinGW */ 2 | 3 | #ifdef _MSC_VER 4 | 5 | typedef unsigned int pid_t; 6 | typedef unsigned int uint32_t; 7 | 8 | typedef int ssize_t; 9 | 10 | #define HAVE_DECL_STRDUP 1 11 | #define HAVE_DECL_FILENO 1 12 | #define HAVE_DECL_PUTENV 1 13 | 14 | #define _CRT_SECURE_NO_WARNINGS 15 | 16 | /* disable some warnings */ 17 | #pragma warning (disable: 4090) /* const assigned to non-const */ 18 | #pragma warning (disable: 4996) /* fileno is deprecated */ 19 | 20 | #endif /* _ MSC_VER */ 21 | 22 | 23 | #define LWIP_UNITTESTS_NOFORK 24 | 25 | #include 26 | #include 27 | 28 | typedef unsigned int clockid_t; 29 | typedef unsigned int timer_t; 30 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/contrib/ports/win32/check/stdbool.h: -------------------------------------------------------------------------------- 1 | #ifndef MY_STDBOOL_H 2 | #define MY_STDBOOL_H 3 | 4 | typedef int bool; 5 | #define true 1 6 | #define false 0 7 | #define __bool_true_false_are_defined 1 8 | 9 | #endif 10 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/contrib/ports/win32/check/sys/time.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_SYS__TIME_H 2 | #define LWIP_SYS__TIME_H 3 | 4 | #include /* time_t */ 5 | 6 | struct timeval { 7 | time_t tv_sec; /* seconds */ 8 | long tv_usec; /* and microseconds */ 9 | }; 10 | int gettimeofday(struct timeval* tp, void* tzp); 11 | 12 | #endif 13 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/contrib/ports/win32/check/unistd.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_UNISTD_H 2 | #define LWIP_UNISTD_H 3 | 4 | /* include io.h for read() and write() */ 5 | #include 6 | 7 | #endif 8 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/contrib/ports/win32/example_app/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include(${LWIP_DIR}/contrib/ports/CMakeCommon.cmake) 2 | 3 | set (LWIP_INCLUDE_DIRS 4 | "${LWIP_DIR}/src/include" 5 | "${LWIP_DIR}/contrib/" 6 | "${LWIP_DIR}/contrib/ports/win32/include" 7 | "${LWIP_DIR}/contrib/examples/example_app" 8 | ) 9 | 10 | include(${LWIP_DIR}/src/Filelists.cmake) 11 | include(${LWIP_DIR}/contrib/Filelists.cmake) 12 | include(${LWIP_DIR}/contrib/ports/win32/Filelists.cmake) 13 | 14 | if(NOT EXISTS ${LWIP_DIR}/contrib/examples/example_app/lwipcfg.h) 15 | message(WARNING "${LWIP_DIR}/contrib/examples/example_app is missing lwipcfg.h 16 | Copy ${LWIP_DIR}/contrib/examples/example_app/lwipcfg.h.example to ${LWIP_DIR}/contrib/examples/example_app/lwipcfg.h and edit appropriately") 17 | endif() 18 | add_executable(example_app ${LWIP_DIR}/contrib/examples/example_app/test.c default_netif.c) 19 | target_include_directories(example_app PRIVATE ${LWIP_INCLUDE_DIRS}) 20 | target_compile_options(example_app PRIVATE ${LWIP_COMPILER_FLAGS}) 21 | target_compile_definitions(example_app PRIVATE ${LWIP_DEFINITIONS} ${LWIP_MBEDTLS_DEFINITIONS}) 22 | target_link_libraries(example_app ${LWIP_SANITIZER_LIBS} lwipallapps lwipcontribexamples lwipcontribapps lwipcontribaddons lwipcontribportwindows lwipcore lwipmbedtls) 23 | 24 | add_executable(makefsdata ${lwipmakefsdata_SRCS}) 25 | target_compile_options(makefsdata PRIVATE ${LWIP_COMPILER_FLAGS}) 26 | target_include_directories(makefsdata PRIVATE ${LWIP_INCLUDE_DIRS}) 27 | target_link_libraries(makefsdata ${LWIP_SANITIZER_LIBS} lwipcore lwipcontribportwindows) 28 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/contrib/ports/win32/include/arch/bpstruct.h: -------------------------------------------------------------------------------- 1 | #pragma pack(push,1) 2 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/contrib/ports/win32/include/arch/epstruct.h: -------------------------------------------------------------------------------- 1 | #pragma pack(pop) 2 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/contrib/ports/win32/msvc/build_coverity.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | rem Usage: pass the path to cov-build.exe (with trailing backslash, without the exe) as first parameter 3 | rem ATTENTION: this deletes the output folder "cov-int" and the output file "cov-int.zip" first! 4 | 5 | set devenv="%ProgramFiles%\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe" 6 | if not exist %devenv% set devenv="%ProgramFiles%\Microsoft Visual Studio 10.0\Common7\IDE\vcexpress.exe" 7 | if not exist %devenv% set devenv="%ProgramFiles(x86)%\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe" 8 | if not exist %devenv% set devenv="%ProgramFiles(x86)%\Microsoft Visual Studio 10.0\Common7\IDE\vcexpress.exe" 9 | set covbuild=%1cov-build.exe 10 | set covoutput=cov-int 11 | set zip7="c:\Program Files\7-Zip\7z.exe" 12 | 13 | pushd %~dp0 14 | 15 | if exist %covoutput% rd /s /q %covoutput% 16 | if exist %covoutput%.zip del %covoutput%.zip 17 | 18 | %covbuild% --dir %covoutput% %devenv% lwip_test.sln /build Debug || goto error 19 | 20 | if exist %zip7% goto dozip 21 | echo error: 7zip not found at \"%zip7% 22 | goto error 23 | :dozip 24 | %zip7% a %covoutput%.zip %covoutput% 25 | :error 26 | popd -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/contrib/ports/win32/msvc/lwIP_pcapif.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {0d38b8c3-e694-4572-89b8-fc6e825a092d} 6 | cpp;c;cxx;rc;def;r;odl;idl;hpj;bat 7 | 8 | 9 | {e5ce29d5-319e-4e99-978b-b88e8d6167e4} 10 | 11 | 12 | 13 | 14 | Source Files 15 | 16 | 17 | Source Files 18 | 19 | 20 | 21 | 22 | Header Files 23 | 24 | 25 | Header Files 26 | 27 | 28 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/contrib/ports/win32/msvc/makefsdata.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | 10 | 11 | Quelldateien 12 | 13 | 14 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/contrib/ports/win32/pcapif.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_PCAPIF_H 2 | #define LWIP_PCAPIF_H 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #include "lwip/err.h" 9 | 10 | /** Set to 1 to let rx use an own thread (only for NO_SYS==0). 11 | * If set to 0, ethernetif_poll is used to poll for packets. 12 | */ 13 | #ifndef PCAPIF_RX_USE_THREAD 14 | #define PCAPIF_RX_USE_THREAD !NO_SYS 15 | #endif 16 | #if PCAPIF_RX_USE_THREAD && NO_SYS 17 | #error "Can't create a dedicated RX thread with NO_SYS==1" 18 | #endif 19 | 20 | struct netif; 21 | 22 | err_t pcapif_init (struct netif *netif); 23 | void pcapif_shutdown(struct netif *netif); 24 | #if !PCAPIF_RX_USE_THREAD 25 | void pcapif_poll (struct netif *netif); 26 | #endif /* !PCAPIF_RX_USE_THREAD */ 27 | 28 | #ifdef __cplusplus 29 | } 30 | #endif 31 | 32 | #endif /* LWIP_PCAPIF_H */ 33 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/contrib/ports/win32/pcapif_helper.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_PCAPIF_HELPER_H 2 | #define LWIP_PCAPIF_HELPER_H 3 | 4 | #include 5 | 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | struct pcapifh_linkstate; 11 | 12 | enum pcapifh_link_event { 13 | PCAPIF_LINKEVENT_UNKNOWN, 14 | PCAPIF_LINKEVENT_UP, 15 | PCAPIF_LINKEVENT_DOWN 16 | }; 17 | 18 | struct pcapifh_linkstate* pcapifh_linkstate_init(char *adapter_name); 19 | enum pcapifh_link_event pcapifh_linkstate_get(struct pcapifh_linkstate* state); 20 | void pcapifh_linkstate_close(struct pcapifh_linkstate* state); 21 | 22 | void *pcapifh_alloc_readonly_copy(void *data, size_t len); 23 | void pcapifh_free_readonly_mem(void *data); 24 | 25 | void pcapifh_init_npcap(void); 26 | 27 | #ifdef __cplusplus 28 | } 29 | #endif 30 | 31 | #endif /* LWIP_PCAPIF_HELPER_H */ 32 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/contrib/ports/win32/readme.txt: -------------------------------------------------------------------------------- 1 | lwIP for Win32 2 | 3 | This is an example port of lwIP for Win32. It uses WinPCAP to send & receive packets. 4 | To compile it, use the MSVC projects in the 'msvc' subdir, the CMake files, or the Makefile 5 | in the 'mingw' subdir. 6 | 7 | For all compilers/build systems: 8 | - you have to set an environment variable PCAP_DIR pointing to the WinPcap Developer's 9 | Pack (containing 'include' and 'lib') 10 | alternatively, place the WinPcap Developer's pack next to the "lwip" folder: 11 | "winpcap\WpdPack" 12 | 13 | You also will have to copy the file 'contrib/examples/example_app/lwipcfg.h.example' to 14 | 'contrib/examples/example_app/lwipcfg.h' and modify to suit your needs (WinPcap adapter number, 15 | IP configuration, applications...). 16 | 17 | Included in the contrib\ports\win32 directory is the network interface driver 18 | using the winpcap library. 19 | 20 | lwIP: http://savannah.nongnu.org/projects/lwip/ 21 | WinPCap: https://www.winpcap.org/devel.htm 22 | Visual C++: http://www.microsoft.com/express/download/ 23 | 24 | To compile the unittests (msvc\lwIP_unittests.sln), download check (tested with v0.11.0) from 25 | https://github.com/libcheck/check/releases/ 26 | and place it in a folder "check" next to the "contrib" folder. 27 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/doc/FILES: -------------------------------------------------------------------------------- 1 | doxygen/ - Configuration files and scripts to create the lwIP doxygen source 2 | documentation (found at http://www.nongnu.org/lwip/) 3 | 4 | savannah.txt - How to obtain the current development source code. 5 | contrib.txt - How to contribute to lwIP as a developer. 6 | ppp.txt - Documentation of the PPP interface for lwIP. 7 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/doc/ZeroCopyRx.c: -------------------------------------------------------------------------------- 1 | typedef struct my_custom_pbuf 2 | { 3 | struct pbuf_custom p; 4 | void* dma_descriptor; 5 | } my_custom_pbuf_t; 6 | 7 | LWIP_MEMPOOL_DECLARE(RX_POOL, 10, sizeof(my_custom_pbuf_t), "Zero-copy RX PBUF pool"); 8 | 9 | void my_pbuf_free_custom(void* p) 10 | { 11 | SYS_ARCH_DECL_PROTECT(old_level); 12 | 13 | my_custom_pbuf_t* my_puf = (my_custom_pbuf_t*)p; 14 | 15 | // invalidate data cache here - lwIP and/or application may have written into buffer! 16 | // (invalidate is faster than flushing, and no one needs the correct data in the buffer) 17 | invalidate_cpu_cache(p->payload, p->tot_len); 18 | 19 | SYS_ARCH_PROTECT(old_level); 20 | free_rx_dma_descriptor(my_pbuf->dma_descriptor); 21 | LWIP_MEMPOOL_FREE(RX_POOL, my_pbuf); 22 | SYS_ARCH_UNPROTECT(old_level); 23 | } 24 | 25 | void eth_rx_irq() 26 | { 27 | dma_descriptor* dma_desc = get_RX_DMA_descriptor_from_ethernet(); 28 | my_custom_pbuf_t* my_pbuf = (my_custom_pbuf_t*)LWIP_MEMPOOL_ALLOC(RX_POOL); 29 | 30 | my_pbuf->p.custom_free_function = my_pbuf_free_custom; 31 | my_pbuf->dma_descriptor = dma_desc; 32 | 33 | invalidate_cpu_cache(dma_desc->rx_data, dma_desc->rx_length); 34 | 35 | struct pbuf* p = pbuf_alloced_custom(PBUF_RAW, 36 | dma_desc->rx_length, 37 | PBUF_REF, 38 | &my_pbuf->p, 39 | dma_desc->rx_data, 40 | dma_desc->max_buffer_size); 41 | 42 | if(netif->input(p, netif) != ERR_OK) { 43 | pbuf_free(p); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/doc/doxygen/generate.bat: -------------------------------------------------------------------------------- 1 | doxygen lwip.Doxyfile 2 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/doc/doxygen/generate.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | doxygen lwip.Doxyfile 4 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/doc/doxygen/output/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Redirection 5 | 6 | 7 | 8 | index.html 9 | 10 | 11 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/src/FILES: -------------------------------------------------------------------------------- 1 | api/ - The code for the high-level wrapper API. Not needed if 2 | you use the lowel-level call-back/raw API. 3 | 4 | apps/ - Higher layer applications that are specifically programmed 5 | with the lwIP low-level raw API. 6 | 7 | core/ - The core of the TPC/IP stack; protocol implementations, 8 | memory and buffer management, and the low-level raw API. 9 | 10 | include/ - lwIP include files. 11 | 12 | netif/ - Generic network interface device drivers are kept here. 13 | 14 | For more information on the various subdirectories, check the FILES 15 | file in each directory. 16 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/src/apps/http/fs/404.html: -------------------------------------------------------------------------------- 1 | 2 | lwIP - A Lightweight TCP/IP Stack 3 | 4 | 5 | 6 | 19 |
7 | SICS logo 9 | 10 |

lwIP - A Lightweight TCP/IP Stack

11 |

404 - Page not found

12 |

13 | Sorry, the page you are requesting was not found on this 14 | server. 15 |

16 |
17 |   18 |
20 | 21 | 22 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/src/apps/http/fs/img/sics.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d-el/PS3604L_Panel/e498f5e43476461b4933d39cc9d6ee77232ff84f/lib/lwip/lwip-STABLE-2_2_0_RELEASE/src/apps/http/fs/img/sics.gif -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/src/apps/http/makefsdata/readme.txt: -------------------------------------------------------------------------------- 1 | This directory contains a script ('makefsdata') to create C code suitable for 2 | httpd for given html pages (or other files) in a directory. 3 | 4 | There is also a plain C console application doing the same and extended a bit. 5 | 6 | Usage: htmlgen [targetdir] [-s] [-i]s 7 | targetdir: relative or absolute path to files to convert 8 | switch -s: toggle processing of subdirectories (default is on) 9 | switch -e: exclude HTTP header from file (header is created at runtime, default is on) 10 | switch -11: include HTTP 1.1 header (1.0 is default) 11 | 12 | if targetdir not specified, makefsdata will attempt to 13 | process files in subdirectory 'fs'. 14 | 15 | The C version of this program can optionally store the none-SSI files in 16 | a compressed form in which they are also sent to the web client (which 17 | must support the Deflate content encoding). Files that grow during compression 18 | (due to being not compressible well), will stored umcompressed automatically. 19 | In order to do so, compile the program with MAKEFS_SUPPORT_DEFLATE set to 1. You must 20 | manually download minizip.c for this to work. As an alternative, you can additionally 21 | define MAKEFS_SUPPORT_DEFLATE_ZLIB to use your system's zlib instead. 22 | Compression of .html, .js, .css and .svg files usually yields very good compression 23 | rates and is a great way of reducing your program's size. 24 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/src/include/lwip/apps/FILES: -------------------------------------------------------------------------------- 1 | This directory contains application headers. 2 | Every application shall provide one api file APP.h and optionally one options file APP_opts.h 3 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/src/include/lwip/apps/snmp_snmpv2_framework.h: -------------------------------------------------------------------------------- 1 | /* 2 | Generated by LwipMibCompiler 3 | */ 4 | 5 | #ifndef LWIP_HDR_APPS_SNMP_FRAMEWORK_MIB_H 6 | #define LWIP_HDR_APPS_SNMP_FRAMEWORK_MIB_H 7 | 8 | #include "lwip/apps/snmp_opts.h" 9 | #if LWIP_SNMP 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif /* __cplusplus */ 14 | 15 | #include "lwip/apps/snmp_core.h" 16 | 17 | extern const struct snmp_obj_id usmNoAuthProtocol; 18 | extern const struct snmp_obj_id usmHMACMD5AuthProtocol; 19 | extern const struct snmp_obj_id usmHMACSHAAuthProtocol; 20 | 21 | extern const struct snmp_obj_id usmNoPrivProtocol; 22 | extern const struct snmp_obj_id usmDESPrivProtocol; 23 | extern const struct snmp_obj_id usmAESPrivProtocol; 24 | 25 | extern const struct snmp_mib snmpframeworkmib; 26 | 27 | #ifdef __cplusplus 28 | } 29 | #endif /* __cplusplus */ 30 | 31 | #endif /* LWIP_SNMP */ 32 | #endif /* LWIP_HDR_APPS_SNMP_FRAMEWORK_MIB_H */ 33 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/src/include/lwip/apps/snmp_snmpv2_usm.h: -------------------------------------------------------------------------------- 1 | /* 2 | Generated by LwipMibCompiler 3 | */ 4 | 5 | #ifndef LWIP_HDR_APPS_SNMP_USER_BASED_SM_MIB_H 6 | #define LWIP_HDR_APPS_SNMP_USER_BASED_SM_MIB_H 7 | 8 | #include "lwip/apps/snmp_opts.h" 9 | #if LWIP_SNMP 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif /* __cplusplus */ 14 | 15 | #include "lwip/apps/snmp_core.h" 16 | 17 | extern const struct snmp_mib snmpusmmib; 18 | 19 | #ifdef __cplusplus 20 | } 21 | #endif /* __cplusplus */ 22 | 23 | #endif /* LWIP_SNMP */ 24 | #endif /* LWIP_HDR_APPS_SNMP_USER_BASED_SM_MIB_H */ 25 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/src/include/netif/etharp.h: -------------------------------------------------------------------------------- 1 | /* ARP has been moved to core/ipv4, provide this #include for compatibility only */ 2 | #include "lwip/etharp.h" 3 | #include "netif/ethernet.h" 4 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/src/netif/FILES: -------------------------------------------------------------------------------- 1 | This directory contains generic network interface device drivers that 2 | do not contain any hardware or architecture specific code. The files 3 | are: 4 | 5 | ethernet.c 6 | Shared code for Ethernet based interfaces. 7 | 8 | lowpan6.c 9 | A 6LoWPAN implementation as a netif. 10 | 11 | lowpan6_ble.c 12 | A 6LoWPAN over Bluetooth Low Energy (BLE) implementation as netif, 13 | according to RFC-7668. 14 | 15 | slipif.c 16 | A generic implementation of the SLIP (Serial Line IP) 17 | protocol. It requires a sio (serial I/O) module to work. 18 | 19 | ppp/ Point-to-Point Protocol stack 20 | The lwIP PPP support is based from pppd (http://ppp.samba.org) with 21 | huge changes to match code size and memory requirements for embedded 22 | devices. Please read /doc/ppp.txt and ppp/PPPD_FOLLOWUP for a detailed 23 | explanation. 24 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/src/netif/ppp/polarssl/README: -------------------------------------------------------------------------------- 1 | About PolarSSL files into lwIP PPP support 2 | ------------------------------------------ 3 | 4 | This folder contains some files fetched from the latest BSD release of 5 | the PolarSSL project (PolarSSL 0.10.1-bsd) for ciphers and encryption 6 | methods we need for lwIP PPP support. 7 | 8 | The PolarSSL files were cleaned to contain only the necessary struct 9 | fields and functions needed for lwIP. 10 | 11 | The PolarSSL API was not changed at all, so if you are already using 12 | PolarSSL you can choose to skip the compilation of the included PolarSSL 13 | library into lwIP. 14 | 15 | If you are not using the embedded copy you must include external 16 | libraries into your arch/cc.h port file. 17 | 18 | Beware of the stack requirements which can be a lot larger if you are not 19 | using our cleaned PolarSSL library. 20 | 21 | 22 | PolarSSL project website: http://polarssl.org/ 23 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/test/fuzz/config.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d-el/PS3604L_Panel/e498f5e43476461b4933d39cc9d6ee77232ff84f/lib/lwip/lwip-STABLE-2_2_0_RELEASE/test/fuzz/config.h -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/test/fuzz/inputs/arp/arp_req.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d-el/PS3604L_Panel/e498f5e43476461b4933d39cc9d6ee77232ff84f/lib/lwip/lwip-STABLE-2_2_0_RELEASE/test/fuzz/inputs/arp/arp_req.bin -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/test/fuzz/inputs/icmp/icmp_ping.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d-el/PS3604L_Panel/e498f5e43476461b4933d39cc9d6ee77232ff84f/lib/lwip/lwip-STABLE-2_2_0_RELEASE/test/fuzz/inputs/icmp/icmp_ping.bin -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/test/fuzz/inputs/ipv6/neighbor_solicitation.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d-el/PS3604L_Panel/e498f5e43476461b4933d39cc9d6ee77232ff84f/lib/lwip/lwip-STABLE-2_2_0_RELEASE/test/fuzz/inputs/ipv6/neighbor_solicitation.bin -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/test/fuzz/inputs/ipv6/router_adv.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d-el/PS3604L_Panel/e498f5e43476461b4933d39cc9d6ee77232ff84f/lib/lwip/lwip-STABLE-2_2_0_RELEASE/test/fuzz/inputs/ipv6/router_adv.bin -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/test/fuzz/inputs/tcp/tcp_syn.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d-el/PS3604L_Panel/e498f5e43476461b4933d39cc9d6ee77232ff84f/lib/lwip/lwip-STABLE-2_2_0_RELEASE/test/fuzz/inputs/tcp/tcp_syn.bin -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/test/fuzz/inputs/udp/udp_port_5000.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d-el/PS3604L_Panel/e498f5e43476461b4933d39cc9d6ee77232ff84f/lib/lwip/lwip-STABLE-2_2_0_RELEASE/test/fuzz/inputs/udp/udp_port_5000.bin -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/test/fuzz/output_to_pcap.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ -z "$1" ] 4 | then 5 | echo "This script will make pcap files from the afl-fuzz crash/hang files" 6 | echo "It needs hexdump and text2pcap" 7 | echo "Please give output directory as argument" 8 | exit 2 9 | fi 10 | 11 | for i in `ls $1/crashes/id*` 12 | do 13 | PCAPNAME=`echo $i | grep pcap` 14 | if [ -z "$PCAPNAME" ]; then 15 | hexdump -C $i > $1/$$.tmp 16 | text2pcap $1/$$.tmp ${i}.pcap 17 | fi 18 | done 19 | for i in `ls $1/hangs/id*` 20 | do 21 | PCAPNAME=`echo $i | grep pcap` 22 | if [ -z "$PCAPNAME" ]; then 23 | hexdump -C $i > $1/$$.tmp 24 | text2pcap $1/$$.tmp ${i}.pcap 25 | fi 26 | done 27 | rm -f $1/$$.tmp 28 | 29 | echo 30 | echo "Created pcap files:" 31 | ls $1/*/*.pcap 32 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/test/unit/Filelists.cmake: -------------------------------------------------------------------------------- 1 | # This file is indended to be included in end-user CMakeLists.txt 2 | # include(/path/to/Filelists.cmake) 3 | # It assumes the variable LWIP_DIR is defined pointing to the 4 | # root path of lwIP sources. 5 | # 6 | # This file is NOT designed (on purpose) to be used as cmake 7 | # subdir via add_subdirectory() 8 | # The intention is to provide greater flexibility to users to 9 | # create their own targets using the *_SRCS variables. 10 | 11 | if(NOT ${CMAKE_VERSION} VERSION_LESS "3.10.0") 12 | include_guard(GLOBAL) 13 | endif() 14 | 15 | set(LWIP_TESTDIR ${LWIP_DIR}/test/unit) 16 | set(LWIP_TESTFILES 17 | ${LWIP_TESTDIR}/lwip_unittests.c 18 | ${LWIP_TESTDIR}/api/test_sockets.c 19 | ${LWIP_TESTDIR}/arch/sys_arch.c 20 | ${LWIP_TESTDIR}/core/test_def.c 21 | ${LWIP_TESTDIR}/core/test_dns.c 22 | ${LWIP_TESTDIR}/core/test_mem.c 23 | ${LWIP_TESTDIR}/core/test_netif.c 24 | ${LWIP_TESTDIR}/core/test_pbuf.c 25 | ${LWIP_TESTDIR}/core/test_timers.c 26 | ${LWIP_TESTDIR}/dhcp/test_dhcp.c 27 | ${LWIP_TESTDIR}/etharp/test_etharp.c 28 | ${LWIP_TESTDIR}/ip4/test_ip4.c 29 | ${LWIP_TESTDIR}/ip6/test_ip6.c 30 | ${LWIP_TESTDIR}/mdns/test_mdns.c 31 | ${LWIP_TESTDIR}/mqtt/test_mqtt.c 32 | ${LWIP_TESTDIR}/tcp/tcp_helper.c 33 | ${LWIP_TESTDIR}/tcp/test_tcp_oos.c 34 | ${LWIP_TESTDIR}/tcp/test_tcp_state.c 35 | ${LWIP_TESTDIR}/tcp/test_tcp.c 36 | ${LWIP_TESTDIR}/udp/test_udp.c 37 | ${LWIP_TESTDIR}/ppp/test_pppos.c 38 | ) 39 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/test/unit/Makefile: -------------------------------------------------------------------------------- 1 | # Shortcuts to building and running tests on unix platforms. 2 | # Output files will be written to the directory listed below. 3 | 4 | all: 5 | cd ../../contrib/ports/unix/check/ && $(MAKE) 6 | 7 | check: 8 | cd ../../contrib/ports/unix/check/ && $(MAKE) check 9 | 10 | clean: 11 | cd ../../contrib/ports/unix/check/ && $(MAKE) clean 12 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/test/unit/api/test_sockets.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_HDR_TEST_SOCKETS_H 2 | #define LWIP_HDR_TEST_SOCKETS_H 3 | 4 | #include "../lwip_check.h" 5 | 6 | Suite *sockets_suite(void); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/test/unit/core/test_def.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_HDR_TEST_DEF_H 2 | #define LWIP_HDR_TEST_DEF_H 3 | 4 | #include "../lwip_check.h" 5 | 6 | Suite *def_suite(void); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/test/unit/core/test_dns.c: -------------------------------------------------------------------------------- 1 | #include "test_dns.h" 2 | 3 | #include "lwip/dns.h" 4 | 5 | /* Setups/teardown functions */ 6 | 7 | static void 8 | dns_setup(void) 9 | { 10 | } 11 | 12 | static void 13 | dns_teardown(void) 14 | { 15 | } 16 | 17 | /* Test functions */ 18 | 19 | START_TEST(test_dns_set_get_server) 20 | { 21 | int n; 22 | LWIP_UNUSED_ARG(_i); 23 | 24 | for (n = 0; n < 256; n++) { 25 | u8_t i = (u8_t)n; 26 | ip_addr_t server; 27 | /* Should return a zeroed address for any index */ 28 | fail_unless(dns_getserver(i)); 29 | fail_unless(ip_addr_isany(dns_getserver(i))); 30 | 31 | /* Should accept setting address for any index, and ignore if out of range */ 32 | IP_ADDR4(&server, 10, 0, 0, i); 33 | dns_setserver(i, &server); 34 | fail_unless(dns_getserver(i)); 35 | if (i < DNS_MAX_SERVERS) { 36 | fail_unless(ip_addr_eq(dns_getserver(i), &server) == 1); 37 | } else { 38 | fail_unless(ip_addr_isany(dns_getserver(i))); 39 | } 40 | } 41 | } 42 | END_TEST 43 | 44 | /** Create the suite including all tests for this module */ 45 | Suite * 46 | dns_suite(void) 47 | { 48 | testfunc tests[] = { 49 | TESTFUNC(test_dns_set_get_server) 50 | }; 51 | return create_suite("DNS", tests, sizeof(tests)/sizeof(testfunc), dns_setup, dns_teardown); 52 | } 53 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/test/unit/core/test_dns.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_HDR_TEST_DNS_H 2 | #define LWIP_HDR_TEST_DNS_H 3 | 4 | #include "../lwip_check.h" 5 | 6 | Suite *dns_suite(void); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/test/unit/core/test_mem.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_HDR_TEST_MEM_H 2 | #define LWIP_HDR_TEST_MEM_H 3 | 4 | #include "../lwip_check.h" 5 | 6 | Suite *mem_suite(void); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/test/unit/core/test_netif.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_HDR_TEST_NETIF_H 2 | #define LWIP_HDR_TEST_NETIF_H 3 | 4 | #include "../lwip_check.h" 5 | 6 | Suite *netif_suite(void); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/test/unit/core/test_pbuf.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_HDR_TEST_PBUF_H 2 | #define LWIP_HDR_TEST_PBUF_H 3 | 4 | #include "../lwip_check.h" 5 | 6 | Suite *pbuf_suite(void); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/test/unit/core/test_timers.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_HDR_TEST_TIMERS_H 2 | #define LWIP_HDR_TEST_TIMERS_H 3 | 4 | #include "../lwip_check.h" 5 | 6 | Suite *timers_suite(void); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/test/unit/dhcp/test_dhcp.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_HDR_TEST_DHCP_H 2 | #define LWIP_HDR_TEST_DHCP_H 3 | 4 | #include "../lwip_check.h" 5 | 6 | Suite* dhcp_suite(void); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/test/unit/etharp/test_etharp.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_HDR_TEST_ETHARP_H 2 | #define LWIP_HDR_TEST_ETHARP_H 3 | 4 | #include "../lwip_check.h" 5 | 6 | Suite* etharp_suite(void); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/test/unit/ip4/test_ip4.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_HDR_TEST_IP4_H 2 | #define LWIP_HDR_TEST_IP4_H 3 | 4 | #include "../lwip_check.h" 5 | 6 | Suite* ip4_suite(void); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/test/unit/ip6/test_ip6.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_HDR_TEST_IP6_H 2 | #define LWIP_HDR_TEST_IP6_H 3 | 4 | #include "../lwip_check.h" 5 | 6 | Suite* ip6_suite(void); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/test/unit/mdns/test_mdns.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_HDR_TEST_MDNS_H__ 2 | #define LWIP_HDR_TEST_MDNS_H__ 3 | 4 | #include "../lwip_check.h" 5 | 6 | Suite* mdns_suite(void); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/test/unit/mqtt/test_mqtt.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_HDR_TEST_MQTT_H__ 2 | #define LWIP_HDR_TEST_MQTT_H__ 3 | 4 | #include "../lwip_check.h" 5 | 6 | Suite* mqtt_suite(void); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/test/unit/ppp/test_pppos.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_HDR_TEST_PPPOS_H 2 | #define LWIP_HDR_TEST_PPPOS_H 3 | 4 | #include "../lwip_check.h" 5 | #include "netif/ppp/ppp.h" 6 | 7 | #if PPP_SUPPORT && PPPOS_SUPPORT 8 | 9 | Suite* pppos_suite(void); 10 | 11 | #endif /* PPP_SUPPORT && PPPOS_SUPPORT */ 12 | 13 | #endif /* LWIP_HDR_TEST_PPPOS_H */ 14 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/test/unit/tcp/test_tcp.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_HDR_TEST_TCP_H 2 | #define LWIP_HDR_TEST_TCP_H 3 | 4 | #include "../lwip_check.h" 5 | 6 | Suite *tcp_suite(void); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/test/unit/tcp/test_tcp_oos.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_HDR_TEST_TCP_OOS_H 2 | #define LWIP_HDR_TEST_TCP_OOS_H 3 | 4 | #include "../lwip_check.h" 5 | 6 | Suite *tcp_oos_suite(void); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/test/unit/tcp/test_tcp_state.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_HDR_TEST_TCP_STATE_H 2 | #define LWIP_HDR_TEST_TCP_STATE_H 3 | 4 | #include "../lwip_check.h" 5 | 6 | Suite *tcp_state_suite(void); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /lib/lwip/lwip-STABLE-2_2_0_RELEASE/test/unit/udp/test_udp.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_HDR_TEST_UDP_H 2 | #define LWIP_HDR_TEST_UDP_H 3 | 4 | #include "../lwip_check.h" 5 | 6 | Suite* udp_suite(void); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /lib/lwip/port/ethernetif.h: -------------------------------------------------------------------------------- 1 | #ifndef __ETHERNETIF_H__ 2 | #define __ETHERNETIF_H__ 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #include "lwip/err.h" 9 | #include "lwip/netif.h" 10 | 11 | err_t ethernetif_init(struct netif *netif); 12 | 13 | #ifdef __cplusplus 14 | } 15 | #endif 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /lib/lwip/port/include/arch/bpstruct.h: -------------------------------------------------------------------------------- 1 | #pragma pack(push,1) -------------------------------------------------------------------------------- /lib/lwip/port/include/arch/epstruct.h: -------------------------------------------------------------------------------- 1 | #pragma pack(pop) -------------------------------------------------------------------------------- /libmodbus/.appveyor.yml: -------------------------------------------------------------------------------- 1 | ## Operating System (VM environment) ## 2 | platform: x64 3 | image: Visual Studio 2017 4 | 5 | ## Install Script ## 6 | install: 7 | - set CYGWIN_ROOT=C:\cygwin64 8 | - set PATH=%CYGWIN_ROOT%\bin;%PATH% 9 | - bash --version 10 | - bash -c 'autoreconf --version' 11 | - bash -c 'make --version' 12 | 13 | ## Disable MSBuild (default) ## 14 | build: off 15 | 16 | ## Build Script ## 17 | build_script: 18 | - bash autogen.sh 19 | - bash configure 20 | - bash -c 'make' 21 | 22 | ## Test Script ## 23 | test_script: 24 | - bash -c 'make check' 25 | -------------------------------------------------------------------------------- /libmodbus/.dir-locals.el: -------------------------------------------------------------------------------- 1 | ((nil . ((indent-tabs-mode . nil) 2 | (c-basic-offset . 4) 3 | (fill-column . 80)))) 4 | 5 | -------------------------------------------------------------------------------- /libmodbus/.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | *.swp 3 | *.o 4 | *.la 5 | *.lo 6 | *.log 7 | *.trs 8 | .deps 9 | .libs 10 | GPATH 11 | GRTAGS 12 | GSYMS 13 | GTAGS 14 | INSTALL 15 | Makefile 16 | Makefile.in 17 | /aclocal.m4 18 | /autom4te.cache 19 | /build-aux 20 | /config.* 21 | /configure 22 | /configure.scan 23 | /depcomp 24 | /install-sh 25 | /libtool 26 | /ltmain.sh 27 | /missing 28 | /libmodbus.pc 29 | /stamp-h1 30 | /*.sublime-* 31 | /.vscode 32 | src/modbus-version.h 33 | src/win32/modbus.dll.manifest 34 | tests/bandwidth-client 35 | tests/bandwidth-server-many-up 36 | tests/bandwidth-server-one 37 | tests/random-test-client 38 | tests/random-test-server 39 | tests/unit-test-client 40 | tests/unit-test.h 41 | tests/unit-test-server 42 | tests/version 43 | tests/stamp-h2 44 | doc/*.html 45 | doc/*.3 46 | doc/*.7 47 | -------------------------------------------------------------------------------- /libmodbus/.travis.yml: -------------------------------------------------------------------------------- 1 | language: c 2 | 3 | compiler: 4 | - gcc 5 | - clang 6 | 7 | script: ./autogen.sh && ./configure && make && make check 8 | -------------------------------------------------------------------------------- /libmodbus/AUTHORS: -------------------------------------------------------------------------------- 1 | Stéphane Raimbault 2 | Tobias Doerffel - CLA 3 | Florian Forster 4 | oldfaber 5 | Hannu Vuolasaho - CLA 6 | Michael Heimpold - CLA 7 | Jimmy Bergström - CLA 8 | Jakob Bysewski - CLA -------------------------------------------------------------------------------- /libmodbus/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(libmodbus STATIC 2 | src/modbus.c 3 | src/modbus-data.c 4 | src/modbus-rtu.c 5 | ) 6 | 7 | target_include_directories(libmodbus 8 | PUBLIC src 9 | ) 10 | 11 | target_compile_definitions(libmodbus PUBLIC -DLIB_MODBUS_MCU) 12 | 13 | target_compile_options(libmodbus PUBLIC "-Wno-unused-variable") 14 | 15 | target_link_libraries(libmodbus libmodbusport) 16 | -------------------------------------------------------------------------------- /libmodbus/doc/asciidoc.conf: -------------------------------------------------------------------------------- 1 | [paradef-default] 2 | literal-style=template="literalparagraph" 3 | 4 | [macros] 5 | (?su)[\\]?(?Plinkmb):(?P\S*?)\[(?P.*?)\]= 6 | 7 | ifdef::backend-docbook[] 8 | [linkmb-inlinemacro] 9 | {0%{target}} 10 | {0#} 11 | {0#{target}{0}} 12 | {0#} 13 | endif::backend-docbook[] 14 | 15 | ifdef::backend-xhtml11[] 16 | [linkmb-inlinemacro] 17 | {target}{0?({0})} 18 | endif::backend-xhtml11[] 19 | 20 | ifdef::doctype-manpage[] 21 | ifdef::backend-docbook[] 22 | [header] 23 | template::[header-declarations] 24 | 25 | 26 | {mantitle} 27 | {manvolnum} 28 | libmodbus 29 | v{libmodbus_version} 30 | libmodbus Manual 31 | 32 | 33 | {manname} 34 | {manpurpose} 35 | 36 | endif::backend-docbook[] 37 | endif::doctype-manpage[] 38 | 39 | ifdef::backend-xhtml11[] 40 | [footer] 41 | 42 | {disable-javascript%

} 43 | 49 | 50 | 51 | endif::backend-xhtml11[] 52 | -------------------------------------------------------------------------------- /libmodbus/doc/modbus_close.txt: -------------------------------------------------------------------------------- 1 | modbus_close(3) 2 | =============== 3 | 4 | 5 | NAME 6 | ---- 7 | modbus_close - close a Modbus connection 8 | 9 | 10 | SYNOPSIS 11 | -------- 12 | *void modbus_close(modbus_t *'ctx');* 13 | 14 | 15 | DESCRIPTION 16 | ----------- 17 | The *modbus_close()* function shall close the connection established with the 18 | backend set in the context. 19 | 20 | 21 | RETURN VALUE 22 | ------------ 23 | There is no return value. 24 | 25 | 26 | EXAMPLE 27 | ------- 28 | [source,c] 29 | ------------------- 30 | modbus_t *ctx; 31 | 32 | ctx = modbus_new_tcp("127.0.0.1", 502); 33 | if (modbus_connect(ctx) == -1) { 34 | fprintf(stderr, "Connection failed: %s\n", modbus_strerror(errno)); 35 | modbus_free(ctx); 36 | return -1; 37 | } 38 | 39 | modbus_close(ctx); 40 | modbus_free(ctx); 41 | ------------------- 42 | 43 | SEE ALSO 44 | -------- 45 | linkmb:modbus_connect[3] 46 | 47 | 48 | AUTHORS 49 | ------- 50 | The libmodbus documentation was written by Stéphane Raimbault 51 | 52 | -------------------------------------------------------------------------------- /libmodbus/doc/modbus_connect.txt: -------------------------------------------------------------------------------- 1 | modbus_connect(3) 2 | ================= 3 | 4 | 5 | NAME 6 | ---- 7 | modbus_connect - establish a Modbus connection 8 | 9 | 10 | SYNOPSIS 11 | -------- 12 | *int modbus_connect(modbus_t *'ctx');* 13 | 14 | 15 | DESCRIPTION 16 | ----------- 17 | The *modbus_connect()* function shall establish a connection to a Modbus server, 18 | a network or a bus using the context information of libmodbus context given in 19 | argument. 20 | 21 | 22 | RETURN VALUE 23 | ------------ 24 | The function shall return 0 if successful. Otherwise it shall return -1 and set 25 | errno to one of the values defined by the system calls of the underlying 26 | platform. 27 | 28 | 29 | EXAMPLE 30 | ------- 31 | [source,c] 32 | ------------------- 33 | modbus_t *ctx; 34 | 35 | ctx = modbus_new_tcp("127.0.0.1", 502); 36 | if (modbus_connect(ctx) == -1) { 37 | fprintf(stderr, "Connection failed: %s\n", modbus_strerror(errno)); 38 | modbus_free(ctx); 39 | return -1; 40 | } 41 | ------------------- 42 | 43 | 44 | SEE ALSO 45 | -------- 46 | linkmb:modbus_close[3] 47 | 48 | 49 | AUTHORS 50 | ------- 51 | The libmodbus documentation was written by Stéphane Raimbault 52 | 53 | -------------------------------------------------------------------------------- /libmodbus/doc/modbus_flush.txt: -------------------------------------------------------------------------------- 1 | modbus_flush(3) 2 | =============== 3 | 4 | 5 | NAME 6 | ---- 7 | modbus_flush - flush non-transmitted data 8 | 9 | 10 | SYNOPSIS 11 | -------- 12 | *int modbus_flush(modbus_t *'ctx');* 13 | 14 | 15 | DESCRIPTION 16 | ----------- 17 | The *modbus_flush()* function shall discard data received but not read to the 18 | socket or file descriptor associated to the context 'ctx'. 19 | 20 | 21 | RETURN VALUE 22 | ------------ 23 | The function shall return 0 or the number of flushed bytes if 24 | successful. Otherwise it shall return -1 and set errno. 25 | 26 | 27 | AUTHORS 28 | ------- 29 | The libmodbus documentation was written by Stéphane Raimbault 30 | 31 | -------------------------------------------------------------------------------- /libmodbus/doc/modbus_free.txt: -------------------------------------------------------------------------------- 1 | modbus_free(3) 2 | ============== 3 | 4 | 5 | NAME 6 | ---- 7 | modbus_free - free a libmodbus context 8 | 9 | 10 | SYNOPSIS 11 | -------- 12 | *void modbus_free(modbus_t *'ctx');* 13 | 14 | 15 | DESCRIPTION 16 | ----------- 17 | The *modbus_free()* function shall free an allocated modbus_t structure. 18 | 19 | 20 | RETURN VALUE 21 | ------------ 22 | There is no return values. 23 | 24 | 25 | SEE ALSO 26 | -------- 27 | linkmb:libmodbus[3] 28 | 29 | 30 | AUTHORS 31 | ------- 32 | The libmodbus documentation was written by Stéphane Raimbault 33 | 34 | -------------------------------------------------------------------------------- /libmodbus/doc/modbus_get_byte_from_bits.txt: -------------------------------------------------------------------------------- 1 | modbus_get_byte_from_bits(3) 2 | ============================ 3 | 4 | NAME 5 | ---- 6 | modbus_get_byte_from_bits - get the value from many bits 7 | 8 | 9 | SYNOPSIS 10 | -------- 11 | *uint8_t modbus_get_byte_from_bits(const uint8_t *'src', int 'index', unsigned int 'nb_bits');* 12 | 13 | 14 | DESCRIPTION 15 | ----------- 16 | The *modbus_get_byte_from_bits()* function shall extract a value from many 17 | bits. All _nb_bits_ bits from _src_ at position _index_ will be read as a 18 | single value. To obtain a full byte, set nb_bits to 8. 19 | 20 | 21 | RETURN VALUE 22 | ------------ 23 | The function shall return a byte containing the bits read. 24 | 25 | 26 | SEE ALSO 27 | -------- 28 | linkmb:modbus_set_bits_from_byte[3] 29 | linkmb:modbus_set_bits_from_bytes[3] 30 | 31 | 32 | AUTHORS 33 | ------- 34 | The libmodbus documentation was written by Stéphane Raimbault 35 | 36 | -------------------------------------------------------------------------------- /libmodbus/doc/modbus_get_byte_timeout.txt: -------------------------------------------------------------------------------- 1 | modbus_get_byte_timeout(3) 2 | ========================== 3 | 4 | 5 | NAME 6 | ---- 7 | modbus_get_byte_timeout - get timeout between bytes 8 | 9 | 10 | SYNOPSIS 11 | -------- 12 | *int modbus_get_byte_timeout(modbus_t *'ctx', uint32_t *'to_sec', uint32_t *'to_usec');* 13 | 14 | 15 | DESCRIPTION 16 | ----------- 17 | The *modbus_get_byte_timeout()* function shall store the timeout interval 18 | between two consecutive bytes of the same message in the _to_sec_ and _to_usec_ 19 | arguments. 20 | 21 | 22 | RETURN VALUE 23 | ------------ 24 | The function shall return 0 if successful. Otherwise it shall return -1 and set 25 | errno. 26 | 27 | 28 | EXAMPLE 29 | ------- 30 | [source,c] 31 | ------------------- 32 | uint32_t to_sec; 33 | uint32_t to_usec; 34 | 35 | /* Save original timeout */ 36 | modbus_get_byte_timeout(ctx, &to_sec, &to_usec); 37 | ------------------- 38 | 39 | 40 | SEE ALSO 41 | -------- 42 | linkmb:modbus_set_byte_timeout[3] 43 | linkmb:modbus_get_response_timeout[3] 44 | linkmb:modbus_set_response_timeout[3] 45 | 46 | 47 | AUTHORS 48 | ------- 49 | The libmodbus documentation was written by Stéphane Raimbault 50 | 51 | -------------------------------------------------------------------------------- /libmodbus/doc/modbus_get_float.txt: -------------------------------------------------------------------------------- 1 | modbus_get_float(3) 2 | =================== 3 | 4 | 5 | NAME 6 | ---- 7 | modbus_get_float - get a float value from 2 registers 8 | 9 | 10 | SYNOPSIS 11 | -------- 12 | *float modbus_get_float(const uint16_t *'src');* 13 | 14 | Warning, this function is *deprecated* since libmodbus v3.2.0 and has been 15 | replaced by *modbus_get_float_dcba()*. 16 | 17 | DESCRIPTION 18 | ----------- 19 | The *modbus_get_float()* function shall get a float from 4 bytes in Modbus 20 | format (DCBA byte order). The _src_ array must be a pointer on two 16 bits 21 | values, for example, if the first word is set to 0x4465 and the second to 22 | 0x229a, the float value will be 916.540649. 23 | 24 | 25 | RETURN VALUE 26 | ------------ 27 | The function shall return a float. 28 | 29 | 30 | SEE ALSO 31 | -------- 32 | linkmb:modbus_set_float[3] 33 | linkmb:modbus_set_float_dcba[3] 34 | linkmb:modbus_get_float_dcba[3] 35 | 36 | AUTHORS 37 | ------- 38 | The libmodbus documentation was written by Stéphane Raimbault 39 | 40 | -------------------------------------------------------------------------------- /libmodbus/doc/modbus_get_float_abcd.txt: -------------------------------------------------------------------------------- 1 | modbus_get_float_abcd(3) 2 | ======================== 3 | 4 | 5 | NAME 6 | ---- 7 | modbus_get_float_abcd - get a float value from 2 registers in ABCD byte order 8 | 9 | 10 | SYNOPSIS 11 | -------- 12 | *float modbus_get_float_abcd(const uint16_t *'src');* 13 | 14 | 15 | DESCRIPTION 16 | ----------- 17 | The *modbus_get_float_abcd()* function shall get a float from 4 bytes in usual 18 | Modbus format. The _src_ array must be a pointer on two 16 bits values, for 19 | example, if the first word is set to 0x0020 and the second to 0xF147, the float 20 | value will be read as 123456.0. 21 | 22 | 23 | RETURN VALUE 24 | ------------ 25 | The function shall return a float. 26 | 27 | 28 | SEE ALSO 29 | -------- 30 | linkmb:modbus_set_float_abcd[3] 31 | linkmb:modbus_get_float_badc[3] 32 | linkmb:modbus_get_float_cdab[3] 33 | linkmb:modbus_get_float_dcba[3] 34 | 35 | 36 | AUTHORS 37 | ------- 38 | The libmodbus documentation was written by Stéphane Raimbault 39 | 40 | -------------------------------------------------------------------------------- /libmodbus/doc/modbus_get_float_badc.txt: -------------------------------------------------------------------------------- 1 | modbus_get_float_badc(3) 2 | ======================== 3 | 4 | 5 | NAME 6 | ---- 7 | modbus_get_float_badc - get a float value from 2 registers in BADC byte order 8 | 9 | 10 | SYNOPSIS 11 | -------- 12 | *float modbus_get_float_badc(const uint16_t *'src');* 13 | 14 | 15 | DESCRIPTION 16 | ----------- 17 | The *modbus_get_float_badc()* function shall get a float from 4 bytes with 18 | swapped bytes (BADC instead of ABCD). The _src_ array must be a pointer on two 19 | 16 bits values, for example, if the first word is set to 0x2000 and the second 20 | to 0x47F1, the float value will be read as 123456.0. 21 | 22 | 23 | RETURN VALUE 24 | ------------ 25 | The function shall return a float. 26 | 27 | 28 | SEE ALSO 29 | -------- 30 | linkmb:modbus_set_float_badc[3] 31 | linkmb:modbus_get_float_abcd[3] 32 | linkmb:modbus_get_float_cdab[3] 33 | linkmb:modbus_get_float_dcba[3] 34 | 35 | 36 | AUTHORS 37 | ------- 38 | The libmodbus documentation was written by Stéphane Raimbault 39 | 40 | -------------------------------------------------------------------------------- /libmodbus/doc/modbus_get_float_cdab.txt: -------------------------------------------------------------------------------- 1 | modbus_get_float_cdab(3) 2 | ======================== 3 | 4 | 5 | NAME 6 | ---- 7 | modbus_get_float_cdab - get a float value from 2 registers in CDAB byte order 8 | 9 | 10 | SYNOPSIS 11 | -------- 12 | *float modbus_get_float_cdab(const uint16_t *'src');* 13 | 14 | 15 | DESCRIPTION 16 | ----------- 17 | The *modbus_get_float_cdab()* function shall get a float from 4 bytes with 18 | swapped words (CDAB order instead of ABCD). The _src_ array must be a pointer on 19 | two 16 bits values, for example, if the first word is set to F147 and the second 20 | to 0x0020, the float value will be read as 123456.0. 21 | 22 | 23 | RETURN VALUE 24 | ------------ 25 | The function shall return a float. 26 | 27 | 28 | SEE ALSO 29 | -------- 30 | linkmb:modbus_set_float_cdab[3] 31 | linkmb:modbus_get_float_abcd[3] 32 | linkmb:modbus_get_float_badc[3] 33 | linkmb:modbus_get_float_dcba[3] 34 | 35 | 36 | AUTHORS 37 | ------- 38 | The libmodbus documentation was written by Stéphane Raimbault 39 | 40 | -------------------------------------------------------------------------------- /libmodbus/doc/modbus_get_float_dcba.txt: -------------------------------------------------------------------------------- 1 | modbus_get_float_dcba(3) 2 | ======================== 3 | 4 | 5 | NAME 6 | ---- 7 | modbus_get_float_dcba - get a float value from 2 registers in DCBA byte order 8 | 9 | 10 | SYNOPSIS 11 | -------- 12 | *float modbus_get_float_dcba(const uint16_t *'src');* 13 | 14 | 15 | DESCRIPTION 16 | ----------- 17 | The *modbus_get_float_dcba()* function shall get a float from 4 bytes in 18 | inversed Modbus format (DCBA order instead of ABCD). The _src_ array must be a 19 | pointer on two 16 bits values, for example, if the first word is set to 0x47F1 20 | and the second to 0x2000, the float value will be read as 123456.0. 21 | 22 | 23 | RETURN VALUE 24 | ------------ 25 | The function shall return a float. 26 | 27 | 28 | SEE ALSO 29 | -------- 30 | linkmb:modbus_set_float_dcba[3] 31 | linkmb:modbus_get_float_abcd[3] 32 | linkmb:modbus_get_float_badc[3] 33 | linkmb:modbus_get_float_cdab[3] 34 | 35 | 36 | AUTHORS 37 | ------- 38 | The libmodbus documentation was written by Stéphane Raimbault 39 | 40 | -------------------------------------------------------------------------------- /libmodbus/doc/modbus_get_header_length.txt: -------------------------------------------------------------------------------- 1 | modbus_get_header_length(3) 2 | =========================== 3 | 4 | 5 | NAME 6 | ---- 7 | modbus_get_header_length - retrieve the current header length 8 | 9 | 10 | SYNOPSIS 11 | -------- 12 | *int modbus_get_header_length(modbus_t *'ctx');* 13 | 14 | 15 | DESCRIPTION 16 | ----------- 17 | The *modbus_get_header_length()* function shall retrieve the current header 18 | length from the backend. This function is convenient to manipulate a message and 19 | so its limited to low-level operations. 20 | 21 | 22 | RETURN VALUE 23 | ------------ 24 | The header length as integer value. 25 | 26 | 27 | SEE ALSO 28 | -------- 29 | linkmb:libmodbus[7] 30 | 31 | 32 | AUTHORS 33 | ------- 34 | The libmodbus documentation was written by Stéphane Raimbault 35 | 36 | -------------------------------------------------------------------------------- /libmodbus/doc/modbus_get_indication_timeout.txt: -------------------------------------------------------------------------------- 1 | modbus_get_indication_timeout(3) 2 | ================================ 3 | 4 | 5 | NAME 6 | ---- 7 | modbus_get_indication_timeout - get timeout used to wait for an indication (request received by a server). 8 | 9 | SYNOPSIS 10 | -------- 11 | *int modbus_get_indication_timeout(modbus_t *'ctx', uint32_t *'to_sec', uint32_t *'to_usec');* 12 | 13 | 14 | DESCRIPTION 15 | ----------- 16 | 17 | The *modbus_get_indication_timeout()* function shall store the timeout interval 18 | used to wait for an indication in the _to_sec_ and _to_usec_ arguments. 19 | Indication is the term used by the Modbus protocol to designate a request 20 | received by the server. 21 | 22 | The default value is zero, it means the server will wait forever. 23 | 24 | 25 | RETURN VALUE 26 | ------------ 27 | The function shall return 0 if successful. Otherwise it shall return -1 and set 28 | errno. 29 | 30 | 31 | EXAMPLE 32 | ------- 33 | [source,c] 34 | ------------------- 35 | uint32_t to_sec; 36 | uint32_t to_usec; 37 | 38 | /* Save original timeout */ 39 | modbus_get_indication_timeout(ctx, &to_sec, &to_usec); 40 | ------------------- 41 | 42 | 43 | SEE ALSO 44 | -------- 45 | linkmb:modbus_set_indication_timeout[3] 46 | linkmb:modbus_get_response_timeout[3] 47 | linkmb:modbus_set_response_timeout[3] 48 | 49 | 50 | AUTHORS 51 | ------- 52 | The libmodbus documentation was written by Stéphane Raimbault 53 | 54 | -------------------------------------------------------------------------------- /libmodbus/doc/modbus_get_response_timeout.txt: -------------------------------------------------------------------------------- 1 | modbus_get_response_timeout(3) 2 | ============================== 3 | 4 | 5 | NAME 6 | ---- 7 | modbus_get_response_timeout - get timeout for response 8 | 9 | 10 | SYNOPSIS 11 | -------- 12 | *int modbus_get_response_timeout(modbus_t *'ctx', uint32_t *'to_sec', uint32_t *'to_usec');* 13 | 14 | 15 | DESCRIPTION 16 | ----------- 17 | The *modbus_get_response_timeout()* function shall return the timeout interval 18 | used to wait for a response in the _to_sec_ and _to_usec_ arguments. 19 | 20 | 21 | RETURN VALUE 22 | ------------ 23 | The function shall return 0 if successful. Otherwise it shall return -1 and set 24 | errno. 25 | 26 | 27 | EXAMPLE 28 | ------- 29 | [source,c] 30 | ------------------- 31 | uint32_t old_response_to_sec; 32 | uint32_t old_response_to_usec; 33 | 34 | /* Save original timeout */ 35 | modbus_get_response_timeout(ctx, &old_response_to_sec, &old_response_to_usec); 36 | 37 | /* Define a new and too short timeout! */ 38 | modbus_set_response_timeout(ctx, 0, 0); 39 | ------------------- 40 | 41 | 42 | SEE ALSO 43 | -------- 44 | linkmb:modbus_set_response_timeout[3] 45 | linkmb:modbus_get_byte_timeout[3] 46 | linkmb:modbus_set_byte_timeout[3] 47 | 48 | 49 | AUTHORS 50 | ------- 51 | The libmodbus documentation was written by Stéphane Raimbault 52 | 53 | -------------------------------------------------------------------------------- /libmodbus/doc/modbus_get_slave.txt: -------------------------------------------------------------------------------- 1 | modbus_get_slave(3) 2 | =================== 3 | 4 | 5 | NAME 6 | ---- 7 | modbus_get_slave - get slave number in the context 8 | 9 | 10 | SYNOPSIS 11 | -------- 12 | *int modbus_get_slave(modbus_t *'ctx');* 13 | 14 | 15 | DESCRIPTION 16 | ----------- 17 | The *modbus_get_slave()* function shall get the slave number in the libmodbus 18 | context. 19 | 20 | 21 | RETURN VALUE 22 | ------------ 23 | The function shall return the slave number if successful. Otherwise it shall return -1 24 | and set errno to one of the values defined below. 25 | 26 | 27 | ERRORS 28 | ------ 29 | *EINVAL*:: 30 | The libmodbus context is undefined. 31 | 32 | 33 | SEE ALSO 34 | -------- 35 | linkmb:modbus_set_slave[3] 36 | 37 | 38 | AUTHORS 39 | ------- 40 | The libmodbus documentation was written by Stéphane Raimbault 41 | 42 | -------------------------------------------------------------------------------- /libmodbus/doc/modbus_get_socket.txt: -------------------------------------------------------------------------------- 1 | modbus_get_socket(3) 2 | ==================== 3 | 4 | 5 | NAME 6 | ---- 7 | modbus_get_socket - get the current socket of the context 8 | 9 | 10 | SYNOPSIS 11 | -------- 12 | *int modbus_get_socket(modbus_t *'ctx');* 13 | 14 | 15 | DESCRIPTION 16 | ----------- 17 | The *modbus_get_socket()* function shall return the current socket or file 18 | descriptor of the libmodbus context. 19 | 20 | 21 | RETURN VALUE 22 | ------------ 23 | The function returns the current socket or file descriptor of the context if 24 | successful. Otherwise it shall return -1 and set errno. 25 | 26 | 27 | SEE ALSO 28 | -------- 29 | linkmb:modbus_set_socket[3] 30 | 31 | 32 | AUTHORS 33 | ------- 34 | The libmodbus documentation was written by Stéphane Raimbault 35 | 36 | -------------------------------------------------------------------------------- /libmodbus/doc/modbus_mapping_free.txt: -------------------------------------------------------------------------------- 1 | modbus_mapping_free(3) 2 | ===================== 3 | 4 | 5 | NAME 6 | ---- 7 | modbus_mapping_free - free a modbus_mapping_t structure 8 | 9 | 10 | SYNOPSIS 11 | -------- 12 | *void modbus_mapping_free(modbus_mapping_t *'mb_mapping');* 13 | 14 | 15 | DESCRIPTION 16 | ----------- 17 | The function shall free the four arrays of mb_mapping_t structure and finally 18 | the mb_mapping_t referenced by _mb_mapping_. 19 | 20 | 21 | RETURN VALUE 22 | ------------ 23 | There is no return values. 24 | 25 | 26 | SEE ALSO 27 | -------- 28 | linkmb:modbus_mapping_new[3] 29 | 30 | 31 | AUTHORS 32 | ------- 33 | The libmodbus documentation was written by Stéphane Raimbault 34 | 35 | -------------------------------------------------------------------------------- /libmodbus/doc/modbus_mask_write_register.txt: -------------------------------------------------------------------------------- 1 | modbus_mask_write_register(3) 2 | ============================= 3 | 4 | 5 | NAME 6 | ---- 7 | modbus_mask_write_register - mask a single register 8 | 9 | 10 | SYNOPSIS 11 | -------- 12 | *int modbus_mask_write_register(modbus_t *'ctx', int 'addr', uint16_t 'and', uint16_t 'or');* 13 | 14 | 15 | DESCRIPTION 16 | ----------- 17 | The *modbus_mask_write_register()* function shall modify the value of the 18 | holding register at the address 'addr' of the remote device using the algorithm: 19 | 20 | new value = (current value AND 'and') OR ('or' AND (NOT 'and')) 21 | 22 | The function uses the Modbus function code 0x16 (mask single register). 23 | 24 | 25 | RETURN VALUE 26 | ------------ 27 | The function shall return 1 if successful. Otherwise it shall return -1 and set 28 | errno. 29 | 30 | 31 | SEE ALSO 32 | -------- 33 | linkmb:modbus_read_registers[3] 34 | linkmb:modbus_write_registers[3] 35 | 36 | 37 | AUTHORS 38 | ------- 39 | Martijn de Gouw 40 | The libmodbus documentation was written by Stéphane Raimbault 41 | 42 | -------------------------------------------------------------------------------- /libmodbus/doc/modbus_read_bits.txt: -------------------------------------------------------------------------------- 1 | modbus_read_bits(3) 2 | =================== 3 | 4 | 5 | NAME 6 | ---- 7 | modbus_read_bits - read many bits 8 | 9 | 10 | SYNOPSIS 11 | -------- 12 | *int modbus_read_bits(modbus_t *'ctx', int 'addr', int 'nb', uint8_t *'dest');* 13 | 14 | 15 | DESCRIPTION 16 | ----------- 17 | The *modbus_read_bits()* function shall read the status of the _nb_ bits (coils) 18 | to the address _addr_ of the remote device. The result of reading is stored in 19 | _dest_ array as unsigned bytes (8 bits) set to `TRUE` or `FALSE`. 20 | 21 | You must take care to allocate enough memory to store the results in _dest_ 22 | (at least _nb_ * sizeof(uint8_t)). 23 | 24 | The function uses the Modbus function code 0x01 (read coil status). 25 | 26 | 27 | RETURN VALUE 28 | ------------ 29 | The function shall return the number of read bits if successful. Otherwise it 30 | shall return -1 and set errno. 31 | 32 | 33 | ERRORS 34 | ------ 35 | *EMBMDATA*:: 36 | Too many bits requested 37 | 38 | 39 | SEE ALSO 40 | -------- 41 | linkmb:modbus_write_bit[3] 42 | linkmb:modbus_write_bits[3] 43 | 44 | 45 | AUTHORS 46 | ------- 47 | The libmodbus documentation was written by Stéphane Raimbault 48 | 49 | -------------------------------------------------------------------------------- /libmodbus/doc/modbus_read_input_bits.txt: -------------------------------------------------------------------------------- 1 | modbus_read_input_bits(3) 2 | ========================= 3 | 4 | 5 | NAME 6 | ---- 7 | modbus_read_input_bits - read many input bits 8 | 9 | 10 | SYNOPSIS 11 | -------- 12 | *int modbus_read_input_bits(modbus_t *'ctx', int 'addr', int 'nb', uint8_t *'dest');* 13 | 14 | 15 | DESCRIPTION 16 | ----------- 17 | The *modbus_read_input_bits()* function shall read the content of the _nb_ input 18 | bits to the address _addr_ of the remote device. The result of reading is stored 19 | in _dest_ array as unsigned bytes (8 bits) set to _TRUE_ or _FALSE_. 20 | 21 | You must take care to allocate enough memory to store the results in _dest_ 22 | (at least _nb_ * sizeof(uint8_t)). 23 | 24 | The function uses the Modbus function code 0x02 (read input status). 25 | 26 | 27 | RETURN VALUE 28 | ------------ 29 | The function shall return the number of read input status if 30 | successful. Otherwise it shall return -1 and set errno. 31 | 32 | 33 | ERRORS 34 | ------ 35 | *EMBMDATA*:: 36 | Too many discrete inputs requested 37 | 38 | 39 | SEE ALSO 40 | -------- 41 | linkmb:modbus_read_input_registers[3] 42 | 43 | 44 | AUTHORS 45 | ------- 46 | The libmodbus documentation was written by Stéphane Raimbault 47 | 48 | -------------------------------------------------------------------------------- /libmodbus/doc/modbus_read_input_registers.txt: -------------------------------------------------------------------------------- 1 | modbus_read_input_registers(3) 2 | ============================== 3 | 4 | 5 | NAME 6 | ---- 7 | modbus_read_input_registers - read many input registers 8 | 9 | 10 | SYNOPSIS 11 | -------- 12 | *int modbus_read_input_registers(modbus_t *'ctx', int 'addr', int 'nb', uint16_t *'dest');* 13 | 14 | 15 | DESCRIPTION 16 | ----------- 17 | The *modbus_read_input_registers()* function shall read the content of the _nb_ 18 | input registers to address _addr_ of the remote device. The result of the 19 | reading is stored in _dest_ array as word values (16 bits). 20 | 21 | You must take care to allocate enough memory to store the results in _dest_ (at 22 | least _nb_ * sizeof(uint16_t)). 23 | 24 | The function uses the Modbus function code 0x04 (read input registers). The 25 | holding registers and input registers have different historical meaning, but 26 | nowadays it's more common to use holding registers only. 27 | 28 | 29 | RETURN VALUE 30 | ------------ 31 | The function shall return the number of read input registers if 32 | successful. Otherwise it shall return -1 and set errno. 33 | 34 | 35 | ERRORS 36 | ------ 37 | *EMBMDATA*:: 38 | Too many bits requested 39 | 40 | 41 | SEE ALSO 42 | -------- 43 | linkmb:modbus_read_input_bits[3] 44 | linkmb:modbus_write_register[3] 45 | linkmb:modbus_write_registers[3] 46 | 47 | 48 | AUTHORS 49 | ------- 50 | The libmodbus documentation was written by Stéphane Raimbault 51 | 52 | -------------------------------------------------------------------------------- /libmodbus/doc/modbus_receive.txt: -------------------------------------------------------------------------------- 1 | modbus_receive(3) 2 | ================= 3 | 4 | 5 | NAME 6 | ---- 7 | modbus_receive - receive an indication request 8 | 9 | 10 | SYNOPSIS 11 | -------- 12 | *int modbus_receive(modbus_t *'ctx', uint8_t *'req');* 13 | 14 | 15 | DESCRIPTION 16 | ----------- 17 | The *modbus_receive()* function shall receive an indication request from the 18 | socket of the context _ctx_. This function is used by Modbus slave/server to 19 | receive and analyze indication request sent by the masters/clients. 20 | 21 | If you need to use another socket or file descriptor than the one defined in the 22 | context _ctx_, see the function linkmb:modbus_set_socket[3]. 23 | 24 | 25 | RETURN VALUE 26 | ------------ 27 | The function shall store the indication request in _req_ and return the request 28 | length if successful. The returned request length can be zero if the indication 29 | request is ignored (eg. a query for another slave in RTU mode). Otherwise it 30 | shall return -1 and set errno. 31 | 32 | 33 | SEE ALSO 34 | -------- 35 | linkmb:modbus_set_socket[3] 36 | linkmb:modbus_reply[3] 37 | 38 | 39 | AUTHORS 40 | ------- 41 | The libmodbus documentation was written by Stéphane Raimbault 42 | 43 | -------------------------------------------------------------------------------- /libmodbus/doc/modbus_reply.txt: -------------------------------------------------------------------------------- 1 | modbus_reply(3) 2 | =============== 3 | 4 | NAME 5 | ---- 6 | modbus_reply - send a reponse to the received request 7 | 8 | 9 | SYNOPSIS 10 | -------- 11 | *int modbus_reply(modbus_t *'ctx', const uint8_t *'req', int 'req_length', modbus_mapping_t *'mb_mapping'); 12 | 13 | 14 | DESCRIPTION 15 | ----------- 16 | The *modbus_reply()* function shall send a response to received request. The 17 | request _req_ given in argument is analyzed, a response is then built and sent 18 | by using the information of the modbus context _ctx_. 19 | 20 | If the request indicates to read or write a value the operation will done in the 21 | modbus mapping _mb_mapping_ according to the type of the manipulated data. 22 | 23 | If an error occurs, an exception response will be sent. 24 | 25 | This function is designed for Modbus server. 26 | 27 | 28 | RETURN VALUE 29 | ------------ 30 | The function shall return the length of the response sent if 31 | successful. Otherwise it shall return -1 and set errno. 32 | 33 | 34 | ERRORS 35 | ------ 36 | *EMBMDATA*:: 37 | Sending has failed 38 | 39 | See also the errors returned by the syscall used to send the response (eg. send 40 | or write). 41 | 42 | 43 | SEE ALSO 44 | -------- 45 | linkmb:modbus_reply_exception[3] 46 | linkmb:libmodbus[7] 47 | 48 | 49 | AUTHORS 50 | ------- 51 | The libmodbus documentation was written by Stéphane Raimbault 52 | 53 | -------------------------------------------------------------------------------- /libmodbus/doc/modbus_reply_exception.txt: -------------------------------------------------------------------------------- 1 | modbus_reply_exception(3) 2 | ========================= 3 | 4 | NAME 5 | ---- 6 | modbus_reply_exception - send an exception reponse 7 | 8 | 9 | SYNOPSIS 10 | -------- 11 | *int modbus_reply_exception(modbus_t *'ctx', const uint8_t *'req', unsigned int 'exception_code'); 12 | 13 | 14 | DESCRIPTION 15 | ----------- 16 | The *modbus_reply_exception()* function shall send an exception response based 17 | on the 'exception_code' in argument. 18 | 19 | The libmodbus provides the following exception codes: 20 | 21 | * MODBUS_EXCEPTION_ILLEGAL_FUNCTION (1) 22 | * MODBUS_EXCEPTION_ILLEGAL_DATA_ADDRESS (2) 23 | * MODBUS_EXCEPTION_ILLEGAL_DATA_VALUE (3) 24 | * MODBUS_EXCEPTION_SLAVE_OR_SERVER_FAILURE (4) 25 | * MODBUS_EXCEPTION_ACKNOWLEDGE (5) 26 | * MODBUS_EXCEPTION_SLAVE_OR_SERVER_BUSY (6) 27 | * MODBUS_EXCEPTION_NEGATIVE_ACKNOWLEDGE (7) 28 | * MODBUS_EXCEPTION_MEMORY_PARITY (8) 29 | * MODBUS_EXCEPTION_NOT_DEFINED (9) 30 | * MODBUS_EXCEPTION_GATEWAY_PATH (10) 31 | * MODBUS_EXCEPTION_GATEWAY_TARGET (11) 32 | 33 | The initial request _req_ is required to build a valid response. 34 | 35 | 36 | RETURN VALUE 37 | ------------ 38 | The function shall return the length of the response sent if 39 | successful. Otherwise it shall return -1 and set errno. 40 | 41 | 42 | ERRORS 43 | ------ 44 | *EINVAL*:: 45 | The exception code is invalid 46 | 47 | 48 | SEE ALSO 49 | -------- 50 | linkmb:modbus_reply[3] 51 | linkmb:libmodbus[7] 52 | 53 | 54 | AUTHORS 55 | ------- 56 | The libmodbus documentation was written by Stéphane Raimbault 57 | 58 | -------------------------------------------------------------------------------- /libmodbus/doc/modbus_rtu_get_rts.txt: -------------------------------------------------------------------------------- 1 | modbus_rtu_get_rts(3) 2 | ===================== 3 | 4 | 5 | NAME 6 | ---- 7 | modbus_rtu_get_rts - get the current RTS mode in RTU 8 | 9 | 10 | SYNOPSIS 11 | -------- 12 | *int modbus_rtu_get_rts(modbus_t *'ctx');* 13 | 14 | 15 | DESCRIPTION 16 | ----------- 17 | The *modbus_rtu_get_rts()* function shall get the current Request To Send mode 18 | of the libmodbus context _ctx_. The possible returned values are: 19 | 20 | * MODBUS_RTU_RTS_NONE 21 | * MODBUS_RTU_RTS_UP 22 | * MODBUS_RTU_RTS_DOWN 23 | 24 | This function can only be used with a context using a RTU backend. 25 | 26 | 27 | RETURN VALUE 28 | ------------ 29 | The function shall return the current RTS mode if successful. Otherwise it shall 30 | return -1 and set errno. 31 | 32 | 33 | ERRORS 34 | ------ 35 | *EINVAL*:: 36 | The libmodbus backend is not RTU. 37 | 38 | 39 | SEE ALSO 40 | -------- 41 | linkmb:modbus_rtu_set_rts[3] 42 | 43 | 44 | AUTHORS 45 | ------- 46 | The libmodbus documentation was written by Stéphane Raimbault 47 | 48 | -------------------------------------------------------------------------------- /libmodbus/doc/modbus_rtu_get_rts_delay.txt: -------------------------------------------------------------------------------- 1 | modbus_rtu_get_rts_delay(3) 2 | =========================== 3 | 4 | 5 | NAME 6 | ---- 7 | modbus_rtu_get_rts_delay - get the current RTS delay in RTU 8 | 9 | 10 | SYNOPSIS 11 | -------- 12 | *int modbus_rtu_get_rts_delay(modbus_t *'ctx');* 13 | 14 | 15 | DESCRIPTION 16 | ----------- 17 | 18 | The _modbus_rtu_get_rts_delay()_ function shall get the current Request To Send 19 | delay period of the libmodbus context 'ctx'. 20 | 21 | This function can only be used with a context using a RTU backend. 22 | 23 | 24 | RETURN VALUE 25 | ------------ 26 | The _modbus_rtu_get_rts_delay()_ function shall return the current RTS delay in 27 | microseconds if successful. Otherwise it shall return -1 and set errno. 28 | 29 | 30 | ERRORS 31 | ------ 32 | *EINVAL*:: 33 | The libmodbus backend is not RTU. 34 | 35 | 36 | SEE ALSO 37 | -------- 38 | linkmb:modbus_rtu_set_rts_delay[3] 39 | 40 | 41 | AUTHORS 42 | ------- 43 | Jimmy Bergström 44 | 45 | The libmodbus documentation was written by Stéphane Raimbault 46 | 47 | -------------------------------------------------------------------------------- /libmodbus/doc/modbus_rtu_set_custom_rts.txt: -------------------------------------------------------------------------------- 1 | modbus_rtu_set_custom_rts(3) 2 | ============================ 3 | 4 | 5 | NAME 6 | ---- 7 | modbus_rtu_set_custom_rts - set a function to be used for custom RTS implementation 8 | 9 | 10 | SYNOPSIS 11 | -------- 12 | *int modbus_rtu_set_custom_rts(modbus_t *'ctx', void (*'set_rts') (modbus_t *ctx, int on))* 13 | 14 | 15 | DESCRIPTION 16 | ----------- 17 | The _modbus_rtu_set_custom_rts()_ function shall set a custom function to be 18 | called when the RTS pin is to be set before and after a transmission. By default 19 | this is set to an internal function that toggles the RTS pin using an ioctl 20 | call. 21 | 22 | Note that this function adheres to the RTS mode, the values MODBUS_RTU_RTS_UP or 23 | MODBUS_RTU_RTS_DOWN must be used for the function to be called. 24 | 25 | This function can only be used with a context using a RTU backend. 26 | 27 | 28 | RETURN VALUE 29 | ------------ 30 | The _modbus_rtu_set_custom_rts()_ function shall return 0 if successful. 31 | Otherwise it shall return -1 and set errno to one of the values defined below. 32 | 33 | 34 | ERRORS 35 | ------ 36 | *EINVAL*:: 37 | The libmodbus backend is not RTU. 38 | 39 | 40 | AUTHORS 41 | ------- 42 | Jimmy Bergström 43 | 44 | The libmodbus documentation was written by Stéphane Raimbault 45 | 46 | -------------------------------------------------------------------------------- /libmodbus/doc/modbus_rtu_set_rts_delay.txt: -------------------------------------------------------------------------------- 1 | modbus_rtu_set_rts_delay(3) 2 | =========================== 3 | 4 | 5 | NAME 6 | ---- 7 | modbus_rtu_set_rts_delay - set the RTS delay in RTU 8 | 9 | 10 | SYNOPSIS 11 | -------- 12 | *int modbus_rtu_set_rts_delay(modbus_t *'ctx', int 'us');* 13 | 14 | 15 | DESCRIPTION 16 | ----------- 17 | 18 | The _modbus_rtu_set_rts_delay()_ function shall set the Request To Send delay 19 | period of the libmodbus context 'ctx'. 20 | 21 | This function can only be used with a context using a RTU backend. 22 | 23 | 24 | RETURN VALUE 25 | ------------ 26 | The _modbus_rtu_set_rts_delay()_ function shall return 0 if successful. 27 | Otherwise it shall return -1 and set errno. 28 | 29 | 30 | ERRORS 31 | ------ 32 | *EINVAL*:: 33 | The libmodbus backend is not RTU or a negative delay was specified. 34 | 35 | 36 | SEE ALSO 37 | -------- 38 | linkmb:modbus_rtu_get_rts_delay[3] 39 | 40 | 41 | AUTHORS 42 | ------- 43 | Jimmy Bergström 44 | 45 | The libmodbus documentation was written by Stéphane Raimbault 46 | 47 | -------------------------------------------------------------------------------- /libmodbus/doc/modbus_set_bits_from_byte.txt: -------------------------------------------------------------------------------- 1 | modbus_set_bits_from_byte(3) 2 | ============================ 3 | 4 | 5 | NAME 6 | ---- 7 | modbus_set_bits_from_byte - set many bits from a single byte value 8 | 9 | 10 | SYNOPSIS 11 | -------- 12 | *void modbus_set_bits_from_byte(uint8_t *'dest', int 'index', const uint8_t 'value');* 13 | 14 | 15 | DESCRIPTION 16 | ----------- 17 | The *modbus_set_bits_from_byte()* function shall set many bits from a single byte. 18 | All 8 bits from the byte _value_ will be written to _dest_ array starting at 19 | _index_ position. 20 | 21 | 22 | RETURN VALUE 23 | ------------ 24 | There is no return values. 25 | 26 | 27 | SEE ALSO 28 | -------- 29 | linkmb:modbus_set_bits_from_byte[3] 30 | linkmb:modbus_set_bits_from_bytes[3] 31 | 32 | 33 | AUTHORS 34 | ------- 35 | The libmodbus documentation was written by Stéphane Raimbault 36 | 37 | -------------------------------------------------------------------------------- /libmodbus/doc/modbus_set_bits_from_bytes.txt: -------------------------------------------------------------------------------- 1 | modbus_set_bits_from_bytes(3) 2 | ============================ 3 | 4 | 5 | NAME 6 | ---- 7 | modbus_set_bits_from_bytes - set many bits from an array of bytes 8 | 9 | 10 | SYNOPSIS 11 | -------- 12 | *void modbus_set_bits_from_bytes(uint8_t *'dest', int 'index', unsigned int 'nb_bits', const uint8_t *'tab_byte');* 13 | 14 | 15 | DESCRIPTION 16 | ----------- 17 | The *modbus_set_bits_from_bytes* function shall set bits by reading an array of 18 | bytes. All the bits of the bytes read from the first position of the array 19 | _tab_byte_ are written as bits in the _dest_ array starting at position _index_. 20 | 21 | 22 | RETURN VALUE 23 | ------------ 24 | There is no return values. 25 | 26 | 27 | SEE ALSO 28 | -------- 29 | linkmb:modbus_set_bits_from_byte[3] 30 | linkmb:modbus_get_byte_from_bits[3] 31 | 32 | 33 | AUTHORS 34 | ------- 35 | The libmodbus documentation was written by Stéphane Raimbault 36 | 37 | -------------------------------------------------------------------------------- /libmodbus/doc/modbus_set_debug.txt: -------------------------------------------------------------------------------- 1 | modbus_set_debug(3) 2 | =================== 3 | 4 | NAME 5 | ---- 6 | modbus_set_debug - set debug flag of the context 7 | 8 | 9 | SYNOPSIS 10 | -------- 11 | *int modbus_set_debug(modbus_t *'ctx', int 'flag');* 12 | 13 | 14 | DESCRIPTION 15 | ----------- 16 | The *modbus_set_debug()* function shall set the debug flag of the *modbus_t* 17 | context by using the argument _flag_. By default, the boolean flag is set to 18 | `FALSE`. When the _flag_ value is set to `TRUE`, many verbose messages are 19 | displayed on stdout and stderr. For example, this flag is useful to display the 20 | bytes of the Modbus messages. 21 | 22 | [verse] 23 | ___________________ 24 | [00][14][00][00][00][06][12][03][00][6B][00][03] 25 | Waiting for a confirmation... 26 | <00><14><00><00><00><09><12><03><06><02><2B><00><00><00><00> 27 | ___________________ 28 | 29 | 30 | RETURN VALUE 31 | ------------ 32 | The function shall return 0 if successful. Otherwise it shall return -1 and set errno. 33 | 34 | 35 | AUTHORS 36 | ------- 37 | The libmodbus documentation was written by Stéphane Raimbault 38 | 39 | -------------------------------------------------------------------------------- /libmodbus/doc/modbus_set_float.txt: -------------------------------------------------------------------------------- 1 | modbus_set_float(3) 2 | =================== 3 | 4 | NAME 5 | ---- 6 | modbus_set_float - set a float value from 2 registers 7 | 8 | 9 | SYNOPSIS 10 | -------- 11 | *void modbus_set_float(float 'f', uint16_t *'dest');* 12 | 13 | Warning, this function is *deprecated* since libmodbus v3.2.0 and has been 14 | replaced by *modbus_set_float_dcba()*. 15 | 16 | DESCRIPTION 17 | ----------- 18 | The *modbus_set_float()* function shall set a float to 4 bytes in Modbus format 19 | (ABCD). The _dest_ array must be pointer on two 16 bits values to be able to 20 | store the full result of the conversion. 21 | 22 | 23 | RETURN VALUE 24 | ------------ 25 | There is no return values. 26 | 27 | 28 | SEE ALSO 29 | -------- 30 | linkmb:modbus_get_float[3] 31 | linkmb:modbus_set_float_dcba[3] 32 | 33 | AUTHORS 34 | ------- 35 | The libmodbus documentation was written by Stéphane Raimbault 36 | 37 | -------------------------------------------------------------------------------- /libmodbus/doc/modbus_set_float_abcd.txt: -------------------------------------------------------------------------------- 1 | modbus_set_float_abcd(3) 2 | ======================== 3 | 4 | 5 | NAME 6 | ---- 7 | modbus_set_float_abcd - set a float value in 2 registers using ABCD byte order 8 | 9 | 10 | SYNOPSIS 11 | -------- 12 | *void modbus_set_float_abcd(float 'f', uint16_t *'dest');* 13 | 14 | 15 | DESCRIPTION 16 | ----------- 17 | The *modbus_set_float_abcd()* function shall set a float to 4 bytes in usual 18 | Modbus format. The _dest_ array must be pointer on two 16 bits values to be able 19 | to store the full result of the conversion. 20 | 21 | 22 | RETURN VALUE 23 | ------------ 24 | There is no return values. 25 | 26 | 27 | SEE ALSO 28 | -------- 29 | linkmb:modbus_get_float_abcd[3] 30 | linkmb:modbus_set_float_badc[3] 31 | linkmb:modbus_set_float_cdab[3] 32 | linkmb:modbus_set_float_dcba[3] 33 | 34 | 35 | AUTHORS 36 | ------- 37 | The libmodbus documentation was written by Stéphane Raimbault 38 | 39 | -------------------------------------------------------------------------------- /libmodbus/doc/modbus_set_float_badc.txt: -------------------------------------------------------------------------------- 1 | modbus_set_float_badc(3) 2 | ======================== 3 | 4 | 5 | NAME 6 | ---- 7 | modbus_set_float_badc - set a float value in 2 registers using BADC byte order 8 | 9 | 10 | SYNOPSIS 11 | -------- 12 | *void modbus_set_float_badc(float 'f', uint16_t *'dest');* 13 | 14 | 15 | DESCRIPTION 16 | ----------- 17 | The *modbus_set_float_badc()* function shall set a float to 4 bytes in swapped 18 | bytes Modbus format (BADC insted of ABCD). The _dest_ array must be pointer on 19 | two 16 bits values to be able to store the full result of the conversion. 20 | 21 | 22 | RETURN VALUE 23 | ------------ 24 | There is no return values. 25 | 26 | 27 | SEE ALSO 28 | -------- 29 | linkmb:modbus_get_float_badc[3] 30 | linkmb:modbus_set_float_abcd[3] 31 | linkmb:modbus_set_float_cdab[3] 32 | linkmb:modbus_set_float_dcba[3] 33 | 34 | 35 | AUTHORS 36 | ------- 37 | The libmodbus documentation was written by Stéphane Raimbault 38 | 39 | -------------------------------------------------------------------------------- /libmodbus/doc/modbus_set_float_cdab.txt: -------------------------------------------------------------------------------- 1 | modbus_set_float_cdab(3) 2 | ======================== 3 | 4 | 5 | NAME 6 | ---- 7 | modbus_set_float_cdab - set a float value in 2 registers using CDAB byte order 8 | 9 | 10 | SYNOPSIS 11 | -------- 12 | *void modbus_set_float_cdab(float 'f', uint16_t *'dest');* 13 | 14 | 15 | DESCRIPTION 16 | ----------- 17 | The *modbus_set_float_cdab()* function shall set a float to 4 bytes in swapped 18 | words Modbus format (CDAB order instead of ABCD). The _dest_ array must be 19 | pointer on two 16 bits values to be able to store the full result of the 20 | conversion. 21 | 22 | 23 | RETURN VALUE 24 | ------------ 25 | There is no return values. 26 | 27 | 28 | SEE ALSO 29 | -------- 30 | linkmb:modbus_get_float_cdab[3] 31 | linkmb:modbus_set_float_abcd[3] 32 | linkmb:modbus_set_float_badc[3] 33 | linkmb:modbus_set_float_dcba[3] 34 | 35 | 36 | AUTHORS 37 | ------- 38 | The libmodbus documentation was written by Stéphane Raimbault 39 | 40 | -------------------------------------------------------------------------------- /libmodbus/doc/modbus_set_float_dcba.txt: -------------------------------------------------------------------------------- 1 | modbus_set_float_dcba(3) 2 | ======================== 3 | 4 | 5 | NAME 6 | ---- 7 | modbus_set_float_dcba - set a float value in 2 registers using DCBA byte order 8 | 9 | 10 | SYNOPSIS 11 | -------- 12 | *void modbus_set_float_dcba(float 'f', uint16_t *'dest');* 13 | 14 | 15 | DESCRIPTION 16 | ----------- 17 | The *modbus_set_float_dcba()* function shall set a float to 4 bytes in inverted 18 | Modbus format (DCBA order). The _dest_ array must be pointer on two 16 bits 19 | values to be able to store the full result of the conversion. 20 | 21 | 22 | RETURN VALUE 23 | ------------ 24 | There is no return values. 25 | 26 | 27 | SEE ALSO 28 | -------- 29 | linkmb:modbus_get_float_dcba[3] 30 | linkmb:modbus_set_float[3] 31 | linkmb:modbus_get_float[3] 32 | 33 | 34 | AUTHORS 35 | ------- 36 | The libmodbus documentation was written by Stéphane Raimbault 37 | 38 | -------------------------------------------------------------------------------- /libmodbus/doc/modbus_set_indication_timeout.txt: -------------------------------------------------------------------------------- 1 | modbus_set_indication_timeout(3) 2 | ================================ 3 | 4 | 5 | NAME 6 | ---- 7 | modbus_set_indication_timeout - set timeout between indications 8 | 9 | 10 | SYNOPSIS 11 | -------- 12 | *void modbus_set_indication_timeout(modbus_t *'ctx', uint32_t 'to_sec', uint32_t 'to_usec');* 13 | 14 | 15 | DESCRIPTION 16 | ----------- 17 | The *modbus_set_indication_timeout()* function shall set the timeout interval used by 18 | a server to wait for a request from a client. 19 | 20 | The value of _to_usec_ argument must be in the range 0 to 999999. 21 | 22 | If both _to_sec_ and _to_usec_ are zero, this timeout will not be used at all. 23 | In this case, the server will wait forever. 24 | 25 | 26 | RETURN VALUE 27 | ------------ 28 | The function shall return 0 if successful. Otherwise it shall return -1 and set 29 | errno. 30 | 31 | 32 | ERRORS 33 | ------ 34 | *EINVAL*:: 35 | The argument _ctx_ is NULL or _to_usec_ is larger than 1000000. 36 | 37 | 38 | SEE ALSO 39 | -------- 40 | linkmb:modbus_get_indication_timeout[3] 41 | linkmb:modbus_get_response_timeout[3] 42 | linkmb:modbus_set_response_timeout[3] 43 | 44 | 45 | AUTHORS 46 | ------- 47 | The libmodbus documentation was written by Stéphane Raimbault 48 | 49 | -------------------------------------------------------------------------------- /libmodbus/doc/modbus_set_socket.txt: -------------------------------------------------------------------------------- 1 | modbus_set_socket(3) 2 | ==================== 3 | 4 | 5 | NAME 6 | ---- 7 | modbus_set_socket - set socket of the context 8 | 9 | 10 | SYNOPSIS 11 | -------- 12 | *int modbus_set_socket(modbus_t *'ctx', int 's');* 13 | 14 | 15 | DESCRIPTION 16 | ----------- 17 | The *modbus_set_socket()* function shall set the socket or file descriptor in 18 | the libmodbus context. This function is useful for managing multiple client 19 | connections to the same server. 20 | 21 | 22 | RETURN VALUE 23 | ------------ 24 | The function shall return 0 if successful. Otherwise it shall return -1 and set errno. 25 | 26 | 27 | EXAMPLE 28 | ------- 29 | [source,c] 30 | ------------------- 31 | ctx = modbus_new_tcp("127.0.0.1", 1502); 32 | server_socket = modbus_tcp_listen(ctx, NB_CONNECTION); 33 | 34 | FD_ZERO(&rdset); 35 | FD_SET(server_socket, &rdset); 36 | 37 | /* .... */ 38 | 39 | if (FD_ISSET(master_socket, &rdset)) { 40 | modbus_set_socket(ctx, master_socket); 41 | rc = modbus_receive(ctx, query); 42 | if (rc != -1) { 43 | modbus_reply(ctx, query, rc, mb_mapping); 44 | } 45 | } 46 | ------------------- 47 | 48 | SEE ALSO 49 | -------- 50 | linkmb:modbus_get_socket[3] 51 | 52 | 53 | AUTHORS 54 | ------- 55 | The libmodbus documentation was written by Stéphane Raimbault 56 | 57 | -------------------------------------------------------------------------------- /libmodbus/doc/modbus_strerror.txt: -------------------------------------------------------------------------------- 1 | modbus_strerror(3) 2 | ================= 3 | 4 | 5 | NAME 6 | ---- 7 | modbus_strerror - return the error message 8 | 9 | 10 | SYNOPSIS 11 | -------- 12 | *const char *modbus_strerror(int 'errnum');* 13 | 14 | 15 | DESCRIPTION 16 | ----------- 17 | The *modbus_strerror()* function shall return a pointer to an error message 18 | string corresponding to the error number specified by the _errnum_ argument. As 19 | libmodbus defines additional error numbers over and above those defined by the 20 | operating system, applications should use *modbus_strerror()* in preference to 21 | the standard *strerror()* function. 22 | 23 | 24 | RETURN VALUE 25 | ------------ 26 | The *modbus_strerror()* function shall return a pointer to an error message 27 | string. 28 | 29 | 30 | ERRORS 31 | ------ 32 | No errors are defined. 33 | 34 | 35 | EXAMPLE 36 | ------- 37 | .Display an error message when a Modbus connection cannot be established 38 | [source,c] 39 | ------------------- 40 | if (modbus_connect(ctx) == -1) { 41 | fprintf(stderr, "Connection failed: %s\n", modbus_strerror(errno)); 42 | abort(); 43 | } 44 | ------------------- 45 | 46 | SEE ALSO 47 | -------- 48 | linkmb:libmodbus 49 | 50 | 51 | AUTHORS 52 | ------- 53 | The libmodbus documentation was written by Stéphane Raimbault 54 | 55 | -------------------------------------------------------------------------------- /libmodbus/doc/modbus_tcp_accept.txt: -------------------------------------------------------------------------------- 1 | modbus_tcp_accept(3) 2 | ==================== 3 | 4 | 5 | NAME 6 | ---- 7 | modbus_tcp_accept - accept a new connection on a TCP Modbus socket (IPv4) 8 | 9 | 10 | SYNOPSIS 11 | -------- 12 | *int modbus_tcp_accept(modbus_t *'ctx', int *'s);* 13 | 14 | 15 | DESCRIPTION 16 | ----------- 17 | The *modbus_tcp_accept()* function shall extract the first connection on the 18 | queue of pending connections, create a new socket and store it in libmodbus 19 | context given in argument. If available, _accept4()_ with `SOCK_CLOEXEC` will be 20 | called instead of *accept()*. 21 | 22 | 23 | RETURN VALUE 24 | ------------ 25 | The function shall return a new socket if successful. 26 | Otherwise it shall return -1 and set errno. 27 | 28 | 29 | EXAMPLE 30 | ------- 31 | For detailed example, see unit-test-server.c source file in tests directory. 32 | 33 | [source,c] 34 | ------------------- 35 | ... 36 | 37 | ctx = modbus_new_tcp("127.0.0.1", 502); 38 | s = modbus_tcp_listen(ctx, 1); 39 | modbus_tcp_accept(ctx, &s); 40 | 41 | ... 42 | 43 | close(s) 44 | modbus_free(ctx); 45 | ------------------- 46 | 47 | SEE ALSO 48 | -------- 49 | linkmb:modbus_tcp_pi_accept[3] 50 | linkmb:modbus_tcp_listen[3] 51 | linkmb:modbus_tcp_pi_listen[3] 52 | 53 | AUTHORS 54 | ------- 55 | The libmodbus documentation was written by Stéphane Raimbault 56 | 57 | -------------------------------------------------------------------------------- /libmodbus/doc/modbus_tcp_pi_accept.txt: -------------------------------------------------------------------------------- 1 | modbus_tcp_pi_accept(3) 2 | ======================= 3 | 4 | 5 | NAME 6 | ---- 7 | modbus_tcp_pi_accept - accept a new connection on a TCP PI Modbus socket (IPv6) 8 | 9 | 10 | SYNOPSIS 11 | -------- 12 | *int modbus_tcp_pi_accept(modbus_t *'ctx', int *'s);* 13 | 14 | 15 | DESCRIPTION 16 | ----------- 17 | The *modbus_tcp_pi_accept()* function shall extract the first connection on the 18 | queue of pending connections, create a new socket and store it in libmodbus 19 | context given in argument. If available, _accept4()_ with `SOCK_CLOEXEC` will be 20 | called instead of *accept()*. 21 | 22 | 23 | RETURN VALUE 24 | ------------ 25 | The function shall return a new socket if successful. 26 | Otherwise it shall return -1 and set errno. 27 | 28 | 29 | EXAMPLE 30 | ------- 31 | For detailed example, see unit-test-server.c source file in tests directory. 32 | 33 | [source,c] 34 | ------------------- 35 | ... 36 | 37 | ctx = modbus_new_tcp_pi("::0", 502); 38 | s = modbus_tcp_pi_listen(ctx, 1); 39 | modbus_tcp_pi_accept(ctx, &s); 40 | 41 | ... 42 | 43 | close(s) 44 | modbus_free(ctx); 45 | ------------------- 46 | 47 | SEE ALSO 48 | -------- 49 | linkmb:modbus_tcp_pi_accept[3] 50 | linkmb:modbus_tcp_listen[3] 51 | linkmb:modbus_tcp_pi_listen[3] 52 | 53 | AUTHORS 54 | ------- 55 | The libmodbus documentation was written by Stéphane Raimbault 56 | 57 | -------------------------------------------------------------------------------- /libmodbus/doc/modbus_write_bit.txt: -------------------------------------------------------------------------------- 1 | modbus_write_bit(3) 2 | =================== 3 | 4 | 5 | NAME 6 | ---- 7 | modbus_write_bit - write a single bit 8 | 9 | 10 | SYNOPSIS 11 | -------- 12 | *int modbus_write_bit(modbus_t *'ctx', int 'addr', int 'status');* 13 | 14 | 15 | DESCRIPTION 16 | ----------- 17 | The *modbus_write_bit()* function shall write the status of _status_ at the 18 | address _addr_ of the remote device. The value must be set to `TRUE` or `FALSE`. 19 | 20 | The function uses the Modbus function code 0x05 (force single coil). 21 | 22 | 23 | RETURN VALUE 24 | ------------ 25 | The function shall return 1 if successful. Otherwise it shall return -1 and set 26 | errno. 27 | 28 | 29 | SEE ALSO 30 | -------- 31 | linkmb:modbus_read_bits[3] 32 | linkmb:modbus_write_bits[3] 33 | 34 | 35 | AUTHORS 36 | ------- 37 | The libmodbus documentation was written by Stéphane Raimbault 38 | 39 | -------------------------------------------------------------------------------- /libmodbus/doc/modbus_write_bits.txt: -------------------------------------------------------------------------------- 1 | modbus_write_bits(3) 2 | ==================== 3 | 4 | 5 | NAME 6 | ---- 7 | modbus_write_bits - write many bits 8 | 9 | 10 | SYNOPSIS 11 | -------- 12 | *int modbus_write_bits(modbus_t *'ctx', int 'addr', int 'nb', const uint8_t *'src');* 13 | 14 | 15 | DESCRIPTION 16 | ----------- 17 | The *modbus_write_bits()* function shall write the status of the _nb_ bits 18 | (coils) from _src_ at the address _addr_ of the remote device. The 19 | _src_ array must contains bytes set to `TRUE` or `FALSE`. 20 | 21 | The function uses the Modbus function code 0x0F (force multiple coils). 22 | 23 | 24 | RETURN VALUE 25 | ------------ 26 | The function shall return the number of written bits if successful. Otherwise it 27 | shall return -1 and set errno. 28 | 29 | 30 | ERRORS 31 | ------ 32 | *EMBMDATA*:: 33 | Writing too many bits 34 | 35 | 36 | SEE ALSO 37 | -------- 38 | linkmb:modbus_read_bits[3] 39 | linkmb:modbus_write_bit[3] 40 | 41 | 42 | AUTHORS 43 | ------- 44 | The libmodbus documentation was written by Stéphane Raimbault 45 | 46 | -------------------------------------------------------------------------------- /libmodbus/doc/modbus_write_register.txt: -------------------------------------------------------------------------------- 1 | modbus_write_register(3) 2 | ======================== 3 | 4 | 5 | NAME 6 | ---- 7 | modbus_write_register - write a single register 8 | 9 | 10 | SYNOPSIS 11 | -------- 12 | *int modbus_write_register(modbus_t *'ctx', int 'addr', const uint16_t 'value');* 13 | 14 | 15 | DESCRIPTION 16 | ----------- 17 | The *modbus_write_register()* function shall write the value of _value_ 18 | holding registers at the address _addr_ of the remote device. 19 | 20 | The function uses the Modbus function code 0x06 (preset single register). 21 | 22 | 23 | RETURN VALUE 24 | ------------ 25 | The function shall return 1 if successful. Otherwise it shall return -1 and set 26 | errno. 27 | 28 | 29 | SEE ALSO 30 | -------- 31 | linkmb:modbus_read_registers[3] 32 | linkmb:modbus_write_registers[3] 33 | 34 | 35 | AUTHORS 36 | ------- 37 | The libmodbus documentation was written by Stéphane Raimbault 38 | 39 | -------------------------------------------------------------------------------- /libmodbus/doc/modbus_write_registers.txt: -------------------------------------------------------------------------------- 1 | modbus_write_registers(3) 2 | ========================= 3 | 4 | 5 | NAME 6 | ---- 7 | modbus_write_registers - write many registers 8 | 9 | 10 | SYNOPSIS 11 | -------- 12 | *int modbus_write_registers(modbus_t *'ctx', int 'addr', int 'nb', const uint16_t *'src');* 13 | 14 | 15 | DESCRIPTION 16 | ----------- 17 | The *modbus_write_registers()* function shall write the content of the _nb_ 18 | holding registers from the array _src_ at address _addr_ of the remote device. 19 | 20 | The function uses the Modbus function code 0x10 (preset multiple registers). 21 | 22 | 23 | RETURN VALUE 24 | ------------ 25 | The function shall return the number of written registers if 26 | successful. Otherwise it shall return -1 and set errno. 27 | 28 | 29 | SEE ALSO 30 | -------- 31 | linkmb:modbus_write_register[3] 32 | linkmb:modbus_read_registers[3] 33 | 34 | 35 | AUTHORS 36 | ------- 37 | The libmodbus documentation was written by Stéphane Raimbault 38 | 39 | -------------------------------------------------------------------------------- /libmodbus/src/Makefile.am: -------------------------------------------------------------------------------- 1 | EXTRA_DIST = 2 | lib_LTLIBRARIES = libmodbus.la 3 | 4 | AM_CPPFLAGS = \ 5 | -include $(top_builddir)/config.h \ 6 | -DSYSCONFDIR=\""$(sysconfdir)"\" \ 7 | -DLIBEXECDIR=\""$(libexecdir)"\" \ 8 | -I${top_srcdir}/src 9 | 10 | AM_CFLAGS = ${my_CFLAGS} 11 | 12 | libmodbus_la_SOURCES = \ 13 | modbus.c \ 14 | modbus.h \ 15 | modbus-data.c \ 16 | modbus-private.h \ 17 | modbus-rtu.c \ 18 | modbus-rtu.h \ 19 | modbus-rtu-private.h \ 20 | modbus-tcp.c \ 21 | modbus-tcp.h \ 22 | modbus-tcp-private.h \ 23 | modbus-version.h 24 | 25 | libmodbus_la_LDFLAGS = -no-undefined \ 26 | -version-info $(LIBMODBUS_LT_VERSION_INFO) 27 | 28 | if OS_WIN32 29 | libmodbus_la_LIBADD = -lwsock32 30 | endif 31 | 32 | if OS_QNX 33 | libmodbus_la_LIBADD = -lsocket 34 | endif 35 | 36 | # Header files to install 37 | libmodbusincludedir = $(includedir)/modbus 38 | libmodbusinclude_HEADERS = modbus.h modbus-version.h modbus-rtu.h modbus-tcp.h 39 | 40 | DISTCLEANFILES = modbus-version.h 41 | EXTRA_DIST += modbus-version.h.in 42 | CLEANFILES = *~ 43 | -------------------------------------------------------------------------------- /libmodbus/src/config.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | #define MCU 1 6 | -------------------------------------------------------------------------------- /libmodbus/src/modbus-rtu-private.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2001-2011 Stéphane Raimbault 3 | * 4 | * SPDX-License-Identifier: LGPL-2.1-or-later 5 | */ 6 | 7 | #ifndef MODBUS_RTU_PRIVATE_H 8 | #define MODBUS_RTU_PRIVATE_H 9 | 10 | #include 11 | 12 | #define _MODBUS_RTU_HEADER_LENGTH 1 13 | #define _MODBUS_RTU_PRESET_REQ_LENGTH 6 14 | #define _MODBUS_RTU_PRESET_RSP_LENGTH 2 15 | 16 | #define _MODBUS_RTU_CHECKSUM_LENGTH 2 17 | 18 | typedef struct _modbus_rtu { 19 | /* Device: "/dev/ttyS0", "/dev/ttyUSB0" or "/dev/tty.USA19*" on Mac OS X. */ 20 | char *device; 21 | /* Bauds: 9600, 19200, 57600, 115200, etc */ 22 | int baud; 23 | /* Data bit */ 24 | uint8_t data_bit; 25 | /* Stop bit */ 26 | uint8_t stop_bit; 27 | /* Parity: 'N', 'O', 'E' */ 28 | char parity; 29 | 30 | /* To handle many slaves on the same link */ 31 | int confirmation_to_ignore; 32 | } modbus_rtu_t; 33 | 34 | extern int libmodbuserrno; 35 | 36 | /* Port functions */ 37 | ssize_t modbus_serial_send(const uint8_t *req, int req_length); 38 | ssize_t modbus_serial_recv(uint8_t *rsp, int rsp_length, int response_timeout); 39 | int modbus_serial_connect(const char *device, uint32_t baud, uint8_t parity, uint8_t data_bit, char stop_bit); 40 | 41 | #endif /* MODBUS_RTU_PRIVATE_H */ 42 | -------------------------------------------------------------------------------- /libmodbus/src/modbus-rtu.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2001-2011 Stéphane Raimbault 3 | * 4 | * SPDX-License-Identifier: LGPL-2.1-or-later 5 | */ 6 | 7 | #ifndef MODBUS_RTU_H 8 | #define MODBUS_RTU_H 9 | 10 | #include "modbus.h" 11 | 12 | MODBUS_BEGIN_DECLS 13 | 14 | /* Modbus_Application_Protocol_V1_1b.pdf Chapter 4 Section 1 Page 5 15 | * RS232 / RS485 ADU = 253 bytes + slave (1 byte) + CRC (2 bytes) = 256 bytes 16 | */ 17 | #define MODBUS_RTU_MAX_ADU_LENGTH 256 18 | 19 | MODBUS_API modbus_t* modbus_new_rtu(const char *device, int baud, char parity, 20 | int data_bit, int stop_bit); 21 | 22 | MODBUS_END_DECLS 23 | 24 | #endif /* MODBUS_RTU_H */ 25 | -------------------------------------------------------------------------------- /libmodbus/src/modbus-tcp-private.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2001-2011 Stéphane Raimbault 3 | * 4 | * SPDX-License-Identifier: LGPL-2.1-or-later 5 | */ 6 | 7 | #ifndef MODBUS_TCP_PRIVATE_H 8 | #define MODBUS_TCP_PRIVATE_H 9 | 10 | #define _MODBUS_TCP_HEADER_LENGTH 7 11 | #define _MODBUS_TCP_PRESET_REQ_LENGTH 12 12 | #define _MODBUS_TCP_PRESET_RSP_LENGTH 8 13 | 14 | #define _MODBUS_TCP_CHECKSUM_LENGTH 0 15 | 16 | /* In both structures, the transaction ID must be placed on first position 17 | to have a quick access not dependant of the TCP backend */ 18 | typedef struct _modbus_tcp { 19 | /* Extract from MODBUS Messaging on TCP/IP Implementation Guide V1.0b 20 | (page 23/46): 21 | The transaction identifier is used to associate the future response 22 | with the request. This identifier is unique on each TCP connection. */ 23 | uint16_t t_id; 24 | /* TCP port */ 25 | int port; 26 | /* IP address */ 27 | char ip[16]; 28 | } modbus_tcp_t; 29 | 30 | #define _MODBUS_TCP_PI_NODE_LENGTH 1025 31 | #define _MODBUS_TCP_PI_SERVICE_LENGTH 32 32 | 33 | typedef struct _modbus_tcp_pi { 34 | /* Transaction ID */ 35 | uint16_t t_id; 36 | /* TCP port */ 37 | int port; 38 | /* Node */ 39 | char node[_MODBUS_TCP_PI_NODE_LENGTH]; 40 | /* Service */ 41 | char service[_MODBUS_TCP_PI_SERVICE_LENGTH]; 42 | } modbus_tcp_pi_t; 43 | 44 | #endif /* MODBUS_TCP_PRIVATE_H */ 45 | -------------------------------------------------------------------------------- /libmodbus/tests/Makefile.am: -------------------------------------------------------------------------------- 1 | EXTRA_DIST = README.md unit-tests.sh 2 | 3 | noinst_PROGRAMS = \ 4 | bandwidth-server-one \ 5 | bandwidth-server-many-up \ 6 | bandwidth-client \ 7 | random-test-server \ 8 | random-test-client \ 9 | unit-test-server \ 10 | unit-test-client \ 11 | version 12 | 13 | common_ldflags = \ 14 | $(top_builddir)/src/libmodbus.la 15 | 16 | bandwidth_server_one_SOURCES = bandwidth-server-one.c 17 | bandwidth_server_one_LDADD = $(common_ldflags) 18 | 19 | bandwidth_server_many_up_SOURCES = bandwidth-server-many-up.c 20 | bandwidth_server_many_up_LDADD = $(common_ldflags) 21 | 22 | bandwidth_client_SOURCES = bandwidth-client.c 23 | bandwidth_client_LDADD = $(common_ldflags) 24 | 25 | random_test_server_SOURCES = random-test-server.c 26 | random_test_server_LDADD = $(common_ldflags) 27 | 28 | random_test_client_SOURCES = random-test-client.c 29 | random_test_client_LDADD = $(common_ldflags) 30 | 31 | unit_test_server_SOURCES = unit-test-server.c unit-test.h 32 | unit_test_server_LDADD = $(common_ldflags) 33 | 34 | unit_test_client_SOURCES = unit-test-client.c unit-test.h 35 | unit_test_client_LDADD = $(common_ldflags) 36 | 37 | version_SOURCES = version.c 38 | version_LDADD = $(common_ldflags) 39 | 40 | AM_CPPFLAGS = \ 41 | -include $(top_builddir)/config.h \ 42 | -DSYSCONFDIR=\""$(sysconfdir)"\" \ 43 | -DLIBEXECDIR=\""$(libexecdir)"\" \ 44 | -I${top_srcdir}/src \ 45 | -I${top_builddir}/src 46 | 47 | AM_CFLAGS = ${my_CFLAGS} 48 | 49 | CLEANFILES = *~ *.log 50 | 51 | noinst_SCRIPTS=unit-tests.sh 52 | TESTS=./unit-tests.sh 53 | -------------------------------------------------------------------------------- /libmodbus/tests/README.md: -------------------------------------------------------------------------------- 1 | # License 2 | Test programs of this directory are provided under BSD license (see associated 3 | LICENSE file). 4 | 5 | # Compilation 6 | After installation, you can use pkg-config to compile these tests. 7 | For example, to compile random-test-server run: 8 | 9 | gcc random-test-server.c -o random-test-server `pkg-config --libs --cflags libmodbus` 10 | 11 | - `random-test-server` is necessary to launch a server before running 12 | random-test-client. By default, it receives and replies to Modbus query on the 13 | localhost and port 1502. 14 | 15 | - `random-test-client` sends many different queries to a large range of 16 | addresses and values to test the communication between the client and the 17 | server. 18 | 19 | - `unit-test-server` and `unit-test-client` run a full unit test suite. These 20 | programs are essential to test the Modbus protocol implementation and libmodbus 21 | behavior. 22 | 23 | - `bandwidth-server-one`, `bandwidth-server-many-up` and `bandwidth-client` 24 | return very useful information about the performance of transfert rate between 25 | the server and the client. `bandwidth-server-one` can only handles one 26 | connection at once with a client whereas `bandwidth-server-many-up` opens a 27 | connection for each new clients (with a limit). 28 | -------------------------------------------------------------------------------- /libmodbus/tests/random-test-server.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2008-2014 Stéphane Raimbault 3 | * 4 | * SPDX-License-Identifier: BSD-3-Clause 5 | */ 6 | 7 | #include 8 | #ifndef _MSC_VER 9 | #include 10 | #endif 11 | #include 12 | #include 13 | 14 | #include 15 | 16 | int main(void) 17 | { 18 | int s = -1; 19 | modbus_t *ctx; 20 | modbus_mapping_t *mb_mapping; 21 | 22 | ctx = modbus_new_tcp("127.0.0.1", 1502); 23 | /* modbus_set_debug(ctx, TRUE); */ 24 | 25 | mb_mapping = modbus_mapping_new(500, 500, 500, 500); 26 | if (mb_mapping == NULL) { 27 | fprintf(stderr, "Failed to allocate the mapping: %s\n", 28 | modbus_strerror(errno)); 29 | modbus_free(ctx); 30 | return -1; 31 | } 32 | 33 | s = modbus_tcp_listen(ctx, 1); 34 | modbus_tcp_accept(ctx, &s); 35 | 36 | for (;;) { 37 | uint8_t query[MODBUS_TCP_MAX_ADU_LENGTH]; 38 | int rc; 39 | 40 | rc = modbus_receive(ctx, query); 41 | if (rc > 0) { 42 | /* rc is the query size */ 43 | modbus_reply(ctx, query, rc, mb_mapping); 44 | } else if (rc == -1) { 45 | /* Connection closed by the client or error */ 46 | break; 47 | } 48 | } 49 | 50 | printf("Quit the loop: %s\n", modbus_strerror(errno)); 51 | 52 | if (s != -1) { 53 | close(s); 54 | } 55 | modbus_mapping_free(mb_mapping); 56 | modbus_close(ctx); 57 | modbus_free(ctx); 58 | 59 | return 0; 60 | } 61 | -------------------------------------------------------------------------------- /libmodbus/tests/unit-tests.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | client_log=unit-test-client.log 4 | server_log=unit-test-server.log 5 | 6 | rm -f $client_log $server_log 7 | 8 | echo "Starting server" 9 | ./unit-test-server > $server_log 2>&1 & 10 | 11 | sleep 1 12 | 13 | echo "Starting client" 14 | ./unit-test-client > $client_log 2>&1 15 | rc=$? 16 | 17 | killall unit-test-server 18 | exit $rc 19 | 20 | -------------------------------------------------------------------------------- /libmodbus/tests/version.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2008-2014 Stéphane Raimbault 3 | * 4 | * SPDX-License-Identifier: BSD-3-Clause 5 | */ 6 | 7 | #include 8 | #include 9 | 10 | int main(void) 11 | { 12 | printf("Compiled with libmodbus version %s (%06X)\n", LIBMODBUS_VERSION_STRING, LIBMODBUS_VERSION_HEX); 13 | printf("Linked with libmodbus version %d.%d.%d\n", 14 | libmodbus_version_major, libmodbus_version_minor, libmodbus_version_micro); 15 | 16 | if (LIBMODBUS_VERSION_CHECK(2, 1, 0)) { 17 | printf("The functions to read/write float values are available (2.1.0).\n"); 18 | } 19 | 20 | if (LIBMODBUS_VERSION_CHECK(2, 1, 1)) { 21 | printf("Oh gosh, brand new API (2.1.1)!\n"); 22 | } 23 | 24 | return 0; 25 | } 26 | -------------------------------------------------------------------------------- /libmodbusport/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(libmodbusport STATIC 2 | modbusprint.c 3 | rtuport.c 4 | ) 5 | 6 | target_link_libraries(libmodbusport freertos drivers utils) 7 | -------------------------------------------------------------------------------- /libmodbusport/modbusprint.c: -------------------------------------------------------------------------------- 1 | /*!**************************************************************************** 2 | * @file modbusprint.c 3 | * @author d_el 4 | * @version V1.0 5 | * @date Dec 27, 2020 6 | * @brief 7 | * @copyright The MIT License (MIT). Copyright (c) 2020 Storozhenko Roman 8 | * @brief connect interface with regulator 9 | */ 10 | 11 | /*!**************************************************************************** 12 | * Include 13 | */ 14 | 15 | /*!**************************************************************************** 16 | * MEMORY 17 | */ 18 | 19 | /*!**************************************************************************** 20 | * @brief 21 | */ 22 | int modbus_printf(const char *format, ...){ 23 | (void)format; 24 | return 0; 25 | } 26 | 27 | int modbus_err_printf(const char *format, ...){ 28 | (void)format; 29 | return 0; 30 | } 31 | 32 | /******************************** END OF FILE ********************************/ 33 | -------------------------------------------------------------------------------- /net/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(net STATIC 2 | src/htmlPage.c 3 | src/httpServerTSK.c 4 | src/sntp.c 5 | ) 6 | 7 | target_include_directories(net PUBLIC 8 | include 9 | ) 10 | 11 | target_link_libraries(net lwip) 12 | -------------------------------------------------------------------------------- /net/include/httpServerTSK.h: -------------------------------------------------------------------------------- 1 | /*!**************************************************************************** 2 | * @file httpServerTSK.h 3 | * @author d_el - Storozhenko Roman 4 | * @version V1.0 5 | * @date 06.09.2017 6 | * @copyright The MIT License (MIT). Copyright (c) 2017 Storozhenko Roman 7 | * @brief HTTP Server 8 | */ 9 | #ifndef httpServerTSK_H 10 | #define httpServerTSK_H 11 | 12 | #ifdef __cplusplus 13 | extern "C" { 14 | #endif 15 | 16 | /*!**************************************************************************** 17 | * Include 18 | */ 19 | #include "stdint.h" 20 | 21 | /*!**************************************************************************** 22 | * Typedef 23 | */ 24 | typedef struct{ 25 | uint32_t numberRequest; 26 | }httpServer_type; 27 | 28 | /*!**************************************************************************** 29 | * Exported variables 30 | */ 31 | extern httpServer_type httpServer; 32 | 33 | /*!**************************************************************************** 34 | * Macro functions 35 | */ 36 | 37 | /*!**************************************************************************** 38 | * Function declaration 39 | */ 40 | void httpServerTSK(void *pPrm); 41 | 42 | #ifdef __cplusplus 43 | } 44 | #endif 45 | 46 | #endif //httpServerTSK__H 47 | /******************************** END OF FILE ********************************/ 48 | -------------------------------------------------------------------------------- /net/include/sntp.h: -------------------------------------------------------------------------------- 1 | /*!**************************************************************************** 2 | * @file sntp.h 3 | * @author Author: Simon Goldschmidt (lwIP raw API part), d_el - Storozhenko Roman 4 | * @version V1.0 5 | * @date 24.09.2017 6 | * @copyright The MIT License (MIT). Copyright (c) 2017 Storozhenko Roman 7 | * @brief SNTP client module 8 | */ 9 | #ifndef sntp_H 10 | #define sntp_H 11 | 12 | #ifdef __cplusplus 13 | extern "C" { 14 | #endif 15 | 16 | /*!**************************************************************************** 17 | * Include 18 | */ 19 | 20 | /*!**************************************************************************** 21 | * Define 22 | */ 23 | 24 | /*!**************************************************************************** 25 | * Enumeration 26 | */ 27 | 28 | /*!**************************************************************************** 29 | * Typedef 30 | */ 31 | 32 | /*!**************************************************************************** 33 | * Exported variables 34 | */ 35 | 36 | /*!**************************************************************************** 37 | * Macro functions 38 | */ 39 | 40 | /*!**************************************************************************** 41 | * Function declaration 42 | */ 43 | void sntp_init(void); 44 | 45 | #ifdef __cplusplus 46 | } 47 | #endif 48 | 49 | #endif //sntp_H 50 | /******************************** END OF FILE ********************************/ 51 | -------------------------------------------------------------------------------- /net/resource/404.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | PS3604 State 7 | 8 | 9 | 10 |
11 |
12 |

404

13 |
14 |

Page not found

15 |
16 |
17 | 18 |
19 |
20 | ©copyright: 2013-2018 Storozhenko Roman 21 |
22 |
23 | 24 | 25 | -------------------------------------------------------------------------------- /net/resource/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d-el/PS3604L_Panel/e498f5e43476461b4933d39cc9d6ee77232ff84f/net/resource/favicon.png -------------------------------------------------------------------------------- /net/resource/index.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | PS3604 State 7 | 8 | 9 | 10 | 11 |
12 |
13 |
14 |
15 | 16 |
17 |
STATE
18 | 19 | 20 |
21 |
22 | 23 |
24 |
MEAS
25 | 26 | 27 |
28 |
29 | 30 |
31 |
SETTING
32 | 33 | 34 |
35 |
36 |
37 | 38 |
39 |
40 | ©copyright: 2013-2025 DEL 41 |
42 |
43 | 44 | 45 | -------------------------------------------------------------------------------- /prmsystem/.gitignore: -------------------------------------------------------------------------------- 1 | generated/** 2 | -------------------------------------------------------------------------------- /prmsystem/include/prmSystemCallback.h: -------------------------------------------------------------------------------- 1 | /*!**************************************************************************** 2 | * @file prmSystemCallback.h 3 | * @author d_el 4 | * @version V1.0 5 | * @date Dec 11, 2019 6 | * @brief 7 | */ 8 | 9 | #ifndef prmSystemCallback_H 10 | #define prmSystemCallback_H 11 | 12 | /*!**************************************************************************** 13 | * Include 14 | */ 15 | #include "prmSystem.h" 16 | 17 | /*!**************************************************************************** 18 | * Define 19 | */ 20 | 21 | /*!**************************************************************************** 22 | * Enumeration 23 | */ 24 | 25 | /*!**************************************************************************** 26 | * Typedef 27 | */ 28 | 29 | /*!**************************************************************************** 30 | * Exported variables 31 | */ 32 | 33 | /*!**************************************************************************** 34 | * Macro functions 35 | */ 36 | 37 | /*!**************************************************************************** 38 | * Function declaration 39 | */ 40 | #endif //prmSystemCallback_H 41 | /******************************** END OF FILE ********************************/ 42 | -------------------------------------------------------------------------------- /prmsystem/src/prmSystemCallback.cpp: -------------------------------------------------------------------------------- 1 | /*!**************************************************************************** 2 | * @file prmSystemCallback.c 3 | * @author d_el 4 | * @version V1.0 5 | * @date Dec 11, 2019 6 | * @brief 7 | */ 8 | 9 | /*!**************************************************************************** 10 | * Include 11 | */ 12 | #include 13 | #include 14 | #include 15 | #include "prmSystemCallback.h" 16 | 17 | /******************************** END OF FILE ********************************/ 18 | -------------------------------------------------------------------------------- /regulator/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(regulator STATIC 2 | src/modbusServerTSK.c 3 | src/regulatorConnTSK.c 4 | ) 5 | 6 | target_include_directories(regulator PUBLIC 7 | include 8 | ) 9 | 10 | target_link_libraries(regulator freertos drivers utils lwip systems prmsystem libmodbus) 11 | -------------------------------------------------------------------------------- /scripts/flash.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | hexfile=${HEX:-$(dirname "$0")/../build/PS3604LF.hex} 4 | echo "Hex file: ${hexfile}" 5 | 6 | debugger=${DEBUGGER:-openocd-jlink} 7 | echo "Debugger: ${debugger}" 8 | 9 | $(dirname "$0")/gdb-serv.sh $debugger -c "reset halt" -c "flash write_image erase $hexfile" -c " flash verify_image $hexfile" -c "reset" -c shutdown 10 | -------------------------------------------------------------------------------- /scripts/gdb-client.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function usage() 4 | { 5 | cat << HEREDOC 6 | Usage: $progname [-h|--help] [-g|--gdbinitfile file]] 7 | optional arguments: 8 | -h, --help show this help message and exit 9 | -g, --gdbinitfile set GDB init file 10 | HEREDOC 11 | } 12 | 13 | # save current dir 14 | cwd=$(pwd) 15 | # cd to script dir 16 | DIR="$(cd "$(dirname "$0")" && pwd)" 17 | cd $DIR 18 | 19 | GDBINITFILE=gdbinit 20 | GDB=arm-none-eabi-gdb 21 | ELF=../build/PS3604LF.elf 22 | 23 | progname=$(basename $0) 24 | OPTS=$(getopt -o "hg:" --long "help,gdbinitfile:" -n "$progname" -- "$@") 25 | if [ $? != 0 ] ; then echo "Error in command line arguments." >&2 ; usage; exit 1 ; fi 26 | eval set -- "$OPTS" 27 | 28 | while true; do 29 | case "$1" in 30 | -h | --help ) usage; exit; ;; 31 | -g | --gdbinitfile ) GDBINITFILE=$cwd/"$2"; shift 2 ;; 32 | -- ) shift; break ;; 33 | * ) break ;; 34 | esac 35 | done 36 | 37 | $GDB -x $GDBINITFILE $ELF 38 | 39 | # restore current dir 40 | cd $cwd 41 | -------------------------------------------------------------------------------- /scripts/gdb-serv.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function usage() 4 | { 5 | cat << HEREDOC 6 | Usage: $progname 16 | 17 | /*!**************************************************************************** 18 | * Define 19 | */ 20 | 21 | /*!**************************************************************************** 22 | * Enumeration 23 | */ 24 | 25 | /*!**************************************************************************** 26 | * Typedef 27 | */ 28 | 29 | /*!**************************************************************************** 30 | * Exported variables 31 | */ 32 | extern uint32_t startCounter; 33 | 34 | /*!**************************************************************************** 35 | * Macro functions 36 | */ 37 | 38 | /*!**************************************************************************** 39 | * Function declaration 40 | */ 41 | void startupTSK(void *pPrm); 42 | 43 | #endif //startupTSK_H 44 | /******************************** END OF FILE ********************************/ 45 | -------------------------------------------------------------------------------- /toolchain.cmake: -------------------------------------------------------------------------------- 1 | SET(CMAKE_SYSTEM arm-cortex-m4) 2 | set(CMAKE_SYSTEM_NAME Generic) 3 | set(CMAKE_SYSTEM_PROCESSOR cortex-m4) 4 | 5 | set(CMAKE_ASM_COMPILER arm-none-eabi-gcc) 6 | set(CMAKE_C_COMPILER arm-none-eabi-gcc) 7 | set(CMAKE_CXX_COMPILER arm-none-eabi-g++) 8 | 9 | set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) 10 | set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) 11 | set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) 12 | set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) 13 | 14 | 15 | set(CPUFLAGS "-mcpu=cortex-m4 -march=armv7e-m -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16") 16 | 17 | set(CMAKE_CXX_FLAGS ${CPUFLAGS} CACHE INTERNAL "") 18 | set(CMAKE_C_FLAGS ${CPUFLAGS} CACHE INTERNAL "") 19 | 20 | set(CMAKE_EXE_LINKER_FLAGS "-T ${CMAKE_CURRENT_SOURCE_DIR}/systems/STM32F407VETx_FLASH.ld -Wl,--gc-sections --specs=nano.specs" 21 | CACHE INTERNAL "" 22 | ) 23 | -------------------------------------------------------------------------------- /tools/prmsytem2json/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | prmsytem2json 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.cdt.managedbuilder.core.genmakebuilder 10 | clean,full,incremental, 11 | 12 | 13 | 14 | 15 | org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder 16 | full,incremental, 17 | 18 | 19 | 20 | 21 | 22 | org.eclipse.cdt.core.cnature 23 | org.eclipse.cdt.core.ccnature 24 | org.eclipse.cdt.managedbuilder.core.managedBuildNature 25 | org.eclipse.cdt.managedbuilder.core.ScannerConfigNature 26 | 27 | 28 | -------------------------------------------------------------------------------- /tools/prmsytem2json/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.14) 2 | 3 | project(prmsytem2json CXX) 4 | set(CMAKE_CXX_STANDARD 17) 5 | 6 | find_package(jsoncpp REQUIRED) 7 | 8 | set(COMMONFLAGS "\ 9 | -g3 -Og \ 10 | ") 11 | 12 | set(CMAKE_CXX_FLAGS "${CPUFLAGS} ${COMMONFLAGS} -std=c++17") 13 | set(CMAKE_C_FLAGS "${CPUFLAGS} ${COMMONFLAGS} -std=gnu11") 14 | 15 | add_executable(prmsytem2json 16 | gen.cpp 17 | ) 18 | -------------------------------------------------------------------------------- /tools/prmtool/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | prmsytem2json 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.cdt.managedbuilder.core.genmakebuilder 10 | clean,full,incremental, 11 | 12 | 13 | 14 | 15 | org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder 16 | full,incremental, 17 | 18 | 19 | 20 | 21 | 22 | org.eclipse.cdt.core.cnature 23 | org.eclipse.cdt.core.ccnature 24 | org.eclipse.cdt.managedbuilder.core.managedBuildNature 25 | org.eclipse.cdt.managedbuilder.core.ScannerConfigNature 26 | 27 | 28 | -------------------------------------------------------------------------------- /tools/prmtool/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required (VERSION 2.6) 2 | 3 | project (prmtool CXX) 4 | set(CMAKE_CXX_STANDARD 17) 5 | 6 | set(COMMONFLAGS "\ 7 | -g3 -Og \ 8 | ") 9 | 10 | set(CMAKE_CXX_FLAGS "${CPUFLAGS} ${COMMONFLAGS} -std=c++17") 11 | set(CMAKE_C_FLAGS "${CPUFLAGS} ${COMMONFLAGS} -std=gnu11") 12 | 13 | add_executable(prmtool 14 | prmtool.cpp 15 | ) 16 | 17 | target_link_libraries(prmtool 18 | jsoncpp 19 | ) 20 | -------------------------------------------------------------------------------- /tools/prmtool/prmtool.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | struct NamedParam{ 11 | std::string name; 12 | Json::Value param; 13 | }; 14 | 15 | std::optional find(const Json::Value& from, std::uint16_t addr){ 16 | using namespace std; 17 | for(const auto& group : from){ 18 | for(auto param = group.begin(); param != group.end(); ++param) 19 | if(stoul((*param)["address"].asString(), nullptr, 0) == addr) 20 | return NamedParam { param.key().asString(), *param }; 21 | } 22 | return{}; 23 | } 24 | 25 | int main(int argc, char* argv[]){ 26 | using namespace std; 27 | ifstream in(argv[1]); 28 | uint16_t address = strtol(argv[2], nullptr, 16); 29 | 30 | Json::Reader reader; 31 | Json::Value root; 32 | reader.parse(in, root); 33 | 34 | cout << hex << uppercase << setfill( '0' ); 35 | auto p = find( root[ "parameters" ], address ); 36 | if(p){ 37 | cout << "[" << p->name << "]\n" << p->param << "\n"; 38 | } 39 | else{ 40 | cout << "no parameter\n"; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /utils/.gitignore: -------------------------------------------------------------------------------- 1 | include/version.h -------------------------------------------------------------------------------- /utils/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(utils STATIC 2 | src/crc.c 3 | src/plog.c 4 | src/specificMath.c 5 | src/timegm.c 6 | ) 7 | 8 | target_include_directories(utils PUBLIC 9 | include 10 | ) 11 | 12 | target_link_libraries(utils freertos drivers iqmathlib-cm4) 13 | -------------------------------------------------------------------------------- /utils/include/timegm.h: -------------------------------------------------------------------------------- 1 | /*!**************************************************************************** 2 | * @file timegm.h 3 | * @author d_el 4 | * @version V1.0 5 | * @date Oct 4, 2022 6 | * @copyright License (MIT). Copyright (c) 2022 Storozhenko Roman 7 | * @brief 8 | */ 9 | 10 | #ifndef timegm_H 11 | #define timegm_H 12 | 13 | #ifdef __cplusplus 14 | extern "C" { 15 | #endif 16 | 17 | #include 18 | 19 | /*!**************************************************************************** 20 | * Function declaration 21 | */ 22 | time_t timegm(struct tm const *t); 23 | 24 | #ifdef __cplusplus 25 | } 26 | #endif 27 | 28 | #endif //timegm_H 29 | /******************************** END OF FILE ********************************/ 30 | -------------------------------------------------------------------------------- /utils/include/version.h.in: -------------------------------------------------------------------------------- 1 | /*!**************************************************************************** 2 | * @file version.h 3 | * @author d_el 4 | * @copyright The MIT License (MIT). Copyright (c) 2017 Storozhenko Roman 5 | */ 6 | 7 | inline const char* getVersion(){ 8 | return "@PROJECT_VERSION@"; 9 | } 10 | 11 | inline unsigned getVersionMajor(){ 12 | return @PROJECT_VERSION_MAJOR@; 13 | } 14 | 15 | inline unsigned getVersionMinor(){ 16 | return @PROJECT_VERSION_MINOR@ +0; 17 | } 18 | 19 | inline unsigned getVersionPatch(){ 20 | return @PROJECT_VERSION_PATCH@ +0; 21 | } 22 | 23 | inline unsigned getVersionTweak(){ 24 | return @PROJECT_VERSION_TWEAK@ +0; 25 | } 26 | 27 | /******************************** END OF FILE ********************************/ 28 | -------------------------------------------------------------------------------- /window/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(window STATIC 2 | src/arial.c 3 | src/baseTSK.cpp 4 | src/chargeTSK.cpp 5 | src/dsegBold.c 6 | src/dSegBold8x14.c 7 | src/font6x8.c 8 | src/font8x12.c 9 | src/footer.cpp 10 | src/ico.c 11 | src/imageLogo.c 12 | src/menuSystem.cpp 13 | src/settingTSK.cpp 14 | src/startupTSK.cpp 15 | src/ui.c 16 | ) 17 | 18 | target_include_directories(window PUBLIC 19 | include 20 | PRIVATE ../app/inc 21 | ) 22 | 23 | target_link_libraries(window freertos drivers dev utils) 24 | -------------------------------------------------------------------------------- /window/include/baseTSK.h: -------------------------------------------------------------------------------- 1 | /*!**************************************************************************** 2 | * @file base.h 3 | * @author d_el - Storozhenko Roman 4 | * @version V1.0 5 | * @date 01.01.2015 6 | * @copyright The MIT License (MIT). Copyright (c) 2020 Storozhenko Roman 7 | * @brief This task is base GUI 8 | */ 9 | #ifndef BASE_H 10 | #define BASE_H 11 | 12 | /*!**************************************************************************** 13 | * Include 14 | */ 15 | #include 16 | 17 | /****************************************************************************** 18 | * Define 19 | */ 20 | #define BASE_TSK_PERIOD (20) //[ms] 21 | 22 | /*!**************************************************************************** 23 | * Function declaration 24 | */ 25 | void baseTSK(void *pPrm); 26 | void printFooter(void); 27 | 28 | #endif //BASE_H 29 | /******************************** END OF FILE ********************************/ 30 | -------------------------------------------------------------------------------- /window/include/chargeTSK.h: -------------------------------------------------------------------------------- 1 | /*!**************************************************************************** 2 | * @file charge.h 3 | * @author d_el 4 | * @version V1.0 5 | * @date 31.01.20187 6 | * @copyright The MIT License (MIT). Copyright (c) 2017 Storozhenko Roman 7 | */ 8 | #ifndef CHARGE_H 9 | #define CHARGE_H 10 | 11 | /*!**************************************************************************** 12 | * Include 13 | */ 14 | #include "stdio.h" 15 | 16 | /****************************************************************************** 17 | * Define 18 | */ 19 | #define CH_TSK_PERIOD 20 //[ms] 20 | 21 | /*!**************************************************************************** 22 | * Function declaration 23 | */ 24 | void chargeTSK(void *pPrm); 25 | 26 | #endif //CHARGE_H 27 | /******************************** END OF FILE ********************************/ 28 | -------------------------------------------------------------------------------- /window/include/footer.h: -------------------------------------------------------------------------------- 1 | /*!**************************************************************************** 2 | * @file footer.h 3 | * @author d_el 4 | * @version V1.0 5 | * @date Dec 20, 2023 6 | * @copyright License (MIT). Copyright (c) 2023 Storozhenko Roman 7 | * @brief 8 | */ 9 | 10 | #ifndef footer_H 11 | #define footer_H 12 | 13 | /*!**************************************************************************** 14 | * Include 15 | */ 16 | 17 | /*!**************************************************************************** 18 | * Function declaration 19 | */ 20 | void printFooter(void); 21 | 22 | #endif //footer_H 23 | /******************************** END OF FILE ********************************/ 24 | -------------------------------------------------------------------------------- /window/include/image.h: -------------------------------------------------------------------------------- 1 | /*!**************************************************************************** 2 | * @file image.h 3 | * @author Storozhenko Roman 4 | */ 5 | #ifndef IMAGE_H 6 | #define IMAGE_H 7 | 8 | /*!**************************************************************************** 9 | * Include 10 | */ 11 | #include "stdint.h" 12 | 13 | /*!**************************************************************************** 14 | * Extern viriables 15 | */ 16 | extern const uint8_t ImStart[]; 17 | extern const uint8_t connImg[]; 18 | 19 | #endif //IMAGE_H 20 | /******************* (C) COPYRIGHT ***************** END OF FILE ********* D_EL *****/ 21 | -------------------------------------------------------------------------------- /window/include/settingTSK.h: -------------------------------------------------------------------------------- 1 | /*!**************************************************************************** 2 | * @file settingTSK.h 3 | * @author d_el - Storozhenko Roman 4 | * @version V1.1 5 | * @date 01.01.2016 6 | * @copyright The MIT License (MIT). Copyright (c) 2020 Storozhenko Roman 7 | * @brief This task create start screen 8 | */ 9 | #ifndef settingTSK_H 10 | #define settingTSK_H 11 | 12 | /*!**************************************************************************** 13 | * Include 14 | */ 15 | #include 16 | //#include "menuSystem.h" 17 | #include "time.h" 18 | 19 | /*!**************************************************************************** 20 | * Function declaration 21 | */ 22 | void settingTSK(void *pPrm); 23 | 24 | #ifdef __cplusplus 25 | extern "C" { 26 | #endif 27 | 28 | //itemState_type PrepareU(const menuItem_type *item); 29 | //itemState_type PrepareI(const menuItem_type *item); 30 | //itemState_type savePointU(const menuItem_type *item); 31 | //itemState_type savePointI(const menuItem_type *item); 32 | //itemState_type calibrExit(const menuItem_type *item); 33 | //itemState_type setBright(const menuItem_type *item); 34 | //itemState_type rtcSelect(const menuItem_type *item); 35 | //itemState_type rtcUnselect(const menuItem_type *item); 36 | //itemState_type netUpdate(const menuItem_type *item); 37 | 38 | #ifdef __cplusplus 39 | } 40 | #endif 41 | 42 | #endif //settingTSK_H 43 | /******************************** END OF FILE ********************************/ 44 | -------------------------------------------------------------------------------- /window/src/ui.c: -------------------------------------------------------------------------------- 1 | /*!**************************************************************************** 2 | * @file ui.c 3 | * @author d_el 4 | * @version V1.0 5 | * @date 20.12.2015, by d_el 6 | * @copyright The MIT License (MIT). Copyright (c) 2017 Storozhenko Roman 7 | * @brief user interface 8 | */ 9 | 10 | /*!**************************************************************************** 11 | * Include 12 | */ 13 | #include "ui.h" 14 | 15 | /*!**************************************************************************** 16 | * MEMORY 17 | */ 18 | const ui_type ui = { 19 | .color = { 20 | .cursor = green, 21 | .voltage = white, 22 | .current = white, 23 | .capacity = white, 24 | .imax = white, 25 | .mode = white, 26 | .background = black 27 | }, 28 | 29 | .beep = { 30 | .welcome = { 4100, 250 }, 31 | .shutdown = { 4100, 50 }, 32 | .key = { 4100, 30 }, 33 | .vallim = { 4100, 500 }, 34 | .cvToCc = { 3000, 50 }, 35 | .ccToCv = { 4500, 50 }, 36 | .ovfCurrent = { 4500, 500 }, 37 | .chargeFinish = { 4100, 2000 }, 38 | .error = { 3000, 100 }, 39 | .encoLim = { 4100, 200 }, 40 | .encoTransition = { 4100, 30 }, 41 | } 42 | }; 43 | 44 | /******************************** END OF FILE ********************************/ 45 | --------------------------------------------------------------------------------