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 1
19#define IGTL_HEADER_VERSION_2 2
20#define IGTL_HEADER_SIZE 58
21
22#define IGTL_HEADER_TYPE_SIZE 12
23#define IGTL_HEADER_NAME_SIZE 20
24
25/* Following macros will be obsolete. Included for old programs*/
26#define IGTL_HEADER_TYPESIZE IGTL_HEADER_TYPE_SIZE
27#define IGTL_HEADER_NAMESIZE IGTL_HEADER_NAME_SIZE
28#define IGTL_HEADER_DEVSIZE IGTL_HEADER_NAME_SIZE
29
30/* Device name prefix macro */
31#define IGTL_TYPE_PREFIX_NONE 0
32#define IGTL_TYPE_PREFIX_GET 1
33#define IGTL_TYPE_PREFIX_STT 2
34#define IGTL_TYPE_PREFIX_STP 3
35#define IGTL_TYPE_PREFIX_RTS 4
36#define IGTL_NUM_TYPE_PREFIX 5
37
38#include "igtl_types.h"
39#include "igtl_win32header.h"
40#include "igtlConfigure.h"
41
42#ifdef __cplusplus
43extern "C" {
44#endif
45
46#pragma pack(2) /* For 2-byte boundary in memory */
47
53typedef struct {
54 igtl_uint16 header_version; /* header version number */
55 char name[IGTL_HEADER_TYPE_SIZE]; /* data type name */
56 char device_name[IGTL_HEADER_NAME_SIZE]; /* device name */
57 igtl_uint64 timestamp; /* time stamp message */
58 igtl_uint64 body_size; /* size of the body */
59 igtl_uint64 crc; /* CRC */
61
62#if OpenIGTLink_HEADER_VERSION >= 2
67typedef struct {
68 igtl_uint16 extended_header_size; /* size of extended header */
69 igtl_uint16 meta_data_header_size; /* size of the meta data header*/
70 igtl_uint32 meta_data_size; /* size of meta data */
71 igtl_uint32 message_id; /* message id */
72} igtl_extended_header;
73
74typedef struct {
75 igtl_uint16 key_size;
76 igtl_uint16 value_encoding;
77 igtl_uint32 value_size;
78} igtl_metadata_header_entry;
79#endif
80
81#pragma pack()
82
87
88#if OpenIGTLink_HEADER_VERSION >= 2
92void igtl_export igtl_extended_header_convert_byte_order(igtl_extended_header * extended_header);
93#endif
94
95#ifdef __cplusplus
96}
97#endif
98
99#endif /* __IGTL_HEADER_H */
100
#define IGTL_HEADER_TYPE_SIZE
Definition igtl_header.h:22
void igtl_export igtl_header_convert_byte_order(igtl_header *header)
#define IGTL_HEADER_NAME_SIZE
Definition igtl_header.h:23
#define igtl_export
igtl_uint64 crc
Definition igtl_header.h:59
igtl_uint16 header_version
Definition igtl_header.h:54
igtl_uint64 body_size
Definition igtl_header.h:58
igtl_uint64 timestamp
Definition igtl_header.h:57

Generated for OpenIGTLink by Doxygen 1.9.8 written by Dimitri van Heesch, © 1997-2012