#include <hipc/msgd.h>
Go to the source code of this file.
Functions | |
unsigned char | hipcMsgdBdySize (hipc_msgd const *const md_p) |
Returns body size of a HIPC message data. More... | |
unsigned char | hipcMsgdType (hipc_msgd const *const md_p) |
Returns type of a HIPC message data. More... | |
unsigned char | hipcMsgdStruno (hipc_msgd const *const md_p) |
Returns structure number of a HIPC message data. More... | |
unsigned char | hipcMsgdOffset (hipc_msgd const *const md_p) |
Returns offset of a HIPC message data. More... | |
unsigned char | hipcMsgdRngsize (hipc_msgd const *const md_p) |
Returns range size of a HIPC message data. More... | |
enum HIPC_errno | hipcGenmdUnstru (hipc_msgd *const md_p, const unsigned char type, const enum HIPC_errno hipc_errno, char *const errdtlstr, size_t errdtlstr_size) |
Initializes a HIPC message data as a unstructured type message. More... | |
enum HIPC_errno | hipcGenmdSuccessToGet (hipc_msgd *const mds_p, hipc_msgd const *const mdr_p, void *const stru_p, const size_t stru_size) |
Initializes mds_p as a response to mdr_p whose type must be GET. More... | |
enum HIPC_errno | hipcMsgdSetBdyForPut (hipc_msgd *const mdr_p, void *const stru_p, const size_t stru_size) |
Sets a body to a HIPC message data that contains a header of a PUT message. More... | |
unsigned char hipcMsgdBdySize | ( | hipc_msgd const *const | md_p | ) |
Returns body size of a HIPC message data.
md_p | pointer to a HIPC message data |
Definition at line 9 of file msgd.c.
References HIPC_msgdata::header, and hipcMsghdrBdysize().
Referenced by hipcsvsLedRun(), hipcsvsRtRun(), hipcUsocWriteMsgd(), and test_hipcMsgdBdySize_hipcMsgdBdyPtr().
unsigned char hipcMsgdType | ( | hipc_msgd const *const | md_p | ) |
Returns type of a HIPC message data.
md_p | pointer to a HIPC message data |
Definition at line 20 of file msgd.c.
References HIPC_msgdata::header, and HIPC_MSGHDR_BYTE_TYPE.
Referenced by hipcsvsLedRun(), hipcsvsRtRun(), and test_hipcMsgdType().
unsigned char hipcMsgdStruno | ( | hipc_msgd const *const | md_p | ) |
Returns structure number of a HIPC message data.
md_p | pointer to a HIPC message data |
Definition at line 31 of file msgd.c.
References HIPC_msgdata::header, and HIPC_MSGHDR_BYTE_STRUNO.
Referenced by hipcsvsLedRun(), hipcsvsRtRun(), and test_hipcMsgdStruno().
unsigned char hipcMsgdOffset | ( | hipc_msgd const *const | md_p | ) |
Returns offset of a HIPC message data.
md_p | pointer to a HIPC message data |
Definition at line 42 of file msgd.c.
References HIPC_msgdata::header, and HIPC_MSGHDR_BYTE_OFFSET.
Referenced by test_hipcMsgdOffset().
unsigned char hipcMsgdRngsize | ( | hipc_msgd const *const | md_p | ) |
Returns range size of a HIPC message data.
md_p | pointer to a HIPC message data |
Definition at line 53 of file msgd.c.
References HIPC_msgdata::header, and HIPC_MSGHDR_BYTE_BDYSZ.
Referenced by test_hipcMsgdRngsize().
enum HIPC_errno hipcGenmdUnstru | ( | hipc_msgd *const | md_p, |
const unsigned char | type, | ||
const enum HIPC_errno | hipc_errno, | ||
char *const | errdtlstr, | ||
size_t | errdtlstr_size | ||
) |
Initializes a HIPC message data as a unstructured type message.
md_p | pointer to a HIPC message data |
type | message type |
hipc_errno | HIPC error number |
errdtlstr | error detail string |
errdtlstr_size | size of the error detail string |
hipc_errno
. Definition at line 68 of file msgd.c.
References HIPC_msgdata::body_p, HIPC_msgdata::header, HIPC_MSGHDR_BYTE_BDYSZ, HIPC_MSGHDR_BYTE_OFFSET, HIPC_MSGHDR_BYTE_STRUNO, HIPC_MSGHDR_BYTE_TYPE, and HIPC_UNSTRU.
Referenced by test_hipcGenmdUnstru().
enum HIPC_errno hipcGenmdSuccessToGet | ( | hipc_msgd *const | mds_p, |
hipc_msgd const *const | mdr_p, | ||
void *const | stru_p, | ||
const size_t | stru_size | ||
) |
Initializes mds_p
as a response to mdr_p
whose type must be GET.
stru_p
should be the beginning of a structure specified by the GET message.
mds_p | pointer to a HIPC message data to be sent |
mdr_p | pointer to a HIPC message data received |
stru_p | pointer to a structure object |
stru_size | size of the structure object |
Definition at line 102 of file msgd.c.
References HIPC_msgdata::body_p, HIPC_msgdata::header, HIPC_ERR_S_INV_RW_RANGE, HIPC_MESSAGE_TYPE_SUCCESS, HIPC_MSGHDR_BYTE_BDYSZ, HIPC_MSGHDR_BYTE_OFFSET, HIPC_MSGHDR_BYTE_STRUNO, HIPC_MSGHDR_BYTE_TYPE, and HIPC_SUCCESS.
Referenced by hipcsvsLedRun(), hipcsvsRtRun(), and test_hipcGenmdSuccessToGet().
enum HIPC_errno hipcMsgdSetBdyForPut | ( | hipc_msgd *const | mdr_p, |
void *const | stru_p, | ||
const size_t | stru_size | ||
) |
Sets a body to a HIPC message data that contains a header of a PUT message.
The body will be a part of stru_p
. stru_p
should be the beginning of a structure which is specified by the header of md_p
so that the following statement reads the body of the PUT message into correct place.
hipcUsocRead(so_p, hipcMsgdBdyPtr(md_p), hipcMsgdBdySize(md_p));
mdr_p | pointer to a HIPC message data |
stru_p | pointer to a structure object |
stru_size | size of the structure object |
Definition at line 140 of file msgd.c.
References HIPC_msgdata::body_p, HIPC_msgdata::header, HIPC_ERR_S_INV_RW_RANGE, HIPC_MSGHDR_BYTE_BDYSZ, HIPC_MSGHDR_BYTE_OFFSET, and HIPC_SUCCESS.
Referenced by hipcsvsLedRun(), hipcsvsRtRun(), and test_hipcMsgdSetBdyForPut().