HIPC  0.5
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
msg.h
Go to the documentation of this file.
1 #ifndef HIPC_MSG_H
2 #define HIPC_MSG_H
3 
4 #include <stddef.h>
5 
6 #include <hipc.h>
7 
8 typedef unsigned char hipc_msg[HIPC_MSG_ALLOCSIZE];
9 
16 #define hipcMsgBdyP(msg) (&(msg)[HIPC_MSGHDR_SIZE])
17 
18 #ifdef __cplusplus
19 extern "C" {
20 #endif
21 
22  extern size_t hipcMsgTotalSize(const hipc_msg msg);
23  extern unsigned char hipcMsgBdySize(const hipc_msg msg);
24  extern const void *hipcMsgBdyPtr(const hipc_msg msg);
25  extern unsigned char hipcMsgType(const hipc_msg msg);
26  extern unsigned char hipcMsgOffset(const hipc_msg msg);
27  extern unsigned char hipcMsgStruno(const hipc_msg msg);
28  extern unsigned char hipcMsgRngsize(const hipc_msg msg);
29 
30 #ifdef __cplusplus
31 }
32 #endif
33 #endif
unsigned char hipc_msg[HIPC_MSG_ALLOCSIZE]
Definition: msg.h:8
size_t hipcMsgTotalSize(const hipc_msg msg)
Returns total size of a HIPC message, which is the header size plus the body size.
Definition: msg.c:9
unsigned char hipcMsgOffset(const hipc_msg msg)
Returns offset of a HIPC message.
Definition: msg.c:53
unsigned char hipcMsgBdySize(const hipc_msg msg)
Returns body size of a HIPC message.
Definition: msg.c:20
#define HIPC_MSG_ALLOCSIZE
Definition: hipc.h:47
unsigned char hipcMsgStruno(const hipc_msg msg)
Returns structure number of a HIPC message.
Definition: msg.c:64
unsigned char hipcMsgType(const hipc_msg msg)
Returns type of a HIPC message.
Definition: msg.c:42
unsigned char hipcMsgRngsize(const hipc_msg msg)
Returns range size of a HIPC message.
Definition: msg.c:75
const void * hipcMsgBdyPtr(const hipc_msg msg)
Returns a pointer to a body of a HIPC message.
Definition: msg.c:31