Skip to content
Snippets Groups Projects
Commit feb46a7f authored by Taya Snijder's avatar Taya Snijder
Browse files

removed device_manager (msvc), removed bare server, updated readme

parent 2618da64
Branches
No related tags found
No related merge requests found
Showing
with 0 additions and 10493 deletions

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.28307.645
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Device_manager", "Device_manager\Device_manager.vcxproj", "{7F4B2B0B-6C07-422B-B4C1-B1DCD668DC09}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{7F4B2B0B-6C07-422B-B4C1-B1DCD668DC09}.Debug|x64.ActiveCfg = Debug|x64
{7F4B2B0B-6C07-422B-B4C1-B1DCD668DC09}.Debug|x64.Build.0 = Debug|x64
{7F4B2B0B-6C07-422B-B4C1-B1DCD668DC09}.Debug|x86.ActiveCfg = Debug|Win32
{7F4B2B0B-6C07-422B-B4C1-B1DCD668DC09}.Debug|x86.Build.0 = Debug|Win32
{7F4B2B0B-6C07-422B-B4C1-B1DCD668DC09}.Release|x64.ActiveCfg = Release|x64
{7F4B2B0B-6C07-422B-B4C1-B1DCD668DC09}.Release|x64.Build.0 = Release|x64
{7F4B2B0B-6C07-422B-B4C1-B1DCD668DC09}.Release|x86.ActiveCfg = Release|Win32
{7F4B2B0B-6C07-422B-B4C1-B1DCD668DC09}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {E7CBC4BB-ABE0-4EF1-B785-B0218366E0CF}
EndGlobalSection
EndGlobal
This diff is collapsed.
This diff is collapsed.
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>15.0</VCProjectVersion>
<ProjectGuid>{7F4B2B0B-6C07-422B-B4C1-B1DCD668DC09}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>Devicemanager</RootNamespace>
<WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
<StringPooling>true</StringPooling>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="pch.h" />
<ClInclude Include="tester.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="Device_manager.cpp" />
<ClCompile Include="pch.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
</ClCompile>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;hm;inl;inc;ipp;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClInclude Include="pch.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="tester.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="pch.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Device_manager.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup />
</Project>
\ No newline at end of file
// pch.cpp: source file corresponding to pre-compiled header; necessary for compilation to succeed
#include "pch.h"
// In general, ignore this file, but keep it around if you are using pre-compiled headers.
// Tips for Getting Started:
// 1. Use the Solution Explorer window to add/manage files
// 2. Use the Team Explorer window to connect to source control
// 3. Use the Output window to see build output and other messages
// 4. Use the Error List window to view errors
// 5. Go to Project > Add New Item to create new code files, or Project > Add Existing Item to add existing code files to the project
// 6. In the future, to open this project again, go to File > Open > Project and select the .sln file
#ifndef PCH_H
#define PCH_H
// TODO: add headers that you want to pre-compile here
#include <iostream>
#include <string>
#include <time.h>
#endif //PCH_H
#pragma once
#include "pch.h"
#include <iostream>
#include <string>
#include <time.h>
#define LOGGING true //some functions print out extra statements (turn off if when you enable FORMAT_TEST)
//to enable DECRAMENT_TEST, set FORMAT_TEST to false and DECREMENT_TEST to true
//when enabling FORMAT_TEST it is useful to disable LOGGING
#define FORMAT_TEST false //tests the PMBUS formatting by inserting pre-calculated values and checking if they're correctly calculated
#define DECREMENT_TEST true //gives a sensor value that decrements each time a sensor is measured
using namespace std;
int TEST_decrement_counter = 0;
const int VOUT_MODE_test_array_size = 24;
const int literal_test_array_size = 24;
class literal_test {
public:
literal_test(float _expected, uint16_t _input) {
expected_output = _expected;
input_value = _input;
}
float expected_output; //manually calculated excpected output
uint16_t input_value;
static int wrong_cnt;
static int correct_cnt;
void compare(float returned_output) { //compare result with expected, account for loss of accuracy by allowing +-1% error
if (wrong_cnt + correct_cnt < literal_test_array_size) { //only print if not all values are tested
cout << "LITERAL: \t ";
if (returned_output >= expected_output - abs(expected_output) * 0.01 && returned_output <= expected_output + abs(expected_output*0.01)) {
correct_cnt++;
cout << "correct, expected: " << expected_output << ", received: " << returned_output << endl;
}
else {
wrong_cnt++;
cout << "WRONG!!!! expected: " << expected_output << ", received: " << returned_output << endl << endl;
}
}
else {
//we don't care about this anymore, but need to increment it to more than the test array size
wrong_cnt++;
correct_cnt++;
}
}
};
int literal_test::wrong_cnt = 0;
int literal_test::correct_cnt = 0;
class VOUT_MODE_test {
public:
VOUT_MODE_test(float _expected, uint8_t _input_byte, uint16_t _input_word) {
expected_output = _expected;
input_word = _input_word;
input_byte = _input_byte;
}
float expected_output; //manually calculated excpected output
uint16_t input_word;
uint8_t input_byte;
static int wrong_cnt;
static int correct_cnt;
void compare(float returned_output) { //compare result with expected, account for loss of accuracy by allowing +-1% error
if (wrong_cnt + correct_cnt < VOUT_MODE_test_array_size) { //only print if not all values are tested
cout << "VOUT_MODE: \t ";
if (returned_output >= expected_output - abs(expected_output) * 0.01 && returned_output <= expected_output + abs(expected_output*0.01)) {
correct_cnt++;
cout << "correct, expected: " << expected_output << ", received: " << returned_output << endl;
}
else {
wrong_cnt++;
cout << endl << "WRONG!!!! expected: " << expected_output << ", received: " << returned_output << endl << endl;
}
}
else {
//we don't care about this anymore, but need to increment it to more than the test array size
wrong_cnt++;
correct_cnt++;
}
}
};
int VOUT_MODE_test::wrong_cnt = 0;
int VOUT_MODE_test::correct_cnt = 0;
//pre calculated values to verify the formatter works correctly
literal_test test_values_literal[literal_test_array_size] = {
// test positive exponents
literal_test(1.0, 0b0000000000000001), //0b 00000 00000000001 = 1 * 2^0 = 1.0
literal_test(2.0, 0b0000100000000001), //0b 00001 00000000001 = 1 * 2^1 = 2.0
literal_test(8.0, 0b0001100000000001), //0b 00011 00000000001 = 1 * 2^3 = 8.0
literal_test(256.0, 0b0100000000000001), //0b 01000 00000000001 = 1 * 2^8 = 256.0
//test negative exponents
literal_test(0.5, 0b1111100000000001), //0b 11111 00000000001 = 1 * 2^-1 = 0.5
literal_test(0.25, 0b1111000000000001), //0b 11110 00000000001 = 1 * 2^-2 = 0.25
literal_test(0.125, 0b1110100000000001), //0b 11101 00000000001 = 1 * 2^-3 = 0.125
literal_test(0.0625, 0b1110000000000001), //0b 11100 00000000001 = 1 * 2^-4 = 0.0625
//test positive mantissa
literal_test(1.0, 0b0000000000000001), //0b 00000 00000000001 = 1 * 2^0 = 1.0
literal_test(2.0, 0b0000000000000010), //0b 00000 00000000010 = 2 * 2^0 = 2.0
literal_test(6.0, 0b0000000000000110), //0b 00000 00000000110 = 6 * 2^0 = 6.0
literal_test(31.0, 0b0000000000011111), //0b 00000 00000011111 = 31 * 2^0 = 31.0
//test negative mantissa
literal_test(-1.0, 0b0000011111111111), //0b 00000 11111111111 = -1 * 2^0 = -1.0
literal_test(-4.0, 0b0000011111111100), //0b 00000 11111111100 = -4 * 2^0 = -4.0
literal_test(-5.0, 0b0000011111111011), //0b 00000 11111111011 = -5 * 2^0 = -5.0
literal_test(-1024.0, 0b0000010000000000), //0b 00000 10000000000 = -1024 * 2^0 = -1024.0
//test negative mantissa and negative exponent
literal_test(-0.5, 0b1111111111111111), //0b 11111 11111111111 = -1 * 2^-1 = -0.5
literal_test(-1.0, 0b1111011111111100), //0b 11110 11111111100 = -4 * 2^-2 = -1.0
literal_test(-64.0, 0b1111011100000000), //0b 11110 11100000000 = -256 * 2^-2 = -64.0
literal_test(-4.0, 0b1100010000000000), //0b 11000 10000000000 = -1024 * 2^-8 = -4.0
//test mantissa = 0
literal_test(0.0, 0b0000000000000000), //0b 00000 00000000000 = 0 * 2^0 = 0.0
literal_test(0.0, 0b0001100000000000), //0b 00011 00000000000 = 0 * 2^3 = 0.0
literal_test(0.0, 0b1100000000000000), //0b 11000 00000000000 = 0 * 2^-8 = 0.0
literal_test(0.0, 0b1111100000000000) //0b 11111 00000000000 = 0 * 2^-1 = 0.0
};
//pre calculated values to verify the formatter works correctly
VOUT_MODE_test test_values_VOUT_MODE[VOUT_MODE_test_array_size] = {
//test positive exponent
VOUT_MODE_test(2.0, 0b00001, 0b0000000000000001), //0b00001, 0b0000000000000001 = 1 * 2^1 = 2.0
VOUT_MODE_test(8.0, 0b00011, 0b0000000000000001), //0b00011, 0b0000000000000001 = 1 * 2^3 = 8.0
VOUT_MODE_test(64.0, 0b00110, 0b0000000000000001), //0b00110, 0b0000000000000001 = 1 * 2^6 = 64.0
VOUT_MODE_test(32768.0, 0b01111, 0b0000000000000001), //0b01111, 0b0000000000000001 = 1 * 2^15 = 32768.0
//test negative exponent
VOUT_MODE_test(0.5, 0b11111, 0b0000000000000001), //0b11111, 0b0000000000000001 = 1 * 2^-1 = 0.5
VOUT_MODE_test(0.25, 0b11110, 0b0000000000000001), //0b11110, 0b0000000000000001 = 1 * 2^-2 = 0.25
VOUT_MODE_test(0.125, 0b11101, 0b0000000000000001), //0b11101, 0b0000000000000001 = 1 * 2^-3 = 0.125
VOUT_MODE_test(0.0625, 0b11100, 0b0000000000000001), //0b11100, 0b0000000000000001 = 1 * 2^-4 = 0.625
//test positive mantissa
VOUT_MODE_test(1.0, 0b00000, 0b0000000000000001), //0b00000, 0b0000000000000001 = 1 * 2^0 = 1.0
VOUT_MODE_test(6.0, 0b00000, 0b0000000000000110), //0b00000, 0b0000000000000110 = 6 * 2^0 = 6.0
VOUT_MODE_test(56.0, 0b00000, 0b0000000000111000), //0b00000, 0b0000000000111000 = 56 * 2^0 = 56.0
VOUT_MODE_test(960.0, 0b00000, 0b0000001111000000), //0b00000, 0b0000001111000000 = 960 * 2^0 = 960.0
//test lack of negative mantissa
VOUT_MODE_test(65535.0, 0b00000, 0b1111111111111111), //0b00000, 0b1111111111111111 = 65535 * 2^0 = 65535.0 (not -1.0)
VOUT_MODE_test(65529.0, 0b00000, 0b1111111111111001), //0b00000, 0b1111111111111001 = 65529 * 2^0 = 65529.0 (not --7.0)
VOUT_MODE_test(65479.0, 0b00000, 0b1111111111000111), //0b00000, 0b1111111111000111 = 65479 * 2^0 = 65479.0 (not --57.0)
VOUT_MODE_test(64575.0, 0b00000, 0b1111110000111111), //0b00000, 0b1111110000111111 = 64575 * 2^0 = 64575.0 (not --961.0)
//test lack of negative mantissa and negative exponent
VOUT_MODE_test(32767.5, 0b11111, 0b1111111111111111), //0b11111, 0b1111111111111111 = 65535 * 2^-1 = 32767.5 (not -0.5)
VOUT_MODE_test(16382.25, 0b11110, 0b1111111111111001), //0b11110, 0b1111111111111001 = 65529 * 2^-2 = 16382.25 (not -1.75)
VOUT_MODE_test(8184.875, 0b11101, 0b1111111111000111), //0b11101, 0b1111111111000111 = 65479 * 2^-3 = 8184.875 (not -7.125)
VOUT_MODE_test(4035.9375, 0b11100, 0b1111110000111111), //0b11100, 0b1111110000111111 = 64575 * 2^-4 = 4035.9375(not -60.0625)
//test mantissa = 0
VOUT_MODE_test(0.0, 0b00001, 0b0000000000000000), //0b00001, 0b0000000000000000 = 0 * 2^1 = 0.0
VOUT_MODE_test(0.0, 0b00011, 0b0000000000000000), //0b00011, 0b0000000000000000 = 0 * 2^15 = 0.0
VOUT_MODE_test(0.0, 0b00110, 0b0000000000000000), //0b00110, 0b0000000000000000 = 0 * 2^-1 = 0.0
VOUT_MODE_test(0.0, 0b01111, 0b0000000000000000) //0b01111, 0b0000000000000000 = 0 * 2^16 = 0.0
};
#define LITERAL_TEST 0
#define VOUT_MODE_TEST 1
uint16_t format_tester(int test_mode) {
if (test_mode == LITERAL_TEST) {
//print results when all test values are processed
if (literal_test::wrong_cnt + literal_test::correct_cnt == literal_test_array_size) {
cout << endl << endl << "processed all LITERAL test values" << endl;
cout << "out of: " << literal_test::wrong_cnt + literal_test::correct_cnt
<< " values, " << literal_test::correct_cnt << " were correct and "
<< literal_test::wrong_cnt << " were wrong" << endl << endl;
}
if (literal_test::wrong_cnt + literal_test::correct_cnt >= literal_test_array_size) {
return 0x0000; // if all values are tested, return zero
}
else {
//retreive the test value
uint16_t raw_word = test_values_literal[literal_test::wrong_cnt + literal_test::correct_cnt].input_value;
return raw_word;
}
}
if (test_mode == VOUT_MODE_TEST) {
//print results when all test values are processed
if (VOUT_MODE_test::wrong_cnt + VOUT_MODE_test::correct_cnt == literal_test_array_size) {
cout << endl << endl << "processed all VOUT_MODE test values" << endl;
cout << "out of: " << VOUT_MODE_test::wrong_cnt + VOUT_MODE_test::correct_cnt
<< " values, " << VOUT_MODE_test::correct_cnt << " were correct and "
<< VOUT_MODE_test::wrong_cnt << " were wrong" << endl << endl;
}
if (VOUT_MODE_test::wrong_cnt + VOUT_MODE_test::correct_cnt >= literal_test_array_size) {
return 0x0000; // if all values are tested return zero
}
else {
//retreive the test value
uint16_t raw_word = test_values_VOUT_MODE[VOUT_MODE_test::wrong_cnt + VOUT_MODE_test::correct_cnt].input_word;
return raw_word;
}
}
}
//VOUT_MODE requires reading a second register
uint8_t vout_test_byte() {
if (VOUT_MODE_test::wrong_cnt + VOUT_MODE_test::correct_cnt >= literal_test_array_size) {
return 0x0000; // if all values are tested, return zero
}
else {
uint16_t raw_word = test_values_VOUT_MODE[VOUT_MODE_test::wrong_cnt + VOUT_MODE_test::correct_cnt].input_word;
return test_values_VOUT_MODE[VOUT_MODE_test::wrong_cnt + VOUT_MODE_test::correct_cnt].input_byte;
}
}
Device_manager/M&C_network.png

127 KiB

Device_manager/Uniboard_M&C.png

73.4 KiB

# Device manager
This code was developed in microcoft visual studio, and will later be placed as a layer atop the low-level peripheral driver software
This project contains the framework for monitoring and controlling all I2C devices and navigating to the correct switch. this software does not read out the device, but rather ensures the correct devices are selected and the switches get set correct. This code will sit atop another layer of code responsible for controlling the I2C units. This code is neccecary because of the amount of datapoints that have to be read, the amount of different devices there are, the different ways devices have to be controlled/read and the requirement of navigating using switches due to the amount of address conflicts.
![overview of the APS M&C structure](https://git.astron.nl/snijder/aps-monitor-and-control/-/tree/master/Device_manager/M&C_network.png)
Currently the I2C communication is emulated by " tester.h". this file is capable of providing test values for the PMBUS_sensor formatters, but is mostly used to provide a decrementing counter for each time a sensor is read.
The code has multiple classes. The most important one is the " node" class. It holds pointers to multiple arrays of different objects. those being: "device", " monitored_device" and "node".
"device" is a generic base class for containing all non-monitored devices. devices such as IO-extenders, I2C switches or devices that will only need to be read out or constolled on an irregular basis.
"monitored_device" are devices that are constantly monitored, at regular intervals, most of the devices here are of class "PMBUS_device"
"node" the node class contains a pointer array to another instances of its class (its subnodes). this way, the entire APS M&C network can be navigated hierarchically,like a device tree.
There are also several "base_node" classes (one initialised for each I2C_unit currently). the "unb_base_node" contains the configuration for 2 uniboards connected to an I2C unit. the "RCU_base_node" contains the configuration for each I2C unit connected to the RCU's. In these classes all devices are configured, referenced by the correct nodes who are in turn also referenced by their supernodes (E.g: uniboard contains 1 I2C switch device and 5 subnodes, those subnodes contain the monitored devices.) a visual overview of how the code could be structured can be found in M&C_network.png and uniboard_M&C.png.
note: these configurations are incomplete and incorrect, they're currently only used for testing purposes. Especially the RCU's.
This diff is collapsed.
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>OPC_microcontroller_test_server</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
<triggers>clean,full,incremental,</triggers>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
<triggers>full,incremental,</triggers>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.cdt.core.cnature</nature>
<nature>com.nxp.mcuxpresso.core.datamodels.sdkNature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
</natures>
<linkedResources>
<link>
<name>doc/readme.txt</name>
<type>1</type>
<locationURI>SDK_2_x_EVK_MIMXRT1060/boards/evkmimxrt1060/lwip_examples/lwip_ping/freertos/readme.txt</locationURI>
</link>
<link>
<name>doc/lwip/CHANGELOG</name>
<type>1</type>
<locationURI>SDK_2_x_EVK_MIMXRT1060/middleware/lwip/CHANGELOG</locationURI>
</link>
<link>
<name>doc/lwip/CMakeLists.txt</name>
<type>1</type>
<locationURI>SDK_2_x_EVK_MIMXRT1060/middleware/lwip/CMakeLists.txt</locationURI>
</link>
<link>
<name>doc/lwip/COPYING</name>
<type>1</type>
<locationURI>SDK_2_x_EVK_MIMXRT1060/middleware/lwip/COPYING</locationURI>
</link>
<link>
<name>doc/lwip/ChangeLogKSDK.txt</name>
<type>1</type>
<locationURI>SDK_2_x_EVK_MIMXRT1060/middleware/lwip/ChangeLogKSDK.txt</locationURI>
</link>
<link>
<name>doc/lwip/FEATURES</name>
<type>1</type>
<locationURI>SDK_2_x_EVK_MIMXRT1060/middleware/lwip/FEATURES</locationURI>
</link>
<link>
<name>doc/lwip/FILES</name>
<type>1</type>
<locationURI>SDK_2_x_EVK_MIMXRT1060/middleware/lwip/FILES</locationURI>
</link>
<link>
<name>doc/lwip/README</name>
<type>1</type>
<locationURI>SDK_2_x_EVK_MIMXRT1060/middleware/lwip/README</locationURI>
</link>
<link>
<name>doc/lwip/UPGRADING</name>
<type>1</type>
<locationURI>SDK_2_x_EVK_MIMXRT1060/middleware/lwip/UPGRADING</locationURI>
</link>
<link>
<name>doc/lwip/doc/FILES</name>
<type>1</type>
<locationURI>SDK_2_x_EVK_MIMXRT1060/middleware/lwip/doc/FILES</locationURI>
</link>
<link>
<name>doc/lwip/doc/NO_SYS_SampleCode.c</name>
<type>1</type>
<locationURI>SDK_2_x_EVK_MIMXRT1060/middleware/lwip/doc/NO_SYS_SampleCode.c</locationURI>
</link>
<link>
<name>doc/lwip/doc/ZeroCopyRx.c</name>
<type>1</type>
<locationURI>SDK_2_x_EVK_MIMXRT1060/middleware/lwip/doc/ZeroCopyRx.c</locationURI>
</link>
<link>
<name>doc/lwip/doc/contrib.txt</name>
<type>1</type>
<locationURI>SDK_2_x_EVK_MIMXRT1060/middleware/lwip/doc/contrib.txt</locationURI>
</link>
<link>
<name>doc/lwip/doc/mdns.txt</name>
<type>1</type>
<locationURI>SDK_2_x_EVK_MIMXRT1060/middleware/lwip/doc/mdns.txt</locationURI>
</link>
<link>
<name>doc/lwip/doc/mqtt_client.txt</name>
<type>1</type>
<locationURI>SDK_2_x_EVK_MIMXRT1060/middleware/lwip/doc/mqtt_client.txt</locationURI>
</link>
<link>
<name>doc/lwip/doc/ppp.txt</name>
<type>1</type>
<locationURI>SDK_2_x_EVK_MIMXRT1060/middleware/lwip/doc/ppp.txt</locationURI>
</link>
<link>
<name>doc/lwip/doc/savannah.txt</name>
<type>1</type>
<locationURI>SDK_2_x_EVK_MIMXRT1060/middleware/lwip/doc/savannah.txt</locationURI>
</link>
<link>
<name>doc/lwip/src/FILES</name>
<type>1</type>
<locationURI>SDK_2_x_EVK_MIMXRT1060/middleware/lwip/src/FILES</locationURI>
</link>
<link>
<name>doc/amazon-freertos/freertos_kernel/portable/readme.txt</name>
<type>1</type>
<locationURI>SDK_2_x_EVK_MIMXRT1060/rtos/amazon-freertos/freertos_kernel/portable/readme.txt</locationURI>
</link>
<link>
<name>doc/lwip/doc/doxygen/generate.bat</name>
<type>1</type>
<locationURI>SDK_2_x_EVK_MIMXRT1060/middleware/lwip/doc/doxygen/generate.bat</locationURI>
</link>
<link>
<name>doc/lwip/doc/doxygen/generate.sh</name>
<type>1</type>
<locationURI>SDK_2_x_EVK_MIMXRT1060/middleware/lwip/doc/doxygen/generate.sh</locationURI>
</link>
<link>
<name>doc/lwip/doc/doxygen/lwip.Doxyfile</name>
<type>1</type>
<locationURI>SDK_2_x_EVK_MIMXRT1060/middleware/lwip/doc/doxygen/lwip.Doxyfile</locationURI>
</link>
<link>
<name>doc/lwip/doc/doxygen/lwip.Doxyfile.cmake.in</name>
<type>1</type>
<locationURI>SDK_2_x_EVK_MIMXRT1060/middleware/lwip/doc/doxygen/lwip.Doxyfile.cmake.in</locationURI>
</link>
<link>
<name>doc/lwip/doc/doxygen/main_page.h</name>
<type>1</type>
<locationURI>SDK_2_x_EVK_MIMXRT1060/middleware/lwip/doc/doxygen/main_page.h</locationURI>
</link>
<link>
<name>doc/lwip/src/netif/FILES</name>
<type>1</type>
<locationURI>SDK_2_x_EVK_MIMXRT1060/middleware/lwip/src/netif/FILES</locationURI>
</link>
<link>
<name>doc/lwip/doc/doxygen/output/index.html</name>
<type>1</type>
<locationURI>SDK_2_x_EVK_MIMXRT1060/middleware/lwip/doc/doxygen/output/index.html</locationURI>
</link>
<link>
<name>doc/lwip/src/netif/ppp/PPPD_FOLLOWUP</name>
<type>1</type>
<locationURI>SDK_2_x_EVK_MIMXRT1060/middleware/lwip/src/netif/ppp/PPPD_FOLLOWUP</locationURI>
</link>
<link>
<name>doc/lwip/src/netif/ppp/polarssl/README</name>
<type>1</type>
<locationURI>SDK_2_x_EVK_MIMXRT1060/middleware/lwip/src/netif/ppp/polarssl/README</locationURI>
</link>
</linkedResources>
</projectDescription>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project>
<configuration id="com.crt.advproject.config.exe.debug.305108713" name="Debug">
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuildCommandParser" id="com.crt.advproject.GCCBuildCommandParser" keep-relative-paths="false" name="MCU GCC Build Output Parser" parameter="(arm-none-eabi-gcc)|(arm-none-eabi-[gc]\+\+)|(gcc)|([gc]\+\+)|(clang)" prefer-non-shared="true"/>
<provider class="com.crt.advproject.specs.MCUGCCBuiltinSpecsDetector" console="false" env-hash="-1390387832379270900" id="com.crt.advproject.GCCBuildSpecCompilerParser" keep-relative-paths="false" name="MCU GCC Built-in Compiler Parser" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<language-scope id="org.eclipse.cdt.core.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/>
</provider>
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
</extension>
</configuration>
<configuration id="com.crt.advproject.config.exe.release.1528204541" name="Release">
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
<provider copy-of="extension" id="com.crt.advproject.GCCBuildCommandParser"/>
<provider class="com.crt.advproject.specs.MCUGCCBuiltinSpecsDetector" console="false" env-hash="-1389200009715780052" id="com.crt.advproject.GCCBuildSpecCompilerParser" keep-relative-paths="false" name="MCU GCC Built-in Compiler Parser" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<language-scope id="org.eclipse.cdt.core.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/>
</provider>
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
</extension>
</configuration>
</project>
eclipse.preferences.version=1
org.eclipse.cdt.codan.checkers.errnoreturn.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"No return\\")",implicit\=>false}
org.eclipse.cdt.codan.checkers.errreturnvalue.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Unused return value\\")"}
org.eclipse.cdt.codan.checkers.nocommentinside=-Error
org.eclipse.cdt.codan.checkers.nocommentinside.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Nesting comments\\")"}
org.eclipse.cdt.codan.checkers.nolinecomment=-Error
org.eclipse.cdt.codan.checkers.nolinecomment.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Line comments\\")"}
org.eclipse.cdt.codan.checkers.noreturn.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"No return value\\")",implicit\=>false}
org.eclipse.cdt.codan.internal.checkers.AbstractClassCreation.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Abstract class cannot be instantiated\\")"}
org.eclipse.cdt.codan.internal.checkers.AmbiguousProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Ambiguous problem\\")"}
org.eclipse.cdt.codan.internal.checkers.AssignmentInConditionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Assignment in condition\\")"}
org.eclipse.cdt.codan.internal.checkers.AssignmentToItselfProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Assignment to itself\\")"}
org.eclipse.cdt.codan.internal.checkers.CStyleCastProblem=-Warning
org.eclipse.cdt.codan.internal.checkers.CStyleCastProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"C-Style cast instead of C++ cast\\")"}
org.eclipse.cdt.codan.internal.checkers.CaseBreakProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"No break at end of case\\")",no_break_comment\=>"no break",last_case_param\=>false,empty_case_param\=>false,enable_fallthrough_quickfix_param\=>false}
org.eclipse.cdt.codan.internal.checkers.CatchByReference.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Catching by reference is recommended\\")",unknown\=>false,exceptions\=>()}
org.eclipse.cdt.codan.internal.checkers.CircularReferenceProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Circular inheritance\\")"}
org.eclipse.cdt.codan.internal.checkers.ClassMembersInitialization.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Class members should be properly initialized\\")",skip\=>true}
org.eclipse.cdt.codan.internal.checkers.CopyrightProblem=-Warning
org.eclipse.cdt.codan.internal.checkers.CopyrightProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Lack of copyright information\\")",regex\=>".*Copyright.*"}
org.eclipse.cdt.codan.internal.checkers.DecltypeAutoProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Invalid 'decltype(auto)' specifier\\")"}
org.eclipse.cdt.codan.internal.checkers.FieldResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Field cannot be resolved\\")"}
org.eclipse.cdt.codan.internal.checkers.FunctionResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Function cannot be resolved\\")"}
org.eclipse.cdt.codan.internal.checkers.GotoStatementProblem=-Warning
org.eclipse.cdt.codan.internal.checkers.GotoStatementProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Goto statement used\\")"}
org.eclipse.cdt.codan.internal.checkers.InvalidArguments.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Invalid arguments\\")"}
org.eclipse.cdt.codan.internal.checkers.InvalidTemplateArgumentsProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Invalid template argument\\")"}
org.eclipse.cdt.codan.internal.checkers.LabelStatementNotFoundProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Label statement not found\\")"}
org.eclipse.cdt.codan.internal.checkers.MemberDeclarationNotFoundProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Member declaration not found\\")"}
org.eclipse.cdt.codan.internal.checkers.MethodResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Method cannot be resolved\\")"}
org.eclipse.cdt.codan.internal.checkers.MissCaseProblem=-Warning
org.eclipse.cdt.codan.internal.checkers.MissCaseProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Missing cases in switch\\")"}
org.eclipse.cdt.codan.internal.checkers.MissDefaultProblem=-Warning
org.eclipse.cdt.codan.internal.checkers.MissDefaultProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Missing default in switch\\")",defaultWithAllEnums\=>false}
org.eclipse.cdt.codan.internal.checkers.NamingConventionFunctionChecker.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Name convention for function\\")",pattern\=>"^[a-z]",macro\=>true,exceptions\=>()}
org.eclipse.cdt.codan.internal.checkers.NonVirtualDestructorProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Class has a virtual method and non-virtual destructor\\")"}
org.eclipse.cdt.codan.internal.checkers.OverloadProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Invalid overload\\")"}
org.eclipse.cdt.codan.internal.checkers.RedeclarationProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Invalid redeclaration\\")"}
org.eclipse.cdt.codan.internal.checkers.RedefinitionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Invalid redefinition\\")"}
org.eclipse.cdt.codan.internal.checkers.ReturnStyleProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Return with parenthesis\\")"}
org.eclipse.cdt.codan.internal.checkers.ScanfFormatStringSecurityProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Format String Vulnerability\\")"}
org.eclipse.cdt.codan.internal.checkers.StatementHasNoEffectProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Statement has no effect\\")",macro\=>true,exceptions\=>()}
org.eclipse.cdt.codan.internal.checkers.SuggestedParenthesisProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Suggested parenthesis around expression\\")",paramNot\=>false}
org.eclipse.cdt.codan.internal.checkers.SuspiciousSemicolonProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Suspicious semicolon\\")",else\=>false,afterelse\=>false}
org.eclipse.cdt.codan.internal.checkers.TypeResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Type cannot be resolved\\")"}
org.eclipse.cdt.codan.internal.checkers.UnusedFunctionDeclarationProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Unused function declaration\\")",macro\=>true}
org.eclipse.cdt.codan.internal.checkers.UnusedStaticFunctionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Unused static function\\")",macro\=>true}
org.eclipse.cdt.codan.internal.checkers.UnusedVariableDeclarationProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Unused variable declaration in file scope\\")",macro\=>true,exceptions\=>("@(\#)","$Id")}
org.eclipse.cdt.codan.internal.checkers.UsingInHeaderProblem=-Warning
org.eclipse.cdt.codan.internal.checkers.UsingInHeaderProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Using directive in header\\")"}
org.eclipse.cdt.codan.internal.checkers.VariableResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Symbol is not resolved\\")"}
org.eclipse.cdt.codan.internal.checkers.VirtualMethodCallProblem=-Error
org.eclipse.cdt.codan.internal.checkers.VirtualMethodCallProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Virtual method call in constructor/destructor\\")"}
eclipse.preferences.version=1
environment/buildEnvironmentInclude/com.crt.advproject.config.exe.debug.305108713/CPATH/delimiter=;
environment/buildEnvironmentInclude/com.crt.advproject.config.exe.debug.305108713/CPATH/operation=remove
environment/buildEnvironmentInclude/com.crt.advproject.config.exe.debug.305108713/C_INCLUDE_PATH/delimiter=;
environment/buildEnvironmentInclude/com.crt.advproject.config.exe.debug.305108713/C_INCLUDE_PATH/operation=remove
environment/buildEnvironmentInclude/com.crt.advproject.config.exe.debug.305108713/append=true
environment/buildEnvironmentInclude/com.crt.advproject.config.exe.debug.305108713/appendContributed=true
environment/buildEnvironmentLibrary/com.crt.advproject.config.exe.debug.305108713/LIBRARY_PATH/delimiter=;
environment/buildEnvironmentLibrary/com.crt.advproject.config.exe.debug.305108713/LIBRARY_PATH/operation=remove
environment/buildEnvironmentLibrary/com.crt.advproject.config.exe.debug.305108713/append=true
environment/buildEnvironmentLibrary/com.crt.advproject.config.exe.debug.305108713/appendContributed=true
/* ----------------------------------------------------------------------
* Project: CMSIS DSP Library
* Title: arm_common_tables.h
* Description: Extern declaration for common tables
*
* $Date: 27. January 2017
* $Revision: V.1.5.1
*
* Target Processor: Cortex-M cores
* -------------------------------------------------------------------- */
/*
* Copyright (C) 2010-2017 ARM Limited or its affiliates. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the License); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef _ARM_COMMON_TABLES_H
#define _ARM_COMMON_TABLES_H
#include "arm_math.h"
extern const uint16_t armBitRevTable[1024];
extern const q15_t armRecipTableQ15[64];
extern const q31_t armRecipTableQ31[64];
extern const float32_t twiddleCoef_16[32];
extern const float32_t twiddleCoef_32[64];
extern const float32_t twiddleCoef_64[128];
extern const float32_t twiddleCoef_128[256];
extern const float32_t twiddleCoef_256[512];
extern const float32_t twiddleCoef_512[1024];
extern const float32_t twiddleCoef_1024[2048];
extern const float32_t twiddleCoef_2048[4096];
extern const float32_t twiddleCoef_4096[8192];
#define twiddleCoef twiddleCoef_4096
extern const q31_t twiddleCoef_16_q31[24];
extern const q31_t twiddleCoef_32_q31[48];
extern const q31_t twiddleCoef_64_q31[96];
extern const q31_t twiddleCoef_128_q31[192];
extern const q31_t twiddleCoef_256_q31[384];
extern const q31_t twiddleCoef_512_q31[768];
extern const q31_t twiddleCoef_1024_q31[1536];
extern const q31_t twiddleCoef_2048_q31[3072];
extern const q31_t twiddleCoef_4096_q31[6144];
extern const q15_t twiddleCoef_16_q15[24];
extern const q15_t twiddleCoef_32_q15[48];
extern const q15_t twiddleCoef_64_q15[96];
extern const q15_t twiddleCoef_128_q15[192];
extern const q15_t twiddleCoef_256_q15[384];
extern const q15_t twiddleCoef_512_q15[768];
extern const q15_t twiddleCoef_1024_q15[1536];
extern const q15_t twiddleCoef_2048_q15[3072];
extern const q15_t twiddleCoef_4096_q15[6144];
extern const float32_t twiddleCoef_rfft_32[32];
extern const float32_t twiddleCoef_rfft_64[64];
extern const float32_t twiddleCoef_rfft_128[128];
extern const float32_t twiddleCoef_rfft_256[256];
extern const float32_t twiddleCoef_rfft_512[512];
extern const float32_t twiddleCoef_rfft_1024[1024];
extern const float32_t twiddleCoef_rfft_2048[2048];
extern const float32_t twiddleCoef_rfft_4096[4096];
/* floating-point bit reversal tables */
#define ARMBITREVINDEXTABLE_16_TABLE_LENGTH ((uint16_t)20)
#define ARMBITREVINDEXTABLE_32_TABLE_LENGTH ((uint16_t)48)
#define ARMBITREVINDEXTABLE_64_TABLE_LENGTH ((uint16_t)56)
#define ARMBITREVINDEXTABLE_128_TABLE_LENGTH ((uint16_t)208)
#define ARMBITREVINDEXTABLE_256_TABLE_LENGTH ((uint16_t)440)
#define ARMBITREVINDEXTABLE_512_TABLE_LENGTH ((uint16_t)448)
#define ARMBITREVINDEXTABLE_1024_TABLE_LENGTH ((uint16_t)1800)
#define ARMBITREVINDEXTABLE_2048_TABLE_LENGTH ((uint16_t)3808)
#define ARMBITREVINDEXTABLE_4096_TABLE_LENGTH ((uint16_t)4032)
extern const uint16_t armBitRevIndexTable16[ARMBITREVINDEXTABLE_16_TABLE_LENGTH];
extern const uint16_t armBitRevIndexTable32[ARMBITREVINDEXTABLE_32_TABLE_LENGTH];
extern const uint16_t armBitRevIndexTable64[ARMBITREVINDEXTABLE_64_TABLE_LENGTH];
extern const uint16_t armBitRevIndexTable128[ARMBITREVINDEXTABLE_128_TABLE_LENGTH];
extern const uint16_t armBitRevIndexTable256[ARMBITREVINDEXTABLE_256_TABLE_LENGTH];
extern const uint16_t armBitRevIndexTable512[ARMBITREVINDEXTABLE_512_TABLE_LENGTH];
extern const uint16_t armBitRevIndexTable1024[ARMBITREVINDEXTABLE_1024_TABLE_LENGTH];
extern const uint16_t armBitRevIndexTable2048[ARMBITREVINDEXTABLE_2048_TABLE_LENGTH];
extern const uint16_t armBitRevIndexTable4096[ARMBITREVINDEXTABLE_4096_TABLE_LENGTH];
/* fixed-point bit reversal tables */
#define ARMBITREVINDEXTABLE_FIXED_16_TABLE_LENGTH ((uint16_t)12)
#define ARMBITREVINDEXTABLE_FIXED_32_TABLE_LENGTH ((uint16_t)24)
#define ARMBITREVINDEXTABLE_FIXED_64_TABLE_LENGTH ((uint16_t)56)
#define ARMBITREVINDEXTABLE_FIXED_128_TABLE_LENGTH ((uint16_t)112)
#define ARMBITREVINDEXTABLE_FIXED_256_TABLE_LENGTH ((uint16_t)240)
#define ARMBITREVINDEXTABLE_FIXED_512_TABLE_LENGTH ((uint16_t)480)
#define ARMBITREVINDEXTABLE_FIXED_1024_TABLE_LENGTH ((uint16_t)992)
#define ARMBITREVINDEXTABLE_FIXED_2048_TABLE_LENGTH ((uint16_t)1984)
#define ARMBITREVINDEXTABLE_FIXED_4096_TABLE_LENGTH ((uint16_t)4032)
extern const uint16_t armBitRevIndexTable_fixed_16[ARMBITREVINDEXTABLE_FIXED_16_TABLE_LENGTH];
extern const uint16_t armBitRevIndexTable_fixed_32[ARMBITREVINDEXTABLE_FIXED_32_TABLE_LENGTH];
extern const uint16_t armBitRevIndexTable_fixed_64[ARMBITREVINDEXTABLE_FIXED_64_TABLE_LENGTH];
extern const uint16_t armBitRevIndexTable_fixed_128[ARMBITREVINDEXTABLE_FIXED_128_TABLE_LENGTH];
extern const uint16_t armBitRevIndexTable_fixed_256[ARMBITREVINDEXTABLE_FIXED_256_TABLE_LENGTH];
extern const uint16_t armBitRevIndexTable_fixed_512[ARMBITREVINDEXTABLE_FIXED_512_TABLE_LENGTH];
extern const uint16_t armBitRevIndexTable_fixed_1024[ARMBITREVINDEXTABLE_FIXED_1024_TABLE_LENGTH];
extern const uint16_t armBitRevIndexTable_fixed_2048[ARMBITREVINDEXTABLE_FIXED_2048_TABLE_LENGTH];
extern const uint16_t armBitRevIndexTable_fixed_4096[ARMBITREVINDEXTABLE_FIXED_4096_TABLE_LENGTH];
/* Tables for Fast Math Sine and Cosine */
extern const float32_t sinTable_f32[FAST_MATH_TABLE_SIZE + 1];
extern const q31_t sinTable_q31[FAST_MATH_TABLE_SIZE + 1];
extern const q15_t sinTable_q15[FAST_MATH_TABLE_SIZE + 1];
#endif /* ARM_COMMON_TABLES_H */
/* ----------------------------------------------------------------------
* Project: CMSIS DSP Library
* Title: arm_const_structs.h
* Description: Constant structs that are initialized for user convenience.
* For example, some can be given as arguments to the arm_cfft_f32() function.
*
* $Date: 27. January 2017
* $Revision: V.1.5.1
*
* Target Processor: Cortex-M cores
* -------------------------------------------------------------------- */
/*
* Copyright (C) 2010-2017 ARM Limited or its affiliates. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the License); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef _ARM_CONST_STRUCTS_H
#define _ARM_CONST_STRUCTS_H
#include "arm_math.h"
#include "arm_common_tables.h"
extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len16;
extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len32;
extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len64;
extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len128;
extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len256;
extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len512;
extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len1024;
extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len2048;
extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len4096;
extern const arm_cfft_instance_q31 arm_cfft_sR_q31_len16;
extern const arm_cfft_instance_q31 arm_cfft_sR_q31_len32;
extern const arm_cfft_instance_q31 arm_cfft_sR_q31_len64;
extern const arm_cfft_instance_q31 arm_cfft_sR_q31_len128;
extern const arm_cfft_instance_q31 arm_cfft_sR_q31_len256;
extern const arm_cfft_instance_q31 arm_cfft_sR_q31_len512;
extern const arm_cfft_instance_q31 arm_cfft_sR_q31_len1024;
extern const arm_cfft_instance_q31 arm_cfft_sR_q31_len2048;
extern const arm_cfft_instance_q31 arm_cfft_sR_q31_len4096;
extern const arm_cfft_instance_q15 arm_cfft_sR_q15_len16;
extern const arm_cfft_instance_q15 arm_cfft_sR_q15_len32;
extern const arm_cfft_instance_q15 arm_cfft_sR_q15_len64;
extern const arm_cfft_instance_q15 arm_cfft_sR_q15_len128;
extern const arm_cfft_instance_q15 arm_cfft_sR_q15_len256;
extern const arm_cfft_instance_q15 arm_cfft_sR_q15_len512;
extern const arm_cfft_instance_q15 arm_cfft_sR_q15_len1024;
extern const arm_cfft_instance_q15 arm_cfft_sR_q15_len2048;
extern const arm_cfft_instance_q15 arm_cfft_sR_q15_len4096;
#endif
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment