Basic Image AlgorithmS Library  2.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
UDPServerClientDefinitions.hh
1 #ifndef __UDPSERVERCLIENTDEFINTIONS__
2 #define __UDPSERVERCLIENTDEFINTIONS__
3 
4 #include <bias_config.h>
5 
6 #include "errno.h"
7 
8 #define syscallerror(x) \
9 { cerr << __FILE__ << " - " << x << endl; \
10 cerr << __FILE__ << " - Error code " << errno << " means: " << strerror(errno) << endl; }
11 
12 namespace BIAS
13 {
14 // the default packet size
15 const int UDP_PACKAGE_SIZE = 40000;
16 // maximum message number before restarting with 0
17 const int maxMessageNumber = 10000000;
18 
19 /**
20  @struct message_frame_header
21  @brief Header for sending images over UDP connections
22  @ingroup network
23  @author Ingo Thomsen
24 */
26 {
30 };
31 
32  //struct State {
33  // float t[3];
34  // float r[3];
35  // float cov[36];
36  // double time;
37  // bool tValid; // four byte
38  // bool rValid;
39  // char padding[4];
40  // };
41 
42  // class DataPacket {
43  // public:
44  // State State_;
45  // char Req_[16];
46  // };
47 
48 
49 /**
50  @struct ImageHeader
51  @brief Header for sending images over UDP connections
52  @ingroup network
53  @author Ingo Thomsen
54 */
55 struct BIASNetworkComm_EXPORT ImageHeader {
56  unsigned int Width_;
57  unsigned int Height_;
58  unsigned int ChannelCount_;
59  // SizeAndTypeID == 0:uncompresed image, use size = width*height*channelcount
60  // SizeAndTypeID != 0: compressed, use as Size
61  unsigned int SizeAndTypeID_;
62  double Time_;
63 };
64 
65 }//end namespace BIAS
66 #endif
const int maxMessageNumber
Header for sending images over UDP connections.
Header for sending images over UDP connections.
const int UDP_PACKAGE_SIZE