├── CMakeLists.txt ├── Makefile ├── README.md ├── apps ├── BBRS Feature Creep.sln ├── BBRS Full Routing.sln ├── BBRS MSVC.sln ├── Dobby FC.sln ├── Makefile ├── bacnetlib │ ├── bacnetlib.vcxproj │ └── bacnetlib.vcxproj.filters ├── readprop │ └── main.c ├── server │ ├── Makefile │ ├── Server.vcxproj │ ├── Server.vcxproj.filters │ ├── bacserv │ ├── configProj.h │ └── main.c ├── whois │ ├── Makefile │ ├── configProj.h │ ├── main.c │ ├── whois.vcxproj │ └── whois.vcxproj.filters └── writeprop │ └── main.c ├── ports ├── CMakeLists.txt ├── linux │ ├── CMakeLists.txt │ ├── bacport.h │ ├── bip-init.c │ ├── datetime-init.c │ ├── dlmstp.c │ ├── dlmstp_linux.h │ ├── ethernet.c │ ├── mstimer-init.c │ ├── rs485.c │ └── rs485.h └── win32 │ ├── bacport.h │ ├── bip-init.c │ ├── bip6.c │ ├── datetime-init.c │ ├── dlmstp-mm.c │ ├── dlmstp.c │ ├── ethernet.c │ ├── mstimer-init.c │ ├── rs485.c │ ├── rs485.h │ └── rx_fsm.c └── src ├── CMakeLists.txt ├── Makefile ├── bacnet ├── CMakeLists.txt ├── abort.c ├── abort.h ├── access_rule.c ├── access_rule.h ├── alarm_ack.c ├── alarm_ack.h ├── apdu.h ├── arf.c ├── arf.h ├── assigned_access_rights.c ├── assigned_access_rights.h ├── authentication_factor.c ├── authentication_factor.h ├── authentication_factor_format.c ├── authentication_factor_format.h ├── awf.c ├── awf.h ├── bacaddr.c ├── bacaddr.h ├── bacapp.c ├── bacapp.h ├── bacdcode.c ├── bacdcode.h ├── bacdef.h ├── bacdevobjpropref.c ├── bacdevobjpropref.h ├── bacenum.h ├── bacerror.c ├── bacerror.h ├── bacint.c ├── bacint.h ├── bacnet_stack_exports.h ├── bacprop.c ├── bacprop.h ├── bacpropstates.c ├── bacpropstates.h ├── bacreal.c ├── bacreal.h ├── bacstr.c ├── bacstr.h ├── bactext.c ├── bactext.h ├── bactimevalue.c ├── bactimevalue.h ├── basic │ ├── CMakeLists.txt │ ├── bbmd │ │ ├── h_bbmd.c │ │ └── h_bbmd.h │ ├── bbmd6 │ │ ├── h_bbmd6.c │ │ ├── h_bbmd6.h │ │ ├── vmac.c │ │ └── vmac.h │ ├── binding │ │ ├── CMakeLists.txt │ │ ├── address.c │ │ └── address.h │ ├── npdu │ │ ├── CMakeLists.txt │ │ ├── h_npdu.c │ │ ├── h_npdu.h │ │ └── h_routed_npdu.c │ ├── object │ │ ├── CMakeLists.txt │ │ ├── acc.c │ │ ├── acc.h │ │ ├── access_credential.c │ │ ├── ai.c │ │ ├── ai.h │ │ ├── ao.c │ │ ├── ao.h │ │ ├── av.c │ │ ├── av.h │ │ ├── bacfile.c │ │ ├── bacfile.h │ │ ├── bi.c │ │ ├── bi.h │ │ ├── bo.c │ │ ├── bo.h │ │ ├── bv.c │ │ ├── bv.h │ │ ├── channel.c │ │ ├── channel.h │ │ ├── client │ │ │ └── device-client.c │ │ ├── command.c │ │ ├── command.h │ │ ├── credential_data_input.c │ │ ├── credential_data_input.h │ │ ├── csv.c │ │ ├── csv.h │ │ ├── device.c │ │ ├── device.h │ │ ├── iv.c │ │ ├── iv.h │ │ ├── lav.c │ │ ├── lav.h │ │ ├── lc.c │ │ ├── lc.h │ │ ├── lo.c │ │ ├── lo.h │ │ ├── lsp.c │ │ ├── lsp.h │ │ ├── ms-input.c │ │ ├── ms-input.h │ │ ├── mso.c │ │ ├── mso.h │ │ ├── msv.c │ │ ├── msv.h │ │ ├── nc.c │ │ ├── nc.h │ │ ├── netport.c │ │ ├── netport.h │ │ ├── osv.c │ │ ├── osv.h │ │ ├── piv.c │ │ ├── piv.h │ │ ├── schedule.c │ │ ├── schedule.h │ │ ├── trendlog.c │ │ └── trendlog.h │ ├── service │ │ ├── CMakeLists.txt │ │ ├── h_alarm_ack.c │ │ ├── h_alarm_ack.h │ │ ├── h_apdu.c │ │ ├── h_apdu.h │ │ ├── h_arf.c │ │ ├── h_arf.h │ │ ├── h_arf_a.c │ │ ├── h_arf_a.h │ │ ├── h_awf.c │ │ ├── h_awf.h │ │ ├── h_ccov.c │ │ ├── h_ccov.h │ │ ├── h_cov.c │ │ ├── h_cov.h │ │ ├── h_dcc.c │ │ ├── h_dcc.h │ │ ├── h_gas_a.c │ │ ├── h_gas_a.h │ │ ├── h_get_alarm_sum.c │ │ ├── h_get_alarm_sum.h │ │ ├── h_getevent.c │ │ ├── h_getevent.h │ │ ├── h_getevent_a.c │ │ ├── h_getevent_a.h │ │ ├── h_iam.c │ │ ├── h_iam.h │ │ ├── h_ihave.c │ │ ├── h_ihave.h │ │ ├── h_lso.c │ │ ├── h_lso.h │ │ ├── h_noserv.c │ │ ├── h_noserv.h │ │ ├── h_rd.c │ │ ├── h_rd.h │ │ ├── h_rp.c │ │ ├── h_rp.h │ │ ├── h_rp_a.c │ │ ├── h_rp_a.h │ │ ├── h_rpm.c │ │ ├── h_rpm.h │ │ ├── h_rpm_a.c │ │ ├── h_rpm_a.h │ │ ├── h_rr.c │ │ ├── h_rr.h │ │ ├── h_rr_a.c │ │ ├── h_rr_a.h │ │ ├── h_ts.c │ │ ├── h_ts.h │ │ ├── h_ucov.c │ │ ├── h_ucov.h │ │ ├── h_upt.c │ │ ├── h_upt.h │ │ ├── h_whohas.c │ │ ├── h_whohas.h │ │ ├── h_whois.c │ │ ├── h_whois.h │ │ ├── h_wp.c │ │ ├── h_wp.h │ │ ├── h_wpm.c │ │ ├── h_wpm.h │ │ ├── s_abort.c │ │ ├── s_abort.h │ │ ├── s_ack_alarm.c │ │ ├── s_ack_alarm.h │ │ ├── s_arfs.c │ │ ├── s_arfs.h │ │ ├── s_awfs.c │ │ ├── s_awfs.h │ │ ├── s_cevent.c │ │ ├── s_cevent.h │ │ ├── s_cov.c │ │ ├── s_cov.h │ │ ├── s_dcc.c │ │ ├── s_dcc.h │ │ ├── s_error.c │ │ ├── s_error.h │ │ ├── s_get_alarm_sum.c │ │ ├── s_get_alarm_sum.h │ │ ├── s_get_event.c │ │ ├── s_get_event.h │ │ ├── s_getevent.c │ │ ├── s_getevent.h │ │ ├── s_iam.c │ │ ├── s_iam.h │ │ ├── s_ihave.c │ │ ├── s_ihave.h │ │ ├── s_lso.c │ │ ├── s_lso.h │ │ ├── s_rd.c │ │ ├── s_rd.h │ │ ├── s_readrange.c │ │ ├── s_readrange.h │ │ ├── s_rp.c │ │ ├── s_rp.h │ │ ├── s_rpm.c │ │ ├── s_rpm.h │ │ ├── s_ts.c │ │ ├── s_ts.h │ │ ├── s_uevent.c │ │ ├── s_uevent.h │ │ ├── s_upt.c │ │ ├── s_upt.h │ │ ├── s_whohas.c │ │ ├── s_whohas.h │ │ ├── s_whois.c │ │ ├── s_whois.h │ │ ├── s_wp.c │ │ ├── s_wp.h │ │ ├── s_wpm.c │ │ └── s_wpm.h │ ├── services.h │ ├── sys │ │ ├── CMakeLists.txt │ │ ├── bigend.c │ │ ├── bigend.h │ │ ├── debug.c │ │ ├── debug.h │ │ ├── fifo.c │ │ ├── fifo.h │ │ ├── filename.c │ │ ├── filename.h │ │ ├── mstimer.c │ │ ├── mstimer.h │ │ ├── ringbuf.c │ │ ├── ringbuf.h │ │ ├── sbuf.c │ │ └── sbuf.h │ └── tsm │ │ ├── CMakeLists.txt │ │ ├── tsm.c │ │ └── tsm.h ├── bip.c ├── bits.h ├── bits │ ├── CMakeLists.txt │ ├── bitsRouter │ │ ├── CMakeLists.txt │ │ ├── bitsRouter.h │ │ ├── mainSetup.c │ │ ├── routingDevice.c │ │ ├── routingEngine.c │ │ └── routingUtil.c │ ├── ipc │ │ ├── CMakeLists.txt │ │ ├── ipcApplicationSide.h │ │ ├── ipcBACnetSide.h │ │ ├── readme.txt │ │ └── udp │ │ │ ├── CMakeLists.txt │ │ │ ├── demo │ │ │ ├── CMakeLists.txt │ │ │ └── ipcSocketDemo.c │ │ │ ├── ipcApplicationSide.c │ │ │ ├── ipcApplicationSide.h │ │ │ ├── ipcBACnetSide.c │ │ │ ├── ipcBACnetSide.h │ │ │ ├── ipcCommon.c │ │ │ ├── ipcCommon.cpp │ │ │ ├── ipcHandlers.c │ │ │ ├── ipcSocket.c │ │ │ ├── ipcSocket.h │ │ │ ├── ipcSocketClient.c │ │ │ ├── ipcSocketServer.c │ │ │ └── ipcUDPcommon.h │ ├── logging │ │ ├── linuxConio.c │ │ ├── logDispatch.c │ │ ├── logToFile.c │ │ └── logging.h │ └── util │ │ ├── BACnetObject.c │ │ ├── BACnetObject.h │ │ ├── BACnetObjectAnalog.c │ │ ├── BACnetObjectAnalog.h │ │ ├── BACnetObjectBinary.c │ │ ├── BACnetObjectBinary.h │ │ ├── BACnetObjectCalendar.h │ │ ├── BACnetObjectMultistate.c │ │ ├── BACnetObjectMultistate.h │ │ ├── BACnetObjectSchedule.h │ │ ├── BACnetToString.c │ │ ├── BACnetToString.h │ │ ├── CMakeLists.txt │ │ ├── appApi.c │ │ ├── appApi.h │ │ ├── bacnetProc.c │ │ ├── bacversion.h │ │ ├── bitsDatalink.c │ │ ├── bitsDatalink.h │ │ ├── bitsIpUtil.h │ │ ├── bitsUtil.h │ │ ├── configProjDefault.h │ │ ├── dm_Datalink.c │ │ ├── dm_PollRecord.c │ │ ├── dm_RouterPort.c │ │ ├── dm_ServerDevice.c │ │ ├── ipUtil.c │ │ ├── mdlinkBBMD.c │ │ ├── mdlinkBIP.c │ │ ├── mdlinkEthernet.c │ │ ├── mdlinkFD.c │ │ ├── mdlinkMSTP.c │ │ ├── menuDiags.c │ │ ├── menuDiags.h │ │ ├── multipleDatalink.c │ │ ├── multipleDatalink.h │ │ ├── objectModel.c │ │ ├── objectModel.h │ │ ├── threadSupport.c │ │ ├── tokenize.c │ │ └── tokenize.h ├── bytes.h ├── config.h ├── cov.c ├── cov.h ├── credential_authentication_factor.c ├── credential_authentication_factor.h ├── datalink │ ├── CMakeLists.txt │ ├── bacsec.c │ ├── bacsec.h │ ├── bip.h │ ├── bip6.h │ ├── bvlc.c │ ├── bvlc.h │ ├── bvlc6.c │ ├── bvlc6.h │ ├── cobs.c │ ├── cobs.h │ ├── crc.c │ ├── crc.h │ ├── datalink.c │ ├── datalink.h │ ├── dlenv.c │ ├── dlenv.h │ ├── dlmstp.h │ ├── ethernet.h │ ├── mstp.c │ ├── mstp.h │ ├── mstpdef.h │ ├── mstptext.c │ └── mstptext.h ├── datetime.c ├── datetime.h ├── dcc.c ├── dcc.h ├── event.c ├── event.h ├── get_alarm_sum.c ├── get_alarm_sum.h ├── getevent.c ├── getevent.h ├── iam.c ├── iam.h ├── ihave.c ├── ihave.h ├── indtext.c ├── indtext.h ├── lighting.c ├── lighting.h ├── lso.c ├── lso.h ├── memcopy.c ├── memcopy.h ├── npdu.c ├── npdu.h ├── property.c ├── property.h ├── proplist.c ├── proplist.h ├── ptransfer.c ├── ptransfer.h ├── rd.c ├── rd.h ├── readrange.c ├── readrange.h ├── reject.c ├── reject.h ├── rp.c ├── rp.h ├── rpm.c ├── rpm.h ├── timestamp.c ├── timestamp.h ├── timesync.c ├── timesync.h ├── version.h ├── whohas.c ├── whohas.h ├── whois.c ├── whois.h ├── wp.c ├── wp.h ├── wpm.c └── wpm.h └── eLib ├── CMakeLists.txt ├── board └── STMicro │ ├── nucleo-f103rb │ ├── board485.c │ ├── board485.h │ ├── boardLED.c │ └── boardLED.h │ ├── nucleo-f429zi │ ├── board485.c │ ├── board485.h │ ├── boardLED.c │ ├── boardLED.h │ ├── dlmstp.c │ └── scope.c │ └── stm32f4-discovery │ ├── dlmstp.c │ └── led.c ├── ccp ├── ccp.c ├── ccp.h └── ccp_config_example.h ├── ipc ├── CMakeLists.txt └── cJSON │ ├── CMakeLists.txt │ ├── cJSON.c │ ├── cJSON.h │ └── test.c ├── osLayer ├── CMSIS │ └── osTimer.c ├── CMakeLists.txt ├── STMicro │ ├── btaDatalink.c │ ├── btaDatalinkSerial.c │ ├── os485.c │ ├── os485.h │ ├── osLED.c │ ├── osLED.h │ ├── osLayer.c │ └── osLayer.h ├── linux │ ├── CMakeLists.txt │ ├── btaDatalinkUDP.c │ ├── net.h │ ├── osLayer.c │ ├── osLayer.h │ ├── osNet.h │ ├── parseCommandLine.c │ └── parseConfig.c └── win │ ├── btaDatalinkUDP.c │ ├── osLayer.c │ ├── osLayer.h │ ├── osNet.h │ ├── parseCommandLine.c │ └── parseConfig.c ├── readme.md └── util ├── CMakeLists.txt ├── FlashErr.c ├── bitsLED.c ├── btaDebug.c ├── btaDebug.h ├── btaInternal.h ├── commandLine.c ├── eLib.h ├── eLibDebug.c ├── eLibDebug.h ├── eLibUtil.h ├── emm.c ├── emm.h ├── ese.c ├── ese.h ├── ledCommon.h ├── linklist.c ├── linklist.h ├── llist.c ├── llist.h ├── logDispatch.c ├── logging.h ├── misc.c ├── scope.h └── timerCommon.h /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(src) 2 | add_subdirectory(ports) 3 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | Open source bacnet stack will go here 4 | 5 | -------------------------------------------------------------------------------- /apps/BBRS Feature Creep.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.29613.14 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "server", "server\Server.vcxproj", "{F4288B17-6F6B-460F-BC22-B3C9256C1747}" 7 | EndProject 8 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "whois", "whois\whois.vcxproj", "{A735244D-7570-4011-B9A2-89D129E082D6}" 9 | EndProject 10 | Global 11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 12 | Debug|x64 = Debug|x64 13 | Debug|x86 = Debug|x86 14 | Release|x64 = Release|x64 15 | Release|x86 = Release|x86 16 | EndGlobalSection 17 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 18 | {F4288B17-6F6B-460F-BC22-B3C9256C1747}.Debug|x64.ActiveCfg = Debug|x64 19 | {F4288B17-6F6B-460F-BC22-B3C9256C1747}.Debug|x64.Build.0 = Debug|x64 20 | {F4288B17-6F6B-460F-BC22-B3C9256C1747}.Debug|x86.ActiveCfg = Debug|Win32 21 | {F4288B17-6F6B-460F-BC22-B3C9256C1747}.Debug|x86.Build.0 = Debug|Win32 22 | {F4288B17-6F6B-460F-BC22-B3C9256C1747}.Release|x64.ActiveCfg = Release|x64 23 | {F4288B17-6F6B-460F-BC22-B3C9256C1747}.Release|x64.Build.0 = Release|x64 24 | {F4288B17-6F6B-460F-BC22-B3C9256C1747}.Release|x86.ActiveCfg = Release|Win32 25 | {F4288B17-6F6B-460F-BC22-B3C9256C1747}.Release|x86.Build.0 = Release|Win32 26 | {A735244D-7570-4011-B9A2-89D129E082D6}.Debug|x64.ActiveCfg = Debug|x64 27 | {A735244D-7570-4011-B9A2-89D129E082D6}.Debug|x64.Build.0 = Debug|x64 28 | {A735244D-7570-4011-B9A2-89D129E082D6}.Debug|x86.ActiveCfg = Debug|Win32 29 | {A735244D-7570-4011-B9A2-89D129E082D6}.Debug|x86.Build.0 = Debug|Win32 30 | {A735244D-7570-4011-B9A2-89D129E082D6}.Release|x64.ActiveCfg = Release|x64 31 | {A735244D-7570-4011-B9A2-89D129E082D6}.Release|x64.Build.0 = Release|x64 32 | {A735244D-7570-4011-B9A2-89D129E082D6}.Release|x86.ActiveCfg = Release|Win32 33 | {A735244D-7570-4011-B9A2-89D129E082D6}.Release|x86.Build.0 = Release|Win32 34 | EndGlobalSection 35 | GlobalSection(SolutionProperties) = preSolution 36 | HideSolutionNode = FALSE 37 | EndGlobalSection 38 | GlobalSection(ExtensibilityGlobals) = postSolution 39 | SolutionGuid = {109A33DE-7BD9-4B33-A125-3D5798614ED7} 40 | EndGlobalSection 41 | EndGlobal 42 | -------------------------------------------------------------------------------- /apps/BBRS Full Routing.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.29613.14 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "server", "server\Server.vcxproj", "{F4288B17-6F6B-460F-BC22-B3C9256C1747}" 7 | EndProject 8 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "whois", "whois\whois.vcxproj", "{A735244D-7570-4011-B9A2-89D129E082D6}" 9 | EndProject 10 | Global 11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 12 | Debug|x64 = Debug|x64 13 | Debug|x86 = Debug|x86 14 | Release|x64 = Release|x64 15 | Release|x86 = Release|x86 16 | EndGlobalSection 17 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 18 | {F4288B17-6F6B-460F-BC22-B3C9256C1747}.Debug|x64.ActiveCfg = Debug|x64 19 | {F4288B17-6F6B-460F-BC22-B3C9256C1747}.Debug|x64.Build.0 = Debug|x64 20 | {F4288B17-6F6B-460F-BC22-B3C9256C1747}.Debug|x86.ActiveCfg = Debug|Win32 21 | {F4288B17-6F6B-460F-BC22-B3C9256C1747}.Debug|x86.Build.0 = Debug|Win32 22 | {F4288B17-6F6B-460F-BC22-B3C9256C1747}.Release|x64.ActiveCfg = Release|x64 23 | {F4288B17-6F6B-460F-BC22-B3C9256C1747}.Release|x64.Build.0 = Release|x64 24 | {F4288B17-6F6B-460F-BC22-B3C9256C1747}.Release|x86.ActiveCfg = Release|Win32 25 | {F4288B17-6F6B-460F-BC22-B3C9256C1747}.Release|x86.Build.0 = Release|Win32 26 | {A735244D-7570-4011-B9A2-89D129E082D6}.Debug|x64.ActiveCfg = Debug|x64 27 | {A735244D-7570-4011-B9A2-89D129E082D6}.Debug|x64.Build.0 = Debug|x64 28 | {A735244D-7570-4011-B9A2-89D129E082D6}.Debug|x86.ActiveCfg = Debug|Win32 29 | {A735244D-7570-4011-B9A2-89D129E082D6}.Debug|x86.Build.0 = Debug|Win32 30 | {A735244D-7570-4011-B9A2-89D129E082D6}.Release|x64.ActiveCfg = Release|x64 31 | {A735244D-7570-4011-B9A2-89D129E082D6}.Release|x64.Build.0 = Release|x64 32 | {A735244D-7570-4011-B9A2-89D129E082D6}.Release|x86.ActiveCfg = Release|Win32 33 | {A735244D-7570-4011-B9A2-89D129E082D6}.Release|x86.Build.0 = Release|Win32 34 | EndGlobalSection 35 | GlobalSection(SolutionProperties) = preSolution 36 | HideSolutionNode = FALSE 37 | EndGlobalSection 38 | GlobalSection(ExtensibilityGlobals) = postSolution 39 | SolutionGuid = {109A33DE-7BD9-4B33-A125-3D5798614ED7} 40 | EndGlobalSection 41 | EndGlobal 42 | -------------------------------------------------------------------------------- /apps/Dobby FC.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.29613.14 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "server", "server\Server.vcxproj", "{F4288B17-6F6B-460F-BC22-B3C9256C1747}" 7 | EndProject 8 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "whois", "whois\whois.vcxproj", "{A735244D-7570-4011-B9A2-89D129E082D6}" 9 | EndProject 10 | Global 11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 12 | Debug|x64 = Debug|x64 13 | Debug|x86 = Debug|x86 14 | Release|x64 = Release|x64 15 | Release|x86 = Release|x86 16 | EndGlobalSection 17 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 18 | {F4288B17-6F6B-460F-BC22-B3C9256C1747}.Debug|x64.ActiveCfg = Debug|x64 19 | {F4288B17-6F6B-460F-BC22-B3C9256C1747}.Debug|x64.Build.0 = Debug|x64 20 | {F4288B17-6F6B-460F-BC22-B3C9256C1747}.Debug|x86.ActiveCfg = Debug|Win32 21 | {F4288B17-6F6B-460F-BC22-B3C9256C1747}.Debug|x86.Build.0 = Debug|Win32 22 | {F4288B17-6F6B-460F-BC22-B3C9256C1747}.Release|x64.ActiveCfg = Release|x64 23 | {F4288B17-6F6B-460F-BC22-B3C9256C1747}.Release|x64.Build.0 = Release|x64 24 | {F4288B17-6F6B-460F-BC22-B3C9256C1747}.Release|x86.ActiveCfg = Release|Win32 25 | {F4288B17-6F6B-460F-BC22-B3C9256C1747}.Release|x86.Build.0 = Release|Win32 26 | {A735244D-7570-4011-B9A2-89D129E082D6}.Debug|x64.ActiveCfg = Debug|x64 27 | {A735244D-7570-4011-B9A2-89D129E082D6}.Debug|x64.Build.0 = Debug|x64 28 | {A735244D-7570-4011-B9A2-89D129E082D6}.Debug|x86.ActiveCfg = Debug|Win32 29 | {A735244D-7570-4011-B9A2-89D129E082D6}.Debug|x86.Build.0 = Debug|Win32 30 | {A735244D-7570-4011-B9A2-89D129E082D6}.Release|x64.ActiveCfg = Release|x64 31 | {A735244D-7570-4011-B9A2-89D129E082D6}.Release|x64.Build.0 = Release|x64 32 | {A735244D-7570-4011-B9A2-89D129E082D6}.Release|x86.ActiveCfg = Release|Win32 33 | {A735244D-7570-4011-B9A2-89D129E082D6}.Release|x86.Build.0 = Release|Win32 34 | EndGlobalSection 35 | GlobalSection(SolutionProperties) = preSolution 36 | HideSolutionNode = FALSE 37 | EndGlobalSection 38 | GlobalSection(ExtensibilityGlobals) = postSolution 39 | SolutionGuid = {109A33DE-7BD9-4B33-A125-3D5798614ED7} 40 | EndGlobalSection 41 | EndGlobal 42 | -------------------------------------------------------------------------------- /apps/server/bacserv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BACnetTesting/BACnet-Stack/da241f4784a4690f0a3ece3a9c696af76fcdb274/apps/server/bacserv -------------------------------------------------------------------------------- /apps/whois/Makefile: -------------------------------------------------------------------------------- 1 | #Makefile to build BACnet Application for the Linux Port 2 | 3 | # tools - only if you need them. 4 | # Most platforms have this already defined 5 | # CC = gcc 6 | 7 | INCLUDES=-I$(realpath ../../src/eLib/osLayer/linux) -I$(realpath .) -I$(realpath ../../src) -I$(realpath ../../ports/linux) 8 | 9 | TARGET = bacwi 10 | # BACnet objects that are used with this app 11 | BACNET_OBJECT_DIR = $(BACNET_SRC_DIR)/bacnet/basic/object 12 | SRC = main.c \ 13 | $(BACNET_OBJECT_DIR)/client/device-client.c \ 14 | $(BACNET_OBJECT_DIR)/netport.c 15 | 16 | BACNET_BASIC_SRC += \ 17 | $(BACNET_SRC_DIR)/bacnet/basic/service/h_apdu.c \ 18 | $(BACNET_SRC_DIR)/bacnet/basic/service/h_iam.c \ 19 | $(BACNET_SRC_DIR)/bacnet/basic/service/h_noserv.c \ 20 | $(BACNET_SRC_DIR)/bacnet/basic/service/h_rp.c \ 21 | $(BACNET_SRC_DIR)/bacnet/basic/service/h_whois.c \ 22 | $(BACNET_SRC_DIR)/bacnet/basic/service/s_iam.c \ 23 | $(BACNET_SRC_DIR)/bacnet/basic/service/s_whois.c 24 | 25 | ELIB_DIR = $(BACNET_SRC_DIR)/eLib 26 | ELIB_SRC = $(ELIB_DIR)/util/eLibDebug.c \ 27 | $(ELIB_DIR)/osLayer/linux/btaDatalinkUDP.c 28 | 29 | # TARGET_EXT is defined in apps/Makefile as .exe or nothing 30 | TARGET_BIN = ${TARGET}$(TARGET_EXT) 31 | 32 | SRCS = $(SRC) $(BACNET_SRC) $(BACNET_BASIC_SRC) $(BACNET_PORT_SRC) $(ELIB_SRC) 33 | 34 | OBJS += ${SRCS:.c=.o} 35 | 36 | .PHONY: all 37 | all: Makefile ${TARGET_BIN} 38 | 39 | ${TARGET_BIN}: ${OBJS} 40 | echo ================================================ 41 | echo ${INCLUDES} 42 | echo ${CC} ${PFLAGS} ${OBJS} ${LFLAGS} -o $@ 43 | echo ================================================ 44 | ${CC} ${PFLAGS} ${OBJS} ${LFLAGS} -o $@ 45 | size $@ 46 | cp $@ ../../bin 47 | 48 | .c.o: 49 | echo ================================================ 50 | echo ${INCLUDES} 51 | echo $(BACNET_OBJECT_DIR) 52 | echo ${CC} -c ${CFLAGS} ${INCLUDES} $*.c -o $@ 53 | echo ================================================ 54 | ${CC} -c ${CFLAGS} ${INCLUDES} $*.c -o $@ 55 | 56 | .PHONY: depend 57 | depend: 58 | rm -f .depend 59 | ${CC} -MM ${CFLAGS} *.c >> .depend 60 | 61 | .PHONY: clean 62 | clean: 63 | rm -f core ${TARGET_BIN} ${OBJS} $(TARGET).map 64 | 65 | .PHONY: include 66 | include: .depend 67 | 68 | -------------------------------------------------------------------------------- /ports/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(linux) -------------------------------------------------------------------------------- /ports/linux/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB portlinuxsources *.c) 2 | 3 | add_library(portlinux ${portlinuxsources}) 4 | list(APPEND EXTRA_LIBS portlinux) 5 | 6 | # state that anybody linking to us needs to include the current source dir 7 | # includes, while we don't. 8 | target_include_directories(portlinux 9 | INTERFACE ${CMAKE_CURRENT_SOURCE_DIR} 10 | PRIVATE ${PROJECT_BINARY_DIR} 11 | PRIVATE ${CMAKE_BINARY_DIR} 12 | PRIVATE ${CMAKE_SOURCE_DIR} 13 | PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../../libs/bacnet/src/ 14 | PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../../libs/bacnet/src/eLib/osLayer/linux 15 | ) 16 | 17 | -------------------------------------------------------------------------------- /src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(eLib) 2 | add_subdirectory(bacnet) 3 | 4 | -------------------------------------------------------------------------------- /src/Makefile: -------------------------------------------------------------------------------- 1 | #Makefile to build BACnet Library with GCC 2 | 3 | # tools - only if you need them. 4 | # Most platforms have this already defined 5 | # CC = gcc 6 | # AR = ar 7 | # MAKE = make 8 | # SIZE = size 9 | # 10 | # Assumes rm and cp are available 11 | 12 | CFLAGS += -Dbacnet_stack_EXPORTS 13 | 14 | ifeq ($(STATIC),1) 15 | CFLAGS += -DBACNET_STACK_STATIC_DEFINE 16 | endif 17 | 18 | # These might be already defined in an previous Makefile 19 | BACNET_PORT ?= linux 20 | BACNET_SRC_DIR ?= $(realpath .) 21 | BACNET_PORT_DIR ?= $(realpath ../ports/$(BACNET_PORT)) 22 | BACNET_PORT_SRC ?= \ 23 | $(BACNET_PORT_DIR)/bip-init.c \ 24 | $(BACNET_SRC_DIR)/bacnet/datalink/bvlc.c \ 25 | $(BACNET_SRC_DIR)/bacnet/basic/bbmd/h_bbmd.c 26 | 27 | # include file search paths 28 | BACNET_INCLUDES = -I$(BACNET_SRC_DIR) -I$(BACNET_PORT_DIR) 29 | CFLAGS += $(BACNET_INCLUDES) 30 | 31 | BACNET_SRC ?= \ 32 | $(wildcard $(BACNET_SRC_DIR)/bacnet/*.c) \ 33 | $(wildcard $(BACNET_SRC_DIR)/bacnet/basic/*.c) \ 34 | $(wildcard $(BACNET_SRC_DIR)/bacnet/basic/binding/*.c) \ 35 | $(wildcard $(BACNET_SRC_DIR)/bacnet/basic/service/*.c) \ 36 | $(wildcard $(BACNET_SRC_DIR)/bacnet/basic/npdu/*.c) \ 37 | $(wildcard $(BACNET_SRC_DIR)/bacnet/basic/sys/*.c) \ 38 | $(wildcard $(BACNET_SRC_DIR)/bacnet/basic/tsm/*.c) 39 | 40 | ifneq (,$(findstring -DBAC_UCI,$(BACNET_DEFINES))) 41 | OBJS += $(patsubst %.c,%.o,$(wildcard basic/ucix/*.c)) 42 | endif 43 | 44 | all: $(OBJS) Makefile 45 | 46 | .c.o: 47 | ${CC} -c ${CFLAGS} $*.c -o $@ 48 | 49 | depend: 50 | rm -f .depend 51 | ${CC} -MM ${CFLAGS} $(BACNET_SRC) >> .depend 52 | 53 | clean: 54 | rm -rf core $(OBJS) $(LIBRARY) 55 | 56 | include: .depend 57 | -------------------------------------------------------------------------------- /src/bacnet/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB bacnetsources *.c) 2 | 3 | add_library(bacnet ${bacnetsources}) 4 | 5 | # state that anybody linking to us needs to include the current source dir 6 | # includes, while we don't. 7 | target_include_directories(bacnet 8 | INTERFACE ${CMAKE_CURRENT_SOURCE_DIR} 9 | PRIVATE ${PROJECT_BINARY_DIR} 10 | PRIVATE ${CMAKE_BINARY_DIR} 11 | PRIVATE ${CMAKE_SOURCE_DIR} 12 | PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../../libs/bacnet/src/ 13 | PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../../libs/bacnet/src/eLib/osLayer/linux 14 | ) 15 | 16 | add_subdirectory(basic) 17 | add_subdirectory(bits) 18 | add_subdirectory(datalink) -------------------------------------------------------------------------------- /src/bacnet/assigned_access_rights.h: -------------------------------------------------------------------------------- 1 | /************************************************************************** 2 | * 3 | * Copyright (C) 2015 Nikola Jelic 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining 6 | * a copy of this software and associated documentation files (the 7 | * "Software"), to deal in the Software without restriction, including 8 | * without limitation the rights to use, copy, modify, merge, publish, 9 | * distribute, sublicense, and/or sell copies of the Software, and to 10 | * permit persons to whom the Software is furnished to do so, subject to 11 | * the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included 14 | * in all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 20 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | * 24 | *********************************************************************/ 25 | 26 | #ifndef BACNET_ASSIGNED_ACCESS_RIGHTS_H 27 | #define BACNET_ASSIGNED_ACCESS_RIGHTS_H 28 | 29 | #include 30 | #include 31 | #include "bacnet/bacdef.h" 32 | #include "bacapp.h" 33 | #include "bacdevobjpropref.h" 34 | 35 | typedef struct { 36 | BACNET_DEVICE_OBJECT_REFERENCE assigned_access_rights; 37 | bool enable; 38 | } BACNET_ASSIGNED_ACCESS_RIGHTS; 39 | 40 | 41 | int bacapp_encode_assigned_access_rights( 42 | uint8_t * apdu, 43 | BACNET_ASSIGNED_ACCESS_RIGHTS * aar); 44 | int bacapp_encode_context_assigned_access_rights( 45 | uint8_t * apdu, 46 | uint8_t tag, 47 | BACNET_ASSIGNED_ACCESS_RIGHTS * aar); 48 | int bacapp_decode_assigned_access_rights( 49 | uint8_t * apdu, 50 | BACNET_ASSIGNED_ACCESS_RIGHTS * aar); 51 | int bacapp_decode_context_assigned_access_rights( 52 | uint8_t * apdu, 53 | uint8_t tag, 54 | BACNET_ASSIGNED_ACCESS_RIGHTS * aar); 55 | 56 | #endif 57 | -------------------------------------------------------------------------------- /src/bacnet/authentication_factor.h: -------------------------------------------------------------------------------- 1 | /************************************************************************** 2 | * 3 | * Copyright (C) 2015 Nikola Jelic 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining 6 | * a copy of this software and associated documentation files (the 7 | * "Software"), to deal in the Software without restriction, including 8 | * without limitation the rights to use, copy, modify, merge, publish, 9 | * distribute, sublicense, and/or sell copies of the Software, and to 10 | * permit persons to whom the Software is furnished to do so, subject to 11 | * the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included 14 | * in all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 20 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | * 24 | *********************************************************************/ 25 | 26 | #ifndef BACNET_AUTHENTICATION_FACTOR_H 27 | #define BACNET_AUTHENTICATION_FACTOR_H 28 | 29 | #include 30 | #include 31 | #include "bacnet/bacdef.h" 32 | #include "bacapp.h" 33 | 34 | typedef struct { 35 | BACNET_AUTHENTICATION_FACTOR_TYPE format_type; 36 | uint32_t format_class; 37 | BACNET_OCTET_STRING value; 38 | } BACNET_AUTHENTICATION_FACTOR; 39 | 40 | 41 | 42 | int bacapp_encode_authentication_factor( 43 | uint8_t * apdu, 44 | BACNET_AUTHENTICATION_FACTOR * af); 45 | int bacapp_encode_context_authentication_factor( 46 | uint8_t * apdu, 47 | uint8_t tag, 48 | BACNET_AUTHENTICATION_FACTOR * af); 49 | int bacapp_decode_authentication_factor( 50 | uint8_t * apdu, 51 | BACNET_AUTHENTICATION_FACTOR * af); 52 | int bacapp_decode_context_authentication_factor( 53 | uint8_t * apdu, 54 | uint8_t tag, 55 | BACNET_AUTHENTICATION_FACTOR * af); 56 | 57 | #endif 58 | 59 | -------------------------------------------------------------------------------- /src/bacnet/authentication_factor_format.h: -------------------------------------------------------------------------------- 1 | /************************************************************************** 2 | * 3 | * Copyright (C) 2015 Nikola Jelic 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining 6 | * a copy of this software and associated documentation files (the 7 | * "Software"), to deal in the Software without restriction, including 8 | * without limitation the rights to use, copy, modify, merge, publish, 9 | * distribute, sublicense, and/or sell copies of the Software, and to 10 | * permit persons to whom the Software is furnished to do so, subject to 11 | * the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included 14 | * in all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 20 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | * 24 | *********************************************************************/ 25 | 26 | #ifndef BACNET_AUTHENTICATION_FACTOR_FORMAT_H 27 | #define BACNET_AUTHENTICATION_FACTOR_FORMAT_H 28 | 29 | #include 30 | #include 31 | #include "bacnet/bacdef.h" 32 | 33 | typedef struct { 34 | BACNET_AUTHENTICATION_FACTOR_TYPE format_type; 35 | uint32_t vendor_id, vendor_format; 36 | } BACNET_AUTHENTICATION_FACTOR_FORMAT; 37 | 38 | 39 | int bacapp_encode_authentication_factor_format( 40 | uint8_t * apdu, 41 | BACNET_AUTHENTICATION_FACTOR_FORMAT * aff); 42 | int bacapp_encode_context_authentication_factor_format( 43 | uint8_t * apdu, 44 | uint8_t tag_number, 45 | BACNET_AUTHENTICATION_FACTOR_FORMAT * aff); 46 | int bacapp_decode_authentication_factor_format( 47 | uint8_t * apdu, 48 | BACNET_AUTHENTICATION_FACTOR_FORMAT * aff); 49 | int bacapp_decode_context_authentication_factor_format( 50 | uint8_t * apdu, 51 | uint8_t tag_number, 52 | BACNET_AUTHENTICATION_FACTOR_FORMAT * aff); 53 | 54 | #endif 55 | -------------------------------------------------------------------------------- /src/bacnet/bacnet_stack_exports.h: -------------------------------------------------------------------------------- 1 | /************************************************************************** 2 | * 3 | * Copyright (C) 2020 Steve Karg 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining 6 | * a copy of this software and associated documentation files (the 7 | * "Software"), to deal in the Software without restriction, including 8 | * without limitation the rights to use, copy, modify, merge, publish, 9 | * distribute, sublicense, and/or sell copies of the Software, and to 10 | * permit persons to whom the Software is furnished to do so, subject to 11 | * the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included 14 | * in all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 20 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | *********************************************************************/ 24 | 25 | #ifndef BACNET_STACK_EXPORTS_H 26 | #define BACNET_STACK_EXPORTS_H 27 | 28 | // For BITS, let us not play around with libraries, locking down the EXPORT MODE 29 | #ifndef BACNET_STACK_STATIC_DEFINE 30 | #define BACNET_STACK_STATIC_DEFINE 31 | #endif 32 | 33 | #ifdef BACNET_STACK_STATIC_DEFINE 34 | /* We want a static library */ 35 | # define BACNET_STACK_EXPORT 36 | #else 37 | /* We want a shared library */ 38 | # ifdef _MSC_VER 39 | # define BACNET_STACK_LIBRARY_IMPORT __declspec(dllimport) 40 | # define BACNET_STACK_LIBRARY_EXPORT __declspec(dllexport) 41 | # else 42 | # define BACNET_STACK_LIBRARY_IMPORT 43 | # define BACNET_STACK_LIBRARY_EXPORT __attribute__((visibility("default"))) 44 | # endif 45 | #endif 46 | 47 | 48 | #ifndef BACNET_STACK_EXPORT 49 | # ifdef bacnet_stack_EXPORTS 50 | /* We are building this library */ 51 | # define BACNET_STACK_EXPORT BACNET_STACK_LIBRARY_EXPORT 52 | # else 53 | /* We are using this library */ 54 | # define BACNET_STACK_EXPORT BACNET_STACK_LIBRARY_IMPORT 55 | # endif 56 | #endif 57 | 58 | #endif // BACNET_STACK_EXPORTS_H 59 | -------------------------------------------------------------------------------- /src/bacnet/basic/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(binding) 2 | add_subdirectory(npdu) 3 | add_subdirectory(object) 4 | 5 | add_subdirectory(service) 6 | add_subdirectory(sys) 7 | add_subdirectory(tsm) 8 | -------------------------------------------------------------------------------- /src/bacnet/basic/bbmd6/vmac.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * @author Steve Karg 4 | * @date 2016 5 | 6 | 7 | * 8 | ***************************************************************************************** 9 | * 10 | * Modifications Copyright (C) 2017 BACnet Interoperability Testing Services, Inc. 11 | * 12 | * July 1, 2017 BITS Modifications to this file have been made in compliance 13 | * with original licensing. 14 | * 15 | * This file contains changes made by BACnet Interoperability Testing 16 | * Services, Inc. These changes are subject to the permissions, 17 | * warranty terms and limitations above. 18 | * For more information: info@bac-test.com 19 | * For access to source code: info@bac-test.com 20 | * or www.github.com/bacnettesting/bacnet-stack 21 | * 22 | ****************************************************************************************/ 23 | 24 | #ifndef VMAC_H 25 | #define VMAC_H 26 | 27 | #include 28 | #include 29 | 30 | /* define the max MAC as big as IPv6 + port number */ 31 | #define VMAC_MAC_MAX 18 32 | /** 33 | * VMAC data structure 34 | * 35 | * @{ 36 | */ 37 | struct vmac_data { 38 | uint8_t mac[18]; 39 | uint8_t mac_len; 40 | }; 41 | /** @} */ 42 | 43 | unsigned int VMAC_Count(void); 44 | struct vmac_data *VMAC_Find_By_Key(uint32_t device_id); 45 | bool VMAC_Find_By_Data(struct vmac_data *vmac, uint32_t *device_id); 46 | bool VMAC_Add(uint32_t device_id, struct vmac_data *pVMAC); 47 | bool VMAC_Delete(uint32_t device_id); 48 | bool VMAC_Different( 49 | struct vmac_data *vmac1, 50 | struct vmac_data *vmac2); 51 | bool VMAC_Match( 52 | struct vmac_data *vmac1, 53 | struct vmac_data *vmac2); 54 | void VMAC_Cleanup(void); 55 | void VMAC_Init(void); 56 | 57 | #ifdef TEST 58 | #include "ctest.h" 59 | void testVMAC( 60 | Test * pTest); 61 | #endif 62 | 63 | #endif 64 | -------------------------------------------------------------------------------- /src/bacnet/basic/binding/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB basicbindingsources *.c) 2 | 3 | add_library(basicbinding ${basicbindingsources}) 4 | 5 | # state that anybody linking to us needs to include the current source dir 6 | # includes, while we don't. 7 | target_include_directories(basicbinding 8 | INTERFACE ${CMAKE_CURRENT_SOURCE_DIR} 9 | PRIVATE ${PROJECT_BINARY_DIR} 10 | PRIVATE ${CMAKE_BINARY_DIR} 11 | PRIVATE ${CMAKE_SOURCE_DIR} 12 | PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../../../../libs/bacnet/src/ 13 | PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../../../../libs/bacnet/src/eLib/osLayer/linux 14 | ) 15 | -------------------------------------------------------------------------------- /src/bacnet/basic/npdu/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB basicnpdusources *.c) 2 | 3 | add_library(basicnpdu ${basicnpdusources}) 4 | 5 | # state that anybody linking to us needs to include the current source dir 6 | # includes, while we don't. 7 | target_include_directories(basicnpdu 8 | INTERFACE ${CMAKE_CURRENT_SOURCE_DIR} 9 | PRIVATE ${PROJECT_BINARY_DIR} 10 | PRIVATE ${CMAKE_BINARY_DIR} 11 | PRIVATE ${CMAKE_SOURCE_DIR} 12 | PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../../../../libs/bacnet/src/ 13 | PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../../../../libs/bacnet/src/eLib/osLayer/linux 14 | ) 15 | -------------------------------------------------------------------------------- /src/bacnet/basic/npdu/h_routed_npdu.c: -------------------------------------------------------------------------------- 1 | #error - this file has been completely obsoleted by the bits\router module, which, among other things, supports multiple datalinks. 2 | -------------------------------------------------------------------------------- /src/bacnet/basic/object/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB basicobjectsources *.c) 2 | 3 | add_library(basicobject ${basicobjectsources}) 4 | 5 | # state that anybody linking to us needs to include the current source dir 6 | # includes, while we don't. 7 | target_include_directories(basicobject 8 | INTERFACE ${CMAKE_CURRENT_SOURCE_DIR} 9 | PRIVATE ${PROJECT_BINARY_DIR} 10 | PRIVATE ${CMAKE_BINARY_DIR} 11 | PRIVATE ${CMAKE_SOURCE_DIR} 12 | PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../../../../libs/bacnet/src/ 13 | PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../../../../libs/bacnet/src/eLib/osLayer/linux 14 | ) 15 | -------------------------------------------------------------------------------- /src/bacnet/basic/service/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB basicservicesources *.c) 2 | 3 | add_library(basicservice ${basicservicesources}) 4 | 5 | # state that anybody linking to us needs to include the current source dir 6 | # includes, while we don't. 7 | target_include_directories(basicservice 8 | INTERFACE ${CMAKE_CURRENT_SOURCE_DIR} 9 | PRIVATE ${PROJECT_BINARY_DIR} 10 | PRIVATE ${CMAKE_BINARY_DIR} 11 | PRIVATE ${CMAKE_SOURCE_DIR} 12 | PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../../../../libs/bacnet/src/ 13 | PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../../../../libs/bacnet/src/eLib/osLayer/linux 14 | ) 15 | -------------------------------------------------------------------------------- /src/bacnet/basic/service/h_alarm_ack.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * @author Steve Karg 4 | * @date 2019 5 | * @brief Header file a basic Alarm Acknowledgment Handler 6 | * 7 | * @section LICENSE 8 | * 9 | * Permission is hereby granted, free of charge, to any person obtaining 10 | * a copy of this software and associated documentation files (the 11 | * "Software"), to deal in the Software without restriction, including 12 | * without limitation the rights to use, copy, modify, merge, publish, 13 | * distribute, sublicense, and/or sell copies of the Software, and to 14 | * permit persons to whom the Software is furnished to do so, subject to 15 | * the following conditions: 16 | * 17 | * The above copyright notice and this permission notice shall be included 18 | * in all copies or substantial portions of the Software. 19 | * 20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 23 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 24 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 25 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 26 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | #ifndef HANDLER_ALARM_ACK_H 29 | #define HANDLER_ALARM_ACK_H 30 | 31 | #include 32 | #include 33 | #include "bacnet/bacnet_stack_exports.h" 34 | #include "bacnet/bacdef.h" 35 | #include "bacnet/bacenum.h" 36 | #include "bacnet/apdu.h" 37 | #include "bacnet/alarm_ack.h" 38 | 39 | #ifdef __cplusplus 40 | extern "C" { 41 | #endif /* __cplusplus */ 42 | 43 | BACNET_STACK_EXPORT 44 | void handler_alarm_ack( 45 | uint8_t * service_request, 46 | uint16_t service_len, 47 | BACNET_ADDRESS * src, 48 | BACNET_CONFIRMED_SERVICE_DATA * service_data); 49 | 50 | BACNET_STACK_EXPORT 51 | void handler_alarm_ack_set( 52 | BACNET_OBJECT_TYPE object_type, 53 | alarm_ack_function pFunction); 54 | 55 | #ifdef __cplusplus 56 | } 57 | #endif /* __cplusplus */ 58 | #endif 59 | -------------------------------------------------------------------------------- /src/bacnet/basic/service/h_arf.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * @author Steve Karg 4 | * @date October 2019 5 | * @brief Header file for a basic Atomic Read File request handler 6 | * 7 | * @section LICENSE 8 | * 9 | * Permission is hereby granted, free of charge, to any person obtaining 10 | * a copy of this software and associated documentation files (the 11 | * "Software"), to deal in the Software without restriction, including 12 | * without limitation the rights to use, copy, modify, merge, publish, 13 | * distribute, sublicense, and/or sell copies of the Software, and to 14 | * permit persons to whom the Software is furnished to do so, subject to 15 | * the following conditions: 16 | * 17 | * The above copyright notice and this permission notice shall be included 18 | * in all copies or substantial portions of the Software. 19 | * 20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 23 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 24 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 25 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 26 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | #ifndef HANDLER_ATOMIC_READ_FILE_H 29 | #define HANDLER_ATOMIC_READ_FILE_H 30 | 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include "bacnet/bacnet_stack_exports.h" 36 | #include "bacnet/bacdef.h" 37 | #include "bacnet/bacenum.h" 38 | #include "bacnet/apdu.h" 39 | 40 | #ifdef __cplusplus_disable 41 | extern "C" { 42 | #endif /* __cplusplus_disable */ 43 | 44 | BACNET_STACK_EXPORT 45 | void handler_atomic_read_file(uint8_t* service_request, uint16_t service_len, 46 | BACNET_GLOBAL_ADDRESS* src, 47 | BACNET_CONFIRMED_SERVICE_DATA* service_data); 48 | 49 | #ifdef __cplusplus_disable 50 | } 51 | #endif /* __cplusplus_disable */ 52 | #endif 53 | -------------------------------------------------------------------------------- /src/bacnet/basic/service/h_arf_a.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * @author Steve Karg 4 | * @date October 2019 5 | * @brief Header file for a basic Atomic Read File Ack handler 6 | * 7 | * @section LICENSE 8 | * 9 | * Permission is hereby granted, free of charge, to any person obtaining 10 | * a copy of this software and associated documentation files (the 11 | * "Software"), to deal in the Software without restriction, including 12 | * without limitation the rights to use, copy, modify, merge, publish, 13 | * distribute, sublicense, and/or sell copies of the Software, and to 14 | * permit persons to whom the Software is furnished to do so, subject to 15 | * the following conditions: 16 | * 17 | * The above copyright notice and this permission notice shall be included 18 | * in all copies or substantial portions of the Software. 19 | * 20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 23 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 24 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 25 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 26 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | #ifndef ATOMIC_READ_FILE_ACK_HANDLER_H 29 | #define ATOMIC_READ_FILE_ACK_HANDLER_H 30 | 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include "bacnet/bacnet_stack_exports.h" 36 | #include "bacnet/bacdef.h" 37 | #include "bacnet/bacenum.h" 38 | #include "bacnet/apdu.h" 39 | 40 | #ifdef __cplusplus 41 | extern "C" { 42 | #endif /* __cplusplus */ 43 | 44 | BACNET_STACK_EXPORT 45 | void handler_atomic_read_file_ack( 46 | uint8_t* service_request, uint16_t service_len, BACNET_ADDRESS* src, 47 | BACNET_CONFIRMED_SERVICE_ACK_DATA* service_data); 48 | 49 | #ifdef __cplusplus 50 | } 51 | #endif /* __cplusplus */ 52 | #endif 53 | -------------------------------------------------------------------------------- /src/bacnet/basic/service/h_awf.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * @author Steve Karg 4 | * @date October 2019 5 | * @brief Header file for Atomic Write File request handler 6 | * 7 | * @section LICENSE 8 | * 9 | * Permission is hereby granted, free of charge, to any person obtaining 10 | * a copy of this software and associated documentation files (the 11 | * "Software"), to deal in the Software without restriction, including 12 | * without limitation the rights to use, copy, modify, merge, publish, 13 | * distribute, sublicense, and/or sell copies of the Software, and to 14 | * permit persons to whom the Software is furnished to do so, subject to 15 | * the following conditions: 16 | * 17 | * The above copyright notice and this permission notice shall be included 18 | * in all copies or substantial portions of the Software. 19 | * 20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 23 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 24 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 25 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 26 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | #ifndef ATOMIC_WRITE_FILE_HANDLER_H 29 | #define ATOMIC_WRITE_FILE_HANDLER_H 30 | 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include "bacnet/bacnet_stack_exports.h" 36 | #include "bacnet/bacdef.h" 37 | #include "bacnet/bacenum.h" 38 | #include "bacnet/apdu.h" 39 | 40 | #ifdef __cplusplus_disable 41 | extern "C" { 42 | #endif /* __cplusplus_disable */ 43 | 44 | BACNET_STACK_EXPORT 45 | void handler_atomic_write_file(uint8_t* service_request, uint16_t service_len, 46 | BACNET_GLOBAL_ADDRESS* src, 47 | BACNET_CONFIRMED_SERVICE_DATA* service_data); 48 | 49 | #ifdef __cplusplus_disable 50 | } 51 | #endif /* __cplusplus_disable */ 52 | #endif 53 | -------------------------------------------------------------------------------- /src/bacnet/basic/service/h_ccov.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * @author Steve Karg 4 | * @date October 2019 5 | * @brief Header file for a basic ConfirmedCOV notification handler 6 | * 7 | * @section LICENSE 8 | * 9 | * Permission is hereby granted, free of charge, to any person obtaining 10 | * a copy of this software and associated documentation files (the 11 | * "Software"), to deal in the Software without restriction, including 12 | * without limitation the rights to use, copy, modify, merge, publish, 13 | * distribute, sublicense, and/or sell copies of the Software, and to 14 | * permit persons to whom the Software is furnished to do so, subject to 15 | * the following conditions: 16 | * 17 | * The above copyright notice and this permission notice shall be included 18 | * in all copies or substantial portions of the Software. 19 | * 20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 23 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 24 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 25 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 26 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | #ifndef HANDLER_CCOV_NOTIFICATION_H 29 | #define HANDLER_CCOV_NOTIFICATION_H 30 | 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include "bacnet/bacnet_stack_exports.h" 36 | #include "bacnet/bacdef.h" 37 | #include "bacnet/bacenum.h" 38 | #include "bacnet/apdu.h" 39 | 40 | #ifdef __cplusplus_disable 41 | extern "C" { 42 | #endif /* __cplusplus_disable */ 43 | 44 | BACNET_STACK_EXPORT 45 | void handler_ccov_notification( 46 | uint8_t * service_request, 47 | uint16_t service_len, 48 | BACNET_ADDRESS * src, 49 | BACNET_CONFIRMED_SERVICE_DATA * service_data); 50 | 51 | #ifdef __cplusplus_disable 52 | } 53 | #endif /* __cplusplus_disable */ 54 | #endif 55 | -------------------------------------------------------------------------------- /src/bacnet/basic/service/h_dcc.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * @author Steve Karg 4 | * @date October 2019 5 | * @brief Header file for a basic DeviceCommunicationControl request handler 6 | * 7 | * @section LICENSE 8 | * 9 | * Permission is hereby granted, free of charge, to any person obtaining 10 | * a copy of this software and associated documentation files (the 11 | * "Software"), to deal in the Software without restriction, including 12 | * without limitation the rights to use, copy, modify, merge, publish, 13 | * distribute, sublicense, and/or sell copies of the Software, and to 14 | * permit persons to whom the Software is furnished to do so, subject to 15 | * the following conditions: 16 | * 17 | * The above copyright notice and this permission notice shall be included 18 | * in all copies or substantial portions of the Software. 19 | * 20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 23 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 24 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 25 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 26 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | #ifndef HANDLER_DEVICE_COMMUNICATION_CONTROL_H 29 | #define HANDLER_DEVICE_COMMUNICATION_CONTROL_H 30 | 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include "bacnet/bacnet_stack_exports.h" 36 | #include "bacnet/bacdef.h" 37 | #include "bacnet/bacenum.h" 38 | #include "bacnet/apdu.h" 39 | 40 | #ifdef __cplusplus_disable 41 | extern "C" { 42 | #endif /* __cplusplus_disable */ 43 | 44 | BACNET_STACK_EXPORT 45 | void handler_device_communication_control( 46 | DEVICE_OBJECT_DATA *pDev, 47 | uint8_t * service_request, 48 | uint16_t service_len, 49 | BACNET_ROUTE * src, 50 | BACNET_CONFIRMED_SERVICE_DATA * service_data); 51 | 52 | BACNET_STACK_EXPORT 53 | void handler_dcc_password_set( 54 | char *new_password); 55 | BACNET_STACK_EXPORT 56 | char *handler_dcc_password(void); 57 | 58 | #ifdef __cplusplus_disable 59 | } 60 | #endif /* __cplusplus_disable */ 61 | #endif 62 | -------------------------------------------------------------------------------- /src/bacnet/basic/service/h_gas_a.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * @author Steve Karg 4 | * @date October 2019 5 | * @brief Header file for a basic GetAlarmSummary-Ack service handler 6 | * 7 | * @section LICENSE 8 | * 9 | * Permission is hereby granted, free of charge, to any person obtaining 10 | * a copy of this software and associated documentation files (the 11 | * "Software"), to deal in the Software without restriction, including 12 | * without limitation the rights to use, copy, modify, merge, publish, 13 | * distribute, sublicense, and/or sell copies of the Software, and to 14 | * permit persons to whom the Software is furnished to do so, subject to 15 | * the following conditions: 16 | * 17 | * The above copyright notice and this permission notice shall be included 18 | * in all copies or substantial portions of the Software. 19 | * 20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 23 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 24 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 25 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 26 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | #ifndef GET_ALARM_SUMMARY_ACK_HANDLER_H 29 | #define GET_ALARM_SUMMARY_ACK_HANDLER_H 30 | 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include "bacnet/bacnet_stack_exports.h" 36 | #include "bacnet/bacdef.h" 37 | #include "bacnet/bacenum.h" 38 | #include "bacnet/apdu.h" 39 | 40 | #ifdef __cplusplus 41 | extern "C" { 42 | #endif /* __cplusplus */ 43 | 44 | BACNET_STACK_EXPORT 45 | void get_alarm_summary_ack_handler( 46 | uint8_t * service_request, 47 | uint16_t service_len, 48 | BACNET_ADDRESS * src, 49 | BACNET_CONFIRMED_SERVICE_ACK_DATA * service_data); 50 | 51 | #ifdef __cplusplus 52 | } 53 | #endif /* __cplusplus */ 54 | #endif 55 | -------------------------------------------------------------------------------- /src/bacnet/basic/service/h_get_alarm_sum.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * @author Steve Karg 4 | * @date October 2019 5 | * @brief Header file for a basic GetAlarmSummary service handler 6 | * 7 | * @section LICENSE 8 | * 9 | * Permission is hereby granted, free of charge, to any person obtaining 10 | * a copy of this software and associated documentation files (the 11 | * "Software"), to deal in the Software without restriction, including 12 | * without limitation the rights to use, copy, modify, merge, publish, 13 | * distribute, sublicense, and/or sell copies of the Software, and to 14 | * permit persons to whom the Software is furnished to do so, subject to 15 | * the following conditions: 16 | * 17 | * The above copyright notice and this permission notice shall be included 18 | * in all copies or substantial portions of the Software. 19 | * 20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 23 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 24 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 25 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 26 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | #ifndef HANDLER_GET_ALARM_SUMMARY_H 29 | #define HANDLER_GET_ALARM_SUMMARY_H 30 | 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include "bacnet/bacnet_stack_exports.h" 36 | #include "bacnet/bacdef.h" 37 | #include "bacnet/bacenum.h" 38 | #include "bacnet/apdu.h" 39 | #include "bacnet/get_alarm_sum.h" 40 | 41 | #ifdef __cplusplus 42 | extern "C" { 43 | #endif /* __cplusplus */ 44 | 45 | BACNET_STACK_EXPORT 46 | void handler_get_alarm_summary_set( 47 | BACNET_OBJECT_TYPE object_type, 48 | get_alarm_summary_function pFunction); 49 | 50 | BACNET_STACK_EXPORT 51 | void handler_get_alarm_summary( 52 | uint8_t * service_request, 53 | uint16_t service_len, 54 | BACNET_ADDRESS * src, 55 | BACNET_CONFIRMED_SERVICE_DATA * service_data); 56 | 57 | #ifdef __cplusplus 58 | } 59 | #endif /* __cplusplus */ 60 | #endif 61 | -------------------------------------------------------------------------------- /src/bacnet/basic/service/h_getevent.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * @author Steve Karg 4 | * @date October 2019 5 | * @brief Header file for a basic GetEventInformation service handler 6 | * 7 | * @section LICENSE 8 | * 9 | * Permission is hereby granted, free of charge, to any person obtaining 10 | * a copy of this software and associated documentation files (the 11 | * "Software"), to deal in the Software without restriction, including 12 | * without limitation the rights to use, copy, modify, merge, publish, 13 | * distribute, sublicense, and/or sell copies of the Software, and to 14 | * permit persons to whom the Software is furnished to do so, subject to 15 | * the following conditions: 16 | * 17 | * The above copyright notice and this permission notice shall be included 18 | * in all copies or substantial portions of the Software. 19 | * 20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 23 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 24 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 25 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 26 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | #ifndef HANDLER_GET_EVENT_INFORMATION_H 29 | #define HANDLER_GET_EVENT_INFORMATION_H 30 | 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include "bacnet/bacnet_stack_exports.h" 36 | #include "bacnet/bacdef.h" 37 | #include "bacnet/bacenum.h" 38 | #include "bacnet/apdu.h" 39 | #include "bacnet/event.h" 40 | #include "bacnet/getevent.h" 41 | 42 | #ifdef __cplusplus_disable 43 | extern "C" { 44 | #endif /* __cplusplus_disable */ 45 | 46 | BACNET_STACK_EXPORT 47 | void handler_get_event_information_set( 48 | BACNET_OBJECT_TYPE object_type, 49 | get_event_info_function pFunction); 50 | 51 | BACNET_STACK_EXPORT 52 | void handler_get_event_information( 53 | uint8_t * service_request, 54 | uint16_t service_len, 55 | BACNET_GLOBAL_ADDRESS * src, 56 | BACNET_CONFIRMED_SERVICE_DATA * service_data); 57 | 58 | BACNET_STACK_EXPORT 59 | void ge_ack_print_data(BACNET_GET_EVENT_INFORMATION_DATA* data, 60 | uint32_t device_id); 61 | 62 | #ifdef __cplusplus_disable 63 | } 64 | #endif /* __cplusplus_disable */ 65 | #endif 66 | -------------------------------------------------------------------------------- /src/bacnet/basic/service/h_getevent_a.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * @author Steve Karg 4 | * @date October 2019 5 | * @brief Header file for a basic GetEventNotification-Ack service handler 6 | * 7 | * @section LICENSE 8 | * 9 | * Permission is hereby granted, free of charge, to any person obtaining 10 | * a copy of this software and associated documentation files (the 11 | * "Software"), to deal in the Software without restriction, including 12 | * without limitation the rights to use, copy, modify, merge, publish, 13 | * distribute, sublicense, and/or sell copies of the Software, and to 14 | * permit persons to whom the Software is furnished to do so, subject to 15 | * the following conditions: 16 | * 17 | * The above copyright notice and this permission notice shall be included 18 | * in all copies or substantial portions of the Software. 19 | * 20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 23 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 24 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 25 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 26 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | #ifndef GET_EVENT_ACK_HANDLER_H 29 | #define GET_EVENT_ACK_HANDLER_H 30 | 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include "bacnet/bacnet_stack_exports.h" 36 | #include "bacnet/bacdef.h" 37 | #include "bacnet/bacenum.h" 38 | #include "bacnet/apdu.h" 39 | 40 | #ifdef __cplusplus_disable 41 | extern "C" { 42 | #endif /* __cplusplus_disable */ 43 | 44 | BACNET_STACK_EXPORT 45 | void get_event_ack_handler( 46 | uint8_t *service_request, 47 | uint16_t service_len, 48 | BACNET_GLOBAL_ADDRESS *src, 49 | BACNET_CONFIRMED_SERVICE_ACK_DATA *service_data); 50 | 51 | #ifdef __cplusplus_disable 52 | } 53 | #endif /* __cplusplus_disable */ 54 | #endif 55 | -------------------------------------------------------------------------------- /src/bacnet/basic/service/h_iam.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * @author Steve Karg 4 | * @date October 2019 5 | * @brief Header file for a basic I-Am service handler 6 | * 7 | * @section LICENSE 8 | * 9 | * Permission is hereby granted, free of charge, to any person obtaining 10 | * a copy of this software and associated documentation files (the 11 | * "Software"), to deal in the Software without restriction, including 12 | * without limitation the rights to use, copy, modify, merge, publish, 13 | * distribute, sublicense, and/or sell copies of the Software, and to 14 | * permit persons to whom the Software is furnished to do so, subject to 15 | * the following conditions: 16 | * 17 | * The above copyright notice and this permission notice shall be included 18 | * in all copies or substantial portions of the Software. 19 | * 20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 23 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 24 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 25 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 26 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | #ifndef HANDLER_I_AM_H 29 | #define HANDLER_I_AM_H 30 | 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include "bacnet/bacnet_stack_exports.h" 36 | #include "bacnet/bacdef.h" 37 | #include "bacnet/bacenum.h" 38 | #include "bacnet/apdu.h" 39 | 40 | #ifdef __cplusplus_disable 41 | extern "C" { 42 | #endif /* __cplusplus_disable */ 43 | 44 | BACNET_STACK_EXPORT 45 | void handler_i_am_add( 46 | const uint8_t * service_request, 47 | uint16_t service_len, 48 | BACNET_GLOBAL_ADDRESS * src); 49 | 50 | BACNET_STACK_EXPORT 51 | void handler_i_am_bind( 52 | uint8_t * service_request, 53 | uint16_t service_len, 54 | BACNET_GLOBAL_ADDRESS * src); 55 | 56 | #ifdef __cplusplus_disable 57 | } 58 | #endif /* __cplusplus_disable */ 59 | #endif 60 | -------------------------------------------------------------------------------- /src/bacnet/basic/service/h_ihave.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * @author Steve Karg 4 | * @date October 2019 5 | * @brief Header file for a basic I-Have service handler 6 | * 7 | * @section LICENSE 8 | * 9 | * Permission is hereby granted, free of charge, to any person obtaining 10 | * a copy of this software and associated documentation files (the 11 | * "Software"), to deal in the Software without restriction, including 12 | * without limitation the rights to use, copy, modify, merge, publish, 13 | * distribute, sublicense, and/or sell copies of the Software, and to 14 | * permit persons to whom the Software is furnished to do so, subject to 15 | * the following conditions: 16 | * 17 | * The above copyright notice and this permission notice shall be included 18 | * in all copies or substantial portions of the Software. 19 | * 20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 23 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 24 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 25 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 26 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | #ifndef HANDLER_I_HAVE_H 29 | #define HANDLER_I_HAVE_H 30 | 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include "bacnet/bacnet_stack_exports.h" 36 | #include "bacnet/bacdef.h" 37 | #include "bacnet/bacenum.h" 38 | #include "bacnet/apdu.h" 39 | 40 | #ifdef __cplusplus_disable 41 | extern "C" { 42 | #endif /* __cplusplus_disable */ 43 | 44 | BACNET_STACK_EXPORT 45 | void handler_i_have( 46 | uint8_t * service_request, 47 | uint16_t service_len, 48 | BACNET_GLOBAL_ADDRESS * src); 49 | 50 | #ifdef __cplusplus_disable 51 | } 52 | #endif /* __cplusplus_disable */ 53 | #endif 54 | -------------------------------------------------------------------------------- /src/bacnet/basic/service/h_lso.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * @author Steve Karg 4 | * @date October 2019 5 | * @brief Header file for a basic LifeSafetyOperation service handler 6 | * 7 | * @section LICENSE 8 | * 9 | * Permission is hereby granted, free of charge, to any person obtaining 10 | * a copy of this software and associated documentation files (the 11 | * "Software"), to deal in the Software without restriction, including 12 | * without limitation the rights to use, copy, modify, merge, publish, 13 | * distribute, sublicense, and/or sell copies of the Software, and to 14 | * permit persons to whom the Software is furnished to do so, subject to 15 | * the following conditions: 16 | * 17 | * The above copyright notice and this permission notice shall be included 18 | * in all copies or substantial portions of the Software. 19 | * 20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 23 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 24 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 25 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 26 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | #ifndef HANDLER_LIFE_SAFETY_OPERATION_H 29 | #define HANDLER_LIFE_SAFETY_OPERATION_H 30 | 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include "bacnet/bacnet_stack_exports.h" 36 | #include "bacnet/bacdef.h" 37 | #include "bacnet/bacenum.h" 38 | #include "bacnet/apdu.h" 39 | 40 | #ifdef __cplusplus_disable 41 | extern "C" { 42 | #endif /* __cplusplus_disable */ 43 | 44 | BACNET_STACK_EXPORT 45 | void handler_lso( 46 | uint8_t * service_request, 47 | uint16_t service_len, 48 | BACNET_GLOBAL_ADDRESS * src, 49 | BACNET_CONFIRMED_SERVICE_DATA * service_data); 50 | 51 | #ifdef __cplusplus_disable 52 | } 53 | #endif /* __cplusplus_disable */ 54 | #endif 55 | -------------------------------------------------------------------------------- /src/bacnet/basic/service/h_noserv.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * @author Steve Karg 4 | * @date October 2019 5 | * @brief Header file for a basic unrecognized service handler 6 | * 7 | * @section LICENSE 8 | * 9 | * Permission is hereby granted, free of charge, to any person obtaining 10 | * a copy of this software and associated documentation files (the 11 | * "Software"), to deal in the Software without restriction, including 12 | * without limitation the rights to use, copy, modify, merge, publish, 13 | * distribute, sublicense, and/or sell copies of the Software, and to 14 | * permit persons to whom the Software is furnished to do so, subject to 15 | * the following conditions: 16 | * 17 | * The above copyright notice and this permission notice shall be included 18 | * in all copies or substantial portions of the Software. 19 | * 20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 23 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 24 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 25 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 26 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | #ifndef UNRECOGNIZED_SERVICE_HANDLER_H 29 | #define UNRECOGNIZED_SERVICE_HANDLER_H 30 | 31 | #include "bacnet/apdu.h" 32 | 33 | #ifdef __cplusplus_disable 34 | extern "C" { 35 | #endif /* __cplusplus_disable */ 36 | 37 | BACNET_STACK_EXPORT 38 | void handler_unrecognized_service( 39 | DEVICE_OBJECT_DATA *pDev, 40 | uint8_t * service_request, 41 | uint16_t service_len, 42 | BACNET_ROUTE * dest, 43 | BACNET_CONFIRMED_SERVICE_DATA * service_data); 44 | 45 | #ifdef __cplusplus_disable 46 | } 47 | #endif /* __cplusplus_disable */ 48 | #endif 49 | -------------------------------------------------------------------------------- /src/bacnet/basic/service/h_rd.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * @author Steve Karg 4 | * @date October 2019 5 | * @brief Header file for a basic ReinitializeDevice service handler 6 | * 7 | * @section LICENSE 8 | * 9 | * Permission is hereby granted, free of charge, to any person obtaining 10 | * a copy of this software and associated documentation files (the 11 | * "Software"), to deal in the Software without restriction, including 12 | * without limitation the rights to use, copy, modify, merge, publish, 13 | * distribute, sublicense, and/or sell copies of the Software, and to 14 | * permit persons to whom the Software is furnished to do so, subject to 15 | * the following conditions: 16 | * 17 | * The above copyright notice and this permission notice shall be included 18 | * in all copies or substantial portions of the Software. 19 | * 20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 23 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 24 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 25 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 26 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | #ifndef HANDLER_REINITIALIZE_DEVICE_H 29 | #define HANDLER_REINITIALIZE_DEVICE_H 30 | 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include "bacnet/bacnet_stack_exports.h" 36 | #include "bacnet/bacdef.h" 37 | #include "bacnet/bacenum.h" 38 | #include "bacnet/apdu.h" 39 | 40 | 41 | BACNET_STACK_EXPORT 42 | void handler_reinitialize_device( 43 | DEVICE_OBJECT_DATA *pDev, 44 | uint8_t * service_request, 45 | uint16_t service_len, 46 | BACNET_ROUTE * src, 47 | BACNET_CONFIRMED_SERVICE_DATA * service_data); 48 | 49 | #endif 50 | -------------------------------------------------------------------------------- /src/bacnet/basic/service/h_rp.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * @author Steve Karg 4 | * @date October 2019 5 | * @brief Header file for a basic ReadProperty service handler 6 | * 7 | * @section LICENSE 8 | * 9 | * Permission is hereby granted, free of charge, to any person obtaining 10 | * a copy of this software and associated documentation files (the 11 | * "Software"), to deal in the Software without restriction, including 12 | * without limitation the rights to use, copy, modify, merge, publish, 13 | * distribute, sublicense, and/or sell copies of the Software, and to 14 | * permit persons to whom the Software is furnished to do so, subject to 15 | * the following conditions: 16 | * 17 | * The above copyright notice and this permission notice shall be included 18 | * in all copies or substantial portions of the Software. 19 | * 20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 23 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 24 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 25 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 26 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | #ifndef HANDLER_READ_PROPERTY_H 29 | #define HANDLER_READ_PROPERTY_H 30 | 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include "bacnet/bacnet_stack_exports.h" 36 | #include "bacnet/bacdef.h" 37 | #include "bacnet/bacenum.h" 38 | #include "bacnet/apdu.h" 39 | 40 | #ifdef __cplusplus_disable 41 | extern "C" { 42 | #endif /* __cplusplus_disable */ 43 | 44 | BACNET_STACK_EXPORT 45 | void handler_read_property( 46 | DEVICE_OBJECT_DATA *pDev, 47 | uint8_t * service_request, 48 | uint16_t service_len, 49 | BACNET_ROUTE * src, 50 | BACNET_CONFIRMED_SERVICE_DATA * service_data); 51 | 52 | #ifdef __cplusplus_disable 53 | } 54 | #endif /* __cplusplus_disable */ 55 | #endif 56 | -------------------------------------------------------------------------------- /src/bacnet/basic/service/h_rp_a.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * @author Steve Karg 4 | * @date October 2019 5 | * @brief Header file for a basic ReadProperty-Ack service handler 6 | * 7 | * @section LICENSE 8 | * 9 | * Permission is hereby granted, free of charge, to any person obtaining 10 | * a copy of this software and associated documentation files (the 11 | * "Software"), to deal in the Software without restriction, including 12 | * without limitation the rights to use, copy, modify, merge, publish, 13 | * distribute, sublicense, and/or sell copies of the Software, and to 14 | * permit persons to whom the Software is furnished to do so, subject to 15 | * the following conditions: 16 | * 17 | * The above copyright notice and this permission notice shall be included 18 | * in all copies or substantial portions of the Software. 19 | * 20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 23 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 24 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 25 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 26 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | #ifndef HANDLER_READ_PROPERTY_ACK_H 29 | #define HANDLER_READ_PROPERTY_ACK_H 30 | 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include "bacnet/bacnet_stack_exports.h" 36 | #include "bacnet/bacdef.h" 37 | #include "bacnet/bacenum.h" 38 | #include "bacnet/apdu.h" 39 | #include "bacnet/rp.h" 40 | 41 | #ifdef __cplusplus 42 | extern "C" { 43 | #endif /* __cplusplus */ 44 | 45 | BACNET_STACK_EXPORT 46 | void handler_read_property_ack( 47 | uint8_t * service_request, 48 | uint16_t service_len, 49 | BACNET_ROUTE * src, 50 | BACNET_CONFIRMED_SERVICE_ACK_DATA * service_data); 51 | BACNET_STACK_EXPORT 52 | void rp_ack_print_data( 53 | BACNET_READ_PROPERTY_DATA * data); 54 | 55 | #ifdef __cplusplus 56 | } 57 | #endif /* __cplusplus */ 58 | #endif 59 | -------------------------------------------------------------------------------- /src/bacnet/basic/service/h_rpm.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * @author Steve Karg 4 | * @date October 2019 5 | * @brief Header file for a basic ReadPropertyMultiple service handler 6 | * 7 | * @section LICENSE 8 | * 9 | * Permission is hereby granted, free of charge, to any person obtaining 10 | * a copy of this software and associated documentation files (the 11 | * "Software"), to deal in the Software without restriction, including 12 | * without limitation the rights to use, copy, modify, merge, publish, 13 | * distribute, sublicense, and/or sell copies of the Software, and to 14 | * permit persons to whom the Software is furnished to do so, subject to 15 | * the following conditions: 16 | * 17 | * The above copyright notice and this permission notice shall be included 18 | * in all copies or substantial portions of the Software. 19 | * 20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 23 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 24 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 25 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 26 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | #ifndef HANDLER_READ_PROPERTY_MULTIPLE_H 29 | #define HANDLER_READ_PROPERTY_MULTIPLE_H 30 | 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include "bacnet/bacnet_stack_exports.h" 36 | #include "bacnet/bacdef.h" 37 | #include "bacnet/bacenum.h" 38 | #include "bacnet/apdu.h" 39 | 40 | #ifdef __cplusplus_disable 41 | extern "C" { 42 | #endif /* __cplusplus_disable */ 43 | 44 | BACNET_STACK_EXPORT 45 | void handler_read_property_multiple( 46 | DEVICE_OBJECT_DATA *pDev, 47 | uint8_t * service_request, 48 | uint16_t service_len, 49 | BACNET_ROUTE * src, 50 | BACNET_CONFIRMED_SERVICE_DATA * service_data); 51 | 52 | #ifdef __cplusplus_disable 53 | } 54 | #endif /* __cplusplus_disable */ 55 | #endif 56 | -------------------------------------------------------------------------------- /src/bacnet/basic/service/h_rpm_a.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * @author Steve Karg 4 | * @date October 2019 5 | * @brief Header file for a basic ReadPropertyMultiple-Ack service handler 6 | * 7 | * @section LICENSE 8 | * 9 | * Permission is hereby granted, free of charge, to any person obtaining 10 | * a copy of this software and associated documentation files (the 11 | * "Software"), to deal in the Software without restriction, including 12 | * without limitation the rights to use, copy, modify, merge, publish, 13 | * distribute, sublicense, and/or sell copies of the Software, and to 14 | * permit persons to whom the Software is furnished to do so, subject to 15 | * the following conditions: 16 | * 17 | * The above copyright notice and this permission notice shall be included 18 | * in all copies or substantial portions of the Software. 19 | * 20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 23 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 24 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 25 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 26 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | #ifndef HANDLER_READ_PROPERTY_MULTIPLE_ACK_H 29 | #define HANDLER_READ_PROPERTY_MULTIPLE_ACK_H 30 | 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include "bacnet/bacnet_stack_exports.h" 36 | #include "bacnet/bacdef.h" 37 | #include "bacnet/bacenum.h" 38 | #include "bacnet/apdu.h" 39 | #include "bacnet/rpm.h" 40 | 41 | #ifdef __cplusplus 42 | extern "C" { 43 | #endif /* __cplusplus */ 44 | 45 | BACNET_STACK_EXPORT 46 | void handler_read_property_multiple_ack( 47 | uint8_t * service_request, 48 | uint16_t service_len, 49 | BACNET_ADDRESS * src, 50 | BACNET_CONFIRMED_SERVICE_ACK_DATA * service_data); 51 | BACNET_STACK_EXPORT 52 | int rpm_ack_decode_service_request( 53 | uint8_t * apdu, 54 | int apdu_len, 55 | BACNET_READ_ACCESS_DATA * read_access_data); 56 | BACNET_STACK_EXPORT 57 | void rpm_ack_print_data( 58 | BACNET_READ_ACCESS_DATA * rpm_data); 59 | 60 | #ifdef __cplusplus 61 | } 62 | #endif /* __cplusplus */ 63 | #endif 64 | -------------------------------------------------------------------------------- /src/bacnet/basic/service/h_rr.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * @author Steve Karg 4 | * @date October 2019 5 | * @brief Header file for a basic ReadRange service handler 6 | * 7 | * @section LICENSE 8 | * 9 | * Permission is hereby granted, free of charge, to any person obtaining 10 | * a copy of this software and associated documentation files (the 11 | * "Software"), to deal in the Software without restriction, including 12 | * without limitation the rights to use, copy, modify, merge, publish, 13 | * distribute, sublicense, and/or sell copies of the Software, and to 14 | * permit persons to whom the Software is furnished to do so, subject to 15 | * the following conditions: 16 | * 17 | * The above copyright notice and this permission notice shall be included 18 | * in all copies or substantial portions of the Software. 19 | * 20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 23 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 24 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 25 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 26 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | #ifndef HANDLER_READ_RANGE_H 29 | #define HANDLER_READ_RANGE_H 30 | 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include "bacnet/bacnet_stack_exports.h" 36 | #include "bacnet/bacdef.h" 37 | #include "bacnet/bacenum.h" 38 | #include "bacnet/apdu.h" 39 | 40 | #ifdef __cplusplus_disable 41 | extern "C" { 42 | #endif /* __cplusplus_disable */ 43 | 44 | BACNET_STACK_EXPORT 45 | void handler_read_range( 46 | DEVICE_OBJECT_DATA *pDev, 47 | uint8_t * service_request, 48 | uint16_t service_len, 49 | BACNET_ROUTE * src, 50 | BACNET_CONFIRMED_SERVICE_DATA * service_data); 51 | 52 | #ifdef __cplusplus_disable 53 | } 54 | #endif /* __cplusplus_disable */ 55 | #endif 56 | -------------------------------------------------------------------------------- /src/bacnet/basic/service/h_rr_a.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * @author Steve Karg 4 | * @date October 2019 5 | * @brief Header file for a basic ReadRange-Ack service handler 6 | * 7 | * @section LICENSE 8 | * 9 | * Permission is hereby granted, free of charge, to any person obtaining 10 | * a copy of this software and associated documentation files (the 11 | * "Software"), to deal in the Software without restriction, including 12 | * without limitation the rights to use, copy, modify, merge, publish, 13 | * distribute, sublicense, and/or sell copies of the Software, and to 14 | * permit persons to whom the Software is furnished to do so, subject to 15 | * the following conditions: 16 | * 17 | * The above copyright notice and this permission notice shall be included 18 | * in all copies or substantial portions of the Software. 19 | * 20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 23 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 24 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 25 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 26 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | #ifndef HANDLER_READ_RANGE_ACK_H 29 | #define HANDLER_READ_RANGE_ACK_H 30 | 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include "bacnet/bacnet_stack_exports.h" 36 | #include "bacnet/bacdef.h" 37 | #include "bacnet/bacenum.h" 38 | #include "bacnet/apdu.h" 39 | 40 | #ifdef __cplusplus 41 | extern "C" { 42 | #endif /* __cplusplus */ 43 | 44 | BACNET_STACK_EXPORT 45 | void handler_read_range_ack( 46 | uint8_t * service_request, 47 | uint16_t service_len, 48 | BACNET_ADDRESS * src, 49 | BACNET_CONFIRMED_SERVICE_ACK_DATA * service_data); 50 | 51 | #ifdef __cplusplus 52 | } 53 | #endif /* __cplusplus */ 54 | #endif 55 | -------------------------------------------------------------------------------- /src/bacnet/basic/service/h_ucov.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * @author Steve Karg 4 | * @date October 2019 5 | * @brief Header file for a basic UnconfirmedCOV notification handler 6 | * 7 | * @section LICENSE 8 | * 9 | * Permission is hereby granted, free of charge, to any person obtaining 10 | * a copy of this software and associated documentation files (the 11 | * "Software"), to deal in the Software without restriction, including 12 | * without limitation the rights to use, copy, modify, merge, publish, 13 | * distribute, sublicense, and/or sell copies of the Software, and to 14 | * permit persons to whom the Software is furnished to do so, subject to 15 | * the following conditions: 16 | * 17 | * The above copyright notice and this permission notice shall be included 18 | * in all copies or substantial portions of the Software. 19 | * 20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 23 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 24 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 25 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 26 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | #ifndef HANDLER_UCOV_NOTIFICATION_H 29 | #define HANDLER_UCOV_NOTIFICATION_H 30 | 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include "bacnet/bacnet_stack_exports.h" 36 | #include "bacnet/bacdef.h" 37 | #include "bacnet/bacenum.h" 38 | #include "bacnet/apdu.h" 39 | 40 | #ifdef __cplusplus_disable 41 | extern "C" { 42 | #endif /* __cplusplus_disable */ 43 | 44 | BACNET_STACK_EXPORT 45 | void handler_ucov_notification( 46 | uint8_t * service_request, 47 | uint16_t service_len, 48 | BACNET_ROUTE * src); 49 | 50 | #ifdef __cplusplus_disable 51 | } 52 | #endif /* __cplusplus_disable */ 53 | #endif 54 | -------------------------------------------------------------------------------- /src/bacnet/basic/service/h_upt.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * @author Steve Karg 4 | * @date October 2019 5 | * @brief Header file for a basic UnconfirmedPrivateTransfer service handler 6 | * 7 | * @section LICENSE 8 | * 9 | * Permission is hereby granted, free of charge, to any person obtaining 10 | * a copy of this software and associated documentation files (the 11 | * "Software"), to deal in the Software without restriction, including 12 | * without limitation the rights to use, copy, modify, merge, publish, 13 | * distribute, sublicense, and/or sell copies of the Software, and to 14 | * permit persons to whom the Software is furnished to do so, subject to 15 | * the following conditions: 16 | * 17 | * The above copyright notice and this permission notice shall be included 18 | * in all copies or substantial portions of the Software. 19 | * 20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 23 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 24 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 25 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 26 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | #ifndef HANDLER_UNCONFIRMED_PRIVATE_TRANSFER_H 29 | #define HANDLER_UNCONFIRMED_PRIVATE_TRANSFER_H 30 | 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include "bacnet/bacnet_stack_exports.h" 36 | #include "bacnet/bacdef.h" 37 | #include "bacnet/bacenum.h" 38 | #include "bacnet/apdu.h" 39 | #include "bacnet/ptransfer.h" 40 | 41 | 42 | BACNET_STACK_EXPORT 43 | void handler_unconfirmed_private_transfer( 44 | uint8_t * service_request, 45 | uint16_t service_len, 46 | BACNET_ROUTE * src); 47 | 48 | BACNET_STACK_EXPORT 49 | void private_transfer_print_data( 50 | BACNET_PRIVATE_TRANSFER_DATA *private_data); 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /src/bacnet/basic/service/h_wpm.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * @author Steve Karg 4 | * @date October 2019 5 | * @brief Header file for a basic WritePropertyMultiple service handler 6 | * 7 | * @section LICENSE 8 | * 9 | * Permission is hereby granted, free of charge, to any person obtaining 10 | * a copy of this software and associated documentation files (the 11 | * "Software"), to deal in the Software without restriction, including 12 | * without limitation the rights to use, copy, modify, merge, publish, 13 | * distribute, sublicense, and/or sell copies of the Software, and to 14 | * permit persons to whom the Software is furnished to do so, subject to 15 | * the following conditions: 16 | * 17 | * The above copyright notice and this permission notice shall be included 18 | * in all copies or substantial portions of the Software. 19 | * 20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 23 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 24 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 25 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 26 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | #ifndef HANDLER_WRITE_PROPERTY_MULTIPLE_H 29 | #define HANDLER_WRITE_PROPERTY_MULTIPLE_H 30 | 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include "bacnet/bacnet_stack_exports.h" 36 | #include "bacnet/bacapp.h" 37 | #include "bacnet/bacdef.h" 38 | #include "bacnet/bacenum.h" 39 | #include "bacnet/apdu.h" 40 | 41 | 42 | BACNET_STACK_EXPORT 43 | void handler_write_property_multiple( 44 | uint8_t * service_request, 45 | uint16_t service_len, 46 | BACNET_ROUTE * src, 47 | BACNET_CONFIRMED_SERVICE_DATA * service_data); 48 | 49 | #endif 50 | -------------------------------------------------------------------------------- /src/bacnet/basic/service/s_abort.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * @author Steve Karg 4 | * @date October 2019 5 | * @brief Header file for a basic Abort message send 6 | * 7 | * @section LICENSE 8 | * 9 | * Permission is hereby granted, free of charge, to any person obtaining 10 | * a copy of this software and associated documentation files (the 11 | * "Software"), to deal in the Software without restriction, including 12 | * without limitation the rights to use, copy, modify, merge, publish, 13 | * distribute, sublicense, and/or sell copies of the Software, and to 14 | * permit persons to whom the Software is furnished to do so, subject to 15 | * the following conditions: 16 | * 17 | * The above copyright notice and this permission notice shall be included 18 | * in all copies or substantial portions of the Software. 19 | * 20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 23 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 24 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 25 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 26 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | #ifndef SEND_ABORT_TO_NETWORK_H 29 | #define SEND_ABORT_TO_NETWORK_H 30 | 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include "bacnet/bacnet_stack_exports.h" 36 | #include "bacnet/bacapp.h" 37 | #include "bacnet/bacdef.h" 38 | #include "bacnet/bacenum.h" 39 | #include "bacnet/apdu.h" 40 | #include "bacnet/npdu.h" 41 | 42 | #ifdef __cplusplus_disable 43 | extern "C" { 44 | #endif /* __cplusplus_disable */ 45 | 46 | BACNET_STACK_EXPORT 47 | int Send_Abort_To_Network( 48 | uint8_t * buffer, 49 | BACNET_GLOBAL_ADDRESS *dest, 50 | uint8_t invoke_id, 51 | BACNET_ABORT_REASON reason, 52 | bool server); 53 | 54 | BACNET_STACK_EXPORT 55 | int abort_encode_pdu( 56 | uint8_t * buffer, 57 | BACNET_GLOBAL_ADDRESS * dest, 58 | BACNET_GLOBAL_ADDRESS * src, 59 | BACNET_NPCI_DATA * npci_data, 60 | uint8_t invoke_id, 61 | BACNET_ABORT_REASON reason, 62 | bool server); 63 | 64 | #ifdef __cplusplus_disable 65 | } 66 | #endif /* __cplusplus_disable */ 67 | #endif 68 | -------------------------------------------------------------------------------- /src/bacnet/basic/service/s_ack_alarm.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * @author Steve Karg 4 | * @date October 2019 5 | * @brief Header file for a basic AlarmAcknowledgement service send 6 | * 7 | * @section LICENSE 8 | * 9 | * Permission is hereby granted, free of charge, to any person obtaining 10 | * a copy of this software and associated documentation files (the 11 | * "Software"), to deal in the Software without restriction, including 12 | * without limitation the rights to use, copy, modify, merge, publish, 13 | * distribute, sublicense, and/or sell copies of the Software, and to 14 | * permit persons to whom the Software is furnished to do so, subject to 15 | * the following conditions: 16 | * 17 | * The above copyright notice and this permission notice shall be included 18 | * in all copies or substantial portions of the Software. 19 | * 20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 23 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 24 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 25 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 26 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | #ifndef SEND_ALARM_ACKNOWLEDGEMENT_H 29 | #define SEND_ALARM_ACKNOWLEDGEMENT_H 30 | 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include "bacnet/bacnet_stack_exports.h" 36 | #include "bacnet/bacapp.h" 37 | #include "bacnet/bacdef.h" 38 | #include "bacnet/bacenum.h" 39 | #include "bacnet/apdu.h" 40 | #include "bacnet/alarm_ack.h" 41 | 42 | #ifdef __cplusplus_disable 43 | extern "C" { 44 | #endif /* __cplusplus_disable */ 45 | 46 | BACNET_STACK_EXPORT 47 | uint8_t Send_Alarm_Acknowledgement_Address(uint8_t *pdu, uint16_t pdu_size, 48 | BACNET_ALARM_ACK_DATA *data, BACNET_GLOBAL_ADDRESS *dest); 49 | 50 | BACNET_STACK_EXPORT 51 | uint8_t Send_Alarm_Acknowledgement(uint32_t device_id, 52 | BACNET_ALARM_ACK_DATA* data); 53 | 54 | #ifdef __cplusplus_disable 55 | } 56 | #endif /* __cplusplus_disable */ 57 | #endif 58 | -------------------------------------------------------------------------------- /src/bacnet/basic/service/s_arfs.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * @author Steve Karg 4 | * @date October 2019 5 | * @brief Header file for a basic WritePropertyMultiple service send 6 | * 7 | * @section LICENSE 8 | * 9 | * Permission is hereby granted, free of charge, to any person obtaining 10 | * a copy of this software and associated documentation files (the 11 | * "Software"), to deal in the Software without restriction, including 12 | * without limitation the rights to use, copy, modify, merge, publish, 13 | * distribute, sublicense, and/or sell copies of the Software, and to 14 | * permit persons to whom the Software is furnished to do so, subject to 15 | * the following conditions: 16 | * 17 | * The above copyright notice and this permission notice shall be included 18 | * in all copies or substantial portions of the Software. 19 | * 20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 23 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 24 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 25 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 26 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | #ifndef SEND_ATOMIC_READ_FILE_STREAM_H 29 | #define SEND_ATOMIC_READ_FILE_STREAM_H 30 | 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include "bacnet/bacnet_stack_exports.h" 36 | #include "bacnet/bacapp.h" 37 | #include "bacnet/bacdef.h" 38 | #include "bacnet/bacenum.h" 39 | #include "bacnet/apdu.h" 40 | 41 | #ifdef __cplusplus_disable 42 | extern "C" { 43 | #endif /* __cplusplus_disable */ 44 | 45 | BACNET_STACK_EXPORT 46 | uint8_t Send_Atomic_Read_File_Stream(uint32_t device_id, uint32_t file_instance, 47 | int fileStartPosition, 48 | unsigned requestedOctetCount); 49 | 50 | #ifdef __cplusplus_disable 51 | } 52 | #endif /* __cplusplus_disable */ 53 | #endif 54 | -------------------------------------------------------------------------------- /src/bacnet/basic/service/s_awfs.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * @author Steve Karg 4 | * @date October 2019 5 | * @brief Header file for a basic AtomicWriteFile stream service send 6 | * 7 | * @section LICENSE 8 | * 9 | * Permission is hereby granted, free of charge, to any person obtaining 10 | * a copy of this software and associated documentation files (the 11 | * "Software"), to deal in the Software without restriction, including 12 | * without limitation the rights to use, copy, modify, merge, publish, 13 | * distribute, sublicense, and/or sell copies of the Software, and to 14 | * permit persons to whom the Software is furnished to do so, subject to 15 | * the following conditions: 16 | * 17 | * The above copyright notice and this permission notice shall be included 18 | * in all copies or substantial portions of the Software. 19 | * 20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 23 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 24 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 25 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 26 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | #ifndef SEND_ATOMIC_WRITE_FILE_STREAM_H 29 | #define SEND_ATOMIC_WRITE_FILE_STREAM_H 30 | 31 | //#include 32 | #include 33 | //#include 34 | //#include 35 | #include "bacnet/bacnet_stack_exports.h" 36 | //#include "bacnet/bacapp.h" 37 | //#include "bacnet/bacdef.h" 38 | //#include "bacnet/bacenum.h" 39 | //#include "bacnet/apdu.h" 40 | #include "bacnet/bacstr.h" 41 | 42 | #ifdef __cplusplus_disable 43 | extern "C" { 44 | #endif /* __cplusplus_disable */ 45 | 46 | BACNET_STACK_EXPORT 47 | uint8_t Send_Atomic_Write_File_Stream(uint32_t device_id, 48 | uint32_t file_instance, 49 | int fileStartPosition, 50 | BACNET_OCTET_STRING* fileData); 51 | 52 | #ifdef __cplusplus_disable 53 | } 54 | #endif /* __cplusplus_disable */ 55 | #endif 56 | -------------------------------------------------------------------------------- /src/bacnet/basic/service/s_cevent.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * @author Steve Karg 4 | * @date October 2019 5 | * @brief Header file for a basic ConfirmedEventNotification service send 6 | * 7 | * @section LICENSE 8 | * 9 | * Permission is hereby granted, free of charge, to any person obtaining 10 | * a copy of this software and associated documentation files (the 11 | * "Software"), to deal in the Software without restriction, including 12 | * without limitation the rights to use, copy, modify, merge, publish, 13 | * distribute, sublicense, and/or sell copies of the Software, and to 14 | * permit persons to whom the Software is furnished to do so, subject to 15 | * the following conditions: 16 | * 17 | * The above copyright notice and this permission notice shall be included 18 | * in all copies or substantial portions of the Software. 19 | * 20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 23 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 24 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 25 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 26 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | #ifndef SEND_CONFIRMED_EVENT_NOTIFICATION_H 29 | #define SEND_CONFIRMED_EVENT_NOTIFICATION_H 30 | 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include "bacnet/bacnet_stack_exports.h" 36 | #include "bacnet/bacapp.h" 37 | #include "bacnet/bacdef.h" 38 | #include "bacnet/bacenum.h" 39 | #include "bacnet/apdu.h" 40 | #include "bacnet/event.h" 41 | 42 | #ifdef __cplusplus_disable 43 | extern "C" { 44 | #endif /* __cplusplus_disable */ 45 | 46 | BACNET_STACK_EXPORT 47 | uint8_t Send_CEvent_Notify(uint32_t device_id, 48 | BACNET_EVENT_NOTIFICATION_DATA* data); 49 | BACNET_STACK_EXPORT 50 | uint8_t Send_CEvent_Notify_Address(uint8_t *pdu, uint16_t pdu_size, 51 | BACNET_EVENT_NOTIFICATION_DATA *data, BACNET_GLOBAL_ADDRESS *dest); 52 | 53 | #ifdef __cplusplus_disable 54 | } 55 | #endif /* __cplusplus_disable */ 56 | #endif 57 | -------------------------------------------------------------------------------- /src/bacnet/basic/service/s_cov.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * @author Steve Karg 4 | * @date October 2019 5 | * @brief Header file for a basic UnconfirmedCOVNotification service send 6 | * and SubscribeCOV service send 7 | * 8 | * @section LICENSE 9 | * 10 | * Permission is hereby granted, free of charge, to any person obtaining 11 | * a copy of this software and associated documentation files (the 12 | * "Software"), to deal in the Software without restriction, including 13 | * without limitation the rights to use, copy, modify, merge, publish, 14 | * distribute, sublicense, and/or sell copies of the Software, and to 15 | * permit persons to whom the Software is furnished to do so, subject to 16 | * the following conditions: 17 | * 18 | * The above copyright notice and this permission notice shall be included 19 | * in all copies or substantial portions of the Software. 20 | * 21 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 22 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 23 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 24 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 25 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 26 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 27 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 28 | */ 29 | #ifndef SERVICE_SEND_COV_H 30 | #define SERVICE_SEND_COV_H 31 | 32 | #include 33 | #include 34 | #include 35 | #include 36 | #include "bacnet/bacnet_stack_exports.h" 37 | #include "bacnet/bacapp.h" 38 | #include "bacnet/bacdef.h" 39 | #include "bacnet/bacenum.h" 40 | #include "bacnet/apdu.h" 41 | #include "bacnet/cov.h" 42 | 43 | #ifdef __cplusplus_disable 44 | extern "C" { 45 | #endif /* __cplusplus_disable */ 46 | 47 | BACNET_STACK_EXPORT 48 | int Send_UCOV_Notify( 49 | uint8_t * buffer, 50 | unsigned buffer_len, 51 | BACNET_COV_DATA * cov_data); 52 | BACNET_STACK_EXPORT 53 | int ucov_notify_encode_pdu( 54 | uint8_t * buffer, 55 | unsigned buffer_len, 56 | BACNET_GLOBAL_ADDRESS * dest, 57 | BACNET_NPCI_DATA * npci_data, 58 | BACNET_COV_DATA * cov_data); 59 | BACNET_STACK_EXPORT 60 | uint8_t Send_COV_Subscribe( 61 | uint32_t device_id, 62 | BACNET_SUBSCRIBE_COV_DATA * cov_data); 63 | 64 | #ifdef __cplusplus_disable 65 | } 66 | #endif /* __cplusplus_disable */ 67 | #endif 68 | -------------------------------------------------------------------------------- /src/bacnet/basic/service/s_dcc.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * @author Steve Karg 4 | * @date October 2019 5 | * @brief Header file for a basic DeviceCommunicationControl service send 6 | * 7 | * @section LICENSE 8 | * 9 | * Permission is hereby granted, free of charge, to any person obtaining 10 | * a copy of this software and associated documentation files (the 11 | * "Software"), to deal in the Software without restriction, including 12 | * without limitation the rights to use, copy, modify, merge, publish, 13 | * distribute, sublicense, and/or sell copies of the Software, and to 14 | * permit persons to whom the Software is furnished to do so, subject to 15 | * the following conditions: 16 | * 17 | * The above copyright notice and this permission notice shall be included 18 | * in all copies or substantial portions of the Software. 19 | * 20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 23 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 24 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 25 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 26 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | #ifndef SEND_DCC_H 29 | #define SEND_DCC_H 30 | 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include "bacnet/bacnet_stack_exports.h" 36 | #include "bacnet/bacapp.h" 37 | #include "bacnet/bacdef.h" 38 | #include "bacnet/bacenum.h" 39 | #include "bacnet/apdu.h" 40 | 41 | #ifdef __cplusplus_disable 42 | extern "C" { 43 | #endif /* __cplusplus_disable */ 44 | 45 | BACNET_STACK_EXPORT 46 | uint8_t Send_Device_Communication_Control_Request( 47 | uint32_t device_id, uint16_t timeDuration, 48 | BACNET_COMMUNICATION_ENABLE_DISABLE state, char *password); 49 | 50 | #ifdef __cplusplus_disable 51 | } 52 | #endif /* __cplusplus_disable */ 53 | #endif 54 | -------------------------------------------------------------------------------- /src/bacnet/basic/service/s_error.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * @author Steve Karg 4 | * @date October 2019 5 | * @brief Header file for a basic Error message send 6 | * 7 | * @section LICENSE 8 | * 9 | * Permission is hereby granted, free of charge, to any person obtaining 10 | * a copy of this software and associated documentation files (the 11 | * "Software"), to deal in the Software without restriction, including 12 | * without limitation the rights to use, copy, modify, merge, publish, 13 | * distribute, sublicense, and/or sell copies of the Software, and to 14 | * permit persons to whom the Software is furnished to do so, subject to 15 | * the following conditions: 16 | * 17 | * The above copyright notice and this permission notice shall be included 18 | * in all copies or substantial portions of the Software. 19 | * 20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 23 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 24 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 25 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 26 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | #ifndef SEND_ERROR_MESSAGE_H 29 | #define SEND_ERROR_MESSAGE_H 30 | 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include "bacnet/bacnet_stack_exports.h" 36 | #include "bacnet/bacapp.h" 37 | #include "bacnet/bacdef.h" 38 | #include "bacnet/bacenum.h" 39 | #include "bacnet/apdu.h" 40 | 41 | #ifdef __cplusplus_disable 42 | extern "C" { 43 | #endif /* __cplusplus_disable */ 44 | 45 | BACNET_STACK_EXPORT 46 | int Send_Error_To_Network( 47 | uint8_t * buffer, 48 | BACNET_GLOBAL_ADDRESS *dest, 49 | uint8_t invoke_id, 50 | BACNET_CONFIRMED_SERVICE service, 51 | BACNET_ERROR_CLASS error_class, 52 | BACNET_ERROR_CODE error_code); 53 | 54 | BACNET_STACK_EXPORT 55 | int error_encode_pdu( 56 | uint8_t * buffer, 57 | BACNET_GLOBAL_ADDRESS * dest, 58 | BACNET_GLOBAL_ADDRESS * src, 59 | BACNET_NPCI_DATA * npci_data, 60 | uint8_t invoke_id, 61 | BACNET_CONFIRMED_SERVICE service, 62 | BACNET_ERROR_CLASS error_class, 63 | BACNET_ERROR_CODE error_code); 64 | 65 | #ifdef __cplusplus_disable 66 | } 67 | #endif /* __cplusplus_disable */ 68 | #endif 69 | -------------------------------------------------------------------------------- /src/bacnet/basic/service/s_get_alarm_sum.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * @author Steve Karg 4 | * @date October 2019 5 | * @brief Header file for a basic GetAlarmSummary service send 6 | * 7 | * @section LICENSE 8 | * 9 | * Permission is hereby granted, free of charge, to any person obtaining 10 | * a copy of this software and associated documentation files (the 11 | * "Software"), to deal in the Software without restriction, including 12 | * without limitation the rights to use, copy, modify, merge, publish, 13 | * distribute, sublicense, and/or sell copies of the Software, and to 14 | * permit persons to whom the Software is furnished to do so, subject to 15 | * the following conditions: 16 | * 17 | * The above copyright notice and this permission notice shall be included 18 | * in all copies or substantial portions of the Software. 19 | * 20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 23 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 24 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 25 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 26 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | #ifndef SEND_GET_ALARM_SUMMARY_H 29 | #define SEND_GET_ALARM_SUMMARY_H 30 | 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include "bacnet/bacnet_stack_exports.h" 36 | #include "bacnet/bacapp.h" 37 | #include "bacnet/bacdef.h" 38 | #include "bacnet/bacenum.h" 39 | #include "bacnet/apdu.h" 40 | 41 | #ifdef __cplusplus_disable 42 | extern "C" { 43 | #endif /* __cplusplus_disable */ 44 | 45 | BACNET_STACK_EXPORT 46 | uint8_t Send_Get_Alarm_Summary_Address(BACNET_GLOBAL_ADDRESS *dest, uint16_t max_apdu); 47 | BACNET_STACK_EXPORT 48 | uint8_t Send_Get_Alarm_Summary(uint32_t device_id); 49 | 50 | #ifdef __cplusplus_disable 51 | } 52 | #endif /* __cplusplus_disable */ 53 | #endif 54 | -------------------------------------------------------------------------------- /src/bacnet/basic/service/s_get_event.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * @author Steve Karg 4 | * @date October 2019 5 | * @brief Header file for a basic GetEventInformation service send 6 | * 7 | * @section LICENSE 8 | * 9 | * Permission is hereby granted, free of charge, to any person obtaining 10 | * a copy of this software and associated documentation files (the 11 | * "Software"), to deal in the Software without restriction, including 12 | * without limitation the rights to use, copy, modify, merge, publish, 13 | * distribute, sublicense, and/or sell copies of the Software, and to 14 | * permit persons to whom the Software is furnished to do so, subject to 15 | * the following conditions: 16 | * 17 | * The above copyright notice and this permission notice shall be included 18 | * in all copies or substantial portions of the Software. 19 | * 20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 23 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 24 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 25 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 26 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | #ifndef SEND_GET_EVENT_INFORMATION_H 29 | #define SEND_GET_EVENT_INFORMATION_H 30 | 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include "bacnet/bacnet_stack_exports.h" 36 | #include "bacnet/bacapp.h" 37 | #include "bacnet/bacdef.h" 38 | #include "bacnet/bacenum.h" 39 | #include "bacnet/apdu.h" 40 | 41 | #ifdef __cplusplus_disable 42 | extern "C" { 43 | #endif /* __cplusplus_disable */ 44 | 45 | BACNET_STACK_EXPORT 46 | uint8_t Send_Get_Event_Information_Address( 47 | BACNET_GLOBAL_ADDRESS *dest, uint16_t max_apdu, 48 | BACNET_OBJECT_ID *lastReceivedObjectIdentifier); 49 | BACNET_STACK_EXPORT 50 | uint8_t Send_Get_Event_Information( 51 | uint32_t device_id, BACNET_OBJECT_ID *lastReceivedObjectIdentifier); 52 | 53 | #ifdef __cplusplus_disable 54 | } 55 | #endif /* __cplusplus_disable */ 56 | #endif 57 | -------------------------------------------------------------------------------- /src/bacnet/basic/service/s_getevent.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * @author Steve Karg 4 | * @date October 2019 5 | * @brief Header file for a basic GetEvent service send 6 | * 7 | * @section LICENSE 8 | * 9 | * Permission is hereby granted, free of charge, to any person obtaining 10 | * a copy of this software and associated documentation files (the 11 | * "Software"), to deal in the Software without restriction, including 12 | * without limitation the rights to use, copy, modify, merge, publish, 13 | * distribute, sublicense, and/or sell copies of the Software, and to 14 | * permit persons to whom the Software is furnished to do so, subject to 15 | * the following conditions: 16 | * 17 | * The above copyright notice and this permission notice shall be included 18 | * in all copies or substantial portions of the Software. 19 | * 20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 23 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 24 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 25 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 26 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | #ifndef SEND_GET_EVENT_H 29 | #define SEND_GET_EVENT_H 30 | 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include "bacnet/bacnet_stack_exports.h" 36 | #include "bacnet/bacapp.h" 37 | #include "bacnet/bacdef.h" 38 | #include "bacnet/bacenum.h" 39 | #include "bacnet/apdu.h" 40 | 41 | #ifdef __cplusplus_disable 42 | extern "C" { 43 | #endif /* __cplusplus_disable */ 44 | 45 | BACNET_STACK_EXPORT 46 | uint8_t Send_GetEvent(BACNET_GLOBAL_ADDRESS* target_address, 47 | BACNET_OBJECT_ID* lastReceivedObjectIdentifier); 48 | BACNET_STACK_EXPORT 49 | uint8_t Send_GetEvent_Global(void); 50 | 51 | #ifdef __cplusplus_disable 52 | } 53 | #endif /* __cplusplus_disable */ 54 | #endif 55 | -------------------------------------------------------------------------------- /src/bacnet/basic/service/s_iam.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * @author Steve Karg 4 | * @date October 2019 5 | * @brief Header file for a basic I-Am service send 6 | * 7 | * @section LICENSE 8 | * 9 | * Permission is hereby granted, free of charge, to any person obtaining 10 | * a copy of this software and associated documentation files (the 11 | * "Software"), to deal in the Software without restriction, including 12 | * without limitation the rights to use, copy, modify, merge, publish, 13 | * distribute, sublicense, and/or sell copies of the Software, and to 14 | * permit persons to whom the Software is furnished to do so, subject to 15 | * the following conditions: 16 | * 17 | * The above copyright notice and this permission notice shall be included 18 | * in all copies or substantial portions of the Software. 19 | * 20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 23 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 24 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 25 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 26 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | #ifndef SEND_I_AM_H 29 | #define SEND_I_AM_H 30 | 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include "bacnet/bacnet_stack_exports.h" 36 | #include "bacnet/apdu.h" 37 | #include "bacnet/bacapp.h" 38 | #include "bacnet/bacdef.h" 39 | #include "bacnet/bacenum.h" 40 | #include "bacnet/npdu.h" 41 | 42 | #ifdef __cplusplus_disable 43 | extern "C" { 44 | #endif /* __cplusplus_disable */ 45 | 46 | BACNET_STACK_EXPORT 47 | void Send_I_Am_To_Network(BACNET_ROUTE* target_address, uint32_t device_id, 48 | unsigned int max_apdu, int segmentation, 49 | uint16_t vendor_id); 50 | BACNET_STACK_EXPORT 51 | int iam_encode_pdu(uint8_t* buffer, BACNET_ROUTE* dest, 52 | BACNET_NPCI_DATA* npci_data); 53 | 54 | BACNET_STACK_EXPORT 55 | void Send_I_Am(uint8_t* buffer); 56 | 57 | BACNET_STACK_EXPORT 58 | uint16_t iam_unicast_encode_pdu( 59 | uint8_t* buffer, 60 | BACNET_ROUTE* src, 61 | BACNET_ROUTE* dest, 62 | BACNET_NPCI_DATA* npci_data); 63 | 64 | BACNET_STACK_EXPORT 65 | void Send_I_Am_Unicast( 66 | DEVICE_OBJECT_DATA *pDev, 67 | BACNET_ROUTE* src); 68 | 69 | #ifdef __cplusplus_disable 70 | } 71 | #endif /* __cplusplus_disable */ 72 | #endif 73 | -------------------------------------------------------------------------------- /src/bacnet/basic/service/s_lso.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * @author Steve Karg 4 | * @date October 2019 5 | * @brief Header file for a basic LifeSafetyOperation service send 6 | * 7 | * @section LICENSE 8 | * 9 | * Permission is hereby granted, free of charge, to any person obtaining 10 | * a copy of this software and associated documentation files (the 11 | * "Software"), to deal in the Software without restriction, including 12 | * without limitation the rights to use, copy, modify, merge, publish, 13 | * distribute, sublicense, and/or sell copies of the Software, and to 14 | * permit persons to whom the Software is furnished to do so, subject to 15 | * the following conditions: 16 | * 17 | * The above copyright notice and this permission notice shall be included 18 | * in all copies or substantial portions of the Software. 19 | * 20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 23 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 24 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 25 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 26 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | #ifndef SEND_LIFE_SAFETY_OPERATION_H 29 | #define SEND_LIFE_SAFETY_OPERATION_H 30 | 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include "bacnet/bacnet_stack_exports.h" 36 | #include "bacnet/bacapp.h" 37 | #include "bacnet/bacdef.h" 38 | #include "bacnet/bacenum.h" 39 | #include "bacnet/apdu.h" 40 | #include "bacnet/lso.h" 41 | 42 | #ifdef __cplusplus 43 | extern "C" { 44 | #endif /* __cplusplus */ 45 | 46 | BACNET_STACK_EXPORT 47 | uint8_t Send_Life_Safety_Operation_Data(uint32_t device_id, 48 | BACNET_LSO_DATA* data); 49 | 50 | #ifdef __cplusplus 51 | } 52 | #endif /* __cplusplus */ 53 | #endif 54 | -------------------------------------------------------------------------------- /src/bacnet/basic/service/s_rd.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * @author Steve Karg 4 | * @date October 2019 5 | * @brief Header file for a basic ReinitializeDevice service send 6 | * 7 | * @section LICENSE 8 | * 9 | * Permission is hereby granted, free of charge, to any person obtaining 10 | * a copy of this software and associated documentation files (the 11 | * "Software"), to deal in the Software without restriction, including 12 | * without limitation the rights to use, copy, modify, merge, publish, 13 | * distribute, sublicense, and/or sell copies of the Software, and to 14 | * permit persons to whom the Software is furnished to do so, subject to 15 | * the following conditions: 16 | * 17 | * The above copyright notice and this permission notice shall be included 18 | * in all copies or substantial portions of the Software. 19 | * 20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 23 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 24 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 25 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 26 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | #ifndef SEND_REINITIALIZE_DEVICE_H 29 | #define SEND_REINITIALIZE_DEVICE_H 30 | 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include "bacnet/bacnet_stack_exports.h" 36 | #include "bacnet/bacapp.h" 37 | #include "bacnet/bacdef.h" 38 | #include "bacnet/bacenum.h" 39 | #include "bacnet/apdu.h" 40 | 41 | #ifdef __cplusplus_disable 42 | extern "C" { 43 | #endif /* __cplusplus_disable */ 44 | 45 | BACNET_STACK_EXPORT 46 | uint8_t Send_Reinitialize_Device_Request(uint32_t device_id, 47 | BACNET_REINITIALIZED_STATE state, 48 | char *password); 49 | 50 | #ifdef __cplusplus_disable 51 | } 52 | #endif /* __cplusplus_disable */ 53 | #endif 54 | -------------------------------------------------------------------------------- /src/bacnet/basic/service/s_readrange.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * @author Steve Karg 4 | * @date October 2019 5 | * @brief Header file for a basic ReadRange service send 6 | * 7 | * @section LICENSE 8 | * 9 | * Permission is hereby granted, free of charge, to any person obtaining 10 | * a copy of this software and associated documentation files (the 11 | * "Software"), to deal in the Software without restriction, including 12 | * without limitation the rights to use, copy, modify, merge, publish, 13 | * distribute, sublicense, and/or sell copies of the Software, and to 14 | * permit persons to whom the Software is furnished to do so, subject to 15 | * the following conditions: 16 | * 17 | * The above copyright notice and this permission notice shall be included 18 | * in all copies or substantial portions of the Software. 19 | * 20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 23 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 24 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 25 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 26 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | #ifndef SEND_READ_RANGE_H 29 | #define SEND_READ_RANGE_H 30 | 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include "bacnet/bacnet_stack_exports.h" 36 | #include "bacnet/bacapp.h" 37 | #include "bacnet/bacdef.h" 38 | #include "bacnet/bacenum.h" 39 | #include "bacnet/apdu.h" 40 | #include "bacnet/readrange.h" 41 | 42 | #ifdef __cplusplus_disable 43 | extern "C" { 44 | #endif /* __cplusplus_disable */ 45 | 46 | BACNET_STACK_EXPORT 47 | uint8_t Send_ReadRange_Request(uint32_t device_id, 48 | BACNET_READ_RANGE_DATA* read_access_data); 49 | 50 | #ifdef __cplusplus_disable 51 | } 52 | #endif /* __cplusplus_disable */ 53 | #endif 54 | -------------------------------------------------------------------------------- /src/bacnet/basic/service/s_rp.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * @author Steve Karg 4 | * @date October 2019 5 | * @brief Header file for a basic ReadProperty service send 6 | * 7 | * @section LICENSE 8 | * 9 | * Permission is hereby granted, free of charge, to any person obtaining 10 | * a copy of this software and associated documentation files (the 11 | * "Software"), to deal in the Software without restriction, including 12 | * without limitation the rights to use, copy, modify, merge, publish, 13 | * distribute, sublicense, and/or sell copies of the Software, and to 14 | * permit persons to whom the Software is furnished to do so, subject to 15 | * the following conditions: 16 | * 17 | * The above copyright notice and this permission notice shall be included 18 | * in all copies or substantial portions of the Software. 19 | * 20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 23 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 24 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 25 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 26 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | #ifndef SEND_READ_PROPERTY_H 29 | #define SEND_READ_PROPERTY_H 30 | 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include "bacnet/bacnet_stack_exports.h" 36 | #include "bacnet/bacapp.h" 37 | #include "bacnet/bacdef.h" 38 | #include "bacnet/bacenum.h" 39 | #include "bacnet/apdu.h" 40 | 41 | #ifdef __cplusplus_disable 42 | extern "C" { 43 | #endif /* __cplusplus_disable */ 44 | 45 | BACNET_STACK_EXPORT 46 | uint8_t Send_Read_Property_Request_Address( 47 | BACNET_ROUTE * dest, 48 | uint16_t max_apdu, 49 | BACNET_OBJECT_TYPE object_type, 50 | uint32_t object_instance, 51 | BACNET_PROPERTY_ID object_property, 52 | uint32_t array_index); 53 | 54 | BACNET_STACK_EXPORT 55 | uint8_t Send_Read_Property_Request( 56 | uint32_t device_id, /* destination device */ 57 | BACNET_OBJECT_TYPE object_type, 58 | uint32_t object_instance, 59 | BACNET_PROPERTY_ID object_property, 60 | uint32_t array_index); 61 | 62 | #ifdef __cplusplus_disable 63 | } 64 | #endif /* __cplusplus_disable */ 65 | #endif 66 | -------------------------------------------------------------------------------- /src/bacnet/basic/service/s_rpm.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * @author Steve Karg 4 | * @date October 2019 5 | * @brief Header file for a basic ReadPropertyMultiple service send 6 | * 7 | * @section LICENSE 8 | * 9 | * Permission is hereby granted, free of charge, to any person obtaining 10 | * a copy of this software and associated documentation files (the 11 | * "Software"), to deal in the Software without restriction, including 12 | * without limitation the rights to use, copy, modify, merge, publish, 13 | * distribute, sublicense, and/or sell copies of the Software, and to 14 | * permit persons to whom the Software is furnished to do so, subject to 15 | * the following conditions: 16 | * 17 | * The above copyright notice and this permission notice shall be included 18 | * in all copies or substantial portions of the Software. 19 | * 20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 23 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 24 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 25 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 26 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | #ifndef SEND_READ_PROPERTY_MULTIPLE_H 29 | #define SEND_READ_PROPERTY_MULTIPLE_H 30 | 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include "bacnet/bacnet_stack_exports.h" 36 | #include "bacnet/bacapp.h" 37 | #include "bacnet/bacdef.h" 38 | #include "bacnet/bacenum.h" 39 | #include "bacnet/apdu.h" 40 | #include "bacnet/rpm.h" 41 | 42 | #ifdef __cplusplus_disable 43 | extern "C" { 44 | #endif /* __cplusplus_disable */ 45 | 46 | BACNET_STACK_EXPORT 47 | uint8_t Send_Read_Property_Multiple_Request( 48 | uint8_t * pdu, 49 | uint16_t max_pdu, 50 | uint32_t device_id, /* destination device */ 51 | BACNET_READ_ACCESS_DATA * read_access_data); 52 | 53 | #ifdef __cplusplus_disable 54 | } 55 | #endif /* __cplusplus_disable */ 56 | #endif 57 | -------------------------------------------------------------------------------- /src/bacnet/basic/service/s_ts.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * @author Steve Karg 4 | * @date October 2019 5 | * @brief Header file for a basic TimeSynchronization service send 6 | * 7 | * @section LICENSE 8 | * 9 | * Permission is hereby granted, free of charge, to any person obtaining 10 | * a copy of this software and associated documentation files (the 11 | * "Software"), to deal in the Software without restriction, including 12 | * without limitation the rights to use, copy, modify, merge, publish, 13 | * distribute, sublicense, and/or sell copies of the Software, and to 14 | * permit persons to whom the Software is furnished to do so, subject to 15 | * the following conditions: 16 | * 17 | * The above copyright notice and this permission notice shall be included 18 | * in all copies or substantial portions of the Software. 19 | * 20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 23 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 24 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 25 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 26 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | #ifndef SEND_TIME_SYNC_H 29 | #define SEND_TIME_SYNC_H 30 | 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include "bacnet/bacnet_stack_exports.h" 36 | #include "bacnet/bacapp.h" 37 | #include "bacnet/bacdef.h" 38 | #include "bacnet/bacenum.h" 39 | #include "bacnet/apdu.h" 40 | 41 | #ifdef __cplusplus_disable 42 | extern "C" { 43 | #endif /* __cplusplus_disable */ 44 | 45 | BACNET_STACK_EXPORT 46 | void Send_TimeSync( 47 | BACNET_DATE * bdate, 48 | BACNET_TIME * btime); 49 | BACNET_STACK_EXPORT 50 | void Send_TimeSync_Remote( 51 | BACNET_ADDRESS * dest, 52 | BACNET_DATE * bdate, 53 | BACNET_TIME * btime); 54 | BACNET_STACK_EXPORT 55 | void Send_TimeSyncUTC( 56 | BACNET_DATE * bdate, 57 | BACNET_TIME * btime); 58 | 59 | BACNET_STACK_EXPORT 60 | void Send_TimeSyncUTC_Remote( 61 | BACNET_ADDRESS * dest, 62 | BACNET_DATE * bdate, 63 | BACNET_TIME * btime); 64 | 65 | BACNET_STACK_EXPORT 66 | void Send_TimeSyncUTC_Device(void); 67 | BACNET_STACK_EXPORT 68 | void Send_TimeSync_Device(void); 69 | 70 | #ifdef __cplusplus_disable 71 | } 72 | #endif /* __cplusplus_disable */ 73 | #endif 74 | -------------------------------------------------------------------------------- /src/bacnet/basic/service/s_uevent.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * @author Steve Karg 4 | * @date October 2019 5 | * @brief Header file for a basic UnconfirmedEventNotification service send 6 | * 7 | * @section LICENSE 8 | * 9 | * Permission is hereby granted, free of charge, to any person obtaining 10 | * a copy of this software and associated documentation files (the 11 | * "Software"), to deal in the Software without restriction, including 12 | * without limitation the rights to use, copy, modify, merge, publish, 13 | * distribute, sublicense, and/or sell copies of the Software, and to 14 | * permit persons to whom the Software is furnished to do so, subject to 15 | * the following conditions: 16 | * 17 | * The above copyright notice and this permission notice shall be included 18 | * in all copies or substantial portions of the Software. 19 | * 20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 23 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 24 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 25 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 26 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | #ifndef SEND_UNCONFIRMED_EVENT_NOTIFICATION_H 29 | #define SEND_UNCONFIRMED_EVENT_NOTIFICATION_H 30 | 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include "bacnet/bacnet_stack_exports.h" 36 | #include "bacnet/bacapp.h" 37 | #include "bacnet/bacdef.h" 38 | #include "bacnet/bacenum.h" 39 | #include "bacnet/apdu.h" 40 | 41 | #ifdef __cplusplus_disable 42 | extern "C" { 43 | #endif /* __cplusplus_disable */ 44 | 45 | BACNET_STACK_EXPORT 46 | int Send_UEvent_Notify( 47 | uint8_t * buffer, 48 | BACNET_EVENT_NOTIFICATION_DATA * data, 49 | BACNET_GLOBAL_ADDRESS * dest); 50 | 51 | #ifdef __cplusplus_disable 52 | } 53 | #endif /* __cplusplus_disable */ 54 | #endif 55 | -------------------------------------------------------------------------------- /src/bacnet/basic/service/s_upt.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * @author Steve Karg 4 | * @date October 2019 5 | * @brief Header file for a basic UnconfirmedPrivateTransfer service send 6 | * 7 | * @section LICENSE 8 | * 9 | * Permission is hereby granted, free of charge, to any person obtaining 10 | * a copy of this software and associated documentation files (the 11 | * "Software"), to deal in the Software without restriction, including 12 | * without limitation the rights to use, copy, modify, merge, publish, 13 | * distribute, sublicense, and/or sell copies of the Software, and to 14 | * permit persons to whom the Software is furnished to do so, subject to 15 | * the following conditions: 16 | * 17 | * The above copyright notice and this permission notice shall be included 18 | * in all copies or substantial portions of the Software. 19 | * 20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 23 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 24 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 25 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 26 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | #ifndef SEND_UNCONFIRMED_PRIVATE_TRANSFER_H 29 | #define SEND_UNCONFIRMED_PRIVATE_TRANSFER_H 30 | 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include "bacnet/bacnet_stack_exports.h" 36 | #include "bacnet/bacapp.h" 37 | #include "bacnet/bacdef.h" 38 | #include "bacnet/bacenum.h" 39 | #include "bacnet/apdu.h" 40 | #include "bacnet/ptransfer.h" 41 | 42 | #ifdef __cplusplus_disable 43 | extern "C" { 44 | #endif /* __cplusplus_disable */ 45 | 46 | BACNET_STACK_EXPORT 47 | int Send_UnconfirmedPrivateTransfer(BACNET_GLOBAL_ADDRESS* dest, 48 | BACNET_PRIVATE_TRANSFER_DATA* private_data); 49 | 50 | #ifdef __cplusplus_disable 51 | } 52 | #endif /* __cplusplus_disable */ 53 | #endif 54 | -------------------------------------------------------------------------------- /src/bacnet/basic/service/s_whohas.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * @author Steve Karg 4 | * @date October 2019 5 | * @brief Header file for a basic WhoHas service send 6 | * 7 | * @section LICENSE 8 | * 9 | * Permission is hereby granted, free of charge, to any person obtaining 10 | * a copy of this software and associated documentation files (the 11 | * "Software"), to deal in the Software without restriction, including 12 | * without limitation the rights to use, copy, modify, merge, publish, 13 | * distribute, sublicense, and/or sell copies of the Software, and to 14 | * permit persons to whom the Software is furnished to do so, subject to 15 | * the following conditions: 16 | * 17 | * The above copyright notice and this permission notice shall be included 18 | * in all copies or substantial portions of the Software. 19 | * 20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 23 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 24 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 25 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 26 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | #ifndef SEND_WHO_HAS_H 29 | #define SEND_WHO_HAS_H 30 | 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include "bacnet/bacnet_stack_exports.h" 36 | #include "bacnet/bacapp.h" 37 | #include "bacnet/bacdef.h" 38 | #include "bacnet/bacenum.h" 39 | #include "bacnet/apdu.h" 40 | 41 | #ifdef __cplusplus_disable 42 | extern "C" { 43 | #endif /* __cplusplus_disable */ 44 | 45 | BACNET_STACK_EXPORT 46 | void Send_WhoHas_Name( 47 | int32_t low_limit, 48 | int32_t high_limit, 49 | const char *object_name); 50 | BACNET_STACK_EXPORT 51 | void Send_WhoHas_Object(int32_t low_limit, int32_t high_limit, 52 | BACNET_OBJECT_TYPE object_type, 53 | uint32_t object_instance); 54 | 55 | #ifdef __cplusplus_disable 56 | } 57 | #endif /* __cplusplus_disable */ 58 | #endif 59 | -------------------------------------------------------------------------------- /src/bacnet/basic/service/s_whois.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * @author Steve Karg 4 | * @date October 2019 5 | * @brief Header file for a basic WhoIs service send 6 | * 7 | * @section LICENSE 8 | * 9 | * Permission is hereby granted, free of charge, to any person obtaining 10 | * a copy of this software and associated documentation files (the 11 | * "Software"), to deal in the Software without restriction, including 12 | * without limitation the rights to use, copy, modify, merge, publish, 13 | * distribute, sublicense, and/or sell copies of the Software, and to 14 | * permit persons to whom the Software is furnished to do so, subject to 15 | * the following conditions: 16 | * 17 | * The above copyright notice and this permission notice shall be included 18 | * in all copies or substantial portions of the Software. 19 | * 20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 23 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 24 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 25 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 26 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | #ifndef SEND_WHO_IS_H 29 | #define SEND_WHO_IS_H 30 | 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include "bacnet/bacnet_stack_exports.h" 36 | #include "bacnet/bacapp.h" 37 | #include "bacnet/bacdef.h" 38 | #include "bacnet/bacenum.h" 39 | #include "bacnet/apdu.h" 40 | 41 | #ifdef __cplusplus_disable 42 | extern "C" { 43 | #endif /* __cplusplus_disable */ 44 | 45 | BACNET_STACK_EXPORT 46 | void Send_WhoIs( 47 | int32_t low_limit, 48 | int32_t high_limit); 49 | 50 | BACNET_STACK_EXPORT 51 | void Send_WhoIs_Global( 52 | int32_t low_limit, 53 | int32_t high_limit); 54 | 55 | BACNET_STACK_EXPORT 56 | void Send_WhoIs_Local( 57 | int32_t low_limit, 58 | int32_t high_limit); 59 | 60 | BACNET_STACK_EXPORT 61 | void Send_WhoIs_Remote( 62 | BACNET_ROUTE * target_address, 63 | int32_t low_limit, 64 | int32_t high_limit); 65 | 66 | BACNET_STACK_EXPORT 67 | void Send_WhoIs_To_Network( 68 | BACNET_ROUTE* target_address, 69 | int32_t low_limit, 70 | int32_t high_limit); 71 | 72 | #ifdef __cplusplus_disable 73 | } 74 | #endif /* __cplusplus_disable */ 75 | #endif 76 | -------------------------------------------------------------------------------- /src/bacnet/basic/service/s_wpm.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * @author Steve Karg 4 | * @date October 2019 5 | * @brief Header file for a basic WritePropertyMultiple service send 6 | * 7 | * @section LICENSE 8 | * 9 | * Permission is hereby granted, free of charge, to any person obtaining 10 | * a copy of this software and associated documentation files (the 11 | * "Software"), to deal in the Software without restriction, including 12 | * without limitation the rights to use, copy, modify, merge, publish, 13 | * distribute, sublicense, and/or sell copies of the Software, and to 14 | * permit persons to whom the Software is furnished to do so, subject to 15 | * the following conditions: 16 | * 17 | * The above copyright notice and this permission notice shall be included 18 | * in all copies or substantial portions of the Software. 19 | * 20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 23 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 24 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 25 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 26 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | #ifndef SEND_WRITE_PROPERTY_MULTIPLE_H 29 | #define SEND_WRITE_PROPERTY_MULTIPLE_H 30 | 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include "bacnet/bacnet_stack_exports.h" 36 | #include "bacnet/bacapp.h" 37 | #include "bacnet/bacdef.h" 38 | #include "bacnet/bacenum.h" 39 | #include "bacnet/apdu.h" 40 | #include "bacnet/wpm.h" 41 | 42 | #ifdef __cplusplus_disable 43 | extern "C" { 44 | #endif /* __cplusplus_disable */ 45 | 46 | BACNET_STACK_EXPORT 47 | uint8_t Send_Write_Property_Multiple_Request( 48 | uint8_t * pdu, 49 | uint16_t max_pdu, 50 | uint32_t device_id, 51 | BACNET_WRITE_ACCESS_DATA * write_access_data); 52 | 53 | #ifdef __cplusplus_disable 54 | } 55 | #endif /* __cplusplus_disable */ 56 | #endif 57 | -------------------------------------------------------------------------------- /src/bacnet/basic/sys/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB basicsyssources *.c) 2 | 3 | add_library(basicsys ${basicsyssources}) 4 | 5 | # state that anybody linking to us needs to include the current source dir 6 | # includes, while we don't. 7 | target_include_directories(basicsys 8 | INTERFACE ${CMAKE_CURRENT_SOURCE_DIR} 9 | PRIVATE ${PROJECT_BINARY_DIR} 10 | PRIVATE ${CMAKE_BINARY_DIR} 11 | PRIVATE ${CMAKE_SOURCE_DIR} 12 | PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../../../../libs/bacnet/src/ 13 | PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../../../../libs/bacnet/src/eLib/osLayer/linux 14 | ) 15 | -------------------------------------------------------------------------------- /src/bacnet/basic/sys/bigend.c: -------------------------------------------------------------------------------- 1 | /* Derived from "Unix Incompatibility Notes: Byte Order" by Jan Wolter */ 2 | /* http://unixpapa.com/incnote/byteorder.html */ 3 | 4 | /** @file bigend.c Determination of Endianess */ 5 | 6 | #include "bigend.h" 7 | 8 | /* Big-Endian systems save the most significant byte first. */ 9 | /* Sun and Motorola processors, IBM-370s and PDP-10s are big-endian. */ 10 | /* "Network Byte Order" is also know as "Big-Endian Byte Order" */ 11 | /* for example, a 4 byte integer 67305985 is 0x04030201 in hexidecimal. */ 12 | /* x[0] = 0x04 */ 13 | /* x[1] = 0x03 */ 14 | /* x[2] = 0x02 */ 15 | /* x[3] = 0x01 */ 16 | 17 | /* Little-Endian systems save the least significant byte first. */ 18 | /* The entire Intel x86 family, Vaxes, Alphas and PDP-11s are little-endian. */ 19 | /* for example, a 4 byte integer 67305985 is 0x04030201 in hexidecimal. */ 20 | /* x[0] = 0x01 */ 21 | /* x[1] = 0x02 */ 22 | /* x[2] = 0x03 */ 23 | /* x[3] = 0x04 */ 24 | 25 | /* Note: Endianness doesn't apply to all variable manipulation. 26 | If you use bitwise or bitshift operations on integers, 27 | you can avoid having to check for endianness. */ 28 | 29 | /* The names are derived from Jonathon Swift's book Gulliver's Travels, 30 | where they describe Lilliputian political parties who disagree 31 | vehemently over which end to start eating an egg from. 32 | This terminology was popularized for byte order by a less than 33 | completely serious paper authored by Danny Cohen which appeared 34 | on April 1, 1980 and was entitled "On Holy Wars and a Plea for Peace" */ 35 | 36 | /* function to return true on Big-Endian architectures */ 37 | /* (based on Harbison & Steele) */ 38 | int big_endian( 39 | void) 40 | { 41 | union { 42 | long l; 43 | char c[sizeof(long)]; 44 | } u; 45 | 46 | u.l = 1; 47 | 48 | return (u.c[sizeof(long) - 1] == 1); 49 | } 50 | -------------------------------------------------------------------------------- /src/bacnet/basic/sys/filename.h: -------------------------------------------------------------------------------- 1 | /************************************************************************** 2 | * 3 | * Copyright (C) 2012 Steve Karg 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining 6 | * a copy of this software and associated documentation files (the 7 | * "Software"), to deal in the Software without restriction, including 8 | * without limitation the rights to use, copy, modify, merge, publish, 9 | * distribute, sublicense, and/or sell copies of the Software, and to 10 | * permit persons to whom the Software is furnished to do so, subject to 11 | * the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included 14 | * in all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 20 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | * 24 | ***************************************************************************************** 25 | * 26 | * Modifications Copyright (C) 2017 BACnet Interoperability Testing Services, Inc. 27 | * 28 | * July 1, 2017 BITS Modifications to this file have been made in compliance 29 | * with original licensing. 30 | * 31 | * This file contains changes made by BACnet Interoperability Testing 32 | * Services, Inc. These changes are subject to the permissions, 33 | * warranty terms and limitations above. 34 | * For more information: info@bac-test.com 35 | * For access to source code: info@bac-test.com 36 | * or www.github.com/bacnettesting/bacnet-stack 37 | * 38 | ****************************************************************************************/ 39 | 40 | #ifndef FILENAME_H 41 | #define FILENAME_H 42 | 43 | const char *filename_remove_path( 44 | const char *filename_in); 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /src/bacnet/basic/sys/mstimer.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * @author Steve Karg 4 | * @date 2009 5 | * @brief Millisecond timer library header file. 6 | * 7 | * @section DESCRIPTION 8 | * 9 | * The mstimer library provides functions for setting, resetting and 10 | * restarting timers, and for checking if a timer has expired. An 11 | * application must "manually" check if its timers have expired; this 12 | * is not done automatically. 13 | * 14 | * A timer is declared as a \c struct \c mstimer and all access to the 15 | * timer is made by a pointer to the declared timer. 16 | * 17 | * Adapted from the Contiki operating system. 18 | * Original Authors: Adam Dunkels , Nicolas Tsiftes 19 | */ 20 | #ifndef MSTIMER_H_ 21 | #define MSTIMER_H_ 22 | 23 | #include "bacnet/bacnet_stack_exports.h" 24 | 25 | /** 26 | * A timer. 27 | * 28 | * This structure is used for declaring a timer. The timer must be set 29 | * with mstimer_set() before it can be used. 30 | * 31 | * \hideinitializer 32 | */ 33 | struct mstimer { 34 | unsigned long start; 35 | unsigned long interval; 36 | }; 37 | 38 | typedef void (*mstimer_callback_function) (void); 39 | /* callback data structure */ 40 | struct mstimer_callback_data_t; 41 | struct mstimer_callback_data_t { 42 | struct mstimer timer; 43 | mstimer_callback_function callback; 44 | struct mstimer_callback_data_t *next; 45 | }; 46 | 47 | #ifdef __cplusplus_disable 48 | extern "C" { 49 | #endif /* __cplusplus_disable */ 50 | 51 | BACNET_STACK_EXPORT 52 | void mstimer_set(struct mstimer *t, unsigned long interval); 53 | BACNET_STACK_EXPORT 54 | void mstimer_reset(struct mstimer *t); 55 | BACNET_STACK_EXPORT 56 | void mstimer_restart(struct mstimer *t); 57 | BACNET_STACK_EXPORT 58 | int mstimer_expired(struct mstimer *t); 59 | BACNET_STACK_EXPORT 60 | unsigned long mstimer_remaining(struct mstimer *t); 61 | BACNET_STACK_EXPORT 62 | unsigned long mstimer_elapsed(struct mstimer *t); 63 | BACNET_STACK_EXPORT 64 | unsigned long mstimer_interval(struct mstimer *t); 65 | /* HAL implementation */ 66 | BACNET_STACK_EXPORT 67 | unsigned long mstimer_now(void); 68 | BACNET_STACK_EXPORT 69 | void mstimer_callback( 70 | struct mstimer_callback_data_t *cb, 71 | mstimer_callback_function callback, 72 | unsigned long milliseconds); 73 | BACNET_STACK_EXPORT 74 | void mstimer_init(void); 75 | 76 | #ifdef __cplusplus_disable 77 | } 78 | #endif /* __cplusplus_disable */ 79 | #endif 80 | -------------------------------------------------------------------------------- /src/bacnet/basic/tsm/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB basictsmsources *.c) 2 | 3 | add_library(basictsm ${basictsmsources}) 4 | 5 | # state that anybody linking to us needs to include the current source dir 6 | # includes, while we don't. 7 | target_include_directories(basictsm 8 | INTERFACE ${CMAKE_CURRENT_SOURCE_DIR} 9 | PRIVATE ${PROJECT_BINARY_DIR} 10 | PRIVATE ${CMAKE_BINARY_DIR} 11 | PRIVATE ${CMAKE_SOURCE_DIR} 12 | PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../../../../libs/bacnet/src/ 13 | PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../../../../libs/bacnet/src/eLib/osLayer/linux 14 | ) 15 | -------------------------------------------------------------------------------- /src/bacnet/bits.h: -------------------------------------------------------------------------------- 1 | /************************************************************************** 2 | * 3 | * Copyright (C) 2012 Steve Karg 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining 6 | * a copy of this software and associated documentation files (the 7 | * "Software"), to deal in the Software without restriction, including 8 | * without limitation the rights to use, copy, modify, merge, publish, 9 | * distribute, sublicense, and/or sell copies of the Software, and to 10 | * permit persons to whom the Software is furnished to do so, subject to 11 | * the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included 14 | * in all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 20 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | *********************************************************************/ 24 | #ifndef BITS_H 25 | #define BITS_H 26 | 27 | /******************************************************************** 28 | * Bit Masks 29 | *********************************************************************/ 30 | #ifndef BIT 31 | #define BIT(x) (1<<(x)) 32 | #endif 33 | #ifndef _BV 34 | #define _BV(x) (1<<(x)) 35 | #endif 36 | 37 | /* a=register, b=bit number to act upon 0-n */ 38 | #ifndef BIT_SET 39 | #define BIT_SET(a,b) ((a) |= (1<<(b))) 40 | #endif 41 | #ifndef BIT_CLEAR 42 | #define BIT_CLEAR(a,b) ((a) &= ~(1<<(b))) 43 | #endif 44 | #ifndef BIT_FLIP 45 | #define BIT_FLIP(a,b) ((a) ^= (1<<(b))) 46 | #endif 47 | #ifndef BIT_CHECK 48 | #define BIT_CHECK(a,b) ((a) & (1<<(b))) 49 | #endif 50 | 51 | /* x=target variable, y=mask */ 52 | #ifndef BITMASK_SET 53 | #define BITMASK_SET(x,y) ((x) |= (y)) 54 | #endif 55 | #ifndef BITMASK_CLEAR 56 | #define BITMASK_CLEAR(x,y) ((x) &= (~(y))) 57 | #endif 58 | #ifndef BITMASK_FLIP 59 | #define BITMASK_FLIP(x,y) ((x) ^= (y)) 60 | #endif 61 | #ifndef BITMASK_CHECK 62 | #define BITMASK_CHECK(x,y) (((x) & (y)) == (y)) 63 | #endif 64 | 65 | #endif 66 | -------------------------------------------------------------------------------- /src/bacnet/bits/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(bitsRouter) 2 | #add_subdirectory(ipc) 3 | add_subdirectory(util) -------------------------------------------------------------------------------- /src/bacnet/bits/bitsRouter/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB bitsroutersources *.c) 2 | 3 | add_library(bitsrouter ${bitsroutersources}) 4 | 5 | # state that anybody linking to us needs to include the current source dir 6 | # includes, while we don't. 7 | target_include_directories(bitsrouter 8 | INTERFACE ${CMAKE_CURRENT_SOURCE_DIR} 9 | PRIVATE ${PROJECT_BINARY_DIR} 10 | PRIVATE ${CMAKE_BINARY_DIR} 11 | PRIVATE ${CMAKE_SOURCE_DIR} 12 | PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../../../../libs/bacnet/src/ 13 | PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../../../../libs/bacnet/src/eLib/osLayer/linux 14 | ) 15 | -------------------------------------------------------------------------------- /src/bacnet/bits/ipc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(udp) -------------------------------------------------------------------------------- /src/bacnet/bits/ipc/ipcBACnetSide.h: -------------------------------------------------------------------------------- 1 | /************************************************************************** 2 | * 3 | * Copyright (C) 2018 BACnet Interoperability Testing Services, Inc. 4 | * 5 | * 6 | * 7 | * Permission is hereby granted, to whom a copy of this software and 8 | * associated documentation files (the "Software") is provided by BACnet 9 | * Interoperability Testing Services, Inc., to deal in the Software 10 | * without restriction, including without limitation the rights to use, 11 | * copy, modify, merge, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included 14 | * in all copies or substantial portions of the Software. 15 | * 16 | * The software is provided on a non-exclusive basis. 17 | * 18 | * The permission is provided in perpetuity. 19 | * 20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 23 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 24 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 25 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 26 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | * 28 | *********************************************************************/ 29 | 30 | #pragma once 31 | 32 | // #include "ipcCommon.h" 33 | #include "appApi.h" 34 | #include "bacenum.h" 35 | 36 | void ipc_callBackAnaUpdate(uint deviceID, BACNET_OBJECT_TYPE objType, uint objInstance, BACNET_PROPERTY_ID propId, float val); 37 | void ipc_callBackBinUpdate(uint deviceID, BACNET_OBJECT_TYPE objType, uint objInstance, BACNET_PROPERTY_ID propId, bool val); 38 | void ipc_callBackDeviceUpdate(uint deviceID, bool online); 39 | 40 | bool ipc_init_BACnet(void); 41 | // in appApi.h void Create_Object(const uint devInstance, const BACNET_OBJECT_TYPE objType, const uint objInstance, const char *name, const char *description); 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /src/bacnet/bits/ipc/udp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB ipcudpsources *.c) 2 | 3 | add_library(ipcudp ${ipcudpsources}) 4 | 5 | # state that anybody linking to us needs to include the current source dir 6 | # includes, while we don't. 7 | target_include_directories(ipcudp 8 | INTERFACE ${CMAKE_CURRENT_SOURCE_DIR} 9 | PRIVATE ${PROJECT_BINARY_DIR} 10 | PRIVATE ${CMAKE_BINARY_DIR} 11 | PRIVATE ${CMAKE_SOURCE_DIR} 12 | PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../../../../../libs/bacnet/src/ 13 | PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../../../../../libs/bacnet/src/eLib/osLayer/linux 14 | ) 15 | 16 | add_subdirectory(demo) -------------------------------------------------------------------------------- /src/bacnet/bits/ipc/udp/demo/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB ipcudpdemosources *.c) 2 | 3 | add_library(ipcudpdemo ${ipcudpdemosources}) 4 | 5 | # state that anybody linking to us needs to include the current source dir 6 | # includes, while we don't. 7 | target_include_directories(ipcudpdemo 8 | INTERFACE ${CMAKE_CURRENT_SOURCE_DIR} 9 | PRIVATE ${CMAKE_BINARY_DIR} 10 | PRIVATE ${CMAKE_SOURCE_DIR} 11 | PRIVATE ${CMAKE_SOURCE_DIR}/libs/bacnet/src/ 12 | PRIVATE ${CMAKE_SOURCE_DIR}/libs/bacnet/src/eLib/osLayer/linux 13 | ) 14 | 15 | -------------------------------------------------------------------------------- /src/bacnet/bits/ipc/udp/ipcBACnetSide.h: -------------------------------------------------------------------------------- 1 | /************************************************************************** 2 | * 3 | * Copyright (C) 2018 BACnet Interoperability Testing Services, Inc. 4 | * 5 | * 6 | * 7 | * Permission is hereby granted, to whom a copy of this software and 8 | * associated documentation files (the "Software") is provided by BACnet 9 | * Interoperability Testing Services, Inc., to deal in the Software 10 | * without restriction, including without limitation the rights to use, 11 | * copy, modify, merge, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included 14 | * in all copies or substantial portions of the Software. 15 | * 16 | * The software is provided on a non-exclusive basis. 17 | * 18 | * The permission is provided in perpetuity. 19 | * 20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 23 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 24 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 25 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 26 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | * 28 | *********************************************************************/ 29 | 30 | #pragma once 31 | 32 | #include "ipcCommon.h" 33 | #include "appApi.h" 34 | 35 | void ipc_callBackAnaUpdate(uint deviceID, IPC_OBJECT_TYPE objType, uint objInstance, IPC_PROPERTY_ID propId, float val); 36 | void ipc_callBackBinUpdate(uint deviceID, IPC_OBJECT_TYPE objType, uint objInstance, IPC_PROPERTY_ID propId, bool val); 37 | void ipc_callBackDeviceUpdate(uint deviceID, bool online); 38 | 39 | bool ipc_init_BACnet(void); 40 | void Create_Object(const uint devInstance, const IPC_OBJECT_TYPE objType, const uint objInstance, const char *name, const char *description); 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /src/bacnet/bits/ipc/udp/ipcHandlers.c: -------------------------------------------------------------------------------- 1 | /************************************************************************** 2 | * 3 | * Copyright (C) 2018 BACnet Interoperability Testing Services, Inc. 4 | * 5 | * 6 | * 7 | * Permission is hereby granted, to whom a copy of this software and 8 | * associated documentation files (the "Software") is provided by BACnet 9 | * Interoperability Testing Services, Inc., to deal in the Software 10 | * without restriction, including without limitation the rights to use, 11 | * copy, modify, merge, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included 14 | * in all copies or substantial portions of the Software. 15 | * 16 | * The software is provided on a non-exclusive basis. 17 | * 18 | * The permission is provided in perpetuity. 19 | * 20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 23 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 24 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 25 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 26 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | * 28 | *********************************************************************/ 29 | 30 | #include 31 | #include "ipcBACnetSide.h" 32 | 33 | extern bool showIPCtraffic; 34 | 35 | // This function handles any update events coming from David's VSC program 36 | void ipc_callBackStatus(uint device, bool status) 37 | { 38 | device = device; // keep compiler happy 39 | status = status; // keep compiler happy 40 | } 41 | 42 | // This function handles any update events coming the application 43 | void ipc_callBackAnaUpdate(uint deviceID, IPC_OBJECT_TYPE objType, uint objInstance, IPC_PROPERTY_ID propId, float val) 44 | { 45 | 46 | /// stuff 47 | // todo 2 panic(); 48 | 49 | } 50 | 51 | 52 | // This function handles any update events coming from BACnet driver to this test program 53 | void ipc_callBackBinUpdate(uint deviceID, IPC_OBJECT_TYPE objType, uint objInstance, IPC_PROPERTY_ID propId, bool val) 54 | { 55 | } 56 | 57 | 58 | void ipc_callBackDeviceUpdate(uint deviceInstance, bool online) 59 | { 60 | } 61 | -------------------------------------------------------------------------------- /src/bacnet/bits/ipc/udp/ipcSocket.h: -------------------------------------------------------------------------------- 1 | /************************************************************************** 2 | * 3 | * Copyright (C) 2018 BACnet Interoperability Testing Services, Inc. 4 | * 5 | * 6 | * 7 | * Permission is hereby granted, to whom a copy of this software and 8 | * associated documentation files (the "Software") is provided by BACnet 9 | * Interoperability Testing Services, Inc., to deal in the Software 10 | * without restriction, including without limitation the rights to use, 11 | * copy, modify, merge, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included 14 | * in all copies or substantial portions of the Software. 15 | * 16 | * The software is provided on a non-exclusive basis. 17 | * 18 | * The permission is provided in perpetuity. 19 | * 20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 23 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 24 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 25 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 26 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | * 28 | *********************************************************************/ 29 | 30 | #pragma once 31 | 32 | #include 33 | #include 34 | 35 | #define MAX_IPC_PDU 800 36 | 37 | // Initialise BACnet Stack UDP IPC subsystem 38 | 39 | typedef enum 40 | { 41 | IPCF_PING 42 | } IPC_FUNC ; 43 | 44 | typedef struct 45 | { 46 | IPC_FUNC func; 47 | union 48 | { 49 | uint8_t rawBytes[100]; 50 | }; 51 | } IPC_PAYLOAD ; 52 | 53 | 54 | void ipcSocketInit(void); 55 | void ipcSocketSend(IPC_FUNC func); 56 | bool ipcSocketRecv(IPC_PAYLOAD *payload); 57 | -------------------------------------------------------------------------------- /src/bacnet/bits/ipc/udp/ipcSocketClient.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BACnetTesting/BACnet-Stack/da241f4784a4690f0a3ece3a9c696af76fcdb274/src/bacnet/bits/ipc/udp/ipcSocketClient.c -------------------------------------------------------------------------------- /src/bacnet/bits/util/BACnetObjectCalendar.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************** 2 | * 3 | * Copyright (C) 2018 BACnet Interoperability Testing Services, Inc. 4 | * 5 | * This program is free software : you can redistribute it and/or modify 6 | * it under the terms of the GNU Lesser General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the 13 | * GNU Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public License 16 | * along with this program.If not, see . 17 | * 18 | * For more information : info@bac-test.com 19 | * 20 | * For access to source code : 21 | * 22 | * info@bac-test.com 23 | * or 24 | * www.github.com/bacnettesting/bacnet-stack 25 | * 26 | ****************************************************************************************/ 27 | 28 | #ifndef BACNETOBJECTCALENDAR_H_ 29 | #define BACNETOBJECTCALENDAR_H_ 30 | 31 | // todo ekh 3 32 | // obsolete file. Delete from "Full Routing" model (but leave in "Full Routing C++") 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /src/bacnet/bits/util/BACnetObjectSchedule.h: -------------------------------------------------------------------------------- 1 | /************************************************************************** 2 | * 3 | * Copyright (C) 2017 BACnet Interoperability Testing Services, Inc. 4 | * 5 | * Dec 3, 2011 BITS Modifications to this file have been made in compliance 6 | * to original licensing. 7 | * 8 | * This file contains changes made by BACnet Interoperability Testing 9 | * Services, Inc. These changes are subject to the permissions, 10 | * warranty terms and limitations above. 11 | * For more information: info@bac-test.com 12 | * For access to source code: info@bac-test.com 13 | * or www.github.com/bacnettesting/bacnet-stack 14 | * 15 | * Permission is hereby granted, to whom a copy of this software and 16 | * associated documentation files (the "Software") is provided 17 | * to deal in the Software without restriction, including 18 | * without limitation the rights to use, copy, modify, merge, subject to 19 | * the following conditions: 20 | * 21 | * The above copyright notice and this permission notice shall be included 22 | * in all copies or substantial portions of the Software. 23 | * 24 | * The software is provided on a non-exclusive basis. 25 | * 26 | * The permission is provided in perpetuity. 27 | * 28 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 29 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 30 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 31 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 32 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 33 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 34 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 35 | * 36 | * 37 | *********************************************************************/ 38 | 39 | #error - this file is obsolete, delete it! 40 | 41 | #ifndef BACNETOBJECTSCHEDULE_H_ 42 | #define BACNETOBJECTSCHEDULE_H_ 43 | 44 | #include "bacnet/bacenum.h" 45 | #include "schedule.h" 46 | #include "bacnet/bacdef.h" 47 | #include "bacdevobjpropref.h" 48 | 49 | #define MX_DAYS 7 50 | 51 | #define MX_SPECIAL_EVENTS 4 52 | #define BACNET_SCHEDULE_OBJ_PROP_REF_SIZE 10 53 | 54 | 55 | #endif 56 | 57 | -------------------------------------------------------------------------------- /src/bacnet/bits/util/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB bitsutilsources *.c) 2 | 3 | add_library(bitsutil ${bitsutilsources}) 4 | 5 | # state that anybody linking to us needs to include the current source dir 6 | # includes, while we don't. 7 | target_include_directories(bitsutil 8 | INTERFACE ${CMAKE_CURRENT_SOURCE_DIR} 9 | PRIVATE ${PROJECT_BINARY_DIR} 10 | PRIVATE ${CMAKE_BINARY_DIR} 11 | PRIVATE ${CMAKE_SOURCE_DIR} 12 | PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../../../../libs/bacnet/src/ 13 | PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../../../../libs/bacnet/src/eLib/osLayer/linux 14 | ) 15 | -------------------------------------------------------------------------------- /src/bacnet/bits/util/bacversion.h: -------------------------------------------------------------------------------- 1 | // Obsolete, version.h conflicts with Microsoft library 2 | // 3 | // Change your source to include "bacversion.h", one day this file will be deleted from this project 4 | 5 | 6 | // #include "bacversion.h" 7 | #define BACNET_VERSION_TEXT "0.0.0.1" 8 | 9 | 10 | // now defined in bacversion.h #define BACNET_VERSION_TEXT "0.0" 11 | -------------------------------------------------------------------------------- /src/bacnet/bits/util/bitsDatalink.c: -------------------------------------------------------------------------------- 1 | /**************************************************************************************** 2 | * 3 | * Copyright (C) 2016 BACnet Interoperability Testing Services, Inc. 4 | * 5 | * This program is free software : you can redistribute it and/or modify 6 | * it under the terms of the GNU Lesser General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the 13 | * GNU Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public License 16 | * along with this program.If not, see . 17 | * 18 | * For more information : info@bac-test.com 19 | * 20 | * For access to source code : 21 | * 22 | * info@bac-test.com 23 | * or 24 | * www.github.com/bacnettesting/bacnet-stack 25 | * 26 | ****************************************************************************************/ 27 | 28 | #error - obsolete 0 use multipleDatalink.c 29 | 30 | -------------------------------------------------------------------------------- /src/bacnet/bits/util/bitsDatalink.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************** 2 | * 3 | * Copyright (C) 2018 BACnet Interoperability Testing Services, Inc. 4 | 5 | This program is free software : you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with this program.If not, see . 17 | 18 | As a special exception, if other files instantiate templates or 19 | use macros or inline functions from this file, or you compile 20 | this file and link it with other works to produce a work based 21 | on this file, this file does not by itself cause the resulting 22 | work to be covered by the GNU General Public License. However 23 | the source code for this file must still be made available in 24 | accordance with section (3) of the GNU General Public License. 25 | 26 | * July 1, 2017 BITS Modifications to this file have been made in compliance 27 | * with original licensing. 28 | * 29 | * This file contains changes made by BACnet Interoperability Testing 30 | * Services, Inc. These changes are subject to the permissions, 31 | * warranty terms and limitations above. 32 | * For more information: info@bac-test.com 33 | * For access to source code: info@bac-test.com 34 | * or www.github.com/bacnettesting/bacnet-stack 35 | * 36 | ****************************************************************************************/ 37 | 38 | #error - Not relevant for routing application. Delete this file. 39 | 40 | -------------------------------------------------------------------------------- /src/bacnet/bits/util/configProjDefault.h: -------------------------------------------------------------------------------- 1 | /************************************************************************** 2 | * 3 | * Copyright (C) 2017 BACnet Interoperability Testing Services, Inc. 4 | * 5 | * July 1, 2017 BITS Modifications to this file have been made in compliance 6 | * with original licensing. 7 | * 8 | * This file contains changes made by BACnet Interoperability Testing 9 | * Services, Inc. These changes are subject to the permissions, 10 | * warranty terms and limitations above. 11 | * For more information: info@bac-test.com 12 | * For access to source code: info@bac-test.com 13 | * or www.github.com/bacnettesting/bacnet-stack 14 | * 15 | ****************************************************************************************/ 16 | 17 | #ifdef CONFIG_H 18 | #error - We have a problem. Please see my notes in config.h 19 | #endif 20 | 21 | #include "osLayer.h" 22 | 23 | #ifndef CONFIG_PROJECT_DEFAULT_H 24 | #define CONFIG_PROJECT_DEFAULT_H 25 | 26 | #ifndef BACNET_USE_COMMANDABLE_VALUE_OBJECTS 27 | #define BACNET_USE_COMMANDABLE_VALUE_OBJECTS 1 28 | #endif 29 | 30 | #ifndef BACNET_USE_MAX_MIN_RESOLUTION_PRESENT_VALUE 31 | #define BACNET_USE_MAX_MIN_RESOLUTION_PRESENT_VALUE 1 32 | #endif 33 | 34 | 35 | #endif 36 | 37 | -------------------------------------------------------------------------------- /src/bacnet/bits/util/menuDiags.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************** 2 | * 3 | * Copyright (C) 2018 BACnet Interoperability Testing Services, Inc. 4 | * 5 | * This program is free software : you can redistribute it and/or modify 6 | * it under the terms of the GNU Lesser General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the 13 | * GNU Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public License 16 | * along with this program.If not, see . 17 | * 18 | * For more information : info@bac-test.com 19 | * 20 | * For access to source code : 21 | * 22 | * info@bac-test.com 23 | * or 24 | * www.github.com/bacnettesting/bacnet-stack 25 | * 26 | ****************************************************************************************/ 27 | 28 | #include "configProj.h" 29 | 30 | #pragma once 31 | #include 32 | 33 | typedef struct { 34 | 35 | void (*MenuFunc) (int key); 36 | void (*NextItem) (void); 37 | void (*EnterItem) (void); 38 | void (*ExitMenu) (void); 39 | void (*HelpScreen) (void); 40 | bool (*HandleKey) (int key); 41 | 42 | int keyOnEnter; 43 | } ACTIVE_MENU ; 44 | 45 | 46 | #if (BACNET_CLIENT == 1) 47 | void dm_ClientDevice_Setup( int keyOnEnter ); 48 | void dm_PollRecord_Setup(int keyOnEnter); 49 | #endif 50 | 51 | void dm_ServerDevice_Setup(int keyOnEnter); 52 | void dm_Datalink_Setup(int keyOnEnter); 53 | 54 | #if (BITS_ROUTER_LAYER == 1) 55 | void dm_RouterPort_Setup(int keyOnEnter); 56 | void ShowRouterPorts(void); 57 | #endif -------------------------------------------------------------------------------- /src/bacnet/bits/util/objectModel.h: -------------------------------------------------------------------------------- 1 | /************************************************************************** 2 | * 3 | * Copyright (C) 2016 Bacnet Interoperability Testing Services, Inc. 4 | * 5 | * 6 | * 7 | * Permission is hereby granted, to whom a copy of this software and 8 | * associated documentation files (the "Software") is provided by BACnet 9 | * Interoperability Testing Services, Inc., to deal in the Software 10 | * without restriction, including without limitation the rights to use, 11 | * copy, modify, merge, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included 14 | * in all copies or substantial portions of the Software. 15 | * 16 | * The software is provided on a non-exclusive basis. 17 | * 18 | * The permission is provided in perpetuity. 19 | * 20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 23 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 24 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 25 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 26 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | * 28 | *********************************************************************/ 29 | 30 | #pragma once 31 | 32 | #include 33 | #include "bacnet/bacenum.h" 34 | #include "bacnet/basic/object/device.h" 35 | 36 | #if 0 37 | void BACnet_Create_Object( 38 | const uint32_t deviceInstance, 39 | const BACNET_OBJECT_TYPE objectType, 40 | const uint32_t objectInstance, 41 | const char *name, 42 | const char *description, 43 | const BACNET_ENGINEERING_UNITS units); 44 | #endif 45 | 46 | bool MultiState_Input_Create( 47 | DEVICE_OBJECT_DATA *pDev, 48 | const uint32_t instance, 49 | const char* name, 50 | const void *userObjectData 51 | ); 52 | 53 | bool Analog_Input_Create( 54 | DEVICE_OBJECT_DATA *pDev, 55 | const uint32_t instance, 56 | const char *name, 57 | const BACNET_ENGINEERING_UNITS units, 58 | const void *userObjectData 59 | ); -------------------------------------------------------------------------------- /src/bacnet/bits/util/threadSupport.c: -------------------------------------------------------------------------------- 1 | /************************************************************************** 2 | 3 | Copyright (C) 2018 BACnet Interoperability Testing Services, Inc. 4 | 5 | This program is free software : you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with this program.If not, see . 17 | 18 | For more information : info@bac-test.com 19 | For access to source code : info@bac-test.com 20 | or www.github.com/bacnettesting/bacnet-stack 21 | 22 | *********************************************************************/ 23 | 24 | /* 25 | 26 | Of threads, queues and sockets. 27 | 28 | Smarter people than me (*1) have said that a Berkeley socket should be treated as a shared resource 29 | and BACnet has to use the same socket for receiving as well as sending. Thus this socket either 30 | has to be protected by a locking mechanism of some sort, else the socket should only be used in 31 | a single thread. 32 | 33 | And we SHOULD NOT recv() on a socket and elsewhere use it to send() ! 34 | 35 | Furthermore, other smart people have stated that a queue mechanism is MUCH higher performance 36 | than mutexs, critical sections, etc... 37 | 38 | And of course, in smaller processors, if they don't use threads, probably implement the IO using 39 | interrupts, which make the above additionally relevant. 40 | 41 | Also, with interfaces hot-plugging, going down, coming up, retrying (think Lon, USB, WiFi) 42 | the adapter state may be ever changing, requiring at least a little buffering before sending. 43 | 44 | Too, splitting datalinks across processors (think Co-Processors) adds a disconnect. 45 | 46 | The disconnect between high speed (multiple gigabit ethernet to multiple RS485 MSTP) adds 47 | a queue monitoring and management issue. 48 | 49 | So rather than avoiding queues between datalink and app, I have chosen to embrace them. Fully. So be it. 50 | 51 | Ed. 52 | 53 | */ 54 | 55 | -------------------------------------------------------------------------------- /src/bacnet/bits/util/tokenize.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************** 2 | * 3 | * Copyright (C) 2018 BACnet Interoperability Testing Services, Inc. 4 | * 5 | * This program is free software : you can redistribute it and/or modify 6 | * it under the terms of the GNU Lesser General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the 13 | * GNU Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public License 16 | * along with this program.If not, see . 17 | * 18 | * For more information : info@bac-test.com 19 | * 20 | * For access to source code : 21 | * 22 | * info@bac-test.com 23 | * or 24 | * www.github.com/bacnettesting/bacnet-stack 25 | * 26 | ****************************************************************************************/ 27 | 28 | # pragma once 29 | 30 | #include "osLayer.h" 31 | 32 | #error - remove this file - tokenize now in bitsUtil.h 33 | 34 | // line will be modified (with 0) to create a list of tokens. 35 | // char **Tokenize(char *line, int *outCount); 36 | 37 | 38 | -------------------------------------------------------------------------------- /src/bacnet/bytes.h: -------------------------------------------------------------------------------- 1 | /************************************************************************** 2 | * 3 | * Copyright (C) 2012 Steve Karg 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining 6 | * a copy of this software and associated documentation files (the 7 | * "Software"), to deal in the Software without restriction, including 8 | * without limitation the rights to use, copy, modify, merge, publish, 9 | * distribute, sublicense, and/or sell copies of the Software, and to 10 | * permit persons to whom the Software is furnished to do so, subject to 11 | * the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included 14 | * in all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 20 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | *********************************************************************/ 24 | #ifndef BYTES_H 25 | #define BYTES_H 26 | 27 | /* Defines the bit/byte/word/long conversions that are used in code */ 28 | 29 | #include 30 | 31 | #ifndef LO_NIB 32 | #define LO_NIB(b) ((b) & 0xF) 33 | #endif 34 | 35 | #ifndef HI_NIB 36 | #define HI_NIB(b) ((b) >> 4) 37 | 38 | #endif 39 | 40 | 41 | 42 | #ifndef LO_BYTE 43 | 44 | #define LO_BYTE(w) ((uint8_t)(w)) 45 | 46 | #endif 47 | 48 | 49 | 50 | #ifndef HI_BYTE 51 | 52 | #define HI_BYTE(w) ((uint8_t)((uint16_t)(w) >> 8)) 53 | 54 | #endif 55 | 56 | 57 | 58 | #ifndef LO_WORD 59 | 60 | #define LO_WORD(x) ((uint16_t)(x)) 61 | 62 | #endif 63 | 64 | 65 | 66 | #ifndef HI_WORD 67 | 68 | #define HI_WORD(x) ((uint16_t)((uint32_t)(x) >> 16)) 69 | 70 | #endif 71 | 72 | 73 | 74 | #ifndef MAKE_WORD 75 | 76 | #define MAKE_WORD(lo,hi) \ 77 | ((uint16_t)(((uint8_t)(lo))|(((uint16_t)((uint8_t)(hi)))<<8))) 78 | 79 | #endif 80 | 81 | 82 | 83 | #ifndef MAKE_LONG 84 | 85 | #define MAKE_LONG(lo,hi) \ 86 | ((uint32_t)(((uint16_t)(lo))|(((uint32_t)((uint16_t)(hi)))<<16))) 87 | 88 | #endif 89 | 90 | 91 | 92 | #endif /* end of header file */ 93 | -------------------------------------------------------------------------------- /src/bacnet/config.h: -------------------------------------------------------------------------------- 1 | /************************************************************************** 2 | * 3 | * Copyright (C) 2004 Steve Karg 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining 6 | * a copy of this software and associated documentation files (the 7 | * "Software"), to deal in the Software without restriction, including 8 | * without limitation the rights to use, copy, modify, merge, publish, 9 | * distribute, sublicense, and/or sell copies of the Software, and to 10 | * permit persons to whom the Software is furnished to do so, subject to 11 | * the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included 14 | * in all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 20 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | * 24 | *********************************************************************/ 25 | 26 | // BITS does not use Steve's global "config.h". We use a local "configProj.h" 27 | // which allows the application to be compiled differently on a case-by-case basis 28 | // (project-by-project). Include a configProj.h in your project directory 29 | // and then make sure that this project directory is first in your include list 30 | 31 | #include "configProj.h" 32 | -------------------------------------------------------------------------------- /src/bacnet/credential_authentication_factor.h: -------------------------------------------------------------------------------- 1 | /************************************************************************** 2 | * 3 | * Copyright (C) 2015 Nikola Jelic 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining 6 | * a copy of this software and associated documentation files (the 7 | * "Software"), to deal in the Software without restriction, including 8 | * without limitation the rights to use, copy, modify, merge, publish, 9 | * distribute, sublicense, and/or sell copies of the Software, and to 10 | * permit persons to whom the Software is furnished to do so, subject to 11 | * the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included 14 | * in all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 20 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | * 24 | *********************************************************************/ 25 | 26 | #ifndef BACNET_CREDENTIAL_AUTHENTICATION_FACTOR_H 27 | #define BACNET_CREDENTIAL_AUTHENTICATION_FACTOR_H 28 | 29 | #include 30 | #include 31 | #include "bacnet/bacdef.h" 32 | #include "bacapp.h" 33 | #include "authentication_factor.h" 34 | 35 | typedef struct { 36 | BACNET_ACCESS_AUTHENTICATION_FACTOR_DISABLE disable; 37 | BACNET_AUTHENTICATION_FACTOR authentication_factor; 38 | } BACNET_CREDENTIAL_AUTHENTICATION_FACTOR; 39 | 40 | 41 | 42 | int bacapp_encode_credential_authentication_factor( 43 | uint8_t * apdu, 44 | BACNET_CREDENTIAL_AUTHENTICATION_FACTOR * caf); 45 | int bacapp_encode_context_credential_authentication_factor( 46 | uint8_t * apdu, 47 | uint8_t tag, 48 | BACNET_CREDENTIAL_AUTHENTICATION_FACTOR * caf); 49 | int bacapp_decode_credential_authentication_factor( 50 | uint8_t * apdu, 51 | BACNET_CREDENTIAL_AUTHENTICATION_FACTOR * caf); 52 | int bacapp_decode_context_credential_authentication_factor( 53 | uint8_t * apdu, 54 | uint8_t tag, 55 | BACNET_CREDENTIAL_AUTHENTICATION_FACTOR * caf); 56 | 57 | #endif 58 | -------------------------------------------------------------------------------- /src/bacnet/datalink/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB datalinksources *.c) 2 | 3 | add_library(datalink ${datalinksources}) 4 | 5 | # state that anybody linking to us needs to include the current source dir 6 | # includes, while we don't. 7 | target_include_directories(datalink 8 | INTERFACE ${CMAKE_CURRENT_SOURCE_DIR} 9 | PRIVATE ${PROJECT_BINARY_DIR} 10 | PRIVATE ${CMAKE_BINARY_DIR} 11 | PRIVATE ${CMAKE_SOURCE_DIR} 12 | PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../../../libs/bacnet/src/ 13 | PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../../../libs/bacnet/src/eLib/osLayer/linux 14 | ) 15 | -------------------------------------------------------------------------------- /src/bacnet/datalink/crc.h: -------------------------------------------------------------------------------- 1 | /************************************************************************** 2 | * 3 | * Copyright (C) 2012 Steve Karg 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining 6 | * a copy of this software and associated documentation files (the 7 | * "Software"), to deal in the Software without restriction, including 8 | * without limitation the rights to use, copy, modify, merge, publish, 9 | * distribute, sublicense, and/or sell copies of the Software, and to 10 | * permit persons to whom the Software is furnished to do so, subject to 11 | * the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included 14 | * in all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 20 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | * 24 | ***************************************************************************************** 25 | * 26 | * Modifications Copyright (C) 2017 BACnet Interoperability Testing Services, Inc. 27 | * 28 | * July 1, 2017 BITS Modifications to this file have been made in compliance 29 | * with original licensing. 30 | * 31 | * This file contains changes made by BACnet Interoperability Testing 32 | * Services, Inc. These changes are subject to the permissions, 33 | * warranty terms and limitations above. 34 | * For more information: info@bac-test.com 35 | * For access to source code: info@bac-test.com 36 | * or www.github.com/bacnettesting/bacnet-stack 37 | * 38 | ****************************************************************************************/ 39 | 40 | #ifndef CRC_H 41 | #define CRC_H 42 | 43 | #include 44 | #include 45 | 46 | uint8_t CRC_Calc_Header( 47 | uint8_t dataValue, 48 | uint8_t crcValue); 49 | 50 | uint16_t CRC_Calc_Data( 51 | uint8_t dataValue, 52 | uint16_t crcValue); 53 | 54 | #endif 55 | -------------------------------------------------------------------------------- /src/bacnet/datalink/mstptext.h: -------------------------------------------------------------------------------- 1 | /************************************************************************** 2 | * 3 | * Copyright (C) 2012 Steve Karg 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining 6 | * a copy of this software and associated documentation files (the 7 | * "Software"), to deal in the Software without restriction, including 8 | * without limitation the rights to use, copy, modify, merge, publish, 9 | * distribute, sublicense, and/or sell copies of the Software, and to 10 | * permit persons to whom the Software is furnished to do so, subject to 11 | * the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included 14 | * in all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 20 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | * 24 | ***************************************************************************************** 25 | * 26 | * Modifications Copyright (C) 2017 BACnet Interoperability Testing Services, Inc. 27 | * 28 | * July 1, 2017 BITS Modifications to this file have been made in compliance 29 | * with original licensing. 30 | * 31 | * This file contains changes made by BACnet Interoperability Testing 32 | * Services, Inc. These changes are subject to the permissions, 33 | * warranty terms and limitations above. 34 | * For more information: info@bac-test.com 35 | * For access to source code: info@bac-test.com 36 | * or www.github.com/bacnettesting/bacnet-stack 37 | * 38 | ****************************************************************************************/ 39 | 40 | #ifndef MSTPTEXT_H 41 | #define MSTPTEXT_H 42 | 43 | 44 | const char *mstptext_receive_state( 45 | unsigned index); 46 | const char *mstptext_master_state( 47 | unsigned index); 48 | const char *mstptext_frame_type( 49 | unsigned index); 50 | 51 | #endif 52 | -------------------------------------------------------------------------------- /src/bacnet/version.h: -------------------------------------------------------------------------------- 1 | 2 | // 2021-11-06 Obsolete 3 | // 4 | // version.h conflicts with Microsoft library version.h, so renaming in the BACnet stack 5 | // 6 | // 7 | // 8 | // Change your source to include "bacversion.h", one day this file will be deleted from this project 9 | 10 | #include "bacnet/bits/util/bacversion.h" 11 | // now defined in bacversion.h #define BACNET_VERSION_TEXT "0.0" 12 | -------------------------------------------------------------------------------- /src/eLib/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(ipc) 2 | add_subdirectory(osLayer) 3 | add_subdirectory(util) 4 | -------------------------------------------------------------------------------- /src/eLib/board/STMicro/nucleo-f103rb/board485.c: -------------------------------------------------------------------------------- 1 | /**************************************************************************************** 2 | * 3 | * Copyright (C) 2018 BACnet Interoperability Testing Services, Inc. 4 | * 5 | * 6 | * 7 | * This program is free software : you can redistribute it and/or modify 8 | * it under the terms of the GNU Lesser General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the 15 | * GNU Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public License 18 | * along with this program.If not, see . 19 | * 20 | * For more information : info@bac-test.com 21 | * 22 | * For access to source code : 23 | * 24 | * info@bac-test.com 25 | * or 26 | * www.github.com/bacnettesting/bacnet-stack 27 | * 28 | ****************************************************************************************/ 29 | 30 | #include "board485.h" 31 | #include "os485.h" 32 | #include "boardLED.h" 33 | #include "main.h" 34 | 35 | extern UART_HandleTypeDef huart1; 36 | extern UART_HandleTypeDef huart2; 37 | 38 | void board_rs485_init( 39 | RS485_CB *rs485cb, 40 | const char *comport ) 41 | { 42 | switch ( comport[bits_strlen( comport )-1] ) 43 | { 44 | case '1' : 45 | rs485cb->uartHandle = &huart1 ; 46 | break; 47 | 48 | case '2' : 49 | rs485cb->uartHandle = &huart2 ; 50 | break; 51 | 52 | default: 53 | // todo 1 panic(); 54 | rs485cb->uartHandle = NULL ; 55 | break; 56 | } 57 | } 58 | 59 | -------------------------------------------------------------------------------- /src/eLib/board/STMicro/nucleo-f103rb/board485.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************** 2 | * 3 | * Copyright (C) 2018 BACnet Interoperability Testing Services, Inc. 4 | * 5 | * 6 | * 7 | * This program is free software : you can redistribute it and/or modify 8 | * it under the terms of the GNU Lesser General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the 15 | * GNU Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public License 18 | * along with this program.If not, see . 19 | * 20 | * For more information : info@bac-test.com 21 | * 22 | * For access to source code : 23 | * 24 | * info@bac-test.com 25 | * or 26 | * www.github.com/bacnettesting/bacnet-stack 27 | * 28 | ****************************************************************************************/ 29 | 30 | #include "boardLED.h" 31 | 32 | typedef struct { 33 | // BOARD_LED_CB led_cb ; 34 | UART_HandleTypeDef *uartHandle ; 35 | uint32_t baudRate ; 36 | } RS485_CB ; 37 | 38 | //void board_rs485_send( 39 | // RS485_CB *rs485cb, 40 | // uint8_t *buffer ) ; 41 | 42 | void board_rs485_init( 43 | RS485_CB *rs485cb, 44 | const char *comport ) ; 45 | -------------------------------------------------------------------------------- /src/eLib/board/STMicro/nucleo-f429zi/board485.c: -------------------------------------------------------------------------------- 1 | /**************************************************************************************** 2 | * 3 | * Copyright (C) 2018 BACnet Interoperability Testing Services, Inc. 4 | * 5 | * 6 | * 7 | * This program is free software : you can redistribute it and/or modify 8 | * it under the terms of the GNU Lesser General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the 15 | * GNU Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public License 18 | * along with this program.If not, see . 19 | * 20 | * For more information : info@bac-test.com 21 | * 22 | * For access to source code : 23 | * 24 | * info@bac-test.com 25 | * or 26 | * www.github.com/bacnettesting/bacnet-stack 27 | * 28 | ****************************************************************************************/ 29 | 30 | #include "board485.h" 31 | #include "os485.h" 32 | #include "boardLED.h" 33 | #include "main.h" 34 | 35 | extern UART_HandleTypeDef huart2; 36 | // extern UART_HandleTypeDef huart6; 37 | 38 | void board_rs485_init( 39 | RS485_CB *rs485cb, 40 | char *comport ) 41 | { 42 | switch ( comport[bits_strlen( comport )-1] ) 43 | { 44 | case '2' : 45 | rs485cb->uartHandle = &huart2 ; 46 | // bits_board_led_init ( &rs485cb->led_cb, LD3_GPIO_Port, LD3_Pin, 10 ) ; 47 | break; 48 | 49 | case '6' : 50 | // rs485cb->uartHandle = &huart6 ; 51 | // bits_board_led_init ( &rs485cb->led_cb, LD3_GPIO_Port, LD3_Pin, 10 ) ; 52 | break; 53 | 54 | default: 55 | // todo 1 panic(); 56 | rs485cb->uartHandle = NULL ; 57 | break; 58 | } 59 | } 60 | 61 | -------------------------------------------------------------------------------- /src/eLib/board/STMicro/nucleo-f429zi/board485.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************** 2 | * 3 | * Copyright (C) 2018 BACnet Interoperability Testing Services, Inc. 4 | * 5 | * 6 | * 7 | * This program is free software : you can redistribute it and/or modify 8 | * it under the terms of the GNU Lesser General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the 15 | * GNU Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public License 18 | * along with this program.If not, see . 19 | * 20 | * For more information : info@bac-test.com 21 | * 22 | * For access to source code : 23 | * 24 | * info@bac-test.com 25 | * or 26 | * www.github.com/bacnettesting/bacnet-stack 27 | * 28 | ****************************************************************************************/ 29 | 30 | #include "boardLED.h" 31 | 32 | typedef struct { 33 | // BOARD_LED_CB led_cb ; 34 | UART_HandleTypeDef *uartHandle ; 35 | uint32_t baudRate ; 36 | } RS485_CB ; 37 | 38 | //void board_rs485_send( 39 | // RS485_CB *rs485cb, 40 | // uint8_t *buffer ) ; 41 | 42 | void board_rs485_init( 43 | RS485_CB *rs485cb, 44 | char *comport ) ; 45 | -------------------------------------------------------------------------------- /src/eLib/board/STMicro/nucleo-f429zi/scope.c: -------------------------------------------------------------------------------- 1 | /**************************************************************************************** 2 | * 3 | * Copyright (C) 2018 BACnet Interoperability Testing Services, Inc. 4 | * 5 | * 6 | * 7 | * This program is free software : you can redistribute it and/or modify 8 | * it under the terms of the GNU Lesser General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the 15 | * GNU Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public License 18 | * along with this program.If not, see . 19 | * 20 | * For more information : info@bac-test.com 21 | * 22 | * For access to source code : 23 | * 24 | * info@bac-test.com 25 | * or 26 | * www.github.com/bacnettesting/bacnet-stack 27 | * 28 | ****************************************************************************************/ 29 | 30 | #ifdef todo1 31 | #include "stm32f4xx_hal_gpio.h" 32 | #endif 33 | 34 | #include "scope.h" 35 | 36 | void bits_ScopeInit(void) 37 | { 38 | #ifdef todo1 39 | GPIO_InitTypeDef GPIO_InitStruct; 40 | 41 | /*Configure GPIO pin : PC1 */ 42 | GPIO_InitStruct.Pin = GPIO_PIN_1; 43 | GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; 44 | GPIO_InitStruct.Pull = GPIO_NOPULL; 45 | GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; 46 | HAL_GPIO_Init(GPIOC, &GPIO_InitStruct); 47 | #endif 48 | } 49 | 50 | static uint pulsetimerMs; 51 | 52 | void bits_ScopeTrigger(void) 53 | { 54 | pulsetimerMs = 4; 55 | #ifdef todo1 56 | HAL_GPIO_WritePin(GPIOC, GPIO_PIN_1, GPIO_PIN_SET); 57 | #endif 58 | } 59 | 60 | 61 | void bits_ScopeIdle(uint deltaMs) 62 | { 63 | if (pulsetimerMs) 64 | { 65 | if (deltaMs > pulsetimerMs) 66 | { 67 | pulsetimerMs = 0; 68 | } 69 | else 70 | { 71 | pulsetimerMs -= deltaMs; 72 | } 73 | 74 | if (pulsetimerMs == 0) 75 | { 76 | #ifdef todo1 77 | HAL_GPIO_WritePin(GPIOC, GPIO_PIN_1, GPIO_PIN_RESET); 78 | #endif 79 | } 80 | } 81 | else 82 | { 83 | pulsetimerMs -= deltaMs; 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /src/eLib/ccp/ccp_config_example.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************** 2 | * 3 | * Copyright (C) 2020 ConnectEx, Inc. 4 | * 5 | * This program is free software : you can redistribute it and/or modify 6 | * it under the terms of the GNU Lesser General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License. 8 | * 9 | * This program 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 12 | * GNU Lesser General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Lesser General Public License 15 | * along with this program.If not, see . 16 | * 17 | * As a special exception, if other files instantiate templates or 18 | * use macros or inline functions from this file, or you compile 19 | * this file and link it with other works to produce a work based 20 | * on this file, this file does not by itself cause the resulting 21 | * work to be covered by the GNU General Public License. However 22 | * the source code for this file must still be made available in 23 | * accordance with section (3) of the GNU General Public License. 24 | * 25 | * This exception does not invalidate any other reasons why a work 26 | * based on this file might be covered by the GNU General Public 27 | * License. 28 | * 29 | * For more information: info@connect-ex.com 30 | * 31 | * For access to source code : 32 | * 33 | * info@connect-ex.com 34 | * or 35 | * github.com/ConnectEx/BACnet-Dev-Kit 36 | * 37 | ****************************************************************************************/ 38 | 39 | // platform dependent config, rename to ccp_config and modify to match you platform capabilities 40 | #define CCP_MAX_COMM 1 41 | #define CCP_COMM_READ_BUFFER_LEN 10 42 | #define CCP_MAX_RECEIVE_CALLBACKS 1 43 | -------------------------------------------------------------------------------- /src/eLib/ipc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(cJSON) -------------------------------------------------------------------------------- /src/eLib/ipc/cJSON/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB ipcjsonsources *.c) 2 | 3 | add_library(ipcjson ${ipcjsonsources}) 4 | 5 | # state that anybody linking to us needs to include the current source dir 6 | # includes, while we don't. 7 | target_include_directories(ipcjson 8 | INTERFACE ${CMAKE_CURRENT_SOURCE_DIR} 9 | PRIVATE ${PROJECT_BINARY_DIR} 10 | PRIVATE ${CMAKE_BINARY_DIR} 11 | PRIVATE ${CMAKE_SOURCE_DIR} 12 | PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../../../../libs/bacnet/src/ 13 | PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../../../../libs/bacnet/src/eLib/osLayer/linux 14 | ) 15 | -------------------------------------------------------------------------------- /src/eLib/ipc/cJSON/test.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "cJSON.h" 3 | 4 | // Using: https://github.com/DaveGamble/cJSON 5 | 6 | 7 | int main ( void ) 8 | { 9 | 10 | // create some jSON 11 | 12 | cJSON *root; 13 | cJSON *fmt; 14 | root = cJSON_CreateObject(); 15 | cJSON_AddItemToObject(root, "name", cJSON_CreateString("Jack (\"Bee\") Nimble")); 16 | cJSON_AddItemToObject(root, "format", fmt = cJSON_CreateObject()); 17 | cJSON_AddStringToObject(fmt, "type", "rect"); 18 | cJSON_AddNumberToObject(fmt, "width", 1920); 19 | cJSON_AddNumberToObject(fmt, "height", 1080); 20 | cJSON_AddFalseToObject (fmt, "interlace"); 21 | cJSON_AddNumberToObject(fmt, "frame rate", 24); 22 | 23 | char *rendered = cJSON_Print(root); 24 | 25 | printf("JSON output: %s\n", rendered); 26 | 27 | // 'read' it back 28 | 29 | cJSON * root2 = cJSON_Parse( rendered ); 30 | 31 | cJSON *format = cJSON_GetObjectItemCaseSensitive(root2, "format"); 32 | cJSON *framerate_item = cJSON_GetObjectItemCaseSensitive(format, "frame rate"); 33 | double framerate = 0; 34 | if (cJSON_IsNumber(framerate_item)) 35 | { 36 | framerate = framerate_item->valuedouble; 37 | } 38 | 39 | printf("framerate = %f\n", framerate); 40 | 41 | } 42 | -------------------------------------------------------------------------------- /src/eLib/osLayer/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(linux) -------------------------------------------------------------------------------- /src/eLib/osLayer/STMicro/os485.c: -------------------------------------------------------------------------------- 1 | /**************************************************************************************** 2 | * 3 | * Copyright (C) 2018 BACnet Interoperability Testing Services, Inc. 4 | * 5 | * 6 | * 7 | * This program is free software : you can redistribute it and/or modify 8 | * it under the terms of the GNU Lesser General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the 15 | * GNU Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public License 18 | * along with this program.If not, see . 19 | * 20 | * For more information : info@bac-test.com 21 | * 22 | * For access to source code : 23 | * 24 | * info@bac-test.com 25 | * or 26 | * www.github.com/bacnettesting/bacnet-stack 27 | * 28 | ****************************************************************************************/ 29 | 30 | #include "board485.h" 31 | #include "bitsUtil.h" 32 | 33 | #if defined(STM32F103xB) 34 | #include "stm32f1xx_hal.h" 35 | #elif defined(STM32F429xx) 36 | #include "stm32f4xx_hal.h" 37 | #elif defined(STM32G071xx) 38 | #include "stm32g0xx_hal.h" 39 | #else 40 | #error "Not supported platform." 41 | #endif 42 | 43 | 44 | void os485_init( 45 | RS485_CB *rs485cb, 46 | const char *comport ) 47 | { 48 | board_rs485_init( rs485cb, comport ) ; 49 | } 50 | 51 | 52 | void os485_send( RS485_CB *rs485cb, uint8_t *buffer, uint16_t len ) 53 | { 54 | bits_board_led_pulse_indexed ( BOARD_LED_FUNCTION_DATALINK_OTHER_TX, 0, 200 ) ; 55 | 56 | // send in blocking mode (buffer can be ephemeral) 57 | HAL_UART_Transmit( rs485cb->uartHandle, buffer, len, 100 ) ; 58 | 59 | // rs485cb->uartHandle->Instance->DR = buffer[0]; 60 | // rs485cb->uartHandle->Instance->CR1 |= USART_CR1_TXEIE ; 61 | 62 | // huart1.Instance->DR = tx_byte ; 63 | // huart1.Instance->CR1 |= USART_CR1_TXEIE ; 64 | // SilenceTimerReset(mstp_port); 65 | } 66 | 67 | -------------------------------------------------------------------------------- /src/eLib/osLayer/STMicro/os485.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************** 2 | * 3 | * Copyright (C) 2018 BACnet Interoperability Testing Services, Inc. 4 | * 5 | * 6 | * 7 | * This program is free software : you can redistribute it and/or modify 8 | * it under the terms of the GNU Lesser General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the 15 | * GNU Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public License 18 | * along with this program.If not, see . 19 | * 20 | * For more information : info@bac-test.com 21 | * 22 | * For access to source code : 23 | * 24 | * info@bac-test.com 25 | * or 26 | * www.github.com/bacnettesting/bacnet-stack 27 | * 28 | ****************************************************************************************/ 29 | 30 | #ifndef OS485_HEADER 31 | #define OS485_HEADER 32 | 33 | #if defined(STM32F103xB) 34 | #include "stm32f1xx_hal.h" 35 | #elif defined(STM32F429xx) 36 | #include "stm32f4xx_hal.h" 37 | #elif defined(STM32G071xx) 38 | #include "stm32g0xx_hal.h" 39 | #else 40 | #error "Not supported platform." 41 | #endif 42 | 43 | // #include "boardLED.h" 44 | 45 | typedef struct { 46 | // BOARD_LED_CB led_cb ; 47 | uint32_t baudRate ; 48 | UART_HandleTypeDef *uartHandle ; 49 | } RS485_CB2 ; 50 | 51 | 52 | void os485_init( 53 | RS485_CB2 *rs485cb, 54 | const char *comport ) ; 55 | 56 | void os485_send( 57 | RS485_CB2 *rs485cb, 58 | uint8_t *buffer, 59 | uint16_t len ) ; 60 | 61 | 62 | #endif // OS485_HEADER 63 | -------------------------------------------------------------------------------- /src/eLib/osLayer/STMicro/osLED.c: -------------------------------------------------------------------------------- 1 | /**************************************************************************************** 2 | * 3 | * Copyright (C) 2018 BACnet Interoperability Testing Services, Inc. 4 | * 5 | * 6 | * 7 | * This program is free software : you can redistribute it and/or modify 8 | * it under the terms of the GNU Lesser General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the 15 | * GNU Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public License 18 | * along with this program.If not, see . 19 | * 20 | * For more information : info@bac-test.com 21 | * 22 | * For access to source code : 23 | * 24 | * info@bac-test.com 25 | * or 26 | * www.github.com/bacnettesting/bacnet-stack 27 | * 28 | ****************************************************************************************/ 29 | 30 | #include "osLED.h" 31 | 32 | -------------------------------------------------------------------------------- /src/eLib/osLayer/STMicro/osLED.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************** 2 | * 3 | * Copyright (C) 2018 BACnet Interoperability Testing Services, Inc. 4 | * 5 | * 6 | * 7 | * This program is free software : you can redistribute it and/or modify 8 | * it under the terms of the GNU Lesser General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the 15 | * GNU Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public License 18 | * along with this program.If not, see . 19 | * 20 | * For more information : info@bac-test.com 21 | * 22 | * For access to source code : 23 | * 24 | * info@bac-test.com 25 | * or 26 | * www.github.com/bacnettesting/bacnet-stack 27 | * 28 | ****************************************************************************************/ 29 | 30 | #ifndef OSLED_HEADER 31 | #define OSLED_HEADER 32 | 33 | #include "boardLED.h" 34 | 35 | 36 | #endif // OSLED_HEADER 37 | -------------------------------------------------------------------------------- /src/eLib/osLayer/linux/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB oslayerlinuxsources *.c) 2 | 3 | add_library(oslayerlinux ${oslayerlinuxsources}) 4 | 5 | # state that anybody linking to us needs to include the current source dir 6 | # includes, while we don't. 7 | target_include_directories(oslayerlinux 8 | INTERFACE ${CMAKE_CURRENT_SOURCE_DIR} 9 | PRIVATE ${PROJECT_BINARY_DIR} 10 | PRIVATE ${CMAKE_BINARY_DIR} 11 | PRIVATE ${CMAKE_SOURCE_DIR} 12 | PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../../../../libs/bacnet/src/ 13 | PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../../../../libs/bacnet/src/eLib/osLayer/linux 14 | ) 15 | -------------------------------------------------------------------------------- /src/eLib/osLayer/linux/net.h: -------------------------------------------------------------------------------- 1 | /************************************************************************** 2 | * 3 | * Copyright (C) 2017 BACnet Interoperability Testing Services, Inc. 4 | * 5 | * July 1, 2017 BITS Modifications to this file have been made in compliance 6 | * with original licensing. 7 | * 8 | * This file contains changes made by BACnet Interoperability Testing 9 | * Services, Inc. These changes are subject to the permissions, 10 | * warranty terms and limitations above. 11 | * For more information: info@bac-test.com 12 | * For access to source code: info@bac-test.com 13 | * or www.github.com/bacnettesting/bacnet-stack 14 | * 15 | ****************************************************************************************/ 16 | 17 | #error - 2020-08-08 EKH: renamed this file from net.h to osNet.h because net.h collides with linux net.h, leading to ambiguities. 18 | 19 | 20 | -------------------------------------------------------------------------------- /src/eLib/osLayer/linux/osNet.h: -------------------------------------------------------------------------------- 1 | /************************************************************************** 2 | * 3 | * Copyright (C) 2017 BACnet Interoperability Testing Services, Inc. 4 | * 5 | * July 1, 2017 BITS Modifications to this file have been made in compliance 6 | * with original licensing. 7 | * 8 | * This file contains changes made by BACnet Interoperability Testing 9 | * Services, Inc. These changes are subject to the permissions, 10 | * warranty terms and limitations above. 11 | * For more information: info@bac-test.com 12 | * For access to source code: info@bac-test.com 13 | * or www.github.com/bacnettesting/bacnet-stack 14 | * 15 | ****************************************************************************************/ 16 | 17 | #ifndef NET_H 18 | #define NET_H 19 | 20 | #ifndef IPPROTO_IPV6 21 | // If the version of winsock does not by default include IPV6 then 22 | // use the tech preview if it is avaliable. 23 | 24 | // 2018.05.07 - EKH: Can someone explain where to get this file? 25 | // Is it even still required? 26 | // #include 27 | #endif 28 | 29 | #include 30 | #include 31 | 32 | #include 33 | #include 34 | #include 35 | #include 36 | 37 | #include 38 | #include 39 | #include 40 | #include 41 | #include 42 | #include 43 | #include 44 | #include 45 | #include 46 | 47 | 48 | 49 | #if 0 50 | 51 | // close conflicts with file close in Microsoft MSVC 52 | #define close closesocket 53 | 54 | typedef int socklen_t; 55 | 56 | #endif 57 | #endif 58 | -------------------------------------------------------------------------------- /src/eLib/osLayer/win/parseConfig.c: -------------------------------------------------------------------------------- 1 | /**************************************************************************************** 2 | * 3 | * Copyright (C) 2018 BACnet Interoperability Testing Services, Inc. 4 | * 5 | * This program is free software : you can redistribute it and/or modify 6 | * it under the terms of the GNU Lesser General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the 13 | * GNU Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public License 16 | * along with this program.If not, see . 17 | * 18 | * For more information : info@bac-test.com 19 | * 20 | * For access to source code : 21 | * 22 | * info@bac-test.com 23 | * or 24 | * www.github.com/bacnettesting/bacnet-stack 25 | * 26 | ****************************************************************************************/ 27 | 28 | #include 29 | 30 | #include "bitsRouter/bitsRouter.h" 31 | #include "bacstr.h" 32 | #include "osLayer.h" 33 | #include "device.h" 34 | #include "bacversion.h" 35 | #include "appApi.h" 36 | 37 | ROUTER_PORT *headRouterport = NULL; /* pointer to list of router ports */ 38 | extern ROUTER_PORT *applicationRouterPort; 39 | 40 | // "root name" for virtual devices, and "base instance" for virtual device instances TBD, needs UI changes first, tracked using 41 | uint32_t deviceInstanceBase = 2700000; 42 | 43 | BACNET_CHARACTER_STRING My_Object_Name; 44 | uint32_t Object_Instance_Number; 45 | 46 | 47 | bool read_config(const char *filepath) 48 | { 49 | // todo 3 - inplement a config file processor for windows 50 | (void)filepath; 51 | return true; 52 | } 53 | 54 | 55 | void read_config_auxiliary(const char *filepath) 56 | { 57 | (void)filepath; 58 | } 59 | -------------------------------------------------------------------------------- /src/eLib/readme.md: -------------------------------------------------------------------------------- 1 | # Libraries 2 | 3 | This folder contains common code libraries and platform specific libraries and wrappers. 4 | 5 | # eLib 6 | ConnectEx's Embedded Library 7 | 8 | This is ConnectEx's "Embedded library" to support ST micro, linux, windows, others.... only portable code for all these platforms 9 | that makes sense to be in an 'embedded library' should go here. 10 | This includes support for individual development boards 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/eLib/util/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB elibutilsources *.c) 2 | 3 | add_library(elibutil ${elibutilsources}) 4 | 5 | # state that anybody linking to us needs to include the current source dir 6 | # includes, while we don't. 7 | target_include_directories(elibutil 8 | INTERFACE ${CMAKE_CURRENT_SOURCE_DIR} 9 | PRIVATE ${PROJECT_BINARY_DIR} 10 | PRIVATE ${CMAKE_BINARY_DIR} 11 | PRIVATE ${CMAKE_SOURCE_DIR} 12 | PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../../../libs/bacnet/src/ 13 | PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../../../libs/bacnet/src/eLib/osLayer/linux 14 | ) 15 | -------------------------------------------------------------------------------- /src/eLib/util/btaInternal.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************** 2 | * 3 | * Copyright (C) 2018 BACnet Interoperability Testing Services, Inc. 4 | * 5 | * This program is free software : you can redistribute it and/or modify 6 | * it under the terms of the GNU Lesser General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the 13 | * GNU Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public License 16 | * along with this program.If not, see . 17 | * 18 | * For more information : info@bac-test.com 19 | * 20 | * For access to source code : 21 | * 22 | * info@bac-test.com 23 | * or 24 | * www.github.com/bacnettesting/bacnet-stack 25 | * 26 | ****************************************************************************************/ 27 | 28 | #include "eLib/util/llist.h" 29 | 30 | typedef struct 31 | { 32 | QUEUE_LB queue_lb; // must be first 33 | uint8_t *payload; 34 | uint16_t sendlength; 35 | } BTAQ_CB ; 36 | 37 | 38 | void SendBTApayloadUDP( BTAQ_CB *btaqcb ); 39 | -------------------------------------------------------------------------------- /src/eLib/util/ledCommon.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************** 2 | * 3 | * Copyright (C) 2018 BACnet Interoperability Testing Services, Inc. 4 | * 5 | * 6 | * 7 | * This program is free software : you can redistribute it and/or modify 8 | * it under the terms of the GNU Lesser General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the 15 | * GNU Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public License 18 | * along with this program.If not, see . 19 | * 20 | * For more information : info@bac-test.com 21 | * 22 | * For access to source code : 23 | * 24 | * info@bac-test.com 25 | * or 26 | * www.github.com/bacnettesting/bacnet-stack 27 | * 28 | ****************************************************************************************/ 29 | 30 | #ifndef LEDCOMMON_H 31 | #define LEDCOMMON_H 32 | 33 | #include 34 | #include 35 | #include "osLED.h" 36 | 37 | void led_tx_on( 38 | void); 39 | 40 | void led_rx_on( 41 | void); 42 | 43 | void led_tx_on_interval( 44 | uint16_t interval_ms); 45 | 46 | void led_rx_on_interval( 47 | uint16_t interval_ms); 48 | 49 | void led_rx_error( 50 | uint16_t interval_ms); 51 | 52 | void led_rx_data_frame( 53 | uint16_t interval_ms); 54 | 55 | void led_tx_off( 56 | void); 57 | 58 | void led_rx_off( 59 | void); 60 | 61 | void led_tx_off_delay( 62 | uint32_t delay_ms); 63 | 64 | void led_rx_off_delay( 65 | uint32_t delay_ms); 66 | 67 | void led_tx_toggle( 68 | void); 69 | 70 | void led_rx_toggle( 71 | void); 72 | 73 | bool led_tx_state( 74 | void); 75 | 76 | bool led_rx_state( 77 | void); 78 | 79 | void bits_led_task( 80 | void); 81 | 82 | void led_init( 83 | void); 84 | 85 | #endif 86 | -------------------------------------------------------------------------------- /src/eLib/util/linklist.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************** 2 | * 3 | * Copyright (C) 2018 BACnet Interoperability Testing Services, Inc. 4 | * 5 | * This program is free software : you can redistribute it and/or modify 6 | * it under the terms of the GNU Lesser General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the 13 | * GNU Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public License 16 | * along with this program.If not, see . 17 | * 18 | * For more information : info@bac-test.com 19 | * 20 | * For access to source code : 21 | * 22 | * info@bac-test.com 23 | * or 24 | * www.github.com/bacnettesting/bacnet-stack 25 | * 26 | ****************************************************************************************/ 27 | 28 | #pragma once 29 | 30 | typedef struct _LLIST 31 | { 32 | struct _LLIST *next; 33 | } LLIST; 34 | 35 | // Note, these items are void ** so that the head pointer can be made the same type as the items of 36 | // the list 37 | 38 | void LinkListAppend(void **llistHead, void *item); 39 | void LinkListRemove(void **llistHead, void *target); 40 | void LinkListInsert(void **llistHead, void *target, void *item); 41 | void LinkListPush(void **llistHead, void *item); 42 | 43 | -------------------------------------------------------------------------------- /src/eLib/util/scope.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************** 2 | * 3 | * Copyright (C) 2016 BACnet Interoperability Testing Services, Inc. 4 | * 5 | * This program is free software : you can redistribute it and/or modify 6 | * it under the terms of the GNU Lesser General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the 13 | * GNU Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public License 16 | * along with this program.If not, see . 17 | * 18 | * For more information : info@bac-test.com 19 | * 20 | * For access to source code : 21 | * 22 | * info@bac-test.com 23 | * or 24 | * www.github.com/bacnettesting/bacnet-stack 25 | * 26 | ****************************************************************************************/ 27 | 28 | // Calls to trigger oscilloscope for debugging serial communications if necessary 29 | 30 | #pragma once 31 | 32 | #include "osLayer.h" 33 | 34 | void bits_ScopeInit(void); 35 | void bits_ScopeTrigger(void); 36 | void bits_ScopeIdle(uint deltaMs); 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /src/eLib/util/timerCommon.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************** 2 | * 3 | * Copyright (C) 2018 BACnet Interoperability Testing Services, Inc. 4 | * 5 | * 6 | * 7 | * This program is free software : you can redistribute it and/or modify 8 | * it under the terms of the GNU Lesser General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the 15 | * GNU Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public License 18 | * along with this program.If not, see . 19 | * 20 | * For more information : info@bac-test.com 21 | * 22 | * For access to source code : 23 | * 24 | * info@bac-test.com 25 | * or 26 | * www.github.com/bacnettesting/bacnet-stack 27 | * 28 | ****************************************************************************************/ 29 | 30 | #ifndef TIMERCOMMON_H 31 | #define TIMERCOMMON_H 32 | 33 | #include 34 | 35 | uint32_t bits_sysTimer_elapsed_milliseconds( 36 | uint32_t prevTime ) ; 37 | 38 | uint32_t bits_sysTimer_get_milliseconds( 39 | void ) ; 40 | 41 | uint32_t bits_timer_delta_milliseconds( 42 | uint32_t prevTime, 43 | uint32_t newTime); 44 | 45 | #endif 46 | --------------------------------------------------------------------------------