mirror of
https://github.com/thelsing/knx.git
synced 2025-09-05 17:50:22 +02:00
commit
a7f237f391
27
.clang-format
Normal file
27
.clang-format
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
#Generated from Visual Studio settings
|
||||||
|
---
|
||||||
|
BasedOnStyle: llvm
|
||||||
|
BraceWrapping:
|
||||||
|
AfterClass: true
|
||||||
|
AfterControlStatement: true
|
||||||
|
AfterEnum: true
|
||||||
|
AfterFunction: true
|
||||||
|
AfterNamespace: true
|
||||||
|
AfterStruct: true
|
||||||
|
AfterUnion: true
|
||||||
|
BeforeCatch: true
|
||||||
|
BeforeElse: true
|
||||||
|
SplitEmptyFunction: false
|
||||||
|
IndentBraces: false
|
||||||
|
BreakBeforeBraces: Custom
|
||||||
|
ColumnLimit: 0
|
||||||
|
IndentWidth: 4
|
||||||
|
NamespaceIndentation: All
|
||||||
|
TabWidth: 4
|
||||||
|
DerivePointerAlignment: true
|
||||||
|
IndentCaseLabels: true
|
||||||
|
AllowShortFunctionsOnASingleLine: InlineOnly
|
||||||
|
ConstructorInitializerIndentWidth: 4
|
||||||
|
ContinuationIndentWidth: 4
|
||||||
|
UseTab: Never
|
||||||
|
...
|
@ -1,95 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<ClassDiagram MajorVersion="1" MinorVersion="1">
|
|
||||||
<Class Name="ApplicationProgramObject" Collapsed="true">
|
|
||||||
<Position X="4" Y="4.25" Width="1.5" />
|
|
||||||
<TypeIdentifier>
|
|
||||||
<HashCode>AIAAAAEAAACAAAIAgCAAAAAgABAEAAgAAAAQQABAAAA=</HashCode>
|
|
||||||
<FileName>C:\Users\tkunze\Source\knx\src\knx\application_program_object.h</FileName>
|
|
||||||
</TypeIdentifier>
|
|
||||||
</Class>
|
|
||||||
<Class Name="AssociationTableObject" Collapsed="true">
|
|
||||||
<Position X="5.75" Y="4.25" Width="1.5" />
|
|
||||||
<TypeIdentifier>
|
|
||||||
<HashCode>AAAAAAEAAACAAgIAABAAQAgAAAEAAAgAAAAAAABAAEA=</HashCode>
|
|
||||||
<FileName>C:\Users\tkunze\Source\knx\src\knx\association_table_object.h</FileName>
|
|
||||||
</TypeIdentifier>
|
|
||||||
</Class>
|
|
||||||
<Class Name="DeviceObject" Collapsed="true">
|
|
||||||
<Position X="0.5" Y="4.25" Width="1.5" />
|
|
||||||
<TypeIdentifier>
|
|
||||||
<HashCode>AAACACEAAAGCIAKAQCAgAACgCECAAEogAEgIAgJAAAA=</HashCode>
|
|
||||||
<FileName>C:\Users\tkunze\Source\knx\src\knx\device_object.h</FileName>
|
|
||||||
</TypeIdentifier>
|
|
||||||
</Class>
|
|
||||||
<Class Name="GroupObjectTableObject" Collapsed="true">
|
|
||||||
<Position X="7.5" Y="4.25" Width="1.5" />
|
|
||||||
<TypeIdentifier>
|
|
||||||
<HashCode>EAAAAEEACACAAgIAAhAATAgACAAAAAggAAAAAABAAAA=</HashCode>
|
|
||||||
<FileName>C:\Users\tkunze\Source\knx\src\knx\group_object_table_object.h</FileName>
|
|
||||||
</TypeIdentifier>
|
|
||||||
</Class>
|
|
||||||
<Class Name="InterfaceObject" Collapsed="true">
|
|
||||||
<Position X="2" Y="1.25" Width="1.5" />
|
|
||||||
<TypeIdentifier>
|
|
||||||
<HashCode>AAAAAAEAAAAAAAAAACAAAAAgAAAAAAgAAAAIABBAAAA=</HashCode>
|
|
||||||
<FileName>C:\Users\tkunze\Source\knx\src\knx\interface_object.h</FileName>
|
|
||||||
</TypeIdentifier>
|
|
||||||
</Class>
|
|
||||||
<Class Name="IpParameterObject" Collapsed="true">
|
|
||||||
<Position X="2.75" Y="2.5" Width="1.5" />
|
|
||||||
<TypeIdentifier>
|
|
||||||
<HashCode>AAIACIEAYACAAKIAAGAQCAAgWAIAAAgGAAAAAABgAIA=</HashCode>
|
|
||||||
<FileName>C:\Users\tkunze\Source\knx\src\knx\ip_parameter_object.h</FileName>
|
|
||||||
</TypeIdentifier>
|
|
||||||
</Class>
|
|
||||||
<Class Name="TableObject" Collapsed="true">
|
|
||||||
<Position X="4.25" Y="0.75" Width="1.5" />
|
|
||||||
<TypeIdentifier>
|
|
||||||
<HashCode>AAIACIACBACAAIIAAGAACAgwyAAAAAAAAgAAAAJgAAA=</HashCode>
|
|
||||||
<FileName>C:\Users\tkunze\Source\knx\src\knx\table_object.h</FileName>
|
|
||||||
</TypeIdentifier>
|
|
||||||
</Class>
|
|
||||||
<Class Name="BusAccessUnit" Collapsed="true">
|
|
||||||
<Position X="6.75" Y="0.5" Width="1.5" />
|
|
||||||
<TypeIdentifier>
|
|
||||||
<HashCode>sKoIAAAAQIIxC4gUUEAIAAACiQEgAjQUFCCA5yEAIBw=</HashCode>
|
|
||||||
<FileName>C:\Users\tkunze\Source\knx\src\knx\bau.h</FileName>
|
|
||||||
</TypeIdentifier>
|
|
||||||
</Class>
|
|
||||||
<Class Name="Bau57B0" Collapsed="true">
|
|
||||||
<Position X="5.75" Y="2.75" Width="1.5" />
|
|
||||||
<TypeIdentifier>
|
|
||||||
<HashCode>AAACAAAAAIAAAABAAgAAAAAAAAAgAAAAACAAAAAAAAg=</HashCode>
|
|
||||||
<FileName>C:\Users\tkunze\Source\knx\src\knx\bau57B0.h</FileName>
|
|
||||||
</TypeIdentifier>
|
|
||||||
</Class>
|
|
||||||
<Class Name="LinuxPlatform" Collapsed="true">
|
|
||||||
<Position X="9.75" Y="1.5" Width="1.5" />
|
|
||||||
<TypeIdentifier>
|
|
||||||
<HashCode>BACGJBAAIigAIHgAAABAghAQAAAAACgAAADAEgAAAjA=</HashCode>
|
|
||||||
<FileName>C:\Users\tkunze\Source\knx\src\linux_platform.h</FileName>
|
|
||||||
</TypeIdentifier>
|
|
||||||
</Class>
|
|
||||||
<Class Name="Platform" Collapsed="true">
|
|
||||||
<Position X="9.75" Y="0.5" Width="1.5" />
|
|
||||||
<TypeIdentifier>
|
|
||||||
<HashCode>AAAGJBAAICgAIFAAAABAwhAAABAAAAgAAADAEgAAAhA=</HashCode>
|
|
||||||
<FileName>C:\Users\tkunze\Source\knx\src\knx\platform.h</FileName>
|
|
||||||
</TypeIdentifier>
|
|
||||||
</Class>
|
|
||||||
<Class Name="BauSystemB" Collapsed="true">
|
|
||||||
<Position X="6.75" Y="1.5" Width="1.5" />
|
|
||||||
<TypeIdentifier>
|
|
||||||
<HashCode>ABIAAFQgAoJwCoBAUCiCAIDAiEBgADQQAIAAAAKQABQ=</HashCode>
|
|
||||||
<FileName>C:\Users\tkunze\Source\knx\src\knx\bau_systemB.h</FileName>
|
|
||||||
</TypeIdentifier>
|
|
||||||
</Class>
|
|
||||||
<Class Name="Bau07B0" Collapsed="true">
|
|
||||||
<Position X="7.5" Y="2.75" Width="1.5" />
|
|
||||||
<TypeIdentifier>
|
|
||||||
<HashCode>AAACAAAAAIBAAABAAAAAAAAAAAAgAAAAACAAAAAAAAA=</HashCode>
|
|
||||||
<FileName>C:\Users\tkunze\Source\knx\src\knx\bau07B0.h</FileName>
|
|
||||||
</TypeIdentifier>
|
|
||||||
</Class>
|
|
||||||
<Font Name="Segoe UI" Size="9" />
|
|
||||||
</ClassDiagram>
|
|
@ -7,9 +7,9 @@
|
|||||||
<PathStyle>RemoteUnix</PathStyle>
|
<PathStyle>RemoteUnix</PathStyle>
|
||||||
</CustomSourceDirectories>
|
</CustomSourceDirectories>
|
||||||
<BuildHost>
|
<BuildHost>
|
||||||
<HostName>localhost</HostName>
|
<HostName>Suzail</HostName>
|
||||||
<Transport>LinuxSubsystem</Transport>
|
<Transport>SSH</Transport>
|
||||||
<UserName>Linux</UserName>
|
<UserName>tkunze</UserName>
|
||||||
</BuildHost>
|
</BuildHost>
|
||||||
<MainSourceTransferCommand>
|
<MainSourceTransferCommand>
|
||||||
<SkipWhenRunningCommandList>false</SkipWhenRunningCommandList>
|
<SkipWhenRunningCommandList>false</SkipWhenRunningCommandList>
|
||||||
@ -34,15 +34,14 @@
|
|||||||
<string>CMakeLists.txt</string>
|
<string>CMakeLists.txt</string>
|
||||||
<string>*.cmake</string>
|
<string>*.cmake</string>
|
||||||
</FileMasks>
|
</FileMasks>
|
||||||
<TransferNewFilesOnly>true</TransferNewFilesOnly>
|
<TransferNewFilesOnly>false</TransferNewFilesOnly>
|
||||||
<IncludeSubdirectories>true</IncludeSubdirectories>
|
<IncludeSubdirectories>true</IncludeSubdirectories>
|
||||||
<SelectedDirectories />
|
|
||||||
<DeleteDisappearedFiles>true</DeleteDisappearedFiles>
|
<DeleteDisappearedFiles>true</DeleteDisappearedFiles>
|
||||||
<ApplyGlobalExclusionList>true</ApplyGlobalExclusionList>
|
<ApplyGlobalExclusionList>true</ApplyGlobalExclusionList>
|
||||||
<Extension>
|
<Extension>
|
||||||
<Direction>Outgoing</Direction>
|
<Direction>Outgoing</Direction>
|
||||||
<SkipMountPoints>false</SkipMountPoints>
|
<SkipMountPoints>false</SkipMountPoints>
|
||||||
<OverwriteTrigger>LocalCache</OverwriteTrigger>
|
<OverwriteTrigger>Always</OverwriteTrigger>
|
||||||
</Extension>
|
</Extension>
|
||||||
</MainSourceTransferCommand>
|
</MainSourceTransferCommand>
|
||||||
<AllowChangingHostForMainCommands>false</AllowChangingHostForMainCommands>
|
<AllowChangingHostForMainCommands>false</AllowChangingHostForMainCommands>
|
||||||
@ -115,12 +114,13 @@
|
|||||||
<HideErrorsInSystemHeaders>true</HideErrorsInSystemHeaders>
|
<HideErrorsInSystemHeaders>true</HideErrorsInSystemHeaders>
|
||||||
<SupportLightweightReferenceAnalysis>true</SupportLightweightReferenceAnalysis>
|
<SupportLightweightReferenceAnalysis>true</SupportLightweightReferenceAnalysis>
|
||||||
<DiscoverySettings>
|
<DiscoverySettings>
|
||||||
<Mode>Disabled</Mode>
|
<Mode>Silent</Mode>
|
||||||
<SearchInProjectDir>true</SearchInProjectDir>
|
<SearchInProjectDir>true</SearchInProjectDir>
|
||||||
<SearchInSourceDirs>true</SearchInSourceDirs>
|
<SearchInSourceDirs>true</SearchInSourceDirs>
|
||||||
<SearchInIncludeSubdirs>true</SearchInIncludeSubdirs>
|
<SearchInIncludeSubdirs>true</SearchInIncludeSubdirs>
|
||||||
</DiscoverySettings>
|
</DiscoverySettings>
|
||||||
<CheckForClangFormatFiles>true</CheckForClangFormatFiles>
|
<CheckForClangFormatFiles>true</CheckForClangFormatFiles>
|
||||||
|
<ExplicitClangFormatFile>..\.clang-format</ExplicitClangFormatFile>
|
||||||
<FormattingEngine>ClangFormat</FormattingEngine>
|
<FormattingEngine>ClangFormat</FormattingEngine>
|
||||||
</ExtraSettings>
|
</ExtraSettings>
|
||||||
<CodeAnalyzerSettings>
|
<CodeAnalyzerSettings>
|
||||||
|
@ -1,160 +0,0 @@
|
|||||||
<?xml version="1.0"?>
|
|
||||||
<VisualGDBProjectSettings2 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
|
||||||
<ConfigurationName>Release</ConfigurationName>
|
|
||||||
<Project xsi:type="com.visualgdb.project.linux">
|
|
||||||
<CustomSourceDirectories>
|
|
||||||
<Directories />
|
|
||||||
<PathStyle>RemoteUnix</PathStyle>
|
|
||||||
</CustomSourceDirectories>
|
|
||||||
<BuildHost>
|
|
||||||
<HostName>Suzail</HostName>
|
|
||||||
<Transport>SSH</Transport>
|
|
||||||
<UserName>tkunze</UserName>
|
|
||||||
</BuildHost>
|
|
||||||
<MainSourceTransferCommand>
|
|
||||||
<SkipWhenRunningCommandList>false</SkipWhenRunningCommandList>
|
|
||||||
<RemoteHost>
|
|
||||||
<HostName>Suzail</HostName>
|
|
||||||
<Transport>SSH</Transport>
|
|
||||||
<UserName>tkunze</UserName>
|
|
||||||
</RemoteHost>
|
|
||||||
<LocalDirectory>$(ProjectDir)</LocalDirectory>
|
|
||||||
<RemoteDirectory>/home/tkunze/vgdb</RemoteDirectory>
|
|
||||||
<FileMasks>
|
|
||||||
<string>*.cpp</string>
|
|
||||||
<string>*.h</string>
|
|
||||||
<string>*.hpp</string>
|
|
||||||
<string>*.c</string>
|
|
||||||
<string>*.cc</string>
|
|
||||||
<string>*.cxx</string>
|
|
||||||
<string>*.mak</string>
|
|
||||||
<string>Makefile</string>
|
|
||||||
<string>*.txt</string>
|
|
||||||
<string>*.cmake</string>
|
|
||||||
<string>CMakeLists.txt</string>
|
|
||||||
<string>*.cmake</string>
|
|
||||||
</FileMasks>
|
|
||||||
<TransferNewFilesOnly>true</TransferNewFilesOnly>
|
|
||||||
<IncludeSubdirectories>true</IncludeSubdirectories>
|
|
||||||
<DeleteDisappearedFiles>true</DeleteDisappearedFiles>
|
|
||||||
<ApplyGlobalExclusionList>true</ApplyGlobalExclusionList>
|
|
||||||
</MainSourceTransferCommand>
|
|
||||||
<AllowChangingHostForMainCommands>false</AllowChangingHostForMainCommands>
|
|
||||||
<SkipBuildIfNoSourceFilesChanged>false</SkipBuildIfNoSourceFilesChanged>
|
|
||||||
<IgnoreFileTransferErrors>false</IgnoreFileTransferErrors>
|
|
||||||
<RemoveRemoteDirectoryOnClean>false</RemoveRemoteDirectoryOnClean>
|
|
||||||
<SkipDeploymentTests>false</SkipDeploymentTests>
|
|
||||||
<MainSourceDirectoryForLocalBuilds>$(ProjectDir)</MainSourceDirectoryForLocalBuilds>
|
|
||||||
</Project>
|
|
||||||
<Build xsi:type="com.visualgdb.build.cmake">
|
|
||||||
<ToolchainID>
|
|
||||||
<ID>com.sysprogs.toolchain.default-gcc</ID>
|
|
||||||
<Version>
|
|
||||||
<Revision>0</Revision>
|
|
||||||
</Version>
|
|
||||||
</ToolchainID>
|
|
||||||
<RelativeSourceDirectory />
|
|
||||||
<ConfigurationType>RELWITHDEBINFO</ConfigurationType>
|
|
||||||
<BinaryDirectory>Release</BinaryDirectory>
|
|
||||||
<MakeCommandTemplate>
|
|
||||||
<SkipWhenRunningCommandList>false</SkipWhenRunningCommandList>
|
|
||||||
<RemoteHost>
|
|
||||||
<HostName>BuildMachine</HostName>
|
|
||||||
<Transport>BuiltinShortcut</Transport>
|
|
||||||
</RemoteHost>
|
|
||||||
<Command>$(ToolchainMake)</Command>
|
|
||||||
<Arguments>$(ToolchainMakeArgs)</Arguments>
|
|
||||||
<WorkingDirectory>$(BuildDir)</WorkingDirectory>
|
|
||||||
<BackgroundMode xsi:nil="true" />
|
|
||||||
</MakeCommandTemplate>
|
|
||||||
<CMakeCommand>
|
|
||||||
<SkipWhenRunningCommandList>false</SkipWhenRunningCommandList>
|
|
||||||
<RemoteHost>
|
|
||||||
<HostName>BuildMachine</HostName>
|
|
||||||
<Transport>BuiltinShortcut</Transport>
|
|
||||||
</RemoteHost>
|
|
||||||
<Command>$(ToolchainCMake)</Command>
|
|
||||||
<BackgroundMode xsi:nil="true" />
|
|
||||||
</CMakeCommand>
|
|
||||||
<UpdateSourcesInCMakeFile>true</UpdateSourcesInCMakeFile>
|
|
||||||
<ExportCompileCommands>false</ExportCompileCommands>
|
|
||||||
<DisableToolchainFile>false</DisableToolchainFile>
|
|
||||||
<DeployAsRoot>false</DeployAsRoot>
|
|
||||||
<CleanMode>b</CleanMode>
|
|
||||||
</Build>
|
|
||||||
<CustomBuild>
|
|
||||||
<PreSyncActions />
|
|
||||||
<PreBuildActions />
|
|
||||||
<PostBuildActions />
|
|
||||||
<PreCleanActions />
|
|
||||||
<PostCleanActions />
|
|
||||||
</CustomBuild>
|
|
||||||
<CustomDebug>
|
|
||||||
<PreDebugActions />
|
|
||||||
<PostDebugActions />
|
|
||||||
<DebugStopActions />
|
|
||||||
<BreakMode>Default</BreakMode>
|
|
||||||
</CustomDebug>
|
|
||||||
<CustomShortcuts>
|
|
||||||
<Shortcuts />
|
|
||||||
<ShowMessageAfterExecuting>true</ShowMessageAfterExecuting>
|
|
||||||
</CustomShortcuts>
|
|
||||||
<UserDefinedVariables />
|
|
||||||
<CodeSense>
|
|
||||||
<Enabled>Unknown</Enabled>
|
|
||||||
<ExtraSettings>
|
|
||||||
<HideErrorsInSystemHeaders>true</HideErrorsInSystemHeaders>
|
|
||||||
<SupportLightweightReferenceAnalysis>true</SupportLightweightReferenceAnalysis>
|
|
||||||
<CheckForClangFormatFiles>true</CheckForClangFormatFiles>
|
|
||||||
<FormattingEngine xsi:nil="true" />
|
|
||||||
</ExtraSettings>
|
|
||||||
<CodeAnalyzerSettings>
|
|
||||||
<Enabled>false</Enabled>
|
|
||||||
</CodeAnalyzerSettings>
|
|
||||||
</CodeSense>
|
|
||||||
<Debug xsi:type="com.visualgdb.debug.remote">
|
|
||||||
<AdditionalStartupCommands />
|
|
||||||
<AdditionalGDBSettings>
|
|
||||||
<Features>
|
|
||||||
<DisableAutoDetection>false</DisableAutoDetection>
|
|
||||||
<UseFrameParameter>false</UseFrameParameter>
|
|
||||||
<SimpleValuesFlagSupported>false</SimpleValuesFlagSupported>
|
|
||||||
<ListLocalsSupported>false</ListLocalsSupported>
|
|
||||||
<ByteLevelMemoryCommandsAvailable>false</ByteLevelMemoryCommandsAvailable>
|
|
||||||
<ThreadInfoSupported>false</ThreadInfoSupported>
|
|
||||||
<PendingBreakpointsSupported>false</PendingBreakpointsSupported>
|
|
||||||
<SupportTargetCommand>false</SupportTargetCommand>
|
|
||||||
<ReliableBreakpointNotifications>false</ReliableBreakpointNotifications>
|
|
||||||
</Features>
|
|
||||||
<EnableSmartStepping>false</EnableSmartStepping>
|
|
||||||
<FilterSpuriousStoppedNotifications>false</FilterSpuriousStoppedNotifications>
|
|
||||||
<ForceSingleThreadedMode>false</ForceSingleThreadedMode>
|
|
||||||
<UseAppleExtensions>false</UseAppleExtensions>
|
|
||||||
<CanAcceptCommandsWhileRunning>false</CanAcceptCommandsWhileRunning>
|
|
||||||
<MakeLogFile>false</MakeLogFile>
|
|
||||||
<IgnoreModuleEventsWhileStepping>true</IgnoreModuleEventsWhileStepping>
|
|
||||||
<UseRelativePathsOnly>false</UseRelativePathsOnly>
|
|
||||||
<ExitAction>None</ExitAction>
|
|
||||||
<DisableDisassembly>false</DisableDisassembly>
|
|
||||||
<ExamineMemoryWithXCommand>false</ExamineMemoryWithXCommand>
|
|
||||||
<StepIntoNewInstanceEntry>main</StepIntoNewInstanceEntry>
|
|
||||||
<ExamineRegistersInRawFormat>true</ExamineRegistersInRawFormat>
|
|
||||||
<DisableSignals>false</DisableSignals>
|
|
||||||
<EnableAsyncExecutionMode>false</EnableAsyncExecutionMode>
|
|
||||||
<EnableNonStopMode>false</EnableNonStopMode>
|
|
||||||
<MaxBreakpointLimit>0</MaxBreakpointLimit>
|
|
||||||
</AdditionalGDBSettings>
|
|
||||||
<LaunchGDBSettings xsi:type="GDBLaunchParametersNewInstance">
|
|
||||||
<DebuggedProgram>$(TargetPath)</DebuggedProgram>
|
|
||||||
<GDBServerPort>2000</GDBServerPort>
|
|
||||||
<ProgramArguments />
|
|
||||||
</LaunchGDBSettings>
|
|
||||||
<GenerateCtrlBreakInsteadOfCtrlC>false</GenerateCtrlBreakInsteadOfCtrlC>
|
|
||||||
<X11WindowMode>Local</X11WindowMode>
|
|
||||||
<KeepConsoleAfterExit>false</KeepConsoleAfterExit>
|
|
||||||
<RunGDBUnderSudo>false</RunGDBUnderSudo>
|
|
||||||
<DeploymentMode>Auto</DeploymentMode>
|
|
||||||
<DeployWhenLaunchedWithoutDebugging>true</DeployWhenLaunchedWithoutDebugging>
|
|
||||||
<SuppressTTYCreation>false</SuppressTTYCreation>
|
|
||||||
</Debug>
|
|
||||||
</VisualGDBProjectSettings2>
|
|
@ -110,10 +110,8 @@
|
|||||||
<ImportGroup Label="ExtensionTargets">
|
<ImportGroup Label="ExtensionTargets">
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="ClassDiagram.cd" />
|
|
||||||
<None Include="CMakeLists.txt" />
|
<None Include="CMakeLists.txt" />
|
||||||
<None Include="knx-linux-Debug.vgdbsettings" />
|
<None Include="knx-linux-Debug.vgdbsettings" />
|
||||||
<None Include="knx-linux-Release.vgdbsettings" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="..\src\knx\address_table_object.cpp" />
|
<ClCompile Include="..\src\knx\address_table_object.cpp" />
|
||||||
|
@ -30,10 +30,6 @@
|
|||||||
<None Include="knx-linux-Debug.vgdbsettings">
|
<None Include="knx-linux-Debug.vgdbsettings">
|
||||||
<Filter>VisualGDB settings</Filter>
|
<Filter>VisualGDB settings</Filter>
|
||||||
</None>
|
</None>
|
||||||
<None Include="knx-linux-Release.vgdbsettings">
|
|
||||||
<Filter>VisualGDB settings</Filter>
|
|
||||||
</None>
|
|
||||||
<None Include="ClassDiagram.cd" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="..\src\linux_platform.h">
|
<ClInclude Include="..\src\linux_platform.h">
|
||||||
|
@ -25,8 +25,10 @@ void measureTemp()
|
|||||||
lastsend = now;
|
lastsend = now;
|
||||||
int r = rand();
|
int r = rand();
|
||||||
double currentValue = (r * 1.0) / (RAND_MAX * 1.0);
|
double currentValue = (r * 1.0) / (RAND_MAX * 1.0);
|
||||||
currentValue *= (670433.28 + 273);
|
currentValue *= 100;
|
||||||
currentValue -= 273;
|
currentValue -= 50;
|
||||||
|
// currentValue *= (670433.28 + 273);
|
||||||
|
// currentValue -= 273;
|
||||||
println(currentValue);
|
println(currentValue);
|
||||||
CURR.value(currentValue);
|
CURR.value(currentValue);
|
||||||
|
|
||||||
|
@ -9,18 +9,18 @@
|
|||||||
* See section 4.10 of @cite knx:3/5/1 for further details.
|
* See section 4.10 of @cite knx:3/5/1 for further details.
|
||||||
* It implements realisation type 7 (see section 4.10.7 of @cite knx:3/5/1).
|
* It implements realisation type 7 (see section 4.10.7 of @cite knx:3/5/1).
|
||||||
*/
|
*/
|
||||||
class AddressTableObject: public TableObject
|
class AddressTableObject : public TableObject
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
* The contructor.
|
* The contructor.
|
||||||
*
|
*
|
||||||
* @param platform This parameter is only passed to the custructor of TableObject an not used by this class.
|
* @param platform This parameter is only passed to the custructor of TableObject an not used by this class.
|
||||||
*/
|
*/
|
||||||
AddressTableObject(Platform& platform);
|
AddressTableObject(Platform& platform);
|
||||||
void readProperty(PropertyID id, uint32_t start, uint32_t& count, uint8_t *data);
|
void readProperty(PropertyID id, uint32_t start, uint32_t& count, uint8_t* data);
|
||||||
uint8_t *save(uint8_t *buffer);
|
uint8_t* save(uint8_t* buffer);
|
||||||
uint8_t *restore(uint8_t *buffer);
|
uint8_t* restore(uint8_t* buffer);
|
||||||
/**
|
/**
|
||||||
* returns the number of group addresses of the object.
|
* returns the number of group addresses of the object.
|
||||||
*/
|
*/
|
||||||
@ -49,10 +49,12 @@ public:
|
|||||||
* @return true if the address table contains the group address, false otherwise
|
* @return true if the address table contains the group address, false otherwise
|
||||||
*/
|
*/
|
||||||
bool contains(uint16_t groupAddress);
|
bool contains(uint16_t groupAddress);
|
||||||
protected:
|
|
||||||
|
protected:
|
||||||
virtual void beforeStateChange(LoadState& newState);
|
virtual void beforeStateChange(LoadState& newState);
|
||||||
uint8_t propertyCount();
|
uint8_t propertyCount();
|
||||||
PropertyDescription* propertyDescriptions();
|
PropertyDescription* propertyDescriptions();
|
||||||
private:
|
|
||||||
uint16_t* _groupAddresses;
|
private:
|
||||||
|
uint16_t* _groupAddresses = 0;
|
||||||
};
|
};
|
||||||
|
@ -48,6 +48,6 @@ class APDU
|
|||||||
APDU(uint8_t* data, CemiFrame& frame);
|
APDU(uint8_t* data, CemiFrame& frame);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
uint8_t* _data;
|
uint8_t* _data = 0;
|
||||||
CemiFrame& _frame;
|
CemiFrame& _frame;
|
||||||
};
|
};
|
@ -146,6 +146,6 @@ class ApplicationLayer
|
|||||||
uint16_t _savedAsapResponse;
|
uint16_t _savedAsapResponse;
|
||||||
AssociationTableObject& _assocTable;
|
AssociationTableObject& _assocTable;
|
||||||
BusAccessUnit& _bau;
|
BusAccessUnit& _bau;
|
||||||
TransportLayer* _transportLayer;
|
TransportLayer* _transportLayer = 0;
|
||||||
int32_t _connectedTsap;
|
int32_t _connectedTsap;
|
||||||
};
|
};
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
#include "table_object.h"
|
#include "table_object.h"
|
||||||
|
|
||||||
class ApplicationProgramObject: public TableObject
|
class ApplicationProgramObject : public TableObject
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ApplicationProgramObject(Platform& platform);
|
ApplicationProgramObject(Platform& platform);
|
||||||
void readProperty(PropertyID id, uint32_t start, uint32_t& count, uint8_t* data);
|
void readProperty(PropertyID id, uint32_t start, uint32_t& count, uint8_t* data);
|
||||||
void writeProperty(PropertyID id, uint8_t start, uint8_t* data, uint8_t count);
|
void writeProperty(PropertyID id, uint8_t start, uint8_t* data, uint8_t count);
|
||||||
@ -15,9 +15,11 @@ public:
|
|||||||
uint32_t getInt(uint32_t addr);
|
uint32_t getInt(uint32_t addr);
|
||||||
uint8_t* save(uint8_t* buffer);
|
uint8_t* save(uint8_t* buffer);
|
||||||
uint8_t* restore(uint8_t* buffer);
|
uint8_t* restore(uint8_t* buffer);
|
||||||
protected:
|
|
||||||
|
protected:
|
||||||
uint8_t propertyCount();
|
uint8_t propertyCount();
|
||||||
PropertyDescription* propertyDescriptions();
|
PropertyDescription* propertyDescriptions();
|
||||||
private:
|
|
||||||
uint8_t _programVersion[5];
|
private:
|
||||||
|
uint8_t _programVersion[5] = {0, 0, 0, 0, 0};
|
||||||
};
|
};
|
@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
#include "table_object.h"
|
#include "table_object.h"
|
||||||
|
|
||||||
class AssociationTableObject: public TableObject
|
class AssociationTableObject : public TableObject
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
AssociationTableObject(Platform& platform);
|
AssociationTableObject(Platform& platform);
|
||||||
void readProperty(PropertyID id, uint32_t start, uint32_t& count, uint8_t* data);
|
void readProperty(PropertyID id, uint32_t start, uint32_t& count, uint8_t* data);
|
||||||
uint16_t entryCount();
|
uint16_t entryCount();
|
||||||
@ -13,10 +13,12 @@ public:
|
|||||||
uint8_t* restore(uint8_t* buffer);
|
uint8_t* restore(uint8_t* buffer);
|
||||||
|
|
||||||
int32_t translateAsap(uint16_t asap);
|
int32_t translateAsap(uint16_t asap);
|
||||||
protected:
|
|
||||||
|
protected:
|
||||||
void beforeStateChange(LoadState& newState);
|
void beforeStateChange(LoadState& newState);
|
||||||
uint8_t propertyCount();
|
uint8_t propertyCount();
|
||||||
PropertyDescription* propertyDescriptions();
|
PropertyDescription* propertyDescriptions();
|
||||||
private:
|
|
||||||
uint16_t* _tableData;
|
private:
|
||||||
|
uint16_t* _tableData = 0;
|
||||||
};
|
};
|
@ -4,107 +4,107 @@
|
|||||||
|
|
||||||
class BusAccessUnit
|
class BusAccessUnit
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual void groupValueReadLocalConfirm(AckType ack, uint16_t asap, Priority priority, HopCountType hopType, bool status);
|
virtual void groupValueReadLocalConfirm(AckType ack, uint16_t asap, Priority priority, HopCountType hopType, bool status);
|
||||||
virtual void groupValueReadIndication(uint16_t asap, Priority priority, HopCountType hopType);
|
virtual void groupValueReadIndication(uint16_t asap, Priority priority, HopCountType hopType);
|
||||||
virtual void groupValueReadResponseConfirm(AckType ack, uint16_t asap, Priority priority, HopCountType hopTtype,
|
virtual void groupValueReadResponseConfirm(AckType ack, uint16_t asap, Priority priority, HopCountType hopTtype,
|
||||||
uint8_t* data, uint8_t dataLength, bool status);
|
uint8_t* data, uint8_t dataLength, bool status);
|
||||||
virtual void groupValueReadAppLayerConfirm(uint16_t asap, Priority priority, HopCountType hopType,
|
virtual void groupValueReadAppLayerConfirm(uint16_t asap, Priority priority, HopCountType hopType,
|
||||||
uint8_t* data, uint8_t dataLength);
|
uint8_t* data, uint8_t dataLength);
|
||||||
virtual void groupValueWriteLocalConfirm(AckType ack, uint16_t asap, Priority priority, HopCountType hopType,
|
virtual void groupValueWriteLocalConfirm(AckType ack, uint16_t asap, Priority priority, HopCountType hopType,
|
||||||
uint8_t* data, uint8_t dataLength, bool status);
|
uint8_t* data, uint8_t dataLength, bool status);
|
||||||
virtual void groupValueWriteIndication(uint16_t asap, Priority priority, HopCountType hopType,
|
virtual void groupValueWriteIndication(uint16_t asap, Priority priority, HopCountType hopType,
|
||||||
uint8_t* data, uint8_t dataLength);
|
uint8_t* data, uint8_t dataLength);
|
||||||
virtual void individualAddressWriteLocalConfirm(AckType ack, HopCountType hopType,
|
virtual void individualAddressWriteLocalConfirm(AckType ack, HopCountType hopType,
|
||||||
uint16_t newaddress, bool status);
|
uint16_t newaddress, bool status);
|
||||||
virtual void individualAddressWriteIndication(HopCountType hopType, uint16_t newaddress);
|
virtual void individualAddressWriteIndication(HopCountType hopType, uint16_t newaddress);
|
||||||
virtual void individualAddressReadLocalConfirm(AckType ack, HopCountType hopType, bool status);
|
virtual void individualAddressReadLocalConfirm(AckType ack, HopCountType hopType, bool status);
|
||||||
virtual void individualAddressReadIndication(HopCountType hopType);
|
virtual void individualAddressReadIndication(HopCountType hopType);
|
||||||
virtual void individualAddressReadResponseConfirm(AckType ack, HopCountType hopType, bool status);
|
virtual void individualAddressReadResponseConfirm(AckType ack, HopCountType hopType, bool status);
|
||||||
virtual void individualAddressReadAppLayerConfirm(HopCountType hopType, uint16_t individualAddress);
|
virtual void individualAddressReadAppLayerConfirm(HopCountType hopType, uint16_t individualAddress);
|
||||||
virtual void individualAddressSerialNumberReadLocalConfirm(AckType ack, HopCountType hopType,
|
virtual void individualAddressSerialNumberReadLocalConfirm(AckType ack, HopCountType hopType,
|
||||||
uint8_t* serialNumber, bool status);
|
uint8_t* serialNumber, bool status);
|
||||||
virtual void individualAddressSerialNumberReadIndication(HopCountType hopType, uint8_t* serialNumber);
|
virtual void individualAddressSerialNumberReadIndication(HopCountType hopType, uint8_t* serialNumber);
|
||||||
virtual void individualAddressSerialNumberReadResponseConfirm(AckType ack, HopCountType hopType,
|
virtual void individualAddressSerialNumberReadResponseConfirm(AckType ack, HopCountType hopType,
|
||||||
uint8_t* serialNumber, uint16_t domainAddress, bool status);
|
uint8_t* serialNumber, uint16_t domainAddress, bool status);
|
||||||
virtual void individualAddressSerialNumberReadAppLayerConfirm(HopCountType hopType, uint8_t* serialNumber,
|
virtual void individualAddressSerialNumberReadAppLayerConfirm(HopCountType hopType, uint8_t* serialNumber,
|
||||||
uint16_t individualAddress, uint16_t domainAddress);
|
uint16_t individualAddress, uint16_t domainAddress);
|
||||||
virtual void individualAddressSerialNumberWriteLocalConfirm(AckType ack, HopCountType hopType, uint8_t* serialNumber,
|
virtual void individualAddressSerialNumberWriteLocalConfirm(AckType ack, HopCountType hopType, uint8_t* serialNumber,
|
||||||
uint16_t newaddress, bool status);
|
uint16_t newaddress, bool status);
|
||||||
virtual void individualAddressSerialNumberWriteIndication(HopCountType hopType, uint8_t* serialNumber, uint16_t newaddress);
|
virtual void individualAddressSerialNumberWriteIndication(HopCountType hopType, uint8_t* serialNumber, uint16_t newaddress);
|
||||||
virtual void deviceDescriptorReadLocalConfirm(AckType ack, Priority priority, HopCountType hopType, uint16_t asap,
|
virtual void deviceDescriptorReadLocalConfirm(AckType ack, Priority priority, HopCountType hopType, uint16_t asap,
|
||||||
uint8_t descriptorType, bool status);
|
uint8_t descriptorType, bool status);
|
||||||
virtual void deviceDescriptorReadIndication(Priority priority, HopCountType hopType, uint16_t asap, uint8_t descriptorType);
|
virtual void deviceDescriptorReadIndication(Priority priority, HopCountType hopType, uint16_t asap, uint8_t descriptorType);
|
||||||
virtual void deviceDescriptorReadResponseConfirm(AckType ack, Priority priority, HopCountType hopType, uint16_t asap,
|
virtual void deviceDescriptorReadResponseConfirm(AckType ack, Priority priority, HopCountType hopType, uint16_t asap,
|
||||||
uint8_t descriptor_type, uint8_t* device_descriptor, bool status);
|
uint8_t descriptor_type, uint8_t* device_descriptor, bool status);
|
||||||
virtual void deviceDescriptorReadAppLayerConfirm(Priority priority, HopCountType hopType, uint16_t asap,
|
virtual void deviceDescriptorReadAppLayerConfirm(Priority priority, HopCountType hopType, uint16_t asap,
|
||||||
uint8_t descriptortype, uint8_t* deviceDescriptor);
|
uint8_t descriptortype, uint8_t* deviceDescriptor);
|
||||||
virtual void restartRequestLocalConfirm(AckType ack, Priority priority, HopCountType hopType, uint16_t asap, bool status);
|
virtual void restartRequestLocalConfirm(AckType ack, Priority priority, HopCountType hopType, uint16_t asap, bool status);
|
||||||
virtual void restartRequestIndication(Priority priority, HopCountType hopType, uint16_t asap);
|
virtual void restartRequestIndication(Priority priority, HopCountType hopType, uint16_t asap);
|
||||||
virtual void propertyValueReadLocalConfirm(AckType ack, Priority priority, HopCountType hopType, uint16_t asap,
|
virtual void propertyValueReadLocalConfirm(AckType ack, Priority priority, HopCountType hopType, uint16_t asap,
|
||||||
uint8_t objectIndex, uint8_t propertyId, uint8_t numberOfElements, uint16_t startIndex, bool status);
|
uint8_t objectIndex, uint8_t propertyId, uint8_t numberOfElements, uint16_t startIndex, bool status);
|
||||||
virtual void propertyValueReadIndication(Priority priority, HopCountType hopType, uint16_t asap, uint8_t objectIndex,
|
virtual void propertyValueReadIndication(Priority priority, HopCountType hopType, uint16_t asap, uint8_t objectIndex,
|
||||||
uint8_t propertyId, uint8_t numberOfElements, uint16_t startIndex);
|
uint8_t propertyId, uint8_t numberOfElements, uint16_t startIndex);
|
||||||
virtual void propertyValueReadResponseConfirm(AckType ack, Priority priority, HopCountType hopType, uint16_t asap, uint8_t objectIndex,
|
virtual void propertyValueReadResponseConfirm(AckType ack, Priority priority, HopCountType hopType, uint16_t asap, uint8_t objectIndex,
|
||||||
uint8_t propertyId, uint8_t numberOfElements, uint16_t startIndex, uint8_t* data, uint8_t length, bool status);
|
uint8_t propertyId, uint8_t numberOfElements, uint16_t startIndex, uint8_t* data, uint8_t length, bool status);
|
||||||
virtual void propertyValueReadAppLayerConfirm(Priority priority, HopCountType hopType, uint16_t asap, uint8_t objectIndex,
|
virtual void propertyValueReadAppLayerConfirm(Priority priority, HopCountType hopType, uint16_t asap, uint8_t objectIndex,
|
||||||
uint8_t propertyId, uint8_t numberOfElements, uint16_t startIndex, uint8_t* data, uint8_t length);
|
uint8_t propertyId, uint8_t numberOfElements, uint16_t startIndex, uint8_t* data, uint8_t length);
|
||||||
virtual void propertyValueWriteLocalConfirm(AckType ack, Priority priority, HopCountType hopType, uint16_t asap, uint8_t objectIndex,
|
virtual void propertyValueWriteLocalConfirm(AckType ack, Priority priority, HopCountType hopType, uint16_t asap, uint8_t objectIndex,
|
||||||
uint8_t propertyId, uint8_t numberOfElements, uint16_t startIndex, uint8_t* data, uint8_t length, bool status);
|
uint8_t propertyId, uint8_t numberOfElements, uint16_t startIndex, uint8_t* data, uint8_t length, bool status);
|
||||||
virtual void propertyValueWriteIndication(Priority priority, HopCountType hopType, uint16_t asap, uint8_t objectIndex,
|
virtual void propertyValueWriteIndication(Priority priority, HopCountType hopType, uint16_t asap, uint8_t objectIndex,
|
||||||
uint8_t propertyId, uint8_t numberOfElements, uint16_t startIndex, uint8_t* data, uint8_t length);
|
uint8_t propertyId, uint8_t numberOfElements, uint16_t startIndex, uint8_t* data, uint8_t length);
|
||||||
virtual void propertyDescriptionReadLocalConfirm(AckType ack, Priority priority, HopCountType hopType, uint16_t asap,
|
virtual void propertyDescriptionReadLocalConfirm(AckType ack, Priority priority, HopCountType hopType, uint16_t asap,
|
||||||
uint8_t objectIndex, uint8_t propertyId, uint8_t propertyIndex, bool status);
|
uint8_t objectIndex, uint8_t propertyId, uint8_t propertyIndex, bool status);
|
||||||
virtual void propertyDescriptionReadIndication(Priority priority, HopCountType hopType, uint16_t asap,
|
virtual void propertyDescriptionReadIndication(Priority priority, HopCountType hopType, uint16_t asap,
|
||||||
uint8_t objectIndex, uint8_t propertyId, uint8_t propertyIndex);
|
uint8_t objectIndex, uint8_t propertyId, uint8_t propertyIndex);
|
||||||
virtual void propertyDescriptionReadResponse(AckType ack, Priority priority, HopCountType hopType, uint16_t asap,
|
virtual void propertyDescriptionReadResponse(AckType ack, Priority priority, HopCountType hopType, uint16_t asap,
|
||||||
uint8_t objectIndex, uint8_t propertyId, uint8_t propertyIndex, bool writeEnable, uint8_t type,
|
uint8_t objectIndex, uint8_t propertyId, uint8_t propertyIndex, bool writeEnable, uint8_t type,
|
||||||
uint16_t maxNumberOfElements, uint8_t access);
|
uint16_t maxNumberOfElements, uint8_t access);
|
||||||
virtual void propertyDescriptionReadResponseConfirm(AckType ack, Priority priority, HopCountType hopType, uint16_t asap,
|
virtual void propertyDescriptionReadResponseConfirm(AckType ack, Priority priority, HopCountType hopType, uint16_t asap,
|
||||||
uint8_t objectIndex, uint8_t propertyId, uint8_t propertyIndex, bool writeEnable, uint8_t type,
|
uint8_t objectIndex, uint8_t propertyId, uint8_t propertyIndex, bool writeEnable, uint8_t type,
|
||||||
uint16_t maxNumberOfElements, uint8_t access, bool status);
|
uint16_t maxNumberOfElements, uint8_t access, bool status);
|
||||||
virtual void propertyDescriptionReadAppLayerConfirm(Priority priority, HopCountType hopType, uint16_t asap,
|
virtual void propertyDescriptionReadAppLayerConfirm(Priority priority, HopCountType hopType, uint16_t asap,
|
||||||
uint8_t objectIndex, uint8_t propertyId, uint8_t propertyIndex, bool writeEnable, uint8_t type,
|
uint8_t objectIndex, uint8_t propertyId, uint8_t propertyIndex, bool writeEnable, uint8_t type,
|
||||||
uint16_t maxNumberOfElements, uint8_t access);
|
uint16_t maxNumberOfElements, uint8_t access);
|
||||||
virtual void memoryReadLocalConfirm(AckType ack, Priority priority, HopCountType hopType, uint16_t asap, uint8_t number,
|
virtual void memoryReadLocalConfirm(AckType ack, Priority priority, HopCountType hopType, uint16_t asap, uint8_t number,
|
||||||
uint16_t memoryAddress, bool status);
|
uint16_t memoryAddress, bool status);
|
||||||
virtual void memoryReadIndication(Priority priority, HopCountType hopType, uint16_t asap, uint8_t number, uint16_t memoryAddress);
|
virtual void memoryReadIndication(Priority priority, HopCountType hopType, uint16_t asap, uint8_t number, uint16_t memoryAddress);
|
||||||
virtual void memoryReadResponseConfirm(AckType ack, Priority priority, HopCountType hopType, uint16_t asap, uint8_t number,
|
virtual void memoryReadResponseConfirm(AckType ack, Priority priority, HopCountType hopType, uint16_t asap, uint8_t number,
|
||||||
uint16_t memoryAddress, uint8_t* data, bool status);
|
uint16_t memoryAddress, uint8_t* data, bool status);
|
||||||
virtual void memoryReadAppLayerConfirm(Priority priority, HopCountType hopType, uint16_t asap, uint8_t number,
|
virtual void memoryReadAppLayerConfirm(Priority priority, HopCountType hopType, uint16_t asap, uint8_t number,
|
||||||
uint16_t memoryAddress, uint8_t* data);
|
uint16_t memoryAddress, uint8_t* data);
|
||||||
virtual void memoryWriteLocalConfirm(AckType ack, Priority priority, HopCountType hopType, uint16_t asap, uint8_t number,
|
virtual void memoryWriteLocalConfirm(AckType ack, Priority priority, HopCountType hopType, uint16_t asap, uint8_t number,
|
||||||
uint16_t memoryAddress, uint8_t* data, bool status);
|
uint16_t memoryAddress, uint8_t* data, bool status);
|
||||||
virtual void memoryWriteIndication(Priority priority, HopCountType hopType, uint16_t asap, uint8_t number,
|
virtual void memoryWriteIndication(Priority priority, HopCountType hopType, uint16_t asap, uint8_t number,
|
||||||
uint16_t memoryAddress, uint8_t* data);
|
uint16_t memoryAddress, uint8_t* data);
|
||||||
virtual void userMemoryReadLocalConfirm(AckType ack, Priority priority, HopCountType hopType, uint16_t asap, uint8_t number,
|
virtual void userMemoryReadLocalConfirm(AckType ack, Priority priority, HopCountType hopType, uint16_t asap, uint8_t number,
|
||||||
uint32_t memoryAddress, bool status);
|
uint32_t memoryAddress, bool status);
|
||||||
virtual void userMemoryReadIndication(Priority priority, HopCountType hopType, uint16_t asap, uint8_t number,
|
virtual void userMemoryReadIndication(Priority priority, HopCountType hopType, uint16_t asap, uint8_t number,
|
||||||
uint32_t memoryAddress);
|
uint32_t memoryAddress);
|
||||||
virtual void userMemoryReadResponseConfirm(AckType ack, Priority priority, HopCountType hopType, uint16_t asap, uint8_t number,
|
virtual void userMemoryReadResponseConfirm(AckType ack, Priority priority, HopCountType hopType, uint16_t asap, uint8_t number,
|
||||||
uint32_t memoryAddress, uint8_t* memoryData, bool status);
|
uint32_t memoryAddress, uint8_t* memoryData, bool status);
|
||||||
virtual void userMemoryReadAppLayerConfirm(Priority priority, HopCountType hopType, uint16_t asap, uint8_t number,
|
virtual void userMemoryReadAppLayerConfirm(Priority priority, HopCountType hopType, uint16_t asap, uint8_t number,
|
||||||
uint32_t memoryAddress, uint8_t* memoryData);
|
uint32_t memoryAddress, uint8_t* memoryData);
|
||||||
virtual void userMemoryWriteLocalConfirm(AckType ack, Priority priority, HopCountType hopType, uint16_t asap, uint8_t number,
|
virtual void userMemoryWriteLocalConfirm(AckType ack, Priority priority, HopCountType hopType, uint16_t asap, uint8_t number,
|
||||||
uint32_t memoryAddress, uint8_t* memoryData, bool status);
|
uint32_t memoryAddress, uint8_t* memoryData, bool status);
|
||||||
virtual void userMemoryWriteIndication(Priority priority, HopCountType hopType, uint16_t asap, uint8_t number,
|
virtual void userMemoryWriteIndication(Priority priority, HopCountType hopType, uint16_t asap, uint8_t number,
|
||||||
uint32_t memoryAddress, uint8_t* memoryData);
|
uint32_t memoryAddress, uint8_t* memoryData);
|
||||||
virtual void userManufacturerInfoLocalConfirm(AckType ack, Priority priority, HopCountType hopType, uint16_t asap, bool status);
|
virtual void userManufacturerInfoLocalConfirm(AckType ack, Priority priority, HopCountType hopType, uint16_t asap, bool status);
|
||||||
virtual void userManufacturerInfoIndication(Priority priority, HopCountType hopType, uint16_t asap);
|
virtual void userManufacturerInfoIndication(Priority priority, HopCountType hopType, uint16_t asap);
|
||||||
virtual void userManufacturerInfoResponseConfirm(AckType ack, Priority priority, HopCountType hopType, uint16_t asap,
|
virtual void userManufacturerInfoResponseConfirm(AckType ack, Priority priority, HopCountType hopType, uint16_t asap,
|
||||||
uint8_t* info, bool status);
|
uint8_t* info, bool status);
|
||||||
virtual void userManufacturerInfoAppLayerConfirm(Priority priority, HopCountType hopType, uint16_t asap,
|
virtual void userManufacturerInfoAppLayerConfirm(Priority priority, HopCountType hopType, uint16_t asap,
|
||||||
uint8_t* info);
|
uint8_t* info);
|
||||||
virtual void authorizeLocalConfirm(AckType ack, Priority priority, HopCountType hopType, uint16_t asap, uint32_t key, bool status);
|
virtual void authorizeLocalConfirm(AckType ack, Priority priority, HopCountType hopType, uint16_t asap, uint32_t key, bool status);
|
||||||
virtual void authorizeIndication(Priority priority, HopCountType hopType, uint16_t asap, uint32_t key);
|
virtual void authorizeIndication(Priority priority, HopCountType hopType, uint16_t asap, uint32_t key);
|
||||||
virtual void authorizeResponseConfirm(AckType ack, Priority priority, HopCountType hopType, uint16_t asap, uint8_t level,
|
virtual void authorizeResponseConfirm(AckType ack, Priority priority, HopCountType hopType, uint16_t asap, uint8_t level,
|
||||||
bool status);
|
bool status);
|
||||||
virtual void authorizeAppLayerConfirm(Priority priority, HopCountType hopType, uint16_t asap, uint8_t level);
|
virtual void authorizeAppLayerConfirm(Priority priority, HopCountType hopType, uint16_t asap, uint8_t level);
|
||||||
virtual void keyWriteLocalConfirm(AckType ack, Priority priority, HopCountType hopType, uint16_t asap, uint8_t level,
|
virtual void keyWriteLocalConfirm(AckType ack, Priority priority, HopCountType hopType, uint16_t asap, uint8_t level,
|
||||||
uint32_t key, bool status);
|
uint32_t key, bool status);
|
||||||
virtual void keyWriteIndication(Priority priority, HopCountType hopType, uint16_t asap, uint8_t level,
|
virtual void keyWriteIndication(Priority priority, HopCountType hopType, uint16_t asap, uint8_t level,
|
||||||
uint32_t key);
|
uint32_t key);
|
||||||
virtual void keyWriteResponseConfirm(AckType ack, Priority priority, HopCountType hopType, uint16_t asap, uint8_t level,
|
virtual void keyWriteResponseConfirm(AckType ack, Priority priority, HopCountType hopType, uint16_t asap, uint8_t level,
|
||||||
bool status);
|
bool status);
|
||||||
virtual void keyWriteAppLayerConfirm(Priority priority, HopCountType hopType, uint16_t asap, uint8_t level);
|
virtual void keyWriteAppLayerConfirm(Priority priority, HopCountType hopType, uint16_t asap, uint8_t level);
|
||||||
};
|
};
|
||||||
|
@ -2,37 +2,33 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
Bau07B0::Bau07B0(Platform& platform): BauSystemB(platform),
|
Bau07B0::Bau07B0(Platform& platform)
|
||||||
_dlLayer(_deviceObj, _addrTable, _netLayer, _platform)
|
: BauSystemB(platform),
|
||||||
|
_dlLayer(_deviceObj, _addrTable, _netLayer, _platform)
|
||||||
{
|
{
|
||||||
_netLayer.dataLinkLayer(_dlLayer);
|
_netLayer.dataLinkLayer(_dlLayer);
|
||||||
|
|
||||||
uint8_t descriptor[] = { 0x07, 0xb0 };
|
|
||||||
_descriptor[0] = descriptor[0];
|
|
||||||
_descriptor[1] = descriptor[1];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
InterfaceObject* Bau07B0::getInterfaceObject(uint8_t idx)
|
InterfaceObject* Bau07B0::getInterfaceObject(uint8_t idx)
|
||||||
{
|
{
|
||||||
switch (idx)
|
switch (idx)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
return &_deviceObj;
|
return &_deviceObj;
|
||||||
case 1:
|
case 1:
|
||||||
return &_addrTable;
|
return &_addrTable;
|
||||||
case 2:
|
case 2:
|
||||||
return &_assocTable;
|
return &_assocTable;
|
||||||
case 3:
|
case 3:
|
||||||
return &_groupObjTable;
|
return &_groupObjTable;
|
||||||
case 4:
|
case 4:
|
||||||
return &_appProgram;
|
return &_appProgram;
|
||||||
case 5: // would be app_program 2
|
case 5: // would be app_program 2
|
||||||
return nullptr;
|
return nullptr;
|
||||||
default:
|
default:
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,15 +3,17 @@
|
|||||||
#include "bau_systemB.h"
|
#include "bau_systemB.h"
|
||||||
#include "tpuart_data_link_layer.h"
|
#include "tpuart_data_link_layer.h"
|
||||||
|
|
||||||
class Bau07B0: public BauSystemB
|
class Bau07B0 : public BauSystemB
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Bau07B0(Platform& platform);
|
Bau07B0(Platform& platform);
|
||||||
protected:
|
|
||||||
|
protected:
|
||||||
InterfaceObject* getInterfaceObject(uint8_t idx);
|
InterfaceObject* getInterfaceObject(uint8_t idx);
|
||||||
uint8_t* descriptor();
|
uint8_t* descriptor();
|
||||||
DataLinkLayer& dataLinkLayer();
|
DataLinkLayer& dataLinkLayer();
|
||||||
private:
|
|
||||||
|
private:
|
||||||
TpUartDataLinkLayer _dlLayer;
|
TpUartDataLinkLayer _dlLayer;
|
||||||
uint8_t _descriptor[2];
|
uint8_t _descriptor[2] = {0x07, 0xb0};
|
||||||
};
|
};
|
@ -4,38 +4,35 @@
|
|||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
Bau57B0::Bau57B0(Platform& platform): BauSystemB(platform),
|
Bau57B0::Bau57B0(Platform& platform)
|
||||||
_ipParameters(_deviceObj, platform),
|
: BauSystemB(platform),
|
||||||
_dlLayer(_deviceObj, _addrTable, _ipParameters, _netLayer, _platform)
|
_ipParameters(_deviceObj, platform),
|
||||||
|
_dlLayer(_deviceObj, _addrTable, _ipParameters, _netLayer, _platform)
|
||||||
{
|
{
|
||||||
_netLayer.dataLinkLayer(_dlLayer);
|
_netLayer.dataLinkLayer(_dlLayer);
|
||||||
_memory.addSaveRestore(&_ipParameters);
|
_memory.addSaveRestore(&_ipParameters);
|
||||||
|
|
||||||
uint8_t descriptor[] = { 0x57, 0xb0 };
|
|
||||||
_descriptor[0] = descriptor[0];
|
|
||||||
_descriptor[1] = descriptor[1];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
InterfaceObject* Bau57B0::getInterfaceObject(uint8_t idx)
|
InterfaceObject* Bau57B0::getInterfaceObject(uint8_t idx)
|
||||||
{
|
{
|
||||||
switch (idx)
|
switch (idx)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
return &_deviceObj;
|
return &_deviceObj;
|
||||||
case 1:
|
case 1:
|
||||||
return &_addrTable;
|
return &_addrTable;
|
||||||
case 2:
|
case 2:
|
||||||
return &_assocTable;
|
return &_assocTable;
|
||||||
case 3:
|
case 3:
|
||||||
return &_groupObjTable;
|
return &_groupObjTable;
|
||||||
case 4:
|
case 4:
|
||||||
return &_appProgram;
|
return &_appProgram;
|
||||||
case 5: // would be app_program 2
|
case 5: // would be app_program 2
|
||||||
return nullptr;
|
return nullptr;
|
||||||
case 6:
|
case 6:
|
||||||
return &_ipParameters;
|
return &_ipParameters;
|
||||||
default:
|
default:
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,16 +4,18 @@
|
|||||||
#include "ip_parameter_object.h"
|
#include "ip_parameter_object.h"
|
||||||
#include "ip_data_link_layer.h"
|
#include "ip_data_link_layer.h"
|
||||||
|
|
||||||
class Bau57B0: public BauSystemB
|
class Bau57B0 : public BauSystemB
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Bau57B0(Platform& platform);
|
Bau57B0(Platform& platform);
|
||||||
protected:
|
|
||||||
|
protected:
|
||||||
InterfaceObject* getInterfaceObject(uint8_t idx);
|
InterfaceObject* getInterfaceObject(uint8_t idx);
|
||||||
uint8_t* descriptor();
|
uint8_t* descriptor();
|
||||||
DataLinkLayer& dataLinkLayer();
|
DataLinkLayer& dataLinkLayer();
|
||||||
private:
|
|
||||||
|
private:
|
||||||
IpParameterObject _ipParameters;
|
IpParameterObject _ipParameters;
|
||||||
IpDataLinkLayer _dlLayer;
|
IpDataLinkLayer _dlLayer;
|
||||||
uint8_t _descriptor[2];
|
uint8_t _descriptor[2] = {0x57, 0xb0};
|
||||||
};
|
};
|
@ -13,9 +13,9 @@
|
|||||||
#include "platform.h"
|
#include "platform.h"
|
||||||
#include "memory.h"
|
#include "memory.h"
|
||||||
|
|
||||||
class BauSystemB: protected BusAccessUnit
|
class BauSystemB : protected BusAccessUnit
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
BauSystemB(Platform& platform);
|
BauSystemB(Platform& platform);
|
||||||
virtual void loop();
|
virtual void loop();
|
||||||
DeviceObject& deviceObject();
|
DeviceObject& deviceObject();
|
||||||
@ -28,13 +28,14 @@ public:
|
|||||||
void writeMemory();
|
void writeMemory();
|
||||||
void addSaveRestore(SaveRestore* obj);
|
void addSaveRestore(SaveRestore* obj);
|
||||||
void restartRequest(uint16_t asap);
|
void restartRequest(uint16_t asap);
|
||||||
protected:
|
|
||||||
|
protected:
|
||||||
virtual DataLinkLayer& dataLinkLayer() = 0;
|
virtual DataLinkLayer& dataLinkLayer() = 0;
|
||||||
virtual uint8_t* descriptor() = 0;
|
virtual uint8_t* descriptor() = 0;
|
||||||
void memoryWriteIndication(Priority priority, HopCountType hopType, uint16_t asap, uint8_t number,
|
void memoryWriteIndication(Priority priority, HopCountType hopType, uint16_t asap, uint8_t number,
|
||||||
uint16_t memoryAddress, uint8_t* data) override;
|
uint16_t memoryAddress, uint8_t* data) override;
|
||||||
void memoryReadIndication(Priority priority, HopCountType hopType, uint16_t asap, uint8_t number,
|
void memoryReadIndication(Priority priority, HopCountType hopType, uint16_t asap, uint8_t number,
|
||||||
uint16_t memoryAddress) override;
|
uint16_t memoryAddress) override;
|
||||||
void deviceDescriptorReadIndication(Priority priority, HopCountType hopType, uint16_t asap, uint8_t descriptorType) override;
|
void deviceDescriptorReadIndication(Priority priority, HopCountType hopType, uint16_t asap, uint8_t descriptorType) override;
|
||||||
void restartRequestIndication(Priority priority, HopCountType hopType, uint16_t asap) override;
|
void restartRequestIndication(Priority priority, HopCountType hopType, uint16_t asap) override;
|
||||||
void authorizeIndication(Priority priority, HopCountType hopType, uint16_t asap, uint32_t key) override;
|
void authorizeIndication(Priority priority, HopCountType hopType, uint16_t asap, uint32_t key) override;
|
||||||
@ -58,7 +59,6 @@ protected:
|
|||||||
void groupValueWriteIndication(uint16_t asap, Priority priority, HopCountType hopType,
|
void groupValueWriteIndication(uint16_t asap, Priority priority, HopCountType hopType,
|
||||||
uint8_t* data, uint8_t dataLength) override;
|
uint8_t* data, uint8_t dataLength) override;
|
||||||
|
|
||||||
|
|
||||||
virtual InterfaceObject* getInterfaceObject(uint8_t idx) = 0;
|
virtual InterfaceObject* getInterfaceObject(uint8_t idx) = 0;
|
||||||
void sendNextGroupTelegram();
|
void sendNextGroupTelegram();
|
||||||
void updateGroupObject(GroupObject& go, uint8_t* data, uint8_t length);
|
void updateGroupObject(GroupObject& go, uint8_t* data, uint8_t length);
|
||||||
|
@ -15,18 +15,19 @@
|
|||||||
class CemiFrame
|
class CemiFrame
|
||||||
{
|
{
|
||||||
friend class DataLinkLayer;
|
friend class DataLinkLayer;
|
||||||
public:
|
|
||||||
|
public:
|
||||||
CemiFrame(uint8_t* data, uint16_t length);
|
CemiFrame(uint8_t* data, uint16_t length);
|
||||||
CemiFrame(uint8_t apduLength);
|
CemiFrame(uint8_t apduLength);
|
||||||
CemiFrame(const CemiFrame& other);
|
CemiFrame(const CemiFrame& other);
|
||||||
CemiFrame& operator= (CemiFrame other);
|
CemiFrame& operator=(CemiFrame other);
|
||||||
|
|
||||||
MessageCode messageCode() const;
|
MessageCode messageCode() const;
|
||||||
void messageCode(MessageCode value);
|
void messageCode(MessageCode value);
|
||||||
uint16_t totalLenght() const;
|
uint16_t totalLenght() const;
|
||||||
uint16_t telegramLengthtTP() const;
|
uint16_t telegramLengthtTP() const;
|
||||||
void fillTelegramTP(uint8_t* data);
|
void fillTelegramTP(uint8_t* data);
|
||||||
|
|
||||||
FrameFormat frameType() const;
|
FrameFormat frameType() const;
|
||||||
void frameType(FrameFormat value);
|
void frameType(FrameFormat value);
|
||||||
Repetition repetition() const;
|
Repetition repetition() const;
|
||||||
@ -49,15 +50,16 @@ public:
|
|||||||
NPDU& npdu();
|
NPDU& npdu();
|
||||||
TPDU& tpdu();
|
TPDU& tpdu();
|
||||||
APDU& apdu();
|
APDU& apdu();
|
||||||
|
|
||||||
uint8_t calcCRC(uint8_t* buffer, uint16_t len);
|
uint8_t calcCRC(uint8_t* buffer, uint16_t len);
|
||||||
bool valid() const;
|
bool valid() const;
|
||||||
private:
|
|
||||||
uint8_t buffer[0xff + NPDU_LPDU_DIFF]; //only valid of add info is zero
|
private:
|
||||||
uint8_t* _data;
|
uint8_t buffer[0xff + NPDU_LPDU_DIFF] = {0}; //only valid of add info is zero
|
||||||
uint8_t* _ctrl1;
|
uint8_t* _data = 0;
|
||||||
|
uint8_t* _ctrl1 = 0;
|
||||||
NPDU _npdu;
|
NPDU _npdu;
|
||||||
TPDU _tpdu;
|
TPDU _tpdu;
|
||||||
APDU _apdu;
|
APDU _apdu;
|
||||||
uint16_t _length; // only set if created from byte array
|
uint16_t _length = 0; // only set if created from byte array
|
||||||
};
|
};
|
@ -8,21 +8,22 @@
|
|||||||
|
|
||||||
class DataLinkLayer
|
class DataLinkLayer
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
DataLinkLayer(DeviceObject& devObj, AddressTableObject& addrTab, NetworkLayer& layer,
|
DataLinkLayer(DeviceObject& devObj, AddressTableObject& addrTab, NetworkLayer& layer,
|
||||||
Platform& platform);
|
Platform& platform);
|
||||||
|
|
||||||
// from network layer
|
// from network layer
|
||||||
void dataRequest(AckType ack, AddressType addrType, uint16_t destinationAddr, FrameFormat format,
|
void dataRequest(AckType ack, AddressType addrType, uint16_t destinationAddr, FrameFormat format,
|
||||||
Priority priority, NPDU& npdu);
|
Priority priority, NPDU& npdu);
|
||||||
void systemBroadcastRequest(AckType ack, FrameFormat format, Priority priority, NPDU& npdu);
|
void systemBroadcastRequest(AckType ack, FrameFormat format, Priority priority, NPDU& npdu);
|
||||||
virtual void loop() = 0;
|
virtual void loop() = 0;
|
||||||
virtual void enabled(bool value) = 0;
|
virtual void enabled(bool value) = 0;
|
||||||
virtual bool enabled() const = 0;
|
virtual bool enabled() const = 0;
|
||||||
protected:
|
|
||||||
|
protected:
|
||||||
void frameRecieved(CemiFrame& frame);
|
void frameRecieved(CemiFrame& frame);
|
||||||
void dataConReceived(CemiFrame& frame, bool success);
|
void dataConReceived(CemiFrame& frame, bool success);
|
||||||
bool sendTelegram(NPDU &npdu, AckType ack, uint16_t destinationAddr, AddressType addrType, FrameFormat format, Priority priority);
|
bool sendTelegram(NPDU& npdu, AckType ack, uint16_t destinationAddr, AddressType addrType, FrameFormat format, Priority priority);
|
||||||
virtual bool sendFrame(CemiFrame& frame) = 0;
|
virtual bool sendFrame(CemiFrame& frame) = 0;
|
||||||
uint8_t* frameData(CemiFrame& frame);
|
uint8_t* frameData(CemiFrame& frame);
|
||||||
DeviceObject& _deviceObject;
|
DeviceObject& _deviceObject;
|
||||||
|
@ -35,7 +35,7 @@ void DeviceObject::readProperty(PropertyID propertyId, uint32_t start, uint32_t&
|
|||||||
*data = _prgMode;
|
*data = _prgMode;
|
||||||
break;
|
break;
|
||||||
case PID_MAX_APDU_LENGTH:
|
case PID_MAX_APDU_LENGTH:
|
||||||
pushWord(15, data);
|
pushWord(254, data);
|
||||||
break;
|
break;
|
||||||
case PID_SUBNET_ADDR:
|
case PID_SUBNET_ADDR:
|
||||||
*data = ((_ownAddress >> 8) & 0xff);
|
*data = ((_ownAddress >> 8) & 0xff);
|
||||||
|
@ -39,13 +39,13 @@ protected:
|
|||||||
uint8_t propertyCount();
|
uint8_t propertyCount();
|
||||||
PropertyDescription* propertyDescriptions();
|
PropertyDescription* propertyDescriptions();
|
||||||
private:
|
private:
|
||||||
uint8_t _deviceControl;
|
uint8_t _deviceControl = 0;
|
||||||
uint8_t _routingCount;
|
uint8_t _routingCount = 0;
|
||||||
uint8_t _prgMode;
|
uint8_t _prgMode = 0;
|
||||||
uint16_t _ownAddress;
|
uint16_t _ownAddress = 0;
|
||||||
uint16_t _manufacturerId = 0xfa; //Default to KNXA
|
uint16_t _manufacturerId = 0xfa; //Default to KNXA
|
||||||
uint32_t _bauNumber;
|
uint32_t _bauNumber = 0;
|
||||||
char _orderNumber[10];
|
char _orderNumber[10] = "";
|
||||||
uint8_t _hardwareType[6];
|
uint8_t _hardwareType[6] = { 0, 0, 0, 0, 0, 0};
|
||||||
uint16_t _version;
|
uint16_t _version = 0;
|
||||||
};
|
};
|
@ -1794,7 +1794,11 @@ void float16ToPayload(uint8_t* payload, int payload_length, int index, double va
|
|||||||
}
|
}
|
||||||
|
|
||||||
value *= 100.0;
|
value *= 100.0;
|
||||||
unsigned short exponent = ceil(log2(value) - 11.0);
|
unsigned short exponent = 0;
|
||||||
|
|
||||||
|
if(value > 2048)
|
||||||
|
exponent = ceil(log2(value) - 11.0);
|
||||||
|
|
||||||
short mantissa = roundf(value / (1 << exponent));
|
short mantissa = roundf(value / (1 << exponent));
|
||||||
|
|
||||||
if (wasNegative)
|
if (wasNegative)
|
||||||
|
@ -36,110 +36,110 @@
|
|||||||
/**
|
/**
|
||||||
* Converts the KNX Payload given by the specific DPT and puts the value in the KNXValue struc
|
* Converts the KNX Payload given by the specific DPT and puts the value in the KNXValue struc
|
||||||
*/
|
*/
|
||||||
int KNX_Decode_Value(uint8_t *payload, int payload_length, const Dpt& datatype, KNXValue& value);
|
int KNX_Decode_Value(uint8_t* payload, int payload_length, const Dpt& datatype, KNXValue& value);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Converts the KNXValue struct to the KNX Payload as the specific DPT
|
* Converts the KNXValue struct to the KNX Payload as the specific DPT
|
||||||
*/
|
*/
|
||||||
int KNX_Encode_Value(const KNXValue& value, uint8_t *payload, int payload_length, const Dpt& datatype);
|
int KNX_Encode_Value(const KNXValue& value, uint8_t* payload, int payload_length, const Dpt& datatype);
|
||||||
|
|
||||||
//KNX to internal
|
//KNX to internal
|
||||||
int busValueToBinary(const uint8_t *payload, int payload_length, const Dpt& datatype, KNXValue& value);
|
int busValueToBinary(const uint8_t* payload, int payload_length, const Dpt& datatype, KNXValue& value);
|
||||||
int busValueToBinaryControl(const uint8_t *payload, int payload_length, const Dpt& datatype, KNXValue& value);
|
int busValueToBinaryControl(const uint8_t* payload, int payload_length, const Dpt& datatype, KNXValue& value);
|
||||||
int busValueToStepControl(const uint8_t *payload, int payload_length, const Dpt& datatype, KNXValue& value);
|
int busValueToStepControl(const uint8_t* payload, int payload_length, const Dpt& datatype, KNXValue& value);
|
||||||
int busValueToCharacter(const uint8_t *payload, int payload_length, const Dpt& datatype, KNXValue& value);
|
int busValueToCharacter(const uint8_t* payload, int payload_length, const Dpt& datatype, KNXValue& value);
|
||||||
int busValueToUnsigned8(const uint8_t *payload, int payload_length, const Dpt& datatype, KNXValue& value);
|
int busValueToUnsigned8(const uint8_t* payload, int payload_length, const Dpt& datatype, KNXValue& value);
|
||||||
int busValueToSigned8(const uint8_t *payload, int payload_length, const Dpt& datatype, KNXValue& value);
|
int busValueToSigned8(const uint8_t* payload, int payload_length, const Dpt& datatype, KNXValue& value);
|
||||||
int busValueToStatusAndMode(const uint8_t *payload, int payload_length, const Dpt& datatype, KNXValue& value);
|
int busValueToStatusAndMode(const uint8_t* payload, int payload_length, const Dpt& datatype, KNXValue& value);
|
||||||
int busValueToUnsigned16(const uint8_t *payload, int payload_length, const Dpt& datatype, KNXValue& value);
|
int busValueToUnsigned16(const uint8_t* payload, int payload_length, const Dpt& datatype, KNXValue& value);
|
||||||
int busValueToTimePeriod(const uint8_t *payload, int payload_length, const Dpt& datatype, KNXValue& value);
|
int busValueToTimePeriod(const uint8_t* payload, int payload_length, const Dpt& datatype, KNXValue& value);
|
||||||
int busValueToSigned16(const uint8_t *payload, int payload_length, const Dpt& datatype, KNXValue& value);
|
int busValueToSigned16(const uint8_t* payload, int payload_length, const Dpt& datatype, KNXValue& value);
|
||||||
int busValueToTimeDelta(const uint8_t *payload, int payload_length, const Dpt& datatype, KNXValue& value);
|
int busValueToTimeDelta(const uint8_t* payload, int payload_length, const Dpt& datatype, KNXValue& value);
|
||||||
int busValueToFloat16(const uint8_t *payload, int payload_length, const Dpt& datatype, KNXValue& value);
|
int busValueToFloat16(const uint8_t* payload, int payload_length, const Dpt& datatype, KNXValue& value);
|
||||||
int busValueToTime(const uint8_t *payload, int payload_length, const Dpt& datatype, KNXValue& value);
|
int busValueToTime(const uint8_t* payload, int payload_length, const Dpt& datatype, KNXValue& value);
|
||||||
int busValueToDate(const uint8_t *payload, int payload_length, const Dpt& datatype, KNXValue& value);
|
int busValueToDate(const uint8_t* payload, int payload_length, const Dpt& datatype, KNXValue& value);
|
||||||
int busValueToUnsigned32(const uint8_t *payload, int payload_length, const Dpt& datatype, KNXValue& value);
|
int busValueToUnsigned32(const uint8_t* payload, int payload_length, const Dpt& datatype, KNXValue& value);
|
||||||
int busValueToSigned32(const uint8_t *payload, int payload_length, const Dpt& datatype, KNXValue& value);
|
int busValueToSigned32(const uint8_t* payload, int payload_length, const Dpt& datatype, KNXValue& value);
|
||||||
int busValueToLongTimePeriod(const uint8_t *payload, int payload_length, const Dpt& datatype, KNXValue& value);
|
int busValueToLongTimePeriod(const uint8_t* payload, int payload_length, const Dpt& datatype, KNXValue& value);
|
||||||
int busValueToFloat32(const uint8_t *payload, int payload_length, const Dpt& datatype, KNXValue& value);
|
int busValueToFloat32(const uint8_t* payload, int payload_length, const Dpt& datatype, KNXValue& value);
|
||||||
int busValueToAccess(const uint8_t *payload, int payload_length, const Dpt& datatype, KNXValue& value);
|
int busValueToAccess(const uint8_t* payload, int payload_length, const Dpt& datatype, KNXValue& value);
|
||||||
int busValueToString(const uint8_t *payload, int payload_length, const Dpt& datatype, KNXValue& value);
|
int busValueToString(const uint8_t* payload, int payload_length, const Dpt& datatype, KNXValue& value);
|
||||||
int busValueToScene(const uint8_t *payload, int payload_length, const Dpt& datatype, KNXValue& value);
|
int busValueToScene(const uint8_t* payload, int payload_length, const Dpt& datatype, KNXValue& value);
|
||||||
int busValueToSceneControl(const uint8_t *payload, int payload_length, const Dpt& datatype, KNXValue& value);
|
int busValueToSceneControl(const uint8_t* payload, int payload_length, const Dpt& datatype, KNXValue& value);
|
||||||
int busValueToSceneInfo(const uint8_t *payload, int payload_length, const Dpt& datatype, KNXValue& value);
|
int busValueToSceneInfo(const uint8_t* payload, int payload_length, const Dpt& datatype, KNXValue& value);
|
||||||
int busValueToSceneConfig(const uint8_t *payload, int payload_length, const Dpt& datatype, KNXValue& value);
|
int busValueToSceneConfig(const uint8_t* payload, int payload_length, const Dpt& datatype, KNXValue& value);
|
||||||
int busValueToDateTime(const uint8_t *payload, int payload_length, const Dpt& datatype, KNXValue& value);
|
int busValueToDateTime(const uint8_t* payload, int payload_length, const Dpt& datatype, KNXValue& value);
|
||||||
int busValueToUnicode(const uint8_t *payload, int payload_length, const Dpt& datatype, KNXValue& value);
|
int busValueToUnicode(const uint8_t* payload, int payload_length, const Dpt& datatype, KNXValue& value);
|
||||||
int busValueToSigned64(const uint8_t *payload, int payload_length, const Dpt& datatype, KNXValue& value);
|
int busValueToSigned64(const uint8_t* payload, int payload_length, const Dpt& datatype, KNXValue& value);
|
||||||
int busValueToAlarmInfo(const uint8_t *payload, int payload_length, const Dpt& datatype, KNXValue& value);
|
int busValueToAlarmInfo(const uint8_t* payload, int payload_length, const Dpt& datatype, KNXValue& value);
|
||||||
int busValueToSerialNumber(const uint8_t *payload, int payload_length, const Dpt& datatype, KNXValue& value);
|
int busValueToSerialNumber(const uint8_t* payload, int payload_length, const Dpt& datatype, KNXValue& value);
|
||||||
int busValueToVersion(const uint8_t *payload, int payload_length, const Dpt& datatype, KNXValue& value);
|
int busValueToVersion(const uint8_t* payload, int payload_length, const Dpt& datatype, KNXValue& value);
|
||||||
int busValueToScaling(const uint8_t *payload, int payload_length, const Dpt& datatype, KNXValue& value);
|
int busValueToScaling(const uint8_t* payload, int payload_length, const Dpt& datatype, KNXValue& value);
|
||||||
int busValueToTariff(const uint8_t *payload, int payload_length, const Dpt& datatype, KNXValue& value);
|
int busValueToTariff(const uint8_t* payload, int payload_length, const Dpt& datatype, KNXValue& value);
|
||||||
int busValueToLocale(const uint8_t *payload, int payload_length, const Dpt& datatype, KNXValue& value);
|
int busValueToLocale(const uint8_t* payload, int payload_length, const Dpt& datatype, KNXValue& value);
|
||||||
int busValueToRGB(const uint8_t *payload, int payload_length, const Dpt& datatype, KNXValue& value);
|
int busValueToRGB(const uint8_t* payload, int payload_length, const Dpt& datatype, KNXValue& value);
|
||||||
int busValueToFlaggedScaling(const uint8_t *payload, int payload_length, const Dpt& datatype, KNXValue& value);
|
int busValueToFlaggedScaling(const uint8_t* payload, int payload_length, const Dpt& datatype, KNXValue& value);
|
||||||
int busValueToActiveEnergy(const uint8_t *payload, int payload_length, const Dpt& datatype, KNXValue& value);
|
int busValueToActiveEnergy(const uint8_t* payload, int payload_length, const Dpt& datatype, KNXValue& value);
|
||||||
|
|
||||||
//Internal to KNX
|
//Internal to KNX
|
||||||
int valueToBusValueBinary(const KNXValue& value, uint8_t *payload, int payload_length, const Dpt& datatype);
|
int valueToBusValueBinary(const KNXValue& value, uint8_t* payload, int payload_length, const Dpt& datatype);
|
||||||
int valueToBusValueBinaryControl(const KNXValue& value, uint8_t *payload, int payload_length, const Dpt& datatype);
|
int valueToBusValueBinaryControl(const KNXValue& value, uint8_t* payload, int payload_length, const Dpt& datatype);
|
||||||
int valueToBusValueStepControl(const KNXValue& value, uint8_t *payload, int payload_length, const Dpt& datatype);
|
int valueToBusValueStepControl(const KNXValue& value, uint8_t* payload, int payload_length, const Dpt& datatype);
|
||||||
int valueToBusValueCharacter(const KNXValue& value, uint8_t *payload, int payload_length, const Dpt& datatype);
|
int valueToBusValueCharacter(const KNXValue& value, uint8_t* payload, int payload_length, const Dpt& datatype);
|
||||||
int valueToBusValueUnsigned8(const KNXValue& value, uint8_t *payload, int payload_length, const Dpt& datatype);
|
int valueToBusValueUnsigned8(const KNXValue& value, uint8_t* payload, int payload_length, const Dpt& datatype);
|
||||||
int valueToBusValueSigned8(const KNXValue& value, uint8_t *payload, int payload_length, const Dpt& datatype);
|
int valueToBusValueSigned8(const KNXValue& value, uint8_t* payload, int payload_length, const Dpt& datatype);
|
||||||
int valueToBusValueStatusAndMode(const KNXValue& value, uint8_t *payload, int payload_length, const Dpt& datatype);
|
int valueToBusValueStatusAndMode(const KNXValue& value, uint8_t* payload, int payload_length, const Dpt& datatype);
|
||||||
int valueToBusValueUnsigned16(const KNXValue& value, uint8_t *payload, int payload_length, const Dpt& datatype);
|
int valueToBusValueUnsigned16(const KNXValue& value, uint8_t* payload, int payload_length, const Dpt& datatype);
|
||||||
int valueToBusValueTimePeriod(const KNXValue& value, uint8_t *payload, int payload_length, const Dpt& datatype);
|
int valueToBusValueTimePeriod(const KNXValue& value, uint8_t* payload, int payload_length, const Dpt& datatype);
|
||||||
int valueToBusValueSigned16(const KNXValue& value, uint8_t *payload, int payload_length, const Dpt& datatype);
|
int valueToBusValueSigned16(const KNXValue& value, uint8_t* payload, int payload_length, const Dpt& datatype);
|
||||||
int valueToBusValueTimeDelta(const KNXValue& value, uint8_t *payload, int payload_length, const Dpt& datatype);
|
int valueToBusValueTimeDelta(const KNXValue& value, uint8_t* payload, int payload_length, const Dpt& datatype);
|
||||||
int valueToBusValueFloat16(const KNXValue& value, uint8_t *payload, int payload_length, const Dpt& datatype);
|
int valueToBusValueFloat16(const KNXValue& value, uint8_t* payload, int payload_length, const Dpt& datatype);
|
||||||
int valueToBusValueTime(const KNXValue& value, uint8_t *payload, int payload_length, const Dpt& datatype);
|
int valueToBusValueTime(const KNXValue& value, uint8_t* payload, int payload_length, const Dpt& datatype);
|
||||||
int valueToBusValueDate(const KNXValue& value, uint8_t *payload, int payload_length, const Dpt& datatype);
|
int valueToBusValueDate(const KNXValue& value, uint8_t* payload, int payload_length, const Dpt& datatype);
|
||||||
int valueToBusValueUnsigned32(const KNXValue& value, uint8_t *payload, int payload_length, const Dpt& datatype);
|
int valueToBusValueUnsigned32(const KNXValue& value, uint8_t* payload, int payload_length, const Dpt& datatype);
|
||||||
int valueToBusValueSigned32(const KNXValue& value, uint8_t *payload, int payload_length, const Dpt& datatype);
|
int valueToBusValueSigned32(const KNXValue& value, uint8_t* payload, int payload_length, const Dpt& datatype);
|
||||||
int valueToBusValueLongTimePeriod(const KNXValue& value, uint8_t *payload, int payload_length, const Dpt& datatype);
|
int valueToBusValueLongTimePeriod(const KNXValue& value, uint8_t* payload, int payload_length, const Dpt& datatype);
|
||||||
int valueToBusValueFloat32(const KNXValue& value, uint8_t *payload, int payload_length, const Dpt& datatype);
|
int valueToBusValueFloat32(const KNXValue& value, uint8_t* payload, int payload_length, const Dpt& datatype);
|
||||||
int valueToBusValueAccess(const KNXValue& value, uint8_t *payload, int payload_length, const Dpt& datatype);
|
int valueToBusValueAccess(const KNXValue& value, uint8_t* payload, int payload_length, const Dpt& datatype);
|
||||||
int valueToBusValueString(const KNXValue& value, uint8_t *payload, int payload_length, const Dpt& datatype);
|
int valueToBusValueString(const KNXValue& value, uint8_t* payload, int payload_length, const Dpt& datatype);
|
||||||
int valueToBusValueScene(const KNXValue& value, uint8_t *payload, int payload_length, const Dpt& datatype);
|
int valueToBusValueScene(const KNXValue& value, uint8_t* payload, int payload_length, const Dpt& datatype);
|
||||||
int valueToBusValueSceneControl(const KNXValue& value, uint8_t *payload, int payload_length, const Dpt& datatype);
|
int valueToBusValueSceneControl(const KNXValue& value, uint8_t* payload, int payload_length, const Dpt& datatype);
|
||||||
int valueToBusValueSceneInfo(const KNXValue& value, uint8_t *payload, int payload_length, const Dpt& datatype);
|
int valueToBusValueSceneInfo(const KNXValue& value, uint8_t* payload, int payload_length, const Dpt& datatype);
|
||||||
int valueToBusValueSceneConfig(const KNXValue& value, uint8_t *payload, int payload_length, const Dpt& datatype);
|
int valueToBusValueSceneConfig(const KNXValue& value, uint8_t* payload, int payload_length, const Dpt& datatype);
|
||||||
int valueToBusValueDateTime(const KNXValue& value, uint8_t *payload, int payload_length, const Dpt& datatype);
|
int valueToBusValueDateTime(const KNXValue& value, uint8_t* payload, int payload_length, const Dpt& datatype);
|
||||||
int valueToBusValueUnicode(const KNXValue& value, uint8_t *payload, int payload_length, const Dpt& datatype);
|
int valueToBusValueUnicode(const KNXValue& value, uint8_t* payload, int payload_length, const Dpt& datatype);
|
||||||
int valueToBusValueSigned64(const KNXValue& value, uint8_t *payload, int payload_length, const Dpt& datatype);
|
int valueToBusValueSigned64(const KNXValue& value, uint8_t* payload, int payload_length, const Dpt& datatype);
|
||||||
int valueToBusValueAlarmInfo(const KNXValue& value, uint8_t *payload, int payload_length, const Dpt& datatype);
|
int valueToBusValueAlarmInfo(const KNXValue& value, uint8_t* payload, int payload_length, const Dpt& datatype);
|
||||||
int valueToBusValueSerialNumber(const KNXValue& value, uint8_t *payload, int payload_length, const Dpt& datatype);
|
int valueToBusValueSerialNumber(const KNXValue& value, uint8_t* payload, int payload_length, const Dpt& datatype);
|
||||||
int valueToBusValueVersion(const KNXValue& value, uint8_t *payload, int payload_length, const Dpt& datatype);
|
int valueToBusValueVersion(const KNXValue& value, uint8_t* payload, int payload_length, const Dpt& datatype);
|
||||||
int valueToBusValueScaling(const KNXValue& value, uint8_t *payload, int payload_length, const Dpt& datatype);
|
int valueToBusValueScaling(const KNXValue& value, uint8_t* payload, int payload_length, const Dpt& datatype);
|
||||||
int valueToBusValueTariff(const KNXValue& value, uint8_t *payload, int payload_length, const Dpt& datatype);
|
int valueToBusValueTariff(const KNXValue& value, uint8_t* payload, int payload_length, const Dpt& datatype);
|
||||||
int valueToBusValueLocale(const KNXValue& value, uint8_t *payload, int payload_length, const Dpt& datatype);
|
int valueToBusValueLocale(const KNXValue& value, uint8_t* payload, int payload_length, const Dpt& datatype);
|
||||||
int valueToBusValueRGB(const KNXValue& value, uint8_t *payload, int payload_length, const Dpt& datatype);
|
int valueToBusValueRGB(const KNXValue& value, uint8_t* payload, int payload_length, const Dpt& datatype);
|
||||||
int valueToBusValueFlaggedScaling(const KNXValue& value, uint8_t *payload, int payload_length, const Dpt& datatype);
|
int valueToBusValueFlaggedScaling(const KNXValue& value, uint8_t* payload, int payload_length, const Dpt& datatype);
|
||||||
int valueToBusValueActiveEnergy(const KNXValue& value, uint8_t *payload, int payload_length, const Dpt& datatype);
|
int valueToBusValueActiveEnergy(const KNXValue& value, uint8_t* payload, int payload_length, const Dpt& datatype);
|
||||||
|
|
||||||
//Payload manipulation
|
//Payload manipulation
|
||||||
bool bitFromPayload(const uint8_t *payload, int index);
|
bool bitFromPayload(const uint8_t* payload, int index);
|
||||||
uint8_t unsigned8FromPayload(const uint8_t *payload, int index);
|
uint8_t unsigned8FromPayload(const uint8_t* payload, int index);
|
||||||
int8_t signed8FromPayload(const uint8_t *payload, int index);
|
int8_t signed8FromPayload(const uint8_t* payload, int index);
|
||||||
uint16_t unsigned16FromPayload(const uint8_t *payload, int index);
|
uint16_t unsigned16FromPayload(const uint8_t* payload, int index);
|
||||||
int16_t signed16FromPayload(const uint8_t *payload, int index);
|
int16_t signed16FromPayload(const uint8_t* payload, int index);
|
||||||
uint32_t unsigned32FromPayload(const uint8_t *payload, int index);
|
uint32_t unsigned32FromPayload(const uint8_t* payload, int index);
|
||||||
int32_t signed32FromPayload(const uint8_t *payload, int index);
|
int32_t signed32FromPayload(const uint8_t* payload, int index);
|
||||||
double float16FromPayload(const uint8_t *payload, int index);
|
double float16FromPayload(const uint8_t* payload, int index);
|
||||||
float float32FromPayload(const uint8_t *payload, int index);
|
float float32FromPayload(const uint8_t* payload, int index);
|
||||||
int64_t signed64FromPayload(const uint8_t *payload, int index);
|
int64_t signed64FromPayload(const uint8_t* payload, int index);
|
||||||
uint8_t bcdFromPayload(const uint8_t *payload, int index);
|
uint8_t bcdFromPayload(const uint8_t* payload, int index);
|
||||||
|
|
||||||
void bitToPayload(uint8_t *payload, int payload_length, int index, bool value);
|
void bitToPayload(uint8_t* payload, int payload_length, int index, bool value);
|
||||||
void unsigned8ToPayload(uint8_t *payload, int payload_length, int index, uint8_t value, uint8_t mask); //mask 0xFF
|
void unsigned8ToPayload(uint8_t* payload, int payload_length, int index, uint8_t value, uint8_t mask); //mask 0xFF
|
||||||
void signed8ToPayload(uint8_t *payload, int payload_length, int index, int8_t value, uint8_t mask); //mask 0xFF
|
void signed8ToPayload(uint8_t* payload, int payload_length, int index, int8_t value, uint8_t mask); //mask 0xFF
|
||||||
void unsigned16ToPayload(uint8_t *payload, int payload_length, int index, uint16_t value, uint16_t mask); //mask 0xFFFF
|
void unsigned16ToPayload(uint8_t* payload, int payload_length, int index, uint16_t value, uint16_t mask); //mask 0xFFFF
|
||||||
void signed16ToPayload(uint8_t *payload, int payload_length, int index, int16_t value, uint16_t mask); //mask 0xFFFF
|
void signed16ToPayload(uint8_t* payload, int payload_length, int index, int16_t value, uint16_t mask); //mask 0xFFFF
|
||||||
void unsigned32ToPayload(uint8_t *payload, int payload_length, int index, uint32_t value, uint32_t mask); //mask = 0xFFFFFFFF
|
void unsigned32ToPayload(uint8_t* payload, int payload_length, int index, uint32_t value, uint32_t mask); //mask = 0xFFFFFFFF
|
||||||
void signed32ToPayload(uint8_t *payload, int payload_length, int index, int32_t value, uint32_t mask); //mask = 0xFFFFFFFF
|
void signed32ToPayload(uint8_t* payload, int payload_length, int index, int32_t value, uint32_t mask); //mask = 0xFFFFFFFF
|
||||||
void float16ToPayload(uint8_t *payload, int payload_length, int index, double value, uint16_t mask); //mask = 0xFFFF
|
void float16ToPayload(uint8_t* payload, int payload_length, int index, double value, uint16_t mask); //mask = 0xFFFF
|
||||||
void float32ToPayload(uint8_t *payload, int payload_length, int index, double value, uint32_t mask); //mask = 0xFFFFFFFF
|
void float32ToPayload(uint8_t* payload, int payload_length, int index, double value, uint32_t mask); //mask = 0xFFFFFFFF
|
||||||
void signed64ToPayload(uint8_t *payload, int payload_length, int index, int64_t value, uint64_t mask); //mask = UINT64_C(0xFFFFFFFFFFFFFFFF)
|
void signed64ToPayload(uint8_t* payload, int payload_length, int index, int64_t value, uint64_t mask); //mask = UINT64_C(0xFFFFFFFFFFFFFFFF)
|
||||||
void bcdToPayload(uint8_t *payload, int payload_length, int index, uint8_t value);
|
void bcdToPayload(uint8_t* payload, int payload_length, int index, uint8_t value);
|
@ -9,7 +9,7 @@ class GroupObjectTableObject;
|
|||||||
|
|
||||||
enum ComFlag
|
enum ComFlag
|
||||||
{
|
{
|
||||||
Updated = 0, //!< Group object was updated
|
Updated = 0, //!< Group object was updated
|
||||||
ReadRequest = 1, //!< Read was requested but was not processed
|
ReadRequest = 1, //!< Read was requested but was not processed
|
||||||
WriteRequest = 2, //!< Write was requested but was not processed
|
WriteRequest = 2, //!< Write was requested but was not processed
|
||||||
Transmitting = 3, //!< Group Object is processed a the moment (read or write)
|
Transmitting = 3, //!< Group Object is processed a the moment (read or write)
|
||||||
@ -19,12 +19,11 @@ enum ComFlag
|
|||||||
|
|
||||||
class GroupObject;
|
class GroupObject;
|
||||||
|
|
||||||
|
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
#include <functional>
|
#include <functional>
|
||||||
typedef std::function<void(GroupObject&)> GroupObjectUpdatedHandler;
|
typedef std::function<void(GroupObject&)> GroupObjectUpdatedHandler;
|
||||||
#else
|
#else
|
||||||
typedef void(*GroupObjectUpdatedHandler)(GroupObject& go);
|
typedef void (*GroupObjectUpdatedHandler)(GroupObject& go);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -33,7 +32,8 @@ typedef void(*GroupObjectUpdatedHandler)(GroupObject& go);
|
|||||||
class GroupObject
|
class GroupObject
|
||||||
{
|
{
|
||||||
friend class GroupObjectTableObject;
|
friend class GroupObjectTableObject;
|
||||||
public:
|
|
||||||
|
public:
|
||||||
/**
|
/**
|
||||||
* The constructor.
|
* The constructor.
|
||||||
*/
|
*/
|
||||||
@ -41,7 +41,7 @@ public:
|
|||||||
/**
|
/**
|
||||||
* The copy constructor.
|
* The copy constructor.
|
||||||
*/
|
*/
|
||||||
GroupObject(const GroupObject& other);
|
GroupObject(const GroupObject& other);
|
||||||
/**
|
/**
|
||||||
* The destructor.
|
* The destructor.
|
||||||
*/
|
*/
|
||||||
@ -71,12 +71,12 @@ public:
|
|||||||
* Check if the communication flag (C) was set. (K-flag in german)
|
* Check if the communication flag (C) was set. (K-flag in german)
|
||||||
*/
|
*/
|
||||||
bool communicationEnable();
|
bool communicationEnable();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the priority of the group object.
|
* Get the priority of the group object.
|
||||||
*/
|
*/
|
||||||
Priority priority();
|
Priority priority();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the current state of the group object. See ::ComFlag
|
* Return the current state of the group object. See ::ComFlag
|
||||||
*/
|
*/
|
||||||
@ -206,10 +206,10 @@ public:
|
|||||||
size_t asapValueSize(uint8_t code);
|
size_t asapValueSize(uint8_t code);
|
||||||
GroupObjectUpdatedHandler _updateHandler;
|
GroupObjectUpdatedHandler _updateHandler;
|
||||||
size_t goSize();
|
size_t goSize();
|
||||||
uint16_t _asap;
|
uint16_t _asap = 0;
|
||||||
ComFlag _commFlag;
|
ComFlag _commFlag = Ok;
|
||||||
uint8_t* _data;
|
uint8_t* _data = 0;
|
||||||
uint8_t _dataLength;
|
uint8_t _dataLength = 0;
|
||||||
GroupObjectTableObject* _table;
|
GroupObjectTableObject* _table = 0;
|
||||||
Dpt _datapointType;
|
Dpt _datapointType;
|
||||||
};
|
};
|
||||||
|
@ -3,11 +3,11 @@
|
|||||||
#include "table_object.h"
|
#include "table_object.h"
|
||||||
#include "group_object.h"
|
#include "group_object.h"
|
||||||
|
|
||||||
class GroupObjectTableObject: public TableObject
|
class GroupObjectTableObject : public TableObject
|
||||||
{
|
{
|
||||||
friend class GroupObject;
|
friend class GroupObject;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
GroupObjectTableObject(Platform& platform);
|
GroupObjectTableObject(Platform& platform);
|
||||||
virtual ~GroupObjectTableObject();
|
virtual ~GroupObjectTableObject();
|
||||||
void readProperty(PropertyID id, uint32_t start, uint32_t& count, uint8_t* data);
|
void readProperty(PropertyID id, uint32_t start, uint32_t& count, uint8_t* data);
|
||||||
@ -18,11 +18,13 @@ public:
|
|||||||
|
|
||||||
virtual uint8_t* save(uint8_t* buffer);
|
virtual uint8_t* save(uint8_t* buffer);
|
||||||
virtual uint8_t* restore(uint8_t* buffer);
|
virtual uint8_t* restore(uint8_t* buffer);
|
||||||
protected:
|
|
||||||
|
protected:
|
||||||
virtual void beforeStateChange(LoadState& newState);
|
virtual void beforeStateChange(LoadState& newState);
|
||||||
uint8_t propertyCount();
|
uint8_t propertyCount();
|
||||||
PropertyDescription* propertyDescriptions();
|
PropertyDescription* propertyDescriptions();
|
||||||
private:
|
|
||||||
|
private:
|
||||||
void freeGroupObjects();
|
void freeGroupObjects();
|
||||||
bool initGroupObjects();
|
bool initGroupObjects();
|
||||||
uint16_t* _tableData = 0;
|
uint16_t* _tableData = 0;
|
||||||
|
@ -53,9 +53,9 @@ enum ObjectType
|
|||||||
/**
|
/**
|
||||||
* This class represents and interface object. See section 4 of @cite knx:3/4/1.
|
* This class represents and interface object. See section 4 of @cite knx:3/4/1.
|
||||||
*/
|
*/
|
||||||
class InterfaceObject: public SaveRestore
|
class InterfaceObject : public SaveRestore
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
* Destructor
|
* Destructor
|
||||||
*/
|
*/
|
||||||
@ -112,9 +112,10 @@ public:
|
|||||||
*
|
*
|
||||||
* @param[out] access the ::AccessLevel necessary to read/write the property.
|
* @param[out] access the ::AccessLevel necessary to read/write the property.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void readPropertyDescription(uint8_t& propertyId, uint8_t& propertyIndex, bool& writeEnable, uint8_t& type, uint16_t& numberOfElements, uint8_t& access);
|
void readPropertyDescription(uint8_t& propertyId, uint8_t& propertyIndex, bool& writeEnable, uint8_t& type, uint16_t& numberOfElements, uint8_t& access);
|
||||||
protected:
|
|
||||||
|
protected:
|
||||||
/**
|
/**
|
||||||
* Returns the number of properties the interface object has.
|
* Returns the number of properties the interface object has.
|
||||||
*/
|
*/
|
||||||
|
@ -4,17 +4,19 @@
|
|||||||
#include "data_link_layer.h"
|
#include "data_link_layer.h"
|
||||||
#include "ip_parameter_object.h"
|
#include "ip_parameter_object.h"
|
||||||
|
|
||||||
class IpDataLinkLayer: public DataLinkLayer
|
class IpDataLinkLayer : public DataLinkLayer
|
||||||
{
|
{
|
||||||
using DataLinkLayer::_deviceObject;
|
using DataLinkLayer::_deviceObject;
|
||||||
public:
|
|
||||||
IpDataLinkLayer(DeviceObject& devObj, AddressTableObject& addrTab, IpParameterObject& ipParam, NetworkLayer& layer,
|
public:
|
||||||
Platform& platform);
|
IpDataLinkLayer(DeviceObject& devObj, AddressTableObject& addrTab, IpParameterObject& ipParam, NetworkLayer& layer,
|
||||||
|
Platform& platform);
|
||||||
|
|
||||||
void loop();
|
void loop();
|
||||||
void enabled(bool value);
|
void enabled(bool value);
|
||||||
bool enabled() const;
|
bool enabled() const;
|
||||||
private:
|
|
||||||
|
private:
|
||||||
bool _enabled = false;
|
bool _enabled = false;
|
||||||
bool sendFrame(CemiFrame& frame);
|
bool sendFrame(CemiFrame& frame);
|
||||||
bool sendBytes(uint8_t* buffer, uint16_t length);
|
bool sendBytes(uint8_t* buffer, uint16_t length);
|
||||||
|
@ -4,9 +4,9 @@
|
|||||||
#include "device_object.h"
|
#include "device_object.h"
|
||||||
#include "platform.h"
|
#include "platform.h"
|
||||||
|
|
||||||
class IpParameterObject: public InterfaceObject
|
class IpParameterObject : public InterfaceObject
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
IpParameterObject(DeviceObject& deviceObject, Platform& platform);
|
IpParameterObject(DeviceObject& deviceObject, Platform& platform);
|
||||||
void readProperty(PropertyID id, uint32_t start, uint32_t& count, uint8_t* data);
|
void readProperty(PropertyID id, uint32_t start, uint32_t& count, uint8_t* data);
|
||||||
void writeProperty(PropertyID id, uint8_t start, uint8_t* data, uint8_t count);
|
void writeProperty(PropertyID id, uint8_t start, uint8_t* data, uint8_t count);
|
||||||
@ -17,10 +17,12 @@ public:
|
|||||||
|
|
||||||
uint32_t multicastAddress() const;
|
uint32_t multicastAddress() const;
|
||||||
uint8_t ttl() const { return _ttl; }
|
uint8_t ttl() const { return _ttl; }
|
||||||
protected:
|
|
||||||
|
protected:
|
||||||
uint8_t propertyCount();
|
uint8_t propertyCount();
|
||||||
PropertyDescription* propertyDescriptions();
|
PropertyDescription* propertyDescriptions();
|
||||||
private:
|
|
||||||
|
private:
|
||||||
uint16_t _projectInstallationId = 0;
|
uint16_t _projectInstallationId = 0;
|
||||||
uint8_t _ipAssignmentMethod = 0;
|
uint8_t _ipAssignmentMethod = 0;
|
||||||
uint8_t _ipCapabilities = 0;
|
uint8_t _ipCapabilities = 0;
|
||||||
@ -29,7 +31,7 @@ private:
|
|||||||
uint32_t _defaultGateway = 0;
|
uint32_t _defaultGateway = 0;
|
||||||
uint32_t _multicastAddress = 0;
|
uint32_t _multicastAddress = 0;
|
||||||
uint8_t _ttl = 60;
|
uint8_t _ttl = 60;
|
||||||
char _friendlyName[30] = { 0 };
|
char _friendlyName[30] = {0};
|
||||||
DeviceObject& _deviceObject;
|
DeviceObject& _deviceObject;
|
||||||
Platform& _platform;
|
Platform& _platform;
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ public:
|
|||||||
private:
|
private:
|
||||||
Platform& _platform;
|
Platform& _platform;
|
||||||
bool _modified = false;
|
bool _modified = false;
|
||||||
SaveRestore* _saveRestores[MAXSAVE];
|
SaveRestore* _saveRestores[MAXSAVE] = {0};
|
||||||
int _saveCount = 0;
|
int _saveCount = 0;
|
||||||
uint8_t* _data = 0;
|
uint8_t* _data = 0;
|
||||||
};
|
};
|
||||||
|
@ -8,20 +8,20 @@ class DataLinkLayer;
|
|||||||
|
|
||||||
class NetworkLayer
|
class NetworkLayer
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NetworkLayer(TransportLayer& layer);
|
NetworkLayer(TransportLayer& layer);
|
||||||
|
|
||||||
void dataLinkLayer(DataLinkLayer& layer);
|
void dataLinkLayer(DataLinkLayer& layer);
|
||||||
uint8_t hopCount() const;
|
uint8_t hopCount() const;
|
||||||
void hopCount(uint8_t value);
|
void hopCount(uint8_t value);
|
||||||
|
|
||||||
// from data link layer
|
// from data link layer
|
||||||
void dataIndication(AckType ack, AddressType addType, uint16_t destination, FrameFormat format, NPDU& npdu,
|
void dataIndication(AckType ack, AddressType addType, uint16_t destination, FrameFormat format, NPDU& npdu,
|
||||||
Priority priority, uint16_t source);
|
Priority priority, uint16_t source);
|
||||||
void dataConfirm(AckType ack, AddressType addressType, uint16_t destination, FrameFormat format, Priority priority,
|
void dataConfirm(AckType ack, AddressType addressType, uint16_t destination, FrameFormat format, Priority priority,
|
||||||
uint16_t source, NPDU& npdu, bool status);
|
uint16_t source, NPDU& npdu, bool status);
|
||||||
void systemBroadcastIndication(AckType ack, FrameFormat format, NPDU& npdu,
|
void systemBroadcastIndication(AckType ack, FrameFormat format, NPDU& npdu,
|
||||||
Priority priority, uint16_t source);
|
Priority priority, uint16_t source);
|
||||||
void systemBroadcastConfirm(AckType ack, FrameFormat format, Priority priority, uint16_t source, NPDU& npdu, bool status);
|
void systemBroadcastConfirm(AckType ack, FrameFormat format, Priority priority, uint16_t source, NPDU& npdu, bool status);
|
||||||
|
|
||||||
// from transport layer
|
// from transport layer
|
||||||
@ -30,9 +30,9 @@ public:
|
|||||||
void dataBroadcastRequest(AckType ack, HopCountType hopType, Priority priority, TPDU& tpdu);
|
void dataBroadcastRequest(AckType ack, HopCountType hopType, Priority priority, TPDU& tpdu);
|
||||||
void dataSystemBroadcastRequest(AckType ack, HopCountType hopType, Priority priority, TPDU& tpdu);
|
void dataSystemBroadcastRequest(AckType ack, HopCountType hopType, Priority priority, TPDU& tpdu);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void sendDataRequest(TPDU &tpdu, HopCountType hopType, AckType ack, uint16_t destination, Priority priority, AddressType addrType);
|
void sendDataRequest(TPDU& tpdu, HopCountType hopType, AckType ack, uint16_t destination, Priority priority, AddressType addrType);
|
||||||
uint8_t _hopCount = 6;
|
uint8_t _hopCount = 6;
|
||||||
DataLinkLayer* _dataLinkLayer;
|
DataLinkLayer* _dataLinkLayer = 0;
|
||||||
TransportLayer& _transportLayer;
|
TransportLayer& _transportLayer;
|
||||||
};
|
};
|
||||||
|
@ -22,6 +22,6 @@ class NPDU
|
|||||||
NPDU(uint8_t* data, CemiFrame& frame);
|
NPDU(uint8_t* data, CemiFrame& frame);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
uint8_t* _data;
|
uint8_t* _data = 0;
|
||||||
CemiFrame& _frame;
|
CemiFrame& _frame;
|
||||||
};
|
};
|
@ -31,9 +31,10 @@ void Platform::freeMemory(uint8_t* ptr)
|
|||||||
|
|
||||||
Platform::Platform()
|
Platform::Platform()
|
||||||
{
|
{
|
||||||
// allocate memory to have a memory reference, substract a bit
|
// allocate memory to have a memory reference, substract a bit
|
||||||
_memoryReference = (uint8_t*)malloc(1) - 1024;
|
_memoryReference = (uint8_t*)malloc(1);
|
||||||
free(_memoryReference);
|
free(_memoryReference);
|
||||||
print("MemRef: ");
|
_memoryReference -= 1024;
|
||||||
|
print("MemRef: ");
|
||||||
println((long unsigned int)_memoryReference, HEX);
|
println((long unsigned int)_memoryReference, HEX);
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
*/
|
*/
|
||||||
class SaveRestore
|
class SaveRestore
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
* This method is called when the object should save its state to the buffer.
|
* This method is called when the object should save its state to the buffer.
|
||||||
*
|
*
|
||||||
|
@ -31,6 +31,6 @@ class TPDU
|
|||||||
TPDU(uint8_t* data, CemiFrame& frame);
|
TPDU(uint8_t* data, CemiFrame& frame);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
uint8_t* _data;
|
uint8_t* _data = 0;
|
||||||
CemiFrame& _frame;
|
CemiFrame& _frame;
|
||||||
};
|
};
|
||||||
|
@ -51,37 +51,40 @@
|
|||||||
#define SUCCESS 0x80
|
#define SUCCESS 0x80
|
||||||
|
|
||||||
// control services, device specific
|
// control services, device specific
|
||||||
#define U_RESET_IND 0x03
|
#define U_RESET_IND 0x03
|
||||||
#define U_STATE_IND 0x07
|
#define U_STATE_IND 0x07
|
||||||
#define SLAVE_COLLISION 0x80
|
#define SLAVE_COLLISION 0x80
|
||||||
#define RECEIVE_ERROR 0x40
|
#define RECEIVE_ERROR 0x40
|
||||||
#define TRANSMIT_ERROR 0x20
|
#define TRANSMIT_ERROR 0x20
|
||||||
#define PROTOCOL_ERROR 0x10
|
#define PROTOCOL_ERROR 0x10
|
||||||
#define TEMPERATURE_WARNING 0x08
|
#define TEMPERATURE_WARNING 0x08
|
||||||
#define U_FRAME_STATE_IND 0x13
|
#define U_FRAME_STATE_IND 0x13
|
||||||
#define U_FRAME_STATE_MASK 0x17
|
#define U_FRAME_STATE_MASK 0x17
|
||||||
#define PARITY_BIT_ERROR 0x80
|
#define PARITY_BIT_ERROR 0x80
|
||||||
#define CHECKSUM_LENGTH_ERROR 0x40
|
#define CHECKSUM_LENGTH_ERROR 0x40
|
||||||
#define TIMING_ERROR 0x20
|
#define TIMING_ERROR 0x20
|
||||||
#define U_CONFIGURE_IND 0x01
|
#define U_CONFIGURE_IND 0x01
|
||||||
#define U_CONFIGURE_MASK 0x83
|
#define U_CONFIGURE_MASK 0x83
|
||||||
#define AUTO_ACKNOWLEDGE 0x20
|
#define AUTO_ACKNOWLEDGE 0x20
|
||||||
#define AUTO_POLLING 0x10
|
#define AUTO_POLLING 0x10
|
||||||
#define CRC_CCITT 0x80
|
#define CRC_CCITT 0x80
|
||||||
#define FRAME_END_WITH_MARKER 0x40
|
#define FRAME_END_WITH_MARKER 0x40
|
||||||
#define U_FRAME_END_IND 0xCB
|
#define U_FRAME_END_IND 0xCB
|
||||||
#define U_STOP_MODE_IND 0x2B
|
#define U_STOP_MODE_IND 0x2B
|
||||||
#define U_SYSTEM_STAT_IND 0x4B
|
#define U_SYSTEM_STAT_IND 0x4B
|
||||||
|
|
||||||
//loop states
|
//loop states
|
||||||
#define IDLE 0
|
#define IDLE 0
|
||||||
#define RX_FIRST_BYTE 1
|
#define RX_FIRST_BYTE 1
|
||||||
#define RX_L_DATA 2
|
#define RX_L_DATA 2
|
||||||
#define RX_WAIT_DATA_CON 3
|
#define RX_WAIT_DATA_CON 3
|
||||||
#define TX_FRAME 4
|
#define TX_FRAME 4
|
||||||
|
|
||||||
|
#define BYTE_TIMEOUT 3 //milli seconds
|
||||||
|
#define CONFIRM_TIMEOUT 500 //milli seconds
|
||||||
|
|
||||||
void TpUartDataLinkLayer::loop(){
|
void TpUartDataLinkLayer::loop()
|
||||||
|
{
|
||||||
|
|
||||||
_receiveBuffer[0] = 0x29;
|
_receiveBuffer[0] = 0x29;
|
||||||
_receiveBuffer[1] = 0;
|
_receiveBuffer[1] = 0;
|
||||||
@ -91,224 +94,272 @@ void TpUartDataLinkLayer::loop(){
|
|||||||
if (!_enabled)
|
if (!_enabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
switch(_loopState){
|
switch (_loopState)
|
||||||
case IDLE:
|
{
|
||||||
if(_platform.uartAvailable()){
|
case IDLE:
|
||||||
_loopState = RX_FIRST_BYTE;
|
if (_platform.uartAvailable())
|
||||||
}
|
{
|
||||||
else{
|
_loopState = RX_FIRST_BYTE;
|
||||||
if(!_waitConfirm && !isTxQueueEmpty()){
|
}
|
||||||
loadNextTxFrame();
|
else
|
||||||
_waitConfirm = true;
|
{
|
||||||
_waitConfirmStartTime = _platform.millis();
|
if (!_waitConfirm && !isTxQueueEmpty())
|
||||||
_loopState = TX_FRAME;
|
{
|
||||||
|
loadNextTxFrame();
|
||||||
|
_waitConfirm = true;
|
||||||
|
_waitConfirmStartTime = _platform.millis();
|
||||||
|
_loopState = TX_FRAME;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
break;
|
|
||||||
case TX_FRAME:
|
|
||||||
if(sendSingleFrameByte() == false){
|
|
||||||
_loopState = IDLE;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case RX_FIRST_BYTE:
|
|
||||||
rxByte =_platform.readUart();
|
|
||||||
_lastByteRxTime = _platform.millis();
|
|
||||||
_RxByteCnt = 0;
|
|
||||||
_xorSum = 0;
|
|
||||||
if ((rxByte & L_DATA_MASK) == L_DATA_STANDARD_IND){
|
|
||||||
buffer[_RxByteCnt++]=rxByte;
|
|
||||||
_xorSum ^= rxByte;
|
|
||||||
_RxByteCnt++; //convert to L_DATA_EXTENDED
|
|
||||||
_convert = true;
|
|
||||||
_loopState=RX_L_DATA;
|
|
||||||
break;
|
break;
|
||||||
}
|
case TX_FRAME:
|
||||||
else if ((rxByte & L_DATA_MASK) == L_DATA_EXTENDED_IND){
|
if (sendSingleFrameByte() == false)
|
||||||
buffer[_RxByteCnt++]=rxByte;
|
{
|
||||||
_xorSum ^= rxByte;
|
_loopState = IDLE;
|
||||||
_convert = false;
|
}
|
||||||
_loopState=RX_L_DATA;
|
|
||||||
break;
|
break;
|
||||||
}
|
case RX_FIRST_BYTE:
|
||||||
else if ((rxByte & L_DATA_CON_MASK) == L_DATA_CON){
|
rxByte = _platform.readUart();
|
||||||
println("got unexpected L_DATA_CON");
|
_lastByteRxTime = _platform.millis();
|
||||||
}
|
_RxByteCnt = 0;
|
||||||
else if (rxByte == L_POLL_DATA_IND){
|
_xorSum = 0;
|
||||||
// not sure if this can happen
|
if ((rxByte & L_DATA_MASK) == L_DATA_STANDARD_IND)
|
||||||
println("got L_POLL_DATA_IND");
|
{
|
||||||
}
|
buffer[_RxByteCnt++] = rxByte;
|
||||||
else if ((rxByte & L_ACKN_MASK) == L_ACKN_IND){
|
_xorSum ^= rxByte;
|
||||||
|
_RxByteCnt++; //convert to L_DATA_EXTENDED
|
||||||
// this can only happen in bus monitor mode
|
_convert = true;
|
||||||
println("got L_ACKN_IND");
|
_loopState = RX_L_DATA;
|
||||||
}
|
|
||||||
else if (rxByte == U_RESET_IND){
|
|
||||||
println("got U_RESET_IND");
|
|
||||||
}
|
|
||||||
else if((rxByte & U_STATE_IND) == U_STATE_IND){
|
|
||||||
print("got U_STATE_IND: 0x");
|
|
||||||
print(rxByte, HEX);
|
|
||||||
println();
|
|
||||||
}
|
|
||||||
else if((rxByte & U_FRAME_STATE_MASK) == U_FRAME_STATE_IND){
|
|
||||||
print("got U_FRAME_STATE_IND: 0x");
|
|
||||||
print(rxByte, HEX);
|
|
||||||
println();
|
|
||||||
}
|
|
||||||
else if((rxByte & U_CONFIGURE_MASK) == U_CONFIGURE_IND){
|
|
||||||
print("got U_CONFIGURE_IND: 0x");
|
|
||||||
print(rxByte, HEX);
|
|
||||||
println();
|
|
||||||
}
|
|
||||||
else if(rxByte == U_FRAME_END_IND){
|
|
||||||
println("got U_FRAME_END_IND");
|
|
||||||
}
|
|
||||||
else if(rxByte == U_STOP_MODE_IND){
|
|
||||||
println("got U_STOP_MODE_IND");
|
|
||||||
}
|
|
||||||
else if(rxByte == U_SYSTEM_STAT_IND){
|
|
||||||
print("got U_SYSTEM_STAT_IND: 0x");
|
|
||||||
while (true){
|
|
||||||
int tmp = _platform.readUart();
|
|
||||||
if (tmp < 0)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
print(tmp, HEX);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
println();
|
else if ((rxByte & L_DATA_MASK) == L_DATA_EXTENDED_IND)
|
||||||
}
|
{
|
||||||
else{
|
buffer[_RxByteCnt++] = rxByte;
|
||||||
print("got UNEXPECTED: 0x");
|
_xorSum ^= rxByte;
|
||||||
print(rxByte, HEX);
|
_convert = false;
|
||||||
println();
|
_loopState = RX_L_DATA;
|
||||||
}
|
break;
|
||||||
_loopState = IDLE;
|
}
|
||||||
break;
|
else if ((rxByte & L_DATA_CON_MASK) == L_DATA_CON)
|
||||||
case RX_L_DATA:
|
{
|
||||||
if (_platform.millis() - _lastByteRxTime > BYTE_TIMEOUT){
|
println("got unexpected L_DATA_CON");
|
||||||
_RxByteCnt = 0;
|
}
|
||||||
|
else if (rxByte == L_POLL_DATA_IND)
|
||||||
|
{
|
||||||
|
// not sure if this can happen
|
||||||
|
println("got L_POLL_DATA_IND");
|
||||||
|
}
|
||||||
|
else if ((rxByte & L_ACKN_MASK) == L_ACKN_IND)
|
||||||
|
{
|
||||||
|
// this can only happen in bus monitor mode
|
||||||
|
println("got L_ACKN_IND");
|
||||||
|
}
|
||||||
|
else if (rxByte == U_RESET_IND)
|
||||||
|
{
|
||||||
|
println("got U_RESET_IND");
|
||||||
|
}
|
||||||
|
else if ((rxByte & U_STATE_IND) == U_STATE_IND)
|
||||||
|
{
|
||||||
|
print("got U_STATE_IND: 0x");
|
||||||
|
print(rxByte, HEX);
|
||||||
|
println();
|
||||||
|
}
|
||||||
|
else if ((rxByte & U_FRAME_STATE_MASK) == U_FRAME_STATE_IND)
|
||||||
|
{
|
||||||
|
print("got U_FRAME_STATE_IND: 0x");
|
||||||
|
print(rxByte, HEX);
|
||||||
|
println();
|
||||||
|
}
|
||||||
|
else if ((rxByte & U_CONFIGURE_MASK) == U_CONFIGURE_IND)
|
||||||
|
{
|
||||||
|
print("got U_CONFIGURE_IND: 0x");
|
||||||
|
print(rxByte, HEX);
|
||||||
|
println();
|
||||||
|
}
|
||||||
|
else if (rxByte == U_FRAME_END_IND)
|
||||||
|
{
|
||||||
|
println("got U_FRAME_END_IND");
|
||||||
|
}
|
||||||
|
else if (rxByte == U_STOP_MODE_IND)
|
||||||
|
{
|
||||||
|
println("got U_STOP_MODE_IND");
|
||||||
|
}
|
||||||
|
else if (rxByte == U_SYSTEM_STAT_IND)
|
||||||
|
{
|
||||||
|
print("got U_SYSTEM_STAT_IND: 0x");
|
||||||
|
while (true)
|
||||||
|
{
|
||||||
|
int tmp = _platform.readUart();
|
||||||
|
if (tmp < 0)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
print(tmp, HEX);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
println();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print("got UNEXPECTED: 0x");
|
||||||
|
print(rxByte, HEX);
|
||||||
|
println();
|
||||||
|
}
|
||||||
_loopState = IDLE;
|
_loopState = IDLE;
|
||||||
println("Timeout during RX_L_DATA");
|
|
||||||
break;
|
break;
|
||||||
}
|
case RX_L_DATA:
|
||||||
if(!_platform.uartAvailable()) break;
|
if (_platform.millis() - _lastByteRxTime > BYTE_TIMEOUT)
|
||||||
_lastByteRxTime = _platform.millis();
|
{
|
||||||
rxByte =_platform.readUart();
|
_RxByteCnt = 0;
|
||||||
|
_loopState = IDLE;
|
||||||
if(_RxByteCnt == MAX_KNX_TELEGRAM_SIZE){
|
println("Timeout during RX_L_DATA");
|
||||||
_loopState = IDLE;
|
break;
|
||||||
println("invalid telegram size");
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
buffer[_RxByteCnt++]=rxByte;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(_RxByteCnt==7){ //Destination Address + payload available
|
|
||||||
_xorSum ^= rxByte;
|
|
||||||
//check if echo
|
|
||||||
if (!((buffer[0]^_sendBuffer[0])&~0x20) && !memcmp(buffer+2,_sendBuffer+1,5)){ //ignore repeated bit of control byte
|
|
||||||
_isEcho = true;
|
|
||||||
}
|
}
|
||||||
else{
|
if (!_platform.uartAvailable())
|
||||||
_isEcho = false;
|
break;
|
||||||
|
_lastByteRxTime = _platform.millis();
|
||||||
|
rxByte = _platform.readUart();
|
||||||
|
|
||||||
|
if (_RxByteCnt == MAX_KNX_TELEGRAM_SIZE)
|
||||||
|
{
|
||||||
|
_loopState = IDLE;
|
||||||
|
println("invalid telegram size");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
buffer[_RxByteCnt++] = rxByte;
|
||||||
}
|
}
|
||||||
|
|
||||||
//convert into Extended.ind
|
if (_RxByteCnt == 7)
|
||||||
if(_convert){
|
{
|
||||||
uint8_t payloadLength = buffer[6] & 0x0F;
|
//Destination Address + payload available
|
||||||
buffer[1] = buffer[6] & 0xF0;
|
_xorSum ^= rxByte;
|
||||||
buffer[6] = payloadLength;
|
//check if echo
|
||||||
}
|
if (!((buffer[0] ^ _sendBuffer[0]) & ~0x20) && !memcmp(buffer + 2, _sendBuffer + 1, 5))
|
||||||
|
{ //ignore repeated bit of control byte
|
||||||
if(!_isEcho){
|
_isEcho = true;
|
||||||
uint8_t c = 0x10;
|
|
||||||
//ceck if individual or group address
|
|
||||||
if ((buffer[6] & 0x80) == 0){ //individual
|
|
||||||
if(_deviceObject.induvidualAddress() == getWord(buffer + 4)){
|
|
||||||
c |= 0x01;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else{ //group
|
else
|
||||||
if(_groupAddressTable.contains(getWord(buffer + 4)) || getWord(buffer + 4) == 0){
|
{
|
||||||
c |= 0x01;
|
_isEcho = false;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
_platform.writeUart(c);
|
|
||||||
}
|
//convert into Extended.ind
|
||||||
}
|
if (_convert)
|
||||||
else if(_RxByteCnt == buffer[6]+7+2){ //complete Frame received, payloadLength+1 for TCPI +1 for CRC
|
{
|
||||||
if(rxByte == (uint8_t)(~_xorSum)){ //check if crc is correct
|
uint8_t payloadLength = buffer[6] & 0x0F;
|
||||||
if(_isEcho && _sendBuffer != NULL){ //check if it is realy an echo, rx_crc = tx_crc
|
buffer[1] = buffer[6] & 0xF0;
|
||||||
if(rxByte == _sendBuffer[_sendBufferLength-1])
|
buffer[6] = payloadLength;
|
||||||
_isEcho = true;
|
}
|
||||||
|
|
||||||
|
if (!_isEcho)
|
||||||
|
{
|
||||||
|
uint8_t c = 0x10;
|
||||||
|
//ceck if individual or group address
|
||||||
|
if ((buffer[6] & 0x80) == 0)
|
||||||
|
{
|
||||||
|
//individual
|
||||||
|
if (_deviceObject.induvidualAddress() == getWord(buffer + 4))
|
||||||
|
{
|
||||||
|
c |= 0x01;
|
||||||
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
_isEcho = false;
|
{
|
||||||
}
|
//group
|
||||||
if(_isEcho){
|
if (_groupAddressTable.contains(getWord(buffer + 4)) || getWord(buffer + 4) == 0)
|
||||||
_loopState = RX_WAIT_DATA_CON;
|
{
|
||||||
}
|
c |= 0x01;
|
||||||
else{
|
}
|
||||||
frameBytesReceived(_receiveBuffer, _RxByteCnt+2);
|
}
|
||||||
_loopState=IDLE;
|
_platform.writeUart(c);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else{
|
else if (_RxByteCnt == buffer[6] + 7 + 2)
|
||||||
println("frame with invalid crc ignored");
|
{
|
||||||
_loopState=IDLE;
|
//complete Frame received, payloadLength+1 for TCPI +1 for CRC
|
||||||
|
if (rxByte == (uint8_t)(~_xorSum))
|
||||||
|
{
|
||||||
|
//check if crc is correct
|
||||||
|
if (_isEcho && _sendBuffer != NULL)
|
||||||
|
{
|
||||||
|
//check if it is realy an echo, rx_crc = tx_crc
|
||||||
|
if (rxByte == _sendBuffer[_sendBufferLength - 1])
|
||||||
|
_isEcho = true;
|
||||||
|
else
|
||||||
|
_isEcho = false;
|
||||||
|
}
|
||||||
|
if (_isEcho)
|
||||||
|
{
|
||||||
|
_loopState = RX_WAIT_DATA_CON;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
frameBytesReceived(_receiveBuffer, _RxByteCnt + 2);
|
||||||
|
_loopState = IDLE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
println("frame with invalid crc ignored");
|
||||||
|
_loopState = IDLE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
else
|
||||||
else{
|
{
|
||||||
_xorSum ^= rxByte;
|
_xorSum ^= rxByte;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case RX_WAIT_DATA_CON:
|
case RX_WAIT_DATA_CON:
|
||||||
if(!_platform.uartAvailable()) break;
|
if (!_platform.uartAvailable())
|
||||||
rxByte =_platform.readUart();
|
break;
|
||||||
_lastByteRxTime = _platform.millis();
|
rxByte = _platform.readUart();
|
||||||
if ((rxByte & L_DATA_CON_MASK) == L_DATA_CON){
|
_lastByteRxTime = _platform.millis();
|
||||||
//println("L_DATA_CON received");
|
if ((rxByte & L_DATA_CON_MASK) == L_DATA_CON)
|
||||||
dataConBytesReceived(_receiveBuffer, _RxByteCnt+2, ((rxByte & SUCCESS) > 0));
|
{
|
||||||
_waitConfirm = false;
|
//println("L_DATA_CON received");
|
||||||
delete[] _sendBuffer;
|
dataConBytesReceived(_receiveBuffer, _RxByteCnt + 2, ((rxByte & SUCCESS) > 0));
|
||||||
_sendBuffer = 0;
|
_waitConfirm = false;
|
||||||
_sendBufferLength = 0;
|
delete[] _sendBuffer;
|
||||||
_loopState=IDLE;
|
_sendBuffer = 0;
|
||||||
}
|
_sendBufferLength = 0;
|
||||||
else{
|
_loopState = IDLE;
|
||||||
//should not happen
|
}
|
||||||
println("expected L_DATA_CON not received");
|
else
|
||||||
dataConBytesReceived(_receiveBuffer, _RxByteCnt+2, false);
|
{
|
||||||
_waitConfirm = false;
|
//should not happen
|
||||||
delete[] _sendBuffer;
|
println("expected L_DATA_CON not received");
|
||||||
_sendBuffer = 0;
|
dataConBytesReceived(_receiveBuffer, _RxByteCnt + 2, false);
|
||||||
_sendBufferLength = 0;
|
_waitConfirm = false;
|
||||||
_loopState=IDLE;
|
delete[] _sendBuffer;
|
||||||
}
|
_sendBuffer = 0;
|
||||||
break;
|
_sendBufferLength = 0;
|
||||||
default:
|
_loopState = IDLE;
|
||||||
break;
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(_waitConfirm){
|
if (_waitConfirm)
|
||||||
if (_platform.millis() - _waitConfirmStartTime > CONFIRM_TIMEOUT){
|
{
|
||||||
|
if (_platform.millis() - _waitConfirmStartTime > CONFIRM_TIMEOUT)
|
||||||
|
{
|
||||||
println("L_DATA_CON not received within expected time");
|
println("L_DATA_CON not received within expected time");
|
||||||
uint8_t cemiBuffer[MAX_KNX_TELEGRAM_SIZE];
|
uint8_t cemiBuffer[MAX_KNX_TELEGRAM_SIZE];
|
||||||
cemiBuffer[0] = 0x29;
|
cemiBuffer[0] = 0x29;
|
||||||
cemiBuffer[1] = 0;
|
cemiBuffer[1] = 0;
|
||||||
memcpy((cemiBuffer+2),_sendBuffer,_sendBufferLength);
|
memcpy((cemiBuffer + 2), _sendBuffer, _sendBufferLength);
|
||||||
dataConBytesReceived(cemiBuffer, _sendBufferLength+2, false);
|
dataConBytesReceived(cemiBuffer, _sendBufferLength + 2, false);
|
||||||
_waitConfirm = false;
|
_waitConfirm = false;
|
||||||
delete[] _sendBuffer;
|
delete[] _sendBuffer;
|
||||||
_sendBuffer = 0;
|
_sendBuffer = 0;
|
||||||
_sendBufferLength = 0;
|
_sendBufferLength = 0;
|
||||||
if(_loopState == RX_WAIT_DATA_CON)
|
if (_loopState == RX_WAIT_DATA_CON)
|
||||||
_loopState=IDLE;
|
_loopState = IDLE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool TpUartDataLinkLayer::sendFrame(CemiFrame& frame)
|
bool TpUartDataLinkLayer::sendFrame(CemiFrame& frame)
|
||||||
{
|
{
|
||||||
if (!_enabled)
|
if (!_enabled)
|
||||||
@ -318,7 +369,6 @@ bool TpUartDataLinkLayer::sendFrame(CemiFrame& frame)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void TpUartDataLinkLayer::resetChip()
|
void TpUartDataLinkLayer::resetChip()
|
||||||
{
|
{
|
||||||
uint8_t cmd = U_RESET_REQ;
|
uint8_t cmd = U_RESET_REQ;
|
||||||
@ -345,13 +395,12 @@ void TpUartDataLinkLayer::stopChip()
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
TpUartDataLinkLayer::TpUartDataLinkLayer(DeviceObject& devObj, AddressTableObject& addrTab,
|
TpUartDataLinkLayer::TpUartDataLinkLayer(DeviceObject& devObj, AddressTableObject& addrTab,
|
||||||
NetworkLayer& layer, Platform& platform) : DataLinkLayer(devObj, addrTab, layer, platform)
|
NetworkLayer& layer, Platform& platform)
|
||||||
|
: DataLinkLayer(devObj, addrTab, layer, platform)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void TpUartDataLinkLayer::frameBytesReceived(uint8_t* buffer, uint16_t length)
|
void TpUartDataLinkLayer::frameBytesReceived(uint8_t* buffer, uint16_t length)
|
||||||
{
|
{
|
||||||
//printHex("=>", buffer, length);
|
//printHex("=>", buffer, length);
|
||||||
@ -364,8 +413,7 @@ void TpUartDataLinkLayer::dataConBytesReceived(uint8_t* buffer, uint16_t length,
|
|||||||
{
|
{
|
||||||
//printHex("=>", buffer, length);
|
//printHex("=>", buffer, length);
|
||||||
CemiFrame frame(buffer, length);
|
CemiFrame frame(buffer, length);
|
||||||
dataConReceived(frame,success);
|
dataConReceived(frame, success);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void TpUartDataLinkLayer::enabled(bool value)
|
void TpUartDataLinkLayer::enabled(bool value)
|
||||||
@ -394,14 +442,16 @@ bool TpUartDataLinkLayer::enabled() const
|
|||||||
return _enabled;
|
return _enabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool TpUartDataLinkLayer::sendSingleFrameByte()
|
||||||
bool TpUartDataLinkLayer::sendSingleFrameByte(){
|
{
|
||||||
uint8_t cmd[2];
|
uint8_t cmd[2];
|
||||||
uint8_t idx = _TxByteCnt / 64;
|
uint8_t idx = _TxByteCnt / 64;
|
||||||
|
|
||||||
if(_sendBuffer == NULL) return false;
|
if (_sendBuffer == NULL)
|
||||||
|
return false;
|
||||||
|
|
||||||
if(_TxByteCnt < _sendBufferLength){
|
if (_TxByteCnt < _sendBufferLength)
|
||||||
|
{
|
||||||
if (idx != _oldIdx)
|
if (idx != _oldIdx)
|
||||||
{
|
{
|
||||||
_oldIdx = idx;
|
_oldIdx = idx;
|
||||||
@ -420,13 +470,15 @@ bool TpUartDataLinkLayer::sendSingleFrameByte(){
|
|||||||
_TxByteCnt++;
|
_TxByteCnt++;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else{
|
else
|
||||||
_TxByteCnt=0;
|
{
|
||||||
|
_TxByteCnt = 0;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void TpUartDataLinkLayer::addFrameTxQueue(CemiFrame& frame){
|
void TpUartDataLinkLayer::addFrameTxQueue(CemiFrame& frame)
|
||||||
|
{
|
||||||
|
|
||||||
_tx_queue_frame_t* tx_frame = new _tx_queue_frame_t;
|
_tx_queue_frame_t* tx_frame = new _tx_queue_frame_t;
|
||||||
tx_frame->length = frame.telegramLengthtTP();
|
tx_frame->length = frame.telegramLengthtTP();
|
||||||
@ -434,35 +486,40 @@ void TpUartDataLinkLayer::addFrameTxQueue(CemiFrame& frame){
|
|||||||
tx_frame->next = NULL;
|
tx_frame->next = NULL;
|
||||||
frame.fillTelegramTP(tx_frame->data);
|
frame.fillTelegramTP(tx_frame->data);
|
||||||
|
|
||||||
if (_tx_queue.back == NULL) {
|
if (_tx_queue.back == NULL)
|
||||||
|
{
|
||||||
_tx_queue.front = _tx_queue.back = tx_frame;
|
_tx_queue.front = _tx_queue.back = tx_frame;
|
||||||
}
|
}
|
||||||
else{
|
else
|
||||||
|
{
|
||||||
_tx_queue.back->next = tx_frame;
|
_tx_queue.back->next = tx_frame;
|
||||||
_tx_queue.back = tx_frame;
|
_tx_queue.back = tx_frame;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TpUartDataLinkLayer::isTxQueueEmpty(){
|
bool TpUartDataLinkLayer::isTxQueueEmpty()
|
||||||
if (_tx_queue.front == NULL){
|
{
|
||||||
return true;
|
if (_tx_queue.front == NULL)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void TpUartDataLinkLayer::loadNextTxFrame()
|
||||||
|
{
|
||||||
|
if (_tx_queue.front == NULL)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
_tx_queue_frame_t* tx_frame = _tx_queue.front;
|
||||||
|
_sendBuffer = tx_frame->data;
|
||||||
|
_sendBufferLength = tx_frame->length;
|
||||||
|
_tx_queue.front = tx_frame->next;
|
||||||
|
|
||||||
void TpUartDataLinkLayer::loadNextTxFrame(){
|
if (_tx_queue.front == NULL)
|
||||||
if (_tx_queue.front == NULL) {
|
{
|
||||||
return;
|
_tx_queue.back = NULL;
|
||||||
}
|
}
|
||||||
_tx_queue_frame_t* tx_frame = _tx_queue.front;
|
delete tx_frame;
|
||||||
_sendBuffer = tx_frame->data;
|
|
||||||
_sendBufferLength = tx_frame->length;
|
|
||||||
_tx_queue.front = tx_frame->next;
|
|
||||||
|
|
||||||
if (_tx_queue.front == NULL){
|
|
||||||
_tx_queue.back = NULL;
|
|
||||||
}
|
|
||||||
delete tx_frame;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,24 +3,23 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include "data_link_layer.h"
|
#include "data_link_layer.h"
|
||||||
|
|
||||||
#define MAX_KNX_TELEGRAM_SIZE 263
|
#define MAX_KNX_TELEGRAM_SIZE 263
|
||||||
#define BYTE_TIMEOUT 3 //milli seconds
|
|
||||||
#define CONFIRM_TIMEOUT 500 //milli seconds
|
|
||||||
|
|
||||||
|
class TpUartDataLinkLayer : public DataLinkLayer
|
||||||
class TpUartDataLinkLayer: public DataLinkLayer
|
|
||||||
{
|
{
|
||||||
using DataLinkLayer::_deviceObject;
|
using DataLinkLayer::_deviceObject;
|
||||||
using DataLinkLayer::_platform;
|
|
||||||
using DataLinkLayer::_groupAddressTable;
|
using DataLinkLayer::_groupAddressTable;
|
||||||
public:
|
using DataLinkLayer::_platform;
|
||||||
|
|
||||||
|
public:
|
||||||
TpUartDataLinkLayer(DeviceObject& devObj, AddressTableObject& addrTab, NetworkLayer& layer,
|
TpUartDataLinkLayer(DeviceObject& devObj, AddressTableObject& addrTab, NetworkLayer& layer,
|
||||||
Platform& platform);
|
Platform& platform);
|
||||||
|
|
||||||
void loop();
|
void loop();
|
||||||
void enabled(bool value);
|
void enabled(bool value);
|
||||||
bool enabled() const;
|
bool enabled() const;
|
||||||
private:
|
|
||||||
|
private:
|
||||||
bool _enabled = false;
|
bool _enabled = false;
|
||||||
bool _waitConfirm = false;
|
bool _waitConfirm = false;
|
||||||
uint8_t* _sendBuffer = 0;
|
uint8_t* _sendBuffer = 0;
|
||||||
@ -33,20 +32,22 @@ private:
|
|||||||
bool _isEcho = false;
|
bool _isEcho = false;
|
||||||
bool _isAddressed = false;
|
bool _isAddressed = false;
|
||||||
bool _convert = false;
|
bool _convert = false;
|
||||||
uint8_t _xorSum=0;
|
uint8_t _xorSum = 0;
|
||||||
uint32_t _lastByteRxTime;
|
uint32_t _lastByteRxTime;
|
||||||
uint32_t _waitConfirmStartTime;
|
uint32_t _waitConfirmStartTime;
|
||||||
|
|
||||||
struct _tx_queue_frame_t{
|
struct _tx_queue_frame_t
|
||||||
uint8_t *data;
|
{
|
||||||
|
uint8_t* data;
|
||||||
uint16_t length;
|
uint16_t length;
|
||||||
_tx_queue_frame_t *next;
|
_tx_queue_frame_t* next;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _tx_queue_t {
|
struct _tx_queue_t
|
||||||
_tx_queue_frame_t *front=NULL;
|
{
|
||||||
_tx_queue_frame_t *back=NULL;
|
_tx_queue_frame_t* front = NULL;
|
||||||
}_tx_queue;
|
_tx_queue_frame_t* back = NULL;
|
||||||
|
} _tx_queue;
|
||||||
|
|
||||||
void addFrameTxQueue(CemiFrame& frame);
|
void addFrameTxQueue(CemiFrame& frame);
|
||||||
bool isTxQueueEmpty();
|
bool isTxQueueEmpty();
|
||||||
@ -58,4 +59,3 @@ private:
|
|||||||
void resetChip();
|
void resetChip();
|
||||||
void stopChip();
|
void stopChip();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -51,15 +51,15 @@ public:
|
|||||||
void cmdlineArgs(int argc, char** argv);
|
void cmdlineArgs(int argc, char** argv);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
uint32_t _multicastAddr;
|
uint32_t _multicastAddr = -1;
|
||||||
uint16_t _port;
|
uint16_t _port = -1;
|
||||||
int _socketFd = -1;
|
int _socketFd = -1;
|
||||||
void doMemoryMapping();
|
void doMemoryMapping();
|
||||||
uint8_t* _mappedFile;
|
uint8_t* _mappedFile = 0;
|
||||||
int _fd = -1;
|
int _fd = -1;
|
||||||
uint8_t* _currentMaxMem = 0;
|
uint8_t* _currentMaxMem = 0;
|
||||||
std::string _flashFilePath = "flash.bin";
|
std::string _flashFilePath = "flash.bin";
|
||||||
char** _args;
|
char** _args = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
Loading…
Reference in New Issue
Block a user