summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Cemin <david.cemin@coveloz.com>2016-01-22 14:20:31 -0500
committerDavid Cemin <david.cemin@coveloz.com>2016-01-22 14:20:31 -0500
commit6c6cad5579458c48e071a672f668fd63c25138f2 (patch)
tree4edf7f87e6cb02c775c4c66a2b5a9648c45a05b5
parent822937670c6c8987bef08bdcca5f031e64d0a09e (diff)
parent548082b6ec87931951dab27b3b75ed50fcbf092c (diff)
downloadOpen-AVB-6c6cad5579458c48e071a672f668fd63c25138f2.tar.gz
Merge remote-tracking branch 'upstream/feature-gptp-next' into task-gptpv3
Conflicts: daemons/gptp/common/ptp_message.cpp
-rw-r--r--daemons/gptp/CMakeLists.txt28
-rw-r--r--daemons/gptp/README.rst19
-rw-r--r--daemons/gptp/common/avbts_clock.hpp2
-rw-r--r--daemons/gptp/common/avbts_port.hpp4
-rw-r--r--daemons/gptp/common/gptp_cfg.cpp6
-rw-r--r--daemons/gptp/common/ieee1588clock.cpp12
-rw-r--r--daemons/gptp/common/ieee1588port.cpp21
-rw-r--r--daemons/gptp/common/ipcdef.hpp3
-rw-r--r--daemons/gptp/common/ptp_message.cpp36
-rw-r--r--daemons/gptp/linux/src/debugout.hpp (renamed from daemons/gptp/common/debugout.hpp)41
-rw-r--r--daemons/gptp/windows/daemon_cl/daemon_cl.cpp14
-rw-r--r--daemons/gptp/windows/daemon_cl/daemon_cl.vcxproj219
-rw-r--r--daemons/gptp/windows/daemon_cl/daemon_cl.vcxproj.filters129
-rw-r--r--daemons/gptp/windows/daemon_cl/daemon_cl.vcxproj.user15
-rw-r--r--daemons/gptp/windows/daemon_cl/debugout.hpp49
-rw-r--r--daemons/gptp/windows/daemon_cl/windows_hal.hpp3
-rw-r--r--daemons/gptp/windows/named_pipe_test/CMakeLists.txt11
-rw-r--r--daemons/gptp/windows/named_pipe_test/named_pipe_test.vcxproj162
-rw-r--r--daemons/gptp/windows/named_pipe_test/named_pipe_test.vcxproj.filters36
-rw-r--r--daemons/gptp/windows/named_pipe_test/named_pipe_test.vcxproj.user3
20 files changed, 175 insertions, 638 deletions
diff --git a/daemons/gptp/CMakeLists.txt b/daemons/gptp/CMakeLists.txt
new file mode 100644
index 00000000..1cb6d980
--- /dev/null
+++ b/daemons/gptp/CMakeLists.txt
@@ -0,0 +1,28 @@
+cmake_minimum_required (VERSION 2.8)
+project (gptp)
+
+include_directories( "./common" )
+file(GLOB GPTP_COMMON "./common/*.cpp" "./common/*.c")
+
+if(UNIX)
+ include_directories( include "./linux/src" )
+ file(GLOB GPTP_OS "./linux/src/*.cpp")
+ target_link_libraries(gptp pthread)
+elseif(WIN32)
+ if( CMAKE_SIZEOF_VOID_P EQUAL 8 )
+ link_directories($ENV{WPCAP_DIR}/Lib/x64)
+ elseif( CMAKE_SIZEOF_VOID_P EQUAL 4 )
+ link_directories($ENV{WPCAP_DIR}/Lib)
+ endif()
+
+ # HAVE_REMOTE change pcap include options
+ add_definitions(-D_CRT_SECURE_NO_WARNINGS -DHAVE_REMOTE)
+ include_directories( include "./windows/daemon_cl" $ENV{WPCAP_DIR}/Include )
+ file(GLOB GPTP_OS "./windows/daemon_cl/*.cpp")
+ add_executable (gptp ${GPTP_COMMON} ${GPTP_OS})
+ target_link_libraries(gptp wpcap Iphlpapi Ws2_32)
+
+ add_subdirectory("windows/named_pipe_test")
+
+endif()
+
diff --git a/daemons/gptp/README.rst b/daemons/gptp/README.rst
index dcb19972..1ef458c1 100644
--- a/daemons/gptp/README.rst
+++ b/daemons/gptp/README.rst
@@ -65,19 +65,12 @@ Build Dependencies
* WinPCAP Developer's Pack (WpdPack) is required for linking - downloadable from http://www.winpcap.org/devel.htm.
-Extract WpdPack so the Include folder is in one of the below locations
-
-1- %ProgramData%
- \WpdPack
- \Include
- \Lib
- \Lib\x64
-
-2- %USERPROFILE%
- \src\pcap
- \Include
- \Lib
- \Lib\x64
+* CMAKE 3.2.2 or later
+
+* Microsoft Visual Studio 2013 or later
+
+The following environment variables must be defined:
+* WPCAP_DIR the directory where WinPcap is installed
* WinPCAP must also be installed on any machine where the daemon runs.
diff --git a/daemons/gptp/common/avbts_clock.hpp b/daemons/gptp/common/avbts_clock.hpp
index 1a10b999..090d56f9 100644
--- a/daemons/gptp/common/avbts_clock.hpp
+++ b/daemons/gptp/common/avbts_clock.hpp
@@ -262,7 +262,7 @@ public:
*/
void setGrandmasterClockIdentity(ClockIdentity id) {
if (id != grandmaster_clock_identity) {
- fprintf(stderr, "New Grandmaster \"%s\" (previous \"%s\")\n", id.getIdentityString().c_str(), grandmaster_clock_identity.getIdentityString().c_str());
+ XPTPD_PRINTF("New Grandmaster \"%s\" (previous \"%s\")\n", id.getIdentityString().c_str(), grandmaster_clock_identity.getIdentityString().c_str());
grandmaster_clock_identity = id;
}
}
diff --git a/daemons/gptp/common/avbts_port.hpp b/daemons/gptp/common/avbts_port.hpp
index 13694f10..6867d60b 100644
--- a/daemons/gptp/common/avbts_port.hpp
+++ b/daemons/gptp/common/avbts_port.hpp
@@ -42,7 +42,7 @@
#include <avbts_osnet.hpp>
#include <avbts_osthread.hpp>
#include <avbts_oscondition.hpp>
-#include <linux_ipc.hpp>
+#include <ipcdef.hpp>
#include <stdint.h>
@@ -380,7 +380,7 @@ class IEEE1588Port {
*/
void setAsCapable(bool ascap) {
if (ascap != asCapable) {
- fprintf(stderr, "AsCapable: %s\n",
+ XPTPD_PRINTF("AsCapable: %s\n",
ascap == true ? "Enabled" : "Disabled");
}
if(!ascap){
diff --git a/daemons/gptp/common/gptp_cfg.cpp b/daemons/gptp/common/gptp_cfg.cpp
index 73ed0f4f..dc0feea4 100644
--- a/daemons/gptp/common/gptp_cfg.cpp
+++ b/daemons/gptp/common/gptp_cfg.cpp
@@ -36,7 +36,13 @@ https://github.com/benhoyt/inih/commit/74d2ca064fb293bc60a77b0bd068075b293cf175.
#include <iostream>
+/* need Microsoft version for strcasecmp() from GCC strings.h */
+#ifdef _MSC_VER
+#define strcasecmp _stricmp
+#else
#include <strings.h>
+#endif
+
#include <errno.h>
#include <stdlib.h>
diff --git a/daemons/gptp/common/ieee1588clock.cpp b/daemons/gptp/common/ieee1588clock.cpp
index 11ef6550..43e7303d 100644
--- a/daemons/gptp/common/ieee1588clock.cpp
+++ b/daemons/gptp/common/ieee1588clock.cpp
@@ -420,14 +420,14 @@ bool IEEE1588Clock::isBetterThan(PTPMessageAnnounce * msg)
msg->getGrandmasterIdentity((char *)that1 + 6);
#if 0
- fprintf(stderr, "(Clk)Us: ");
+ XPTPD_PRINTF("(Clk)Us: ");
for (int i = 0; i < 14; ++i)
- fprintf(stderr, "%hhx ", this1[i]);
- fprintf(stderr, "\n");
- fprintf(stderr, "(Clk)Them: ");
+ XPTPD_PRINTF("%hhx ", this1[i]);
+ XPTPD_PRINTF("\n");
+ XPTPD_PRINTF("(Clk)Them: ");
for (int i = 0; i < 14; ++i)
- fprintf(stderr, "%hhx ", that1[i]);
- fprintf(stderr, "\n");
+ XPTPD_PRINTF("%hhx ", that1[i]);
+ XPTPD_PRINTF("\n");
#endif
return (memcmp(this1, that1, 14) < 0) ? true : false;
diff --git a/daemons/gptp/common/ieee1588port.cpp b/daemons/gptp/common/ieee1588port.cpp
index 72353723..170798cb 100644
--- a/daemons/gptp/common/ieee1588port.cpp
+++ b/daemons/gptp/common/ieee1588port.cpp
@@ -397,7 +397,7 @@ void IEEE1588Port::processEvent(Event e)
}
if( port_state != PTP_SLAVE && port_state != PTP_MASTER ) {
- fprintf( stderr, "Starting PDelay\n" );
+ XPTPD_PRINTF("Starting PDelay\n" );
startPDelay();
}
@@ -568,8 +568,7 @@ void IEEE1588Port::processEvent(Event e)
|| port_state == PTP_UNCALIBRATED
|| port_state == PTP_SLAVE
|| port_state == PTP_PRE_MASTER) {
- fprintf
- (stderr,
+ XPTPD_PRINTF(
"*** %s Timeout Expired - Becoming Master\n",
e == ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES ? "Announce" :
"Sync" );
@@ -651,8 +650,7 @@ void IEEE1588Port::processEvent(Event e)
timer->sleep(req);
wait_time += req;
if (ts_good != GPTP_EC_EAGAIN && iter < 1)
- fprintf
- (stderr,
+ XPTPD_PRINTF(
"Error (TX) timestamping PDelay request "
"(Retrying-%d), error=%d\n", iter, ts_good);
ts_good =
@@ -668,7 +666,7 @@ void IEEE1588Port::processEvent(Event e)
} else {
Timestamp failed = INVALID_TIMESTAMP;
pdelay_req->setTimestamp(failed);
- fprintf( stderr, "Invalid TX\n" );
+ XPTPD_PRINTF( "Invalid TX\n" );
}
if (ts_good != GPTP_EC_SUCCESS) {
@@ -767,8 +765,7 @@ void IEEE1588Port::processEvent(Event e)
char msg
[HWTIMESTAMPER_EXTENDED_MESSAGE_SIZE];
getExtendedError(msg);
- fprintf
- (stderr,
+ XPTPD_PRINTF(
"Error (TX) timestamping Sync, error="
"%d\n%s",
ts_good, msg );
@@ -873,7 +870,7 @@ void IEEE1588Port::processEvent(Event e)
case PDELAY_DEFERRED_PROCESSING:
pdelay_rx_lock->lock();
if (last_pdelay_resp_fwup == NULL) {
- fprintf(stderr, "PDelay Response Followup is NULL!\n");
+ XPTPD_PRINTF("PDelay Response Followup is NULL!\n");
abort();
}
last_pdelay_resp_fwup->processMessage(this);
@@ -937,7 +934,7 @@ void IEEE1588Port::becomeMaster( bool annc ) {
startAnnounce();
}
clock->addEventTimer( this, SYNC_INTERVAL_TIMEOUT_EXPIRES, 16000000 );
- fprintf( stderr, "Switching to Master\n" );
+ XPTPD_PRINTF("Switching to Master\n" );
clock->updateFUPInfo();
@@ -959,7 +956,7 @@ void IEEE1588Port::becomeSlave( bool restart_syntonization ) {
(ANNOUNCE_RECEIPT_TIMEOUT_MULTIPLIER*
(unsigned long long)
(pow((double)2,getAnnounceInterval())*1000000000.0)));
- fprintf( stderr, "Switching to Slave\n" );
+ XPTPD_PRINTF("Switching to Slave\n" );
if( restart_syntonization ) clock->newSyntonizationSetPoint();
getClock()->updateFUPInfo();
@@ -987,7 +984,7 @@ void IEEE1588Port::recommendState
reset_sync = true;
} else {
if( changed_external_master ) {
- fprintf( stderr, "Changed master!\n" );
+ XPTPD_PRINTF("Changed master!\n" );
clock->newSyntonizationSetPoint();
getClock()->updateFUPInfo();
reset_sync = true;
diff --git a/daemons/gptp/common/ipcdef.hpp b/daemons/gptp/common/ipcdef.hpp
index 9ffff86c..5acdd67e 100644
--- a/daemons/gptp/common/ipcdef.hpp
+++ b/daemons/gptp/common/ipcdef.hpp
@@ -49,6 +49,9 @@
#elif defined(_WIN32) || defined(_WIN64)
+/*Definition of DWORD*/
+#include <IntSafe.h>
+
/*Type for process ID*/
#define PID_TYPE DWORD
diff --git a/daemons/gptp/common/ptp_message.cpp b/daemons/gptp/common/ptp_message.cpp
index 52bbf4b0..b04c8fa8 100644
--- a/daemons/gptp/common/ptp_message.cpp
+++ b/daemons/gptp/common/ptp_message.cpp
@@ -83,12 +83,12 @@ PTPMessageCommon *buildPTPMessage
int i;
XPTPD_INFO("Packet Dump:\n");
for (i = 0; i < size; ++i) {
- fprintf(stderr, "%hhx\t", buf[i]);
+ XPTPD_PRINTF("%hhx\t", buf[i]);
if (i % 8 == 7)
- fprintf(stderr, "\n");
+ XPTPD_PRINTF("\n");
}
if (i % 8 != 0)
- fprintf(stderr, "\n");
+ XPTPD_PRINTF("\n");
}
#endif
@@ -124,8 +124,8 @@ PTPMessageCommon *buildPTPMessage
// Waits at least 1 time slice regardless of size of 'req'
timer->sleep(req);
if (ts_good != GPTP_EC_EAGAIN)
- fprintf
- ( stderr, "Error (RX) timestamping RX event packet (Retrying), error=%d\n",
+ XPTPD_PRINTF(
+ "Error (RX) timestamping RX event packet (Retrying), error=%d\n",
ts_good );
ts_good =
port->getRxTimestamp(sourcePortIdentity, sequenceId,
@@ -157,8 +157,8 @@ PTPMessageCommon *buildPTPMessage
switch (messageType) {
case SYNC_MESSAGE:
- //fprintf( stderr, "*** Received Sync message\n" );
- //printf( "Sync RX timestamp = %hu,%u,%u\n", timestamp.seconds_ms, timestamp.seconds_ls, timestamp.nanoseconds );
+ //XPTPD_PRINTF("*** Received Sync message\n" );
+ //XPTPD_PRINTF("Sync RX timestamp = %hu,%u,%u\n", timestamp.seconds_ms, timestamp.seconds_ls, timestamp.nanoseconds );
XPTPD_INFO("*** Received Sync message");
// Be sure buffer is the correction size
@@ -300,7 +300,7 @@ PTPMessageCommon *buildPTPMessage
#ifdef DEBUG
for (int n = 0; n < PTP_CLOCK_IDENTITY_LENGTH; ++n) { // MMM
- fprintf(stderr, "%c",
+ XPTPD_PRINTF("%c",
pdelay_resp_msg->
requestingPortIdentity.clockIdentity
[n]);
@@ -613,14 +613,14 @@ bool PTPMessageAnnounce::isBetterThan(PTPMessageAnnounce * msg)
msg->getGrandmasterIdentity((char *)that1 + 6);
#if 0
- fprintf(stderr, "Us: ");
+ XPTPD_PRINTF("Us: ");
for (int i = 0; i < 14; ++i)
- fprintf(stderr, "%hhx", this1[i]);
- fprintf(stderr, "\n");
- fprintf(stderr, "Them: ");
+ XPTPD_PRINTF("%hhx", this1[i]);
+ XPTPD_PRINTF("\n");
+ XPTPD_PRINTF("Them: ");
for (int i = 0; i < 14; ++i)
- fprintf(stderr, "%hhx", that1[i]);
- fprintf(stderr, "\n");
+ XPTPD_PRINTF("%hhx", that1[i]);
+ XPTPD_PRINTF("\n");
#endif
return (memcmp(this1, that1, 14) < 0) ? true : false;
@@ -877,7 +877,7 @@ void PTPMessageFollowUp::sendPort(IEEE1588Port * port,
for (int i = 0; i < messageLength; ++i) {
fprintf(stderr, "%d:%02x ", i, (unsigned char)buf_t[i]);
}
- fprintf(stderr, "\n");
+ XPTPD_PRINTF("\n");
#endif
#endif
@@ -1075,9 +1075,9 @@ void PTPMessagePathDelayReq::processMessage(IEEE1588Port * port)
#ifdef DEBUG
for (int n = 0; n < PTP_CLOCK_IDENTITY_LENGTH; ++n) {
- fprintf(stderr, "%c", resp_id.clockIdentity[n]);
+ XPTPD_PRINTF("%c", resp_id.clockIdentity[n]);
}
- fprintf(stderr, "\"\n");
+ XPTPD_PRINTF("\"\n");
#endif
this->getPortIdentity(&requestingPortIdentity_p);
@@ -1210,7 +1210,7 @@ void PTPMessagePathDelayResp::processMessage(IEEE1588Port * port)
}
if (port->tryPDelayRxLock() != true) {
- fprintf(stderr, "Failed to get PDelay RX Lock\n");
+ XPTPD_PRINTF("Failed to get PDelay RX Lock\n");
return;
}
diff --git a/daemons/gptp/common/debugout.hpp b/daemons/gptp/linux/src/debugout.hpp
index acb6d70e..309235a1 100644
--- a/daemons/gptp/common/debugout.hpp
+++ b/daemons/gptp/linux/src/debugout.hpp
@@ -1,31 +1,31 @@
/******************************************************************************
- Copyright (c) 2009-2012, Intel Corporation
+ Copyright (c) 2009-2012, Intel Corporation
All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
+
+ Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
+
+ 1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
-
- 3. Neither the name of the Intel Corporation nor the names of its
- contributors may be used to endorse or promote products derived from
+
+ 3. Neither the name of the Intel Corporation nor the names of its
+ contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
-
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
@@ -39,6 +39,7 @@
#include <stdio.h>
#define XPTPD_ERROR(fmt,...) fprintf( stderr, "ERROR at %u in %s: " fmt "\n", __LINE__, __FILE__ ,## __VA_ARGS__) /*!< Prints errors at stderr output*/
+#define XPTPD_PRINTF(fmt,...) fprintf( stderr, fmt ,## __VA_ARGS__) /*!< Prints printf() status information at stderr output*/
#ifdef PTP_DEBUG
#define XPTPD_INFO(fmt,...) fprintf( stderr, "DEBUG at %u in %s: " fmt "\n", __LINE__, __FILE__ ,## __VA_ARGS__) /*!< Prints debugs at stderr output */
#else
diff --git a/daemons/gptp/windows/daemon_cl/daemon_cl.cpp b/daemons/gptp/windows/daemon_cl/daemon_cl.cpp
index 83c2d79c..0f287b5b 100644
--- a/daemons/gptp/windows/daemon_cl/daemon_cl.cpp
+++ b/daemons/gptp/windows/daemon_cl/daemon_cl.cpp
@@ -42,6 +42,11 @@ POSSIBILITY OF SUCH DAMAGE.
#define MACSTR_LENGTH 17
+#define PHY_DELAY_GB_TX_I20 184 //1G delay in nanoseconds
+#define PHY_DELAY_GB_RX_I20 382 //1G delay in nanoseconds
+#define PHY_DELAY_MB_TX_I20 1044 //100M delay in nanoseconds
+#define PHY_DELAY_MB_RX_I20 2133 //100M delay in nanoseconds
+
static bool exit_flag;
void print_usage( char *arg0 ) {
@@ -82,6 +87,7 @@ int _tmain(int argc, _TCHAR* argv[])
int32_t offset = 0;
bool syntonize = false;
uint8_t priority1 = 248;
+ int phy_delays[4] = { 0 };
int i;
// Register default network interface
@@ -133,6 +139,12 @@ int _tmain(int argc, _TCHAR* argv[])
parseMacAddr( argv[i], local_addr_ostr );
LinkLayerAddress local_addr(local_addr_ostr);
+ // Initialize default PHY delays
+ phy_delays[0] = PHY_DELAY_GB_TX_I20;
+ phy_delays[1] = PHY_DELAY_GB_RX_I20;
+ phy_delays[2] = PHY_DELAY_MB_TX_I20;
+ phy_delays[3] = PHY_DELAY_MB_RX_I20;
+
// Create HWTimestamper object
HWTimestamper *timestamper = new WindowsTimestamper();
// Create Clock object
@@ -140,7 +152,7 @@ int _tmain(int argc, _TCHAR* argv[])
// Create Port Object linked to clock and low level
IEEE1588Port *port = new IEEE1588Port( clock, 1, false, 0, timestamper, 0, &local_addr,
condition_factory, thread_factory, timer_factory, lock_factory );
- if( !port->init_port() ) {
+ if (!port->init_port(phy_delays)) {
printf( "Failed to initialize port\n" );
return -1;
}
diff --git a/daemons/gptp/windows/daemon_cl/daemon_cl.vcxproj b/daemons/gptp/windows/daemon_cl/daemon_cl.vcxproj
deleted file mode 100644
index 4cb65d8d..00000000
--- a/daemons/gptp/windows/daemon_cl/daemon_cl.vcxproj
+++ /dev/null
@@ -1,219 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="12.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>{590D3055-A068-4B31-B4F9-B2ACC5F93663}</ProjectGuid>
- <Keyword>Win32Proj</Keyword>
- <RootNamespace>daemon_cl</RootNamespace>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>true</UseDebugLibraries>
- <CharacterSet>Unicode</CharacterSet>
- <PlatformToolset>v120</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>true</UseDebugLibraries>
- <CharacterSet>Unicode</CharacterSet>
- <PlatformToolset>v120</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>false</UseDebugLibraries>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <CharacterSet>Unicode</CharacterSet>
- <PlatformToolset>v120</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>false</UseDebugLibraries>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <CharacterSet>Unicode</CharacterSet>
- <PlatformToolset>v120</PlatformToolset>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </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 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>
- <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 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>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <LinkIncremental>true</LinkIncremental>
- <IncludePath>$(IncludePath)</IncludePath>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <LinkIncremental>true</LinkIncremental>
- <IncludePath>$(ALLUSERSPROFILE)\WpdPack\Include;$(IncludePath)</IncludePath>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <LinkIncremental>false</LinkIncremental>
- <IncludePath>$(IncludePath)</IncludePath>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <LinkIncremental>false</LinkIncremental>
- <IncludePath>$(ALLUSERSPROFILE)\WpdPack\Include;$(IncludePath)</IncludePath>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <PrecompiledHeader>NotUsing</PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;WPCAP;HAVE_REMOTE</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>$(ALLUSERSPROFILE)\WpdPack\Include;$(USERPROFILE)\src\pcap\Include;$(SolutionDir)\..\common;$(ProjectDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
- <Link>
- <SubSystem>Console</SubSystem>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <AdditionalDependencies>wpcap.lib;Iphlpapi.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <AdditionalLibraryDirectories>$(ALLUSERSPROFILE)\WpdPack\Lib;$(USERPROFILE)\src\pcap\Lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <ClCompile>
- <PrecompiledHeader>NotUsing</PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;WPCAP;HAVE_REMOTE</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>$(ALLUSERSPROFILE)\WpdPack\Include;$(USERPROFILE)\src\pcap\Include;$(SolutionDir)\..\common;$(ProjectDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
- <Link>
- <SubSystem>Console</SubSystem>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <AdditionalDependencies>wpcap.lib;Iphlpapi.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <AdditionalLibraryDirectories>$(ALLUSERSPROFILE)\WpdPack\Lib\x64;$(USERPROFILE)\src\pcap\Lib\x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <WarningLevel>Level3</WarningLevel>
- <PrecompiledHeader>NotUsing</PrecompiledHeader>
- <Optimization>MaxSpeed</Optimization>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;WPCAP;HAVE_REMOTE</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>$(ALLUSERSPROFILE)\WpdPack\Include;$(USERPROFILE)\src\pcap\Include;$(SolutionDir)\..\common;$(ProjectDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
- <Link>
- <SubSystem>Console</SubSystem>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <OptimizeReferences>true</OptimizeReferences>
- <AdditionalLibraryDirectories>$(ALLUSERSPROFILE)\WpdPack\Lib;$(USERPROFILE)\src\pcap\Lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <AdditionalDependencies>wpcap.lib;Iphlpapi.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <GenerateMapFile>true</GenerateMapFile>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <ClCompile>
- <WarningLevel>Level3</WarningLevel>
- <PrecompiledHeader>NotUsing</PrecompiledHeader>
- <Optimization>MaxSpeed</Optimization>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;WPCAP;HAVE_REMOTE</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>$(ALLUSERSPROFILE)\WpdPack\Include;$(USERPROFILE)\src\pcap\Include;$(SolutionDir)\..\common;$(ProjectDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
- <Link>
- <SubSystem>Console</SubSystem>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <OptimizeReferences>true</OptimizeReferences>
- <AdditionalLibraryDirectories>$(ALLUSERSPROFILE)\WpdPack\Lib\x64;$(USERPROFILE)\src\pcap\Lib\x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <AdditionalDependencies>wpcap.lib;Iphlpapi.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <GenerateMapFile>true</GenerateMapFile>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <None Include="ReadMe.txt" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="..\..\common\avbts_clock.hpp" />
- <ClInclude Include="..\..\common\avbts_message.hpp" />
- <ClInclude Include="..\..\common\avbts_oscondition.hpp" />
- <ClInclude Include="..\..\common\avbts_osipc.hpp" />
- <ClInclude Include="..\..\common\avbts_oslock.hpp" />
- <ClInclude Include="..\..\common\avbts_osnet.hpp" />
- <ClInclude Include="..\..\common\avbts_osthread.hpp" />
- <ClInclude Include="..\..\common\avbts_ostimer.hpp" />
- <ClInclude Include="..\..\common\avbts_ostimerq.hpp" />
- <ClInclude Include="..\..\common\avbts_port.hpp" />
- <ClInclude Include="..\..\common\debugout.hpp" />
- <ClInclude Include="..\..\common\ieee1588.hpp" />
- <ClInclude Include="..\..\common\ptptypes.hpp" />
- <ClInclude Include="..\..\common\ipcdef.hpp" />
- <ClInclude Include="windows_ipc.hpp" />
- <ClInclude Include="IPCListener.hpp" />
- <ClInclude Include="Lockable.hpp" />
- <ClInclude Include="packet.hpp" />
- <ClInclude Include="PeerList.hpp" />
- <ClInclude Include="platform.hpp" />
- <ClInclude Include="stdafx.h" />
- <ClInclude Include="Stoppable.hpp" />
- <ClInclude Include="targetver.h" />
- <ClInclude Include="tsc.hpp" />
- <ClInclude Include="windows_hal.hpp" />
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="..\..\common\avbts_osnet.cpp">
- <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
- </ClCompile>
- <ClCompile Include="..\..\common\ieee1588clock.cpp">
- <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
- </ClCompile>
- <ClCompile Include="..\..\common\ieee1588port.cpp">
- <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
- </ClCompile>
- <ClCompile Include="..\..\common\ptp_message.cpp">
- <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
- </ClCompile>
- <ClCompile Include="daemon_cl.cpp">
- <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
- <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">NotUsing</PrecompiledHeader>
- </ClCompile>
- <ClCompile Include="IPCListener.cpp" />
- <ClCompile Include="packet.cpp">
- <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
- <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">NotUsing</PrecompiledHeader>
- </ClCompile>
- <ClCompile Include="platform.cpp" />
- <ClCompile Include="stdafx.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>
- <ClCompile Include="windows_hal.cpp" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project>
diff --git a/daemons/gptp/windows/daemon_cl/daemon_cl.vcxproj.filters b/daemons/gptp/windows/daemon_cl/daemon_cl.vcxproj.filters
deleted file mode 100644
index b3c4f59a..00000000
--- a/daemons/gptp/windows/daemon_cl/daemon_cl.vcxproj.filters
+++ /dev/null
@@ -1,129 +0,0 @@
-<?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;hpp;hxx;hm;inl;inc;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>
- <None Include="ReadMe.txt" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="stdafx.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="targetver.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="windows_hal.hpp">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="packet.hpp">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\..\common\ipcdef.hpp">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="windows_ipc.hpp">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="platform.hpp">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="tsc.hpp">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\..\common\avbts_clock.hpp">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\..\common\avbts_message.hpp">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\..\common\avbts_oscondition.hpp">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\..\common\avbts_osipc.hpp">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\..\common\avbts_oslock.hpp">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\..\common\avbts_osnet.hpp">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\..\common\avbts_osthread.hpp">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\..\common\avbts_ostimer.hpp">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\..\common\avbts_ostimerq.hpp">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\..\common\avbts_port.hpp">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\..\common\ieee1588.hpp">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\..\common\ptptypes.hpp">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="IPCListener.hpp">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="Lockable.hpp">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="PeerList.hpp">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="Stoppable.hpp">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\..\common\debugout.hpp">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="stdafx.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="daemon_cl.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="packet.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\..\common\avbts_osnet.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\..\common\ieee1588clock.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\..\common\ieee1588port.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\..\common\ptp_message.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="platform.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="windows_hal.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="IPCListener.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
-</Project>
diff --git a/daemons/gptp/windows/daemon_cl/daemon_cl.vcxproj.user b/daemons/gptp/windows/daemon_cl/daemon_cl.vcxproj.user
deleted file mode 100644
index de099045..00000000
--- a/daemons/gptp/windows/daemon_cl/daemon_cl.vcxproj.user
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <LocalDebuggerCommandArguments>88-88-88-88-87-88</LocalDebuggerCommandArguments>
- <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <LocalDebuggerCommandArguments>00-13-20-F8-84-41</LocalDebuggerCommandArguments>
- <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <LocalDebuggerCommandArguments>/r 200 88-88-88-88-87-88</LocalDebuggerCommandArguments>
- <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
- </PropertyGroup>
-</Project> \ No newline at end of file
diff --git a/daemons/gptp/windows/daemon_cl/debugout.hpp b/daemons/gptp/windows/daemon_cl/debugout.hpp
new file mode 100644
index 00000000..309235a1
--- /dev/null
+++ b/daemons/gptp/windows/daemon_cl/debugout.hpp
@@ -0,0 +1,49 @@
+/******************************************************************************
+
+ Copyright (c) 2009-2012, Intel Corporation
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ 3. Neither the name of the Intel Corporation nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+
+******************************************************************************/
+
+#ifndef DEBUGOUT_HPP
+#define DEBUGOUT_HPP
+
+/**@file*/
+
+#include <stdio.h>
+
+#define XPTPD_ERROR(fmt,...) fprintf( stderr, "ERROR at %u in %s: " fmt "\n", __LINE__, __FILE__ ,## __VA_ARGS__) /*!< Prints errors at stderr output*/
+#define XPTPD_PRINTF(fmt,...) fprintf( stderr, fmt ,## __VA_ARGS__) /*!< Prints printf() status information at stderr output*/
+#ifdef PTP_DEBUG
+#define XPTPD_INFO(fmt,...) fprintf( stderr, "DEBUG at %u in %s: " fmt "\n", __LINE__, __FILE__ ,## __VA_ARGS__) /*!< Prints debugs at stderr output */
+#else
+#define XPTPD_INFO(fmt,...) /*!< debugs disabled*/
+#endif
+
+#endif/*DEBUGOUT_HPP*/
diff --git a/daemons/gptp/windows/daemon_cl/windows_hal.hpp b/daemons/gptp/windows/daemon_cl/windows_hal.hpp
index d251e18f..f1a9cebf 100644
--- a/daemons/gptp/windows/daemon_cl/windows_hal.hpp
+++ b/daemons/gptp/windows/daemon_cl/windows_hal.hpp
@@ -86,9 +86,10 @@ public:
* @param addr [out] Remote link layer address
* @param payload [out] Data buffer
* @param length [out] Length of received data
+ * @param delay [in] Specifications for PHY input and output delays in nanoseconds
* @return net_result structure
*/
- virtual net_result nrecv( LinkLayerAddress *addr, uint8_t *payload, size_t &length ) {
+ virtual net_result nrecv(LinkLayerAddress *addr, uint8_t *payload, size_t &length, struct phy_delay *delay) {
packet_addr_t dest;
packet_error_t pferror = recvFrame( handle, &dest, payload, length );
if( pferror != PACKET_NO_ERROR && pferror != PACKET_RECVTIMEOUT_ERROR ) return net_fatal;
diff --git a/daemons/gptp/windows/named_pipe_test/CMakeLists.txt b/daemons/gptp/windows/named_pipe_test/CMakeLists.txt
new file mode 100644
index 00000000..82a9ddf9
--- /dev/null
+++ b/daemons/gptp/windows/named_pipe_test/CMakeLists.txt
@@ -0,0 +1,11 @@
+#Windows specifc build of named pipe test
+cmake_minimum_required (VERSION 2.8)
+project (named_pipe_test)
+
+include_directories( ".." )
+file(GLOB SRC "*.cpp")
+
+add_definitions(-D_CRT_SECURE_NO_WARNINGS )
+include_directories( include "../../common" )
+add_executable (named_pipe_test ${SRC})
+target_link_libraries(named_pipe_test Iphlpapi Ws2_32)
diff --git a/daemons/gptp/windows/named_pipe_test/named_pipe_test.vcxproj b/daemons/gptp/windows/named_pipe_test/named_pipe_test.vcxproj
deleted file mode 100644
index 3043bdb7..00000000
--- a/daemons/gptp/windows/named_pipe_test/named_pipe_test.vcxproj
+++ /dev/null
@@ -1,162 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="12.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>{303FACBB-2A44-4511-A855-2B5B2C0E3A89}</ProjectGuid>
- <Keyword>Win32Proj</Keyword>
- <RootNamespace>named_pipe_test</RootNamespace>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>true</UseDebugLibraries>
- <CharacterSet>Unicode</CharacterSet>
- <PlatformToolset>v120</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>true</UseDebugLibraries>
- <CharacterSet>Unicode</CharacterSet>
- <PlatformToolset>v120</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>false</UseDebugLibraries>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <CharacterSet>Unicode</CharacterSet>
- <PlatformToolset>v120</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>false</UseDebugLibraries>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <CharacterSet>Unicode</CharacterSet>
- <PlatformToolset>v120</PlatformToolset>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </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 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>
- <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 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>
- <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>NotUsing</PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>
- </PreprocessorDefinitions>
- <AdditionalIncludeDirectories>$(SolutionDir)\..\common;$(SolutionDir)\daemon_cl;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </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>
- <PreprocessorDefinitions>
- </PreprocessorDefinitions>
- <AdditionalIncludeDirectories>$(SolutionDir)\..\common;$(SolutionDir)\daemon_cl;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
- <Link>
- <SubSystem>Console</SubSystem>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <WarningLevel>Level3</WarningLevel>
- <PrecompiledHeader>Use</PrecompiledHeader>
- <Optimization>MaxSpeed</Optimization>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>$(SolutionDir)\..\common;$(SolutionDir)\daemon_cl;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
- <Link>
- <SubSystem>Console</SubSystem>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <OptimizeReferences>true</OptimizeReferences>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <ClCompile>
- <WarningLevel>Level3</WarningLevel>
- <PrecompiledHeader>Use</PrecompiledHeader>
- <Optimization>MaxSpeed</Optimization>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>$(SolutionDir)\..\common;$(SolutionDir)\daemon_cl;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
- <Link>
- <SubSystem>Console</SubSystem>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <OptimizeReferences>true</OptimizeReferences>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <None Include="ReadMe.txt" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="stdafx.h" />
- <ClInclude Include="targetver.h" />
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="named_pipe_test.cpp" />
- <ClCompile Include="stdafx.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
diff --git a/daemons/gptp/windows/named_pipe_test/named_pipe_test.vcxproj.filters b/daemons/gptp/windows/named_pipe_test/named_pipe_test.vcxproj.filters
deleted file mode 100644
index 6d9eabf2..00000000
--- a/daemons/gptp/windows/named_pipe_test/named_pipe_test.vcxproj.filters
+++ /dev/null
@@ -1,36 +0,0 @@
-<?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;hpp;hxx;hm;inl;inc;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>
- <None Include="ReadMe.txt" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="stdafx.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="targetver.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="stdafx.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="named_pipe_test.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/daemons/gptp/windows/named_pipe_test/named_pipe_test.vcxproj.user b/daemons/gptp/windows/named_pipe_test/named_pipe_test.vcxproj.user
deleted file mode 100644
index ace9a86a..00000000
--- a/daemons/gptp/windows/named_pipe_test/named_pipe_test.vcxproj.user
+++ /dev/null
@@ -1,3 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-</Project> \ No newline at end of file