김현우

changed sender

No preview for this file type
1 + constellation_main.cpp
2 + myMatrix.cpp
3 +c:\users\현우\desktop\0509_team2\constellation\constellation\mymatrix.cpp(29): warning C4101: 'temp' :참조되지 않은 지역 변수입니다.
4 + sender.cpp
5 +c:\users\현우\desktop\0509_team2\constellation\constellation\sender.cpp(7): error C2084: 'Csender::Csender(void)' 함수에 이미 본문이 있습니다.
6 + c:\users\현우\desktop\0509_team2\constellation\constellation\sender.h(7): note: '{ctor}'의 이전 정의를 참조하십시오.
7 +c:\users\현우\desktop\0509_team2\constellation\constellation\sender.cpp(8): warning C4552: '+': 의미 없는 연산자입니다. 파생 작업이 있는 연산자여야 합니다.
8 +c:\users\현우\desktop\0509_team2\constellation\constellation\sender.cpp(10): warning C4244: '=': 'int'에서 'float'(으)로 변환하면서 데이터가 손실될 수 있습니다.
9 +c:\users\현우\desktop\0509_team2\constellation\constellation\sender.cpp(15): error C2059: 구문 오류: ')'
10 +c:\users\현우\desktop\0509_team2\constellation\constellation\sender.cpp(15): error C2143: 구문 오류: ';'이(가) '{' 앞에 없습니다.
11 +c:\users\현우\desktop\0509_team2\constellation\constellation\sender.cpp(15): error C2447: '{': 함수 헤더가 없습니다. 이전 스타일의 형식 목록입니까?
12 + 코드를 생성하고 있습니다...
1 +#TargetFrameworkVersion=v4.0:PlatformToolSet=v141:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit:WindowsTargetPlatformVersion=10.0.16299.0
2 +Debug|Win32|C:\Users\현우\Desktop\0509_team2\constellation\|
No preview for this file type
No preview for this file type
No preview for this file type
1 <?xml version="1.0" encoding="utf-8"?> 1 <?xml version="1.0" encoding="utf-8"?>
2 -<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> 2 +<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3 <ItemGroup Label="ProjectConfigurations"> 3 <ItemGroup Label="ProjectConfigurations">
4 <ProjectConfiguration Include="Debug|Win32"> 4 <ProjectConfiguration Include="Debug|Win32">
5 <Configuration>Debug</Configuration> 5 <Configuration>Debug</Configuration>
...@@ -21,32 +21,32 @@ ...@@ -21,32 +21,32 @@
21 <PropertyGroup Label="Globals"> 21 <PropertyGroup Label="Globals">
22 <ProjectGuid>{6FF25C27-45BF-4502-A1F8-0EFB069E1515}</ProjectGuid> 22 <ProjectGuid>{6FF25C27-45BF-4502-A1F8-0EFB069E1515}</ProjectGuid>
23 <RootNamespace>constellation</RootNamespace> 23 <RootNamespace>constellation</RootNamespace>
24 - <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion> 24 + <WindowsTargetPlatformVersion>10.0.16299.0</WindowsTargetPlatformVersion>
25 </PropertyGroup> 25 </PropertyGroup>
26 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> 26 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
27 <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> 27 <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
28 <ConfigurationType>Application</ConfigurationType> 28 <ConfigurationType>Application</ConfigurationType>
29 <UseDebugLibraries>true</UseDebugLibraries> 29 <UseDebugLibraries>true</UseDebugLibraries>
30 - <PlatformToolset>v140</PlatformToolset> 30 + <PlatformToolset>v141</PlatformToolset>
31 <CharacterSet>MultiByte</CharacterSet> 31 <CharacterSet>MultiByte</CharacterSet>
32 </PropertyGroup> 32 </PropertyGroup>
33 <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> 33 <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
34 <ConfigurationType>Application</ConfigurationType> 34 <ConfigurationType>Application</ConfigurationType>
35 <UseDebugLibraries>false</UseDebugLibraries> 35 <UseDebugLibraries>false</UseDebugLibraries>
36 - <PlatformToolset>v140</PlatformToolset> 36 + <PlatformToolset>v141</PlatformToolset>
37 <WholeProgramOptimization>true</WholeProgramOptimization> 37 <WholeProgramOptimization>true</WholeProgramOptimization>
38 <CharacterSet>MultiByte</CharacterSet> 38 <CharacterSet>MultiByte</CharacterSet>
39 </PropertyGroup> 39 </PropertyGroup>
40 <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> 40 <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
41 <ConfigurationType>Application</ConfigurationType> 41 <ConfigurationType>Application</ConfigurationType>
42 <UseDebugLibraries>true</UseDebugLibraries> 42 <UseDebugLibraries>true</UseDebugLibraries>
43 - <PlatformToolset>v140</PlatformToolset> 43 + <PlatformToolset>v141</PlatformToolset>
44 <CharacterSet>MultiByte</CharacterSet> 44 <CharacterSet>MultiByte</CharacterSet>
45 </PropertyGroup> 45 </PropertyGroup>
46 <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> 46 <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
47 <ConfigurationType>Application</ConfigurationType> 47 <ConfigurationType>Application</ConfigurationType>
48 <UseDebugLibraries>false</UseDebugLibraries> 48 <UseDebugLibraries>false</UseDebugLibraries>
49 - <PlatformToolset>v140</PlatformToolset> 49 + <PlatformToolset>v141</PlatformToolset>
50 <WholeProgramOptimization>true</WholeProgramOptimization> 50 <WholeProgramOptimization>true</WholeProgramOptimization>
51 <CharacterSet>MultiByte</CharacterSet> 51 <CharacterSet>MultiByte</CharacterSet>
52 </PropertyGroup> 52 </PropertyGroup>
...@@ -112,6 +112,9 @@ ...@@ -112,6 +112,9 @@
112 <ItemGroup> 112 <ItemGroup>
113 <ClCompile Include="constellation_main.cpp" /> 113 <ClCompile Include="constellation_main.cpp" />
114 <ClCompile Include="myMatrix.cpp" /> 114 <ClCompile Include="myMatrix.cpp" />
115 + <ClCompile Include="sender.cpp">
116 + <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
117 + </ClCompile>
115 </ItemGroup> 118 </ItemGroup>
116 <ItemGroup> 119 <ItemGroup>
117 <ClInclude Include="channel.h" /> 120 <ClInclude Include="channel.h" />
......
...@@ -21,6 +21,9 @@ ...@@ -21,6 +21,9 @@
21 <ClCompile Include="myMatrix.cpp"> 21 <ClCompile Include="myMatrix.cpp">
22 <Filter>소스 파일</Filter> 22 <Filter>소스 파일</Filter>
23 </ClCompile> 23 </ClCompile>
24 + <ClCompile Include="sender.cpp">
25 + <Filter>소스 파일</Filter>
26 + </ClCompile>
24 </ItemGroup> 27 </ItemGroup>
25 <ItemGroup> 28 <ItemGroup>
26 <ClInclude Include="sender.h"> 29 <ClInclude Include="sender.h">
......
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3 + <PropertyGroup />
4 +</Project>
...\ No newline at end of file ...\ No newline at end of file
1 +#include "sender.h"
2 +#include <iostream>
3 +#include <ctime>
4 +
5 +#define PI 3.14159
6 +using namespace std;
7 +
8 +Csender::Csender() {
9 + srand((unsigned int)time(NULL));
10 + for (int i = 0; i < 1000; i++)
11 + {
12 + data[i] = rand() % 2;
13 + }
14 +
15 +
16 +}
17 +
18 +float s[Nbits / Nbitspersymbol * Nsamplespersymbol]; // trasmitted signal
19 +void Csender::transmitData()
20 +{
21 + float c0[20];
22 + float c1[20];
23 + for (int i = 0; i < 20; i++)
24 + {
25 + for (float t = 0; t < 1 / Nsamplespersymbol; t+0.05)
26 + {
27 + c0[(int)t] = sqrt(2 * Nsamplespersymbol)*cos(2 * PI*Nsamplespersymbol*t);
28 + }
29 + }
30 +
31 + for (int i = 0; i < 20; i++)
32 + {
33 + for (float t = 0; t < 1 / Nsamplespersymbol; t + 0.05)
34 + {
35 + c1[(int)t] = sqrt(2 * Nsamplespersymbol)*sin(2 * PI*Nsamplespersymbol*t);
36 + }
37 + }
38 +
39 + float A = 10;
40 + for (int i = 0; i < 1000; i + 2)
41 + {
42 + if (data[i] == '0' && data[i + 1] == '0')
43 + {
44 + for (int k = 0; k < 20; k++)
45 + {
46 + s[20*i+k] = A * c0[k] + A * c1[k];
47 + }
48 + }
49 + else if (data[i] == '0' && data[i + 1] == '1')
50 + {
51 + for (int k = 0; k < 20; k++)
52 + {
53 + s[20 * i +k] = A * c0[k] - A * c1[k];
54 + }
55 + }
56 + else if (data[i] == '1' && data[i + 1] == '0')
57 + {
58 + for (int k = 0; k < 20; k++)
59 + {
60 + s[20 * i +k] = -1*A * c0[k] + A * c1[k];
61 + }
62 + }
63 + else if (data[i] == '1' && data[i + 1] == '1')
64 + {
65 + for (int k = 0; k < 20; k++)
66 + {
67 + s[20 * i +k] = -1*A * c0[k] + -1*A * c1[k];
68 + }
69 + }
70 +
71 + }
72 +};
...\ No newline at end of file ...\ No newline at end of file