cMsg Messaging System  5.2
 All Files Functions Variables Typedefs Enumerator Macros
cMsg.h
Go to the documentation of this file.
1 /*----------------------------------------------------------------------------*
2  *
3  * Copyright (c) 2004 Southeastern Universities Research Association, *
4  * Thomas Jefferson National Accelerator Facility *
5  * *
6  * This software was developed under a United States Government license *
7  * described in the NOTICE file included as part of this distribution. *
8  * *
9  * E.Wolin, 14-Jul-2004, Jefferson Lab *
10  * *
11  * Authors: Elliott Wolin *
12  * wolin@jlab.org Jefferson Lab, MS-6B *
13  * Phone: (757) 269-7365 12000 Jefferson Ave. *
14  * Fax: (757) 269-5800 Newport News, VA 23606 *
15  * *
16  * Carl Timmer *
17  * timmer@jlab.org Jefferson Lab, MS-6B *
18  * Phone: (757) 269-5130 12000 Jefferson Ave. *
19  * Fax: (757) 269-5800 Newport News, VA 23606 *
20  * *
21  * Description: *
22  * *
23  * Defines cMsg API and return codes *
24  * *
25  * *
26  *----------------------------------------------------------------------------*/
27 
98 #ifndef _cMsg_h
99 #define _cMsg_h
100 
101 
102 /* required includes */
103 #include <stdlib.h>
104 #include <time.h>
105 #ifndef _cMsgConstants_h
106 #include "cMsgConstants.h"
107 #endif
108 
109 #include <inttypes.h>
110 
112 typedef void *cMsgSubscribeConfig;
113 
115 typedef void (cMsgShutdownHandler) (void *userArg);
116 
118 typedef void (cMsgCallbackFunc) (void *msg, void *userArg);
119 
120 /* function prototypes */
121 #ifdef __cplusplus
122 extern "C" {
123 #endif
124 
125 
126  /* basic functions */
127  int cMsgConnect (const char *myUDL, const char *myName, const char *myDescription,
128  void **domainId);
129  int cMsgReconnect (void *domainId);
130  int cMsgSend (void *domainId, void *msg);
131  int cMsgSyncSend (void *domainId, void *msg, const struct timespec *timeout, int *response);
132  int cMsgFlush (void *domainId, const struct timespec *timeout);
133  int cMsgSubscribe (void *domainId, const char *subject, const char *type, cMsgCallbackFunc *callback,
134  void *userArg, cMsgSubscribeConfig *config, void **handle);
135  int cMsgUnSubscribe (void *domainId, void *handle);
136  int cMsgSubscriptionPause (void *domainId, void *handle);
137  int cMsgSubscriptionResume(void *domainId, void *handle);
138  int cMsgSubscriptionQueueClear(void *domainId, void *handle);
139  int cMsgSubscriptionQueueCount(void *domainId, void *handle, int *count);
140  int cMsgSubscriptionQueueIsFull(void *domainId, void *handle, int *full);
141  int cMsgSubscriptionMessagesTotal(void *domainId, void *handle, int *total);
142  int cMsgSendAndGet (void *domainId, void *sendMsg, const struct timespec *timeout, void **replyMsg);
143  int cMsgSubscribeAndGet (void *domainId, const char *subject, const char *type,
144  const struct timespec *timeout, void **replyMsg);
145  int cMsgMonitor (void *domainId, const char *command, void **replyMsg);
146  int cMsgReceiveStart (void *domainId);
147  int cMsgReceiveStop (void *domainId);
148  int cMsgDisconnect (void **domainId);
149  int cMsgSetShutdownHandler(void *domainId, cMsgShutdownHandler *handler, void *userArg);
150  int cMsgShutdownClients (void *domainId, const char *client, int flag);
151  int cMsgShutdownServers (void *domainId, const char *server, int flag);
152  int cMsgGetConnectState (void *domainId, int *connectState);
153  int cMsgSetUDL (void *domainId, const char *udl);
154  int cMsgGetCurrentUDL (void *domainId, const char **udl);
155  int cMsgGetServerHost (void *domainId, const char **ipAddress);
156  int cMsgGetServerPort (void *domainId, int *port);
157  int cMsgGetInfo (void *domainId, const char *command, char **string);
158  char *cMsgPerror (int errorCode);
159 
160 
161  /* message access functions */
162  int cMsgFreeMessage (void **vmsg);
163  void *cMsgCreateMessage (void);
164  void *cMsgCreateNewMessage (const void *vmsg);
165  void *cMsgCopyMessage (const void *vmsg);
166  int cMsgInitMessage (void *vmsg);
167  void *cMsgCreateResponseMessage(const void *vmsg);
168  void *cMsgCreateNullResponseMessage(const void *vmsg);
169  int cMsgWasSent (const void *vmsg, int *hasBeenSent);
170 
171  int cMsgGetVersion (const void *vmsg, int *version);
172  int cMsgGetGetRequest (const void *vmsg, int *getRequest);
173 
174  int cMsgSetGetResponse ( void *vmsg, int getReponse);
175  int cMsgGetGetResponse (const void *vmsg, int *getReponse);
176 
177  int cMsgSetNullGetResponse ( void *vmsg, int nullGetResponse);
178  int cMsgGetNullGetResponse (const void *vmsg, int *nullGetResponse);
179 
180  int cMsgGetDomain (const void *vmsg, const char **domain);
181  int cMsgGetPayloadText (const void *vmsg, const char **payloadText);
182 
183  int cMsgSetSubject ( void *vmsg, const char *subject);
184  int cMsgGetSubject (const void *vmsg, const char **subject);
185 
186  int cMsgSetType ( void *vmsg, const char *type);
187  int cMsgGetType (const void *vmsg, const char **type);
188 
189  int cMsgSetText ( void *vmsg, const char *text);
190  int cMsgGetText (const void *vmsg, const char **text);
191 
192  int cMsgSetUserInt ( void *vmsg, int userInt);
193  int cMsgGetUserInt (const void *vmsg, int *userInt);
194 
195  int cMsgSetUserTime ( void *vmsg, const struct timespec *userTime);
196  int cMsgGetUserTime (const void *vmsg, struct timespec *userTime);
197 
198  int cMsgGetSender (const void *vmsg, const char **sender);
199  int cMsgGetSenderHost (const void *vmsg, const char **senderHost);
200  int cMsgGetSenderTime (const void *vmsg, struct timespec *senderTime);
201 
202  int cMsgGetReceiver (const void *vmsg, const char **receiver);
203  int cMsgGetReceiverHost (const void *vmsg, const char **receiverHost);
204  int cMsgGetReceiverTime (const void *vmsg, struct timespec *receiverTime);
205 
206  int cMsgSetByteArrayLength ( void *vmsg, int length);
207  int cMsgResetByteArrayLength ( void *vmsg);
208  int cMsgGetByteArrayLength (const void *vmsg, int *length);
209  int cMsgGetByteArrayLengthFull(const void *vmsg, int *length);
210 
211  int cMsgSetByteArrayOffset ( void *vmsg, int offset);
212  int cMsgGetByteArrayOffset (const void *vmsg, int *offset);
213 
214  int cMsgSetByteArrayEndian ( void *vmsg, int endian);
215  int cMsgGetByteArrayEndian (const void *vmsg, int *endian);
216  int cMsgNeedToSwap (const void *vmsg, int *swap);
217 
218  int cMsgSetByteArray ( void *vmsg, char *array, int length);
219  int cMsgSetByteArrayNoCopy ( void *vmsg, char *array, int length);
220  int cMsgGetByteArray (const void *vmsg, char **array);
221 
222  int cMsgSetReliableSend ( void *vmsg, int boolean);
223  int cMsgGetReliableSend ( void *vmsg, int *boolean);
224 
225  /* message context stuff */
226  int cMsgGetSubscriptionDomain (const void *vmsg, const char **domain);
227  int cMsgGetSubscriptionSubject(const void *vmsg, const char **subject);
228  int cMsgGetSubscriptionType (const void *vmsg, const char **type);
229  int cMsgGetSubscriptionUDL (const void *vmsg, const char **udl);
230  int cMsgGetSubscriptionCueSize(const void *vmsg, int *size);
231 
232  /* misc. */
233  int cMsgToString (const void *vmsg, char **string);
234  int cMsgToString2 (const void *vmsg, char **string, int binary,
235  int compact, int noSystemFields);
236  int cMsgPayloadToString (const void *vmsg, char **string, int binary,
237  int compact, int noSystemFields);
238  void cMsgTrim (char *s);
239  void cMsgTrimChar (char *s, char trimChar);
240  void cMsgTrimDoubleChars (char *s, char trimChar);
241 
242  /* ***************************************** */
243  /* compound payload stuff - 66 user routines */
244  /* ***************************************** */
245  int cMsgAddHistoryToPayloadText ( void *vmsg, char *name, char *host, int64_t time, char **pTxt);
246  int cMsgSetHistoryLengthMax ( void *vmsg, int len);
247  int cMsgGetHistoryLengthMax (const void *vmsg, int *len);
248 
249  int cMsgPayloadGet (const void *vmsg, char **names, int *types, int len);
250  int cMsgPayloadGetInfo (const void *vmsg, char ***names, int **types, int *len);
251  int cMsgPayloadGetCount (const void *vmsg, int *count);
252  int cMsgPayloadContainsName (const void *vmsg, const char *name);
253  int cMsgPayloadGetType (const void *vmsg, const char *name, int *type);
254  int cMsgPayloadRemove ( void *vmsg, const char *name);
255  int cMsgPayloadCopy (const void *vmsgFrom, void *vmsgTo);
256 
257  int cMsgPayloadUpdateText (const void *vmsg);
258  int cMsgPayloadGetFieldText (const void *vmsg, const char *name, const char **val);
259  void cMsgPayloadPrint (const void *vmsg);
260 
261 const char *cMsgPayloadFieldDescription(const void *vmsg, const char *name);
262 
263  /* users should NOT have access to these 3 routines */
264  int cMsgPayloadSetFromText ( void *vmsg, const char *text);
265  int cMsgPayloadSetSystemFieldsFromText ( void *vmsg, const char *text);
266  int cMsgPayloadSetAllFieldsFromText (void *vmsg, const char *text);
267 
268  void cMsgPayloadReset ( void *vmsg);
269  void cMsgPayloadClear ( void *vmsg);
270  int cMsgHasPayload (const void *vmsg, int *hasPayload);
271 
272  int cMsgGetBinary (const void *vmsg, const char *name, const char **val,
273  int *len, int *endian);
274  int cMsgGetBinaryArray (const void *vmsg, const char *name, const char ***vals,
275  int **sizes, int **endians, int *count);
276 
277  int cMsgGetMessage (const void *vmsg, const char *name, const void **val);
278  int cMsgGetMessageArray (const void *vmsg, const char *name, const void ***val, int *len);
279 
280  int cMsgGetString (const void *vmsg, const char *name, const char **val);
281  int cMsgGetStringArray (const void *vmsg, const char *name, const char ***array, int *len);
282 
283  int cMsgGetFloat (const void *vmsg, const char *name, float *val);
284  int cMsgGetFloatArray (const void *vmsg, const char *name, const float **vals, int *len);
285  int cMsgGetDouble (const void *vmsg, const char *name, double *val);
286  int cMsgGetDoubleArray (const void *vmsg, const char *name, const double **vals, int *len);
287 
288  int cMsgGetInt8 (const void *vmsg, const char *name, int8_t *val);
289  int cMsgGetInt16 (const void *vmsg, const char *name, int16_t *val);
290  int cMsgGetInt32 (const void *vmsg, const char *name, int32_t *val);
291  int cMsgGetInt64 (const void *vmsg, const char *name, int64_t *val);
292  int cMsgGetUint8 (const void *vmsg, const char *name, uint8_t *val);
293  int cMsgGetUint16 (const void *vmsg, const char *name, uint16_t *val);
294  int cMsgGetUint32 (const void *vmsg, const char *name, uint32_t *val);
295  int cMsgGetUint64 (const void *vmsg, const char *name, uint64_t *val);
296 
297  int cMsgGetInt8Array (const void *vmsg, const char *name, const int8_t **vals, int *len);
298  int cMsgGetInt16Array (const void *vmsg, const char *name, const int16_t **vals, int *len);
299  int cMsgGetInt32Array (const void *vmsg, const char *name, const int32_t **vals, int *len);
300  int cMsgGetInt64Array (const void *vmsg, const char *name, const int64_t **vals, int *len);
301  int cMsgGetUint8Array (const void *vmsg, const char *name, const uint8_t **vals, int *len);
302  int cMsgGetUint16Array (const void *vmsg, const char *name, const uint16_t **vals, int *len);
303  int cMsgGetUint32Array (const void *vmsg, const char *name, const uint32_t **vals, int *len);
304  int cMsgGetUint64Array (const void *vmsg, const char *name, const uint64_t **vals, int *len);
305 
306  int cMsgAddInt8 ( void *vmsg, const char *name, int8_t val);
307  int cMsgAddInt16 ( void *vmsg, const char *name, int16_t val);
308  int cMsgAddInt32 ( void *vmsg, const char *name, int32_t val);
309  int cMsgAddInt64 ( void *vmsg, const char *name, int64_t val);
310  int cMsgAddUint8 ( void *vmsg, const char *name, uint8_t val);
311  int cMsgAddUint16 ( void *vmsg, const char *name, uint16_t val);
312  int cMsgAddUint32 ( void *vmsg, const char *name, uint32_t val);
313  int cMsgAddUint64 ( void *vmsg, const char *name, uint64_t val);
314 
315  int cMsgAddInt8Array ( void *vmsg, const char *name, const int8_t vals[], int len);
316  int cMsgAddInt16Array ( void *vmsg, const char *name, const int16_t vals[], int len);
317  int cMsgAddInt32Array ( void *vmsg, const char *name, const int32_t vals[], int len);
318  int cMsgAddInt64Array ( void *vmsg, const char *name, const int64_t vals[], int len);
319  int cMsgAddUint8Array ( void *vmsg, const char *name, const uint8_t vals[], int len);
320  int cMsgAddUint16Array ( void *vmsg, const char *name, const uint16_t vals[], int len);
321  int cMsgAddUint32Array ( void *vmsg, const char *name, const uint32_t vals[], int len);
322  int cMsgAddUint64Array ( void *vmsg, const char *name, const uint64_t vals[], int len);
323 
324  int cMsgAddString ( void *vmsg, const char *name, const char *val);
325  int cMsgAddStringArray ( void *vmsg, const char *name, const char **vals, int len);
326 
327  int cMsgAddFloat ( void *vmsg, const char *name, float val);
328  int cMsgAddDouble ( void *vmsg, const char *name, double val);
329  int cMsgAddFloatArray ( void *vmsg, const char *name, const float vals[], int len);
330  int cMsgAddDoubleArray ( void *vmsg, const char *name, const double vals[], int len);
331 
332  int cMsgAddBinary ( void *vmsg, const char *name, const char *src, int size, int endian);
333  int cMsgAddBinaryArray ( void *vmsg, const char *name, const char *src[], int number,
334  const int size[], const int endian[]);
335  int cMsgAddMessage ( void *vmsg, const char *name, const void *vmessage);
336  int cMsgAddMessageArray ( void *vmsg, const char *name, const void *vmessage[], int len);
337 
338  char *cMsgFloatChars(float f);
339  char *cMsgDoubleChars(double d);
340  char *cMsgIntChars(uint32_t i);
341 
342 
343  /* system and domain info access functions */
344  int cMsgGetUDL (void *domainId, char **udl);
345  int cMsgGetName (void *domainId, char **name);
346  int cMsgGetDescription (void *domainId, char **description);
347  int cMsgGetReceiveState(void *domainId, int *receiveState);
348 
349 
350  /* subscribe configuration functions */
353 
354  int cMsgSubscribeSetMaxCueSize (cMsgSubscribeConfig *config, int size);
355  int cMsgSubscribeGetMaxCueSize (cMsgSubscribeConfig *config, int *size);
356 
357  int cMsgSubscribeSetSkipSize (cMsgSubscribeConfig *config, int size);
358  int cMsgSubscribeGetSkipSize (cMsgSubscribeConfig *config, int *size);
359 
360  int cMsgSubscribeSetMaySkip (cMsgSubscribeConfig *config, int maySkip);
361  int cMsgSubscribeGetMaySkip (cMsgSubscribeConfig *config, int *maySkip);
362 
363  int cMsgSubscribeSetMustSerialize (cMsgSubscribeConfig *config, int serialize);
364  int cMsgSubscribeGetMustSerialize (cMsgSubscribeConfig *config, int *serialize);
365 
366  int cMsgSubscribeSetMaxThreads (cMsgSubscribeConfig *config, int threads);
367  int cMsgSubscribeGetMaxThreads (cMsgSubscribeConfig *config, int *threads);
368 
371 
372  int cMsgSubscribeSetStackSize (cMsgSubscribeConfig *config, size_t size);
373  int cMsgSubscribeGetStackSize (cMsgSubscribeConfig *config, size_t *size);
374 
375 
376  /* for debugging */
377  int cMsgSetDebugLevel(int level);
378 
379 
380 #ifdef __cplusplus
381 }
382 #endif
383 
384 
385 #endif /* _cMsg_h */
int cMsgGetInfo(void *domainId, const char *command, char **string)
Definition: cMsg.c:1035
int cMsgSubscribeGetMaxThreads(cMsgSubscribeConfig *config, int *threads)
Definition: cMsg.c:6407
int cMsgGetSenderHost(const void *vmsg, const char **senderHost)
Definition: cMsg.c:4453
int cMsgGetUint64Array(const void *vmsg, const char *name, const uint64_t **vals, int *len)
Definition: cMsgCompoundPayload.c:3525
int cMsgAddInt8Array(void *vmsg, const char *name, const int8_t vals[], int len)
Definition: cMsgCompoundPayload.c:5327
int cMsgPayloadContainsName(const void *vmsg, const char *name)
Definition: cMsgCompoundPayload.c:835
int cMsgWasSent(const void *vmsg, int *hasBeenSent)
Definition: cMsg.c:3534
int cMsgGetDoubleArray(const void *vmsg, const char *name, const double **vals, int *len)
Definition: cMsgCompoundPayload.c:3035
int cMsgGetBinaryArray(const void *vmsg, const char *name, const char ***vals, int **sizes, int **endians, int *count)
Definition: cMsgCompoundPayload.c:2701
int cMsgSubscriptionMessagesTotal(void *domainId, void *handle, int *total)
Definition: cMsg.c:1661
int cMsgReconnect(void *domainId)
Definition: cMsg.c:1239
int cMsgGetSubscriptionDomain(const void *vmsg, const char **domain)
Definition: cMsg.c:5912
int cMsgGetUint64(const void *vmsg, const char *name, uint64_t *val)
Definition: cMsgCompoundPayload.c:3293
int cMsgGetSubscriptionUDL(const void *vmsg, const char **udl)
Definition: cMsg.c:6003
int cMsgSend(void *domainId, void *msg)
Definition: cMsg.c:1331
int cMsgGetMessage(const void *vmsg, const char *name, const void **val)
Definition: cMsgCompoundPayload.c:2755
int cMsgGetSubscriptionType(const void *vmsg, const char **type)
Definition: cMsg.c:5973
const char * cMsgPayloadFieldDescription(const void *vmsg, const char *name)
Definition: cMsgCompoundPayload.c:2169
int cMsgGetHistoryLengthMax(const void *vmsg, int *len)
Definition: cMsg.c:3488
void cMsgPayloadPrint(const void *vmsg)
Definition: cMsgCompoundPayload.c:2272
int cMsgAddInt64(void *vmsg, const char *name, int64_t val)
Definition: cMsgCompoundPayload.c:4775
int cMsgSyncSend(void *domainId, void *msg, const struct timespec *timeout, int *response)
Definition: cMsg.c:1370
int cMsgMonitor(void *domainId, const char *command, void **replyMsg)
Definition: cMsg.c:1770
int cMsgSetUserInt(void *vmsg, int userInt)
Definition: cMsg.c:3923
int cMsgPayloadGetInfo(const void *vmsg, char ***names, int **types, int *len)
Definition: cMsgCompoundPayload.c:1010
int cMsgSetUserTime(void *vmsg, const struct timespec *userTime)
Definition: cMsg.c:3964
void cMsgPayloadReset(void *vmsg)
Definition: cMsgCompoundPayload.c:654
int cMsgSetShutdownHandler(void *domainId, cMsgShutdownHandler *handler, void *userArg)
Definition: cMsg.c:1903
int cMsgGetServerHost(void *domainId, const char **ipAddress)
Definition: cMsg.c:972
int cMsgGetUserTime(const void *vmsg, struct timespec *userTime)
Definition: cMsg.c:3984
int cMsgSetGetResponse(void *vmsg, int getResponse)
Definition: cMsg.c:3582
void cMsgTrimDoubleChars(char *s, char trimChar)
Definition: cMsg.c:271
void * cMsgCreateResponseMessage(const void *vmsg)
Definition: cMsg.c:3413
int cMsgSetUDL(void *domainId, const char *UDL)
Definition: cMsg.c:891
int cMsgGetText(const void *vmsg, const char **text)
Definition: cMsg.c:3896
int cMsgSetHistoryLengthMax(void *vmsg, int len)
Definition: cMsg.c:3508
int cMsgSubscribeGetStackSize(cMsgSubscribeConfig *config, size_t *size)
Definition: cMsg.c:6505
void( cMsgCallbackFunc)(void *msg, void *userArg)
Definition: cMsg.h:118
int cMsgSetDebugLevel(int level)
Definition: cMsg.c:2163
int cMsgGetNullGetResponse(const void *vmsg, int *nullGetResponse)
Definition: cMsg.c:3657
int cMsgPayloadSetFromText(void *vmsg, const char *text)
Definition: cMsgCompoundPayload.c:2488
int cMsgSubscribeAndGet(void *domainId, const char *subject, const char *type, const struct timespec *timeout, void **replyMsg)
Definition: cMsg.c:1734
int cMsgGetString(const void *vmsg, const char *name, const char **val)
Definition: cMsgCompoundPayload.c:3553
char * cMsgFloatChars(float f)
Definition: cMsgCompoundPayload.c:357
int cMsgGetBinary(const void *vmsg, const char *name, const char **val, int *size, int *endian)
Definition: cMsgCompoundPayload.c:2643
int cMsgAddUint16Array(void *vmsg, const char *name, const uint16_t vals[], int len)
Definition: cMsgCompoundPayload.c:5442
int cMsgGetReceiverTime(const void *vmsg, struct timespec *receiverTime)
Definition: cMsg.c:4559
int cMsgGetStringArray(const void *vmsg, const char *name, const char ***array, int *len)
Definition: cMsgCompoundPayload.c:3603
int cMsgToString(const void *vmsg, char **string)
Definition: cMsg.c:4584
int cMsgShutdownServers(void *domainId, const char *server, int flag)
Definition: cMsg.c:1970
int cMsgPayloadUpdateText(const void *vmsg)
Definition: cMsgCompoundPayload.c:1210
int cMsgGetInt32(const void *vmsg, const char *name, int32_t *val)
Definition: cMsgCompoundPayload.c:3165
int cMsgGetFloat(const void *vmsg, const char *name, float *val)
Definition: cMsgCompoundPayload.c:2904
int cMsgGetByteArray(const void *vmsg, char **array)
Definition: cMsg.c:4402
int cMsgSubscribeGetMessagesPerThread(cMsgSubscribeConfig *config, int *mpt)
Definition: cMsg.c:6458
int cMsgAddInt32Array(void *vmsg, const char *name, const int32_t vals[], int len)
Definition: cMsgCompoundPayload.c:5373
int cMsgGetSubscriptionCueSize(const void *vmsg, int *size)
Definition: cMsg.c:6032
int cMsgSubscribeSetMaxCueSize(cMsgSubscribeConfig *config, int size)
Definition: cMsg.c:6176
void( cMsgShutdownHandler)(void *userArg)
Definition: cMsg.h:115
int cMsgGetUint16Array(const void *vmsg, const char *name, const uint16_t **vals, int *len)
Definition: cMsgCompoundPayload.c:3467
int cMsgGetGetRequest(const void *vmsg, int *getRequest)
Definition: cMsg.c:3682
int cMsgGetName(void *domainId, char **name)
Definition: cMsg.c:2810
int cMsgGetUint8Array(const void *vmsg, const char *name, const uint8_t **vals, int *len)
Definition: cMsgCompoundPayload.c:3438
int cMsgGetSender(const void *vmsg, const char **sender)
Definition: cMsg.c:4425
int cMsgSubscriptionPause(void *domainId, void *handle)
Definition: cMsg.c:1509
int cMsgPayloadGetType(const void *vmsg, const char *name, int *type)
Definition: cMsgCompoundPayload.c:905
int cMsgGetInt64Array(const void *vmsg, const char *name, const int64_t **vals, int *len)
Definition: cMsgCompoundPayload.c:3409
int cMsgAddStringArray(void *vmsg, const char *name, const char **vals, int len)
Definition: cMsgCompoundPayload.c:5773
int cMsgGetSubject(const void *vmsg, const char **subject)
Definition: cMsg.c:3790
int cMsgGetServerPort(void *domainId, int *port)
Definition: cMsg.c:1004
int cMsgGetUint32Array(const void *vmsg, const char *name, const uint32_t **vals, int *len)
Definition: cMsgCompoundPayload.c:3496
int cMsgSetNullGetResponse(void *vmsg, int nullGetResponse)
Definition: cMsg.c:3632
int cMsgAddBinaryArray(void *vmsg, const char *name, const char *src[], int number, const int size[], const int endian[])
Definition: cMsgCompoundPayload.c:4042
int cMsgGetUserInt(const void *vmsg, int *userInt)
Definition: cMsg.c:3942
int cMsgGetReliableSend(void *vmsg, int *boolean)
Definition: cMsg.c:6080
void * cMsgSubscribeConfig
Definition: cMsg.h:112
int cMsgFlush(void *domainId, const struct timespec *timeout)
Definition: cMsg.c:1403
int cMsgGetReceiver(const void *vmsg, const char **receiver)
Definition: cMsg.c:4503
int cMsgGetInt64(const void *vmsg, const char *name, int64_t *val)
Definition: cMsgCompoundPayload.c:3192
int cMsgFreeMessage(void **vmsg)
Definition: cMsg.c:3053
int cMsgPayloadSetAllFieldsFromText(void *vmsg, const char *text)
Definition: cMsgCompoundPayload.c:2529
int cMsgPayloadSetSystemFieldsFromText(void *vmsg, const char *text)
Definition: cMsgCompoundPayload.c:2509
int cMsgSubscriptionQueueCount(void *domainId, void *handle, int *count)
Definition: cMsg.c:1571
int cMsgInitMessage(void *vmsg)
Definition: cMsg.c:3333
int cMsgSubscribeGetMaySkip(cMsgSubscribeConfig *config, int *maySkip)
Definition: cMsg.c:6305
int cMsgPayloadGet(const void *vmsg, char **names, int *types, int len)
Definition: cMsgCompoundPayload.c:955
int cMsgSetText(void *vmsg, const char *text)
Definition: cMsg.c:3869
int cMsgSubscriptionResume(void *domainId, void *handle)
Definition: cMsg.c:1540
int cMsgSubscribe(void *domainId, const char *subject, const char *type, cMsgCallbackFunc *callback, void *userArg, cMsgSubscribeConfig *config, void **handle)
Definition: cMsg.c:1444
int cMsgGetReceiverHost(const void *vmsg, const char **receiverHost)
Definition: cMsg.c:4532
int cMsgGetReceiveState(void *domainId, int *receiveState)
Definition: cMsg.c:2870
int cMsgAddUint64(void *vmsg, const char *name, uint64_t val)
Definition: cMsgCompoundPayload.c:4867
int cMsgAddMessageArray(void *vmsg, const char *name, const void *vmessage[], int len)
Definition: cMsgCompoundPayload.c:6602
int cMsgSubscriptionQueueClear(void *domainId, void *handle)
Definition: cMsg.c:1630
int cMsgSetByteArrayOffset(void *vmsg, int offset)
Definition: cMsg.c:4258
int cMsgShutdownClients(void *domainId, const char *client, int flag)
Definition: cMsg.c:1936
void * cMsgCopyMessage(const void *vmsg)
Definition: cMsg.c:3110
int cMsgResetByteArrayLength(void *vmsg)
Definition: cMsg.c:4192
int cMsgPayloadToString(const void *vmsg, char **string, int binary, int compact, int noSystemFields)
Definition: cMsg.c:4624
int cMsgGetDescription(void *domainId, char **description)
Definition: cMsg.c:2839
int cMsgGetByteArrayOffset(const void *vmsg, int *offset)
Definition: cMsg.c:4287
int cMsgSubscribeGetMustSerialize(cMsgSubscribeConfig *config, int *serialize)
Definition: cMsg.c:6356
int cMsgSetByteArrayLength(void *vmsg, int length)
Definition: cMsg.c:4164
int cMsgAddUint8Array(void *vmsg, const char *name, const uint8_t vals[], int len)
Definition: cMsgCompoundPayload.c:5419
char * cMsgIntChars(uint32_t i)
Definition: cMsgCompoundPayload.c:328
int cMsgSetReliableSend(void *vmsg, int boolean)
Definition: cMsg.c:6058
int cMsgAddUint64Array(void *vmsg, const char *name, const uint64_t vals[], int len)
Definition: cMsgCompoundPayload.c:5488
int cMsgGetUint16(const void *vmsg, const char *name, uint16_t *val)
Definition: cMsgCompoundPayload.c:3239
int cMsgAddInt8(void *vmsg, const char *name, int8_t val)
Definition: cMsgCompoundPayload.c:4685
int cMsgGetUint32(const void *vmsg, const char *name, uint32_t *val)
Definition: cMsgCompoundPayload.c:3266
int cMsgToString2(const void *vmsg, char **string, int binary, int compact, int noSystemFields)
Definition: cMsg.c:4604
int cMsgSubscribeGetSkipSize(cMsgSubscribeConfig *config, int *size)
Definition: cMsg.c:6254
int cMsgGetInt8Array(const void *vmsg, const char *name, const int8_t **vals, int *len)
Definition: cMsgCompoundPayload.c:3322
int cMsgAddBinary(void *vmsg, const char *name, const char *src, int size, int endian)
Definition: cMsgCompoundPayload.c:3811
int cMsgSubscribeGetMaxCueSize(cMsgSubscribeConfig *config, int *size)
Definition: cMsg.c:6204
int cMsgAddDoubleArray(void *vmsg, const char *name, const double vals[], int len)
Definition: cMsgCompoundPayload.c:4559
void cMsgPayloadClear(void *vmsg)
Definition: cMsgCompoundPayload.c:700
int cMsgConnect(const char *myUDL, const char *myName, const char *myDescription, void **domainId)
Definition: cMsg.c:1084
char * cMsgPerror(int error)
Definition: cMsg.c:2001
int cMsgGetInt16(const void *vmsg, const char *name, int16_t *val)
Definition: cMsgCompoundPayload.c:3138
int cMsgAddFloatArray(void *vmsg, const char *name, const float vals[], int len)
Definition: cMsgCompoundPayload.c:4537
int cMsgReceiveStop(void *domainId)
Definition: cMsg.c:1834
int cMsgNeedToSwap(const void *vmsg, int *swap)
Definition: cMsg.c:4120
int cMsgAddInt16Array(void *vmsg, const char *name, const int16_t vals[], int len)
Definition: cMsgCompoundPayload.c:5350
int cMsgSubscribeSetMessagesPerThread(cMsgSubscribeConfig *config, int mpt)
Definition: cMsg.c:6431
void * cMsgCreateMessage(void)
Definition: cMsg.c:3356
int cMsgGetInt8(const void *vmsg, const char *name, int8_t *val)
Definition: cMsgCompoundPayload.c:3111
int cMsgGetType(const void *vmsg, const char **type)
Definition: cMsg.c:3843
int cMsgGetConnectState(void *domainId, int *connected)
Definition: cMsg.c:1870
int cMsgSubscribeSetMaySkip(cMsgSubscribeConfig *config, int maySkip)
Definition: cMsg.c:6278
int cMsgSubscribeSetMaxThreads(cMsgSubscribeConfig *config, int threads)
Definition: cMsg.c:6380
int cMsgGetSenderTime(const void *vmsg, struct timespec *senderTime)
Definition: cMsg.c:4480
int cMsgGetByteArrayLengthFull(const void *vmsg, int *length)
Definition: cMsg.c:4234
int cMsgAddDouble(void *vmsg, const char *name, double val)
Definition: cMsgCompoundPayload.c:4216
int cMsgSetByteArray(void *vmsg, char *array, int length)
Definition: cMsg.c:4359
int cMsgGetMessageArray(const void *vmsg, const char *name, const void ***val, int *len)
Definition: cMsgCompoundPayload.c:2806
void cMsgTrimChar(char *s, char trimChar)
Definition: cMsg.c:223
cMsgSubscribeConfig * cMsgSubscribeConfigCreate(void)
Definition: cMsg.c:6115
int cMsgAddHistoryToPayloadText(void *vmsg, char *name, char *host, int64_t time, char **pTxt)
Definition: cMsgCompoundPayload.c:1386
int cMsgAddUint32(void *vmsg, const char *name, uint32_t val)
Definition: cMsgCompoundPayload.c:4844
int cMsgGetVersion(const void *vmsg, int *version)
Definition: cMsg.c:3557
int cMsgGetFloatArray(const void *vmsg, const char *name, const float **vals, int *len)
Definition: cMsgCompoundPayload.c:3006
int cMsgGetDomain(const void *vmsg, const char **domain)
Definition: cMsg.c:3709
int cMsgSubscribeSetSkipSize(cMsgSubscribeConfig *config, int size)
Definition: cMsg.c:6227
int cMsgPayloadRemove(void *vmsg, const char *name)
Definition: cMsgCompoundPayload.c:1076
int cMsgGetPayloadText(const void *vmsg, const char **payloadText)
Definition: cMsg.c:3737
int cMsgAddInt16(void *vmsg, const char *name, int16_t val)
Definition: cMsgCompoundPayload.c:4708
int cMsgGetByteArrayEndian(const void *vmsg, int *endian)
Definition: cMsg.c:4091
int cMsgGetCurrentUDL(void *domainId, const char **udl)
Definition: cMsg.c:939
int cMsgReceiveStart(void *domainId)
Definition: cMsg.c:1801
int cMsgPayloadGetCount(const void *vmsg, int *count)
Definition: cMsgCompoundPayload.c:809
char * cMsgDoubleChars(double d)
Definition: cMsgCompoundPayload.c:389
int cMsgSendAndGet(void *domainId, void *sendMsg, const struct timespec *timeout, void **replyMsg)
Definition: cMsg.c:1700
int cMsgGetDouble(const void *vmsg, const char *name, double *val)
Definition: cMsgCompoundPayload.c:2931
int cMsgGetSubscriptionSubject(const void *vmsg, const char **subject)
Definition: cMsg.c:5942
int cMsgSubscribeSetMustSerialize(cMsgSubscribeConfig *config, int serialize)
Definition: cMsg.c:6329
void * cMsgCreateNullResponseMessage(const void *vmsg)
Definition: cMsg.c:3452
int cMsgSubscribeConfigDestroy(cMsgSubscribeConfig *config)
Definition: cMsg.c:6153
int cMsgAddUint32Array(void *vmsg, const char *name, const uint32_t vals[], int len)
Definition: cMsgCompoundPayload.c:5465
int cMsgGetInt32Array(const void *vmsg, const char *name, const int32_t **vals, int *len)
Definition: cMsgCompoundPayload.c:3380
int cMsgGetByteArrayLength(const void *vmsg, int *length)
Definition: cMsg.c:4216
void cMsgTrim(char *s)
Definition: cMsg.c:175
int cMsgGetUint8(const void *vmsg, const char *name, uint8_t *val)
Definition: cMsgCompoundPayload.c:3212
int cMsgAddFloat(void *vmsg, const char *name, float val)
Definition: cMsgCompoundPayload.c:4193
void * cMsgCreateNewMessage(const void *vmsg)
Definition: cMsg.c:3381
int cMsgAddInt64Array(void *vmsg, const char *name, const int64_t vals[], int len)
Definition: cMsgCompoundPayload.c:5396
int cMsgAddMessage(void *vmsg, const char *name, const void *vmessage)
Definition: cMsgCompoundPayload.c:6173
int cMsgGetGetResponse(const void *vmsg, int *getResponse)
Definition: cMsg.c:3606
int cMsgSubscribeSetStackSize(cMsgSubscribeConfig *config, size_t size)
Definition: cMsg.c:6480
int cMsgHasPayload(const void *vmsg, int *hasPayload)
Definition: cMsgCompoundPayload.c:791
int cMsgSetSubject(void *vmsg, const char *subject)
Definition: cMsg.c:3763
int cMsgGetUDL(void *domainId, char **udl)
Definition: cMsg.c:2781
int cMsgPayloadCopy(const void *vmsgFrom, void *vmsgTo)
Definition: cMsgCompoundPayload.c:1998
int cMsgAddString(void *vmsg, const char *name, const char *val)
Definition: cMsgCompoundPayload.c:5604
int cMsgSetByteArrayNoCopy(void *vmsg, char *array, int length)
Definition: cMsg.c:4314
int cMsgSetByteArrayEndian(void *vmsg, int endian)
Definition: cMsg.c:4017
int cMsgAddUint16(void *vmsg, const char *name, uint16_t val)
Definition: cMsgCompoundPayload.c:4821
int cMsgPayloadGetFieldText(const void *vmsg, const char *name, const char **val)
Definition: cMsgCompoundPayload.c:2446
int cMsgGetInt16Array(const void *vmsg, const char *name, const int16_t **vals, int *len)
Definition: cMsgCompoundPayload.c:3351
int cMsgDisconnect(void **domainId)
Definition: cMsg.c:1273
int cMsgAddUint8(void *vmsg, const char *name, uint8_t val)
Definition: cMsgCompoundPayload.c:4798
int cMsgSubscriptionQueueIsFull(void *domainId, void *handle, int *full)
Definition: cMsg.c:1602
int cMsgUnSubscribe(void *domainId, void *handle)
Definition: cMsg.c:1478
int cMsgSetType(void *vmsg, const char *type)
Definition: cMsg.c:3816
int cMsgAddInt32(void *vmsg, const char *name, int32_t val)
Definition: cMsgCompoundPayload.c:4731