Create a data server variable
#include <ds.h>
int ds_create( ds_t dsdes,
const char * variable_name,
char flags,
struct sigevent * sigevent );
ds3r.lib, ds3s.lib
The ds_create() function creates a variable, whose name is given by variable_name, on the data server identified by dsdes. The flags argument is used to specify the variable's behavior. The following flag constant is defined:
If flags is 0, the variable is removed if you call ds_deregister() or the process terminates.
All variables are global, so only one instance of the variable can exist in the data server process. The maximum length of a variable name is 60 characters.
If the data referenced by variable_name changes, a proxy or signal can be sent to the external application that created variable_name (see ds_set()).
In QNX 4, the sigevent structure pointed to by sigevent contains at least:
To display the current value of a variable on an HTML page, use the qnxvar token with the read tag. See the description of slinger in the TCP/IP User's Guide.
See the chapter, Writing Data Server Applications.
| Safety: | |
|---|---|
| Interrupt handler | No |
| Signal handler | Yes |
| Thread | Yes |
ds_deregister(), ds_flags(), ds_get(), ds_register(), ds_set()