L:/channel/channel/examples/include/Task_Msg.h

Go to the documentation of this file.
00001 
00002 // Copyright (c) 2005, 2006 Yigong Liu
00003 // Permission to use, copy, modify, distribute and sell this software for any 
00004 //     purpose is hereby granted without fee, provided that the above copyright 
00005 //     notice appear in all copies and that both that copyright notice and this 
00006 //     permission notice appear in supporting documentation.
00007 // The author makes no representations about the 
00008 //     suitability of this software for any purpose. It is provided "as is" 
00009 //     without express or implied warranty.
00011 
00012 #ifndef _TASK_MSG_H_
00013 #define _TASK_MSG_H_
00014 
00015 #include <Channel.h>
00016 
00017 /*  for channel using int as msg id/type 
00018 int PING_MSG=2000;
00019 int PONG_MSG=2001;
00020 int TEST_STRING_MSG=2002;
00021 */
00022 
00023 std::string PING_MSG = "_PING_";
00024 std::string PONG_MSG = "_PONG_";
00025 std::string TEST_STRING_MSG = "_TEST_";
00026 
00027 struct Test_String_Msg {
00028   enum { MAX_STR_LEN = 1024 };
00029   int len;
00030   char data[MAX_STR_LEN];
00031   Test_String_Msg() {
00032   }
00033 };
00034 
00035 class Ping_Pong_Msg {
00036  public:
00037   enum { MAX_STR_LEN = 1024*1024 };
00038   int len;
00039   char data[MAX_STR_LEN];
00040   int count;
00041   Ping_Pong_Msg() {
00042   }
00043 };
00044 
00045 
00046 #endif

Generated on Mon Feb 27 19:59:21 2006 for channel by  doxygen 1.4.6-NO