Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/d/ds_create.html on line 1
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/d/ds_create.html on line 1
Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/d/ds_create.html on line 8
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/d/ds_create.html on line 8
Create a data server variable
#include <ds.h>
int ds_create( ds_t dsdes,
const char * variable_name,
char flags,
struct sigevent * sigevent );
- dsdes
- A data server descriptor returned by
ds_register().
- variable_name
- The name of the variable that you want to create.
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.
- flags
- Flags that specify the variable's behavior:
- DS_PERM —
don't delete the variable when the application that created it
terminates.
The variable is removed when the data server process
terminates, or if the flag is turned off after the application that created
the variable terminates.
If flags is 0, the variable is removed if you call
ds_deregister(),
or the process terminates.
- sigevent
- A pointer to a
sigevent
structure that describes a proxy or signal to be sent to the external
application that created the variable if the data referenced by the
variable changes; see below.
libds
Use the -l ds option to
qcc
to link against this library.
The ds_create() function creates a variable,
whose name is given by variable_name,
on the data server identified by dsdes.
If the data referenced by variable_name changes, a proxy or signal,
described in the sigevent structure,
can be sent to the external application that created
variable_name (see
ds_set()).
We recommend the following event types for use with this function:
- SIGEV_SIGNAL
- SIGEV_SIGNAL_CODE
- SIGEV_SIGNAL_THREAD
- SIGEV_PULSE
- SIGEV_INTR
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 Utilities Reference.
- 0
- Success.
- -1
- An error occurred (errno is set).
- EBADF
- Invalid file descriptor dsdes.
- EEXIST
- The variable name already exists in the data server.
- ENOMEM
- Not enough memory to create the variable or initialize the data.
See slinger
in the Utilities Reference.
QNX Neutrino
Safety: | |
Cancellation point |
Yes |
Interrupt handler |
No |
Signal handler |
Yes |
Thread |
Yes |
ds_flags(),
ds_get(),
ds_register(),
ds_set(),
sigevent
Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/d/ds_create.html on line 213
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/d/ds_create.html on line 213