From 5443d6828eaf5cbc7dc4613d9d75b4c192d17730 Mon Sep 17 00:00:00 2001 From: Vincent Peyruqueou Date: Mon, 27 Mar 2023 11:43:54 +0200 Subject: Microsoft Visual Studio (2022) solution to test IVY (perf and test ready) --- .gitignore | 6 + tools/IvyPerf/IvyPerf.vcxproj | 159 ++++++++++++++++++++++ tools/IvyPerf/IvyPerf.vcxproj.filters | 30 +++++ tools/IvyTestReady/IvyTestReady.vcxproj | 171 ++++++++++++++++++++++++ tools/IvyTestReady/IvyTestReady.vcxproj.filters | 22 +++ tools/RunIvyPerf.bat | 6 + tools/RunIvyTestReady.bat | 6 + tools/Tools_IVY_C.sln | 41 ++++++ tools/ivyperf.c | 8 ++ tools/ivytestready.c | 30 ++++- 10 files changed, 472 insertions(+), 7 deletions(-) create mode 100644 tools/IvyPerf/IvyPerf.vcxproj create mode 100644 tools/IvyPerf/IvyPerf.vcxproj.filters create mode 100644 tools/IvyTestReady/IvyTestReady.vcxproj create mode 100644 tools/IvyTestReady/IvyTestReady.vcxproj.filters create mode 100644 tools/RunIvyPerf.bat create mode 100644 tools/RunIvyTestReady.bat create mode 100644 tools/Tools_IVY_C.sln diff --git a/.gitignore b/.gitignore index 668ca85..8fb349d 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,9 @@ src/Win32/ src/ivy_c.vcxproj.user .vs/ +tools/IvyPerf/IvyPerf.vcxproj.user +tools/IvyPerf/Win32/ +tools/IvyTestReady/IvyTestReady.vcxproj.user +tools/IvyTestReady/Win32/ +tools/IvyTestReady/x64/ +tools/Win32/ diff --git a/tools/IvyPerf/IvyPerf.vcxproj b/tools/IvyPerf/IvyPerf.vcxproj new file mode 100644 index 0000000..4fae423 --- /dev/null +++ b/tools/IvyPerf/IvyPerf.vcxproj @@ -0,0 +1,159 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 16.0 + Win32Proj + {ef4407ae-4f42-4316-959a-e93eabb81db5} + IvyPerf + 10.0 + + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + + + + + + + + + + + + + + + + + + + $(SolutionDir)$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + + + $(SolutionDir)$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + ..\..\src + + + Console + true + ivy.lib;%(AdditionalDependencies) + ..\..\$(Platform)\$(Configuration) + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + ..\..\src + + + Console + true + true + true + ivy.lib;%(AdditionalDependencies) + ..\..\$(Platform)\$(Configuration) + + + + + Level3 + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + ..\..\src + + + Console + true + ivy.lib;%(AdditionalDependencies) + ..\..\$(Platform)\$(Configuration) + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + ..\..\src + + + Console + true + true + true + ivy.lib;%(AdditionalDependencies) + ..\..\$(Platform)\$(Configuration) + + + + + + + + + + + + + \ No newline at end of file diff --git a/tools/IvyPerf/IvyPerf.vcxproj.filters b/tools/IvyPerf/IvyPerf.vcxproj.filters new file mode 100644 index 0000000..7b07197 --- /dev/null +++ b/tools/IvyPerf/IvyPerf.vcxproj.filters @@ -0,0 +1,30 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Fichiers sources + + + Fichiers sources + + + + + Fichiers d%27en-tête + + + \ No newline at end of file diff --git a/tools/IvyTestReady/IvyTestReady.vcxproj b/tools/IvyTestReady/IvyTestReady.vcxproj new file mode 100644 index 0000000..c2a9f4d --- /dev/null +++ b/tools/IvyTestReady/IvyTestReady.vcxproj @@ -0,0 +1,171 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 16.0 + Win32Proj + {faaca143-51e8-4aa6-a26d-d069d8d9645d} + IvyTestReady + 10.0 + + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + + + + + + + + + + + + + + + + + + + $(SolutionDir)$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + + + $(SolutionDir)$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + ..\..\src + + + Console + true + ..\..\$(Platform)\$(Configuration);%(AdditionalLibraryDirectories) + ivy.lib;%(AdditionalDependencies) + + + copy "..\..\$(Platform)\$(Configuration)\libpcre.dll" "$(OutDir)\libpcre.dll" +copy "..\..\$(Platform)\$(Configuration)\Ivy.dll" "$(OutDir)\Ivy.dll" + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + ..\..\src + + + Console + true + true + true + ..\..\$(Platform)\$(Configuration);%(AdditionalLibraryDirectories) + ivy.lib;%(AdditionalDependencies) + + + copy "..\..\$(Platform)\$(Configuration)\libpcre.dll" "$(OutDir)\libpcre.dll" +copy "..\..\$(Platform)\$(Configuration)\Ivy.dll" "$(OutDir)\Ivy.dll" + + + + + Level3 + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + ..\..\src + + + Console + true + ..\..\$(Platform)\$(Configuration);%(AdditionalLibraryDirectories) + ivy.lib;%(AdditionalDependencies) + + + copy "..\..\$(Platform)\$(Configuration)\libpcre.dll" "$(OutDir)\libpcre.dll" +copy "..\..\$(Platform)\$(Configuration)\Ivy.dll" "$(OutDir)\Ivy.dll" + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + ..\..\src + + + Console + true + true + true + ..\..\$(Platform)\$(Configuration);%(AdditionalLibraryDirectories) + ivy.lib;%(AdditionalDependencies) + + + copy "..\..\$(Platform)\$(Configuration)\libpcre.dll" "$(OutDir)\libpcre.dll" +copy "..\..\$(Platform)\$(Configuration)\Ivy.dll" "$(OutDir)\Ivy.dll" + + + + + + + + + \ No newline at end of file diff --git a/tools/IvyTestReady/IvyTestReady.vcxproj.filters b/tools/IvyTestReady/IvyTestReady.vcxproj.filters new file mode 100644 index 0000000..ff5bdc9 --- /dev/null +++ b/tools/IvyTestReady/IvyTestReady.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Fichiers sources + + + \ No newline at end of file diff --git a/tools/RunIvyPerf.bat b/tools/RunIvyPerf.bat new file mode 100644 index 0000000..aac8bce --- /dev/null +++ b/tools/RunIvyPerf.bat @@ -0,0 +1,6 @@ +@echo off +echo Starting Perf 1 +start Win32\Release\IvyPerf.exe 250 20 +echo Starting Perf 2 +start Win32\Release\IvyPerf.exe 250 20 +pause diff --git a/tools/RunIvyTestReady.bat b/tools/RunIvyTestReady.bat new file mode 100644 index 0000000..b908633 --- /dev/null +++ b/tools/RunIvyTestReady.bat @@ -0,0 +1,6 @@ +@echo off +echo Starting Application A +start Win32\Release\IvyTestReady.exe +echo Starting Application B +start Win32\Release\IvyTestReady.exe 0 +pause diff --git a/tools/Tools_IVY_C.sln b/tools/Tools_IVY_C.sln new file mode 100644 index 0000000..4feb09e --- /dev/null +++ b/tools/Tools_IVY_C.sln @@ -0,0 +1,41 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.5.33414.496 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "IvyPerf", "IvyPerf\IvyPerf.vcxproj", "{EF4407AE-4F42-4316-959A-E93EABB81DB5}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "IvyTestReady", "IvyTestReady\IvyTestReady.vcxproj", "{FAACA143-51E8-4AA6-A26D-D069D8D9645D}" +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 + {EF4407AE-4F42-4316-959A-E93EABB81DB5}.Debug|x64.ActiveCfg = Debug|x64 + {EF4407AE-4F42-4316-959A-E93EABB81DB5}.Debug|x64.Build.0 = Debug|x64 + {EF4407AE-4F42-4316-959A-E93EABB81DB5}.Debug|x86.ActiveCfg = Debug|Win32 + {EF4407AE-4F42-4316-959A-E93EABB81DB5}.Debug|x86.Build.0 = Debug|Win32 + {EF4407AE-4F42-4316-959A-E93EABB81DB5}.Release|x64.ActiveCfg = Release|x64 + {EF4407AE-4F42-4316-959A-E93EABB81DB5}.Release|x64.Build.0 = Release|x64 + {EF4407AE-4F42-4316-959A-E93EABB81DB5}.Release|x86.ActiveCfg = Release|Win32 + {EF4407AE-4F42-4316-959A-E93EABB81DB5}.Release|x86.Build.0 = Release|Win32 + {FAACA143-51E8-4AA6-A26D-D069D8D9645D}.Debug|x64.ActiveCfg = Debug|x64 + {FAACA143-51E8-4AA6-A26D-D069D8D9645D}.Debug|x64.Build.0 = Debug|x64 + {FAACA143-51E8-4AA6-A26D-D069D8D9645D}.Debug|x86.ActiveCfg = Debug|Win32 + {FAACA143-51E8-4AA6-A26D-D069D8D9645D}.Debug|x86.Build.0 = Debug|Win32 + {FAACA143-51E8-4AA6-A26D-D069D8D9645D}.Release|x64.ActiveCfg = Release|x64 + {FAACA143-51E8-4AA6-A26D-D069D8D9645D}.Release|x64.Build.0 = Release|x64 + {FAACA143-51E8-4AA6-A26D-D069D8D9645D}.Release|x86.ActiveCfg = Release|Win32 + {FAACA143-51E8-4AA6-A26D-D069D8D9645D}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {D547DA65-BF4B-403A-8C1F-4B46CB9C3812} + EndGlobalSection +EndGlobal diff --git a/tools/ivyperf.c b/tools/ivyperf.c index a7845f0..823f516 100644 --- a/tools/ivyperf.c +++ b/tools/ivyperf.c @@ -40,6 +40,11 @@ extern int optind; #include "ivyloop.h" #define MILLISEC 1000.0 +//const char* IVY_ADDR = "127.0.0.255"; +//const char* IVY_ADDR = "192.168.1.255"; +//const char* IVY_ADDR = "10.33.39.255"; +//const char* IVY_PORT = "2023"; + const char *mymessages[] = { "IvyPerf", "ping", "pong" }; static double origin = 0; int nbMsgReceive=0; @@ -123,11 +128,14 @@ void binCB( IvyClientPtr app, void *user_data, int id, const char* regexp, IvyB } } + int main(int argc, char *argv[]) { long time=200; int c; const char * bus = NULL; + //const char* bus = "192.168.1.255:2023"; + while ((c = getopt(argc, argv, "b:")) != EOF) switch (c) { case 'b': diff --git a/tools/ivytestready.c b/tools/ivytestready.c index 46fe1de..976754d 100755 --- a/tools/ivytestready.c +++ b/tools/ivytestready.c @@ -23,7 +23,7 @@ #include #endif #else -#include +#include #include #ifdef __INTERIX extern char *optarg; @@ -32,12 +32,16 @@ extern int optind; #endif -#include "ivysocket.h" #include "ivy.h" #include "timer.h" #include "ivyloop.h" #define MILLISEC 1000.0 +//const char* IVY_ADDR = "127.0.0.255"; +const char* IVY_ADDR = "192.168.1.255"; +//const char* IVY_ADDR = "10.33.39.255"; +const char* IVY_PORT = "2023"; + const char * me = "A"; const char * other = "B"; char ready_message[1000] = "A ready"; @@ -88,22 +92,29 @@ void binCB( IvyClientPtr app, void *user_data, int id, const char* regexp, IvyB - int main(int argc, char *argv[]) { /* Mainloop management */ if ( argc > 1 ) { - me = "B" ; + me = "B"; other = "A"; - strcpy( ready_message, "B ready"); - strcpy( ready_bind, "^A ready"); +#ifdef WIN32 + strcpy_s( ready_message, sizeof(ready_message), "B ready"); + strcpy_s( ready_bind, sizeof(ready_bind), "^A ready"); +#else + strcpy(ready_message, "B ready"); + strcpy(ready_bind, "^A ready"); +#endif } IvyInit (me, ready_message, NULL,NULL,NULL,NULL); IvySetBindCallback( binCB, 0 ); +#ifdef WIN32 + IvyBindMsg(Ready, NULL, ready_bind); +#else #if defined(__GNUC__) && __GNUC_PREREQ(4,7) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wformat-security" @@ -112,12 +123,17 @@ int main(int argc, char *argv[]) #if defined(__GNUC__) && __GNUC_PREREQ(4,7) #pragma GCC diagnostic pop #endif +#endif IvyBindMsg (Question, NULL, "^are you there %s",me); IvyBindMsg (Reply, NULL, "^(yes i am %s)",other); - IvyStart (0); + //IvyStart (NULL); + char domain[30]; + snprintf(domain, sizeof(domain), "%s:%s", IVY_ADDR, IVY_PORT); + + IvyStart (domain); IvyMainLoop (); return 0; -- cgit v1.1