theLink 10.0
Loading...
Searching...
No Matches
LibMqMsgque_mq.h
Go to the documentation of this file.
1
9#pragma once
10
11#include "LibMkKernel_mk.h"
12
13// =========================================================================
14// global __parser__ definition :
15
16__parser__(library=MqMsgque@internal@Mq);
17
18// MARK_D ################################################################
19// -----------------------------------------------------------------------
20// documentation order
35
49
73
81
89
96
104
111
116
117// =========================================================================================
118// Makefile: CPPFLAGS definitions
119// Config: configure definitions
120
121// define: META_TCP_ONLY_IPV4
122// source: msgque_mq.h
123// default: not set, use IPV8
124// definition: Force the IPV4 support and disable IPV8
125
126// define: META_COMPILE_AS_CC
127// source: Makefile
128// target: kernel_mk.h
129// default: only set by "ccmqmsgque" to compile "C" code as "C++" code
130// definition: By default, the "C" code is compiled as "C" code into a "C" library and eventually linked
131// to the library of the target programming language. With the "META_COMPILE_AS_CC" preprocessor
132// flag, the "C" code is not compiled into an independent library but is translated directly
133// into the target programming language (C++) library along with the additional C++ code as C++
134// code in the "ccmqmsgque::libmkkernel" namespace.
135// The following changes are done:
136// 1. "BEGIN_MK_C_DECLS" is set to "namespace libmsgque {"
137
138// define: META_HAVE_LIBCONFIG
139// source: user defind at build using '-DMETA_HAVE_LIBCONFIG=1/0' or set with the "configure" script
140// default: the default is "1 = set" - other value is "0 = not set"
141// definition: 1. Add the 'libconfig' library to the build to support config-files
142// 2. If the extension is build ontop of libmqmsgque the extension have to set META_HAVE_LIBCONFIG
143// according to libmqmsgque. If META_HAVE_LIBCONFIG differs from libmqmsgque than compile-error occure.
144// 3. autoconf example is at: NHI1/theLink/phpmsgque/MqMsgque/config.m4
145
146#ifndef META_HAVE_LIBCONFIG
147 #error "META_HAVE_LIBCONFIG was NOT defined, require 1 or 0"
148#endif
149
150// define: META_USE_GLOBAL_EVENT
151// source: only libmqmsgque build
152// default: do NOT(0) use META_USE_GLOBAL_EVENT
153// definition: 1. Add the "geDat" array to collect all "MqEventS" in all "MqRuntimeS"
154// 2. Protected by semaphore "geSem"
155// 3. NOT really usefull, free some data on exit
156// 4. In the PAST the "MqContectS" related to the "MqEventS" was freed also, BUT this is very buggy.
157
158#ifndef META_USE_GLOBAL_EVENT
159# define META_USE_GLOBAL_EVENT 0
160#endif
161
162// define: META_BROKEN_LINK_SEND_FAIL_COUNTER
163// source: only libmqmsgque build
164// default: fail after 16 attemp to send a data package
165// definition: 1. used in "pSendEND" -> "pIoCheckLast"
166
167#define META_BROKEN_LINK_SEND_FAIL_COUNTER 16
168
169// define: META_STATIC
170// reference: META_STATIC from kernel_mk.h
171
172#ifdef META_STATIC
173# undef MQ_C_BUILD_DLL
174# define MQ_C_BUILD_DLL
175#endif
176
177#if META_DEBUG
178# define MQ_DEBUG_RUNTIME mk_dbg_color_ln(MK_COLOR_YELLOW,"mkrt<%p:%p>, mqrt<%p:%p>", mkrt, MkRT, mqrt, MqRT)
179#else
180# define MQ_DEBUG_RUNTIME
181#endif
182
183// =========================================================================
213#if META_HAS_THREAD
214# define MQ_RT_ARGS_ONLY MK_RT mkrt, MQ_RT mqrt
215# define MQ_RT_ARGS MQ_RT_ARGS_ONLY,
216# define MQ_RT_CALL_ONLY mkrt, mqrt
217# define MQ_RT_CALL MQ_RT_CALL_ONLY,
218# define MQ_RT_PTR mqrt
219# define MQ_RT_REF (*mqrt)
220#else
221# define MQ_RT_ARGS_ONLY void
222# define MQ_RT_ARGS
223# define MQ_RT_CALL_ONLY
224# define MQ_RT_CALL
225# define MQ_RT_PTR &MqRuntimeRLS
226# define MQ_RT_REF MqRuntimeRLS
227#endif
229
230// ".c" file
231#define MQ_INSTANCE_RT_X(x) MK_INSTANCE_RT_X(x) ; MqRtSetup_XN(x)
232#define MQ_INSTANCE_RT_X_NULL(x) MK_INSTANCE_RT_X_NULL(x) ; MqRtSetup_X(x)
233#define MQ_INSTANCE_RT_O(o) MK_INSTANCE_RT_O(o) ; MqRtSetup_ON(o)
234#define MQ_INSTANCE_RT_O_NULL(o) MK_INSTANCE_RT_O_NULL(o) ; MqRtSetup_O(o)
235#define MQ_DESTRUCTOR_RT_X(c,x) MK_DESTRUCTOR_RT_X(c,x) ; MqRtSetup_XN(x)
236#define MQ_STATIC_RT MK_STATIC_RT ; MqRtSetup_NULL
238// MqRuntimeC_C_API
239
240/* BEGIN_MQ_C_DECLS should be used at the beginning of your declarations,
241 so that C++ compilers don't mangle their names. Use END_MQ_C_DECLS at
242 the end of C declarations.
243*/
244
245#undef BEGIN_MQ_C_DECLS
246#undef END_MQ_C_DECLS
247#if defined(META_COMPILE_AS_CC)
248# define BEGIN_MQ_C_DECLS namespace libmqmsgque { using namespace libmkkernel;
249# define END_MQ_C_DECLS }
250#elif defined(__cplusplus)
251# define BEGIN_MQ_C_DECLS extern "C" {
252# define END_MQ_C_DECLS }
253#else
254# define BEGIN_MQ_C_DECLS /* empty */
255# define END_MQ_C_DECLS /* empty */
256#endif
257
258// MARK_O
259#ifndef PARSE_C_HEADER_TO_META
260# include "gen/msgque_overload_mq.h"
261#endif
262
264
265// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
266
341/* ####################################################################### */
342/* ### ### */
343/* ### K E R N A L - A P I ### */
344/* ### ### */
345/* ####################################################################### */
346
347/*****************************************************************************/
348/* */
349/* windows conform extern */
350/* */
351/*****************************************************************************/
352
377
378// BEGIN-HEADER - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
379
380// If the source of libmqmsgque is direct used in an external library
381// (without dynamic linking) and this library should *not* export
382// the symbol's of libmqmsgque then the flag META_IGNORE_EXTERN have
383// to be set
384#undef MQ_EXTERN
385#if defined(META_IGNORE_EXTERN)
386# define MQ_EXTERN
387#elif defined(PIC)
388 // does we build a DLL ?
389# if defined(DLL_EXPORT)
390 // does we build the libmqmsgque library ?
391# if defined(MQ_C_BUILD_DLL)
392# define MQ_EXTERN __declspec(dllexport)
393# else
394# define MQ_EXTERN __declspec(dllimport)
395# endif
396# else
397 // no DLL - architecture specific extern specifier
398# define MQ_EXTERN __attribute__ ((visibility("default")))
399# endif
400#else
402# define MQ_EXTERN
403#endif
404
405// external data lookup
406#undef MQ_EXTERN_DATA
407#if defined(META_PRIVATE)
408# define MQ_EXTERN_DATA extern
409#elif defined(META_IGNORE_EXTERN)
410# define MQ_EXTERN_DATA extern
411#elif defined(PIC)
412 // does we build a DLL ?
413# if defined(DLL_EXPORT)
414 // does we build the libmqmsgque library ?
415# if defined(MQ_C_BUILD_DLL)
416# define MQ_EXTERN_DATA __declspec(dllexport)
417# else
418# define MQ_EXTERN_DATA __declspec(dllimport)
419# endif
420# else
421 // no DLL - architecture specific extern specifier
422# define MQ_EXTERN_DATA __attribute__ ((visibility("default"))) extern
423# endif
424#else
425# define MQ_EXTERN_DATA extern
426#endif
427
428// END-HEADER - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
429
431// MqMsgque_Compiler_C_API
432
433/*****************************************************************************/
434/* */
435/* types/generic */
436/* */
437/*****************************************************************************/
438
441
443typedef struct config_t config_t;
446
447struct MqContextS;
448struct MqTransS;
449struct MqConfigS;
450struct MqEventS;
451struct MqFactoryS;
452struct MqDumpS;
453
455__parser__(type=ME_NI4_MQ_LTR)
456typedef int MQ_LTR;
458__parser__(type=ME_NI4_MQ_ROU)
459typedef int MQ_ROU;
461__parser__(type=ME_NI4_MQ_SLAVE_ID)
463
465__parser__(type=ME_NI4_MQ_HDL:"handle data-type")
466typedef int MQ_HDL;
467
469// MqMsgque_Type_C_API
470
471/* MARK_C ********************************************************************/
472/* */
473/* class types */
474/* */
475/*****************************************************************************/
476
477// BEGIN-ShortDef - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
478
482 __parser__(internal,type=ME_CCC_MqErrorC:"extension management class for MqErrorS":internal)
483 typedef struct MqErrorS * MQ_ERR;
485 __parser__(internal,type=ME_CCN_MqErrorC:"const - extension management class for MqErrorS":internal)
486 typedef const struct MqErrorS * MQ_ERRN;
488 __parser__(ignore)
489 typedef struct MqErrorS MQ_ERRR;
491// MqErrorC_Class_C_API
492
496 __parser__(internal,type=ME_CCC_MqRuntimeC:"MqRuntimeC class handle":internal)
497 typedef struct MqRuntimeS * MQ_RT;
499 __parser__(internal,type=ME_CCN_MqRuntimeC:"const - MqRuntimeC class handle":internal)
500 typedef const struct MqRuntimeS * MQ_RTN;
502 __parser__(ignore)
503 typedef struct MqRuntimeS MQ_RTR;
505// MqRuntimeC_Class_C_API
506
510 __parser__(internal,type=ME_CCC_MqTypeCtxC:"MqContextS type":internal)
511 typedef struct MqTypeCtxS * MQ_CTXTYP;
513 __parser__(internal,type=ME_CCN_MqTypeCtxC:"const - MqContextS type":internal)
514 typedef const struct MqTypeCtxS * MQ_CTXTYPN;
516 __parser__(ignore)
517 typedef struct MqTypeCtxS MQ_CTXTYPR;
519// MqTypeCtxC_Class_C_API
520
524 __parser__(type=ME_CCC_MqFactoryC:"MqFactoryC class handle":primary)
525 typedef struct MqFactoryS * MQ_FCT;
527 __parser__(type=ME_CCN_MqFactoryC:"const - MqFactoryC class handle":primary)
528 typedef const struct MqFactoryS * MQ_FCTN;
530 __parser__(ignore)
531 typedef struct MqFactoryS MQ_FCTR;
533// MqFactoryC_Class_C_API
534
538 __parser__(type=ME_CCC_MqContextC:"MqContextC class handle":primary)
539 typedef struct MqContextS * MQ_CTX;
541 __parser__(type=ME_CCN_MqContextC:"const - MqContextC class handle":primary)
542 typedef const struct MqContextS * MQ_CTXN;
544 __parser__(ignore)
545 typedef struct MqContextS MQ_CTXR;
547// MqContextC_Class_C_API
548
552 __parser__(type=ME_CCC_MqDumpC:"MqDumpC class handle":primary)
553 typedef struct MqDumpS * MQ_DMP;
555 __parser__(type=ME_CCN_MqDumpC:"const - MqDumpC class handle":primary)
556 typedef const struct MqDumpS * MQ_DMPN;
558 __parser__(ignore)
559 typedef struct MqDumpS MQ_DMPR;
561// MqDumpC_Class_C_API
562
566 __parser__(internal,type=ME_CCC_MqEnvC:"MqEnvC class handle":internal)
567 typedef struct MqEnvS * MQ_ENV;
569 __parser__(internal,type=ME_CCN_MqEnvC:"const - MqEnvC class handle":internal)
570 typedef const struct MqEnvS * MQ_ENVN;
572 __parser__(ignore)
573 typedef struct MqEnvS MQ_ENVR;
575// MqEnvC_Class_C_API
576
577// END-ShortDef - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
578
581__parser__(type=ME_ACX_MqContextC:"ARRAY of MQ_CTX")
582typedef struct {
585} MQ_CTX_A;
586
587/*****************************************************************************/
588/* */
589/* sockets */
590/* */
591/*****************************************************************************/
592
595
596#if defined(__MINGW32__) || defined(_MSC_VER)
597typedef SOCKET MQ_SOCK_HDL;
598# define MK_FORMAT_SOCK "%I64u"
599#else
600__parser__(type=ME_NI4_MQ_SOCK_HDL)
601typedef int MQ_SOCK_HDL;
602# define MK_FORMAT_SOCK "%i"
603#endif
604
606// MqMsgque_Type_C_API
607
608/*****************************************************************************/
609/* */
610/* type definitions */
611/* */
612/*****************************************************************************/
613
616
617__parser__push__(doc-group=Enum);
618
621
623__parser__(internal)
632
633// BEGIN-MqHandShakeE - created by 'c_MqS.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
634
637__parser__(internal,no-rpc,prefix=EnumFunc,return-type-default-no)
638MQ_EXTERN MK_STRN MK_DECL MqHandShakeE_ToString ( enum MqHandShakeE value ) MK_ATTR_STATIC ;
639
642__parser__(internal,no-rpc,prefix=EnumFunc,return-type-default-no)
644mk_inline MK_I32 MqHandShakeE_ToInt ( enum MqHandShakeE value ) {
645 return (MK_I32) value;
646}
647
650__parser__(internal,no-rpc,prefix=EnumFunc)
651MQ_EXTERN enum MkErrorE MqHandShakeE_FromInt ( MK_I32 const value, enum MqHandShakeE * value_out ) MK_ATTR_STATIC ;
652
653// END-MqHandShakeE - created by 'c_MqS.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
654
656// MqHandShakeE
657
660
662__parser__(internal)
670
671// BEGIN-MqTransTypeE - created by 'c_MqS.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
672
675__parser__(internal,no-rpc,prefix=EnumFunc,return-type-default-no)
676MQ_EXTERN MK_STRN MK_DECL MqTransTypeE_ToString ( enum MqTransTypeE value ) MK_ATTR_STATIC ;
677
680__parser__(internal,no-rpc,prefix=EnumFunc,return-type-default-no)
682mk_inline MK_I32 MqTransTypeE_ToInt ( enum MqTransTypeE value ) {
683 return (MK_I32) value;
684}
685
688__parser__(internal,no-rpc,prefix=EnumFunc)
689MQ_EXTERN enum MkErrorE MqTransTypeE_FromInt ( MK_I32 const value, enum MqTransTypeE * value_out ) MK_ATTR_STATIC ;
690
691// END-MqTransTypeE - created by 'c_MqS.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
692
694// MqTransTypeE
695
698
704// [MqIdentE]
709// [MqIdentE]
710
711// BEGIN-MqIdentE - created by 'c_MqS.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
712
715__parser__(doc-group=Enum,doc-index=_ignore_,class=MqMsgque,no-rpc,prefix=EnumFunc,return-type-default-no)
716MQ_EXTERN MK_STRN MK_DECL MqIdentE_ToString ( enum MqIdentE value ) MK_ATTR_STATIC ;
717
720__parser__(doc-group=Enum,doc-index=_ignore_,class=MqMsgque,no-rpc,prefix=EnumFunc,return-type-default-no)
722mk_inline MK_I32 MqIdentE_ToInt ( enum MqIdentE value ) {
723 return (MK_I32) value;
724}
725
728__parser__(doc-group=Enum,doc-index=_ignore_,class=MqMsgque,no-rpc,prefix=EnumFunc)
729MQ_EXTERN enum MkErrorE MqIdentE_FromInt ( MK_I32 const value, enum MqIdentE * value_out ) MK_ATTR_STATIC ;
730
731// END-MqIdentE - created by 'c_MqS.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
732
734// MqIdentE
735
737
739// MqMsgque_Enum_C_API
740
743
744struct MqTypeCtxS;
745
746//__parser__(type=ME_TYC:"a managed object class type pointer")
747__parser__(internal)
749typedef struct MqTypeCtxS * MQ_CTXT;
750
752// MqTypeCtxC_C_API
753
754// #######################################################################
755// -----------------------------------------------------------------------
760
774__parser__(ignore)
775struct MqEnvS {
776 // BEGIN-MqEnvS-super - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
777
778 union {
779 struct MkObjectS obj; // instance-base MkObjectS
780 } super;
781
782 // END-MqEnvS-super - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
783
790 struct MqEnvS *link;
791 struct {
792 bool SIdLck : 1;
793 bool LIdLck : 1;
794 } bits;
795};
796
797// BEGIN-MqEnvS-Definition - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
798
802 __parser__push__(prefix=Class, doc-group=Define, doc-index=Class);
803
804// Signature --------------------------------------------------------------
807
808 #define MqEnvC_SIGNATURE (MkObjectC_SIGNATURE ^ (15u<<10))
809 #define MqEnvC_MASK (((1u<<22)-1)<<10)
810
812
813// CompileTimeCast --------------------------------------------------------------
816
817 #define MqEnvC_X2env(x) (x)
818 #define MqEnvC_X2obj(x) MkOBJ(x)
819
821
822// TypeDef --------------------------------------------------------------
825
827 __parser__(ignore) typedef struct MqEnvS MqEnvCR;
829 __parser__(ignore) typedef const struct MqEnvS MqEnvCNR;
831 #define MqEnvC_T (&MQ_RT_REF._MqEnvC_T)
833 #define MqEnvC_TT (MkTYP(MqEnvC_T))
835 #define MqEnvST MqEnvC_T
837 #define MqEnvSTT (MkTYP(MqEnvST))
839 #define MqEnvC_type MQ_ENV
841 #define MqEnvCT_X(instance) ( (struct MkTypeDefS *) (MkOBJ_R(instance).type) )
843 #define MqEnvCTT_X(instance) (MkOBJ_R(instance).type)
845 #define MqEnvCT_TT(typ) ( (struct MkTypeDefS *) (typ) )
847 #define MqEnvC_NS MQ
849 #define MqEnvCTT MqEnvCTT
851 #define MqEnvCT ( (struct MkTypeDefS *) MqEnvCTT )
852
854
855// TypeCheck --------------------------------------------------------------
858
859 #pragma GCC diagnostic push
860 #pragma GCC diagnostic ignored "-Wattributes"
861
864 __parser__(class=MqEnvC,static,ignore)
867 return MkSanitizeCheck(MqEnvC,mng);
868 }
869
872 __parser__(class=MqEnvC,static,ignore)
875 return MkSanitizeCheckO(MqEnvC,obj);
876 }
877
878 #pragma GCC diagnostic pop
879 #define MqEnvC_Check(mng) MqEnvCheck(mng)
880
882
883// RunTimeCast --------------------------------------------------------------
886
888 __parser__(class=MqEnvC,ignore,static)
889 META_ATTRIBUTE_SANITIZE
892 return (MqEnvCheck(mng) ? (MQ_ENV)mng : NULL);
893 }
894
896 __parser__(class=MqEnvC,ignore,static)
897 META_ATTRIBUTE_SANITIZE
900 return (MqEnvCheck(mng) ? (MQ_ENVN)mng : NULL);
901 }
902
904 #define MqEnvRaise(_env) if (!_MkCheckX(MqEnvC,_env)) { \
905 MkErrorSetC_1E("'MqEnvC' hdl is NULL"); \
906 goto error ; \
907 }
908
910 #define MqENV_R(x) (*(x)).super.env
912 #define MqENV(x) (&MqENV_R(x))
913
915
918// MqEnvC_Class_Define_C_API
919
920// END-MqEnvS-Definition - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
921
923// MqEnvC_C_API
924
927
928// \brief check service call environment at the beginning of the service call
929#define MQ_SERVICE_CALL_CHECK do { \
930 assert (__data__ != NULL); \
931 if (MqCtxCheck(mqctx) == false || MkOBJ_R(mqctx).self == NULL) return MK_OK; \
932} while (0)
933
934// [MqTokenF]
936#define MQ_SERVICE_CALL_ARGS MK_RT_ARGS MQ_CTX const mqctx, MK_PTR const __data__
938#define MQ_SERVICE_CALL MK_RT_CALL mqctx, __data__
939
953__parser__(flags=public-internal)
954typedef enum MkErrorE ( MK_DECL *MqTokenF ) ( MQ_SERVICE_CALL_ARGS );
955// [MqTokenF]
956
957// [MqDataFreeF]
959#define MQ_SERVICE_FREE_ARGS MK_RT_ARGS MQ_CTX const mqctx, MK_PTR *dataP __parser__(inout)
960
962__parser__(flags=public-internal)
963typedef void ( MK_DECL *MqDataFreeF ) ( MQ_SERVICE_FREE_ARGS );
964// [MqDataFreeF]
965
966// [MqDataCopyF]
968#define MQ_SERVICE_COPY_ARGS MK_RT_ARGS MQ_CTX const mqctx, MK_PTR *dataP __parser__(inout)
969
971__parser__(flags=public-internal)
972typedef void ( MK_DECL *MqDataCopyF ) ( MQ_SERVICE_COPY_ARGS );
973// [MqDataCopyF]
974
976// MqContextC_ConfigApi_C_API
977
980__parser__(ignore)
988
993
994 // slaves link
998};
999
1000#if defined(MQ_C_BUILD_DLL)
1001
1002 #define META_SECTION_DEFINE
1003 #include "MqLinkS_mq.h"
1004 #undef META_SECTION_DEFINE
1005
1006#else // MQ_C_BUILD_DLL
1007
1010__parser__(ignore)
1011struct MqLinkS {
1012
1013 // PUBLIC variables
1014
1018 #define MqLinkS_targetIdent_size 64
1020
1021 // context-management variables
1024
1025 // protected environment
1026 struct MqEnvS protect;
1028
1029 // master/slave relationship
1030 struct MqLinkSlaveS slave;
1031
1032 // offset calculated by "Nhi1InternalSize"
1033 MK_BINB private_variables[40656];
1034};
1035
1036#endif // MQ_C_BUILD_DLL
1037
1038/* MARK_F ################################################################ */
1039/* ### ### */
1040/* ### C T X - C O N F I G - A P I ### */
1041/* ### ### */
1042/* ####################################################################### */
1043
1163// MqContextC_ConfigApi_C_API
1164
1165// #######################################################################
1166// -----------------------------------------------------------------------
1171
1172__parser__push__(doc-group=Misc,doc-index=ConfigApi);
1173
1182typedef enum MkErrorE ( MK_DECL
1183 *MqCreateF
1184) (
1185 MK_RT_ARGS
1186 MQ_CTX const ctx,
1187 MK_BFL const args
1188);
1189
1190#define MQ_CALLBACK_CREATE_ARGS MK_RT_ARGS MQ_CTX const mqctx, MK_BFL const argv
1191#define MQ_CALLBACK_CREATE_CALL MK_RT_CALL mqctx, argv
1192
1201typedef void ( MK_DECL
1202 *MqDeleteF
1203) (
1204 MQ_CTX const ctx
1205);
1206
1209typedef void ( MK_DECL
1210 *MqHelpF
1211) (
1212 MK_STRN basename
1213) __attribute__ ((noreturn));
1214
1227typedef int ( MK_DECL
1228 *MqExitF
1229) (
1231 int num
1232);
1233
1247typedef bool ( MK_DECL
1248 *MqWaitForPipeF
1249) (
1251 MQ_CTX const ctx,
1252 const struct MkIdS * idP __parser__(in)
1253);
1254
1258typedef void (MK_DECL *MqSetupF) ( MQ_CTX const ctx ) ;
1259
1272typedef void (MK_DECL *MqRefCountF) ( MK_RT_ARGS MQ_CTX ctx , MK_PTR const env) ;
1273
1279__parser__(ignore)
1283
1294__parser__(ignore)
1301
1308__parser__(ignore)
1312
1314__parser__(ignore)
1316};
1317
1322__parser__(ignore)
1324};
1325
1326/*****************************************************************************/
1327/* */
1328/* create / delete */
1329/* */
1330/*****************************************************************************/
1331
1335 MQ_CTX const ctx
1337
1339__parser__(internal)
1340MQ_EXTERN void MK_DECL MqConfigDup_RT (
1342 MQ_CTX const to,
1343 MQ_CTX const from
1345
1354// from being overwritten.
1355__parser__(hide)
1356MQ_EXTERN void MK_DECL MqSetupDup_RT (
1358 MQ_CTX const to,
1359 MQ_CTXN const from
1361
1363
1365// MqContextC_ConfigApi_Misc_C_API
1366
1367// #######################################################################
1368// -----------------------------------------------------------------------
1377__parser__push__(no-rpc,template-overload,doc-group=Setup,prefix=Setup);
1378
1382#ifndef META_COMPILE_AS_CC
1383__attribute__ ((constructor(300)))
1384#endif
1385__parser__(no-inline)
1386MQ_EXTERN void MK_DECL MqSetup (void) MK_ATTR_STATIC ;
1387
1391#ifndef META_COMPILE_AS_CC
1392__attribute__ ((destructor(300)))
1393#endif
1394__parser__(no-inline)
1395MQ_EXTERN void MK_DECL MqCleanup (void) MK_ATTR_STATIC ;
1396
1398__parser__(ignore)
1399MQ_EXTERN_DATA bool MqCleanupActive;
1400
1402
1404// MqMsgque_Setup_C_API
1405
1406
1407// #######################################################################
1408// -----------------------------------------------------------------------
1412
1413__parser__push__(doc-group=Enum,doc-index=_ignore_,class=MqMsgque);
1414
1417
1423// [MqStartE]
1430// [MqStartE]
1431
1432// BEGIN-MqStartE - created by 'c_MqS.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
1433
1436__parser__(doc-group=Enum,doc-index=_ignore_,class=MqMsgque,no-rpc,prefix=EnumFunc,return-type-default-no)
1437MQ_EXTERN MK_STRN MK_DECL MqStartE_ToString ( enum MqStartE value ) MK_ATTR_STATIC ;
1438
1441__parser__(doc-group=Enum,doc-index=_ignore_,class=MqMsgque,no-rpc,prefix=EnumFunc,return-type-default-no)
1443mk_inline MK_I32 MqStartE_ToInt ( enum MqStartE value ) {
1444 return (MK_I32) value;
1445}
1446
1449__parser__(doc-group=Enum,doc-index=_ignore_,class=MqMsgque,no-rpc,prefix=EnumFunc)
1450MQ_EXTERN enum MkErrorE MqStartE_FromInt ( MK_I32 const value, enum MqStartE * value_out ) MK_ATTR_STATIC ;
1451
1452// END-MqStartE - created by 'c_MqS.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
1453
1455
1458
1464// [MqStatusIsEF]
1465__parser__(enum-is-flag)
1473// [MqStatusIsEF]
1474
1475// BEGIN-MqStatusIsEF - created by 'c_MqS.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
1476
1479__parser__(doc-group=Enum,doc-index=_ignore_,class=MqMsgque,no-rpc,prefix=EnumFunc,return-type-default-no)
1480MQ_EXTERN MK_STRN MK_DECL MqStatusIsEF_ToString ( enum MqStatusIsEF value ) MK_ATTR_STATIC ;
1481
1484__parser__(doc-group=Enum,doc-index=_ignore_,class=MqMsgque,no-rpc,prefix=EnumFunc,return-type-default-no)
1486mk_inline MK_I32 MqStatusIsEF_ToInt ( enum MqStatusIsEF value ) {
1487 return (MK_I32) value;
1488}
1489
1492__parser__(doc-group=Enum,doc-index=_ignore_,class=MqMsgque,no-rpc,prefix=EnumFunc)
1493MQ_EXTERN enum MkErrorE MqStatusIsEF_FromInt ( MK_I32 const value, enum MqStatusIsEF * value_out ) MK_ATTR_STATIC ;
1494
1495// END-MqStatusIsEF - created by 'c_MqS.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
1496
1498// MqStatusIsEF
1499
1502
1504__parser__(internal,enum-is-flag)
1513
1514// BEGIN-MqFactoryE - created by 'c_MqS.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
1515
1518__parser__(internal,no-rpc,prefix=EnumFunc,return-type-default-no)
1519MQ_EXTERN MK_STRN MK_DECL MqFactoryE_ToString ( enum MqFactoryE value ) MK_ATTR_STATIC ;
1520
1523__parser__(internal,no-rpc,prefix=EnumFunc,return-type-default-no)
1525mk_inline MK_I32 MqFactoryE_ToInt ( enum MqFactoryE value ) {
1526 return (MK_I32) value;
1527}
1528
1531__parser__(internal,no-rpc,prefix=EnumFunc)
1532MQ_EXTERN enum MkErrorE MqFactoryE_FromInt ( MK_I32 const value, enum MqFactoryE * value_out ) MK_ATTR_STATIC ;
1533
1534// END-MqFactoryE - created by 'c_MqS.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
1535
1537// MqFactoryE
1538
1541
1543__parser__(internal)
1551
1552// BEGIN-MqIoComE - created by 'c_MqS.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
1553
1556__parser__(internal,no-rpc,prefix=EnumFunc,return-type-default-no)
1557MQ_EXTERN MK_STRN MK_DECL MqIoComE_ToString ( enum MqIoComE value ) MK_ATTR_STATIC ;
1558
1561__parser__(internal,no-rpc,prefix=EnumFunc,return-type-default-no)
1563mk_inline MK_I32 MqIoComE_ToInt ( enum MqIoComE value ) {
1564 return (MK_I32) value;
1565}
1566
1569__parser__(internal,no-rpc,prefix=EnumFunc)
1570MQ_EXTERN enum MkErrorE MqIoComE_FromInt ( MK_I32 const value, enum MqIoComE * value_out ) MK_ATTR_STATIC ;
1571
1572// END-MqIoComE - created by 'c_MqS.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
1573
1575// MqIoComE
1576
1579
1585// [MqWaitOnEventE]
1618// [MqWaitOnEventE]
1619
1620// BEGIN-MqWaitOnEventE - created by 'c_MqS.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
1621
1624__parser__(doc-group=Enum,doc-index=_ignore_,class=MqMsgque,no-rpc,prefix=EnumFunc,return-type-default-no)
1625MQ_EXTERN MK_STRN MK_DECL MqWaitOnEventE_ToString ( enum MqWaitOnEventE value ) MK_ATTR_STATIC ;
1626
1629__parser__(doc-group=Enum,doc-index=_ignore_,class=MqMsgque,no-rpc,prefix=EnumFunc,return-type-default-no)
1631mk_inline MK_I32 MqWaitOnEventE_ToInt ( enum MqWaitOnEventE value ) {
1632 return (MK_I32) value;
1633}
1634
1637__parser__(doc-group=Enum,doc-index=_ignore_,class=MqMsgque,no-rpc,prefix=EnumFunc)
1638MQ_EXTERN enum MkErrorE MqWaitOnEventE_FromInt ( MK_I32 const value, enum MqWaitOnEventE * value_out ) MK_ATTR_STATIC ;
1639
1640// END-MqWaitOnEventE - created by 'c_MqS.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
1641
1643// MqWaitOnEventE
1644
1647
1654// [MqSlaveE]
1655__parser__(enum-accept-integer=int32)
1667// [MqSlaveE]
1668
1669// BEGIN-MqSlaveE - created by 'c_MqS.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
1670
1673__parser__(doc-group=Enum,doc-index=_ignore_,class=MqMsgque,no-rpc,prefix=EnumFunc,return-type-default-no)
1674MQ_EXTERN MK_STRN MK_DECL MqSlaveE_ToString ( enum MqSlaveE value ) MK_ATTR_STATIC ;
1675
1678__parser__(doc-group=Enum,doc-index=_ignore_,class=MqMsgque,no-rpc,prefix=EnumFunc,return-type-default-no)
1680mk_inline MK_I32 MqSlaveE_ToInt ( enum MqSlaveE value ) {
1681 return (MK_I32) value;
1682}
1683
1686__parser__(doc-group=Enum,doc-index=_ignore_,class=MqMsgque,no-rpc,prefix=EnumFunc)
1687MQ_EXTERN enum MkErrorE MqSlaveE_FromInt ( MK_I32 const value, enum MqSlaveE * value_out ) MK_ATTR_STATIC ;
1688
1689// END-MqSlaveE - created by 'c_MqS.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
1690
1692// MqSlaveE
1693
1695
1697// MqMsgque_Enum_C_API
1698
1701__parser__(ignore)
1706
1707// #######################################################################
1708// -----------------------------------------------------------------------
1712
1714__parser__(ignore)
1716
1722
1725
1728
1736
1738 struct MqIoUdsConfigS uds;
1739
1741 struct MqIoTcpConfigS tcp;
1742
1744 struct MqIoPipeConfigS pipe;
1745
1747 struct MqIoLoopConfigS loop;
1748
1750 struct MqIoInitConfigS init;
1751};
1752
1754__parser__(ignore)
1756
1759
1781
1782 #define MqConfigS_dispName_size 64
1811
1812 #define MqConfigS_dispPrefix_size 64
1828
1829 #define MqConfigS_dispPostfix_size 64
1843
1846
1849
1852
1854 struct MqIoConfigS io;
1855
1863 #define MqConfigS_storageFile_size 256
1865
1866 struct {
1867 bool dispNameLOCK :1 ;
1871 } bits;
1872
1910
1912
1913#if META_HAVE_LIBCONFIG
1964
1967
1970#else
1971 void * cfg_dummy;
1972 void * rootH_dummy;
1973 void * filterH_dummy;
1974#endif // META_HAVE_LIBCONFIG
1975
1976};
1977
1979__parser__(ignore)
1980struct MqSetupS {
1981
2002 //MK_STRN ident;
2004
2007
2018 struct MqCallbackS BgError;
2019
2029
2042 // PRIVATE: \attention the \RMKNS{BFL} commandline-arguments are available at \RCNs{LinkS::alfa} in \RCNs{ContextS::link}
2043 struct MqCallbackS ServerSetup;
2044
2054 struct MqCallbackS ServerCleanup;
2055
2056 // misc
2057
2077 struct MqCallbackS Event;
2078
2081
2094};
2095
2097// MqContextC_ConfigApi_Misc_C_API
2098
2099// #######################################################################
2100// -----------------------------------------------------------------------
2105
2106__parser__push__(doc-group=Set,doc-index=ConfigApi);
2107
2109MQ_EXTERN void
2112 MQ_CTX const ctx,
2113 MK_STRN data
2115
2123__parser__(internal)
2124MQ_EXTERN void
2127 MQ_CTX const ctx,
2128 MK_STRN data
2130
2132MQ_EXTERN void
2135 MQ_CTX const ctx,
2136 MK_STRN data
2138
2140MQ_EXTERN void
2143 MQ_CTX const ctx,
2144 MK_STRN data
2146
2148MQ_EXTERN void
2151 MQ_CTX const ctx,
2152 MK_STRN data
2154
2155
2159__parser__(internal)
2160MQ_EXTERN void
2162 MQ_CTX const ctx,
2163 MK_TIME_T data
2165
2172 MQ_CTX const ctx,
2173 MK_I32 const data
2175
2179MQ_EXTERN void
2181 MQ_CTX const ctx,
2182 bool data
2184
2188 MQ_CTX const ctx,
2189 enum MqStartE data
2191
2195 MQ_CTX const ctx,
2196 MK_STRN data
2198
2200MQ_EXTERN bool
2202 MQ_CTX const ctx,
2203 enum MqStartE data
2205
2215 MQ_CTX const ctx,
2216 MK_STRN file
2218
2225__parser__(flags=public-internal)
2229 MQ_CTX const ctx,
2230 MK_STRN host __parser__(default=F#STRING_NULL),
2231 MK_STRN port __parser__(default=F#STRING_NULL),
2232 MK_STRN myhost __parser__(default=F#STRING_NULL),
2233 MK_STRN myport __parser__(default=F#STRING_NULL)
2235
2237//
2242__parser__(no-type-extension,overload=MqConfigSetIoTcp)
2246 MQ_CTX const ctx,
2247 MK_BFL const vals
2249
2254//
2262 MQ_CTX const ctx,
2263 MQ_SOCK_HDL fh
2265
2283 MQ_CTX const ctx,
2284 MK_STRN pidfile
2286
2288MQ_EXTERN void
2290 MQ_CTX const ctx,
2291 MK_I32 data
2293
2295MQ_EXTERN void
2297 MQ_CTX const ctx,
2298 MK_I32 data
2300
2302MQ_EXTERN void
2304 MQ_CTX const ctx,
2305 MK_TIME_T data
2307
2309MQ_EXTERN void
2311 MQ_CTX const ctx,
2312 bool data
2314
2316MQ_EXTERN void
2318 MQ_CTX const ctx,
2319 enum MqIdentE data
2321
2323MQ_EXTERN void
2325 MQ_CTX const ctx,
2326 bool data
2329
2331// MqContextC_ConfigApi_Set_C_API
2332
2333
2334// #######################################################################
2335// -----------------------------------------------------------------------
2357
2358__parser__push__(doc-group=Interface,doc-index=ConfigApi);
2359
2372#define MqInterfaceDoc(mkrt,ctx,fCall,callback,fFree,fCopy)
2373
2379__parser__(no-rpc,callback-name=ServerSetup,callback-null,flags=public-internal)
2380MQ_EXTERN void
2383 MQ_CTX const ctx,
2384 MqTokenF fCall __parser__(callback-call),
2385 MK_CBP callback __parser__(callback-data,null-allowed),
2386 MqDataFreeF fFree __parser__(callback-free,null-allowed),
2387 MqDataCopyF fCopy __parser__(callback-copy,null-allowed)
2389
2395__parser__(no-rpc,callback-name=ServerCleanup,callback-null,flags=public-internal)
2396MQ_EXTERN void
2399 MQ_CTX const ctx,
2400 MqTokenF fCall __parser__(callback-call),
2401 MK_CBP callback __parser__(callback-data),
2402 MqDataFreeF fFree __parser__(callback-free),
2403 MqDataCopyF fCopy __parser__(callback-copy)
2405
2411__parser__(no-rpc,callback-name=BgError,callback-null,flags=public-internal)
2412MQ_EXTERN void
2415 MQ_CTX const ctx,
2416 MqTokenF fCall __parser__(callback-call),
2417 MK_CBP callback __parser__(callback-data),
2418 MqDataFreeF fFree __parser__(callback-free),
2419 MqDataCopyF fCopy __parser__(callback-copy)
2421
2431__parser__(no-rpc,callback-name=Event,callback-null,flags=public-internal)
2432MQ_EXTERN void
2435 MQ_CTX const ctx,
2436 MqTokenF fCall __parser__(callback-call),
2437 MK_CBP callback __parser__(callback-data),
2438 MqDataFreeF fFree __parser__(callback-free),
2439 MqDataCopyF fCopy __parser__(callback-copy)
2441
2443
2445// MqContextC_ConfigApi_Interface_C_API
2446
2447// #######################################################################
2448// -----------------------------------------------------------------------
2453
2456#define MQ_IS_SERVER(ctx) (ctx->setup.isServer == true)
2457#define MQ_IS_SERVER_PARENT(ctx) (MQ_IS_SERVER(ctx) && MQ_IS_PARENT(ctx))
2458#define MQ_IS_CLIENT(ctx) (ctx->setup.isServer == false)
2459#define MQ_IS_CLIENT_PARENT(ctx) (MQ_IS_CLIENT(ctx) && MQ_IS_PARENT(ctx))
2460#define MQ_IS_CHILD(ctx) ((ctx)->config.parent != NULL)
2461#define MQ_IS_PARENT(ctx) ((ctx)->config.parent == NULL)
2462#define MQ_IS_SLAVE(ctx) ((ctx)->config.master != NULL)
2463#define MQ_IS_MASTER(ctx) ((ctx)->config.master == NULL)
2464#define MQ_IS_LOOPBACK(ctx) ((ctx)->config.io.com == MQ_IO_LOOP)
2465
2466#define MQ_GET_PARENT(ctx) (MQ_IS_CHILD(ctx) ? ctx->link.ctxIdP : ctx)
2467#define MQ_GET_MASTER(ctx) (MQ_IS_SLAVE(ctx) ? ctx->config.master : ctx)
2468
2469#define MQ_IS_ON_EXIT(ctx) (MQ_GET_PARENT(ctx)->bits.onExit == true)
2471
2473
2474/* ####################################################################### */
2475/* ### ### */
2476/* ### C T X - L O G - A P I ### */
2477/* ### ### */
2478/* ####################################################################### */
2479
2494
2495__parser__push__(doc-group=Log,doc-index=LogApi);
2496
2507__parser__(const,class-overload=MkObjectLog)
2508MQ_EXTERN void MK_DECL MqContextLog_RT (
2510 MQ_CTXN const ctx ,
2512 MK_DBG const debug __parser__(default=0),
2513 MK_STRN const callfunc __parser__(default=F#FUNC),
2514 MK_I32 const lvl __parser__(default=0)
2516
2528__parser__(const)
2529MQ_EXTERN void MK_DECL MqContextLogShort_RT (
2531 MQ_CTXN const ctx ,
2533 MK_DBG const debug __parser__(default=0),
2534 MK_STRN const callfunc __parser__(default=F#FUNC),
2535 MK_I32 const lvl __parser__(default=0),
2536 MK_STRN const label __parser__(default=F#STRING_NULL)
2538
2547__parser__(const)
2548MQ_EXTERN void MK_DECL MqContextLogConfig_RT (
2550 MQ_CTXN const ctx ,
2552 MK_DBG const debug __parser__(default=0),
2553 MK_STRN const callfunc __parser__(default=F#FUNC),
2554 MK_I32 const lvl __parser__(default=0)
2556
2565__parser__(const)
2566MQ_EXTERN void MK_DECL MqContextLogSetup_RT (
2568 MQ_CTXN const ctx ,
2570 MK_DBG const debug __parser__(default=0),
2571 MK_STRN const callfunc __parser__(default=F#FUNC),
2572 MK_I32 const lvl __parser__(default=0)
2574
2583__parser__(const)
2584MQ_EXTERN void MK_DECL MqContextLogLink_RT (
2586 MQ_CTXN ctx ,
2588 MK_DBG const debug __parser__(default=0),
2589 MK_STRN const callfunc __parser__(default=F#FUNC),
2590 MK_I32 const lvl __parser__(default=0)
2592
2603__parser__(const)
2604MQ_EXTERN void MK_DECL MqContextLogEnv_RT (
2606 MQ_CTX const ctx ,
2608 MK_DBG const debug __parser__(default=0),
2609 MK_STRN const callfunc __parser__(default=F#FUNC),
2610 MK_I32 const lvl __parser__(default=0)
2612
2623__parser__(const,flags=new)
2624MQ_EXTERN void MK_DECL MqContextLogType_RT (
2626 MQ_CTX const ctx ,
2628 MK_DBG const debug __parser__(default=0),
2629 MK_STRN const callfunc __parser__(default=F#FUNC),
2630 MK_I32 const lvl __parser__(default=0)
2632
2633__parser__(ignore)
2634MQ_EXTERN void MK_DECL MqContextLogDebug (MQ_CTX const ctx);
2635
2636// end of class=MqContextC,doc-group=Log
2638
2640// MqContextC_LogApi_Log_C_API
2641
2642// #######################################################################
2643// -----------------------------------------------------------------------
2656
2665typedef int (*MqSysSelectF) (int max, void* read, void* write, void* except, struct timeval* timeout);
2666
2683
2708__parser__(hide)
2709MQ_EXTERN void MK_DECL MqSysServerThreadMain (
2710 struct MqSysServerThreadMainS *data __parser__(in,silent)
2711);
2712
2727typedef enum MkErrorE (*MqSysServerSpawnF) (
2729 MQ_CTX const ctx,
2730 char *const * argv,
2731 MK_STRN name,
2732 struct MkIdS * idPtrOut
2733);
2734
2749typedef enum MkErrorE (*MqSysServerThreadF) (
2751 MQ_CTX const ctx,
2752 struct MqSysServerThreadMainS * const argP __parser__(in) ,
2753 MK_STRN name,
2754 int state,
2755 struct MkIdS * idPtrOut __parser__(in)
2756);
2757
2774typedef enum MkErrorE (*MqSysServerForkF) (
2776 MQ_CTX const ctx,
2777 MQ_FCT factory,
2778 MK_BFL* argsP,
2779 MK_STRN name,
2780 MQ_SOCK_HDL socket,
2781 struct MkIdS * idPtrOut __parser__(in)
2782);
2783
2785__parser__(ignore)
2799
2801__parser__(ignore)
2803
2805// - MqMsgque_Sys_C_API
2806
2807/* MARK_E ################################################################ */
2808/* ### ### */
2809/* ### E R R O R - A P I ### */
2810/* ### ### */
2811/* ####################################################################### */
2812
2823
2825__parser__(internal)
2826struct MqErrorS {
2827 // BEGIN-MqErrorS-super - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
2828
2829 union {
2830 struct MkObjectS obj; // instance-base MkObjectS
2831 struct MkExtensionS ext; // instance-base MkExtensionS
2832 struct MkErrExtS errext; // instance-base MkErrExtS
2833 } super;
2834
2835 // END-MqErrorS-super - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
2836
2837 // instance attributes
2838 char errhint; // the TYPE if the \e errobj U=undefined, C=client, S=server
2839
2840 MQ_CTXN client_ctx; // context source of the error, NULL = current context
2841
2842 // The \e error_protect is used in \RCNs{SendERROR} to restructure the environment at
2843 // the time of the error. The data is a copy of the \RCNs{LinkS::protect} data
2844 struct MqEnvS client_protect;
2845
2846 MQ_CTXN server_ctx; // context source of the error, NULL = current context
2847
2848 // The \e error_protect is used in \RCNs{SendERROR} to restructure the environment at
2849 // the time of the error. The data is a copy of the \RCNs{LinkS::protect} data
2850 struct MqEnvS server_protect;
2851};
2852
2853// BEGIN-MqErrorS-Definition - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
2854
2858 __parser__push__(prefix=Class, doc-group=Define, doc-index=Class);
2859
2860// Signature --------------------------------------------------------------
2863
2864 #define MqErrorC_SIGNATURE (MkErrExtC_SIGNATURE ^ (1u<<3))
2865 #define MqErrorC_MASK (((1u<<29)-1)<<3)
2866
2868
2869// CompileTimeCast --------------------------------------------------------------
2872
2873 #define MqErrorC_X2err(x) (x)
2874 #define MqErrorC_X2errext(x) MkERREXT(x)
2875 #define MqErrorC_X2ext(x) MkEXT(x)
2876 #define MqErrorC_X2obj(x) MkOBJ(x)
2877
2879
2880// TypeDef --------------------------------------------------------------
2883
2885 __parser__(ignore) typedef struct MqErrorS MqErrorCR;
2887 __parser__(ignore) typedef const struct MqErrorS MqErrorCNR;
2889 #define MqErrorC_T (&MQ_RT_REF._MqErrorC_T)
2891 #define MqErrorC_TT (MkTYP(MqErrorC_T))
2893 #define MqErrorST MqErrorC_T
2895 #define MqErrorSTT (MkTYP(MqErrorST))
2897 #define MqErrorC_type MQ_ERR
2899 #define MqErrorCT_X(instance) ( (struct MkTypeDefS *) (MkOBJ_R(instance).type) )
2901 #define MqErrorCTT_X(instance) (MkOBJ_R(instance).type)
2903 #define MqErrorCT_TT(typ) ( (struct MkTypeDefS *) (typ) )
2905 #define MqErrorC_NS MQ
2907 #define MqErrorCTT MqErrorCTT
2909 #define MqErrorCT ( (struct MkTypeDefS *) MqErrorCTT )
2910
2912
2913// TypeCheck --------------------------------------------------------------
2916
2917 #pragma GCC diagnostic push
2918 #pragma GCC diagnostic ignored "-Wattributes"
2919
2922 __parser__(class=MqErrorC,static,ignore)
2925 return MkSanitizeCheck(MqErrorC,mng);
2926 }
2927
2930 __parser__(class=MqErrorC,static,ignore)
2933 return MkSanitizeCheckO(MqErrorC,obj);
2934 }
2935
2936 #pragma GCC diagnostic pop
2937 #define MqErrorC_Check(mng) MqErrCheck(mng)
2938
2940
2941// RunTimeCast --------------------------------------------------------------
2944
2946 __parser__(class=MqErrorC,ignore,static)
2947 META_ATTRIBUTE_SANITIZE
2950 return (MqErrCheck(mng) ? (MQ_ERR)mng : NULL);
2951 }
2952
2954 __parser__(class=MqErrorC,ignore,static)
2955 META_ATTRIBUTE_SANITIZE
2958 return (MqErrCheck(mng) ? (MQ_ERRN)mng : NULL);
2959 }
2960
2962 #define MqErrRaise(_err) if (!_MkCheckX(MqErrorC,_err)) { \
2963 MkErrorSetC_1E("'MqErrorC' hdl is NULL"); \
2964 goto error ; \
2965 }
2966
2968 #define MqERR_R(x) (*(x)).super.err
2970 #define MqERR(x) (&MqERR_R(x))
2971
2973
2976// MqErrorC_Class_Define_C_API
2977
2978// END-MqErrorS-Definition - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
2979
2982#define MqERROR_R(r) ((*r).error_mq)
2983#define MqERROR_RT MqERROR_R(&MQ_RT_REF)
2984#define MqERROR_O(o) MqERROR_R(MqRT_O(o))
2985#define MqERROR_X(x) MqERROR_R(MqRT_X(x))
2986#define MqERROR_XN(x) MqERROR_R(MqRT_XN(x))
2987#define MqERROR MqERROR_R(&MqRuntimeRLS)
2989
2990
2996__parser__(ignore)
2997MQ_EXTERN void MK_DECL MqErrorEnvReset (
2998 MQ_ERR const err
3000
3002// MqErrorC_C_API
3003
3004/* ####################################################################### */
3005/* ### ### */
3006/* ### F A C T O R Y - A P I ### */
3007/* ### ### */
3008/* ####################################################################### */
3009
3067
3068#define MqFactoryPanic(fct) if (fct == NULL) MkPanicC(MK_ERROR_PANIC, __func__, -1, "MqFactoryS exception");
3069
3078typedef enum MkErrorE ( MK_DECL
3079 *MqFactoryCTorF
3080) (
3082 MQ_CTX const tmpl,
3083 enum MqFactoryE create,
3084 MQ_FCT const fct,
3085 MQ_CTX * ctx_out
3086);
3087
3089#define MQ_CALLBACK_FACTORY_CTOR_ARGS \
3090 MQ_RT_ARGS \
3091 MQ_CTX const tmpl, \
3092 enum MqFactoryE create, \
3093 struct MqFactoryS * const fct, \
3094 MQ_CTX *contextP \
3095
3096#define MQ_CALLBACK_FACTORY_CTOR_CALL MQ_RT_CALL tmpl, create, fct, contextP
3097
3111typedef void ( MK_DECL
3112 *MqFactoryDTorF
3113) (
3115 MQ_CTX ctx,
3116 bool doFactoryCleanup,
3117 MQ_FCT const fct
3118) ;
3119
3121#define MQ_CALLBACK_FACTORY_DTOR_ARGS \
3122 MQ_RT_ARGS \
3123 MQ_CTX ctx, \
3124 bool doFactoryCleanup, \
3125 MQ_FCT const fct \
3126
3128typedef void ( MK_DECL
3129 *MqFactoryDataFreeF
3130) (
3132 MK_PTR *dataP __parser__(inout)
3133) ;
3134
3136typedef void ( MK_DECL
3137 *MqFactoryDataCopyF
3138) (
3140 MK_PTR *dataP __parser__(inout)
3141) ;
3142
3144__parser__(ignore)
3151
3153__parser__(ignore)
3160
3161#define MqDbgFct_2(f,c) \
3162 mk_dbg_color_ln(c,"MqDbgFct[%-16s]: fct<P=%p:T=%p:R=%p>, MqFactoryC_TT<%p>", \
3163 MK_TRIM_LEFT(16,f->originalIdent), f, MkTYP_X(f), MkRT_X(f), MqFactoryC_TT)
3164#define MqDbgFct(f) MqDbgFct_2(f,MK_COLOR_YELLOW)
3165
3170 // BEGIN-MqFactoryS-super - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
3171
3172 union {
3173 struct MkObjectS obj; // instance-base MkObjectS
3174 } super;
3175
3176 // END-MqFactoryS-super - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
3177
3178 // instance attributes
3180 #define MqFactoryS_originalIdent_size 63
3183 struct MqFactoryCTorS fct_ctor;
3184 struct MqFactoryDTorS fct_dtor;
3185};
3186
3187// BEGIN-MqFactoryS-Definition - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
3188
3192 __parser__push__(prefix=Class, doc-group=Define, doc-index=Class);
3193
3194// Signature --------------------------------------------------------------
3197
3198 #define MqFactoryC_SIGNATURE (MkObjectC_SIGNATURE ^ (12u<<10))
3199 #define MqFactoryC_MASK (((1u<<22)-1)<<10)
3200
3202
3203// CompileTimeCast --------------------------------------------------------------
3206
3207 #define MqFactoryC_X2fct(x) (x)
3208 #define MqFactoryC_X2obj(x) MkOBJ(x)
3209
3211
3212// TypeDef --------------------------------------------------------------
3215
3217 __parser__(ignore) typedef struct MqFactoryS MqFactoryCR;
3219 __parser__(ignore) typedef const struct MqFactoryS MqFactoryCNR;
3221 #define MqFactoryC_T (&MQ_RT_REF._MqFactoryC_T)
3223 #define MqFactoryC_TT (MkTYP(MqFactoryC_T))
3225 #define MqFactoryST MqFactoryC_T
3227 #define MqFactorySTT (MkTYP(MqFactoryST))
3229 #define MqFactoryC_type MQ_FCT
3231 #define MqFactoryCT_X(instance) ( (struct MkTypeDefS *) (MkOBJ_R(instance).type) )
3233 #define MqFactoryCTT_X(instance) (MkOBJ_R(instance).type)
3235 #define MqFactoryCT_TT(typ) ( (struct MkTypeDefS *) (typ) )
3237 #define MqFactoryC_NS MQ
3239 #define MqFactoryCTT MqFactoryCTT
3241 #define MqFactoryCT ( (struct MkTypeDefS *) MqFactoryCTT )
3242
3244
3245// TypeCheck --------------------------------------------------------------
3248
3249 #pragma GCC diagnostic push
3250 #pragma GCC diagnostic ignored "-Wattributes"
3251
3254 __parser__(class=MqFactoryC,static,hide)
3257 return MkSanitizeCheck(MqFactoryC,mng);
3258 }
3259
3262 __parser__(class=MqFactoryC,static,hide)
3265 return MkSanitizeCheckO(MqFactoryC,obj);
3266 }
3267
3268 #pragma GCC diagnostic pop
3269 #define MqFactoryC_Check(mng) MqFctCheck(mng)
3270
3272
3273// RunTimeCast --------------------------------------------------------------
3276
3278 __parser__(class=MqFactoryC,hide,static)
3279 META_ATTRIBUTE_SANITIZE
3282 return (MqFctCheck(mng) ? (MQ_FCT)mng : NULL);
3283 }
3284
3286 __parser__(class=MqFactoryC,hide,static)
3287 META_ATTRIBUTE_SANITIZE
3290 return (MqFctCheck(mng) ? (MQ_FCTN)mng : NULL);
3291 }
3292
3294 #define MqFctRaise(_fct) if (!_MkCheckX(MqFactoryC,_fct)) { \
3295 MkErrorSetC_1E("'MqFactoryC' hdl is NULL"); \
3296 goto error ; \
3297 }
3298
3300 #define MqFCT_R(x) (*(x)).super.fct
3302 #define MqFCT(x) (&MqFCT_R(x))
3303
3305
3308// MqFactoryC_Class_Define_C_API
3309
3310// END-MqFactoryS-Definition - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
3311
3312// =========================================================================
3313// BEGIN-MqFactoryS-Export - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
3314
3317
3320
3321__parser__push__(doc-group=_ignore_,doc-index=Class,doc-name=Export,class=MqFactoryC);
3322
3338__parser__(class-overload=MkObjectHandleGet)
3342 MQ_FCT const fct __parser__(null-allowed)
3343) {
3344 return MkObjectHandleGet(fct?MkOBJ(fct):NULL);
3345}
3346
3355__parser__(flags=new)
3357mk_inline MQ_FCT MqFactoryHandleResolve_RT (
3359 MK_HDL const netHdl
3360) {
3361 return MqFct(MkObjectHandleResolve(netHdl));
3362}
3363
3373#define MqFactoryHandleResolve_e(netHdl) ({ \
3374 MK_HDL tmpHdl=netHdl; \
3375 MQ_FCT tmp; \
3376 if (tmpHdl==0) { \
3377 tmp=NULL; \
3378 } else { \
3379 tmp=MqFactoryHandleResolve(tmpHdl); \
3380 if (tmp==NULL) { \
3381 MkErrorSetC_1_NULL("ERROR: 'MqFactoryC' handle is 'NULL'"); \
3382 goto error; \
3383 }; \
3384 }; \
3385 tmp; \
3386})
3387
3389
3391// Class export & import
3392
3396 __parser__(flags=new,doc-group=_ignore_,doc-index=Class,doc-name=Misc,class=MqFactoryC,null-return-allow)
3399 return (MQ_FCT)MK_NULL;
3400 }
3402// MqFactoryC - Misc - function
3403
3405// MqFactoryC_Class_C_API
3406
3407// END-MqFactoryS-Export - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
3408
3409// #######################################################################
3410// -----------------------------------------------------------------------
3415
3416__parser__push__(doc-group=Get);
3417
3419__parser__(hide)
3420MQ_EXTERN MK_PTR MK_DECL MqFactoryItemGetCreateData (
3421 MQ_FCTN const fct
3423
3425__parser__(internal)
3426MQ_EXTERN MK_PTR MK_DECL MqFactoryItemGetDeleteData (
3427 MQ_FCTN const fct
3429
3432MQ_EXTERN MK_STRN MK_DECL MqFactoryGetOriginalIdent (
3433 MQ_FCTN const fct
3435
3449MQ_EXTERN MQ_FCT MK_DECL MqFactoryGet_RT (
3451 MK_STRN const ident __parser__(default=S#"")
3453
3467 MK_STRN const ident __parser__(default=S#"")
3469
3483// [MqFactoryGetCalledL_RT]
3484__parser__(no-type-extension,overload=MqFactoryGetCalled)
3485MQ_EXTERN MQ_FCT MK_DECL MqFactoryGetCalledL_RT (
3487 MK_BFLN largs __parser__(argument)
3489// [MqFactoryGetCalledL_RT]
3490
3492
3494// MqFactoryC_Get_C_API
3495
3496// #######################################################################
3497// -----------------------------------------------------------------------
3502
3503__parser__push__(doc-group=TOR);
3504
3512__parser__(hide)
3513MQ_EXTERN void MK_DECL MqFactoryFree_RT (
3515 MQ_FCT const fct
3517
3520
3533__parser__(destructor)
3534MQ_EXTERN void MK_DECL MqFactoryDelete_RT (
3536 MQ_FCT fct
3538
3540
3569__parser__(constructor,lng-constr,no-rpc,overload-c-no)
3570MQ_EXTERN MQ_FCT MK_DECL MqFactoryAdd_RT (
3572 MK_OBJN const error __parser__(internal,default=NULL), //C# reguire non "ERROR" name
3573// constructor
3574 MqFactoryCTorF const createCallF __parser__(internal,default=FactoryObjCreate),
3575 MK_CCP const constructor __parser__(constructor),
3576 MqFactoryDataFreeF const createDataFreeF __parser__(internal,default=FactoryFree),
3577 MqFactoryDataCopyF const createDataCopyF __parser__(internal,default=FactoryDup2),
3578// destructor
3579 MqFactoryDTorF const deleteCallF __parser__(internal,default=FactoryObjDelete),
3580 MK_CCP const destructor __parser__(internal,default=NULL),
3581 MqFactoryDataFreeF const deleteDataFreeF __parser__(internal,default=NULL),
3582 MqFactoryDataCopyF const deleteDataCopyF __parser__(internal,default=NULL),
3583
3584 MK_STRN const ident __parser__(default=F#CTOR#constructor)
3586
3587#define MqFactoryAdd_1(fct) MqFactoryAdd(MK_ERROR_PANIC,fct,NULL, NULL, NULL, NULL, NULL, NULL, NULL, #fct)
3588#define MqFactoryAdd_2(fct,ident) MqFactoryAdd(MK_ERROR_PANIC,fct,NULL, NULL, NULL, NULL, NULL, NULL, NULL, ident)
3589#define MqFactoryAdd_3(ctor,dtor,ident) MqFactoryAdd(MK_ERROR_PANIC,ctor,NULL, NULL, NULL, dtor, NULL, NULL, NULL, ident)
3590
3602__parser__(constructor,internal)
3603MQ_EXTERN MQ_FCT MK_DECL MqFactoryTypeAdd_RT (
3605 MK_OBJN const error,
3606 MK_STRN const ident,
3607 MkSelfCreateF const fctCreate,
3608 MkSelfDeleteF const fctDelete,
3609 MkConstructorF const constructor,
3610 MkSelfDeleteF const selfDelete
3612
3614__parser__(constructor)
3615MQ_EXTERN MQ_FCT MK_DECL MqFactoryDup2_RT (
3617 MQ_FCTN const fct,
3618 MK_STRN const ident
3620
3622
3624// MqFactoryC_TOR_C_API
3625
3626// #######################################################################
3627// -----------------------------------------------------------------------
3632
3633__parser__push__(doc-group=Misc);
3634
3650MQ_EXTERN MQ_FCT MK_DECL MqFactoryDefault_RT (
3652 MQ_FCT const fct
3654
3672MQ_EXTERN MQ_FCT MK_DECL MqFactoryInitial_RT (
3674 MQ_FCT const fct
3676
3678MQ_EXTERN MK_STRN MK_DECL MqFactoryDefaultIdent_RT (
3681
3683MQ_EXTERN MK_STRN MK_DECL MqFactoryInitialIdent_RT (
3686
3706__parser__(class=MqFactoryC,flags=virtual)
3707MQ_EXTERN enum MkErrorE MK_DECL MqFactoryNew_RT (
3709 MQ_FCT const fct,
3710 MQ_CTX const tmpl __parser__(internal,default=NULL),
3711 MQ_CTX* const val_out
3713
3718MQ_EXTERN void MK_DECL MqFactoryLogAll_RT (
3720 MK_STRN const callfunc __parser__(default=F#FUNC)
3722
3725
3736__parser__(const,class-overload=MkObjectLog)
3737MQ_EXTERN void MK_DECL MqFactoryLog_RT (
3739 MQ_FCTN const fct ,
3741 MK_DBG const debug __parser__(default=0),
3742 MK_STRN const callfunc __parser__(default=F#FUNC),
3743 MK_I32 const lvl __parser__(default=0)
3745
3746#define MqFactoryLog_2M(fct,m) MqFactoryLog(fct,MkObj(m),0,__func__,0)
3747
3749// MqFactoryLog
3750
3752
3754// MqFactoryC_Misc_C_API
3755
3757// MqFactoryC_C_API
3758
3759// #######################################################################
3760// -----------------------------------------------------------------------
3765
3771__parser__(ignore)
3773 // BEGIN-MqTypeCtxS-super - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
3774
3775 union {
3776 struct MkObjectS obj; // instance-base MkObjectS
3777 struct MkTypeS typ; // instance-base MkTypeS
3778 } super;
3779
3780 // END-MqTypeCtxS-super - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
3781
3782 // instance attributes
3783
3792
3795
3798
3801
3806
3811
3814
3817
3820
3823
3826
3829
3834 struct MqLinkSetupS Child;
3835
3838 struct MqLinkSetupS Parent;
3839
3852 struct MqCallbackS Idle;
3853
3856
3859
3869
3872
3875
3884};
3885
3886// BEGIN-MqTypeCtxS-Definition - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
3887
3891 __parser__push__(prefix=Class, doc-group=Define, doc-index=Class);
3892
3893// Signature --------------------------------------------------------------
3896
3897 #define MqTypeCtxC_SIGNATURE (MkTypeC_SIGNATURE ^ (2u<<6))
3898 #define MqTypeCtxC_MASK (((1u<<26)-1)<<6)
3899
3901
3902// CompileTimeCast --------------------------------------------------------------
3905
3906 #define MqTypeCtxC_X2ctxtyp(x) (x)
3907 #define MqTypeCtxC_X2typ(x) MkTYP(x)
3908 #define MqTypeCtxC_X2obj(x) MkOBJ(x)
3909
3911
3912// TypeDef --------------------------------------------------------------
3915
3917 __parser__(ignore) typedef struct MqTypeCtxS MqTypeCtxCR;
3919 __parser__(ignore) typedef const struct MqTypeCtxS MqTypeCtxCNR;
3921 #define MqTypeCtxSTT (&MQ_RT_REF._MqTypeCtxC_TT)
3923 #define MqTypeCtxC_TT (&MQ_RT_REF._MqTypeCtxC_TT)
3925 #define MqTypeCtxC_type MQ_CTXTYP
3927 #define MqTypeCtxCT_X(instance) ( (struct MkTypeS *) (MkOBJ_R(instance).type) )
3929 #define MqTypeCtxCTT_X(instance) (MkOBJ_R(instance).type)
3931 #define MqTypeCtxCT_TT(typ) ( (struct MkTypeS *) (typ) )
3933 #define MqTypeCtxC_NS MQ
3935 #define MqTypeCtxCTT MqTypeCtxCTT
3937 #define MqTypeCtxCT ( (struct MkTypeS *) MqTypeCtxCTT )
3938
3940
3941// TypeCheck --------------------------------------------------------------
3944
3945 #pragma GCC diagnostic push
3946 #pragma GCC diagnostic ignored "-Wattributes"
3947
3950 __parser__(class=MqTypeCtxC,static,ignore)
3953 return MkSanitizeCheck(MqTypeCtxC,mng);
3954 }
3955
3958 __parser__(class=MqTypeCtxC,static,ignore)
3961 return MkSanitizeCheckO(MqTypeCtxC,obj);
3962 }
3963
3964 #pragma GCC diagnostic pop
3965 #define MqTypeCtxC_Check(mng) MqCtxTypCheck(mng)
3966
3968
3971// MqTypeCtxC_Class_Define_C_API
3972
3973// END-MqTypeCtxS-Definition - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
3974
3976__parser__(class=MqContextC,internal,static)
3977mk_inline MQ_CTXT MqCtxTyp(MK_MNG mng) {
3978 if (!MkObjCheck(mng)) return NULL;
3979 MK_OBJ obj = (MK_OBJ) mng;
3980 if (MqCtxTypCheck(obj)) return (MQ_CTXT)obj;
3981 MQ_CTXT typ = (MQ_CTXT) obj->type;
3982 if (MqCtxTypCheck(typ)) return typ;
3983 return NULL;
3984}
3985
3996__parser__(ignore,const,class-overload=MkObjectLog)
3997MQ_EXTERN void MK_DECL MqTypeCtxLog_RT (
3999 MQ_CTXT const ctxtype ,
4001 MK_DBG const debug __parser__(default=0),
4002 MK_STRN const callfunc __parser__(default=F#FUNC),
4003 MK_I32 const lvl __parser__(default=0)
4005
4006#define MqTypeCtxLog_1(typ) MqTypeCtxLog_RT(MK_RT_CALL typ,NULL,0,__func__,0)
4007
4009// MqTypeCtxC_C_API
4010
4011/* ####################################################################### */
4012/* ### ### */
4013/* ### C O N T E X T - A P I ### */
4014/* ### ### */
4015/* ####################################################################### */
4016
4098
4099// ===================================================================================================
4100
4102#if defined(MQ_C_BUILD_DLL)
4103
4104 #define META_SECTION_DEFINE
4105 #include "MqContextS_mq.h"
4106 #undef META_SECTION_DEFINE
4107
4108#else // MQ_C_BUILD_DLL
4109
4111 // BEGIN-MqContextS-super - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
4112
4113 union {
4114 struct MkObjectS obj; // instance-base MkObjectS
4115 } super;
4116
4117 // END-MqContextS-super - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
4118
4119 // instance attributes
4120 const
4121 struct MqConfigS config;
4122 struct MqSetupS setup;
4123 struct MkBuffer64S ctxbuf;
4125 struct MqLinkS link;
4126
4127 // offset calculated by "Nhi1InternalSize"
4128 MK_BINB private_variables[16];
4129};
4130
4131#endif // MQ_C_BUILD_DLL
4132
4133// BEGIN-MqContextS-Definition - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
4134
4138 __parser__push__(prefix=Class, doc-group=Define, doc-index=Class);
4139
4140// Signature --------------------------------------------------------------
4143
4144 #define MqContextC_SIGNATURE (MkObjectC_SIGNATURE ^ (13u<<10))
4145 #define MqContextC_MASK (((1u<<22)-1)<<10)
4146
4148
4149// CompileTimeCast --------------------------------------------------------------
4152
4153 #define MqContextC_X2ctx(x) (x)
4154 #define MqContextC_X2obj(x) MkOBJ(x)
4155
4157
4158// TypeDef --------------------------------------------------------------
4161
4163 __parser__(ignore) typedef struct MqContextS MqContextCR;
4165 __parser__(ignore) typedef const struct MqContextS MqContextCNR;
4167 #define MqContextC_T (&MQ_RT_REF._MqContextC_T)
4169 #define MqContextC_TT (MkTYP(MqContextC_T))
4171 #define MqContextST MqContextC_T
4173 #define MqContextSTT (MkTYP(MqContextST))
4175 #define MqContextC_type MQ_CTX
4177 #define MqContextCT_X(instance) ( (struct MqTypeCtxS *) (MkOBJ_R(instance).type) )
4179 #define MqContextCTT_X(instance) (MkOBJ_R(instance).type)
4181 #define MqContextCT_TT(typ) ( (struct MqTypeCtxS *) (typ) )
4183 #define MqContextC_NS MQ
4185 #define MqContextCTT MqContextCTT
4187 #define MqContextCT ( (struct MqTypeCtxS *) MqContextCTT )
4188
4190
4191// TypeCheck --------------------------------------------------------------
4194
4195 #pragma GCC diagnostic push
4196 #pragma GCC diagnostic ignored "-Wattributes"
4197
4200 __parser__(class=MqContextC,static,hide)
4203 return MkSanitizeCheck(MqContextC,mng);
4204 }
4205
4208 __parser__(class=MqContextC,static,hide)
4211 return MkSanitizeCheckO(MqContextC,obj);
4212 }
4213
4214 #pragma GCC diagnostic pop
4215 #define MqContextC_Check(mng) MqCtxCheck(mng)
4216
4218
4219// RunTimeCast --------------------------------------------------------------
4222
4224 __parser__(class=MqContextC,hide,static)
4225 META_ATTRIBUTE_SANITIZE
4228 return (MqCtxCheck(mng) ? (MQ_CTX)mng : NULL);
4229 }
4230
4232 __parser__(class=MqContextC,hide,static)
4233 META_ATTRIBUTE_SANITIZE
4236 return (MqCtxCheck(mng) ? (MQ_CTXN)mng : NULL);
4237 }
4238
4240 #define MqCtxRaise(_ctx) if (!_MkCheckX(MqContextC,_ctx)) { \
4241 MkErrorSetC_1E("'MqContextC' hdl is NULL"); \
4242 goto error ; \
4243 }
4244
4246 #define MqCTX_R(x) (*(x)).super.ctx
4248 #define MqCTX(x) (&MqCTX_R(x))
4249
4251
4254// MqContextC_Class_Define_C_API
4255
4256// END-MqContextS-Definition - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
4257
4258// =========================================================================
4259// BEGIN-MqContextS-Export - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
4260
4263
4266
4267__parser__push__(doc-group=_ignore_,doc-index=Class,doc-name=Export,class=MqContextC);
4268
4284__parser__(class-overload=MkObjectHandleGet)
4288 MQ_CTX const ctx __parser__(null-allowed)
4289) {
4290 return MkObjectHandleGet(ctx?MkOBJ(ctx):NULL);
4291}
4292
4301__parser__(flags=new)
4303mk_inline MQ_CTX MqContextHandleResolve_RT (
4305 MK_HDL const netHdl
4306) {
4307 return MqCtx(MkObjectHandleResolve(netHdl));
4308}
4309
4319#define MqContextHandleResolve_e(netHdl) ({ \
4320 MK_HDL tmpHdl=netHdl; \
4321 MQ_CTX tmp; \
4322 if (tmpHdl==0) { \
4323 tmp=NULL; \
4324 } else { \
4325 tmp=MqContextHandleResolve(tmpHdl); \
4326 if (tmp==NULL) { \
4327 MkErrorSetC_1_NULL("ERROR: 'MqContextC' handle is 'NULL'"); \
4328 goto error; \
4329 }; \
4330 }; \
4331 tmp; \
4332})
4333
4335
4337// Class export & import
4338
4342 __parser__(flags=new,doc-group=_ignore_,doc-index=Class,doc-name=Misc,class=MqContextC,null-return-allow)
4345 return (MQ_CTX)MK_NULL;
4346 }
4348// MqContextC - Misc - function
4349
4351// MqContextC_Class_C_API
4352
4353// END-MqContextS-Export - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
4354
4356// MqContextC_C_API
4357
4358// #######################################################################
4359// -----------------------------------------------------------------------
4364
4365__parser__push__(doc-group=TOR);
4366
4368__parser__(internal)
4369MQ_EXTERN void MK_DECL MqContextInit_RT (
4371 MQ_CTX const ctx,
4372 MK_TYP type,
4373 MQ_CTX const tmpl
4375
4382__parser__(internal)
4383MQ_EXTERN void MK_DECL MqContextFree_RT (
4385 MQ_CTX const ctx
4387
4406__parser__(constructor,lng-constr)
4407MQ_EXTERN MQ_CTX MK_DECL MqContextCreate_RT (
4409 MK_TYP type __parser__(internal,default=NULL),
4410 MQ_CTX const tmpl __parser__(default=NULL)
4412
4419__parser__(internal,constructor)
4420MQ_EXTERN MQ_CTX MK_DECL MqContextSetup_RT (
4422 MK_TYP type __parser__(internal,default=NULL),
4423 MQ_CTX const tmpl __parser__(default=NULL),
4424 MQ_CTX *ctx_out
4426
4429
4440__parser__(destructor)
4441MQ_EXTERN void MK_DECL MqContextDelete_RT (
4443 MQ_CTX ctx
4445
4447
4449
4451// MqContextC_TOR_C_API
4452
4453// #######################################################################
4454// -----------------------------------------------------------------------
4460
4461__parser__push__(doc-group=Error,doc-index=ErrorApi);
4462
4483__parser__(error-ignore,no-static)
4484MQ_EXTERN enum MkErrorE MK_DECL MqContextErrorCopy_RT (
4486 MQ_CTXN const targetCtx ,
4487 MQ_CTXN const sourceCtx
4489
4504__parser__(error-ignore,no-static)
4505MQ_EXTERN enum MkErrorE MK_DECL MqContextErrorMove_RT (
4507 MQ_CTXN const targetCtx ,
4508 MQ_CTXN const sourceCtx
4510
4514mk_inline MK_ERR MqContextErrorFORMAT (
4515 MQ_CTXN const fmtobj __parser__(default=NULL)
4516) {
4517 return MkErrorFORMAT(MkOBJ(fmtobj));
4518}
4519
4521
4523// MqContextC_ErrorApi_Error_C_API
4524
4525
4526// #######################################################################
4527// -----------------------------------------------------------------------
4532
4533__parser__push__(doc-group=Misc,doc-index=MiscApi);
4534
4538 return ctx ? (MQ_IS_SLAVE(ctx) ? MqGetRoot(ctx->config.master) : MQ_GET_PARENT(ctx)) : NULL;
4539}
4540
4542__parser__(ignore)
4545 return ctx ? (MQ_IS_SLAVE(ctx) ? MqGetRoot(ctx->config.master) : MQ_GET_PARENT(ctx)) : NULL;
4546}
4547
4594 MQ_CTX const ctx __parser__(null-allowed),
4595 MK_STRN const callfunc __parser__(default=F#FUNC),
4596 MK_STRN const callfile __parser__(default=F#FILE),
4597 MK_I32 const callline __parser__(default=F#LINE)
4599
4612__parser__(internal)
4613MQ_EXTERN void MK_DECL MqContextMark_RT (
4615 MQ_CTX const ctx
4617
4634__parser__(hide)
4635MQ_EXTERN enum MkErrorE MK_DECL MqCheckForLeftOverArguments_RT (
4637 MQ_CTX const ctx,
4638 MK_BFLN args
4640
4648MQ_EXTERN MK_BUF MqContextGetBuffer_RT (
4650 MQ_CTX const ctx
4652
4701
4702MQ_EXTERN enum MkErrorE MK_DECL MqProcessEvent_RT (
4704 MQ_CTX const ctx,
4705 enum MqWaitOnEventE const wait __parser__(default=MQ_WAIT_NO),
4706 MK_TIME_T timeout __parser__(default=MK_TIMEOUT_DEFAULT)
4708
4709// sync with: MkObjectToString
4710//
4721__parser__(class-overload=MkObjectToString)
4722MQ_EXTERN MK_STRN MK_DECL MqContextToString_RT (
4724 MQ_CTXN const ctx
4726
4727/*
4739__parser__(internal)
4740MQ_EXTERN bool MK_DECL MqContextCheckLock (
4741 MQ_CTX ctx
4742) MK_ATTR_INSTANCE ;
4743*/
4744
4746
4748// MqContextC_MiscApi_Misc_C_API
4749
4750// #######################################################################
4751// -----------------------------------------------------------------------
4777
4778__parser__push__(doc-group=Env,doc-index=EnvApi);
4779
4783MQ_EXTERN void MK_DECL MqEnvProtect_RT (
4785 MQ_CTX ctx
4787
4790MQ_EXTERN void MK_DECL MqEnvRestore (
4791 MQ_CTX ctx
4793
4796
4808__parser__(const,ignore,class-overload=MkObjectLog)
4809MQ_EXTERN void MK_DECL MqEnvLog_RT (
4811 MQ_ENVN const env ,
4813 MK_DBG const debug __parser__(default=0),
4814 MK_STRN const callfunc __parser__(default=F#FUNC),
4815 MK_I32 const lvl __parser__(default=0),
4816 MK_STRN const label __parser__(default=S#"ENV")
4818
4819#define MqEnvLog_0() MqEnvLog(&(META_CONTEXT_S)->link.protect,META_CONTEXT_S,NULL,0,__func__,0,"ENV")
4820#define MqEnvLog_1(env) MqEnvLog(env,NULL,NULL,0,__func__,0,"ENV")
4821#define MqEnvLog_2(env,fmt) MqEnvLog(env,fmt,NULL,0,__func__,0,"ENV")
4822#define MqEnvLog_3(env,fmt,lbl) MqEnvLog(env,fmt,lbl,0,__func__,0,"ENV")
4823
4825
4827
4829// MqContextC_EnvApi_Env_C_API
4830
4831// #######################################################################
4832// -----------------------------------------------------------------------
4909
4931
4932__parser__push__(doc-group=Storage,doc-index=StorageApi);
4933
4943 MQ_CTX const ctx,
4944 MQ_LTR transLId,
4945 MK_I32 *cnt_out
4947
4962 MQ_CTX const ctx,
4963 MK_STRN const storageFile
4965
4976 MQ_CTX const ctx
4978
4992 MQ_CTX const ctx,
4993 MQ_LTR *ltid_out
4995
5033 MQ_CTX const ctx,
5034 MQ_LTR *transLIdP_inout __parser__(default=0)
5036
5044MQ_EXTERN enum MkErrorE MK_DECL MqStorageIncrRef_RT (
5046 MQ_CTX const ctx,
5047 MQ_LTR transLId
5049
5057MQ_EXTERN enum MkErrorE MK_DECL MqStorageDecrRef_RT (
5059 MQ_CTX const ctx,
5060 MQ_LTR transLId
5062
5075MQ_EXTERN enum MkErrorE MK_DECL MqStorageDelete_RT (
5077 MQ_CTX const ctx,
5078 MQ_LTR *transLIdP_inout __parser__(default=0)
5080
5087MQ_EXTERN enum MkErrorE MK_DECL MqStorageCount_RT (
5089 MQ_CTX const ctx,
5090 MQ_LTR *cnt_out
5092
5095
5097MQ_EXTERN enum MkErrorE MK_DECL MqStorageLog_RT (
5099 MQ_CTX const ctx,
5100 MK_STRN const callfunc __parser__(default=F#FUNC)
5102
5103#define MqStorageLog_1(ctx) MqStorageLog(ctx,__func__)
5104
5106
5113__parser__(no-rpc)
5114MQ_EXTERN enum MkErrorE MK_DECL MqStorageResolve_RT (
5116 MQ_CTX const ctx,
5117 MQ_CTX *otherCtxP_out,
5118 MQ_LTR *otherLIdP_out
5120
5122
5124// MqContextC_StorageApi_Storage_C_API
5125
5126// #######################################################################
5127// -----------------------------------------------------------------------
5210__parser__push__(doc-group=Link,doc-index=LinkApi);
5211
5249MQ_EXTERN enum MkErrorE MK_DECL MqLinkCreate_RT (
5251 MQ_CTX const ctx,
5252 MK_BAC args __parser__(default=NULL)
5254
5265MQ_EXTERN enum MkErrorE MK_DECL MqLinkConnect_RT (
5267 MQ_CTX const ctx
5269
5282MQ_EXTERN enum MkErrorE MK_DECL MqLinkShutdown_RT (
5284 MQ_CTX const ctx
5286
5303MQ_EXTERN enum MkErrorE MK_DECL MqLinkCreateChild_RT (
5305 MQ_CTX const ctx,
5306 MQ_CTX const parent,
5307 MK_BAC const args __parser__(default=NULL)
5309
5325__parser__(hide,overload-c-no)
5326MQ_EXTERN enum MkErrorE MK_DECL MqLinkDefault_RT (
5328 MQ_CTX const ctx,
5329 MK_BAC const args __parser__(default=NULL)
5331
5341MQ_EXTERN void MK_DECL MqLinkDelete_RT (
5343 MQ_CTX const ctx
5345
5355MQ_EXTERN bool MK_DECL MqLinkIsConnected (
5356 MQ_CTX const ctx
5358
5364mk_inline MQ_CTX MqLinkGetParent ( MQ_CTX const ctx) {
5365 // BUF FIX: result always a context id "ctx" is valid
5366 // test: Nhi1Exec lcconfig.test --block-2 --fast-testing --lang-tcl -verbose e
5367 // -match lcconfig-2-5-* --num "1 3 1" --com-uds
5368 // RPC send "object-delete-message" on server-parent-context which can be
5369 // a client-child. The MqLinkGetParent is used to resolve this
5370 // file: LibLcConfigRpcClient.tcl
5371 return ctx ? MQ_GET_PARENT(ctx) : NULL;
5372}
5373
5382 return ctx ? MQ_IS_PARENT(ctx) : false;
5383}
5384
5396 return ctx ? ctx->link.ctxId : 0;
5397}
5398
5408 return ctx && ctx->link.ctxIdP ? ctx->link.ctxIdP->link.targetIdent : "";
5409}
5410
5412
5414// MqContextC_LinkApi_Link_C_API
5415
5416
5417// #######################################################################
5418// -----------------------------------------------------------------------
5612
5613__parser__push__(doc-group=Route,doc-index=RouteApi);
5614
5627 MQ_CTX ctx,
5628 MK_STRN route,
5629 MK_STRN service,
5630 bool overwrite __parser__(default=false)
5632
5636MQ_EXTERN enum MkErrorE MK_DECL MqRouteDelete_RT (
5638 MQ_CTX ctx,
5639 MK_STRN route,
5640 MK_STRN service,
5641 bool overwrite __parser__(default=false)
5643
5670MQ_EXTERN enum MkErrorE MK_DECL MqRouteTraverse_RT (
5672 MQ_CTX ctx,
5673 MK_STRN service,
5674 MK_BAC args __parser__(default=NULL)
5676
5681#define MQ_ROUTE_CTX_MAX 50
5682
5712
5715 MQ_CTX const ctx,
5716 MK_STRN const ident,
5717 MK_NUM const retnum __parser__(default=-1)
5719
5733MQ_EXTERN enum MkErrorE MK_DECL MqRouteGetPath_RT (
5735 MQ_CTX const ctx,
5736 MK_STRN * path_out
5738
5798MQ_EXTERN enum MkErrorE MK_DECL MqRouteGetTree_RT (
5800 MQ_CTX const ctx,
5801 MK_BFL *treeP_out
5803
5805
5807// MqContextC_RouteApi_Route_C_API
5808
5809
5810// #######################################################################
5811// -----------------------------------------------------------------------
5871
5872__parser__push__(doc-group=Service,doc-index=ServiceApi);
5873
5907__parser__(type=ME_PSN_MQ_TOKEN:"token identifer")
5909
5911#define MQ_TOK_SIZE (8+1)
5912
5913// [MqServiceCallbackF]
5925// [MqServiceCallbackF]
5926
5936 MQ_CTX const ctx
5937) {
5938 MK_INSTANCE_HDL(ctx);
5939 return (ctx->link.protect.transSId != 0);
5940}
5941
5950 MQ_CTX const ctx
5952
5961 MQ_CTX const ctx,
5962 MQ_TOK const token
5964
5975 MQ_CTX const ctx,
5976 MQ_TOK const token
5978
6021__parser__(no-rpc,callback-name=Service)
6022MQ_EXTERN enum MkErrorE MK_DECL MqServiceCreate_RT (
6024 MQ_CTX const ctx,
6025 MQ_TOK const token,
6026 MqServiceCallbackF const fCall __parser__(callback-call),
6027 MK_CBP callback __parser__(callback-data),
6028 MqDataFreeF fFree __parser__(callback-free),
6029 MkMarkF fMark __parser__(internal,default=NULL)
6031
6032// \anchor \NS{StorageService}
6045MQ_EXTERN enum MkErrorE MK_DECL MqServiceStorage_RT (
6047 MQ_CTX const ctx,
6048 MQ_TOK const token
6050
6057MQ_EXTERN enum MkErrorE MK_DECL MqServiceDelete_RT (
6059 MQ_CTX const ctx,
6060 MQ_TOK const token
6062
6070
6084MQ_EXTERN enum MkErrorE MK_DECL MqServiceProxy_RT (
6086 MQ_CTX const ctx,
6087 MQ_TOK const token,
6088 MQ_SLAVE_ID const id __parser__(default=MQ_SLAVE_OTHER)
6090
6093MQ_EXTERN enum MkErrorE MK_DECL MqServiceProxyCtx_RT (
6095 MQ_CTX const ctx,
6096 MQ_TOK const token,
6097 MQ_CTX const target
6099
6118MQ_EXTERN enum MkErrorE MK_DECL MqServiceProxyRoundRobin_RT (
6120 MQ_CTX const ctx,
6121 MQ_TOK const token,
6122 MK_STRN const ident
6124
6129MQ_EXTERN bool MK_DECL MqServiceProxyCtxExists (
6130 MQ_CTX const ctx,
6131 MQ_TOK const token,
6132 MQ_CTX const target
6134
6136// MqServiceProxy
6137
6139
6141// MqContextC_ServiceApi_Service_C_API
6142
6143// #######################################################################
6144// -----------------------------------------------------------------------
6176// MqContextC_ReadApi_C_API
6177
6178// #######################################################################
6179// -----------------------------------------------------------------------
6184
6185__parser__push__(doc-group=Block,doc-index=ReadApi);
6186
6197MQ_EXTERN enum MkErrorE MK_DECL MqReadL_START_RT (
6199 MQ_CTX const ctx,
6200 MK_BUF buf __parser__(default=NULL)
6202
6208MQ_EXTERN enum MkErrorE MK_DECL MqReadL_END_RT (
6210 MQ_CTX const ctx
6212
6224MQ_EXTERN enum MkErrorE MK_DECL MqReadT_START_RT (
6226 MQ_CTX const ctx
6228
6234MQ_EXTERN enum MkErrorE MK_DECL MqReadT_END_RT (
6236 MQ_CTX const ctx
6238
6240
6242// MqContextC_ReadApi_Block_C_API
6243
6244// #######################################################################
6245// -----------------------------------------------------------------------
6250
6251__parser__push__(doc-group=Atom,doc-index=ReadApi);
6252
6258MQ_EXTERN enum MkErrorE MK_DECL MqReadI8_RT (
6260 MQ_CTX const ctx,
6261 MK_I8 * const val_out
6263
6266MQ_EXTERN enum MkErrorE MK_DECL MqReadBOL_RT (
6268 MQ_CTX const ctx,
6269 MK_BOL * const val_out
6271
6274MQ_EXTERN enum MkErrorE MK_DECL MqReadI16_RT (
6276 MQ_CTX const ctx,
6277 MK_I16 * const val_out
6279
6282MQ_EXTERN enum MkErrorE MK_DECL MqReadI32_RT (
6284 MQ_CTX const ctx,
6285 MK_I32 * const val_out
6287
6290MQ_EXTERN enum MkErrorE MK_DECL MqReadFLT_RT (
6292 MQ_CTX const ctx,
6293 MK_FLT * const val_out
6295
6298MQ_EXTERN enum MkErrorE MK_DECL MqReadI64_RT (
6300 MQ_CTX const ctx,
6301 MK_I64 * const val_out
6303
6306MQ_EXTERN enum MkErrorE MK_DECL MqReadDBL_RT (
6308 MQ_CTX const ctx,
6309 MK_DBL * const val_out
6311
6334MQ_EXTERN enum MkErrorE MK_DECL MqReadBUF_RT (
6336 MQ_CTX const ctx,
6337 MK_BUF* const val_out
6339
6355MQ_EXTERN enum MkErrorE MK_DECL MqReadBFL_RT (
6357 MQ_CTX const ctx,
6358 MK_BFL* const val_out
6360
6371MQ_EXTERN enum MkErrorE MK_DECL MqReadALL_RT (
6373 MQ_CTX const ctx,
6374 MK_BFL* const val_inout
6376
6391__parser__(template-required,no-rpc,keep,no-static)
6392MQ_EXTERN enum MkErrorE MK_DECL MqReadLIST_RT (
6394 MQ_CTX const ctx,
6395 MK_NAT_LIST* const val_out
6397
6406__parser__(template-required,no-rpc,keep,no-static)
6407MQ_EXTERN enum MkErrorE MK_DECL MqReadNEXT_RT (
6409 MQ_CTX const ctx,
6410 MK_NAT_OBJECT* const val_out
6412
6423MQ_EXTERN enum MkErrorE MK_DECL MqReadLONG_RT (
6425 MQ_CTX const ctx,
6426 MK_LONG* const val_out
6428
6439MQ_EXTERN enum MkErrorE MK_DECL MqReadHDL_RT (
6441 MQ_CTX const ctx,
6442 MK_HDL* const val_out
6444
6459MQ_EXTERN enum MkErrorE MK_DECL MqReadSTR_RT (
6461 MQ_CTX const ctx,
6462 MK_STRN * const val_out
6464
6481MQ_EXTERN enum MkErrorE MK_DECL MqReadBIN_RT (
6483 MQ_CTX const ctx,
6484 MkBinaryR * const val_out
6486
6495MQ_EXTERN enum MkErrorE MK_DECL MqReadStringR_RT (
6497 MQ_CTX const ctx,
6498 MkStringR * const val_out
6500
6509MQ_EXTERN enum MkErrorE MK_DECL MqReadBinaryR_RT (
6511 MQ_CTX const ctx,
6512 MkBinaryR * const val_out
6514
6516
6518// MqContextC_ReadApi_Atom_C_API
6519
6520// #######################################################################
6521// -----------------------------------------------------------------------
6526
6527__parser__push__(doc-group=Misc,doc-index=ReadApi);
6528
6529__parser__(doc-no)
6530MQ_EXTERN void MK_DECL MqReadDbg_RT (
6532 MQ_CTX const ctx
6534
6543MQ_EXTERN enum MkErrorE MK_DECL MqReadUndo_RT (
6545 MQ_CTX const ctx
6547
6552MQ_EXTERN MK_NUM MK_DECL MqReadGetNumItems (
6553 MQ_CTX const ctx
6555
6560MQ_EXTERN enum MkTypeE MK_DECL MqReadGetNextType (
6561 MQ_CTX const ctx
6563
6568MQ_EXTERN bool MK_DECL MqReadItemExists (
6569 MQ_CTX const ctx
6571
6576__parser__(internal)
6577MQ_EXTERN enum MqTransTypeE MK_DECL MqReadGetTransType (
6578 MQ_CTX const ctx
6580
6585__parser__(internal)
6586MQ_EXTERN enum MqHandShakeE MK_DECL MqReadGetHandShake (
6587 MQ_CTX const ctx
6589
6591
6593// MqContextC_ReadApi_Misc_C_API
6594
6595// #######################################################################
6596// -----------------------------------------------------------------------
6626
6627__parser__push__(doc-group=Proxy,doc-index=ProxyApi);
6628
6639MQ_EXTERN enum MkErrorE MK_DECL MqProxyItem_RT (
6641 MQ_CTX const sourceCtx,
6642 MQ_CTX const targetCtx
6644
6674__parser__(internal)
6675MQ_EXTERN enum MkErrorE MK_DECL MqProxyPackage_RT (
6677 MQ_CTX const sourceCtx,
6678 MQ_CTX const targetCtx,
6679 MQ_DMP const dump __parser__(default=NULL)
6681
6708MQ_EXTERN enum MkErrorE MK_DECL MqProxyForward_RT (
6710 MQ_CTX const sourceCtx,
6711 MQ_CTX const targetCtx,
6712 MQ_DMP const dump __parser__(default=NULL),
6713 MK_TIME_T const timeout __parser__(default=MK_TIMEOUT_DEFAULT)
6715
6717
6719// MqContextC_ProxyApi_Proxy_C_API
6720
6721// #######################################################################
6722// -----------------------------------------------------------------------
6853
6858__parser__(internal,doc-no,doc-group=Atom,doc-index=SendApi)
6859MQ_EXTERN enum MkErrorE MK_DECL MqSendSetHandShake (
6860 MQ_CTX const ctx,
6861 enum MqHandShakeE handShake
6863
6865// MqContextC_SendApi_C_API
6866
6867// #######################################################################
6868// -----------------------------------------------------------------------
6878
6879__parser__push__(doc-group=Atom,doc-index=SendApi);
6880
6887MQ_EXTERN enum MkErrorE MK_DECL MqSendI8_RT (
6889 MQ_CTX const ctx,
6890 MK_I8 const val
6892
6894MQ_EXTERN enum MkErrorE MK_DECL MqSendBOL_RT (
6896 MQ_CTX const ctx,
6897 MK_BOL const val
6899
6901MQ_EXTERN enum MkErrorE MK_DECL MqSendI16_RT (
6903 MQ_CTX const ctx,
6904 MK_I16 const val
6906
6908MQ_EXTERN enum MkErrorE MK_DECL MqSendI32_RT (
6910 MQ_CTX const ctx,
6911 MK_I32 const val
6913
6915MQ_EXTERN enum MkErrorE MK_DECL MqSendFLT_RT (
6917 MQ_CTX const ctx,
6918 MK_FLT const val
6920
6922MQ_EXTERN enum MkErrorE MK_DECL MqSendI64_RT (
6924 MQ_CTX const ctx,
6925 MK_I64 const val
6927
6929MQ_EXTERN enum MkErrorE MK_DECL MqSendDBL_RT (
6931 MQ_CTX const ctx,
6932 MK_DBL const val
6934
6935// \param[in] len the string leagth of \arg{val} or \arg{-1} to calculate with \c strlen
6941MQ_EXTERN enum MkErrorE MK_DECL MqSendSTR_RT (
6943 MQ_CTX const ctx,
6944 MK_STRN const val
6946
6952MQ_EXTERN enum MkErrorE MK_DECL MqSendStringR_RT (
6954 MQ_CTX const ctx,
6955 MkStringR const val
6957
6966MQ_EXTERN enum MkErrorE MK_DECL MqSendBIN_RT (
6968 MQ_CTX const ctx,
6969 MkBinaryR const val
6971
6981mk_inline enum MkErrorE MqSendBinaryR_RT (
6983 MQ_CTX const ctx,
6984 MkBinaryR const val
6985) {
6986 return MqSendBIN_RT(MK_RT_CALL ctx, val);
6987}
6988
6995 MQ_CTX const ctx,
6996 MK_BUFN const val
6998
7014 MQ_CTX const ctx,
7015 MK_BFLN const val
7017
7028 MQ_CTX const ctx,
7029 MK_BFLN const val
7031
7047 MQ_CTX const ctx,
7048 MK_BUSN const val
7050
7058 MQ_CTX const ctx,
7059 MK_FST const printfmt,
7060 ...
7062
7069MQ_EXTERN enum MkErrorE MK_DECL MqSendVL_RT (
7071 MQ_CTX const ctx,
7072 MK_FST const printfmt,
7073 va_list var_list
7075
7098__parser__(doc-no)
7099MQ_EXTERN enum MkErrorE MK_DECL MqSendLTR_RT (
7101 MQ_CTX const ctx,
7102 MQ_LTR const transLId
7104
7116MQ_EXTERN enum MkErrorE MK_DECL MqSendLONG_RT (
7118 MQ_CTX const ctx,
7119 MK_LONG const val
7121
7132MQ_EXTERN enum MkErrorE MK_DECL MqSendHDL_RT (
7134 MQ_CTX const ctx,
7135 MK_HDL const val
7137
7139
7141// MqContextC_SendApi_Atom_C_API
7142
7143// #######################################################################
7144// -----------------------------------------------------------------------
7149
7150__parser__push__(doc-group=Basics,doc-index=SendApi);
7151
7184MQ_EXTERN enum MkErrorE MK_DECL MqSendEND_RT (
7186 MQ_CTX const ctx,
7187 MQ_TOK const token,
7188 MK_TIME_T timeout __parser__(default=MK_TIMEOUT_DEFAULT)
7190
7215MQ_EXTERN enum MkErrorE MK_DECL MqSendSTART_RT (
7217 MQ_CTX const ctx
7219
7233MQ_EXTERN enum MkErrorE MK_DECL MqSendEND_AND_WAIT_RT (
7235 MQ_CTX const ctx,
7236 MQ_TOK const token,
7237 MK_TIME_T timeout __parser__(default=MK_TIMEOUT_DEFAULT)
7239
7301
7302__parser__(no-rpc)
7303MQ_EXTERN enum MkErrorE MK_DECL MqSendEND_AND_TRANSACTION_RT (
7305 MQ_CTX const ctx,
7306 MQ_TOK const token,
7307 MQ_TOK const callback,
7308 MK_TIME_T timeout __parser__(default=MK_TIMEOUT_DEFAULT)
7310
7333__parser__(no-rpc,callback-name=Service)
7334MQ_EXTERN enum MkErrorE MK_DECL MqSendEND_AND_SUB_RT (
7336 MQ_CTX const ctx,
7337 MQ_TOK const token,
7338 MqServiceCallbackF const fCall __parser__(callback-call),
7339 MK_CBP callback __parser__(callback-data),
7340 MqDataFreeF fFree __parser__(callback-free),
7341 MK_TIME_T timeout __parser__(default=MK_TIMEOUT_DEFAULT)
7343
7381__parser__(no-rpc,callback-name=Service)
7382MQ_EXTERN enum MkErrorE MK_DECL MqSendEND_AND_CALLBACK_RT (
7384 MQ_CTX const ctx,
7385 MQ_TOK const token,
7386 MqServiceCallbackF const fCall __parser__(callback-call),
7387 MK_CBP callback __parser__(callback-data),
7388 MqDataFreeF fFree __parser__(callback-free),
7389 MK_TIME_T const timeout __parser__(default=MK_TIMEOUT_DEFAULT)
7391
7408MQ_EXTERN enum MkErrorE MK_DECL MqSendSYNC_RT (
7410 MQ_CTX const ctx
7412
7414
7416// MqContextC_SendApi_Basics_C_API
7417
7418// #######################################################################
7419// -----------------------------------------------------------------------
7424
7425__parser__push__(doc-group=Return,doc-index=SendApi);
7426
7442MQ_EXTERN enum MkErrorE MK_DECL MqSendRETURN_RT (
7444 MQ_CTX const ctx
7446
7447//#define MqSendRETURN(ctx) (dbg(ctx),MqSendRETURNx(ctx))
7448
7458MQ_EXTERN enum MkErrorE MK_DECL MqSendRETURN_SUB_RT (
7460 MQ_CTX const ctx
7462
7473MQ_EXTERN enum MkErrorE MK_DECL MqSendERROR_RT (
7475 MQ_CTX const ctx
7477
7479
7481// MqContextC_SendApi_Return_C_API
7482
7483// #######################################################################
7484// -----------------------------------------------------------------------
7491
7492__parser__push__(doc-group=Block,doc-index=SendApi);
7493
7509MQ_EXTERN enum MkErrorE MK_DECL MqSendL_START_RT (
7511 MQ_CTX const ctx
7513
7519MQ_EXTERN enum MkErrorE MK_DECL MqSendL_END_RT (
7521 MQ_CTX const ctx
7523
7538MQ_EXTERN enum MkErrorE MK_DECL MqSendT_START_RT (
7540 MQ_CTX const ctx
7542
7551MQ_EXTERN enum MkErrorE MK_DECL MqSendT_END_RT (
7553 MQ_CTX const ctx
7555
7557
7559// MqContextC_SendApi_Block_C_API
7560
7561/* ####################################################################### */
7562/* ### ### */
7563/* ### S L A V E - A P I ### */
7564/* ### ### */
7565/* ####################################################################### */
7566
7741__parser__push__(doc-group=Slave,doc-index=SlaveApi);
7742
7770MK_DECL MqSlaveWorker_RT (
7772 MQ_CTX const ctx,
7773 MQ_SLAVE_ID const id,
7774 MK_STRN fct __parser__(default=S#"WORKER"),
7775 MK_BAC args __parser__(default=NULL)
7777
7801 MQ_CTX const ctx,
7802 MQ_SLAVE_ID const id,
7803 MQ_CTX const slave
7805
7821 MQ_CTX const ctx,
7822 MQ_SLAVE_ID const id
7824
7832mk_inline bool MqSlaveCheck ( MQ_CTXN const ctx, MQ_SLAVE_ID const id )
7833{
7834 return ctx ? id >= 0 && id < ctx->link.slave.used && ctx->link.slave.slaves[id] != NULL : false;
7835}
7836
7845MQ_EXTERN enum MkErrorE
7848 MQ_CTX const ctx,
7849 MQ_SLAVE_ID const id,
7850 MQ_CTX* ctx_out
7852
7864 MQ_CTX const ctx,
7865 MQ_SLAVE_ID const id,
7866 MQ_CTX* ctx_out
7868
7889 MQ_CTX const ctx,
7890 MQ_CTX* ctx_out
7892
7897{
7898 return ctx ? (MQ_IS_MASTER(ctx) ? ctx : ctx->config.master) : NULL;
7899}
7900
7906mk_inline bool MqSlaveIs ( MQ_CTXN const ctx)
7907{
7908 return ctx ? (ctx->config.master != NULL) : false;
7909}
7910
7912
7914// MqContextC_SlaveApi_Slave_C_API
7915
7916// #######################################################################
7917// -----------------------------------------------------------------------
8072
8073__parser__push__(doc-group=High,doc-index=HighApi);
8074
8082__parser__(template-required)
8085 MQ_CTX const ctx ,
8086 MK_STRN cstr ,
8087 ...
8089
8092#define MQ_SEND_TRANSACTION_TOKEN_SIZE 10
8093#define MQ_SEND_TOKEN_SIGNATURE_SIZE 50
8095
8098#define MqHigh_O BOL
8099#define MqHigh_Y I8
8100#define MqHigh_S I16
8101#define MqHigh_I I32
8102#define MqHigh_W I64
8103#define MqHigh_H HDL
8104#define MqHigh_F FLT
8105#define MqHigh_D DBL
8106#define MqHigh_C STR
8107#define MqHigh_B BIN
8108#define MqHigh_U BUF
8109#define MqHigh_L BFL
8110#define MqHigh_A BAC
8112
8122 MQ_CTX const ctx ,
8123 MK_STRN cstr ,
8124 va_list var_list
8126
8128
8130// MqContextC_HighApi_High_C_API
8131
8132/* ####################################################################### */
8133/* ### ### */
8134/* ### F I L T E R - A P I ### */
8135/* ### ### */
8136/* ####################################################################### */
8137
8263/* ####################################################################### */
8264/* ### ### */
8265/* ### C L A S S - A P I ### */
8266/* ### ### */
8267/* ####################################################################### */
8268
8288
8289__parser__push__(doc-group=Class,doc-index=ClassApi);
8290
8295 MQ_CTXN const ctx
8297
8305 MQ_CTX const ctx,
8306 MQ_FCT const item
8308
8321 MQ_CTX const ctx,
8322 MK_STRN ident
8324
8333 MQ_CTXN const ctx
8335
8342 MQ_CTXN const ctx
8344
8346
8348// MqContextC_ClassApi_Class_C_API
8349
8350// #######################################################################
8351// only - inline ---------------------------------------------------------
8355
8356__parser__push__(doc-group=Get,doc-index=ConfigApi);
8357
8363 MQ_CTX const ctx
8364) {
8365 MK_INSTANCE_HDL(ctx);
8366 return MQ_IS_SERVER(ctx);
8367}
8368
8374 MQ_CTX const ctx
8375) {
8376 MK_INSTANCE_HDL(ctx);
8377 return ctx->config.identFrom;
8378}
8379
8386 MQ_CTX const ctx
8387) {
8388 MK_INSTANCE_HDL(ctx);
8389 return MQ_IS_PARENT(ctx);
8390}
8391
8397 MQ_CTX const ctx
8398) {
8399 MK_INSTANCE_HDL(ctx);
8400 return (ctx->config.native == MK_NATIVE_IS_STRING);
8401}
8402
8410 MQ_CTXN const ctx
8411) {
8412 MK_INSTANCE_HDL(ctx);
8413 return MkSysStringGetNoNULL((ctx)->config.dispName);
8414}
8415
8423 MQ_CTXN const ctx
8424) {
8425 MK_INSTANCE_HDL(ctx);
8426 return MkSysStringGetNoNULL((ctx)->config.dispPrefix);
8427}
8428
8436 MQ_CTXN const ctx
8437) {
8438 MK_INSTANCE_HDL(ctx);
8439 return MkSysStringGetNoNULL((ctx)->config.dispPostfix);
8440}
8441
8449 MQ_CTXN const ctx
8450) {
8451 MK_INSTANCE_HDL(ctx);
8452 return MkSysStringGetNoNULL((ctx)->config.storageFile);
8453}
8454
8461 MQ_CTXN const ctx
8462) {
8463 MK_INSTANCE_HDL(ctx);
8464 return (ctx)->config.io.buffersize;
8465}
8466
8473 MQ_CTXN const ctx
8474) {
8475 MK_INSTANCE_HDL(ctx);
8476 return (ctx)->config.io.pkgsize;
8477}
8478
8485 MQ_CTXN const ctx
8486) {
8487 MK_INSTANCE_HDL(ctx);
8488 return (ctx)->config.io.timeout;
8489}
8490
8498 MQ_CTXN const ctx
8499) {
8500 MK_INSTANCE_HDL(ctx);
8501 return MkSysStringGetNoNULL(ctx->config.io.uds.file);
8502}
8503
8519__parser__(no-rpc)
8520MQ_EXTERN enum MkErrorE
8522 MQ_CTX const ctx,
8523 MK_STRN *host_out,
8524 MK_STRN *port_out,
8525 MK_STRN *myhost_out,
8526 MK_STRN *myport_out
8528
8553__parser__(no-type-extension)
8557 MQ_CTX const ctx,
8558 MK_BFL *vals_out
8560
8566 MQ_CTX const ctx
8567) {
8568 MK_INSTANCE_HDL(ctx);
8569 return ctx->config.io.pipe.hdl;
8570}
8571
8575 MQ_CTX const ctx
8576) {
8577 MK_INSTANCE_HDL(ctx);
8578 return ctx->config.startAs;
8579}
8580
8584 MQ_CTX const ctx
8585) {
8586 MK_INSTANCE_HDL(ctx);
8587 return ctx->statusIs;
8588}
8589
8593__parser__(internal)
8594MQ_EXTERN config_t * MK_DECL MqConfigGetConfigFile (
8595 MQ_CTX const ctx
8597
8603__parser__(internal)
8604MQ_EXTERN config_setting_t * MK_DECL MqConfigGetConfigRoot (
8605 MQ_CTX const ctx
8607
8614MQ_EXTERN enum MkErrorE MK_DECL MqConfigSetConfigFile_RT (
8616 MQ_CTX const ctx,
8617 MK_STRN const filename
8619
8621
8623// MqContextC_ConfigApi_Get_C_API
8624
8625/* ####################################################################### */
8626/* ### ### */
8627/* ### D U M P - A P I ### */
8628/* ### ### */
8629/* ####################################################################### */
8630
8650
8651#if defined(MQ_C_BUILD_DLL)
8652
8653 #define META_SECTION_DEFINE
8654 #include "MqDumpS_mq.h"
8655 #undef META_SECTION_DEFINE
8656
8657#else
8658
8661struct MqDumpS {
8662 // BEGIN-MqDumpS-super - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
8663
8664 union {
8665 struct MkObjectS obj; // instance-base MkObjectS
8666 } super;
8667
8668 // END-MqDumpS-super - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
8669
8670 // missing PRIVATE instance attributes
8671 MK_BINN dummy[];
8672};
8673
8674#endif
8675
8676// BEGIN-MqDumpS-Definition - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
8677
8681 __parser__push__(prefix=Class, doc-group=Define, doc-index=Class);
8682
8683// Signature --------------------------------------------------------------
8686
8687 #define MqDumpC_SIGNATURE (MkObjectC_SIGNATURE ^ (14u<<10))
8688 #define MqDumpC_MASK (((1u<<22)-1)<<10)
8689
8691
8692// CompileTimeCast --------------------------------------------------------------
8695
8696 #define MqDumpC_X2dmp(x) (x)
8697 #define MqDumpC_X2obj(x) MkOBJ(x)
8698
8700
8701// TypeDef --------------------------------------------------------------
8704
8706 __parser__(ignore) typedef struct MqDumpS MqDumpCR;
8708 __parser__(ignore) typedef const struct MqDumpS MqDumpCNR;
8710 #define MqDumpC_T (&MQ_RT_REF._MqDumpC_T)
8712 #define MqDumpC_TT (MkTYP(MqDumpC_T))
8714 #define MqDumpST MqDumpC_T
8716 #define MqDumpSTT (MkTYP(MqDumpST))
8718 #define MqDumpC_type MQ_DMP
8720 #define MqDumpCT_X(instance) ( (struct MkTypeDefS *) (MkOBJ_R(instance).type) )
8722 #define MqDumpCTT_X(instance) (MkOBJ_R(instance).type)
8724 #define MqDumpCT_TT(typ) ( (struct MkTypeDefS *) (typ) )
8726 #define MqDumpC_NS MQ
8728 #define MqDumpCTT MqDumpCTT
8730 #define MqDumpCT ( (struct MkTypeDefS *) MqDumpCTT )
8731
8733
8734// TypeCheck --------------------------------------------------------------
8737
8738 #pragma GCC diagnostic push
8739 #pragma GCC diagnostic ignored "-Wattributes"
8740
8743 __parser__(class=MqDumpC,static,hide)
8746 return MkSanitizeCheck(MqDumpC,mng);
8747 }
8748
8751 __parser__(class=MqDumpC,static,hide)
8754 return MkSanitizeCheckO(MqDumpC,obj);
8755 }
8756
8757 #pragma GCC diagnostic pop
8758 #define MqDumpC_Check(mng) MqDmpCheck(mng)
8759
8761
8762// RunTimeCast --------------------------------------------------------------
8765
8767 __parser__(class=MqDumpC,hide,static)
8768 META_ATTRIBUTE_SANITIZE
8771 return (MqDmpCheck(mng) ? (MQ_DMP)mng : NULL);
8772 }
8773
8775 __parser__(class=MqDumpC,hide,static)
8776 META_ATTRIBUTE_SANITIZE
8779 return (MqDmpCheck(mng) ? (MQ_DMPN)mng : NULL);
8780 }
8781
8783 #define MqDmpRaise(_dmp) if (!_MkCheckX(MqDumpC,_dmp)) { \
8784 MkErrorSetC_1E("'MqDumpC' hdl is NULL"); \
8785 goto error ; \
8786 }
8787
8789 #define MqDMP_R(x) (*(x)).super.dmp
8791 #define MqDMP(x) (&MqDMP_R(x))
8792
8794
8797// MqDumpC_Class_Define_C_API
8798
8799// END-MqDumpS-Definition - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
8800
8801// =========================================================================
8802// BEGIN-MqDumpS-Export - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
8803
8806
8809
8810__parser__push__(doc-group=_ignore_,doc-index=Class,doc-name=Export,class=MqDumpC);
8811
8827__parser__(class-overload=MkObjectHandleGet)
8831 MQ_DMP const dmp __parser__(null-allowed)
8832) {
8833 return MkObjectHandleGet(dmp?MkOBJ(dmp):NULL);
8834}
8835
8844__parser__(flags=new)
8846mk_inline MQ_DMP MqDumpHandleResolve_RT (
8848 MK_HDL const netHdl
8849) {
8850 return MqDmp(MkObjectHandleResolve(netHdl));
8851}
8852
8862#define MqDumpHandleResolve_e(netHdl) ({ \
8863 MK_HDL tmpHdl=netHdl; \
8864 MQ_DMP tmp; \
8865 if (tmpHdl==0) { \
8866 tmp=NULL; \
8867 } else { \
8868 tmp=MqDumpHandleResolve(tmpHdl); \
8869 if (tmp==NULL) { \
8870 MkErrorSetC_1_NULL("ERROR: 'MqDumpC' handle is 'NULL'"); \
8871 goto error; \
8872 }; \
8873 }; \
8874 tmp; \
8875})
8876
8878
8880// Class export & import
8881
8885 __parser__(flags=new,doc-group=_ignore_,doc-index=Class,doc-name=Misc,class=MqDumpC,null-return-allow)
8888 return (MQ_DMP)MK_NULL;
8889 }
8891// MqDumpC - Misc - function
8892
8894// MqDumpC_Class_C_API
8895
8896// END-MqDumpS-Export - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
8897
8906__parser__(const,class-overload=MkObjectLog)
8907MQ_EXTERN void MK_DECL MqDumpLog_RT (
8909 MQ_DMP const dmp ,
8911 MK_I32 const debug __parser__(default=0),
8912 MK_STRN const callfunc __parser__(default=F#FUNC),
8913 MK_I32 const lvl __parser__(default=0)
8915
8916#define MqDumpLog_1XS(dump) MqDumpLog(dump,0,__func__,0,MkOBJ(META_CONTEXT_S))
8917
8918// #######################################################################
8919// -----------------------------------------------------------------------
8924
8925__parser__push__(doc-group=TOR);
8926
8957__parser__(constructor,lng-constr)
8958MQ_EXTERN enum MkErrorE MK_DECL MqDumpExport_RT (
8960 MQ_CTX const ctx __parser__(argument),
8961 MQ_DMP * const dumpP_inout
8963
8981
8982__parser__(constructor)
8983MQ_EXTERN enum MkErrorE MK_DECL MqDumpError_RT (
8985 MQ_CTX const error __parser__(argument),
8986 MQ_DMP * const dumpP_inout
8988
9005MQ_EXTERN enum MkErrorE MK_DECL MqDumpImport_RT (
9007 MQ_DMP const dump,
9008 MQ_CTX const ctx
9010
9025__parser__(constructor)
9026MQ_EXTERN enum MkErrorE MK_DECL MqDumpBinSet_RT (
9028 MkBinaryR data,
9029 MQ_DMP *dmp_out
9031
9041 MQ_DMPN const dump
9043
9046
9050__parser__(destructor)
9051MQ_EXTERN void MK_DECL MqDumpDelete_RT (
9053 MQ_DMP dmp
9055
9057
9059
9061// MqDumpC_TOR_C_API
9062
9063// #######################################################################
9064// -----------------------------------------------------------------------
9069
9070__parser__push__(doc-group=Misc);
9071
9080 MQ_DMPN const dump
9082
9086__parser__(internal)
9087MQ_EXTERN void MK_DECL MqDumpTransLIdSet (
9088 MQ_DMP const dump,
9089 MQ_LTR transLId
9091
9095__parser__(internal)
9096MQ_EXTERN void MK_DECL MqDumpRmtTransLIdSet (
9097 MQ_DMP const dump,
9098 MQ_LTR rmtTransLId
9100
9108__parser__(internal)
9109MQ_EXTERN void MK_DECL MqDumpAllocSizeSet (
9110 MQ_DMP const dump,
9111 MK_SIZE allocsize
9113
9117__parser__(internal)
9118MQ_EXTERN MK_SIZE MK_DECL MqDumpAllocSizeGet (
9119 MQ_DMPN const dump
9121
9125__parser__(internal)
9126MQ_EXTERN enum MqHandShakeE MK_DECL MqDumpHandShakeGet (
9127 MQ_DMPN const dump
9129
9133MQ_EXTERN MK_STRN MK_DECL MqDumpTokenGet (
9134 MQ_DMPN const dump
9136
9138
9140// MqDumpC_Misc_C_API
9141
9143// MqDumpC_C_API
9144
9145/* MARK_R ################################################################ */
9146/* ### ### */
9147/* ### R U N T I M E - A P I ### */
9148/* ### ### */
9149/* ####################################################################### */
9150
9151__parser__global__(prefix2class:MqRuntime=MqRuntimeC);
9152
9166
9167#define MqDbgRt() mk_dbg_color_ln(MK_COLOR_PURPLE,"mkrt<%p>, MkRT<%p>, mqrt<%p>, MqRT<%p>", mkrt, MkRT, mqrt, MqRT)
9168
9169__parser__(ignore)
9170MQ_EXTERN_DATA bool MqRuntimeThreadPoolUse;
9171
9172#pragma GCC diagnostic push
9173#pragma GCC diagnostic ignored "-Wlto-type-mismatch"
9174
9175#if defined(MQ_C_BUILD_DLL)
9176
9177 #define META_SECTION_DEFINE
9178 #include "MqRuntimeS_mq.h"
9179 #undef META_SECTION_DEFINE
9180
9181#else
9182
9184__parser__(internal)
9186
9187 // ======================================================================================
9188 // PUBLIC variables -> sync with MqRuntimeS_mk.h !!
9189
9196 // by default \ref __MqRtCheckX is \e false and will be set in \RMkNs{RuntimeSetup} .
9197
9198 // BEGIN-MqRuntimeS-super - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
9199
9200 union {
9201 struct MkObjectS obj; // instance-base MkObjectS
9202 struct MkExtensionS ext; // instance-base MkExtensionS
9203 struct MkRtExtS rtext; // instance-base MkRtExtS
9204 } super;
9205
9206 // END-MqRuntimeS-super - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
9207
9208 // instance attributes
9209 struct MqErrorS error_mq ;
9211
9212 // ======================================================================================
9213 // TYPES
9214
9215 // BEGIN-rtDef - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
9216
9217 struct MkTypeDefS _MqErrorC_T ;
9218 struct MkTypeDefS _MqRuntimeC_T ;
9219 struct MkTypeS _MqTypeCtxC_TT ;
9220 struct MkTypeDefS _MqFactoryC_T ;
9221 struct MqTypeCtxS _MqContextC_T ;
9222 struct MkTypeDefS _MqDumpC_T ;
9223 struct MkTypeDefS _MqEnvC_T ;
9224
9225 // END-rtDef - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
9226
9227 // offset calculated by "Nhi1InternalSize"
9228 MK_BINB private_variables[291096];
9229};
9230
9231#endif
9232
9233#pragma GCC diagnostic pop
9234
9235// BEGIN-MqRuntimeS-Definition - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
9236
9240 __parser__push__(prefix=Class, doc-group=Define, doc-index=Class);
9241
9242// Signature --------------------------------------------------------------
9245
9246 #define MqRuntimeC_SIGNATURE (MkRtExtC_SIGNATURE ^ (1u<<3))
9247 #define MqRuntimeC_MASK (((1u<<29)-1)<<3)
9248
9250
9251// CompileTimeCast --------------------------------------------------------------
9254
9255 #define MqRuntimeC_X2rt(x) (x)
9256 #define MqRuntimeC_X2rtext(x) MkRTEXT(x)
9257 #define MqRuntimeC_X2ext(x) MkEXT(x)
9258 #define MqRuntimeC_X2obj(x) MkOBJ(x)
9259
9261
9262// TypeDef --------------------------------------------------------------
9265
9267 __parser__(ignore) typedef struct MqRuntimeS MqRuntimeCR;
9269 __parser__(ignore) typedef const struct MqRuntimeS MqRuntimeCNR;
9271 #define MqRuntimeC_T (&MQ_RT_REF._MqRuntimeC_T)
9273 #define MqRuntimeC_TT (MkTYP(MqRuntimeC_T))
9275 #define MqRuntimeST MqRuntimeC_T
9277 #define MqRuntimeSTT (MkTYP(MqRuntimeST))
9279 #define MqRuntimeC_type MQ_RT
9281 #define MqRuntimeCT_X(instance) ( (struct MkTypeDefS *) (MkOBJ_R(instance).type) )
9283 #define MqRuntimeCTT_X(instance) (MkOBJ_R(instance).type)
9285 #define MqRuntimeCT_TT(typ) ( (struct MkTypeDefS *) (typ) )
9287 #define MqRuntimeC_NS MQ
9289 #define MqRuntimeCTT MqRuntimeCTT
9291 #define MqRuntimeCT ( (struct MkTypeDefS *) MqRuntimeCTT )
9292
9294
9295// TypeCheck --------------------------------------------------------------
9298
9299 #pragma GCC diagnostic push
9300 #pragma GCC diagnostic ignored "-Wattributes"
9301
9304 __parser__(class=MqRuntimeC,static,ignore)
9307 return MkSanitizeCheck(MqRuntimeC,mng);
9308 }
9309
9312 __parser__(class=MqRuntimeC,static,ignore)
9315 return MkSanitizeCheckO(MqRuntimeC,obj);
9316 }
9317
9318 #pragma GCC diagnostic pop
9319 #define MqRuntimeC_Check(mng) MqRtCheck(mng)
9320
9322
9323// RunTimeCast --------------------------------------------------------------
9326
9328 __parser__(class=MqRuntimeC,ignore,static)
9329 META_ATTRIBUTE_SANITIZE
9332 return (MqRtCheck(mng) ? (MQ_RT)mng : NULL);
9333 }
9334
9336 __parser__(class=MqRuntimeC,ignore,static)
9337 META_ATTRIBUTE_SANITIZE
9340 return (MqRtCheck(mng) ? (MQ_RTN)mng : NULL);
9341 }
9342
9344 #define MqRtRaise(_rt) if (!_MkCheckX(MqRuntimeC,_rt)) { \
9345 MkErrorSetC_1E("'MqRuntimeC' hdl is NULL"); \
9346 goto error ; \
9347 }
9348
9350
9353// MqRuntimeC_Class_Define_C_API
9354
9355// END-MqRuntimeS-Definition - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
9356
9358// MqRuntime_C_API
9359
9360#define MqRT &MqRuntimeRLS
9361#if 0
9362 #define MqRT_O(o) MqRuntimeGet( MK_RT_CALL_ONLY )
9363 #define MqRT_X(x) MqRuntimeGet( MK_RT_CALL_ONLY )
9364 #define MqRT_ON(o) MqRuntimeGet( MK_RT_CALL_ONLY )
9365 #define MqRT_XN(x) MqRuntimeGet( MK_RT_CALL_ONLY )
9366#else
9367 #define MqRT_O(o) ((o) && (*o).objRtExt ? (MQ_RT)(*o).objRtExt : MqRuntimeGet( MK_RT_CALL_ONLY ))
9368 #define MqRT_X(x) ((x) && MkOBJ_R(x).objRtExt ? (MQ_RT)MkOBJ_R(x).objRtExt : MqRuntimeGet( MK_RT_CALL_ONLY ))
9369 #define MqRT_ON(o) ( (*o).objRtExt ? (MQ_RT)(*o).objRtExt : MqRuntimeGet( MK_RT_CALL_ONLY ))
9370 #define MqRT_XN(x) ( MkOBJ_R(x).objRtExt ? (MQ_RT)MkOBJ_R(x).objRtExt : MqRuntimeGet( MK_RT_CALL_ONLY ))
9371#endif
9372
9373#if META_HAS_THREAD
9374 #define MqRtSetup_O(o) MK_RT_UNUSED MQ_RT const mqrt = MqRT_O(o)
9375 #define MqRtSetup_ON(o) MK_RT_UNUSED MQ_RT const mqrt = MqRT_ON(o)
9376 #define MqRtSetup_X(x) MK_RT_UNUSED MQ_RT const mqrt = MqRT_X(x)
9377 #define MqRtSetup_XN(x) MK_RT_UNUSED MQ_RT const mqrt = MqRT_XN(x)
9378 #define MqRtSetup_RT(r) MK_RT_UNUSED MQ_RT const mqrt = r
9379 #define MqRtSetup_NULL MK_RT_UNUSED MQ_RT const mqrt = MqRuntimeGet( MK_RT_CALL_ONLY )
9380
9381 #define MqRtSetup_O_RT(o) MkRtSetup_O_RT(o) ; MqRtSetup_O(o)
9382 #define MqRtSetup_ON_RT(o) MkRtSetup_ON_RT(o) ; MqRtSetup_ON(o)
9383 #define MqRtSetup_X_RT(x) MkRtSetup_X_RT(x) ; MqRtSetup_X(x)
9384 #define MqRtSetup_XN_RT(x) MkRtSetup_XN_RT(x) ; MqRtSetup_XN(x)
9385 #define MqRtSetup_NULL_RT MkRtSetup_NULL_RT ; MqRtSetup_NULL
9386
9387 #undef AllRtSetup_O
9388 #undef AllRtSetup_ON
9389 #undef AllRtSetup_X
9390 #undef AllRtSetup_XN
9391 #undef AllRtSetup_NULL
9392
9393 #define AllRtSetup_O(o) MkRtSetup_O(o) ; MqRtSetup_O(o)
9394 #define AllRtSetup_ON(o) MkRtSetup_ON(o) ; MqRtSetup_ON(o)
9395 #define AllRtSetup_X(x) MkRtSetup_X(x) ; MqRtSetup_X(x)
9396 #define AllRtSetup_XN(x) MkRtSetup_XN(x) ; MqRtSetup_XN(x)
9397 #define AllRtSetup_NULL MkRtSetup_NULL ; MqRtSetup_NULL
9398#else
9399 #define MqRtSetup_O(o)
9400 #define MqRtSetup_ON(o)
9401 #define MqRtSetup_X(x)
9402 #define MqRtSetup_XN(x)
9403 #define MqRtSetup_RT(r)
9404 #define MqRtSetup_NULL
9405
9406 #define MqRtSetup_O_RT(o)
9407 #define MqRtSetup_ON_RT(o)
9408 #define MqRtSetup_X_RT(x)
9409 #define MqRtSetup_XN_RT(x)
9410 #define MqRtSetup_NULL_RT
9411#endif
9412
9414__parser__(ignore)
9415MQ_EXTERN_DATA MkThreadLocal struct MqRuntimeS MqRuntimeRLS;
9416
9423__parser__(ignore)
9424MQ_EXTERN MQ_RT MK_DECL MqRuntimeSetup ( MK_RT const mkrt, MQ_RT const mqrt );
9425
9431__parser__(ignore)
9432MQ_EXTERN void MK_DECL MqRuntimeCleanup ( MQ_RT_ARGS_ONLY );
9433
9435MQ_EXTERN_DATA size_t MqRuntimeId;
9436
9438__parser__(ignore)
9440 return MK_RT_REF.mkRtExtAry[MqRuntimeId] ? (MQ_RT)MK_RT_REF.mkRtExtAry[MqRuntimeId] :
9442}
9443
9446
9457__parser__(ignore,const)
9458MQ_EXTERN void MK_DECL MqRuntimeLog_RT (
9460 MQ_RTN const mqrt ,
9462 MK_DBG const debug __parser__(default=0),
9463 MK_STRN const callfunc __parser__(default=F#FUNC),
9464 MK_I32 const lvl __parser__(default=0)
9466
9467#define MqRuntimeLog_2M(mqrt,m) MqRuntimeLog_2(mqrt,MkObj(m))
9468
9470// MqRuntimeLog
9471
9472/* ####################################################################### */
9473/* ### ### */
9474/* ### P A C K A G E - A P I ### */
9475/* ### ### */
9476/* ####################################################################### */
9477
9519// MqMsgque_C_API
9520
9521// #######################################################################
9522// -----------------------------------------------------------------------
9540
9541__parser__global__(doc-force=MqMsgque@Item);
9542
9544// MqMsgque_Item_C_API
9545
9546// #######################################################################
9547// -----------------------------------------------------------------------
9555__parser__global__(doc-force=MqMsgque@Main);
9556__parser__push__(doc-group=Main,class=MqMsgque);
9557
9565__parser__(hide,template-required,class=MqMsgque)
9566MQ_EXTERN void MK_DECL MqMain (
9567 void * code
9569
9571
9573// MqMsgque_Main_C_API
9574
9575// #######################################################################
9576// -----------------------------------------------------------------------
9581
9582__parser__push__(doc-group=Help,class=MqMsgque);
9583
9595 MK_STRN tool
9597
9600 void
9602
9604
9606// MqMsgque_Help_C_API
9607
9608// #######################################################################
9609// -----------------------------------------------------------------------
9617
9618__parser__push__(doc-group=Init,class=MqMsgque);
9619
9621__parser__(ignore)
9622MQ_EXTERN_DATA struct MkBufferListS * MqInitArg0;
9623
9639MQ_EXTERN MK_BFL MK_DECL MqInitResetArg0 (void) MK_ATTR_STATIC ;
9640
9654MQ_EXTERN void MK_DECL MqInitSetArg0 (
9655 MK_BAC bfl __parser__(argument,default=NULL)
9657
9661MQ_EXTERN void MK_DECL MqInitSetArg0VA (
9662 MK_STRN arg0,
9663 ...
9665
9667MQ_EXTERN void MK_DECL MqInitSetArg0VAL (
9668 MK_STRN arg0,
9669 va_list var_list
9671
9677MQ_EXTERN MK_BFL MK_DECL MqInitGetArg0 (
9678 void
9680
9682
9684// MqMsgque_Init_C_API
9685
9686// #######################################################################
9687// MARK_D ----------------------------------------------------------------
9688
9691
9694
9697
9698// BEGIN-Class-Doc-Order - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
9699
9700// external
9706
9707// external
9713
9714// internal
9721
9722// internal
9729
9730// external
9736
9737// internal
9744
9745// internal
9752
9753// END-Class-Doc-Order - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
9754
9755// #######################################################################
9756// -----------------------------------------------------------------------
9762__parser__global__(doc-force=MqMsgque@Enum@local);
9763
9764// BEGIN-Class-Introspection - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
9765
9770
9771__parser__push__(doc-name=Introspection,doc-index=Class,class=MqContextC,no-rpc,null-return-allow,flags=new);
9772
9776mk_inline MQ_CTX MqContextInstances_RT( MK_PARSER_RT_ONLY ) {
9778 return (MQ_CTX)MkTypeInstances(MqContextC_TT);
9779}
9780
9784 MK_INSTANCE_HDL(ctx);
9785 return (MQ_CTX)MqContextC_X2obj(ctx)->obj_protect.next;
9786}
9787
9791 MK_INSTANCE_HDL(ctx);
9792 return (MQ_CTX)MqContextC_X2obj(ctx)->obj_protect.prev;
9793}
9794
9796
9799// MqContextC_Class_C_API
9800
9805
9806__parser__push__(doc-name=Introspection,doc-index=Class,class=MqDumpC,no-rpc,null-return-allow,flags=new);
9807
9815
9819 MK_INSTANCE_HDL(dmp);
9820 return (MQ_DMP)MqDumpC_X2obj(dmp)->obj_protect.next;
9821}
9822
9826 MK_INSTANCE_HDL(dmp);
9827 return (MQ_DMP)MqDumpC_X2obj(dmp)->obj_protect.prev;
9828}
9829
9831
9834// MqDumpC_Class_C_API
9835
9840
9841__parser__push__(doc-name=Introspection,doc-index=Class,class=MqFactoryC,no-rpc,null-return-allow,flags=new);
9842
9850
9854 MK_INSTANCE_HDL(fct);
9855 return (MQ_FCT)MqFactoryC_X2obj(fct)->obj_protect.next;
9856}
9857
9861 MK_INSTANCE_HDL(fct);
9862 return (MQ_FCT)MqFactoryC_X2obj(fct)->obj_protect.prev;
9863}
9864
9866
9869// MqFactoryC_Class_C_API
9870
9871// END-Class-Introspection - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
9872
9873// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
9874
9877
9878__parser__push__(doc-group=Log,doc-index=LogApi);
9879
9886 MQ_CTXN const ctx
9887) {
9888 MK_INSTANCE_HDL(ctx);
9889 return (MQ_IS_SERVER (ctx) ? "SERVER" : "CLIENT");
9890}
9891
9898 MQ_CTXN ctx
9899) {
9900 MK_INSTANCE_HDL(ctx);
9901 return (MQ_IS_PARENT (ctx) ? "PARENT" : "CHILD");
9902}
9903
9905
9907
9908// end c++ save definition
9910
9911// vim:nowrap
#define MqFactoryS_originalIdent_size
#define MqLinkS_targetIdent_size
MqClassIdentGet of the link target, only valid on parent-context
#define MqConfigS_dispPostfix_size
#define END_MQ_C_DECLS
#define BEGIN_MQ_C_DECLS
#define MqRT
#define MqConfigS_storageFile_size
storage file used as default if a database is requested
#define MqConfigS_dispName_size
#define MqConfigS_dispPrefix_size
MK_ERR MkErrorFORMAT(MK_OBJN fmtobj)
void Log(MK_DBG debug=0, MK_STRN callfunc=__builtin_FUNCTION(), MK_I32 lvl=0) const
#define MK_PARSER_fmtobj
#define MK_DECL
#define mk_inline
#define MK_NULL
#define __parser__global__(...)
#define __parser__pop__
#define __parser__push__(...)
#define __parser__(...)
static void Setup()
void * MK_NAT_LIST
double MK_DBL
MK_PTRB * MK_MNG
unsigned char MK_BINB
unsigned char MK_BOL
signed char MK_I8
MK_PTRB * MK_CBP
signed long long MK_I64
MK_BINB const * MK_BINN
MK_STRB const * MK_FST
int32_t MK_HDL
MK_PTRB * MK_CCP
time_t MK_TIME_T
int32_t MK_NUM
signed short int MK_I16
signed int MK_I32
MK_STRB * MK_STR
void * MK_NAT_OBJECT
void(* MkMarkF)(MK_RT mkrt, MK_PTR data)
MK_PTRB * MK_PTR
const MK_PTRB * MK_MNGN
const MK_STRB * MK_STRN
#define __MkCheckX(cls, x)
#define MkSanitizeCheck(_root, _m)
#define MkSanitizeCheckO(_root, _o)
#define MkObjectHandleResolve(...)
#define MkObjectHandleGet(...)
#define MkOBJ(x)
#define MkObjectLog(...)
#define MkObjectToString(...)
#define MK_ATTR_STATIC
#define MK_ATTR_RT_INSTANCE
#define MK_ATTR_INSTANCE
#define MkThreadLocal
#define MK_RT_PTR
#define MK_PARSER_RT
#define MK_RT_ATTR_FORMAT_2
#define MK_RT_CALL
#define MK_PARSER_RT_ONLY
#define MK_ATTR_RT_STATIC
#define MK_RT_ARGS
#define MK_RT_ARGS_ONLY
#define MK_INSTANCE_HDL(x)
#define MK_RT_REF
MK_STRN MqClassIdentGet(MQ_CTXN const ctx)
get the application-identification …
enum MkErrorE MqClassIdentSet_RT(MK_RT mkrt, MQ_CTX const ctx, MK_STRN ident)
link the MqContextC to a new MqFactoryC identified by ident
MQ_FCT const MqClassFactoryGet(MQ_CTXN const ctx)
get the MqFactoryC used by the MqContextC
enum MkErrorE MqClassFactorySet_RT(MK_RT mkrt, MQ_CTX const ctx, MQ_FCT const item)
link the MqContextC to a new MqFactoryC
MK_STRN MqClassOriginalIdentGet(MQ_CTXN const ctx)
get the libmqmsgque::MqFactoryS::originalIdent from the MqContextC
static MQ_CTX MqContextGetNull(void)
Null-Slot - return a MqContextC typed NULL instance …
static MQ_CTX MqContextNext(MQ_CTX const ctx)
get next instance from linked-list of MqContextS type
static MQ_CTX MqContextPrev(MQ_CTX const ctx)
get previous instance from linked-list of MqContextS type
static MK_HDL MqContextHandleGet_RT(MK_RT mkrt, MQ_CTX const ctx)
Handle-Get-Slot - returns a export-hdl to the MqContextC useable for external storage
static MQ_CTX MqCtx(MK_MNG mng)
cast a unknown-object into an MqContextS pointer or NULL if not possible
static bool MqCtxCheckO(MK_OBJN obj)
check MqContextS -> libmkkernel::MkObjectS::signature …
static bool MqCtxCheck(MK_MNGN mng)
check MqContextS -> libmkkernel::MkObjectS::signature …
#define MqContextC_X2obj(x)
#define MqContextC_TT
class as MkTypeS-class-type, useable in a class-macro as: class##_TT …
void(* MqDataCopyF)(MQ_SERVICE_COPY_ARGS)
prototype for a copy additional token data function …
enum MkErrorE(* MqTokenF)(MQ_SERVICE_CALL_ARGS)
prototype for an object method function …
#define MQ_SERVICE_FREE_ARGS
the libmqmsgque::MqDataFreeF arguments with default names
void(* MqDataFreeF)(MQ_SERVICE_FREE_ARGS)
prototype for a free additional token data function …
#define MQ_SERVICE_CALL_ARGS
the libmqmsgque::MqTokenF arguments with default names
#define MQ_SERVICE_COPY_ARGS
the libmqmsgque::MqDataFreeF arguments with default names
static bool MqConfigGetIsString(MQ_CTX const ctx)
does the context object is using the string-mode ?
static bool MqConfigGetIsParent(MQ_CTX const ctx)
does the context object is a parent ? An objext is a parent id the libmqmsgque::MqConfigS::parent att...
static bool MqConfigGetIsServer(MQ_CTX const ctx)
does the context object is a server ?
static MK_STRN MqConfigGetPostfix(MQ_CTXN const ctx)
get the libmqmsgque::MqConfigS::dispPostfix
static MK_STRN MqConfigGetStorage(MQ_CTXN const ctx)
get the storage of the context object
static MK_TIME_T MqConfigGetTimeout(MQ_CTXN const ctx)
get the timeout value of the context object
static MQ_SOCK_HDL MqConfigGetIoPipe(MQ_CTX const ctx)
return the libmqmsgque::MqIoPipeConfigS
#define MQ_IS_SLAVE(ctx)
enum MkErrorE MqConfigGetIoTcp(MQ_CTX const ctx, MK_STRN *host_out, MK_STRN *port_out, MK_STRN *myhost_out, MK_STRN *myport_out)
get the configuration-data of the tcp-client-server-link …
static enum MqStartE MqConfigGetStartAs(MQ_CTX const ctx)
return the libmqmsgque::MqConfigS::startAs value
static MK_STRN MqConfigGetName(MQ_CTXN const ctx)
get the name of the context object
static enum MqIdentE MqConfigGetIdentFrom(MQ_CTX const ctx)
get the libmqmsgque::MqConfigS::identFrom
static MK_STRN MqConfigGetIoUds(MQ_CTXN const ctx)
return the libmqmsgque::MqIoUdsConfigS
static MK_I32 MqConfigGetPkgsize(MQ_CTXN const ctx)
get the maximun size of a BDY package
static MK_I32 MqConfigGetBuffersize(MQ_CTXN const ctx)
get the minimum of the read/send buffersize of the socket
#define MQ_GET_PARENT(ctx)
#define MQ_IS_PARENT(ctx)
static enum MqStatusIsEF MqConfigGetStatusIs(MQ_CTX const ctx)
return the libmqmsgque::MqContextS::statusIs value
enum MkErrorE MqConfigGetIoTcpL_RT(MK_RT mkrt, MQ_CTX const ctx, MK_BFL *vals_out)
get the configuration-data of the tcp-client-server-link as MkBufferListC …
#define MQ_IS_SERVER(ctx)
extract boolean information from context
#define MQ_IS_MASTER(ctx)
static MK_STRN MqConfigGetPrefix(MQ_CTXN const ctx)
get the libmqmsgque::MqConfigS::dispPrefix
void MqConfigSetServerCleanup_RT(MK_RT mkrt, MQ_CTX const ctx, MqTokenF fCall, MK_CBP callback, MqDataFreeF fFree, MqDataCopyF fCopy)
set the libmqmsgque::MqSetupS::ServerCleanup
void MqConfigSetEvent_RT(MK_RT mkrt, MQ_CTX const ctx, MqTokenF fCall, MK_CBP callback, MqDataFreeF fFree, MqDataCopyF fCopy)
set the libmqmsgque::MqSetupS::Event
void MqConfigSetBgError_RT(MK_RT mkrt, MQ_CTX const ctx, MqTokenF fCall, MK_CBP callback, MqDataFreeF fFree, MqDataCopyF fCopy)
set the libmqmsgque::MqSetupS::BgError
void MqConfigSetServerSetup_RT(MK_RT mkrt, MQ_CTX const ctx, MqTokenF fCall, MK_CBP callback, MqDataFreeF fFree, MqDataCopyF fCopy)
set the libmqmsgque::MqSetupS::ServerSetup
void MqConfigReset_RT(MK_RT mkrt, MQ_CTX const ctx)
clean the libmqmsgque::MqContextS::config data
void MqConfigSetAllTimeout(MQ_CTX const ctx, MK_TIME_T data)
set the libmqmsgque::MqIoConfigS::timeout value
void MqConfigSetIsServer(MQ_CTX const ctx, bool data)
set the libmqmsgque::MqSetupS::isServer value
enum MkErrorE MqConfigSetStartAsString(MQ_CTX const ctx, MK_STRN data)
set the libmqmsgque::MqConfigS::startAs value using string default, thread, fork or spawn
bool MqConfigCheckStartAs(MQ_CTX const ctx, enum MqStartE data)
check if libmqmsgque::MqConfigS::startAs can be set to data
void MqConfigSetBuffersize(MQ_CTX const ctx, MK_I32 data)
set the libmqmsgque::MqIoConfigS::buffersize value
void MqConfigSetPrefixWithNoLock_RT(MK_RT mkrt, MQ_CTX const ctx, MK_STRN data)
set the libmqmsgque::MqConfigS::dispPrefix with low-priority …
enum MkErrorE MqConfigSetIoTcp_RT(MK_RT mkrt, MQ_CTX const ctx, MK_STRN host, MK_STRN port, MK_STRN myhost, MK_STRN myport)
configure a context to use a tcp-client-server-link …
void MqConfigSetIgnoreExit(MQ_CTX const ctx, bool data)
set the libmqmsgque::MqSetupS::ignoreExit value
#define MqConfigSetIoTcp(...)
void MqConfigSetIsString(MQ_CTX const ctx, bool data)
set the libmqmsgque::MqConfigS::native value 'S'string or 'L'owEndian or 'B'igEndian
void MqConfigSetStorage_RT(MK_RT mkrt, MQ_CTX const ctx, MK_STRN data)
set the Storage value and cleanup old value
void MqConfigSetTimeout(MQ_CTX const ctx, MK_TIME_T data)
set the libmqmsgque::MqIoConfigS::timeout value
void MqConfigSetPostfix_RT(MK_RT mkrt, MQ_CTX const ctx, MK_STRN data)
set the client-part (2) of the application-identifer libmqmsgque::MqConfigS::dispName …
enum MkErrorE MqConfigSetIoTcpL_RT(MK_RT mkrt, MQ_CTX const ctx, MK_BFL const vals)
configure a context to use a tcp-client-server-link …
void MqConfigSetIdentFrom(MQ_CTX const ctx, enum MqIdentE data)
set the libmqmsgque::MqConfigS::identFrom value
enum MkErrorE MqConfigSetIoUds_RT(MK_RT mkrt, MQ_CTX const ctx, MK_STRN file)
configure a context to use a uds-client-server-link …
void MqConfigSetPrefix_RT(MK_RT mkrt, MQ_CTX const ctx, MK_STRN data)
set the server-part (1) of the application-identifer libmqmsgque::MqConfigS::dispName …
enum MkErrorE MqConfigSetAllDebug_RT(MK_RT mkrt, MQ_CTX const ctx, MK_I32 const data)
set the MkRuntimeS::debug value
enum MkErrorE MqConfigSetIoPipe_RT(MK_RT mkrt, MQ_CTX const ctx, MQ_SOCK_HDL fh)
set the pipe configuration data …
enum MkErrorE MqConfigSetDaemon_RT(MK_RT mkrt, MQ_CTX const ctx, MK_STRN pidfile)
start the server-context as daemon …
enum MkErrorE MqConfigSetStartAs(MQ_CTX const ctx, enum MqStartE data)
set the libmqmsgque::MqConfigS::startAs value
void MqConfigSetPkgsize(MQ_CTX const ctx, MK_I32 data)
set the libmqmsgque::MqIoConfigS::pkgsize value
void MqConfigSetName_RT(MK_RT mkrt, MQ_CTX const ctx, MK_STRN data)
set the libmqmsgque::MqConfigS::dispName value and cleanup old value
enum MkErrorE MqSendVL2_RT(MK_RT mkrt, MQ_CTX const ctx, MK_STRN cstr, va_list var_list)
A version of MqSend with va_list support …
static MK_STRN MqLogServerOrClient(MQ_CTXN const ctx)
is ctx a SERVER or a CLIENT ? …
static MK_STRN MqLogParentOrChild(MQ_CTXN ctx)
is ctx a PARENT or a CHILD ? …
static MQ_CTXN MqGetRootN(MQ_CTXN ctx)
(const) get the Root (toplevel initial context)
static MQ_CTX MqGetRoot(MQ_CTX ctx)
get the Root (toplevel initial context)
int MqExit_RT(MK_RT mkrt, MQ_CTX const ctx, MK_STRN const callfunc, MK_STRN const callfile, MK_I32 const callline)
delete the context and exit the current process or thread …
MQ_CTX_A MqRouteResolve_RT(MK_RT mkrt, MQ_CTX const ctx, MK_STRN const ident, MK_NUM const retnum)
return a list of all context belonging to ident …
enum MkErrorE MqRouteCreate_RT(MK_RT mkrt, MQ_CTX ctx, MK_STRN route, MK_STRN service, bool overwrite)
create/delete a routing-link between context an a service using route
enum MkErrorE MqSendBUF_RT(MK_RT mkrt, MQ_CTX const ctx, MK_BUFN const val)
append a MkBufferC object to the send-data-package object …
enum MkErrorE MqSendBUS_FLAT_RT(MK_RT mkrt, MQ_CTX const ctx, MK_BUSN const val)
append a MkBufferStreamC object to the send-data-package object …
enum MkErrorE MqSendL_FLAT_RT(MK_RT mkrt, MQ_CTX const ctx, MK_BFLN const val)
append a MkBufferListC object as flat list of items to the send-data-package object …
enum MkErrorE MqSendV_RT(MK_RT mkrt, MQ_CTX const ctx, MK_FST const printfmt,...)
append a vararg string to the send-data-package object …
enum MkErrorE MqSendBIN_RT(MK_RT mkrt, MQ_CTX const ctx, MkBinaryR const val)
append a libmkkernel::MK_BIN object to the send-data-package. …
enum MkErrorE MqSendBFL_RT(MK_RT mkrt, MQ_CTX const ctx, MK_BFLN const val)
append a MkBufferListC object to the send-data-package object …
static bool MqServiceIsTransaction(MQ_CTX const ctx)
check if the ongoing-service-call belongs to a transaction …
MK_STRN MQ_TOK
MqContextC - a char[4+1] or hex[8+1] string used to unique identify a service …
MqTokenF MqServiceCallbackF
MqContextC - the callback-function is used as a service-handle or as a event-handle …
MQ_TOK MqServiceTokenGet(MQ_CTX const ctx)
in an ongoing-service-call get the current MqContextC_ServiceApi_Identifer …
bool MqServiceTokenCheck(MQ_CTX const ctx, MQ_TOK const token)
in an ongoing-service-call check if the current MqContextC_ServiceApi_Identifer is token …
bool MqServiceTokenExists(MQ_CTX const ctx, MQ_TOK const token)
check if the MqContextC_ServiceApi_Identifer token is defined as ctx service …
enum MkErrorE MqSlaveGetFilter_RT(MK_RT mkrt, MQ_CTX const ctx, MQ_CTX *ctx_out)
get the filter-ctx or the master-ctx …
enum MkErrorE MqSlaveGetProxy_RT(MK_RT mkrt, MQ_CTX const ctx, MQ_SLAVE_ID const id, MQ_CTX *ctx_out)
on slave return the master and on master return the slave identified by id.
static bool MqSlaveCheck(MQ_CTXN const ctx, MQ_SLAVE_ID const id)
check if slave-id is valid
enum MkErrorE MqSlaveCreate_RT(MK_RT mkrt, MQ_CTX const ctx, MQ_SLAVE_ID const id, MQ_CTX const slave)
create a master/slave link between the master-parent-context and the slave-parent-context …
enum MkErrorE MqSlaveGet_RT(MK_RT mkrt, MQ_CTX const ctx, MQ_SLAVE_ID const id, MQ_CTX *ctx_out)
get the slave-context from a master-context …
enum MkErrorE MqSlaveDelete_RT(MK_RT mkrt, MQ_CTX const ctx, MQ_SLAVE_ID const id)
Delete a slave object from a master/slave link identified by id. …
static MQ_CTX MqSlaveGetMaster(MQ_CTX const ctx)
opposite function of MqSlaveGetFilter
static bool MqSlaveIs(MQ_CTXN const ctx)
is the context a slave-context ? …
enum MkErrorE MqStorageImport_RT(MK_RT mkrt, MQ_CTX const ctx, MQ_LTR *transLIdP_inout)
import the storage-package into the read-data-package …
enum MkErrorE MqStorageClose_RT(MK_RT mkrt, MQ_CTX const ctx)
close the storage. …
enum MkErrorE MqStorageErrCnt_RT(MK_RT mkrt, MQ_CTX const ctx, MQ_LTR transLId, MK_I32 *cnt_out)
increment and return the database row-error-count for the row defined with transLId
enum MkErrorE MqStorageExport_RT(MK_RT mkrt, MQ_CTX const ctx, MQ_LTR *ltid_out)
export the read-data-package into the STORAGE …
enum MkErrorE MqStorageOpen_RT(MK_RT mkrt, MQ_CTX const ctx, MK_STRN const storageFile)
switch to a file-based-transaction-database …
bool(* MqWaitForPipeF)(MK_RT mkrt, MQ_CTX const ctx, const struct MkIdS *idP)
Wait for a pipe-server to finish …
void(* MqSetupF)(MQ_CTX const ctx)
used to setup (initialize) a new thread/fork/process created by ccmqmsgque using the SysServer?...
enum MkErrorE(* MqCreateF)(MK_RT mkrt, MQ_CTX const ctx, MK_BFL const args)
the prototype for the ContextCreate function …
int(* MqExitF)(MK_RT mkrt, int num)
prototype for exit a process or thread …
void(* MqDeleteF)(MQ_CTX const ctx)
the prototype for a ContextDelete function …
void(* MqHelpF)(MK_STRN basename)
application specific help function type …
void(* MqRefCountF)(MK_RT mkrt, MQ_CTX ctx, MK_PTR const env)
used in libmqmsgque::MqTypeCtxS::fIncrSelf and libmqmsgque::MqTypeCtxS::fDecrSelf to protect an "embe...
static MK_HDL MqDumpHandleGet_RT(MK_RT mkrt, MQ_DMP const dmp)
Handle-Get-Slot - returns a export-hdl to the MqDumpC useable for external storage
static MQ_DMP MqDumpPrev(MQ_DMP const dmp)
get previous instance from linked-list of MqDumpS type
static MQ_DMP MqDumpInstances_RT(MK_RT mkrt)
get head-instance from linked-list of MqDumpS type …
static MQ_DMP MqDumpNext(MQ_DMP const dmp)
get next instance from linked-list of MqDumpS type
static MQ_DMP MqDumpGetNull(void)
Null-Slot - return a MqDumpC typed NULL instance …
static MQ_DMP MqDmp(MK_MNG mng)
cast a unknown-object into an MqDumpS pointer or NULL if not possible
#define MqDumpC_TT
class as MkTypeS-class-type, useable in a class-macro as: class##_TT …
static bool MqDmpCheck(MK_MNGN mng)
check MqDumpS -> libmkkernel::MkObjectS::signature …
#define MqDumpC_X2obj(x)
static bool MqDmpCheckO(MK_OBJN obj)
check MqDumpS -> libmkkernel::MkObjectS::signature …
static bool MqEnvCheckO(MK_OBJN obj)
check MqEnvS -> libmkkernel::MkObjectS::signature …
static bool MqEnvCheck(MK_MNGN mng)
check MqEnvS -> libmkkernel::MkObjectS::signature …
static bool MqErrCheckO(MK_OBJN obj)
check MqErrorS -> libmkkernel::MkObjectS::signature …
static bool MqErrCheck(MK_MNGN mng)
check MqErrorS -> libmkkernel::MkObjectS::signature …
void(* MqFactoryDataFreeF)(MK_RT mkrt, MK_PTR *dataP)
prototype for a free additional factory data function
enum MkErrorE(* MqFactoryCTorF)(MK_RT mkrt, MQ_RT mqrt, MQ_CTX const tmpl, enum MqFactoryE create, MQ_FCT const fct, MQ_CTX *ctx_out)
type of a MqFactoryC constructor
void(* MqFactoryDataCopyF)(MK_RT mkrt, MK_PTR *dataP)
prototype for a copy additional factory data function
void(* MqFactoryDTorF)(MK_RT mkrt, MQ_CTX ctx, bool doFactoryCleanup, MQ_FCT const fct)
type of a MqFactoryC destructor
static MQ_FCT MqFactoryPrev(MQ_FCT const fct)
get previous instance from linked-list of MqFactoryS type
static MQ_FCT MqFactoryGetNull(void)
Null-Slot - return a MqFactoryC typed NULL instance …
static MK_HDL MqFactoryHandleGet_RT(MK_RT mkrt, MQ_FCT const fct)
Handle-Get-Slot - returns a export-hdl to the MqFactoryC useable for external storage
static MQ_FCT MqFactoryNext(MQ_FCT const fct)
get next instance from linked-list of MqFactoryS type
static MQ_FCT MqFactoryInstances_RT(MK_RT mkrt)
get head-instance from linked-list of MqFactoryS type …
static bool MqFctCheckO(MK_OBJN obj)
check MqFactoryS -> libmkkernel::MkObjectS::signature …
#define MqFactoryC_X2obj(x)
static bool MqFctCheck(MK_MNGN mng)
check MqFactoryS -> libmkkernel::MkObjectS::signature …
#define MqFactoryC_TT
class as MkTypeS-class-type, useable in a class-macro as: class##_TT …
static MQ_FCT MqFct(MK_MNG mng)
cast a unknown-object into an MqFactoryS pointer or NULL if not possible
MQ_FCT MqFactoryGetCalled_RT(MK_RT mkrt, MK_STRN const ident)
returns the MqFactoryC identified by ident …
#define MqFactoryGetCalled(...)
#define MQ_EXTERN_DATA
#define MQ_EXTERN
static library
MqIdentE
identify the application using prefix (default) or factory …
MqWaitOnEventE
wait for an event? …
MqFactoryE
the factory is called to create an object for ...
MqStatusIsEF
Information about how the context was created.
MqSlaveE
predefined slave-id for well known slaves …
MqIoComE
what kind of socket interface to use? …
MqHandShakeE
the hand-shake of a service-call …
MqTransTypeE
the type of the transaction …
MqStartE
User preferences on HOWTO start a new entity.
@ MQ_IDENT_FACTORY
value from libmqmsgque::MqFactoryS::originalIdent
@ MQ_IDENT_PREFIX
value from libmqmsgque::MqConfigS::dispPrefix
@ MQ_WAIT_NO
Check for one event but do not wait …
@ MQ_WAIT_FOREVER
Wait maximum timeout seconds for an event or raise an timeout-error …
@ MQ_WAIT_ONCE
Wait maximum timeout seconds for one new event, doesn't matter which context the event belongs to or ...
@ MQ_WAIT_OWN
Wait maximum timeout seconds for one new event that belongs to the current context or raise an timeou...
@ MQ_FACTORY_NEW_INIT
initial object, nothing else is known
@ MQ_FACTORY_NEW_CHILD
create object as a child of an other object
@ MQ_FACTORY_NEW_FILTER
create object as a filter
@ MQ_FACTORY_NEW_SLAVE
create object as a slave of an other object
@ MQ_FACTORY_NEW_FORK
create object as a fork process
@ MQ_FACTORY_NEW_THREAD
create object as a thread
@ MQ_STATUS_IS_DUP
context is created as a duplicate of an other context
@ MQ_STATUS_IS_THREAD
context is created as a thread
@ MQ_STATUS_IS_FORK
context is created as a fork
@ MQ_STATUS_IS_INITIAL
context is the first context
@ MQ_STATUS_IS_SPAWN
context is created as a spawn
@ MQ_SLAVE_FILTER
internal: the filter-slave-id, (on a master get the filter-slave)
@ MQ_SLAVE_USER
internal: start of user-defined-slave-id
@ MQ_SLAVE_LOOPBACK
internal: the loopback-slave-id, (call my own services)
@ MQ_SLAVE_MASTER
internal: the master-slave-id, (on a slave get the master)
@ MQ_SLAVE_MAX
internal: the maximum slave-id …
@ MQ_SLAVE_OTHER
internal: on the master-ctx get the slave-ctx and on the slave-ctx get the master-ctx
@ MQ_IO_LOOP
using pipe socket as stdin and stdout
@ MQ_IO_INIT
using stdin and stdout
@ MQ_IO_PIPE
using a pipe socket (most internal usage)
@ MQ_IO_UDS
using a uds socket
@ MQ_IO_TCP
using a tcp socket
@ MQ_HANDSHAKE_START
direction: client -> server
@ MQ_HANDSHAKE_ERROR
direction: server -> client
@ MQ_HANDSHAKE_OK
direction: server -> client
@ MQ_TRANS_TYPE_TRANS
'T' = MqSendEND_AND_TRANSACTION
@ MQ_TRANS_TYPE_NO
'N' = MqSendEND
@ MQ_TRANS_TYPE_SUB
'S' = MqSendEND_AND_SUB
@ MQ_TRANS_TYPE_WAIT
'W' = MqSendEND_AND_WAIT
@ MQ_TRANS_TYPE_CB
'C' = MqSendEND_AND_CALLBACK
@ MQ_START_SPAWN
create entity as spawn process
@ MQ_START_THREAD
create entity as thread
@ MQ_START_FORK
create entity as fork
@ MQ_START_DEFAULT
use application-context default entity creation
int(* MqSysSelectF)(int max, void *read, void *write, void *except, struct timeval *timeout)
select syscall …
enum MkErrorE(* MqSysServerForkF)(MK_RT mkrt, MQ_RT mqrt, MQ_CTX const ctx, MQ_FCT factory, MK_BFL *argsP, MK_STRN name, MQ_SOCK_HDL socket, struct MkIdS *idPtrOut)
fork server create syscall with ccmqmsgque error plugin
struct MqLalS MqLal
Language Abstraction Layer in duty.
enum MkErrorE(* MqSysServerThreadF)(MK_RT mkrt, MQ_CTX const ctx, struct MqSysServerThreadMainS *const argP, MK_STRN name, int state, struct MkIdS *idPtrOut)
thread server create syscall with ccmqmsgque error plugin
enum MkErrorE(* MqSysServerSpawnF)(MK_RT mkrt, MQ_RT mqrt, MQ_CTX const ctx, char *const *argv, MK_STRN name, struct MkIdS *idPtrOut)
spawn server create syscall with ccmqmsgque error plugin
int MQ_ROU
32bit routing token because PHP-32 does NOT support long long
MK_NUM MQ_SLAVE_ID
a slave identiver
int MQ_LTR
32bit longterm transaction token because PHP-32 does NOT support long long
struct config_setting_t config_setting_t
libconfig struct
int MQ_HDL
handle data-type
struct config_t config_t
libconfig struct
#define MQ_RT_ARGS
#define MQ_RT_ARGS_ONLY
#define MQ_STATIC_RT
static bool MqRtCheckO(MK_OBJN obj)
check MqRuntimeS -> libmkkernel::MkObjectS::signature …
static bool MqRtCheck(MK_MNGN mng)
check MqRuntimeS -> libmkkernel::MkObjectS::signature …
static bool MqCtxTypCheckO(MK_OBJN obj)
check MqTypeCtxS -> libmkkernel::MkObjectS::signature …
static bool MqCtxTypCheck(MK_MNGN mng)
check MqTypeCtxS -> libmkkernel::MkObjectS::signature …
MQ_RT MqRuntimeSetup(MK_RT const mkrt, MQ_RT const mqrt)
initialize MqRuntimeRLS
__thread struct MqRuntimeS MqRuntimeRLS
RLS.
size_t MqRuntimeId
identify the custom runtime
array of MqContextC instances
used for callback function pointer management
MqTokenF fCall
callback method
MqDataCopyF fCopy
copy additional data pointer, used in a MqSetupDup
MkMarkF fMark
garbage-collector marker for data
MK_PTR data
additional data for the callback function
MqDataFreeF fFree
free additional data pointer
end-user configuration data, also available as command-line options
config_t * cfg
add libconfig configuration file …
enum MkNativeIsE native
define if data is string or little or big endian …
MQ_CTX parent
CHILD: a pointer to the parent object or MK_NULL.
MQ_CTX master
SLAVE: a pointer to the master object or MK_NULL.
enum MqStartE startAs
create a new application-context as thread, spawn or fork … A new application-context is created if:
config_setting_t * rootH
libconfig data root
bool dispPrefixLOCK
protect prefix
config_setting_t * filterH
libconfig data root
MK_NUM master_id
SLAVE: the ID in the master SLAVES array or O.
bool storageFileLOCK
protect storage
struct MqIoConfigS io
Global configuration data belonging to "io".
enum MqIdentE identFrom
select how to identify the application from remote …
bool dispNameLOCK
protect name
bool dispPostfixLOCK
protect postfix
PUBLIC data structure for the ccmqmsgque-specific-data
const struct MqConfigS config
the configuration data is used for "end-user" configuration
enum MqStatusIsEF statusIs
how the context was created?
struct MqLinkS link
link object data
MqDumpC - the class known as dmp or dump is used to export a ccmqmsgque data package as binary …
MqEnvS - the class known as env or environment is used to store the protected environment in an servi...
bool SIdLck
Short-Term-Transaction-Lock -> the "transSId" was already used.
bool LIdLck
Long-Term-Transaction-Lock -> the "transLId" was forwarded.
MQ_LTR transLId
longterm-transaction-id (rowid from readTrans table) used for persistent-transaction
MQ_HDL routeId
TODO: route-id remote or local. (rowid from the Routing-Table) if "0" -> the default route is used)
struct MqEnvS * link
work together with MqEnvProtect and MqEnvRestore
enum MqTransTypeE transType
what kind of transaction is it: W)ait, T)rans, S)ub, C)allback or N)o
enum MqHandShakeE handShake
what kind of call is it: S)tart, O)k or E)rror
MQ_HDL transSId
storage for the shortterm-transaction
MQ_LTR rmtTransLId
remote transaction-id (rowid from the remote readTrans table) if ">0LL" -> the value to use or "OLL"...
Extend the MkErrorS with ccmqmsgque specific features …
interface for the constructor
MqFactoryDataCopyF fCopy
copy additional data pointer
MK_PTR data
additional data pointer for the fCall
MqFactoryCTorF fCall
create a new object
MqFactoryDataFreeF fFree
free additional data pointer
interface for the destructor
MqFactoryDataCopyF fCopy
copy additional data pointer
MK_PTR data
additional data pointer for the fCall
MqFactoryDTorF fCall
delete the object created with libmqmsgque::MqFactoryCTorS
MqFactoryDataFreeF fFree
free additional data pointer
data used to define a factory
bool isDeleted
mark a factory as deleted -> MqFactoryGet will ignore this factory
bool factoryCalled
was the factory called?
Basic configuration of a context …
MK_I32 buffersize
set the OS specific value for the socket-operation-buffer (default: OS specific)
MK_I32 pkgsize
set maximum package size (default: 10 KiB)
enum MqIoComE com
what kind of socket interface to use?
struct MqIoUdsConfigS uds
set uds configuration-data
MK_TIME_T timeout
user defined timeout to terminate a blocking function call (default: 90 sec)
struct MqIoPipeConfigS pipe
set pipe configuration-data
configure a context to use a init-client-server-link …
Configure a context to use a loop-client-server-link …
configure a context to use a pipe-client-server-link …
MQ_SOCK_HDL hdl
server-result from a socketpair function-call, [0] for the client-socket and [1] for the server-socke...
configure a context to use a tcp-client-server-link …
configure a context to use a uds-client-server-link …
Interface between libmqmsgque::MqContextS and the Operating-System …
MqSysSelectF SysSelect
select syscall …
MqSysServerSpawnF MqSysServerSpawnCB
spawn server create syscall with ccmqmsgque error plugin
MqSysServerForkF MqSysServerForkCB
fork server create syscall with ccmqmsgque error plugin
MqSysServerThreadF MqSysServerThreadCB
thread server create syscall with ccmqmsgque error plugin
MqContextC - used to create or delete a instance to manage a link …
MqDeleteF fDelete
delete a instance
MqCreateF fCreate
create a new instance
needed to "run-over-all-slaves" → example: MqRouteGetTree
MK_NUM size
size of slaves[]
MK_NUM used
number of slave objects in slaves[]
MQ_CTX context
link to MQ and initialisation-flag
MQ_CTX * slaves
SLAVE: MK_NULL, MASTER a list of pointers of slave objects.
Extend the MkRuntimeS wie ccmqmsgque specific features …
MkThreadDataS mqThreadData
data used to link EXTERNAL runtime to MQ_RT
application-programmer configuration data
enum MqFactoryE factoryCall
an object is created by an factory but using a different call-style
bool isServer
change the context to act as server-context (true) or not (false) …
MQ_FCT factory
set the application-identifier …
bool EventIsServer
if libmqmsgque::MqSetupS::Event is a server event
bool ignoreExit
do not delete the server-context on client-server-link shutdown … By default the server-context is de...
data used to initialize a new created thread …
MQ_RT mqrt
runtime used to intialize the new thread-runtime
MK_TYP typ
all types from calling thread
MkThreadDataS mkThreadData
thread-data to set after new runtime was initialized
MK_RT mkrt
runtime used to intialize the new thread-runtime
bool isUsed
is the object used and initialisation-flag
MkBufferStream16384R argvR
command-line arguments, owned by SysServerThread
MQ_SOCK_HDL socket
"accept" socket for the new thread
MQ_FCT fct
factory used for recreate
MQ_FCT factory
server configuration (memory belongs to caller)
MQ_CTX tmpl
calling (parent) context
MqTypeCtxS - the instance-base for the MqContextC …
MqSetupF fParentBeforeFork
setup and initialize a fork-process before a new fork-process is created by ccmqmsgque
bool ignoreDisasterSetup
do not setup the disaster-handler at startup.
MqSetupF fChildAfterFork
cleanup a child fork-process after a new fork-process is created by ccmqmsgque
bool ignoreThread
do not allow the usage of threads
bool ignoreSpawn
do not allow the usage of spawn
bool argvFix
add first argument in MkBufferListC argument to MqLinkCreate and MqLinkCreateChild
MqWaitForPipeF MqWaitForPipeCB
wait for pipe target to finish
MqSetupF fThreadInit
setup and initialize a thread before a new thread is created by ccmqmsgque
MqExitF MqThreadExitCB
exit/cleanup a thread
MqRefCountF fIncrSelf
increment the libmqmsgque::MqContextS::obj->self reference counting
MqExitF MqProcessExitCB
exit/cleanup a process
MqSetupF fParentAfterFork
cleanup a parent fork-process after a new fork-process is created by ccmqmsgque
MqSetupF fSpawnInit
setup and initialize a spawn-process before a new spawn-process is created by ccmqmsgque
MkMarkF callbackMF
Mark the callback-data-pointer.
MqRefCountF fDecrSelf
decrement the libmqmsgque::MqContextS::obj->self reference counting
MkMarkF dataMF
Mark the data-pointer.
bool ignoreFork
do not allow the usage of fork
MqHelpF fHelp
Create a link to the calling tool help function.