mirror of
https://github.com/thelsing/knx.git
synced 2025-04-28 01:15:42 +02:00
move files around and refactor cmake
This commit is contained in:
parent
fcfeef3334
commit
31b765ab14
@ -2,7 +2,7 @@ cmake_policy(SET CMP0048 NEW)
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
project(knx VERSION 1.5)
|
||||
|
||||
|
||||
add_subdirectory(src)
|
||||
add_subdirectory(examples/knx-linux)
|
||||
add_subdirectory(examples/knx-linux-coupler)
|
||||
add_subdirectory(examples/knxPython)
|
||||
#add_subdirectory(examples/knxPython)
|
||||
|
@ -3,162 +3,6 @@ project(knx-linux-coupler VERSION 1.5)
|
||||
set(LIBRARIES_FROM_REFERENCES "")
|
||||
|
||||
set(SOURCES
|
||||
../../src/knx/address_table_object.cpp
|
||||
../../src/knx/address_table_object.h
|
||||
../../src/knx/aes.c
|
||||
../../src/knx/aes.h
|
||||
../../src/knx/aes.hpp
|
||||
../../src/knx/apdu.cpp
|
||||
../../src/knx/apdu.h
|
||||
../../src/knx/application_layer.cpp
|
||||
../../src/knx/application_layer.h
|
||||
../../src/knx/application_program_object.cpp
|
||||
../../src/knx/application_program_object.h
|
||||
../../src/knx/association_table_object.cpp
|
||||
../../src/knx/association_table_object.h
|
||||
../../src/knx/bau.cpp
|
||||
../../src/knx/bau.h
|
||||
../../src/knx/bau07B0.cpp
|
||||
../../src/knx/bau07B0.h
|
||||
../../src/knx/bau091A.cpp
|
||||
../../src/knx/bau091A.h
|
||||
../../src/knx/bau27B0.cpp
|
||||
../../src/knx/bau27B0.h
|
||||
../../src/knx/bau2920.cpp
|
||||
../../src/knx/bau2920.h
|
||||
../../src/knx/bau57B0.cpp
|
||||
../../src/knx/bau57B0.h
|
||||
../../src/knx/bau_systemB.cpp
|
||||
../../src/knx/bau_systemB.h
|
||||
../../src/knx/bau_systemB_device.cpp
|
||||
../../src/knx/bau_systemB_device.h
|
||||
../../src/knx/bau_systemB_coupler.cpp
|
||||
../../src/knx/bau_systemB_coupler.h
|
||||
../../src/knx/bits.cpp
|
||||
../../src/knx/bits.h
|
||||
../../src/knx/callback_property.h
|
||||
../../src/knx/cemi_frame.cpp
|
||||
../../src/knx/cemi_frame.h
|
||||
../../src/knx/cemi_server.cpp
|
||||
../../src/knx/cemi_server.h
|
||||
../../src/knx/cemi_server_object.cpp
|
||||
../../src/knx/cemi_server_object.h
|
||||
../../src/knx/config.h
|
||||
../../src/knx/data_link_layer.cpp
|
||||
../../src/knx/data_link_layer.h
|
||||
../../src/knx/data_property.cpp
|
||||
../../src/knx/data_property.h
|
||||
../../src/knx/device_object.cpp
|
||||
../../src/knx/device_object.h
|
||||
../../src/knx/dpt.cpp
|
||||
../../src/knx/dpt.h
|
||||
../../src/knx/dptconvert.cpp
|
||||
../../src/knx/dptconvert.h
|
||||
../../src/knx/function_property.h
|
||||
../../src/knx/group_object.cpp
|
||||
../../src/knx/group_object.h
|
||||
../../src/knx/group_object_table_object.cpp
|
||||
../../src/knx/group_object_table_object.h
|
||||
../../src/knx/interface_object.cpp
|
||||
../../src/knx/interface_object.h
|
||||
../../src/knx/ip_data_link_layer.cpp
|
||||
../../src/knx/ip_data_link_layer.h
|
||||
../../src/knx/ip_parameter_object.cpp
|
||||
../../src/knx/ip_parameter_object.h
|
||||
../../src/knx/knx_ip_device_information_dib.cpp
|
||||
../../src/knx/knx_ip_device_information_dib.h
|
||||
../../src/knx/knx_ip_dib.cpp
|
||||
../../src/knx/knx_ip_dib.h
|
||||
../../src/knx/knx_ip_frame.cpp
|
||||
../../src/knx/knx_ip_frame.h
|
||||
../../src/knx/knx_ip_routing_indication.cpp
|
||||
../../src/knx/knx_ip_routing_indication.h
|
||||
../../src/knx/knx_ip_search_request.cpp
|
||||
../../src/knx/knx_ip_search_request.h
|
||||
../../src/knx/knx_ip_search_response.cpp
|
||||
../../src/knx/knx_ip_search_response.h
|
||||
../../src/knx/knx_ip_supported_service_dib.cpp
|
||||
../../src/knx/knx_ip_supported_service_dib.h
|
||||
../../src/knx/ip_host_protocol_address_information.cpp
|
||||
../../src/knx/ip_host_protocol_address_information.h
|
||||
../../src/knx/knx_types.h
|
||||
../../src/knx/knx_value.cpp
|
||||
../../src/knx/knx_value.h
|
||||
../../src/knx/memory.cpp
|
||||
../../src/knx/memory.h
|
||||
../../src/knx/network_layer.cpp
|
||||
../../src/knx/network_layer.h
|
||||
../../src/knx/network_layer_coupler.cpp
|
||||
../../src/knx/network_layer_coupler.h
|
||||
../../src/knx/network_layer_device.cpp
|
||||
../../src/knx/network_layer_device.h
|
||||
../../src/knx/network_layer_entity.cpp
|
||||
../../src/knx/network_layer_entity.h
|
||||
../../src/knx/npdu.cpp
|
||||
../../src/knx/npdu.h
|
||||
../../src/knx/platform.cpp
|
||||
../../src/knx/platform.h
|
||||
../../src/knx/property.cpp
|
||||
../../src/knx/property.h
|
||||
../../src/knx/rf_data_link_layer.cpp
|
||||
../../src/knx/rf_data_link_layer.h
|
||||
../../src/knx/rf_medium_object.cpp
|
||||
../../src/knx/rf_medium_object.h
|
||||
../../src/knx/rf_physical_layer_cc1101.cpp
|
||||
../../src/knx/rf_physical_layer_cc1101.h
|
||||
../../src/knx/rf_physical_layer.h
|
||||
../../src/knx/router_object.cpp
|
||||
../../src/knx/router_object.h
|
||||
../../src/knx/secure_application_layer.cpp
|
||||
../../src/knx/secure_application_layer.h
|
||||
../../src/knx/security_interface_object.cpp
|
||||
../../src/knx/security_interface_object.h
|
||||
../../src/knx/simple_map.h
|
||||
../../src/knx/save_restore.h
|
||||
../../src/knx/table_object.cpp
|
||||
../../src/knx/table_object.h
|
||||
../../src/knx/tpdu.cpp
|
||||
../../src/knx/tpdu.h
|
||||
../../src/knx/tpuart_data_link_layer.cpp
|
||||
../../src/knx/tpuart_data_link_layer.h
|
||||
../../src/knx/transport_layer.cpp
|
||||
../../src/knx/transport_layer.h
|
||||
../../src/knx/usb_tunnel_interface.cpp
|
||||
../../src/knx/usb_tunnel_interface.h
|
||||
../../src/knx/knx_ip_tunnel_connection.cpp
|
||||
../../src/knx/knx_ip_tunnel_connection.h
|
||||
../../src/knx/knx_ip_tunneling_request.cpp
|
||||
../../src/knx/knx_ip_tunneling_request.h
|
||||
../../src/knx/knx_ip_ch.cpp
|
||||
../../src/knx/knx_ip_ch.h
|
||||
../../src/knx/knx_ip_cri.cpp
|
||||
../../src/knx/knx_ip_cri.h
|
||||
../../src/knx/knx_ip_crd.cpp
|
||||
../../src/knx/knx_ip_crd.h
|
||||
../../src/knx/knx_ip_connect_request.cpp
|
||||
../../src/knx/knx_ip_connect_request.h
|
||||
../../src/knx/knx_ip_connect_response.cpp
|
||||
../../src/knx/knx_ip_connect_response.h
|
||||
../../src/knx/knx_ip_disconnect_request.cpp
|
||||
../../src/knx/knx_ip_disconnect_request.h
|
||||
../../src/knx/knx_ip_disconnect_response.cpp
|
||||
../../src/knx/knx_ip_disconnect_response.h
|
||||
../../src/knx/knx_ip_state_request.cpp
|
||||
../../src/knx/knx_ip_state_request.h
|
||||
../../src/knx/knx_ip_state_response.cpp
|
||||
../../src/knx/knx_ip_state_response.h
|
||||
../../src/knx/knx_ip_description_request.cpp
|
||||
../../src/knx/knx_ip_description_request.h
|
||||
../../src/knx/knx_ip_description_response.cpp
|
||||
../../src/knx/knx_ip_description_response.h
|
||||
../../src/knx/knx_ip_config_request.cpp
|
||||
../../src/knx/knx_ip_config_request.h
|
||||
../../src/knx/knx_ip_tunneling_ack.cpp
|
||||
../../src/knx/knx_ip_tunneling_ack.h
|
||||
../../src/knx_facade.cpp
|
||||
../../src/knx_facade.h
|
||||
../../src/linux_platform.cpp
|
||||
../../src/linux_platform.h
|
||||
fdsk.cpp
|
||||
fdsk.h
|
||||
main.cpp)
|
||||
@ -169,11 +13,11 @@ set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wall -Wno-unknown-pragmas -g -O
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall -Wno-unknown-pragmas -g -O0")
|
||||
|
||||
add_executable(knx-linux-iptp ${SOURCES})
|
||||
target_link_libraries(knx-linux-iptp "${LIBRARIES_FROM_REFERENCES}")
|
||||
target_link_libraries(knx-linux-iptp knx "${LIBRARIES_FROM_REFERENCES}")
|
||||
set_property(TARGET knx-linux-iptp PROPERTY CXX_STANDARD 11)
|
||||
target_compile_definitions(knx-linux-iptp PUBLIC -DMASK_VERSION=0x091A -DKNX_TUNNELING)
|
||||
|
||||
add_executable(knx-linux-tprf ${SOURCES})
|
||||
target_link_libraries(knx-linux-tprf "${LIBRARIES_FROM_REFERENCES}")
|
||||
target_link_libraries(knx-linux-tprf knx "${LIBRARIES_FROM_REFERENCES}")
|
||||
set_property(TARGET knx-linux-tprf PROPERTY CXX_STANDARD 11)
|
||||
target_compile_definitions(knx-linux-tprf PUBLIC -DMASK_VERSION=0x2920)
|
||||
|
@ -2,153 +2,22 @@ cmake_minimum_required(VERSION 3.16)
|
||||
project(knx-linux VERSION 1.5)
|
||||
set(LIBRARIES_FROM_REFERENCES "")
|
||||
|
||||
set(SOURCES
|
||||
../../src/knx/address_table_object.cpp
|
||||
../../src/knx/address_table_object.h
|
||||
../../src/knx/aes.c
|
||||
../../src/knx/aes.h
|
||||
../../src/knx/aes.hpp
|
||||
../../src/knx/apdu.cpp
|
||||
../../src/knx/apdu.h
|
||||
../../src/knx/application_layer.cpp
|
||||
../../src/knx/application_layer.h
|
||||
../../src/knx/application_program_object.cpp
|
||||
../../src/knx/application_program_object.h
|
||||
../../src/knx/association_table_object.cpp
|
||||
../../src/knx/association_table_object.h
|
||||
../../src/knx/bau.cpp
|
||||
../../src/knx/bau.h
|
||||
../../src/knx/bau07B0.cpp
|
||||
../../src/knx/bau07B0.h
|
||||
../../src/knx/bau091A.cpp
|
||||
../../src/knx/bau091A.h
|
||||
../../src/knx/bau27B0.cpp
|
||||
../../src/knx/bau27B0.h
|
||||
../../src/knx/bau2920.cpp
|
||||
../../src/knx/bau2920.h
|
||||
../../src/knx/bau57B0.cpp
|
||||
../../src/knx/bau57B0.h
|
||||
../../src/knx/bau_systemB.cpp
|
||||
../../src/knx/bau_systemB.h
|
||||
../../src/knx/bau_systemB_device.cpp
|
||||
../../src/knx/bau_systemB_device.h
|
||||
../../src/knx/bau_systemB_coupler.cpp
|
||||
../../src/knx/bau_systemB_coupler.h
|
||||
../../src/knx/bits.cpp
|
||||
../../src/knx/bits.h
|
||||
../../src/knx/callback_property.h
|
||||
../../src/knx/cemi_frame.cpp
|
||||
../../src/knx/cemi_frame.h
|
||||
../../src/knx/cemi_server.cpp
|
||||
../../src/knx/cemi_server.h
|
||||
../../src/knx/cemi_server_object.cpp
|
||||
../../src/knx/cemi_server_object.h
|
||||
../../src/knx/config.h
|
||||
../../src/knx/data_link_layer.cpp
|
||||
../../src/knx/data_link_layer.h
|
||||
../../src/knx/data_property.cpp
|
||||
../../src/knx/data_property.h
|
||||
../../src/knx/device_object.cpp
|
||||
../../src/knx/device_object.h
|
||||
../../src/knx/dpt.cpp
|
||||
../../src/knx/dpt.h
|
||||
../../src/knx/dptconvert.cpp
|
||||
../../src/knx/dptconvert.h
|
||||
../../src/knx/function_property.h
|
||||
../../src/knx/group_object.cpp
|
||||
../../src/knx/group_object.h
|
||||
../../src/knx/group_object_table_object.cpp
|
||||
../../src/knx/group_object_table_object.h
|
||||
../../src/knx/interface_object.cpp
|
||||
../../src/knx/interface_object.h
|
||||
../../src/knx/ip_data_link_layer.cpp
|
||||
../../src/knx/ip_data_link_layer.h
|
||||
../../src/knx/ip_parameter_object.cpp
|
||||
../../src/knx/ip_parameter_object.h
|
||||
../../src/knx/knx_ip_device_information_dib.cpp
|
||||
../../src/knx/knx_ip_device_information_dib.h
|
||||
../../src/knx/knx_ip_dib.cpp
|
||||
../../src/knx/knx_ip_dib.h
|
||||
../../src/knx/knx_ip_frame.cpp
|
||||
../../src/knx/knx_ip_frame.h
|
||||
../../src/knx/knx_ip_routing_indication.cpp
|
||||
../../src/knx/knx_ip_routing_indication.h
|
||||
../../src/knx/knx_ip_search_request.cpp
|
||||
../../src/knx/knx_ip_search_request.h
|
||||
../../src/knx/knx_ip_search_response.cpp
|
||||
../../src/knx/knx_ip_search_response.h
|
||||
../../src/knx/knx_ip_supported_service_dib.cpp
|
||||
../../src/knx/knx_ip_supported_service_dib.h
|
||||
../../src/knx/ip_host_protocol_address_information.cpp
|
||||
../../src/knx/ip_host_protocol_address_information.h
|
||||
../../src/knx/knx_types.h
|
||||
../../src/knx/knx_value.cpp
|
||||
../../src/knx/knx_value.h
|
||||
../../src/knx/memory.cpp
|
||||
../../src/knx/memory.h
|
||||
../../src/knx/network_layer.cpp
|
||||
../../src/knx/network_layer.h
|
||||
../../src/knx/network_layer_coupler.cpp
|
||||
../../src/knx/network_layer_coupler.h
|
||||
../../src/knx/network_layer_device.cpp
|
||||
../../src/knx/network_layer_device.h
|
||||
../../src/knx/network_layer_entity.cpp
|
||||
../../src/knx/network_layer_entity.h
|
||||
../../src/knx/npdu.cpp
|
||||
../../src/knx/npdu.h
|
||||
../../src/knx/platform.cpp
|
||||
../../src/knx/platform.h
|
||||
../../src/knx/property.cpp
|
||||
../../src/knx/property.h
|
||||
../../src/knx/rf_data_link_layer.cpp
|
||||
../../src/knx/rf_data_link_layer.h
|
||||
../../src/knx/rf_medium_object.cpp
|
||||
../../src/knx/rf_medium_object.h
|
||||
../../src/knx/rf_physical_layer_cc1101.cpp
|
||||
../../src/knx/rf_physical_layer_cc1101.h
|
||||
../../src/knx/rf_physical_layer.h
|
||||
../../src/knx/router_object.cpp
|
||||
../../src/knx/router_object.h
|
||||
../../src/knx/secure_application_layer.cpp
|
||||
../../src/knx/secure_application_layer.h
|
||||
../../src/knx/security_interface_object.cpp
|
||||
../../src/knx/security_interface_object.h
|
||||
../../src/knx/simple_map.h
|
||||
../../src/knx/save_restore.h
|
||||
../../src/knx/table_object.cpp
|
||||
../../src/knx/table_object.h
|
||||
../../src/knx/tpdu.cpp
|
||||
../../src/knx/tpdu.h
|
||||
../../src/knx/tpuart_data_link_layer.cpp
|
||||
../../src/knx/tpuart_data_link_layer.h
|
||||
../../src/knx/transport_layer.cpp
|
||||
../../src/knx/transport_layer.h
|
||||
../../src/knx/usb_tunnel_interface.cpp
|
||||
../../src/knx/usb_tunnel_interface.h
|
||||
../../src/knx_facade.cpp
|
||||
../../src/knx_facade.h
|
||||
../../src/linux_platform.cpp
|
||||
../../src/linux_platform.h
|
||||
fdsk.cpp
|
||||
fdsk.h
|
||||
main.cpp)
|
||||
|
||||
include_directories(../../src)
|
||||
set(SOURCES fdsk.cpp fdsk.h main.cpp)
|
||||
|
||||
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wall -Wno-unknown-pragmas -g -O0")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall -Wno-unknown-pragmas -g -O0")
|
||||
|
||||
add_executable(knx-linux-tp ${SOURCES})
|
||||
target_link_libraries(knx-linux-tp "${LIBRARIES_FROM_REFERENCES}")
|
||||
target_link_libraries(knx-linux-tp knx "${LIBRARIES_FROM_REFERENCES}")
|
||||
set_property(TARGET knx-linux-tp PROPERTY CXX_STANDARD 11)
|
||||
target_compile_definitions(knx-linux-tp PUBLIC -DMASK_VERSION=0x07B0)
|
||||
|
||||
add_executable(knx-linux-rf ${SOURCES})
|
||||
target_link_libraries(knx-linux-rf "${LIBRARIES_FROM_REFERENCES}")
|
||||
target_link_libraries(knx-linux-rf knx "${LIBRARIES_FROM_REFERENCES}")
|
||||
set_property(TARGET knx-linux-rf PROPERTY CXX_STANDARD 11)
|
||||
target_compile_definitions(knx-linux-rf PUBLIC -DMASK_VERSION=0x27B0)
|
||||
|
||||
add_executable(knx-linux-ip ${SOURCES})
|
||||
target_link_libraries(knx-linux-ip "${LIBRARIES_FROM_REFERENCES}")
|
||||
target_link_libraries(knx-linux-ip knx "${LIBRARIES_FROM_REFERENCES}")
|
||||
set_property(TARGET knx-linux-ip PROPERTY CXX_STANDARD 11)
|
||||
target_compile_definitions(knx-linux-ip PUBLIC -DMASK_VERSION=0x57B0)
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include "knx_facade.h"
|
||||
#include <knx.h>
|
||||
|
||||
#include "knx/bau57B0.h"
|
||||
#include "knx/bau27B0.h"
|
||||
|
@ -3,7 +3,7 @@ project(knx VERSION 1.5)
|
||||
|
||||
add_subdirectory(pybind11)
|
||||
|
||||
pybind11_add_module(knx
|
||||
pybind11_add_module(knxPython
|
||||
knxmodule.cpp
|
||||
../../src/knx/address_table_object.cpp
|
||||
../../src/knx/address_table_object.h
|
||||
@ -137,6 +137,6 @@ include_directories(../../src)
|
||||
|
||||
#set(outdir ${CMAKE_LIBRARY_OUTPUT_DIRECTORY})
|
||||
#set_target_properties(knx PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${outdir})
|
||||
set_target_properties(knx PROPERTIES OUTPUT_NAME knx)
|
||||
set_property(TARGET knx PROPERTY CXX_STANDARD 11)
|
||||
target_compile_definitions(knx PUBLIC -DMASK_VERSION=0x57B0)
|
||||
set_target_properties(knxPython PROPERTIES OUTPUT_NAME knx)
|
||||
set_property(TARGET knxPython PROPERTY CXX_STANDARD 11)
|
||||
target_compile_definitions(knxPython PUBLIC -DMASK_VERSION=0x57B0)
|
||||
|
0
examples/knxPython/knx/config.h
Normal file
0
examples/knxPython/knx/config.h
Normal file
@ -14,7 +14,7 @@ namespace py = pybind11;
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
|
||||
#include "linux_platform.h"
|
||||
#include "knx/platform/linux_platform.h"
|
||||
#include "knx/bau57B0.h"
|
||||
#include "knx/group_object_table_object.h"
|
||||
|
||||
|
190
src/CMakeLists.txt
Normal file
190
src/CMakeLists.txt
Normal file
@ -0,0 +1,190 @@
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
project(knx-linux VERSION 1.5)
|
||||
set(LIBRARIES_FROM_REFERENCES "")
|
||||
|
||||
set(SOURCES
|
||||
knx/address_table_object.cpp
|
||||
knx/address_table_object.h
|
||||
knx/apdu.cpp
|
||||
knx/apdu.h
|
||||
knx/application_layer.cpp
|
||||
knx/application_layer.h
|
||||
knx/application_program_object.cpp
|
||||
knx/application_program_object.h
|
||||
knx/association_table_object.cpp
|
||||
knx/association_table_object.h
|
||||
knx/bau.cpp
|
||||
knx/bau.h
|
||||
knx/bau07B0.cpp
|
||||
knx/bau07B0.h
|
||||
knx/bau091A.cpp
|
||||
knx/bau091A.h
|
||||
knx/bau27B0.cpp
|
||||
knx/bau27B0.h
|
||||
knx/bau2920.cpp
|
||||
knx/bau2920.h
|
||||
knx/bau57B0.cpp
|
||||
knx/bau57B0.h
|
||||
knx/bau_systemB.cpp
|
||||
knx/bau_systemB.h
|
||||
knx/bau_systemB_coupler.cpp
|
||||
knx/bau_systemB_coupler.h
|
||||
knx/bau_systemB_device.cpp
|
||||
knx/bau_systemB_device.h
|
||||
knx/bits.cpp
|
||||
knx/bits.h
|
||||
knx/callback_property.h
|
||||
knx/cemi_frame.cpp
|
||||
knx/cemi_frame.h
|
||||
knx/cemi_server.cpp
|
||||
knx/cemi_server.h
|
||||
knx/cemi_server_object.cpp
|
||||
knx/cemi_server_object.h
|
||||
knx/config.h
|
||||
knx/datapoint_types.cpp
|
||||
knx/datapoint_types.h
|
||||
knx/data_link_layer.cpp
|
||||
knx/data_link_layer.h
|
||||
knx/data_property.cpp
|
||||
knx/data_property.h
|
||||
knx/device_object.cpp
|
||||
knx/device_object.h
|
||||
knx/dpt.cpp
|
||||
knx/dpt.h
|
||||
knx/dptconvert.cpp
|
||||
knx/dptconvert.h
|
||||
knx/function_property.h
|
||||
knx/group_object.cpp
|
||||
knx/group_object.h
|
||||
knx/group_object_table_object.cpp
|
||||
knx/group_object_table_object.h
|
||||
knx/interface_object.cpp
|
||||
knx/interface_object.h
|
||||
knx/ip/ip_data_link_layer.cpp
|
||||
knx/ip/ip_data_link_layer.h
|
||||
knx/ip/ip_host_protocol_address_information.cpp
|
||||
knx/ip/ip_host_protocol_address_information.h
|
||||
knx/ip/ip_parameter_object.cpp
|
||||
knx/ip/ip_parameter_object.h
|
||||
knx/ip/knx_ip_ch.cpp
|
||||
knx/ip/knx_ip_ch.h
|
||||
knx/ip/knx_ip_config_dib.cpp
|
||||
knx/ip/knx_ip_config_dib.h
|
||||
knx/ip/knx_ip_config_request.cpp
|
||||
knx/ip/knx_ip_config_request.h
|
||||
knx/ip/knx_ip_connect_request.cpp
|
||||
knx/ip/knx_ip_connect_request.h
|
||||
knx/ip/knx_ip_connect_response.cpp
|
||||
knx/ip/knx_ip_connect_response.h
|
||||
knx/ip/knx_ip_crd.cpp
|
||||
knx/ip/knx_ip_crd.h
|
||||
knx/ip/knx_ip_cri.cpp
|
||||
knx/ip/knx_ip_cri.h
|
||||
knx/ip/knx_ip_description_request.cpp
|
||||
knx/ip/knx_ip_description_request.h
|
||||
knx/ip/knx_ip_description_response.cpp
|
||||
knx/ip/knx_ip_description_response.h
|
||||
knx/ip/knx_ip_device_information_dib.cpp
|
||||
knx/ip/knx_ip_device_information_dib.h
|
||||
knx/ip/knx_ip_dib.cpp
|
||||
knx/ip/knx_ip_dib.h
|
||||
knx/ip/knx_ip_disconnect_request.cpp
|
||||
knx/ip/knx_ip_disconnect_request.h
|
||||
knx/ip/knx_ip_disconnect_response.cpp
|
||||
knx/ip/knx_ip_disconnect_response.h
|
||||
knx/ip/knx_ip_extended_device_information_dib.cpp
|
||||
knx/ip/knx_ip_extended_device_information_dib.h
|
||||
knx/ip/knx_ip_frame.cpp
|
||||
knx/ip/knx_ip_frame.h
|
||||
knx/ip/knx_ip_knx_addresses_dib.cpp
|
||||
knx/ip/knx_ip_knx_addresses_dib.h
|
||||
knx/ip/knx_ip_routing_indication.cpp
|
||||
knx/ip/knx_ip_routing_indication.h
|
||||
knx/ip/knx_ip_search_request.cpp
|
||||
knx/ip/knx_ip_search_request.h
|
||||
knx/ip/knx_ip_search_request_extended.cpp
|
||||
knx/ip/knx_ip_search_request_extended.h
|
||||
knx/ip/knx_ip_search_response.cpp
|
||||
knx/ip/knx_ip_search_response.h
|
||||
knx/ip/knx_ip_search_response_extended.cpp
|
||||
knx/ip/knx_ip_search_response_extended.h
|
||||
knx/ip/knx_ip_state_request.cpp
|
||||
knx/ip/knx_ip_state_request.h
|
||||
knx/ip/knx_ip_state_response.cpp
|
||||
knx/ip/knx_ip_state_response.h
|
||||
knx/ip/knx_ip_supported_service_dib.cpp
|
||||
knx/ip/knx_ip_supported_service_dib.h
|
||||
knx/ip/knx_ip_tunneling_ack.cpp
|
||||
knx/ip/knx_ip_tunneling_ack.h
|
||||
knx/ip/knx_ip_tunneling_info_dib.cpp
|
||||
knx/ip/knx_ip_tunneling_info_dib.h
|
||||
knx/ip/knx_ip_tunneling_request.cpp
|
||||
knx/ip/knx_ip_tunneling_request.h
|
||||
knx/ip/knx_ip_tunnel_connection.cpp
|
||||
knx/ip/knx_ip_tunnel_connection.h
|
||||
knx/ip/service_families.h
|
||||
knx/knx_types.h
|
||||
knx/knx_value.cpp
|
||||
knx/knx_value.h
|
||||
knx/memory.cpp
|
||||
knx/memory.h
|
||||
knx/network_layer.cpp
|
||||
knx/network_layer.h
|
||||
knx/network_layer_coupler.cpp
|
||||
knx/network_layer_coupler.h
|
||||
knx/network_layer_device.cpp
|
||||
knx/network_layer_device.h
|
||||
knx/network_layer_entity.cpp
|
||||
knx/network_layer_entity.h
|
||||
knx/npdu.cpp
|
||||
knx/npdu.h
|
||||
knx/platform/linux_platform.cpp
|
||||
knx/platform/linux_platform.h
|
||||
knx/platform.cpp
|
||||
knx/platform.h
|
||||
knx/property.cpp
|
||||
knx/property.h
|
||||
knx/rf/rf_data_link_layer.cpp
|
||||
knx/rf/rf_data_link_layer.h
|
||||
knx/rf/rf_medium_object.cpp
|
||||
knx/rf/rf_medium_object.h
|
||||
knx/rf/rf_physical_layer.h
|
||||
knx/rf/rf_physical_layer_cc1101.cpp
|
||||
knx/rf/rf_physical_layer_cc1101.h
|
||||
knx/rf/rf_physical_layer_cc1310.cpp
|
||||
knx/rf/rf_physical_layer_cc1310.h
|
||||
knx/router_object.cpp
|
||||
knx/router_object.h
|
||||
knx/save_restore.h
|
||||
knx/secure_application_layer.cpp
|
||||
knx/secure_application_layer.h
|
||||
knx/security_interface_object.cpp
|
||||
knx/security_interface_object.h
|
||||
knx/table_object.cpp
|
||||
knx/table_object.h
|
||||
knx/tpdu.cpp
|
||||
knx/tpdu.h
|
||||
knx/tpuart_data_link_layer.cpp
|
||||
knx/tpuart_data_link_layer.h
|
||||
knx/tp_frame.h
|
||||
knx/transport_layer.cpp
|
||||
knx/transport_layer.h
|
||||
knx/usb_tunnel_interface.cpp
|
||||
knx/usb_tunnel_interface.h
|
||||
knx/util/aes.c
|
||||
knx/util/aes.h
|
||||
knx/util/aes.hpp
|
||||
knx/util/simple_map.h
|
||||
knx.h
|
||||
knx_facade.cpp
|
||||
knx_facade.h
|
||||
)
|
||||
|
||||
|
||||
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wall -Wno-unknown-pragmas -g -O0")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall -Wno-unknown-pragmas -g -O0")
|
||||
|
||||
add_library(knx ${SOURCES})
|
||||
target_include_directories(knx PUBLIC .)
|
||||
set_property(TARGET knx PROPERTY CXX_STANDARD 11)
|
||||
target_compile_definitions(knx PUBLIC -DUSE_RF -DUSE_USB -DUSE_CEMI_SERVER -DKNX_TUNNELING=1)
|
@ -1,5 +1,4 @@
|
||||
#include "config.h"
|
||||
#if MASK_VERSION == 0x07B0
|
||||
|
||||
#include "bau07B0.h"
|
||||
#include "bits.h"
|
||||
@ -175,4 +174,3 @@ TpUartDataLinkLayer* Bau07B0::getDataLinkLayer()
|
||||
{
|
||||
return (TpUartDataLinkLayer*)&_dlLayer;
|
||||
}
|
||||
#endif
|
||||
|
@ -1,7 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "config.h"
|
||||
#if MASK_VERSION == 0x07B0
|
||||
|
||||
#include "bau_systemB_device.h"
|
||||
#include "tpuart_data_link_layer.h"
|
||||
@ -31,4 +30,3 @@ class Bau07B0 : public BauSystemBDevice, public ITpUartCallBacks, public DataLin
|
||||
CemiServerObject _cemiServerObject;
|
||||
#endif
|
||||
};
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#include "config.h"
|
||||
#if MASK_VERSION == 0x091A
|
||||
|
||||
#include "bau091A.h"
|
||||
#include "bits.h"
|
||||
@ -254,4 +253,3 @@ TpUartDataLinkLayer* Bau091A::getSecondaryDataLinkLayer()
|
||||
{
|
||||
return (TpUartDataLinkLayer*)&_dlLayerSecondary;
|
||||
}
|
||||
#endif
|
||||
|
@ -1,12 +1,11 @@
|
||||
#pragma once
|
||||
|
||||
#include "config.h"
|
||||
#if MASK_VERSION == 0x091A
|
||||
|
||||
#include "bau_systemB_coupler.h"
|
||||
#include "router_object.h"
|
||||
#include "ip_parameter_object.h"
|
||||
#include "ip_data_link_layer.h"
|
||||
#include "ip/ip_parameter_object.h"
|
||||
#include "ip/ip_data_link_layer.h"
|
||||
#include "tpuart_data_link_layer.h"
|
||||
#include "cemi_server_object.h"
|
||||
|
||||
@ -39,4 +38,3 @@ class Bau091A : public BauSystemBCoupler, public ITpUartCallBacks, public DataLi
|
||||
CemiServerObject _cemiServerObject;
|
||||
#endif
|
||||
};
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#include "config.h"
|
||||
#if MASK_VERSION == 0x27B0
|
||||
|
||||
#include "bau27B0.h"
|
||||
#include "bits.h"
|
||||
@ -204,4 +203,3 @@ RfDataLinkLayer* Bau27B0::getDataLinkLayer()
|
||||
{
|
||||
return (RfDataLinkLayer*)&_dlLayer;
|
||||
}
|
||||
#endif // #ifdef USE_RF
|
||||
|
@ -1,16 +1,15 @@
|
||||
#pragma once
|
||||
|
||||
#include "config.h"
|
||||
#if MASK_VERSION == 0x27B0
|
||||
|
||||
#include "bau_systemB_device.h"
|
||||
#include "rf_medium_object.h"
|
||||
#include "rf/rf_medium_object.h"
|
||||
#if defined(DeviceFamily_CC13X0)
|
||||
#include "rf_physical_layer_cc1310.h"
|
||||
#include "rf/rf_physical_layer_cc1310.h"
|
||||
#else
|
||||
#include "rf_physical_layer_cc1101.h"
|
||||
#include "rf/rf_physical_layer_cc1101.h"
|
||||
#endif
|
||||
#include "rf_data_link_layer.h"
|
||||
#include "rf/rf_data_link_layer.h"
|
||||
#include "cemi_server.h"
|
||||
#include "cemi_server_object.h"
|
||||
|
||||
@ -44,4 +43,3 @@ class Bau27B0 : public BauSystemBDevice
|
||||
const uint8_t* knxSerialNumber, bool status) override;
|
||||
void domainAddressSerialNumberReadLocalConfirm(Priority priority, HopCountType hopType, const SecurityControl& secCtrl, const uint8_t* knxSerialNumber, bool status) override;
|
||||
};
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#include "config.h"
|
||||
#if MASK_VERSION == 0x2920
|
||||
|
||||
#include "bau2920.h"
|
||||
#include "bits.h"
|
||||
@ -178,4 +177,3 @@ RfDataLinkLayer* Bau2920::getSecondaryDataLinkLayer()
|
||||
{
|
||||
return (RfDataLinkLayer*)&_dlLayerSecondary;
|
||||
}
|
||||
#endif
|
||||
|
@ -1,17 +1,16 @@
|
||||
#pragma once
|
||||
|
||||
#include "config.h"
|
||||
#if MASK_VERSION == 0x2920
|
||||
|
||||
#include "bau_systemB_coupler.h"
|
||||
#include "tpuart_data_link_layer.h"
|
||||
#if defined(DeviceFamily_CC13X0)
|
||||
#include "rf_physical_layer_cc1310.h"
|
||||
#include "rf/rf_physical_layer_cc1310.h"
|
||||
#else
|
||||
#include "rf_physical_layer_cc1101.h"
|
||||
#include "rf/rf_physical_layer_cc1101.h"
|
||||
#endif
|
||||
#include "rf_data_link_layer.h"
|
||||
#include "rf_medium_object.h"
|
||||
#include "rf/rf_data_link_layer.h"
|
||||
#include "rf/rf_medium_object.h"
|
||||
#include "cemi_server_object.h"
|
||||
|
||||
class Bau2920 : public BauSystemBCoupler
|
||||
@ -40,4 +39,3 @@ class Bau2920 : public BauSystemBCoupler
|
||||
CemiServerObject _cemiServerObject;
|
||||
#endif
|
||||
};
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#include "config.h"
|
||||
#if MASK_VERSION == 0x57B0
|
||||
|
||||
#include "bau57B0.h"
|
||||
#include "bits.h"
|
||||
@ -166,4 +165,3 @@ IpDataLinkLayer* Bau57B0::getDataLinkLayer()
|
||||
{
|
||||
return (IpDataLinkLayer*)&_dlLayer;
|
||||
}
|
||||
#endif
|
||||
|
@ -1,11 +1,10 @@
|
||||
#pragma once
|
||||
|
||||
#include "config.h"
|
||||
#if MASK_VERSION == 0x57B0
|
||||
|
||||
#include "bau_systemB_device.h"
|
||||
#include "ip_parameter_object.h"
|
||||
#include "ip_data_link_layer.h"
|
||||
#include "ip/ip_parameter_object.h"
|
||||
#include "ip/ip_data_link_layer.h"
|
||||
#include "cemi_server_object.h"
|
||||
|
||||
class Bau57B0 : public BauSystemBDevice, public DataLinkLayerCallbacks
|
||||
@ -30,4 +29,3 @@ class Bau57B0 : public BauSystemBDevice, public DataLinkLayerCallbacks
|
||||
CemiServerObject _cemiServerObject;
|
||||
#endif
|
||||
};
|
||||
#endif
|
||||
|
@ -165,9 +165,7 @@ void CemiFrame::fillTelegramTP(uint8_t* data)
|
||||
|
||||
data[len - 1] = calcCrcTP(data, len - 1);
|
||||
}
|
||||
|
||||
#ifdef USE_RF
|
||||
|
||||
uint16_t CemiFrame::telegramLengthtRF() const
|
||||
{
|
||||
return totalLenght() - 3;
|
||||
|
@ -57,7 +57,6 @@ class CemiFrame
|
||||
uint16_t destinationAddress() const;
|
||||
void destinationAddress(uint16_t value);
|
||||
|
||||
#ifdef USE_RF
|
||||
// only for RF medium
|
||||
uint8_t* rfSerialOrDoA() const;
|
||||
void rfSerialOrDoA(const uint8_t* rfSerialOrDoA);
|
||||
@ -65,7 +64,7 @@ class CemiFrame
|
||||
void rfInfo(uint8_t rfInfo);
|
||||
uint8_t rfLfn() const;
|
||||
void rfLfn(uint8_t rfInfo);
|
||||
#endif
|
||||
|
||||
NPDU& npdu();
|
||||
TPDU& tpdu();
|
||||
APDU& apdu();
|
||||
@ -81,7 +80,6 @@ class CemiFrame
|
||||
TPDU _tpdu;
|
||||
APDU _apdu;
|
||||
uint16_t _length = 0; // only set if created from byte array
|
||||
|
||||
#ifdef USE_RF
|
||||
// FIXME: integrate this propery in _data
|
||||
// only for RF medium
|
||||
@ -89,6 +87,5 @@ class CemiFrame
|
||||
uint8_t _rfInfo = 0;
|
||||
uint8_t _rfLfn = 0xFF; // RF Data Link layer frame number
|
||||
#endif
|
||||
|
||||
uint8_t _sourceInterfaceIndex;
|
||||
};
|
||||
|
@ -72,14 +72,8 @@ void CemiServer::dataConfirmationToTunnel(CemiFrame& frame)
|
||||
|
||||
void CemiServer::dataIndicationToTunnel(CemiFrame& frame)
|
||||
{
|
||||
#ifdef USE_RF
|
||||
bool isRf = _dataLinkLayer->mediumType() == DptMedium::KNX_RF;
|
||||
uint8_t data[frame.dataLength() + (isRf ? 10 : 0)];
|
||||
#else
|
||||
uint8_t data[frame.dataLength()];
|
||||
#endif
|
||||
|
||||
#ifdef USE_RF
|
||||
|
||||
if (isRf)
|
||||
{
|
||||
@ -94,13 +88,9 @@ void CemiServer::dataIndicationToTunnel(CemiFrame& frame)
|
||||
}
|
||||
else
|
||||
{
|
||||
#endif
|
||||
memcpy(&data[0], frame.data(), frame.dataLength());
|
||||
#ifdef USE_RF
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
CemiFrame tmpFrame(data, sizeof(data));
|
||||
|
||||
#ifdef KNX_LOG_TUNNELING
|
||||
@ -189,8 +179,6 @@ void CemiServer::handleLData(CemiFrame& frame)
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef USE_RF
|
||||
|
||||
if (_dataLinkLayer->mediumType() == DptMedium::KNX_RF)
|
||||
{
|
||||
// Check if we have additional info for RF
|
||||
@ -224,8 +212,6 @@ void CemiServer::handleLData(CemiFrame& frame)
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef KNX_LOG_TUNNELING
|
||||
print("L_data_req: src: ");
|
||||
print(frame.sourceAddress(), HEX);
|
||||
|
@ -27,32 +27,19 @@
|
||||
//#define MASK_VERSION 0x2920
|
||||
|
||||
// Data Linklayer Driver Options
|
||||
#if MASK_VERSION == 0x07B0
|
||||
#define USE_TP
|
||||
#endif
|
||||
|
||||
#if MASK_VERSION == 0x27B0
|
||||
#if MASK_VERSION == 0x27B0 && !defined(USE_RF)
|
||||
#define USE_RF
|
||||
#endif
|
||||
|
||||
#if MASK_VERSION == 0x57B0
|
||||
#define USE_IP
|
||||
#endif
|
||||
|
||||
#if MASK_VERSION == 0x091A
|
||||
#define USE_TP
|
||||
#define USE_IP
|
||||
#endif
|
||||
|
||||
#if MASK_VERSION == 0x2920
|
||||
#define USE_TP
|
||||
#if MASK_VERSION == 0x2920 && !defined(USE_RF)
|
||||
#define USE_RF
|
||||
#endif
|
||||
|
||||
// cEMI options
|
||||
//#define USE_USB
|
||||
//#define USE_CEMI_SERVER
|
||||
#if defined(USE_USB) || defined(KNX_TUNNELING)
|
||||
#if (defined(USE_USB) || defined(KNX_TUNNELING)) && !defined(USE_CEMI_SERVER)
|
||||
#define USE_CEMI_SERVER
|
||||
#endif
|
||||
|
||||
@ -77,8 +64,3 @@
|
||||
//#define KNX_NO_DEFAULT_UART
|
||||
|
||||
#endif
|
||||
|
||||
#if !defined(MASK_VERSION)
|
||||
#error MASK_VERSION must be defined! See config.h for possible values!
|
||||
#endif
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
#include "knx_types.h"
|
||||
#include "network_layer_entity.h"
|
||||
#ifdef KNX_TUNNELING
|
||||
#include "ip_parameter_object.h"
|
||||
#include "ip/ip_parameter_object.h"
|
||||
#endif
|
||||
#include "cemi_server.h"
|
||||
#include "bau.h"
|
||||
|
@ -1,17 +1,14 @@
|
||||
#include "config.h"
|
||||
#ifdef USE_IP
|
||||
|
||||
#include "ip_data_link_layer.h"
|
||||
|
||||
#include "bits.h"
|
||||
#include "platform.h"
|
||||
#include "device_object.h"
|
||||
#include "../bits.h"
|
||||
#include "../platform.h"
|
||||
#include "../device_object.h"
|
||||
#include "knx_ip_routing_indication.h"
|
||||
#include "knx_ip_search_request.h"
|
||||
#include "knx_ip_search_response.h"
|
||||
#include "knx_ip_search_request_extended.h"
|
||||
#include "knx_ip_search_response_extended.h"
|
||||
#include "knx_facade.h"
|
||||
|
||||
#ifdef KNX_TUNNELING
|
||||
#include "knx_ip_connect_request.h"
|
||||
#include "knx_ip_connect_response.h"
|
||||
@ -354,9 +351,7 @@ void IpDataLinkLayer::loop()
|
||||
|
||||
case SearchRequestExt:
|
||||
{
|
||||
#if KNX_SERVICE_FAMILY_CORE >= 2
|
||||
loopHandleSearchRequestExtended(buffer, len);
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
|
||||
@ -421,7 +416,6 @@ void IpDataLinkLayer::loop()
|
||||
}
|
||||
}
|
||||
|
||||
#if KNX_SERVICE_FAMILY_CORE >= 2
|
||||
void IpDataLinkLayer::loopHandleSearchRequestExtended(uint8_t* buffer, uint16_t length)
|
||||
{
|
||||
KnxIpSearchRequestExtended searchRequest(buffer, length);
|
||||
@ -430,7 +424,7 @@ void IpDataLinkLayer::loopHandleSearchRequestExtended(uint8_t* buffer, uint16_t
|
||||
{
|
||||
println("srpByProgMode");
|
||||
|
||||
if (!knx.progMode())
|
||||
if (!_deviceObject.progMode())
|
||||
return;
|
||||
}
|
||||
|
||||
@ -551,9 +545,10 @@ void IpDataLinkLayer::loopHandleSearchRequestExtended(uint8_t* buffer, uint16_t
|
||||
{
|
||||
//println("requested MANUFACTURER_DATA but not implemented");
|
||||
}
|
||||
|
||||
#ifdef KNX_TUNNELING
|
||||
if (searchRequest.requestedDIB(TUNNELING_INFO))
|
||||
searchResponse.setTunnelingInfo(_ipParameters, _deviceObject, tunnels);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (searchResponse.totalLength() > 150)
|
||||
@ -564,7 +559,7 @@ void IpDataLinkLayer::loopHandleSearchRequestExtended(uint8_t* buffer, uint16_t
|
||||
|
||||
_platform.sendBytesUniCast(searchRequest.hpai().ipAddress(), searchRequest.hpai().ipPortNumber(), searchResponse.data(), searchResponse.totalLength());
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef KNX_TUNNELING
|
||||
void IpDataLinkLayer::loopHandleConnectRequest(uint8_t* buffer, uint16_t length, uint32_t& src_addr, uint16_t& src_port)
|
||||
@ -1189,4 +1184,3 @@ bool IpDataLinkLayer::isSendLimitReached()
|
||||
return false;
|
||||
}
|
||||
}
|
||||
#endif
|
@ -1,10 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "config.h"
|
||||
#ifdef USE_IP
|
||||
|
||||
#include <stdint.h>
|
||||
#include "data_link_layer.h"
|
||||
#include "../data_link_layer.h"
|
||||
#include "ip_parameter_object.h"
|
||||
#include "knx_ip_tunnel_connection.h"
|
||||
#include "service_families.h"
|
||||
@ -44,9 +41,7 @@ class IpDataLinkLayer : public DataLinkLayer
|
||||
void loopHandleDeviceConfigurationRequest(uint8_t* buffer, uint16_t length);
|
||||
void loopHandleTunnelingRequest(uint8_t* buffer, uint16_t length);
|
||||
#endif
|
||||
#if KNX_SERVICE_FAMILY_CORE >= 2
|
||||
void loopHandleSearchRequestExtended(uint8_t* buffer, uint16_t length);
|
||||
#endif
|
||||
bool sendBytes(uint8_t* buffer, uint16_t length);
|
||||
bool isSendLimitReached();
|
||||
IpParameterObject& _ipParameters;
|
||||
@ -55,5 +50,4 @@ class IpDataLinkLayer : public DataLinkLayer
|
||||
KnxIpTunnelConnection tunnels[KNX_TUNNELING];
|
||||
uint8_t _lastChannelId = 1;
|
||||
#endif
|
||||
};
|
||||
#endif
|
||||
};
|
@ -1,6 +1,6 @@
|
||||
#include "ip_host_protocol_address_information.h"
|
||||
#include "bits.h"
|
||||
#ifdef USE_IP
|
||||
#include "../bits.h"
|
||||
|
||||
IpHostProtocolAddressInformation::IpHostProtocolAddressInformation(uint8_t* data)
|
||||
: _data(data)
|
||||
{}
|
||||
@ -45,4 +45,3 @@ void IpHostProtocolAddressInformation::ipPortNumber(uint16_t value)
|
||||
{
|
||||
pushWord(value, _data + 6);
|
||||
}
|
||||
#endif
|
@ -1,7 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#include "config.h"
|
||||
|
||||
enum HostProtocolCode : uint8_t
|
||||
{
|
||||
@ -9,8 +8,6 @@ enum HostProtocolCode : uint8_t
|
||||
IPV4_TCP = 2
|
||||
};
|
||||
|
||||
#ifdef USE_IP
|
||||
|
||||
#define LEN_IPHPAI 8
|
||||
#define LEN_CRD 4
|
||||
|
||||
@ -29,5 +26,4 @@ class IpHostProtocolAddressInformation
|
||||
|
||||
private:
|
||||
uint8_t* _data;
|
||||
};
|
||||
#endif
|
||||
};
|
@ -1,10 +1,8 @@
|
||||
#include "ip_parameter_object.h"
|
||||
#ifdef USE_IP
|
||||
#include "device_object.h"
|
||||
#include "platform.h"
|
||||
#include "bits.h"
|
||||
#include "data_property.h"
|
||||
#include "callback_property.h"
|
||||
|
||||
#include "../bits.h"
|
||||
#include "../data_property.h"
|
||||
#include "../callback_property.h"
|
||||
|
||||
// 224.0.23.12
|
||||
#define DEFAULT_MULTICAST_ADDR ((uint32_t)0xE000170C)
|
||||
@ -139,5 +137,3 @@ uint16_t* IpParameterObject::additionalIndivualAddresses(uint8_t& numAddresses)
|
||||
#endif
|
||||
return (uint16_t*) propertyData(PID_ADDITIONAL_INDIVIDUAL_ADDRESSES);
|
||||
}
|
||||
|
||||
#endif
|
@ -1,10 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
#include "config.h"
|
||||
#ifdef USE_IP
|
||||
#include "interface_object.h"
|
||||
#include "device_object.h"
|
||||
#include "platform.h"
|
||||
#include "../interface_object.h"
|
||||
#include "../device_object.h"
|
||||
#include "../platform.h"
|
||||
|
||||
#define KNXIP_MULTICAST_PORT 3671
|
||||
|
||||
@ -17,4 +15,3 @@ class IpParameterObject : public InterfaceObject
|
||||
DeviceObject& _deviceObject;
|
||||
Platform& _platform;
|
||||
};
|
||||
#endif
|
@ -1,5 +1,5 @@
|
||||
#include "knx_ip_ch.h"
|
||||
#ifdef USE_IP
|
||||
|
||||
KnxIpCH::KnxIpCH(uint8_t* data) : _data(data)
|
||||
{}
|
||||
|
||||
@ -45,4 +45,3 @@ uint8_t KnxIpCH::status() const
|
||||
{
|
||||
return _data[3];
|
||||
}
|
||||
#endif
|
@ -1,9 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#include "config.h"
|
||||
|
||||
#ifdef USE_IP
|
||||
|
||||
#define LEN_CH 4
|
||||
|
||||
@ -25,4 +22,3 @@ class KnxIpCH
|
||||
protected:
|
||||
uint8_t* _data = 0;
|
||||
};
|
||||
#endif
|
@ -1,6 +1,5 @@
|
||||
#include "knx_ip_config_dib.h"
|
||||
|
||||
#ifdef USE_IP
|
||||
KnxIpConfigDIB::KnxIpConfigDIB(uint8_t* data, bool isCurrent) : KnxIpDIB(data)
|
||||
{
|
||||
_isCurrent = isCurrent;
|
||||
@ -91,5 +90,3 @@ void KnxIpConfigDIB::info2(uint8_t addr)
|
||||
else
|
||||
_data[19] = addr;
|
||||
}
|
||||
|
||||
#endif
|
@ -1,8 +1,7 @@
|
||||
#pragma once
|
||||
#include "knx_ip_dib.h"
|
||||
#include "bits.h"
|
||||
#include "../bits.h"
|
||||
|
||||
#ifdef USE_IP
|
||||
#define LEN_IP_CONFIG_DIB 16
|
||||
#define LEN_IP_CURRENT_CONFIG_DIB 20
|
||||
|
||||
@ -24,5 +23,4 @@ class KnxIpConfigDIB : public KnxIpDIB
|
||||
void info2(uint8_t addr);
|
||||
private:
|
||||
bool _isCurrent = false;
|
||||
};
|
||||
#endif
|
||||
};
|
@ -1,5 +1,5 @@
|
||||
#include "knx_ip_config_request.h"
|
||||
#ifdef USE_IP
|
||||
|
||||
KnxIpConfigRequest::KnxIpConfigRequest(uint8_t* data, uint16_t length)
|
||||
: KnxIpFrame(data, length), _frame(data + LEN_KNXIP_HEADER + LEN_CH, length - LEN_KNXIP_HEADER - LEN_CH), _ch(data + LEN_KNXIP_HEADER)
|
||||
{
|
||||
@ -14,4 +14,3 @@ KnxIpCH& KnxIpConfigRequest::connectionHeader()
|
||||
{
|
||||
return _ch;
|
||||
}
|
||||
#endif
|
@ -3,7 +3,7 @@
|
||||
#include "knx_ip_frame.h"
|
||||
#include "knx_ip_ch.h"
|
||||
#include "ip_host_protocol_address_information.h"
|
||||
#ifdef USE_IP
|
||||
|
||||
class KnxIpConfigRequest : public KnxIpFrame
|
||||
{
|
||||
public:
|
||||
@ -14,4 +14,3 @@ class KnxIpConfigRequest : public KnxIpFrame
|
||||
CemiFrame _frame;
|
||||
KnxIpCH _ch;
|
||||
};
|
||||
#endif
|
@ -1,5 +1,5 @@
|
||||
#include "knx_ip_connect_request.h"
|
||||
#ifdef USE_IP
|
||||
|
||||
KnxIpConnectRequest::KnxIpConnectRequest(uint8_t* data, uint16_t length)
|
||||
: KnxIpFrame(data, length), _hpaiCtrl(data + LEN_KNXIP_HEADER), _hpaiData(data + LEN_KNXIP_HEADER + LEN_IPHPAI), _cri(data + LEN_KNXIP_HEADER + 2 * LEN_IPHPAI)
|
||||
{
|
||||
@ -18,4 +18,3 @@ KnxIpCRI& KnxIpConnectRequest::cri()
|
||||
{
|
||||
return _cri;
|
||||
}
|
||||
#endif
|
@ -3,7 +3,7 @@
|
||||
#include "knx_ip_frame.h"
|
||||
#include "knx_ip_cri.h"
|
||||
#include "ip_host_protocol_address_information.h"
|
||||
#ifdef USE_IP
|
||||
|
||||
class KnxIpConnectRequest : public KnxIpFrame
|
||||
{
|
||||
public:
|
||||
@ -16,4 +16,3 @@ class KnxIpConnectRequest : public KnxIpFrame
|
||||
IpHostProtocolAddressInformation _hpaiData;
|
||||
KnxIpCRI _cri;
|
||||
};
|
||||
#endif
|
@ -1,5 +1,4 @@
|
||||
#include "knx_ip_connect_response.h"
|
||||
#ifdef USE_IP
|
||||
|
||||
KnxIpConnectResponse::KnxIpConnectResponse(IpParameterObject& parameters, uint16_t address, uint16_t port, uint8_t channel, uint8_t type)
|
||||
: KnxIpFrame(LEN_KNXIP_HEADER + 1 /*Channel*/ + 1 /*Status*/ + LEN_IPHPAI + ((type == 4) ? 4 : 2)),
|
||||
@ -41,5 +40,3 @@ KnxIpCRD& KnxIpConnectResponse::crd()
|
||||
{
|
||||
return _crd;
|
||||
}
|
||||
|
||||
#endif
|
@ -6,7 +6,6 @@
|
||||
#include "knx_ip_device_information_dib.h"
|
||||
#include "knx_ip_supported_service_dib.h"
|
||||
#include "ip_parameter_object.h"
|
||||
#ifdef USE_IP
|
||||
|
||||
enum KnxIpConnectionRequestErrorCodes
|
||||
{
|
||||
@ -41,5 +40,3 @@ class KnxIpConnectResponse : public KnxIpFrame
|
||||
IpHostProtocolAddressInformation _controlEndpoint;
|
||||
KnxIpCRD _crd;
|
||||
};
|
||||
|
||||
#endif
|
@ -1,5 +1,5 @@
|
||||
#include "knx_ip_crd.h"
|
||||
#ifdef USE_IP
|
||||
|
||||
KnxIpCRD::KnxIpCRD(uint8_t* data) : _data(data)
|
||||
{}
|
||||
|
||||
@ -38,4 +38,3 @@ void KnxIpCRD::address(uint16_t value)
|
||||
_data[2] = value >> 8;
|
||||
_data[3] = value & 0xFF;
|
||||
}
|
||||
#endif
|
@ -1,9 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#include "config.h"
|
||||
|
||||
#ifdef USE_IP
|
||||
|
||||
class KnxIpCRD
|
||||
{
|
||||
@ -20,4 +17,3 @@ class KnxIpCRD
|
||||
protected:
|
||||
uint8_t* _data = 0;
|
||||
};
|
||||
#endif
|
@ -1,5 +1,5 @@
|
||||
#include "knx_ip_cri.h"
|
||||
#ifdef USE_IP
|
||||
|
||||
KnxIpCRI::KnxIpCRI(uint8_t* data) : _data(data)
|
||||
{}
|
||||
|
||||
@ -35,4 +35,3 @@ void KnxIpCRI::layer(uint8_t value)
|
||||
{
|
||||
_data[2] = value;
|
||||
}
|
||||
#endif
|
@ -1,9 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#include "config.h"
|
||||
|
||||
#ifdef USE_IP
|
||||
|
||||
#define LEN_CRI 4
|
||||
|
||||
@ -33,4 +30,3 @@ class KnxIpCRI
|
||||
protected:
|
||||
uint8_t* _data = 0;
|
||||
};
|
||||
#endif
|
@ -1,5 +1,5 @@
|
||||
#include "knx_ip_description_request.h"
|
||||
#ifdef USE_IP
|
||||
|
||||
KnxIpDescriptionRequest::KnxIpDescriptionRequest(uint8_t* data, uint16_t length)
|
||||
: KnxIpFrame(data, length), _hpaiCtrl(data + LEN_KNXIP_HEADER)
|
||||
{
|
||||
@ -10,4 +10,3 @@ IpHostProtocolAddressInformation& KnxIpDescriptionRequest::hpaiCtrl()
|
||||
{
|
||||
return _hpaiCtrl;
|
||||
}
|
||||
#endif
|
@ -3,7 +3,7 @@
|
||||
#include "knx_ip_frame.h"
|
||||
#include "knx_ip_cri.h"
|
||||
#include "ip_host_protocol_address_information.h"
|
||||
#ifdef USE_IP
|
||||
|
||||
class KnxIpDescriptionRequest : public KnxIpFrame
|
||||
{
|
||||
public:
|
||||
@ -12,4 +12,3 @@ class KnxIpDescriptionRequest : public KnxIpFrame
|
||||
private:
|
||||
IpHostProtocolAddressInformation _hpaiCtrl;
|
||||
};
|
||||
#endif
|
@ -1,5 +1,4 @@
|
||||
#include "knx_ip_description_response.h"
|
||||
#ifdef USE_IP
|
||||
|
||||
#define LEN_SERVICE_FAMILIES 2
|
||||
#if MASK_VERSION == 0x091A
|
||||
@ -69,4 +68,3 @@ KnxIpSupportedServiceDIB& KnxIpDescriptionResponse::supportedServices()
|
||||
{
|
||||
return _supportedServices;
|
||||
}
|
||||
#endif
|
@ -5,7 +5,6 @@
|
||||
#include "knx_ip_device_information_dib.h"
|
||||
#include "knx_ip_supported_service_dib.h"
|
||||
#include "ip_parameter_object.h"
|
||||
#ifdef USE_IP
|
||||
|
||||
class KnxIpDescriptionResponse : public KnxIpFrame
|
||||
{
|
||||
@ -17,5 +16,3 @@ class KnxIpDescriptionResponse : public KnxIpFrame
|
||||
KnxIpDeviceInformationDIB _deviceInfo;
|
||||
KnxIpSupportedServiceDIB _supportedServices;
|
||||
};
|
||||
|
||||
#endif
|
@ -1,7 +1,6 @@
|
||||
#include "knx_ip_device_information_dib.h"
|
||||
#include "bits.h"
|
||||
#include "../bits.h"
|
||||
|
||||
#ifdef USE_IP
|
||||
KnxIpDeviceInformationDIB::KnxIpDeviceInformationDIB(uint8_t* data) : KnxIpDIB(data)
|
||||
{}
|
||||
|
||||
@ -98,5 +97,4 @@ const uint8_t* KnxIpDeviceInformationDIB::friendlyName() const
|
||||
void KnxIpDeviceInformationDIB::friendlyName(const uint8_t* value)
|
||||
{
|
||||
pushByteArray(value, LEN_FRIENDLY_NAME, _data + 24);
|
||||
}
|
||||
#endif
|
||||
}
|
@ -1,7 +1,6 @@
|
||||
#pragma once
|
||||
#include "knx_ip_dib.h"
|
||||
|
||||
#ifdef USE_IP
|
||||
#define LEN_DEVICE_INFORMATION_DIB 54
|
||||
#define LEN_SERIAL_NUMBER 6
|
||||
#define LEN_MAC_ADDRESS 6
|
||||
@ -28,5 +27,3 @@ class KnxIpDeviceInformationDIB : public KnxIpDIB
|
||||
const uint8_t* friendlyName() const;
|
||||
void friendlyName(const uint8_t* value);
|
||||
};
|
||||
|
||||
#endif
|
@ -1,5 +1,5 @@
|
||||
#include "knx_ip_dib.h"
|
||||
#ifdef USE_IP
|
||||
|
||||
KnxIpDIB::KnxIpDIB(uint8_t* data) : _data(data)
|
||||
{}
|
||||
|
||||
@ -25,4 +25,3 @@ void KnxIpDIB::code(DescriptionTypeCode value)
|
||||
{
|
||||
_data[1] = value;
|
||||
}
|
||||
#endif
|
@ -1,9 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#include "config.h"
|
||||
|
||||
#ifdef USE_IP
|
||||
|
||||
enum DescriptionTypeCode : uint8_t
|
||||
{
|
||||
@ -31,4 +28,3 @@ class KnxIpDIB
|
||||
protected:
|
||||
uint8_t* _data = 0;
|
||||
};
|
||||
#endif
|
@ -1,5 +1,5 @@
|
||||
#include "knx_ip_disconnect_request.h"
|
||||
#ifdef USE_IP
|
||||
|
||||
KnxIpDisconnectRequest::KnxIpDisconnectRequest(uint8_t* data, uint16_t length)
|
||||
: KnxIpFrame(data, length), _hpaiCtrl(data + LEN_KNXIP_HEADER + 1 /*ChannelId*/ + 1 /*Reserved*/)
|
||||
{
|
||||
@ -23,4 +23,3 @@ void KnxIpDisconnectRequest::channelId(uint8_t channelId)
|
||||
{
|
||||
_data[LEN_KNXIP_HEADER] = channelId;
|
||||
}
|
||||
#endif
|
@ -2,7 +2,7 @@
|
||||
|
||||
#include "knx_ip_frame.h"
|
||||
#include "ip_host_protocol_address_information.h"
|
||||
#ifdef USE_IP
|
||||
|
||||
class KnxIpDisconnectRequest : public KnxIpFrame
|
||||
{
|
||||
public:
|
||||
@ -14,4 +14,3 @@ class KnxIpDisconnectRequest : public KnxIpFrame
|
||||
private:
|
||||
IpHostProtocolAddressInformation _hpaiCtrl;
|
||||
};
|
||||
#endif
|
@ -1,5 +1,4 @@
|
||||
#include "knx_ip_disconnect_response.h"
|
||||
#ifdef USE_IP
|
||||
|
||||
KnxIpDisconnectResponse::KnxIpDisconnectResponse(uint8_t channel, uint8_t status)
|
||||
: KnxIpFrame(LEN_KNXIP_HEADER + 1 /*Channel*/ + 1 /*Status*/)
|
||||
@ -9,4 +8,3 @@ KnxIpDisconnectResponse::KnxIpDisconnectResponse(uint8_t channel, uint8_t status
|
||||
_data[LEN_KNXIP_HEADER] = channel;
|
||||
_data[LEN_KNXIP_HEADER + 1] = status;
|
||||
}
|
||||
#endif
|
@ -1,7 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "knx_ip_frame.h"
|
||||
#ifdef USE_IP
|
||||
|
||||
class KnxIpDisconnectResponse : public KnxIpFrame
|
||||
{
|
||||
@ -9,5 +8,3 @@ class KnxIpDisconnectResponse : public KnxIpFrame
|
||||
KnxIpDisconnectResponse(uint8_t channel, uint8_t status);
|
||||
private:
|
||||
};
|
||||
|
||||
#endif
|
@ -1,7 +1,6 @@
|
||||
#include "knx_ip_extended_device_information_dib.h"
|
||||
#include "bits.h"
|
||||
#include "../bits.h"
|
||||
|
||||
#ifdef USE_IP
|
||||
KnxIpExtendedDeviceInformationDIB::KnxIpExtendedDeviceInformationDIB(uint8_t* data) : KnxIpDIB(data)
|
||||
{}
|
||||
|
||||
@ -39,4 +38,3 @@ void KnxIpExtendedDeviceInformationDIB::deviceDescriptor(uint16_t value)
|
||||
{
|
||||
pushWord(value, _data + 6);
|
||||
}
|
||||
#endif
|
@ -1,7 +1,6 @@
|
||||
#pragma once
|
||||
#include "knx_ip_dib.h"
|
||||
|
||||
#ifdef USE_IP
|
||||
#define LEN_EXTENDED_DEVICE_INFORMATION_DIB 8
|
||||
|
||||
class KnxIpExtendedDeviceInformationDIB : public KnxIpDIB
|
||||
@ -15,5 +14,3 @@ class KnxIpExtendedDeviceInformationDIB : public KnxIpDIB
|
||||
uint16_t deviceDescriptor() const;
|
||||
void deviceDescriptor(uint16_t value);
|
||||
};
|
||||
|
||||
#endif
|
@ -1,9 +1,7 @@
|
||||
#include "knx_ip_frame.h"
|
||||
|
||||
#ifdef USE_IP
|
||||
|
||||
#include <cstring>
|
||||
#include "bits.h"
|
||||
#include "../bits.h"
|
||||
|
||||
#define KNXIP_HEADER_LEN 0x6
|
||||
#define KNXIP_PROTOCOL_VERSION 0x10
|
||||
@ -78,4 +76,3 @@ KnxIpFrame::KnxIpFrame(uint16_t length)
|
||||
protocolVersion(KnxIp1_0);
|
||||
totalLength(length);
|
||||
}
|
||||
#endif
|
@ -1,8 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "cemi_frame.h"
|
||||
#include "config.h"
|
||||
#ifdef USE_IP
|
||||
#include "../cemi_frame.h"
|
||||
|
||||
#define LEN_KNXIP_HEADER 0x6
|
||||
|
||||
@ -54,4 +52,3 @@ class KnxIpFrame
|
||||
uint8_t* _data = 0;
|
||||
uint16_t _dataLength;
|
||||
};
|
||||
#endif
|
@ -1,6 +1,5 @@
|
||||
#include "knx_ip_knx_addresses_dib.h"
|
||||
|
||||
#ifdef USE_IP
|
||||
KnxIpKnxAddressesDIB::KnxIpKnxAddressesDIB(uint8_t* data) : KnxIpDIB(data)
|
||||
{
|
||||
currentPos = data + 4;
|
||||
@ -24,4 +23,3 @@ void KnxIpKnxAddressesDIB::additional(uint16_t addr)
|
||||
currentPos += 2;
|
||||
length(currentPos - _data);
|
||||
}
|
||||
#endif
|
@ -1,8 +1,6 @@
|
||||
#pragma once
|
||||
#include "knx_ip_dib.h"
|
||||
#include "bits.h"
|
||||
|
||||
#ifdef USE_IP
|
||||
#include "../bits.h"
|
||||
|
||||
class KnxIpKnxAddressesDIB : public KnxIpDIB
|
||||
{
|
||||
@ -14,4 +12,3 @@ class KnxIpKnxAddressesDIB : public KnxIpDIB
|
||||
private:
|
||||
uint8_t* currentPos = 0;
|
||||
};
|
||||
#endif
|
@ -1,7 +1,6 @@
|
||||
#include "knx_ip_routing_indication.h"
|
||||
#include <cstring>
|
||||
|
||||
#ifdef USE_IP
|
||||
CemiFrame& KnxIpRoutingIndication::frame()
|
||||
{
|
||||
return _frame;
|
||||
@ -19,4 +18,3 @@ KnxIpRoutingIndication::KnxIpRoutingIndication(CemiFrame frame)
|
||||
serviceTypeIdentifier(RoutingIndication);
|
||||
memcpy(_data + LEN_KNXIP_HEADER, frame.data(), frame.totalLenght());
|
||||
}
|
||||
#endif
|
@ -1,8 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "knx_ip_frame.h"
|
||||
#include "cemi_frame.h"
|
||||
#ifdef USE_IP
|
||||
#include "../cemi_frame.h"
|
||||
|
||||
class KnxIpRoutingIndication : public KnxIpFrame
|
||||
{
|
||||
@ -12,5 +11,4 @@ class KnxIpRoutingIndication : public KnxIpFrame
|
||||
CemiFrame& frame();
|
||||
private:
|
||||
CemiFrame _frame;
|
||||
};
|
||||
#endif
|
||||
};
|
@ -1,5 +1,5 @@
|
||||
#include "knx_ip_search_request.h"
|
||||
#ifdef USE_IP
|
||||
|
||||
KnxIpSearchRequest::KnxIpSearchRequest(uint8_t* data, uint16_t length)
|
||||
: KnxIpFrame(data, length), _hpai(data + LEN_KNXIP_HEADER)
|
||||
{
|
||||
@ -10,4 +10,3 @@ IpHostProtocolAddressInformation& KnxIpSearchRequest::hpai()
|
||||
{
|
||||
return _hpai;
|
||||
}
|
||||
#endif
|
@ -2,7 +2,7 @@
|
||||
|
||||
#include "knx_ip_frame.h"
|
||||
#include "ip_host_protocol_address_information.h"
|
||||
#ifdef USE_IP
|
||||
|
||||
class KnxIpSearchRequest : public KnxIpFrame
|
||||
{
|
||||
public:
|
||||
@ -11,4 +11,3 @@ class KnxIpSearchRequest : public KnxIpFrame
|
||||
private:
|
||||
IpHostProtocolAddressInformation _hpai;
|
||||
};
|
||||
#endif
|
@ -1,8 +1,7 @@
|
||||
#include "knx_ip_search_request_extended.h"
|
||||
#include "bits.h"
|
||||
#include "../bits.h"
|
||||
#include "service_families.h"
|
||||
#if KNX_SERVICE_FAMILY_CORE >= 2
|
||||
#ifdef USE_IP
|
||||
|
||||
KnxIpSearchRequestExtended::KnxIpSearchRequestExtended(uint8_t* data, uint16_t length)
|
||||
: KnxIpFrame(data, length), _hpai(data + LEN_KNXIP_HEADER)
|
||||
{
|
||||
@ -65,5 +64,3 @@ bool KnxIpSearchRequestExtended::requestedDIB(uint8_t code)
|
||||
|
||||
return requestedDIBs[code];
|
||||
}
|
||||
#endif
|
||||
#endif
|
@ -1,10 +1,9 @@
|
||||
#pragma once
|
||||
|
||||
#include "service_families.h"
|
||||
#if KNX_SERVICE_FAMILY_CORE >= 2
|
||||
#include "knx_ip_frame.h"
|
||||
#include "ip_host_protocol_address_information.h"
|
||||
#ifdef USE_IP
|
||||
|
||||
#define REQUESTED_DIBS_MAX 9
|
||||
class KnxIpSearchRequestExtended : public KnxIpFrame
|
||||
{
|
||||
@ -22,5 +21,3 @@ class KnxIpSearchRequestExtended : public KnxIpFrame
|
||||
IpHostProtocolAddressInformation _hpai;
|
||||
bool requestedDIBs[REQUESTED_DIBS_MAX]; //for now only 1 to 8
|
||||
};
|
||||
#endif
|
||||
#endif
|
@ -1,5 +1,4 @@
|
||||
#include "knx_ip_search_response.h"
|
||||
#ifdef USE_IP
|
||||
|
||||
#define LEN_SERVICE_FAMILIES 2
|
||||
#if MASK_VERSION == 0x091A
|
||||
@ -81,4 +80,3 @@ KnxIpSupportedServiceDIB& KnxIpSearchResponse::supportedServices()
|
||||
{
|
||||
return _supportedServices;
|
||||
}
|
||||
#endif
|
@ -6,7 +6,6 @@
|
||||
#include "knx_ip_supported_service_dib.h"
|
||||
#include "ip_parameter_object.h"
|
||||
#include "service_families.h"
|
||||
#ifdef USE_IP
|
||||
|
||||
class KnxIpSearchResponse : public KnxIpFrame
|
||||
{
|
||||
@ -20,5 +19,3 @@ class KnxIpSearchResponse : public KnxIpFrame
|
||||
KnxIpDeviceInformationDIB _deviceInfo;
|
||||
KnxIpSupportedServiceDIB _supportedServices;
|
||||
};
|
||||
|
||||
#endif
|
@ -1,7 +1,5 @@
|
||||
#include "knx_ip_search_response_extended.h"
|
||||
#include "service_families.h"
|
||||
#if KNX_SERVICE_FAMILY_CORE >= 2
|
||||
#ifdef USE_IP
|
||||
|
||||
#define LEN_SERVICE_FAMILIES 2
|
||||
#if MASK_VERSION == 0x091A
|
||||
@ -133,7 +131,7 @@ void KnxIpSearchResponseExtended::setKnxAddresses(IpParameterObject& parameters,
|
||||
|
||||
currentPos += _knxAddresses.length();
|
||||
}
|
||||
|
||||
#ifdef KNX_TUNNELING
|
||||
void KnxIpSearchResponseExtended::setTunnelingInfo(IpParameterObject& parameters, DeviceObject& deviceObject, KnxIpTunnelConnection tunnels[])
|
||||
{
|
||||
println("setTunnelingInfo");
|
||||
@ -199,7 +197,7 @@ void KnxIpSearchResponseExtended::setTunnelingInfo(IpParameterObject& parameters
|
||||
|
||||
currentPos += _tunnelInfo.length();
|
||||
}
|
||||
|
||||
#endif
|
||||
void KnxIpSearchResponseExtended::setExtendedDeviceInfo()
|
||||
{
|
||||
println("setExtendedDeviceInfo");
|
||||
@ -208,8 +206,11 @@ void KnxIpSearchResponseExtended::setExtendedDeviceInfo()
|
||||
_extended.code(EXTENDED_DEVICE_INFO);
|
||||
_extended.status(0x01); //FIXME dont know encoding PID_MEDIUM_STATUS=51 RouterObject
|
||||
_extended.localMaxApdu(254); //FIXME is this correct?
|
||||
#ifdef MASK_VERSION
|
||||
_extended.deviceDescriptor(MASK_VERSION);
|
||||
|
||||
#else
|
||||
_extended.deviceDescriptor(0x57B0);
|
||||
#endif
|
||||
currentPos += LEN_EXTENDED_DEVICE_INFORMATION_DIB;
|
||||
}
|
||||
|
||||
@ -223,5 +224,3 @@ uint8_t* KnxIpSearchResponseExtended::DIBs()
|
||||
{
|
||||
return _data + LEN_KNXIP_HEADER + LEN_IPHPAI;
|
||||
}
|
||||
#endif
|
||||
#endif
|
@ -1,7 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "service_families.h"
|
||||
#if KNX_SERVICE_FAMILY_CORE >= 2
|
||||
|
||||
#include "knx_ip_frame.h"
|
||||
#include "ip_host_protocol_address_information.h"
|
||||
@ -13,7 +12,6 @@
|
||||
#include "knx_ip_tunneling_info_dib.h"
|
||||
#include "ip_parameter_object.h"
|
||||
#include "knx_ip_tunnel_connection.h"
|
||||
#ifdef USE_IP
|
||||
|
||||
class KnxIpSearchResponseExtended : public KnxIpFrame
|
||||
{
|
||||
@ -33,6 +31,3 @@ class KnxIpSearchResponseExtended : public KnxIpFrame
|
||||
IpHostProtocolAddressInformation _controlEndpoint;
|
||||
int currentPos = 0;
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif
|
@ -1,5 +1,5 @@
|
||||
#include "knx_ip_state_request.h"
|
||||
#ifdef USE_IP
|
||||
|
||||
KnxIpStateRequest::KnxIpStateRequest(uint8_t* data, uint16_t length)
|
||||
: KnxIpFrame(data, length), _hpaiCtrl(data + LEN_KNXIP_HEADER + 1 /*ChannelId*/ + 1 /*Reserved*/)
|
||||
{
|
||||
@ -12,5 +12,4 @@ IpHostProtocolAddressInformation& KnxIpStateRequest::hpaiCtrl()
|
||||
uint8_t KnxIpStateRequest::channelId()
|
||||
{
|
||||
return _data[LEN_KNXIP_HEADER];
|
||||
}
|
||||
#endif
|
||||
}
|
@ -3,7 +3,7 @@
|
||||
#include "knx_ip_frame.h"
|
||||
#include "knx_ip_cri.h"
|
||||
#include "ip_host_protocol_address_information.h"
|
||||
#ifdef USE_IP
|
||||
|
||||
class KnxIpStateRequest : public KnxIpFrame
|
||||
{
|
||||
public:
|
||||
@ -13,5 +13,4 @@ class KnxIpStateRequest : public KnxIpFrame
|
||||
private:
|
||||
IpHostProtocolAddressInformation _hpaiCtrl;
|
||||
|
||||
};
|
||||
#endif
|
||||
};
|
@ -1,5 +1,4 @@
|
||||
#include "knx_ip_state_response.h"
|
||||
#ifdef USE_IP
|
||||
|
||||
#define LEN_SERVICE_FAMILIES 2
|
||||
#if MASK_VERSION == 0x091A
|
||||
@ -23,4 +22,3 @@ KnxIpStateResponse::KnxIpStateResponse(uint8_t channelId, uint8_t errorCode)
|
||||
_data[LEN_KNXIP_HEADER] = channelId;
|
||||
_data[LEN_KNXIP_HEADER + 1] = errorCode;
|
||||
}
|
||||
#endif
|
@ -1,7 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "knx_ip_frame.h"
|
||||
#ifdef USE_IP
|
||||
|
||||
class KnxIpStateResponse : public KnxIpFrame
|
||||
{
|
||||
@ -9,5 +8,3 @@ class KnxIpStateResponse : public KnxIpFrame
|
||||
KnxIpStateResponse(uint8_t channelId, uint8_t errorCode);
|
||||
private:
|
||||
};
|
||||
|
||||
#endif
|
@ -1,6 +1,5 @@
|
||||
#include "knx_ip_supported_service_dib.h"
|
||||
|
||||
#ifdef USE_IP
|
||||
KnxIpSupportedServiceDIB::KnxIpSupportedServiceDIB(uint8_t* data) : KnxIpDIB(data)
|
||||
{}
|
||||
|
||||
@ -41,4 +40,3 @@ void KnxIpSupportedServiceDIB::serviceVersion(ServiceFamily family, uint8_t ver
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
@ -1,7 +1,6 @@
|
||||
#pragma once
|
||||
#include "knx_ip_dib.h"
|
||||
|
||||
#ifdef USE_IP
|
||||
enum ServiceFamily : uint8_t
|
||||
{
|
||||
Core = 2,
|
||||
@ -20,4 +19,3 @@ class KnxIpSupportedServiceDIB : public KnxIpDIB
|
||||
uint8_t serviceVersion(ServiceFamily family);
|
||||
void serviceVersion(ServiceFamily family, uint8_t version);
|
||||
};
|
||||
#endif
|
@ -1,7 +1,6 @@
|
||||
#pragma once
|
||||
#include "config.h"
|
||||
#include "platform.h"
|
||||
#include "bits.h"
|
||||
#include "../platform.h"
|
||||
#include "../bits.h"
|
||||
|
||||
class KnxIpTunnelConnection
|
||||
{
|
@ -1,7 +1,6 @@
|
||||
#include "knx_ip_tunneling_ack.h"
|
||||
#include <cstring>
|
||||
|
||||
#ifdef USE_IP
|
||||
KnxIpTunnelingAck::KnxIpTunnelingAck(uint8_t* data,
|
||||
uint16_t length) : KnxIpFrame(data, length), _ch(_data + LEN_KNXIP_HEADER)
|
||||
{
|
||||
@ -17,4 +16,3 @@ KnxIpCH& KnxIpTunnelingAck::connectionHeader()
|
||||
{
|
||||
return _ch;
|
||||
}
|
||||
#endif
|
@ -1,9 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
#include "knx_ip_frame.h"
|
||||
#include "cemi_frame.h"
|
||||
#include "../cemi_frame.h"
|
||||
#include "knx_ip_ch.h"
|
||||
#ifdef USE_IP
|
||||
|
||||
class KnxIpTunnelingAck : public KnxIpFrame
|
||||
{
|
||||
@ -14,4 +13,3 @@ class KnxIpTunnelingAck : public KnxIpFrame
|
||||
private:
|
||||
KnxIpCH _ch;
|
||||
};
|
||||
#endif
|
@ -1,8 +1,6 @@
|
||||
#include "knx_ip_tunneling_info_dib.h"
|
||||
#include "service_families.h"
|
||||
#if KNX_SERVICE_FAMILY_CORE >= 2
|
||||
|
||||
#ifdef USE_IP
|
||||
KnxIpTunnelingInfoDIB::KnxIpTunnelingInfoDIB(uint8_t* data) : KnxIpDIB(data)
|
||||
{
|
||||
currentPos = data + 4;
|
||||
@ -27,5 +25,3 @@ void KnxIpTunnelingInfoDIB::tunnelingSlot(uint16_t addr, uint16_t state)
|
||||
currentPos += 4;
|
||||
length(currentPos - _data);
|
||||
}
|
||||
#endif
|
||||
#endif
|
@ -1,10 +1,7 @@
|
||||
#pragma once
|
||||
#include "knx_ip_dib.h"
|
||||
#include "bits.h"
|
||||
#include "../bits.h"
|
||||
#include "service_families.h"
|
||||
#if KNX_SERVICE_FAMILY_CORE >= 2
|
||||
|
||||
#ifdef USE_IP
|
||||
|
||||
class KnxIpTunnelingInfoDIB : public KnxIpDIB
|
||||
{
|
||||
@ -16,5 +13,3 @@ class KnxIpTunnelingInfoDIB : public KnxIpDIB
|
||||
private:
|
||||
uint8_t* currentPos = 0;
|
||||
};
|
||||
#endif
|
||||
#endif
|
@ -1,7 +1,6 @@
|
||||
#include "knx_ip_tunneling_request.h"
|
||||
#include <cstring>
|
||||
|
||||
#ifdef USE_IP
|
||||
KnxIpTunnelingRequest::KnxIpTunnelingRequest(uint8_t* data,
|
||||
uint16_t length) : KnxIpFrame(data, length), _frame(data + LEN_CH + headerLength(), length - LEN_CH - headerLength()), _ch(_data + headerLength())
|
||||
{
|
||||
@ -23,4 +22,3 @@ KnxIpCH& KnxIpTunnelingRequest::connectionHeader()
|
||||
{
|
||||
return _ch;
|
||||
}
|
||||
#endif
|
@ -1,9 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
#include "knx_ip_frame.h"
|
||||
#include "cemi_frame.h"
|
||||
#include "../cemi_frame.h"
|
||||
#include "knx_ip_ch.h"
|
||||
#ifdef USE_IP
|
||||
|
||||
class KnxIpTunnelingRequest : public KnxIpFrame
|
||||
{
|
||||
@ -16,4 +15,3 @@ class KnxIpTunnelingRequest : public KnxIpFrame
|
||||
CemiFrame _frame;
|
||||
KnxIpCH _ch;
|
||||
};
|
||||
#endif
|
@ -1,5 +1,5 @@
|
||||
#ifndef KNX_SERVICE_FAMILY_CORE
|
||||
#define KNX_SERVICE_FAMILY_CORE 1
|
||||
#define KNX_SERVICE_FAMILY_CORE 2
|
||||
#endif
|
||||
|
||||
#ifndef KNX_SERVICE_FAMILY_DEVICE_MANAGEMENT
|
@ -28,14 +28,14 @@
|
||||
#include <poll.h> // Needed for GPIO edge detection
|
||||
#include <sys/time.h> // Needed for delayMicroseconds()
|
||||
|
||||
#include "knx/device_object.h"
|
||||
#include "knx/address_table_object.h"
|
||||
#include "knx/association_table_object.h"
|
||||
#include "knx/group_object_table_object.h"
|
||||
#include "knx/application_program_object.h"
|
||||
#include "knx/ip_parameter_object.h"
|
||||
#include "knx/bits.h"
|
||||
#include "knx/ip_host_protocol_address_information.h"
|
||||
#include "../device_object.h"
|
||||
#include "../address_table_object.h"
|
||||
#include "../association_table_object.h"
|
||||
#include "../group_object_table_object.h"
|
||||
#include "../application_program_object.h"
|
||||
#include "../ip/ip_parameter_object.h"
|
||||
#include "../bits.h"
|
||||
#include "../ip/ip_host_protocol_address_information.h"
|
||||
|
||||
#define MAX_MEM 4096
|
||||
|
@ -3,7 +3,7 @@
|
||||
#ifdef __linux__
|
||||
|
||||
#include <string>
|
||||
#include "knx/platform.h"
|
||||
#include "../platform.h"
|
||||
|
||||
extern int gpio_direction(int pin, int dir);
|
||||
extern int gpio_read(int pin);
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user