Revision: 41763
http://brlcad.svn.sourceforge.net/brlcad/?rev=41763&view=rev
Author: davidloman
Date: 2010-12-22 14:17:09 +0000 (Wed, 22 Dec 2010)
Log Message:
-----------
Didn't put in the proper constructors and the NetMsgFactory threw a fit about
it. Should be fixed now.
Modified Paths:
--------------
rt^3/trunk/include/PingMsg.h
rt^3/trunk/include/PongMsg.h
rt^3/trunk/src/libNet/NetMsgFactory.cxx
rt^3/trunk/src/libNet/netMsg/PingMsg.cxx
rt^3/trunk/src/libNet/netMsg/PongMsg.cxx
Modified: rt^3/trunk/include/PingMsg.h
===================================================================
--- rt^3/trunk/include/PingMsg.h 2010-12-22 13:58:52 UTC (rev 41762)
+++ rt^3/trunk/include/PingMsg.h 2010-12-22 14:17:09 UTC (rev 41763)
@@ -31,9 +31,19 @@
class PingMsg: public GenericEightBytesMsg {
public:
+ /* Normal Constructor */
PingMsg(quint64 startT);
+
+ /* Reply Constructor */
+ PingMsg(NetMsg* msg, quint64 startT);
+
+ /* Deserializing Constructor */
+ PingMsg(QDataStream* ds, Portal* origin);
+
+ /* Destructor */
virtual ~PingMsg();
+
quint64 getStartTime();
};
Modified: rt^3/trunk/include/PongMsg.h
===================================================================
--- rt^3/trunk/include/PongMsg.h 2010-12-22 13:58:52 UTC (rev 41762)
+++ rt^3/trunk/include/PongMsg.h 2010-12-22 14:17:09 UTC (rev 41763)
@@ -26,12 +26,20 @@
#ifndef __PONGMSG_H__
#define __PONGMSG_H__
+#include "GenericEightBytesMsg.h"
#include "PingMsg.h"
-#include "GenericEightBytesMsg.h"
+#include <QtCore/QString>
+
class PongMsg: public GenericEightBytesMsg {
public:
+ /* Normal & Reply Constructor */
PongMsg(PingMsg* ping);
+
+ /* Deserializing Constructor */
+ PongMsg(QDataStream* ds, Portal* origin);
+
+ /* Destructor */
virtual ~PongMsg();
quint64 getStartTime();
Modified: rt^3/trunk/src/libNet/NetMsgFactory.cxx
===================================================================
--- rt^3/trunk/src/libNet/NetMsgFactory.cxx 2010-12-22 13:58:52 UTC (rev
41762)
+++ rt^3/trunk/src/libNet/NetMsgFactory.cxx 2010-12-22 14:17:09 UTC (rev
41763)
@@ -37,6 +37,8 @@
#include "NewSessionReqMsg.h"
#include "SessionInfoMsg.h"
#include "TypeOnlyMsg.h"
+#include "PingMsg.h"
+#include "PongMsg.h"
NetMsgFactory* NetMsgFactory::pInstance = NULL;
@@ -134,10 +136,17 @@
case GEOMETRYCHUNK:
return new GeometryChunkMsg(qds, origin);
+ case PING:
+ return new PingMsg(qds, origin);
+ case PONG:
+ return new PongMsg(qds, origin);
+
+
/* Admin commands */
case CMD_SHUTDOWN:
return new TypeOnlyMsg(qds, origin);
+
default:
return NULL;
}
Modified: rt^3/trunk/src/libNet/netMsg/PingMsg.cxx
===================================================================
--- rt^3/trunk/src/libNet/netMsg/PingMsg.cxx 2010-12-22 13:58:52 UTC (rev
41762)
+++ rt^3/trunk/src/libNet/netMsg/PingMsg.cxx 2010-12-22 14:17:09 UTC (rev
41763)
@@ -27,7 +27,9 @@
#include "PingMsg.h"
#include <sys/time.h>
-PingMsg::PingMsg(quint64 startT):GenericEightBytesMsg(PONG, startT) {}
+PingMsg::PingMsg(quint64 startT):GenericEightBytesMsg(PING, startT) {}
+PingMsg::PingMsg(NetMsg* msg, quint64 startT):GenericEightBytesMsg(PING, msg,
startT) {}
+PingMsg::PingMsg(QDataStream* ds, Portal* origin):GenericEightBytesMsg(ds,
origin) {}
PingMsg::~PingMsg() {}
Modified: rt^3/trunk/src/libNet/netMsg/PongMsg.cxx
===================================================================
--- rt^3/trunk/src/libNet/netMsg/PongMsg.cxx 2010-12-22 13:58:52 UTC (rev
41762)
+++ rt^3/trunk/src/libNet/netMsg/PongMsg.cxx 2010-12-22 14:17:09 UTC (rev
41763)
@@ -26,11 +26,10 @@
#include "NetMsgTypes.h"
#include "PongMsg.h"
-PongMsg::PongMsg(PingMsg* ping) : GenericEightBytesMsg(PING,
ping->getStartTime()){
-}
+PongMsg::PongMsg(PingMsg* ping): GenericEightBytesMsg(PONG,
ping->getStartTime()){}
+PongMsg::PongMsg(QDataStream* ds, Portal* origin): GenericEightBytesMsg(ds,
origin) {}
-PongMsg::~PongMsg() {
-}
+PongMsg::~PongMsg(){}
quint64
PongMsg::getStartTime(){
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Forrester recently released a report on the Return on Investment (ROI) of
Google Apps. They found a 300% ROI, 38%-56% cost savings, and break-even
within 7 months. Over 3 million businesses have gone Google with Google Apps:
an online email calendar, and document program that's accessible from your
browser. Read the Forrester report: http://p.sf.net/sfu/googleapps-sfnew
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits