3 char *key_u32
= "test_u32";
5 /* SEF functions and variables. */
6 static void sef_local_startup(void);
8 /*===========================================================================*
10 *===========================================================================*/
15 char key
[DS_MAX_KEYLEN
];
22 /* SEF local startup. */
26 r
= ds_subscribe(key_u32
, DSF_INITIAL
);
27 if(r
!= OK
&& r
!= EEXIST
) {
28 printf("SUBSCRIBER: error in ds_subscribe: %d\n", r
);
33 /* Wait for a message. */
34 r
= sef_receive(ANY
, &mess
);
36 printf("SUBSCRIBER: sef_receive failed.\n");
39 /* Only handle notifications from DS. */
40 if(mess
.m_source
!= DS_PROC_NR
)
43 /* Check which one was changed. */
44 r
= ds_check(key
, &type
, NULL
);
46 printf("SUBSCRIBER: the key %s was deleted.\n",
51 printf("SUBSCRIBER: error in ds_check.\n");
55 /* Retrieve the entry. */
56 printf("SUBSCRIBER: key: %s, ", key
);
59 r
= ds_retrieve_u32(key
, &num
);
61 printf("error in ds_retrieve_u32.\n");
62 printf("U32: %d\n", num
);
65 r
= ds_retrieve_str(key
, string
, sizeof(string
)-1);
67 printf("error in ds_retrieve_str.\n");
68 printf("STR: %s\n", string
);
71 r
= ds_retrieve_mem(key
, buf
, &length
);
73 printf("error in ds_retrieve_mem.\n");
78 printf("error in type! %d\n", type
);
85 /*===========================================================================*
87 *===========================================================================*/
88 static void sef_local_startup()
90 /* Let SEF perform startup. */