summaryrefslogtreecommitdiff
path: root/orkbasecxx/messages
diff options
context:
space:
mode:
authorHenri Herscher <henri@oreka.org>2007-02-22 22:43:40 +0000
committerHenri Herscher <henri@oreka.org>2007-02-22 22:43:40 +0000
commit080dc6ecd94142b6dae8ccdc33457e1130bb796e (patch)
tree586ac4a31575cfe4ac5fbf148a9df3514543ab29 /orkbasecxx/messages
parent41cbef5f39e62f2142ae0e1c1e972468d5137bdb (diff)
Tape message now defines its members before common message members so that the message type is always the first member.
git-svn-id: https://oreka.svn.sourceforge.net/svnroot/oreka/trunk@414 09dcff7a-b715-0410-9601-b79a96267cd0
Diffstat (limited to 'orkbasecxx/messages')
-rw-r--r--orkbasecxx/messages/TapeMsg.cpp55
-rw-r--r--orkbasecxx/messages/TapeMsg.h33
2 files changed, 85 insertions, 3 deletions
diff --git a/orkbasecxx/messages/TapeMsg.cpp b/orkbasecxx/messages/TapeMsg.cpp
index b624d08..9297973 100644
--- a/orkbasecxx/messages/TapeMsg.cpp
+++ b/orkbasecxx/messages/TapeMsg.cpp
@@ -10,6 +10,9 @@
* Please refer to http://www.gnu.org/copyleft/gpl.html
*
*/
+#pragma warning( disable: 4786 ) // disables truncated symbols in browse-info warning
+
+#define _WINSOCKAPI_ // prevents the inclusion of winsock.h
#include "Utils.h"
#include "TapeMsg.h"
@@ -26,8 +29,6 @@ TapeMsg::TapeMsg()
void TapeMsg::Define(Serializer* s)
{
- DefineMessage(s);
-
CStdString tapeMessageName(TAPE_MESSAGE_NAME);
s->StringValue(OBJECT_TYPE_TAG, tapeMessageName, true);
s->StringValue(REC_ID_PARAM, m_recId, true);
@@ -46,6 +47,8 @@ void TapeMsg::Define(Serializer* s)
s->StringValue(REMOTE_IP_PARAM, m_remoteIp);
//s->StringValue(LOCAL_MAC_PARAM, m_localMac);
//s->StringValue(REMOTE_MAC_PARAM, m_remoteMac);
+
+ DefineMessage(s);
}
void TapeMsg::Validate()
@@ -62,6 +65,10 @@ ObjectRef TapeMsg::NewInstance()
return ObjectRef(new TapeMsg);
}
+ObjectRef TapeMsg::Process()
+{
+ return ObjectRef();
+}
//==========================================================
TapeResponse::TapeResponse()
@@ -86,3 +93,47 @@ ObjectRef TapeResponse::NewInstance()
return ObjectRef(new TapeResponse);
}
+//====================================================================
+//TapeResponseFwd::TapeResponseFwd()
+//{
+// m_boolean2 = false;
+//}
+//
+//
+//void TapeResponseFwd::Define(Serializer* s)
+//{
+// TapeResponse::Define(s);
+// s->BoolValue("boolean2", m_boolean2);
+//}
+//
+//ObjectRef TapeResponseFwd::NewInstance()
+//{
+// return ObjectRef(new TapeResponseFwd);
+//}
+
+//====================================================================
+TapeTagMsg::TapeTagMsg()
+{
+ // Here is where default values are set
+}
+
+void TapeTagMsg::Define(Serializer* s)
+{
+ CStdString tapeMessageName("tapetagmsg");
+ s->StringValue(OBJECT_TYPE_TAG, tapeMessageName, true);
+ DefineMessage(s);
+}
+
+void TapeTagMsg::Validate()
+{
+}
+
+CStdString TapeTagMsg::GetClassName()
+{
+ return CStdString("tapetagmsg");
+}
+
+ObjectRef TapeTagMsg::NewInstance()
+{
+ return ObjectRef(new TapeTagMsg);
+} \ No newline at end of file
diff --git a/orkbasecxx/messages/TapeMsg.h b/orkbasecxx/messages/TapeMsg.h
index 481bfd3..09a95d8 100644
--- a/orkbasecxx/messages/TapeMsg.h
+++ b/orkbasecxx/messages/TapeMsg.h
@@ -42,7 +42,7 @@ public:
CStdString GetClassName();
ObjectRef NewInstance();
- inline ObjectRef Process() {return ObjectRef();};
+ ObjectRef Process();
CStdString m_recId;
CStdString m_stage;
@@ -81,5 +81,36 @@ public:
typedef boost::shared_ptr<TapeResponse> TapeResponseRef;
+//class DLL_IMPORT_EXPORT_ORKBASE TapeResponseFwd : public TapeResponse
+//{
+//public:
+// TapeResponseFwd();
+// void Define(Serializer* s);
+//
+// ObjectRef NewInstance();
+//
+// bool m_boolean2;
+//};
+
+
+class DLL_IMPORT_EXPORT_ORKBASE TapeTagMsg : public SyncMessage
+{
+public:
+ TapeTagMsg();
+
+ void Define(Serializer* s);
+ void Validate();
+
+ CStdString GetClassName();
+ ObjectRef NewInstance();
+ inline ObjectRef Process() {return ObjectRef();};
+
+ CStdString m_orkUid;
+ time_t m_timestamp;
+ CStdString m_key;
+ CStdString m_value;
+};
+typedef boost::shared_ptr<TapeTagMsg> TapeTagMsgRef;
+
#endif