김현우

changed sender

No preview for this file type
 constellation_main.cpp
myMatrix.cpp
c:\users\현우\desktop\0509_team2\constellation\constellation\mymatrix.cpp(29): warning C4101: 'temp' :참조되지 않은 지역 변수입니다.
sender.cpp
c:\users\현우\desktop\0509_team2\constellation\constellation\sender.cpp(7): error C2084: 'Csender::Csender(void)' 함수에 이미 본문이 있습니다.
c:\users\현우\desktop\0509_team2\constellation\constellation\sender.h(7): note: '{ctor}'의 이전 정의를 참조하십시오.
c:\users\현우\desktop\0509_team2\constellation\constellation\sender.cpp(8): warning C4552: '+': 의미 없는 연산자입니다. 파생 작업이 있는 연산자여야 합니다.
c:\users\현우\desktop\0509_team2\constellation\constellation\sender.cpp(10): warning C4244: '=': 'int'에서 'float'(으)로 변환하면서 데이터가 손실될 수 있습니다.
c:\users\현우\desktop\0509_team2\constellation\constellation\sender.cpp(15): error C2059: 구문 오류: ')'
c:\users\현우\desktop\0509_team2\constellation\constellation\sender.cpp(15): error C2143: 구문 오류: ';'이(가) '{' 앞에 없습니다.
c:\users\현우\desktop\0509_team2\constellation\constellation\sender.cpp(15): error C2447: '{': 함수 헤더가 없습니다. 이전 스타일의 형식 목록입니까?
코드를 생성하고 있습니다...
#TargetFrameworkVersion=v4.0:PlatformToolSet=v141:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit:WindowsTargetPlatformVersion=10.0.16299.0
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
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
......@@ -21,32 +21,32 @@
<PropertyGroup Label="Globals">
<ProjectGuid>{6FF25C27-45BF-4502-A1F8-0EFB069E1515}</ProjectGuid>
<RootNamespace>constellation</RootNamespace>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0.16299.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>v140</PlatformToolset>
<PlatformToolset>v141</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v141</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v141</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v141</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
......@@ -112,6 +112,9 @@
<ItemGroup>
<ClCompile Include="constellation_main.cpp" />
<ClCompile Include="myMatrix.cpp" />
<ClCompile Include="sender.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="channel.h" />
......
......@@ -21,6 +21,9 @@
<ClCompile Include="myMatrix.cpp">
<Filter>소스 파일</Filter>
</ClCompile>
<ClCompile Include="sender.cpp">
<Filter>소스 파일</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="sender.h">
......
<?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
#include "sender.h"
#include <iostream>
#include <ctime>
#define PI 3.14159
using namespace std;
Csender::Csender() {
srand((unsigned int)time(NULL));
for (int i = 0; i < 1000; i++)
{
data[i] = rand() % 2;
}
}
float s[Nbits / Nbitspersymbol * Nsamplespersymbol]; // trasmitted signal
void Csender::transmitData()
{
float c0[20];
float c1[20];
for (int i = 0; i < 20; i++)
{
for (float t = 0; t < 1 / Nsamplespersymbol; t+0.05)
{
c0[(int)t] = sqrt(2 * Nsamplespersymbol)*cos(2 * PI*Nsamplespersymbol*t);
}
}
for (int i = 0; i < 20; i++)
{
for (float t = 0; t < 1 / Nsamplespersymbol; t + 0.05)
{
c1[(int)t] = sqrt(2 * Nsamplespersymbol)*sin(2 * PI*Nsamplespersymbol*t);
}
}
float A = 10;
for (int i = 0; i < 1000; i + 2)
{
if (data[i] == '0' && data[i + 1] == '0')
{
for (int k = 0; k < 20; k++)
{
s[20*i+k] = A * c0[k] + A * c1[k];
}
}
else if (data[i] == '0' && data[i + 1] == '1')
{
for (int k = 0; k < 20; k++)
{
s[20 * i +k] = A * c0[k] - A * c1[k];
}
}
else if (data[i] == '1' && data[i + 1] == '0')
{
for (int k = 0; k < 20; k++)
{
s[20 * i +k] = -1*A * c0[k] + A * c1[k];
}
}
else if (data[i] == '1' && data[i + 1] == '1')
{
for (int k = 0; k < 20; k++)
{
s[20 * i +k] = -1*A * c0[k] + -1*A * c1[k];
}
}
}
};
\ No newline at end of file