Tekkotsu Homepage | Demos | Overview | Downloads | Dev. Resources | Reference | Credits |
ViewerConnection.hGo to the documentation of this file.00001 //-*-c++-*- 00002 #ifndef INCLUDED_ViewerConnection_h_ 00003 #define INCLUDED_ViewerConnection_h_ 00004 00005 #include <string> 00006 00007 #include "Shared/ProjectInterface.h" 00008 #include "Wireless/Wireless.h" 00009 00010 namespace DualCoding { 00011 00012 static const unsigned int DIALOG_BUFFER_SIZE=20000; 00013 00014 #if defined(TGT_ERS7) || defined(TGT_ERS2xx) || defined(TGT_ERS210) || defined(TGT_ERS220) 00015 static const unsigned int RLE_BUFFER_SIZE=70000; // Raised to 120000 for sketch<usint> in world space; then lowered to 70000 due to memory shortage 00016 #else 00017 static const unsigned int RLE_BUFFER_SIZE=500000; 00018 #endif 00019 00020 static const unsigned int CAM_LAYER=ProjectInterface::fullLayer; //!< the full resolution layer in the filter bank 00021 static const unsigned int CAM_CHANNEL=0; //!< corresponds to appropriate thresholding listed in tekkotsu.xml 00022 static const unsigned int WORLD_WIDTH=225; 00023 static const unsigned int WORLD_HEIGHT=225; 00024 00025 static const unsigned short CAM_DIALOG_PORT = 5800; 00026 static const unsigned short CAM_RLE_PORT = 5801; 00027 static const unsigned short LOCAL_DIALOG_PORT = 5802; 00028 static const unsigned short LOCAL_RLE_PORT = 5803; 00029 static const unsigned short WORLD_DIALOG_PORT = 5804; 00030 static const unsigned short WORLD_RLE_PORT = 5805; 00031 00032 class ViewerConnection { 00033 00034 private: 00035 Socket *dialogSock, *rleSock; 00036 int dialogPort, rlePort; 00037 00038 public: 00039 ViewerConnection(void) : dialogSock(NULL), rleSock(NULL), dialogPort(0), rlePort(0) {} 00040 00041 Socket *getDialogSocket() const { return dialogSock; } 00042 Socket *getRleSocket() const { return rleSock; } 00043 00044 void setDialogSocket(Socket* sock, int const port) { dialogSock = sock; dialogPort = port; } 00045 void setRleSocket(Socket* sock, int const port) { rleSock = sock; rlePort = port; } 00046 00047 void writeBigString(std::string const &msg); 00048 00049 private: 00050 ViewerConnection(const ViewerConnection&); //!< never call this 00051 ViewerConnection& operator=(const ViewerConnection&); //!< never call this 00052 00053 }; 00054 00055 } // namespace 00056 00057 #endif |
DualCoding 4.0 |
Generated Thu Nov 22 00:52:37 2007 by Doxygen 1.5.4 |