summaryrefslogtreecommitdiffstats
path: root/Kod/display/ClientServerApp/matlabClient
diff options
context:
space:
mode:
Diffstat (limited to 'Kod/display/ClientServerApp/matlabClient')
-rw-r--r--Kod/display/ClientServerApp/matlabClient/matlabClient.cpp400
-rw-r--r--Kod/display/ClientServerApp/matlabClient/matlabClient.vcproj178
-rw-r--r--Kod/display/ClientServerApp/matlabClient/matlabClient.vcxproj158
-rw-r--r--Kod/display/ClientServerApp/matlabClient/stdafx.cpp8
-rw-r--r--Kod/display/ClientServerApp/matlabClient/stdafx.h15
-rw-r--r--Kod/display/ClientServerApp/matlabClient/targetver.h13
6 files changed, 772 insertions, 0 deletions
diff --git a/Kod/display/ClientServerApp/matlabClient/matlabClient.cpp b/Kod/display/ClientServerApp/matlabClient/matlabClient.cpp
new file mode 100644
index 0000000..8f811b9
--- /dev/null
+++ b/Kod/display/ClientServerApp/matlabClient/matlabClient.cpp
@@ -0,0 +1,400 @@
+//============================================================================
+// Name : matlabClient.cpp
+// Author : Erik Hellström, hellstrom@isy.liu.se, 2008-12-14
+// Modified : Emil Larsson, lime@isy.liu.se, 2012-01-13
+// Modified : Emil Larsson, lime@isy.liu.se, 2012-09-04
+// Data from LCD is written to the shared memory. By request, the
+// data is copied to a local Matlab variable.
+//
+// Description : The client requests data to be sent by the server.
+//
+//============================================================================
+
+
+#include <stdio.h>
+#include <string>
+#include "ComConduit.h"
+//#ifdef _CHAR16T
+//#define CHAR16_T
+//#endif
+#include "mex.h"
+
+int send_communication(bool doShutdown,wchar_t* input_string,int buflen,int flag){
+ // Conduit object
+ ComConduit Link;
+ // Key
+ KeyType key[KEY_LEN] = COM_KEY;
+ // Work variables
+ wchar_t data[COMSTR_LEN];
+ wchar_t dataFromLCD[COMSTR_LEN];
+ WaitResult wr;
+
+ int retval, ii;
+
+
+ // Initialize data
+ retval = 0;
+ data[0] = '\0';
+
+ // strcpy((char*) data,input_string);
+ // wcscpy_s(&data[0],COMSTR_LEN, input_string);
+
+ /* Copy data from input_string to data */
+ for (ii=0; ii<input_string[1]+3; ii++)
+ {
+ data[ii] = input_string[ii];
+ // mexPrintf("\ndata[%d]: %d \n", ii, *((unsigned char*) &data[ii]));
+ }
+
+ /* Stop with a "null" char */
+ data[ii] = '\0';
+
+
+
+ /* Start client */
+ if(!Link.StartClient(key)) {
+ mexPrintf("StartClient() failed.\n");
+ retval = 1;
+ return retval;
+ }
+
+ if(doShutdown) {
+ mexPrintf("Shutdown requested!!.\n");
+ // Request shutdown
+ if(!Link.CauseShutdown()) {
+ mexPrintf("\nCauseShutdown() failed.\n");
+ retval = 1;
+ return retval;
+ }
+ }
+ else if (flag == 2){
+
+ /* Get data from shared memory */
+ if(!Link.GetData(dataFromLCD)) {
+ mexPrintf("GetData() failed.\n");
+ retval = 1;
+ }
+
+ /* Length of Buffer */
+ int lenBuf = (int) dataFromLCD[1];
+
+ for (ii=0; ii < lenBuf+3; ii++){
+ /* Copy data from temporary string */
+ input_string[ii] = dataFromLCD[ii];
+ // mexPrintf("\ndataFromLCD[%d]: %d \n", ii, input_string[ii]);
+
+ };
+ }
+ else {
+ do {
+ // Check if server is ready
+ wr = Link.WaitForEvent(COM_READY,0);
+ if(wr != WAIT_OK) {
+ mexPrintf("Server is not ready. Start the server application.\n");
+ retval = 2;
+ break;
+ }
+
+ // Set data in shm
+ if(!Link.SetData(data)) {
+ mexPrintf("SetData() failed.\n");
+ retval = 1;
+ break;
+ }
+
+
+ // Request that the server send the data
+ if(!Link.CauseEvent(COM_REQUEST)) {
+ mexPrintf("CauseEvent() failed.\n");
+ retval = 1;
+ break;
+ }
+ } while(false);
+ }
+
+ //
+ // Shutdown
+ //
+ if(!Link.Shutdown()) {
+ mexPrintf("Shutdown() failed.\n");
+ retval = 1;
+ }
+ return retval;
+}
+
+
+void mexFunction( int nlhs,mxArray* plhs[],int nrhs, const mxArray* prhs[] )
+{
+ /* Version */
+ const double ver = 1.00;
+ const char date[] = "9 November 2012";
+
+ /* Initialize data */
+ bool doShutdown;
+ int retval;
+ mwSize ii, nx, mx, n;
+ doShutdown = false;
+ retval = 0;
+
+ wchar_t x_short_w[COMSTR_LEN];
+
+ /* checksum */
+ unsigned char bcc=0;
+
+ /* pointer to input string */
+// double dummy;
+ double *prtData;
+
+ /* Save in Shared memory */
+ int saveInSHM = 1;
+
+ /* Input flag: 1 = send to display, 2 = receive from display, 3 = shutdown */
+ int flag = 10;
+ if (nrhs > 0){
+ flag = (int)*mxGetPr(prhs[0]);
+ };
+
+ plhs[1] = mxCreateDoubleMatrix(0,0,mxREAL);
+ // ptr_out = mxGetPr(plhs[1]);
+
+ //if( (nrhs < 4) && (nrhs > 0)){
+ // flag = (int)*mxGetPr(prhs[0]);
+ //};
+
+
+
+ if(flag==3){
+ /* If no error, call send_communication */
+ doShutdown = true;
+ }
+
+ /* Do some checks of input arguments */
+ if (nrhs > 0){
+ if (!mxIsDouble(prhs[0])) {
+ mexPrintf("\nThe first input argument is not a double.\n");
+ retval = 1;
+ }
+ else if (flag==4) {
+ mexPrintf("\nMatlab Client\n");
+ mexPrintf("=============\n");
+ mexPrintf("Version: %4.2f.\n", ver);
+ mexPrintf("Date: %s.\n", date);
+ retval = 4;
+ }
+ else if (!(mxGetN(prhs[0]) == 1) || !(mxGetM(prhs[0]) == 1)) {
+ mexPrintf("\nThe first input argument is not a scalar.\n");
+ retval = 1;
+ }
+ else if (!(flag == 1 || flag == 2 || flag == 3)) {
+ mexPrintf("\nWrong numerical value of the first argument.\n");
+ retval = 1;
+ }
+ else if (flag == 1 && nrhs < 2) {
+ mexPrintf("\nTo few input arguments.\n");
+ retval = 1;
+ }
+ }
+ else{
+ mexPrintf("\nTo few input arguments\n");
+ retval = 1;
+ }
+
+ if (nrhs > 1){
+ if (!(flag == 1) || !mxIsDouble(prhs[1])) {
+ mexPrintf("\nFirst and second argument mismatch.\n");
+ flag = 1;
+ retval = 1;
+ }
+ // if (!mxIsDouble(prhs[1])) {
+ // retval = 1;
+ // mexPrintf("The second argument is not a double vector.\n");
+ // }
+ }
+
+ if (nrhs > 2){
+ mexPrintf("\nTo many input arguments\n");
+ retval = 1;
+ }
+
+
+ /* Save output argument */
+ if ((retval == 1) || (retval == 4)){
+ plhs[0] = mxCreateDoubleMatrix(1,1, mxREAL);
+ *(mxGetPr(plhs[0])) = retval;
+ }
+
+
+
+ if ((nrhs > 0) && (retval == 0)){
+ /* Get the length of the input string. */
+ // buflen = (mxGetM(prhs[0]) * mxGetN(prhs[0])) + 1;
+
+ // mexPrintf("\nbuflen: %d \n", buflen);
+
+
+ /* Allocate memory for input and output strings. */
+ // input_buf=(char *) mxCalloc(buflen, sizeof(char));
+ // external_buf=(wchar_t *) mxCalloc(buflen+1, sizeof(wchar_t));
+
+ /* Copy the string data from prhs[0] into a C string
+ * input_buf. */
+ // status = mxGetString(prhs[0], input_buf, buflen);
+
+ // if (status != 0)
+ // mexWarnMsgTxt("Not enough space. String will be truncated.");
+
+
+ // unsigned char *start_of_pr;
+ // size_t bytes_to_copy;
+
+
+ /* get the length of the input vector and pointer to data*/
+ if (nrhs > 1) {
+ nx = mxGetN(prhs[1]);
+ mx = mxGetM(prhs[1]);
+ prtData = mxGetPr(prhs[1]);
+ }
+ else {
+ nx = 1;
+ mx = 1;
+ prtData = mxGetPr(prhs[0]);
+ }
+
+
+ /* check if the argument is a row or col vector */
+ if (nx > mx)
+ n = nx;
+ else
+ n = mx;
+
+
+ /* Check length of buffer */
+ if ((n > COMSTR_LEN) && (retval == 0) && (nrhs > 1)){
+ mexPrintf("\nToo long data package.\n");
+ retval = 1;
+ }
+ else if ((n < 4) && (retval == 0) && (nrhs > 1)) {
+ mexPrintf("\nToo short data package.\n");
+ retval = 1;
+ }
+
+ /* Check length of data package */
+ if ((int) prtData[1] != n-3 && (nrhs > 1)) {
+ mexPrintf("\nIncorrect data package.\n");
+ retval = 1;
+ }
+ /* Check if the package starts with DC1 or DC2 */
+ else if (((int) prtData[0] != 17) && ((int) prtData[0] != 18) && (nrhs > 1)) {
+ mexPrintf("\nIncorrect data package.\n");
+// mexPrintf("\nIncorrect data package. %d\n", (int) prtData[0]);
+ retval = 1;
+ }
+
+ /* Copy the double input vector to a wchar_t-string */
+ unsigned short int x_short[COMSTR_LEN];
+ ii = 0;
+ for (ii=0; ii < n; ii++)
+ {
+ x_short[ii] = (unsigned short int) prtData[ii];
+
+ /* Calculate checksum bcc */
+ if (ii < n-1)
+ bcc = bcc + x_short[ii];
+
+ /* Check if the element is too large */
+ if((x_short[ii] > 255) && (retval == 0)) {
+ mexPrintf("Vector element %d is larger then 255.\n", ii+1);
+ retval = 1;
+ break;
+ }
+
+ /* Copy each element */
+ x_short_w[ii] = (wchar_t) x_short[ii];
+ // mexPrintf("\nx_short[%d]: %d \n", ii, x_short[ii]);
+
+ }
+ /* Stop with a "null" char */
+ x_short_w[ii] = (wchar_t) '\0';
+
+ /* Compare the checksum bcc with the last element */
+ if ((x_short[n-1] != bcc) && (retval == 0) && (nrhs > 1)) {
+ mexPrintf("\nIncorrect data package.\n");
+ // mexPrintf("\nChecksum %d mismatch. \n", x_short[n-1]);
+ //printf("\nChecksum %d mismatch. \n", x_short[n-1]);
+ retval = 1;
+ }
+
+ /* If no error, call send_communication */
+ if (retval == 0){
+ retval = send_communication(doShutdown,x_short_w,n,flag);
+ }
+
+ /* Save output argument */
+ plhs[0] = mxCreateDoubleMatrix(1,1, mxREAL);
+ *(mxGetPr(plhs[0])) = retval;
+
+ /* Receive data from shared memory */
+ if (flag == 2){
+
+ /* Length of Buffer */
+ int lenBuf = (int) x_short_w[1];
+
+ //mexPrintf("\nHere: lenBuf %d: \n", lenBuf);
+
+ /* Save in Shared memory */
+ // int saveInSHM = 1;
+
+ if ((x_short_w[1] == 1) && (x_short_w[2])){
+ saveInSHM = 1;
+ }
+ else if ((x_short_w[1] == 1) && (x_short_w[2] == 21)){
+ saveInSHM = 1;
+ }
+ else {
+ /* calculate checksum */
+ bcc = 0;
+ for (ii=3; ii < (mwSize) x_short_w[4]+5; ii++){
+
+ /* Calculate checksum bcc */
+ bcc = bcc + x_short_w[ii];
+ }
+// mexPrintf("\nHere: Checksum bcc %d: \n", bcc);
+
+ /* Compare the checksum bcc with the last element */
+ if (x_short_w[ii] != bcc){
+// mexPrintf("\nHere: Checksum %d mismatch. \n", x_short_w[lenBuf+1]);
+ retval = 1;
+
+ saveInSHM = 0;
+ }
+ else {
+ saveInSHM = 1;
+ }
+ }
+
+
+
+ if (saveInSHM == 1){
+
+ /* Save output argument */
+ double *ptr_out;
+ plhs[1] = mxCreateDoubleMatrix(1,lenBuf,mxREAL);
+ ptr_out = mxGetPr(plhs[1]);
+
+ for (ii=2; ii < (mwSize) lenBuf+2; ii++){
+ ptr_out[ii-2] = (double) x_short_w[ii];
+ // mexPrintf("\nx_short_w[%d]: %f \n", ii, ptr_out[ii-1]);
+ }
+ }
+ }
+
+ }
+
+}
+
+
+
+
+
+
+
diff --git a/Kod/display/ClientServerApp/matlabClient/matlabClient.vcproj b/Kod/display/ClientServerApp/matlabClient/matlabClient.vcproj
new file mode 100644
index 0000000..336b1f0
--- /dev/null
+++ b/Kod/display/ClientServerApp/matlabClient/matlabClient.vcproj
@@ -0,0 +1,178 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="matlabClient"
+ ProjectGUID="{3094F281-B0A8-4B46-B1CC-A4B8B5CC596A}"
+ RootNamespace="matlabClient"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="196613"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="4"
+ CharacterSet="0"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="&quot;C:\Program Files (x86)\MATLAB\R2009b\extern\include&quot;;&quot;C:\Users\Emil\Documents\Visual Studio 2008\Projects\ClientServerApp\Common&quot;"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ EnableIntrinsicFunctions="true"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\matlabClient.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/Kod/display/ClientServerApp/matlabClient/matlabClient.vcxproj b/Kod/display/ClientServerApp/matlabClient/matlabClient.vcxproj
new file mode 100644
index 0000000..715e944
--- /dev/null
+++ b/Kod/display/ClientServerApp/matlabClient/matlabClient.vcxproj
@@ -0,0 +1,158 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.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="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{3094F281-B0A8-4B46-B1CC-A4B8B5CC596A}</ProjectGuid>
+ <RootNamespace>matlabClient</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <CharacterSet>NotSet</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <CharacterSet>NotSet</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Configuration)\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>C:\Program Files %28x86%29\MATLAB\R2011b\extern\include;C:\stuff\svn\TFYY51\Code\Display\ClientServerApp\Common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>C:\Program Files %28x86%29\MATLAB\R2011b\extern\include;C:\stuff\svn\TFYY51\Code\Display\ClientServerApp\Common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <AdditionalIncludeDirectories>C:\Program Files %28x86%29\MATLAB\R2011b\extern\include;..\Common</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <TargetMachine>MachineX86</TargetMachine>
+ <AdditionalLibraryDirectories>C:\Program Files %28x86%29\MATLAB\R2011b\extern\include;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>libmx.lib;libmex.lib;libmat.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <AdditionalIncludeDirectories>C:\Program Files\MATLAB\R2011b\extern\include;..\Common</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <AdditionalLibraryDirectories>C:\Program Files %28x86%29\MATLAB\R2011b\extern\include;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>libmx.lib;libmex.lib;libmat.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="matlabClient.cpp" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\Common\Common.vcxproj">
+ <Project>{8c1e78f5-0564-498a-958d-37a997bbfe49}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/Kod/display/ClientServerApp/matlabClient/stdafx.cpp b/Kod/display/ClientServerApp/matlabClient/stdafx.cpp
new file mode 100644
index 0000000..1d98a62
--- /dev/null
+++ b/Kod/display/ClientServerApp/matlabClient/stdafx.cpp
@@ -0,0 +1,8 @@
+// stdafx.cpp : source file that includes just the standard includes
+// matlabClient.pch will be the pre-compiled header
+// stdafx.obj will contain the pre-compiled type information
+
+#include "stdafx.h"
+
+// TODO: reference any additional headers you need in STDAFX.H
+// and not in this file
diff --git a/Kod/display/ClientServerApp/matlabClient/stdafx.h b/Kod/display/ClientServerApp/matlabClient/stdafx.h
new file mode 100644
index 0000000..47a0d02
--- /dev/null
+++ b/Kod/display/ClientServerApp/matlabClient/stdafx.h
@@ -0,0 +1,15 @@
+// stdafx.h : include file for standard system include files,
+// or project specific include files that are used frequently, but
+// are changed infrequently
+//
+
+#pragma once
+
+#include "targetver.h"
+
+#include <stdio.h>
+#include <tchar.h>
+
+
+
+// TODO: reference additional headers your program requires here
diff --git a/Kod/display/ClientServerApp/matlabClient/targetver.h b/Kod/display/ClientServerApp/matlabClient/targetver.h
new file mode 100644
index 0000000..a38195a
--- /dev/null
+++ b/Kod/display/ClientServerApp/matlabClient/targetver.h
@@ -0,0 +1,13 @@
+#pragma once
+
+// The following macros define the minimum required platform. The minimum required platform
+// is the earliest version of Windows, Internet Explorer etc. that has the necessary features to run
+// your application. The macros work by enabling all features available on platform versions up to and
+// including the version specified.
+
+// Modify the following defines if you have to target a platform prior to the ones specified below.
+// Refer to MSDN for the latest info on corresponding values for different platforms.
+#ifndef _WIN32_WINNT // Specifies that the minimum required platform is Windows Vista.
+#define _WIN32_WINNT 0x0600 // Change this to the appropriate value to target other versions of Windows.
+#endif
+