[Previous] [Contents] [Index] [Next]

ds_set()

Set a data server variable

Synopsis:

#include <ds.h>

int ds_set( ds_t dsdes,
            const char * variable_name,
            const char * variable_data,
            size_t data_len );

Library:

ds3r.lib, ds3s.lib

Description:

The ds_set() function passes the data variable_data to the data server identified by dsdes. The data server stores the data in the variable whose name is given by variable_name, overwriting any existing value.

To display the modified data on an HTML page, use the qnxvar token with the read tag. See the description of slinger in the TCP/IP User's Guide.

Returns:

0
Success.
-1
An error occurred (errno is set).

Errors:

EBADF
Invalid file descriptor dsdes.
ENOMEM
Not enough memory to store the data.
ESRCH
The variable doesn't exist in the data server.

Examples:

See the chapter, Writing Data Server Applications.

Classification:

QNX 4

Safety:
Interrupt handler No
Signal handler Yes
Thread Yes

See also:

ds_create(), ds_flags(), ds_get()

slinger in the TCP/IP User's Guide


[Previous] [Contents] [Index] [Next]