Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  
igtl_header.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: The OpenIGTLink Library
4  Language: C
5  Web page: http://openigtlink.org/
6 
7  Copyright (c) Insight Software Consortium. All rights reserved.
8 
9  This software is distributed WITHOUT ANY WARRANTY; without even
10  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11  PURPOSE. See the above copyright notices for more information.
12 
13 =========================================================================*/
14 
15 #ifndef __IGTL_HEADER_H
16 #define __IGTL_HEADER_H
17 
18 #define IGTL_HEADER_VERSION 1
19 #define IGTL_HEADER_SIZE 58
20 
21 #define IGTL_HEADER_TYPE_SIZE 12
22 #define IGTL_HEADER_NAME_SIZE 20
23 
24 /* Following macros will be obsolete. Included for old programs*/
25 #define IGTL_HEADER_TYPESIZE IGTL_HEADER_TYPE_SIZE
26 #define IGTL_HEADER_NAMESIZE IGTL_HEADER_NAME_SIZE
27 #define IGTL_HEADER_DEVSIZE IGTL_HEADER_NAME_SIZE
28 
29 /* Device name prefix macro */
30 #define IGTL_TYPE_PREFIX_NONE 0
31 #define IGTL_TYPE_PREFIX_GET 1
32 #define IGTL_TYPE_PREFIX_STT 2
33 #define IGTL_TYPE_PREFIX_STP 3
34 #define IGTL_TYPE_PREFIX_RTS 4
35 #define IGTL_NUM_TYPE_PREFIX 5
36 
37 #include "igtl_types.h"
38 #include "igtl_win32header.h"
39 
40 #ifdef __cplusplus
41 extern "C" {
42 #endif
43 
44 #pragma pack(1) /* For 1-byte boundary in memroy */
45 
51 typedef struct {
52  igtl_uint16 version; /* protocol version number */
53  char name[IGTL_HEADER_TYPE_SIZE]; /* data type name */
54  char device_name[IGTL_HEADER_NAME_SIZE]; /* device name */
55  igtl_uint64 timestamp; /* time stamp message */
56  igtl_uint64 body_size; /* size of the body */
57  igtl_uint64 crc; /* CRC */
58 } igtl_header;
59 
60 #pragma pack()
61 
66 
67 #ifdef __cplusplus
68 }
69 #endif
70 
71 #endif /* __IGTL_HEADER_H */
72 
#define igtl_export
igtl_uint64 body_size
Definition: igtl_header.h:56
igtl_uint64 timestamp
Definition: igtl_header.h:55
#define IGTL_HEADER_NAME_SIZE
Definition: igtl_header.h:22
igtl_uint16 version
Definition: igtl_header.h:52
#define IGTL_HEADER_TYPE_SIZE
Definition: igtl_header.h:21
igtl_uint64 crc
Definition: igtl_header.h:57
void igtl_export igtl_header_convert_byte_order(igtl_header *header)

Generated at Wed Dec 4 2013 03:48:27 for OpenIGTLink by doxygen 1.8.5 written by Dimitri van Heesch, © 1997-2012