SPI Programming Manual (G06.24+, H06.03+, J06.03+)

SPI Programming Examples
SPI Programming Manual427506-006
E-81
Example E-18: Declarations for C Requesters and
Servers
Example E-18: Declarations for C Requesters and Servers
This C code contains common declarations used by the C requester and server
example programs.
Source File
SECRH
Example E-18. C File: SECRH Supporting Code
/* File name: secrh
** SPI EXAMPLE C Requester Declarations and variables.
*/
typedef struct
{
short msg_code,
param_count;
char param [1024];
} param_msg;
typedef struct
{
short len;
char data [200];
} string_template;
typedef struct
{
short len;
short command;
short index; /* Current index into the string */
string_template con_string; /* The converted string, so far */
} context_template;
startup_msg_type startup_msg;
string_template in_string; /* Input string */
context_template the_context; /* continuation context */
zspi_ddl_char50_def server_banner;
zspi_ddl_ssid_def my_ssid = {{ZSPI_VAL_TANDEM},
ZSPI_SSN_NULL, version};
short my_version = version;
#define req_buffer b1 /* Request buffer (same as b1) */