cMsg Messaging System  6.0
 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  /* basic functions */
126  int cMsgConnect (const char *myUDL, const char *myName, const char *myDescription,
127  void **domainId);
128  int cMsgReconnect (void *domainId);
129  int cMsgSend (void *domainId, void *msg);
130  int cMsgSyncSend (void *domainId, void *msg, const struct timespec *timeout, int *response);
131  int cMsgFlush (void *domainId, const struct timespec *timeout);
132  int cMsgSubscribe (void *domainId, const char *subject, const char *type, cMsgCallbackFunc *callback,
133  void *userArg, cMsgSubscribeConfig *config, void **handle);
134  int cMsgUnSubscribe (void *domainId, void *handle);
135  int cMsgSubscriptionPause (void *domainId, void *handle);
136  int cMsgSubscriptionResume(void *domainId, void *handle);
137  int cMsgSubscriptionQueueClear(void *domainId, void *handle);
138  int cMsgSubscriptionQueueCount(void *domainId, void *handle, int *count);
139  int cMsgSubscriptionQueueIsFull(void *domainId, void *handle, int *full);
140  int cMsgSubscriptionMessagesTotal(void *domainId, void *handle, int *total);
141  int cMsgSendAndGet (void *domainId, void *sendMsg, const struct timespec *timeout, void **replyMsg);
142  int cMsgSubscribeAndGet (void *domainId, const char *subject, const char *type,
143  const struct timespec *timeout, void **replyMsg);
144  int cMsgMonitor (void *domainId, const char *command, void **replyMsg);
145  int cMsgReceiveStart (void *domainId);
146  int cMsgReceiveStop (void *domainId);
147  int cMsgDisconnect (void **domainId);
148  int cMsgSetShutdownHandler(void *domainId, cMsgShutdownHandler *handler, void *userArg);
149  int cMsgShutdownClients (void *domainId, const char *client, int flag);
150  int cMsgShutdownServers (void *domainId, const char *server, int flag);
151  int cMsgGetConnectState (void *domainId, int *connectState);
152  int cMsgSetUDL (void *domainId, const char *udl);
153  int cMsgGetCurrentUDL (void *domainId, const char **udl);
154  int cMsgGetServerHost (void *domainId, const char **ipAddress);
155  int cMsgGetServerPort (void *domainId, int *port);
156  int cMsgGetInfo (void *domainId, const char *command, char **string);
157  char *cMsgPerror (int errorCode);
158 
159 
160  /* message access functions */
161  int cMsgFreeMessage (void **vmsg);
162  void *cMsgCreateMessage (void);
163  void *cMsgCreateNewMessage (const void *vmsg);
164  void *cMsgCopyMessage (const void *vmsg);
165  int cMsgInitMessage (void *vmsg);
166  void *cMsgCreateResponseMessage(const void *vmsg);
167  void *cMsgCreateNullResponseMessage(const void *vmsg);
168  int cMsgWasSent (const void *vmsg, int *hasBeenSent);
169 
170  int cMsgGetVersion (const void *vmsg, int *version);
171  int cMsgGetGetRequest (const void *vmsg, int *getRequest);
172 
173  int cMsgSetGetResponse ( void *vmsg, int getReponse);
174  int cMsgGetGetResponse (const void *vmsg, int *getReponse);
175 
176  int cMsgSetNullGetResponse ( void *vmsg, int nullGetResponse);
177  int cMsgGetNullGetResponse (const void *vmsg, int *nullGetResponse);
178 
179  int cMsgGetDomain (const void *vmsg, const char **domain);
180  int cMsgGetPayloadText (const void *vmsg, const char **payloadText);
181 
182  int cMsgSetSubject ( void *vmsg, const char *subject);
183  int cMsgGetSubject (const void *vmsg, const char **subject);
184 
185  int cMsgSetType ( void *vmsg, const char *type);
186  int cMsgGetType (const void *vmsg, const char **type);
187 
188  int cMsgSetText ( void *vmsg, const char *text);
189  int cMsgGetText (const void *vmsg, const char **text);
190 
191  int cMsgSetUserInt ( void *vmsg, int userInt);
192  int cMsgGetUserInt (const void *vmsg, int *userInt);
193 
194  int cMsgSetUserTime ( void *vmsg, const struct timespec *userTime);
195  int cMsgGetUserTime (const void *vmsg, struct timespec *userTime);
196 
197  int cMsgGetSender (const void *vmsg, const char **sender);
198  int cMsgGetSenderHost (const void *vmsg, const char **senderHost);
199  int cMsgGetSenderTime (const void *vmsg, struct timespec *senderTime);
200 
201  int cMsgGetReceiver (const void *vmsg, const char **receiver);
202  int cMsgGetReceiverHost (const void *vmsg, const char **receiverHost);
203  int cMsgGetReceiverTime (const void *vmsg, struct timespec *receiverTime);
204 
205  int cMsgSetByteArrayLength ( void *vmsg, int length);
206  int cMsgResetByteArrayLength ( void *vmsg);
207  int cMsgGetByteArrayLength (const void *vmsg, int *length);
208  int cMsgGetByteArrayLengthFull(const void *vmsg, int *length);
209 
210  int cMsgSetByteArrayOffset ( void *vmsg, int offset);
211  int cMsgGetByteArrayOffset (const void *vmsg, int *offset);
212 
213  int cMsgSetByteArrayEndian ( void *vmsg, int endian);
214  int cMsgGetByteArrayEndian (const void *vmsg, int *endian);
215  int cMsgNeedToSwap (const void *vmsg, int *swap);
216 
217  int cMsgSetByteArray ( void *vmsg, char *array, int length);
218  int cMsgSetByteArrayNoCopy ( void *vmsg, char *array, int length);
219  int cMsgGetByteArray (const void *vmsg, char **array);
220 
221  int cMsgSetReliableSend ( void *vmsg, int boolean);
222  int cMsgGetReliableSend ( void *vmsg, int *boolean);
223 
224  /* message context stuff */
225  int cMsgGetSubscriptionDomain (const void *vmsg, const char **domain);
226  int cMsgGetSubscriptionSubject(const void *vmsg, const char **subject);
227  int cMsgGetSubscriptionType (const void *vmsg, const char **type);
228  int cMsgGetSubscriptionUDL (const void *vmsg, const char **udl);
229  int cMsgGetSubscriptionCueSize(const void *vmsg, int *size);
230 
231  /* misc. */
232  int cMsgToString (const void *vmsg, char **string);
233  int cMsgToString2 (const void *vmsg, char **string, int binary,
234  int compact, int noSystemFields);
235  int cMsgPayloadToString (const void *vmsg, char **string, int binary,
236  int compact, int noSystemFields);
237  void cMsgTrim (char *s);
238  void cMsgTrimChar (char *s, char trimChar);
239  void cMsgTrimDoubleChars (char *s, char trimChar);
240 
241  /* ***************************************** */
242  /* compound payload stuff - 66 user routines */
243  /* ***************************************** */
244  int cMsgAddHistoryToPayloadText ( void *vmsg, char *name, char *host, int64_t time, char **pTxt);
245  int cMsgSetHistoryLengthMax ( void *vmsg, int len);
246  int cMsgGetHistoryLengthMax (const void *vmsg, int *len);
247 
248  int cMsgPayloadGet (const void *vmsg, char **names, int *types, int len);
249  int cMsgPayloadGetInfo (const void *vmsg, char ***names, int **types, int *len);
250  int cMsgPayloadGetCount (const void *vmsg, int *count);
251  int cMsgPayloadContainsName (const void *vmsg, const char *name);
252  int cMsgPayloadGetType (const void *vmsg, const char *name, int *type);
253  int cMsgPayloadRemove ( void *vmsg, const char *name);
254  int cMsgPayloadCopy (const void *vmsgFrom, void *vmsgTo);
255 
256  int cMsgPayloadUpdateText (const void *vmsg);
257  int cMsgPayloadGetFieldText (const void *vmsg, const char *name, const char **val);
258  void cMsgPayloadPrint (const void *vmsg);
259 
260 const char *cMsgPayloadFieldDescription(const void *vmsg, const char *name);
261 
262  /* users should NOT have access to these 3 routines */
263  int cMsgPayloadSetFromText ( void *vmsg, const char *text);
264  int cMsgPayloadSetSystemFieldsFromText ( void *vmsg, const char *text);
265  int cMsgPayloadSetAllFieldsFromText (void *vmsg, const char *text);
266 
267  void cMsgPayloadReset ( void *vmsg);
268  void cMsgPayloadClear ( void *vmsg);
269  int cMsgHasPayload (const void *vmsg, int *hasPayload);
270 
271  int cMsgGetBinary (const void *vmsg, const char *name, const char **val,
272  int *len, int *endian);
273  int cMsgGetBinaryArray (const void *vmsg, const char *name, const char ***vals,
274  int **sizes, int **endians, int *count);
275 
276  int cMsgGetMessage (const void *vmsg, const char *name, const void **val);
277  int cMsgGetMessageArray (const void *vmsg, const char *name, const void ***val, int *len);
278 
279  int cMsgGetString (const void *vmsg, const char *name, const char **val);
280  int cMsgGetStringArray (const void *vmsg, const char *name, const char ***array, int *len);
281 
282  int cMsgGetFloat (const void *vmsg, const char *name, float *val);
283  int cMsgGetFloatArray (const void *vmsg, const char *name, const float **vals, int *len);
284  int cMsgGetDouble (const void *vmsg, const char *name, double *val);
285  int cMsgGetDoubleArray (const void *vmsg, const char *name, const double **vals, int *len);
286 
287  int cMsgGetInt8 (const void *vmsg, const char *name, int8_t *val);
288  int cMsgGetInt16 (const void *vmsg, const char *name, int16_t *val);
289  int cMsgGetInt32 (const void *vmsg, const char *name, int32_t *val);
290  int cMsgGetInt64 (const void *vmsg, const char *name, int64_t *val);
291  int cMsgGetUint8 (const void *vmsg, const char *name, uint8_t *val);
292  int cMsgGetUint16 (const void *vmsg, const char *name, uint16_t *val);
293  int cMsgGetUint32 (const void *vmsg, const char *name, uint32_t *val);
294  int cMsgGetUint64 (const void *vmsg, const char *name, uint64_t *val);
295 
296  int cMsgGetInt8Array (const void *vmsg, const char *name, const int8_t **vals, int *len);
297  int cMsgGetInt16Array (const void *vmsg, const char *name, const int16_t **vals, int *len);
298  int cMsgGetInt32Array (const void *vmsg, const char *name, const int32_t **vals, int *len);
299  int cMsgGetInt64Array (const void *vmsg, const char *name, const int64_t **vals, int *len);
300  int cMsgGetUint8Array (const void *vmsg, const char *name, const uint8_t **vals, int *len);
301  int cMsgGetUint16Array (const void *vmsg, const char *name, const uint16_t **vals, int *len);
302  int cMsgGetUint32Array (const void *vmsg, const char *name, const uint32_t **vals, int *len);
303  int cMsgGetUint64Array (const void *vmsg, const char *name, const uint64_t **vals, int *len);
304 
305  int cMsgAddInt8 ( void *vmsg, const char *name, int8_t val);
306  int cMsgAddInt16 ( void *vmsg, const char *name, int16_t val);
307  int cMsgAddInt32 ( void *vmsg, const char *name, int32_t val);
308  int cMsgAddInt64 ( void *vmsg, const char *name, int64_t val);
309  int cMsgAddUint8 ( void *vmsg, const char *name, uint8_t val);
310  int cMsgAddUint16 ( void *vmsg, const char *name, uint16_t val);
311  int cMsgAddUint32 ( void *vmsg, const char *name, uint32_t val);
312  int cMsgAddUint64 ( void *vmsg, const char *name, uint64_t val);
313 
314  int cMsgAddInt8Array ( void *vmsg, const char *name, const int8_t vals[], int len);
315  int cMsgAddInt16Array ( void *vmsg, const char *name, const int16_t vals[], int len);
316  int cMsgAddInt32Array ( void *vmsg, const char *name, const int32_t vals[], int len);
317  int cMsgAddInt64Array ( void *vmsg, const char *name, const int64_t vals[], int len);
318  int cMsgAddUint8Array ( void *vmsg, const char *name, const uint8_t vals[], int len);
319  int cMsgAddUint16Array ( void *vmsg, const char *name, const uint16_t vals[], int len);
320  int cMsgAddUint32Array ( void *vmsg, const char *name, const uint32_t vals[], int len);
321  int cMsgAddUint64Array ( void *vmsg, const char *name, const uint64_t vals[], int len);
322 
323  int cMsgAddString ( void *vmsg, const char *name, const char *val);
324  int cMsgAddStringArray ( void *vmsg, const char *name, const char **vals, int len);
325 
326  int cMsgAddFloat ( void *vmsg, const char *name, float val);
327  int cMsgAddDouble ( void *vmsg, const char *name, double val);
328  int cMsgAddFloatArray ( void *vmsg, const char *name, const float vals[], int len);
329  int cMsgAddDoubleArray ( void *vmsg, const char *name, const double vals[], int len);
330 
331  int cMsgAddBinary ( void *vmsg, const char *name, const char *src, int size, int endian);
332  int cMsgAddBinaryArray ( void *vmsg, const char *name, const char *src[], int number,
333  const int size[], const int endian[]);
334  int cMsgAddMessage ( void *vmsg, const char *name, const void *vmessage);
335  int cMsgAddMessageArray ( void *vmsg, const char *name, const void *vmessage[], int len);
336 
337  char *cMsgFloatChars(float f);
338  char *cMsgDoubleChars(double d);
339  char *cMsgIntChars(uint32_t i);
340 
341 
342  /* system and domain info access functions */
343  int cMsgGetUDL (void *domainId, char **udl);
344  int cMsgGetName (void *domainId, char **name);
345  int cMsgGetDescription (void *domainId, char **description);
346  int cMsgGetReceiveState(void *domainId, int *receiveState);
347 
348 
349  /* subscribe configuration functions */
352 
353  int cMsgSubscribeSetMaxCueSize (cMsgSubscribeConfig *config, int size);
354  int cMsgSubscribeGetMaxCueSize (cMsgSubscribeConfig *config, int *size);
355 
356  int cMsgSubscribeSetSkipSize (cMsgSubscribeConfig *config, int size);
357  int cMsgSubscribeGetSkipSize (cMsgSubscribeConfig *config, int *size);
358 
359  int cMsgSubscribeSetMaySkip (cMsgSubscribeConfig *config, int maySkip);
360  int cMsgSubscribeGetMaySkip (cMsgSubscribeConfig *config, int *maySkip);
361 
362  int cMsgSubscribeSetMustSerialize (cMsgSubscribeConfig *config, int serialize);
363  int cMsgSubscribeGetMustSerialize (cMsgSubscribeConfig *config, int *serialize);
364 
365  int cMsgSubscribeSetMaxThreads (cMsgSubscribeConfig *config, int threads);
366  int cMsgSubscribeGetMaxThreads (cMsgSubscribeConfig *config, int *threads);
367 
370 
371  int cMsgSubscribeSetStackSize (cMsgSubscribeConfig *config, size_t size);
372  int cMsgSubscribeGetStackSize (cMsgSubscribeConfig *config, size_t *size);
373 
374 
375  /* for debugging */
376  int cMsgSetDebugLevel(int level);
377 
378 
379 #ifdef __cplusplus
380 }
381 #endif
382 
383 
384 #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:3524
int cMsgAddInt8Array(void *vmsg, const char *name, const int8_t vals[], int len)
Definition: cMsgCompoundPayload.c:5326
int cMsgPayloadContainsName(const void *vmsg, const char *name)
Definition: cMsgCompoundPayload.c:834
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:3034
int cMsgGetBinaryArray(const void *vmsg, const char *name, const char ***vals, int **sizes, int **endians, int *count)
Definition: cMsgCompoundPayload.c:2700
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:3292
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:2754
int cMsgGetSubscriptionType(const void *vmsg, const char **type)
Definition: cMsg.c:5973
const char * cMsgPayloadFieldDescription(const void *vmsg, const char *name)
Definition: cMsgCompoundPayload.c:2168
int cMsgGetHistoryLengthMax(const void *vmsg, int *len)
Definition: cMsg.c:3488
void cMsgPayloadPrint(const void *vmsg)
Definition: cMsgCompoundPayload.c:2271
int cMsgAddInt64(void *vmsg, const char *name, int64_t val)
Definition: cMsgCompoundPayload.c:4774
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:1009
int cMsgSetUserTime(void *vmsg, const struct timespec *userTime)
Definition: cMsg.c:3964
void cMsgPayloadReset(void *vmsg)
Definition: cMsgCompoundPayload.c:653
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:2487
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:3552
char * cMsgFloatChars(float f)
Definition: cMsgCompoundPayload.c:356
int cMsgGetBinary(const void *vmsg, const char *name, const char **val, int *size, int *endian)
Definition: cMsgCompoundPayload.c:2642
int cMsgAddUint16Array(void *vmsg, const char *name, const uint16_t vals[], int len)
Definition: cMsgCompoundPayload.c:5441
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:3602
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:1209
int cMsgGetInt32(const void *vmsg, const char *name, int32_t *val)
Definition: cMsgCompoundPayload.c:3164
int cMsgGetFloat(const void *vmsg, const char *name, float *val)
Definition: cMsgCompoundPayload.c:2903
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:5372
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:3466
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:3437
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:904
int cMsgGetInt64Array(const void *vmsg, const char *name, const int64_t **vals, int *len)
Definition: cMsgCompoundPayload.c:3408
int cMsgAddStringArray(void *vmsg, const char *name, const char **vals, int len)
Definition: cMsgCompoundPayload.c:5772
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:3495
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:4041
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:3191
int cMsgFreeMessage(void **vmsg)
Definition: cMsg.c:3053
int cMsgPayloadSetAllFieldsFromText(void *vmsg, const char *text)
Definition: cMsgCompoundPayload.c:2528
int cMsgPayloadSetSystemFieldsFromText(void *vmsg, const char *text)
Definition: cMsgCompoundPayload.c:2508
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:954
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:4866
int cMsgAddMessageArray(void *vmsg, const char *name, const void *vmessage[], int len)
Definition: cMsgCompoundPayload.c:6601
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:5418
char * cMsgIntChars(uint32_t i)
Definition: cMsgCompoundPayload.c:327
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:5487
int cMsgGetUint16(const void *vmsg, const char *name, uint16_t *val)
Definition: cMsgCompoundPayload.c:3238
int cMsgAddInt8(void *vmsg, const char *name, int8_t val)
Definition: cMsgCompoundPayload.c:4684
int cMsgGetUint32(const void *vmsg, const char *name, uint32_t *val)
Definition: cMsgCompoundPayload.c:3265
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:3321
int cMsgAddBinary(void *vmsg, const char *name, const char *src, int size, int endian)
Definition: cMsgCompoundPayload.c:3810
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:4558
void cMsgPayloadClear(void *vmsg)
Definition: cMsgCompoundPayload.c:699
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:3137
int cMsgAddFloatArray(void *vmsg, const char *name, const float vals[], int len)
Definition: cMsgCompoundPayload.c:4536
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:5349
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:3110
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:4215
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:2805
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:1385
int cMsgAddUint32(void *vmsg, const char *name, uint32_t val)
Definition: cMsgCompoundPayload.c:4843
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:3005
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:1075
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:4707
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:808
char * cMsgDoubleChars(double d)
Definition: cMsgCompoundPayload.c:388
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:2930
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:5464
int cMsgGetInt32Array(const void *vmsg, const char *name, const int32_t **vals, int *len)
Definition: cMsgCompoundPayload.c:3379
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:3211
int cMsgAddFloat(void *vmsg, const char *name, float val)
Definition: cMsgCompoundPayload.c:4192
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:5395
int cMsgAddMessage(void *vmsg, const char *name, const void *vmessage)
Definition: cMsgCompoundPayload.c:6172
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:790
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:1997
int cMsgAddString(void *vmsg, const char *name, const char *val)
Definition: cMsgCompoundPayload.c:5603
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:4820
int cMsgPayloadGetFieldText(const void *vmsg, const char *name, const char **val)
Definition: cMsgCompoundPayload.c:2445
int cMsgGetInt16Array(const void *vmsg, const char *name, const int16_t **vals, int *len)
Definition: cMsgCompoundPayload.c:3350
int cMsgDisconnect(void **domainId)
Definition: cMsg.c:1273
int cMsgAddUint8(void *vmsg, const char *name, uint8_t val)
Definition: cMsgCompoundPayload.c:4797
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:4730