gtpc2m9r | C/C++ Language Support User's Guide |
This function inserts a header, in correct format for the wtopc function to use, into a 12-byte field pointed to by the buffer_ptr parameter.
Format
#include <tpfapi.h> void wtopc_insert_header(char * buffer_ptr, char * prefix_ptr, short int number, char letter, enum t_wtopc_time time);
Table 35. wtopc_insert_header letter parameter
Value Name | Letter | Description |
---|---|---|
# define WTOPC_INFO | I | Informational message |
#define WTOPC_WARNING | W | Attention message |
#define WTOPC_ERROR | E | Error message |
This field has a default (NULL entered) of WTOPC_SUBSYS_TIME.
Normal Return
Void.
Error Return
Not applicable.
Programming Considerations
This function is designed to simplify parameter coding for the wtopc function.
Examples
The following example sets up a header for the wtopc function to use.
#include <tpfapi.h>
·
·
·
struct wtopc_header header_buffer;
·
·
·
wtopc_insert_header(&header_buffer, "C000", 2, 'A', WTOPC_SYS_TIME);
·
·
·
The following example sets up a header for the wtopc function to use. A NULL is entered as one of the parameters.
#include <tpfapi.h>
·
·
·
struct wtopc_header header_buffer;
·
·
·
wtopc_insert_header(&header_buffer, NULL, 2, 'A', WTOPC_SYS_TIME);
·
·
·
Related Information