HIPC  0.5
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
Functions | Variables
test_client.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <stdint.h>
#include <hipc/client.h>
Include dependency graph for test_client.c:

Go to the source code of this file.

Functions

static void test_hipcClientInit (void)
 
static void msgWithStr (hipc_msg msg, unsigned char type, unsigned char const hipc_errno, char const *const str)
 
static void test_hipcClientFeedSysmsg (void)
 
static enum HIPC_errno setupTestClient (struct HIPC_client *const cl_p)
 
static void test_hipcClientFeedStrumsg (void)
 
static void test_hipcClientFeedUnstrumsgAsError (void)
 
static void test_hipcClientGetNsysmsg (void)
 
int main (int argc, char *argv[])
 

Variables

const struct HIPC_cl_indp_mbr HIPCUD_test_indp_member_log []
 
const struct HIPC_cl_indp_mbr HIPCUD_test_indp_member_ctl []
 
const struct HIPC_cl_indp_stru HIPCUD_test_indp_struct []
 
const struct HIPC_cl_indp HIPCUD_test_indp
 
unsigned char HIPCUD_test_cmdp_log_offset []
 
unsigned char HIPCUD_test_cmdp_log_size []
 
unsigned char HIPCUD_test_cmdp_ctl_offset []
 
unsigned char HIPCUD_test_cmdp_ctl_size []
 
struct HIPC_cl_dp_stru HIPCUD_test_cmdp_struct []
 
unsigned char HIPCUD_test_structsizes []
 
struct HIPC_cl_dp HIPCUD_test_cmdp
 

Function Documentation

static void test_hipcClientInit ( void  )
static

Definition at line 59 of file test_client.c.

References HIPC_client::cmdp_p, HIPC_cl_dp::endian, HIPC_ERR_INV_BASE_CLIENT, HIPC_SUCCESS, hipcClientInit(), hipcClientTerminate(), HIPC_client::indp_p, HIPC_cl_indp::n_struct, HIPC_client::smdp_p, and HIPC_cl_dp::struct_size_p.

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

static void msgWithStr ( hipc_msg  msg,
unsigned char  type,
unsigned char const  hipc_errno,
char const *const  str 
)
static

Definition at line 91 of file test_client.c.

References HIPC_MSGHDR_BYTE_BDYSZ, HIPC_MSGHDR_BYTE_OFFSET, HIPC_MSGHDR_BYTE_STRUNO, HIPC_MSGHDR_BYTE_TYPE, HIPC_MSGHDR_SIZE, and HIPC_UNSTRU.

Referenced by test_hipcClientFeedUnstrumsgAsError().

Here is the caller graph for this function:

static void test_hipcClientFeedSysmsg ( void  )
static
static enum HIPC_errno setupTestClient ( struct HIPC_client *const  cl_p)
static

Definition at line 205 of file test_client.c.

References HIPC_client::cmdp_p, HIPC_SUCCESS, hipcClientInit(), HIPCUD_test_cmdp, HIPCUD_test_indp, HIPC_client::indp_p, and HIPC_client::smdp_p.

Referenced by test_hipcClientFeedStrumsg(), test_hipcClientFeedUnstrumsgAsError(), and test_hipcClientGetNsysmsg().

Here is the call graph for this function:

Here is the caller graph for this function:

static void test_hipcClientFeedStrumsg ( void  )
static
static void test_hipcClientFeedUnstrumsgAsError ( void  )
static
static void test_hipcClientGetNsysmsg ( void  )
static

Definition at line 288 of file test_client.c.

References HIPC_SUCCESS, hipcClientGetNsysmsg(), and setupTestClient().

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

int main ( int  argc,
char *  argv[] 
)

Variable Documentation

const struct HIPC_cl_indp_mbr HIPCUD_test_indp_member_log[]
Initial value:
= {
{HIPC_MBR_SIMPLE, "tick"},
{HIPC_MBR_SIMPLE, "count"},
{HIPC_MBR_SIMPLE, "diff"},
}

Definition at line 9 of file test_client.c.

const struct HIPC_cl_indp_mbr HIPCUD_test_indp_member_ctl[]
Initial value:
= {
{HIPC_MBR_SIMPLE, "enable"},
{HIPC_MBR_SIMPLE, "diff"},
}

Definition at line 15 of file test_client.c.

const struct HIPC_cl_indp_stru HIPCUD_test_indp_struct[]
Initial value:
= {
{3, "test_log", HIPCUD_test_indp_member_log},
{2, "test_ctl", HIPCUD_test_indp_member_ctl},
}
const struct HIPC_cl_indp_mbr HIPCUD_test_indp_member_log[]
Definition: test_client.c:9
const struct HIPC_cl_indp_mbr HIPCUD_test_indp_member_ctl[]
Definition: test_client.c:15

Definition at line 20 of file test_client.c.

const struct HIPC_cl_indp HIPCUD_test_indp
Initial value:
= {
NULL, 0, 5, 2, HIPCUD_test_indp_struct
}
const struct HIPC_cl_indp_stru HIPCUD_test_indp_struct[]
Definition: test_client.c:20

Definition at line 25 of file test_client.c.

Referenced by setupTestClient(), and test_hipcClientFeedSysmsg().

unsigned char HIPCUD_test_cmdp_log_offset[]
Initial value:
= {
0, 4, 8,
}

Definition at line 30 of file test_client.c.

unsigned char HIPCUD_test_cmdp_log_size[]
Initial value:
= {
2, 4, 4,
}

Definition at line 34 of file test_client.c.

unsigned char HIPCUD_test_cmdp_ctl_offset[]
Initial value:
= {
0, 4,
}

Definition at line 38 of file test_client.c.

unsigned char HIPCUD_test_cmdp_ctl_size[]
Initial value:
= {
1, 4,
}

Definition at line 42 of file test_client.c.

struct HIPC_cl_dp_stru HIPCUD_test_cmdp_struct[]
Initial value:
= {
}
unsigned char HIPCUD_test_cmdp_log_size[]
Definition: test_client.c:34
unsigned char HIPCUD_test_cmdp_ctl_offset[]
Definition: test_client.c:38
unsigned char HIPCUD_test_cmdp_log_offset[]
Definition: test_client.c:30
unsigned char HIPCUD_test_cmdp_ctl_size[]
Definition: test_client.c:42

Definition at line 46 of file test_client.c.

unsigned char HIPCUD_test_structsizes[]
Initial value:
= {
12, 8,
}

Definition at line 51 of file test_client.c.

struct HIPC_cl_dp HIPCUD_test_cmdp
Initial value:
= {
}
unsigned char HIPCUD_test_structsizes[]
Definition: test_client.c:51
struct HIPC_cl_dp_stru HIPCUD_test_cmdp_struct[]
Definition: test_client.c:46

Definition at line 55 of file test_client.c.

Referenced by setupTestClient().