theLink 10.0 NHI1 - theKernel - theLink - theConfig - theSq3Lite - theCompiler - theBrain - theGuard
c - tcl - cs - py - rb - jv - cc
Loading...
Searching...
No Matches
LibMqMsgque_mq.h
Go to the documentation of this file.
1
12#pragma once
13
14#include "LibMkKernel_mk.h"
15
16// =========================================================================
17// global __parser__ definition :
18
19__parser__(library=MqMsgque@internal@Mq);
20
21// MARK_D ################################################################
22// -----------------------------------------------------------------------
23// documentation order
38
52
76
84
92
99
107
114
119
120// =========================================================================================
121// Makefile: CPPFLAGS definitions
122// Config: configure definitions
123
124// define: META_TCP_ONLY_IPV4
125// source: msgque_mq.h
126// default: not set, use IPV8
127// definition: Force the IPV4 support and disable IPV8
128
129// define: META_COMPILE_AS_CC
130// source: Makefile
131// target: kernel_mk.h
132// default: only set by "ccmqmsgque" to compile "C" code as "C++" code
133// definition: By default, the "C" code is compiled as "C" code into a "C" library and eventually linked
134// to the library of the target programming language. With the "META_COMPILE_AS_CC" preprocessor
135// flag, the "C" code is not compiled into an independent library but is translated directly
136// into the target programming language (C++) library along with the additional C++ code as C++
137// code in the "ccmqmsgque::libmkkernel" namespace.
138// The following changes are done:
139// 1. "BEGIN_MK_C_DECLS" is set to "namespace libmsgque {"
140
141// define: META_HAVE_LIBCONFIG
142// source: user defind at build using '-DMETA_HAVE_LIBCONFIG=1/0' or set with the "configure" script
143// default: the default is "1 = set" - other value is "0 = not set"
144// definition: 1. Add the 'libconfig' library to the build to support config-files
145// 2. If the extension is build ontop of libmqmsgque the extension have to set META_HAVE_LIBCONFIG
146// according to libmqmsgque. If META_HAVE_LIBCONFIG differs from libmqmsgque than compile-error occure.
147// 3. autoconf example is at: NHI1/theLink/phpmsgque/MqMsgque/config.m4
148
149#ifndef META_HAVE_LIBCONFIG
150 #error "META_HAVE_LIBCONFIG was NOT defined, require 1 or 0"
151#endif
152
153// define: META_USE_GLOBAL_EVENT
154// source: only libmqmsgque build
155// default: do NOT(0) use META_USE_GLOBAL_EVENT
156// definition: 1. Add the "geDat" array to collect all "MqEventS" in all "MqRuntimeS"
157// 2. Protected by semaphore "geSem"
158// 3. NOT really usefull, free some data on exit
159// 4. In the PAST the "MqContectS" related to the "MqEventS" was freed also, BUT this is very buggy.
160
161#ifndef META_USE_GLOBAL_EVENT
162# define META_USE_GLOBAL_EVENT 0
163#endif
164
165// define: META_STATIC
166// reference: META_STATIC from kernel_mk.h
167
168#ifdef META_STATIC
169# undef MQ_C_BUILD_DLL
170# define MQ_C_BUILD_DLL
171#endif
172
173// =========================================================================
203#if META_HAS_THREAD
204# define MQ_RT_IS_ARG
205# define MQ_RT_ARGS_ONLY MK_RT mkrt, MQ_RT mqrt
206# define MQ_RT_ARGS MQ_RT_ARGS_ONLY,
207# define MQ_RT_CALL_ONLY mkrt, mqrt
208# define MQ_RT_CALL MQ_RT_CALL_ONLY,
209# define MQ_RT_PTR mqrt
210# define MQ_RT_REF (*mqrt)
211#else
212# define MQ_RT_ARGS_ONLY void
213# define MQ_RT_ARGS
214# define MQ_RT_CALL_ONLY
215# define MQ_RT_CALL
216# define MQ_RT_PTR &MqRuntimeRLS
217# define MQ_RT_REF MqRuntimeRLS
218#endif
220
221// ".c" file
222#define MQ_INSTANCE_RT_X(x) MK_INSTANCE_RT_X(x) ; MqRtSetup_XN(x)
223#define MQ_INSTANCE_RT_XN(x) MK_INSTANCE_RT_XN(x) ; MqRtSetup_XN(x)
224#define MQ_INSTANCE_RT_O(o) MK_INSTANCE_RT_O(o) ; MqRtSetup_ON(o)
225#define MQ_INSTANCE_RT_ON(o) MK_INSTANCE_RT_ON(o) ; MqRtSetup_ON(o)
226#define MQ_DESTRUCTOR_RT_X(c,x) MK_DESTRUCTOR_RT_X(c,x) ; MqRtSetup_XN(x)
227#define MQ_STATIC_RT MK_STATIC_RT ; MqRtSetup_NULL
229// MqRuntimeC_C_API
230
231/* BEGIN_MQ_C_DECLS should be used at the beginning of your declarations,
232 so that C++ compilers don't mangle their names. Use END_MQ_C_DECLS at
233 the end of C declarations.
234*/
235
236#undef BEGIN_MQ_C_DECLS
237#undef END_MQ_C_DECLS
238#if defined(META_COMPILE_AS_CC)
239# define BEGIN_MQ_C_DECLS namespace libmqmsgque { using namespace libmkkernel;
240# define END_MQ_C_DECLS }
241#elif defined(__cplusplus)
242# define BEGIN_MQ_C_DECLS extern "C" {
243# define END_MQ_C_DECLS }
244#else
245# define BEGIN_MQ_C_DECLS /* empty */
246# define END_MQ_C_DECLS /* empty */
247#endif
248
249// MARK_O
250#ifndef PARSE_C_HEADER_TO_META
251# include "gen/msgque_overload_mq.h"
252#endif
253
255
256// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
257
332/* ####################################################################### */
333/* ### ### */
334/* ### K E R N A L - A P I ### */
335/* ### ### */
336/* ####################################################################### */
337
338/*****************************************************************************/
339/* */
340/* windows conform extern */
341/* */
342/*****************************************************************************/
343
368
369// BEGIN-HEADER - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
370
371// If the source of libmqmsgque is direct used in an external library
372// (without dynamic linking) and this library should *not* export
373// the symbol's of libmqmsgque then the flag META_IGNORE_EXTERN have
374// to be set
375#undef MQ_EXTERN
376#if defined(META_IGNORE_EXTERN)
377# define MQ_EXTERN
378#elif defined(PIC)
379 // does we build a DLL ?
380# if defined(DLL_EXPORT)
381 // does we build the libmqmsgque library ?
382# if defined(MQ_C_BUILD_DLL)
383# define MQ_EXTERN __declspec(dllexport)
384# else
385# define MQ_EXTERN __declspec(dllimport)
386# endif
387# else
388 // no DLL - architecture specific extern specifier
389# define MQ_EXTERN __attribute__ ((visibility("default")))
390# endif
391#else
393# define MQ_EXTERN
394#endif
395
396// external data lookup
397#undef MQ_EXTERN_DATA
398#if defined(META_PRIVATE)
399# define MQ_EXTERN_DATA extern
400#elif defined(META_IGNORE_EXTERN)
401# define MQ_EXTERN_DATA extern
402#elif defined(PIC)
403 // does we build a DLL ?
404# if defined(DLL_EXPORT)
405 // does we build the libmqmsgque library ?
406# if defined(MQ_C_BUILD_DLL)
407# define MQ_EXTERN_DATA __declspec(dllexport)
408# else
409# define MQ_EXTERN_DATA __declspec(dllimport)
410# endif
411# else
412 // no DLL - architecture specific extern specifier
413# define MQ_EXTERN_DATA __attribute__ ((visibility("default"))) extern
414# endif
415#else
416# define MQ_EXTERN_DATA extern
417#endif
418
419// END-HEADER - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
420
422// MqMsgque_Compiler_C_API
423
424/*****************************************************************************/
425/* */
426/* types/generic */
427/* */
428/*****************************************************************************/
429
432
434typedef struct config_t config_t;
437
438struct MqContextS;
439struct MqTransS;
440struct MqConfigS;
441struct MqEventS;
442struct MqFactoryS;
443struct MqDumpS;
444
446__parser__(type=ME_NI4_MQ_LTR)
447typedef int MQ_LTR;
449__parser__(type=ME_NI4_MQ_ROU)
450typedef int MQ_ROU;
452__parser__(type=ME_NI4_MQ_SLAVE_ID)
454
456__parser__(type=ME_NI4_MQ_HDL:"handle data-type")
457typedef int MQ_HDL;
458
460// MqMsgque_Type_C_API
461
462/* MARK_C ********************************************************************/
463/* */
464/* class types */
465/* */
466/*****************************************************************************/
467
468// BEGIN-ShortDef - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
469
473 __parser__(internal,type=ME_CCC_MqErrorC:"extension management class for MqErrorS":internal)
474 typedef struct MqErrorS * MQ_ERR;
476 __parser__(internal,type=ME_CCN_MqErrorC:"const - extension management class for MqErrorS":internal)
477 typedef const struct MqErrorS * MQ_ERRN;
479 __parser__(ignore)
480 typedef struct MqErrorS MQ_ERRR;
482// MqErrorC_Class_C_API
483
487 __parser__(internal,type=ME_CCC_MqRuntimeC:"MqRuntimeC class handle":internal)
488 typedef struct MqRuntimeS * MQ_RT;
490 __parser__(internal,type=ME_CCN_MqRuntimeC:"const - MqRuntimeC class handle":internal)
491 typedef const struct MqRuntimeS * MQ_RTN;
493 __parser__(ignore)
494 typedef struct MqRuntimeS MQ_RTR;
496// MqRuntimeC_Class_C_API
497
501 __parser__(internal,type=ME_CCC_MqCtxTypeC:"MqContextS type":internal)
502 typedef struct MqCtxTypeS * MQ_CTXTYP;
504 __parser__(internal,type=ME_CCN_MqCtxTypeC:"const - MqContextS type":internal)
505 typedef const struct MqCtxTypeS * MQ_CTXTYPN;
507 __parser__(ignore)
508 typedef struct MqCtxTypeS MQ_CTXTYPR;
510// MqCtxTypeC_Class_C_API
511
515 __parser__(type=ME_CCC_MqContextC:"MqContextC class handle":primary)
516 typedef struct MqContextS * MQ_CTX;
518 __parser__(type=ME_CCN_MqContextC:"const - MqContextC class handle":primary)
519 typedef const struct MqContextS * MQ_CTXN;
521 __parser__(ignore)
522 typedef struct MqContextS MQ_CTXR;
524// MqContextC_Class_C_API
525
529 __parser__(type=ME_CCC_MqDumpC:"MqDumpC class handle":primary)
530 typedef struct MqDumpS * MQ_DMP;
532 __parser__(type=ME_CCN_MqDumpC:"const - MqDumpC class handle":primary)
533 typedef const struct MqDumpS * MQ_DMPN;
535 __parser__(ignore)
536 typedef struct MqDumpS MQ_DMPR;
538// MqDumpC_Class_C_API
539
543 __parser__(type=ME_CCC_MqFactoryC:"MqFactoryC class handle":primary)
544 typedef struct MqFactoryS * MQ_FCT;
546 __parser__(type=ME_CCN_MqFactoryC:"const - MqFactoryC class handle":primary)
547 typedef const struct MqFactoryS * MQ_FCTN;
549 __parser__(ignore)
550 typedef struct MqFactoryS MQ_FCTR;
552// MqFactoryC_Class_C_API
553
557 __parser__(internal,type=ME_CCC_MqEnvC:"MqEnvC class handle":internal)
558 typedef struct MqEnvS * MQ_ENV;
560 __parser__(internal,type=ME_CCN_MqEnvC:"const - MqEnvC class handle":internal)
561 typedef const struct MqEnvS * MQ_ENVN;
563 __parser__(ignore)
564 typedef struct MqEnvS MQ_ENVR;
566// MqEnvC_Class_C_API
567
568// END-ShortDef - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
569
572__parser__(type=ME_ACX_MqContextC:"ARRAY of MQ_CTX")
573typedef struct {
576} MQ_CTX_A;
577
578/*****************************************************************************/
579/* */
580/* sockets */
581/* */
582/*****************************************************************************/
583
586
587#if defined(__MINGW32__) || defined(_MSC_VER)
588typedef SOCKET MQ_SOCK_HDL;
589# define MK_FORMAT_SOCK "%I64u"
590#else
591__parser__(type=ME_NI4_MQ_SOCK_HDL)
592typedef int MQ_SOCK_HDL;
593# define MK_FORMAT_SOCK "%i"
594#endif
595
597// MqMsgque_Type_C_API
598
599/*****************************************************************************/
600/* */
601/* type definitions */
602/* */
603/*****************************************************************************/
604
607
608__parser__push__(doc-group=Enum);
609
612
614__parser__(internal)
623
624// BEGIN-MqHandShakeE - created by 'c_MqS.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
625
628__parser__(internal,no-rpc,prefix=EnumFunc,return-type-default-no)
629MQ_EXTERN MK_STRN MK_DECL MqHandShakeE_ToString ( enum MqHandShakeE value ) MK_ATTR_STATIC ;
630
633__parser__(internal,no-rpc,prefix=EnumFunc,return-type-default-no)
635mk_inline MK_I32 MqHandShakeE_ToInt ( enum MqHandShakeE value ) {
636 return (MK_I32) value;
637}
638
641__parser__(internal,no-rpc,prefix=EnumFunc)
642MQ_EXTERN enum MkErrorE MqHandShakeE_FromInt ( MK_I32 const value, enum MqHandShakeE * value_out ) MK_ATTR_STATIC ;
643
644// END-MqHandShakeE - created by 'c_MqS.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
645
647// MqHandShakeE
648
651
653__parser__(internal)
661
662// BEGIN-MqTransTypeE - created by 'c_MqS.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
663
666__parser__(internal,no-rpc,prefix=EnumFunc,return-type-default-no)
667MQ_EXTERN MK_STRN MK_DECL MqTransTypeE_ToString ( enum MqTransTypeE value ) MK_ATTR_STATIC ;
668
671__parser__(internal,no-rpc,prefix=EnumFunc,return-type-default-no)
673mk_inline MK_I32 MqTransTypeE_ToInt ( enum MqTransTypeE value ) {
674 return (MK_I32) value;
675}
676
679__parser__(internal,no-rpc,prefix=EnumFunc)
680MQ_EXTERN enum MkErrorE MqTransTypeE_FromInt ( MK_I32 const value, enum MqTransTypeE * value_out ) MK_ATTR_STATIC ;
681
682// END-MqTransTypeE - created by 'c_MqS.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
683
685// MqTransTypeE
686
689
695// [MqIdentE]
700// [MqIdentE]
701
702// BEGIN-MqIdentE - created by 'c_MqS.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
703
706__parser__(doc-group=Enum,doc-index=_ignore_,class=MqMsgque,no-rpc,prefix=EnumFunc,return-type-default-no)
707MQ_EXTERN MK_STRN MK_DECL MqIdentE_ToString ( enum MqIdentE value ) MK_ATTR_STATIC ;
708
711__parser__(doc-group=Enum,doc-index=_ignore_,class=MqMsgque,no-rpc,prefix=EnumFunc,return-type-default-no)
713mk_inline MK_I32 MqIdentE_ToInt ( enum MqIdentE value ) {
714 return (MK_I32) value;
715}
716
719__parser__(doc-group=Enum,doc-index=_ignore_,class=MqMsgque,no-rpc,prefix=EnumFunc)
720MQ_EXTERN enum MkErrorE MqIdentE_FromInt ( MK_I32 const value, enum MqIdentE * value_out ) MK_ATTR_STATIC ;
721
722// END-MqIdentE - created by 'c_MqS.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
723
725// MqIdentE
726
728
730// MqMsgque_Enum_C_API
731
734
735struct MqCtxTypeS;
736
737//__parser__(type=ME_TYC:"a managed object class type pointer")
738__parser__(internal)
740typedef struct MqCtxTypeS * MQ_CTXT;
741
743// MqCtxTypeC_C_API
744
745// #######################################################################
746// -----------------------------------------------------------------------
751
765__parser__(ignore)
766struct MqEnvS {
767 // BEGIN-MqEnvS-super - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
768
769 union {
770 struct MkObjectS obj; // instance-base MkObjectS
771 } super;
772
773 // END-MqEnvS-super - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
774
781 struct MqEnvS *link;
782 struct {
783 bool SIdLck : 1;
784 bool LIdLck : 1;
785 } bits;
786};
787
788// BEGIN-MqEnvS-Definition - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
789
793 __parser__push__(prefix=Class, doc-group=Define, doc-index=Class);
794
795// Signature --------------------------------------------------------------
798
799 #define MqEnvC_SIGNATURE (MkObjectC_SIGNATURE ^ (14u<<10))
800 #define MqEnvC_MASK (((1u<<22)-1)<<10)
801
803
804// CompileTimeCast --------------------------------------------------------------
807
808 #define MqEnvC_X2env(x) (x)
809 #define MqEnvC_X2obj(x) MkOBJ(x)
810
812
813// TypeDef --------------------------------------------------------------
816
818 __parser__(ignore) typedef struct MqEnvS MqEnvCR;
820 __parser__(ignore) typedef const struct MqEnvS MqEnvCNR;
822 #define MqEnvC_T (&MQ_RT_REF._MqEnvC_T)
824 #define MqEnvC_TT (MkTYP(MqEnvC_T))
826 #define MqEnvST MqEnvC_T
828 #define MqEnvSTT (MkTYP(MqEnvST))
830 #define MqEnvC_type MQ_ENV
832 #define MqEnvCT_X(instance) ( (struct MkSuperTypeS *) (MkOBJ_R(instance).type) )
834 #define MqEnvCTT_X(instance) (MkOBJ_R(instance).type)
836 #define MqEnvCT_TT(typ) ( (struct MkSuperTypeS *) (typ) )
838 #define MqEnvC_NS MQ
840 #define MqEnvCTT MqEnvCTT
842 #define MqEnvCT ( (struct MkSuperTypeS *) MqEnvCTT )
843
845
846// TypeCheck --------------------------------------------------------------
849
850 #pragma GCC diagnostic push
851 #pragma GCC diagnostic ignored "-Wattributes"
852
855 __parser__(class=MqEnvC,static,ignore)
858 return MkSanitizeCheck(MqEnvC,mng);
859 }
860
863 __parser__(class=MqEnvC,static,ignore)
866 return MkSanitizeCheckO(MqEnvC,obj);
867 }
868
869 #pragma GCC diagnostic pop
870 #define MqEnvC_Check(mng) MqEnvCheck(mng)
871
873
874// RunTimeCast --------------------------------------------------------------
877
879 __parser__(class=MqEnvC,ignore,static)
880 META_ATTRIBUTE_SANITIZE
883 return (MqEnvCheck(mng) ? (MQ_ENV)mng : NULL);
884 }
885
887 __parser__(class=MqEnvC,ignore,static)
888 META_ATTRIBUTE_SANITIZE
891 return (MqEnvCheck(mng) ? (MQ_ENVN)mng : NULL);
892 }
893
895 #define MqEnvRaise(_env) if (!_MkCheckX(MqEnvC,_env)) { \
896 MkErrorSetC_1E("'MqEnvC' hdl is NULL"); \
897 goto error ; \
898 }
899
901 #define MqENV_R(x) (*(x)).super.env
903 #define MqENV(x) (&MqENV_R(x))
904
906
909// MqEnvC_Class_Define_C_API
910
911// END-MqEnvS-Definition - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
912
914// MqEnvC_C_API
915
918
919// \brief check service call environment at the beginning of the service call
920#define MQ_SERVICE_CALL_CHECK do { \
921 assert (__data__ != NULL); \
922 if (MqCtxCheck(mqctx) == false || MkOBJ_R(mqctx).self == NULL) return MK_OK; \
923} while (0)
924
925// [MqTokenF]
927#define MQ_SERVICE_CALL_ARGS MK_RT_ARGS MQ_CTX const mqctx, MK_PTR const __data__
929#define MQ_SERVICE_CALL MK_RT_CALL mqctx, __data__
930
944__parser__(flags=public-internal)
945typedef enum MkErrorE ( MK_DECL *MqTokenF ) ( MQ_SERVICE_CALL_ARGS );
946// [MqTokenF]
947
948// [MqDataFreeF]
950#define MQ_SERVICE_FREE_ARGS MK_RT_ARGS MQ_CTX const mqctx, MK_PTR *dataP __parser__(inout)
951
953__parser__(flags=public-internal)
954typedef void ( MK_DECL *MqDataFreeF ) ( MQ_SERVICE_FREE_ARGS );
955// [MqDataFreeF]
956
957// [MqDataCopyF]
959#define MQ_SERVICE_COPY_ARGS MK_RT_ARGS MQ_CTX const mqctx, MK_PTR *dataP __parser__(inout)
960
962__parser__(flags=public-internal)
963typedef void ( MK_DECL *MqDataCopyF ) ( MQ_SERVICE_COPY_ARGS );
964// [MqDataCopyF]
965
967// MqContextC_ConfigApi_C_API
968
971__parser__(ignore)
979
984
985 // slaves link
989};
990
991#if defined(MQ_C_BUILD_DLL)
992
993 #define META_SECTION_DEFINE
994 #include "MqLinkS_mq.h"
995 #undef META_SECTION_DEFINE
996
997#else // MQ_C_BUILD_DLL
998
1001__parser__(ignore)
1002struct MqLinkS {
1003
1004 // PUBLIC variables
1005
1009 #define MqLinkS_targetIdent_size 64
1011
1012 // context-management variables
1015
1016 // protected environment
1017 struct MqEnvS protect;
1019
1020 // master/slave relationship
1021 struct MqLinkSlaveS slave;
1022
1023 // offset calculated by "Nhi1InternalSize"
1024 MK_BINB private_variables[40648];
1025};
1026
1027#endif // MQ_C_BUILD_DLL
1028
1029/* MARK_F ################################################################ */
1030/* ### ### */
1031/* ### C T X - C O N F I G - A P I ### */
1032/* ### ### */
1033/* ####################################################################### */
1034
1154// MqContextC_ConfigApi_C_API
1155
1156// #######################################################################
1157// -----------------------------------------------------------------------
1162
1163__parser__push__(doc-group=Misc,doc-index=ConfigApi);
1164
1173typedef enum MkErrorE ( MK_DECL
1174 *MqCreateF
1175) (
1176 MK_RT_ARGS
1177 MQ_CTX const ctx,
1178 MK_BFL const args
1179);
1180
1181#define MQ_CALLBACK_CREATE_ARGS MK_RT_ARGS MQ_CTX const mqctx, MK_BFL const argv
1182#define MQ_CALLBACK_CREATE_CALL MK_RT_CALL mqctx, argv
1183
1192typedef void ( MK_DECL
1193 *MqDeleteF
1194) (
1195 MQ_CTX const ctx
1196);
1197
1200typedef void ( MK_DECL
1201 *MqHelpF
1202) (
1203 MK_STRN basename
1204) __attribute__ ((noreturn));
1205
1208typedef void ( MK_DECL
1209 *MqExitF
1210) (
1212 int num
1213);
1214
1223typedef void ( MK_DECL
1224 *MqWaitForPipeF
1225) (
1227 MQ_CTX const ctx,
1228 const struct MkIdS * idP __parser__(in)
1229);
1230
1234typedef void (MK_DECL *MqSetupF) ( MQ_CTX const ctx ) ;
1235
1248typedef void (MK_DECL *MqRefCountF) ( MK_RT_ARGS MQ_CTX ctx , MK_PTR const env) ;
1249
1255__parser__(ignore)
1259
1270__parser__(ignore)
1277
1284__parser__(ignore)
1288
1290__parser__(ignore)
1292};
1293
1298__parser__(ignore)
1300};
1301
1302/*****************************************************************************/
1303/* */
1304/* create / delete */
1305/* */
1306/*****************************************************************************/
1307
1311 MQ_CTX const ctx
1313
1315__parser__(internal)
1316MQ_EXTERN void MK_DECL MqConfigDup_RT (
1318 MQ_CTX const to,
1319 MQ_CTX const from
1321
1330// from being overwritten.
1331__parser__(hide)
1332MQ_EXTERN void MK_DECL MqSetupDup_RT (
1334 MQ_CTX const to,
1335 MQ_CTXN const from
1337
1339
1341// MqContextC_ConfigApi_Misc_C_API
1342
1343// #######################################################################
1344// -----------------------------------------------------------------------
1353__parser__push__(no-rpc,template-overload,doc-group=Setup,prefix=Setup);
1354
1359__parser__(no-inline)
1360MQ_EXTERN void MK_DECL MqSetup (void) __attribute__ ((constructor(300))) MK_ATTR_STATIC ;
1361
1367__parser__(no-inline)
1368MQ_EXTERN void MK_DECL MqCleanup (void) __attribute__ ((destructor(300))) MK_ATTR_STATIC ;
1369
1371__parser__(ignore)
1372MQ_EXTERN_DATA bool MqCleanupActive;
1373
1375
1377// MqMsgque_Setup_C_API
1378
1379
1380// #######################################################################
1381// -----------------------------------------------------------------------
1385
1386__parser__push__(doc-group=Enum,doc-index=_ignore_,class=MqMsgque);
1387
1390
1396// [MqStartE]
1403// [MqStartE]
1404
1405// BEGIN-MqStartE - created by 'c_MqS.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
1406
1409__parser__(doc-group=Enum,doc-index=_ignore_,class=MqMsgque,no-rpc,prefix=EnumFunc,return-type-default-no)
1410MQ_EXTERN MK_STRN MK_DECL MqStartE_ToString ( enum MqStartE value ) MK_ATTR_STATIC ;
1411
1414__parser__(doc-group=Enum,doc-index=_ignore_,class=MqMsgque,no-rpc,prefix=EnumFunc,return-type-default-no)
1416mk_inline MK_I32 MqStartE_ToInt ( enum MqStartE value ) {
1417 return (MK_I32) value;
1418}
1419
1422__parser__(doc-group=Enum,doc-index=_ignore_,class=MqMsgque,no-rpc,prefix=EnumFunc)
1423MQ_EXTERN enum MkErrorE MqStartE_FromInt ( MK_I32 const value, enum MqStartE * value_out ) MK_ATTR_STATIC ;
1424
1425// END-MqStartE - created by 'c_MqS.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
1426
1428
1431
1437// [MqStatusIsEF]
1438__parser__(enum-is-flag)
1446// [MqStatusIsEF]
1447
1448// BEGIN-MqStatusIsEF - created by 'c_MqS.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
1449
1452__parser__(doc-group=Enum,doc-index=_ignore_,class=MqMsgque,no-rpc,prefix=EnumFunc,return-type-default-no)
1453MQ_EXTERN MK_STRN MK_DECL MqStatusIsEF_ToString ( enum MqStatusIsEF value ) MK_ATTR_STATIC ;
1454
1457__parser__(doc-group=Enum,doc-index=_ignore_,class=MqMsgque,no-rpc,prefix=EnumFunc,return-type-default-no)
1459mk_inline MK_I32 MqStatusIsEF_ToInt ( enum MqStatusIsEF value ) {
1460 return (MK_I32) value;
1461}
1462
1465__parser__(doc-group=Enum,doc-index=_ignore_,class=MqMsgque,no-rpc,prefix=EnumFunc)
1466MQ_EXTERN enum MkErrorE MqStatusIsEF_FromInt ( MK_I32 const value, enum MqStatusIsEF * value_out ) MK_ATTR_STATIC ;
1467
1468// END-MqStatusIsEF - created by 'c_MqS.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
1469
1471// MqStatusIsEF
1472
1475
1477__parser__(internal,enum-is-flag)
1486
1487// BEGIN-MqFactoryE - created by 'c_MqS.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
1488
1491__parser__(internal,no-rpc,prefix=EnumFunc,return-type-default-no)
1492MQ_EXTERN MK_STRN MK_DECL MqFactoryE_ToString ( enum MqFactoryE value ) MK_ATTR_STATIC ;
1493
1496__parser__(internal,no-rpc,prefix=EnumFunc,return-type-default-no)
1498mk_inline MK_I32 MqFactoryE_ToInt ( enum MqFactoryE value ) {
1499 return (MK_I32) value;
1500}
1501
1504__parser__(internal,no-rpc,prefix=EnumFunc)
1505MQ_EXTERN enum MkErrorE MqFactoryE_FromInt ( MK_I32 const value, enum MqFactoryE * value_out ) MK_ATTR_STATIC ;
1506
1507// END-MqFactoryE - created by 'c_MqS.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
1508
1510// MqFactoryE
1511
1514
1516__parser__(internal)
1524
1525// BEGIN-MqIoComE - created by 'c_MqS.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
1526
1529__parser__(internal,no-rpc,prefix=EnumFunc,return-type-default-no)
1530MQ_EXTERN MK_STRN MK_DECL MqIoComE_ToString ( enum MqIoComE value ) MK_ATTR_STATIC ;
1531
1534__parser__(internal,no-rpc,prefix=EnumFunc,return-type-default-no)
1536mk_inline MK_I32 MqIoComE_ToInt ( enum MqIoComE value ) {
1537 return (MK_I32) value;
1538}
1539
1542__parser__(internal,no-rpc,prefix=EnumFunc)
1543MQ_EXTERN enum MkErrorE MqIoComE_FromInt ( MK_I32 const value, enum MqIoComE * value_out ) MK_ATTR_STATIC ;
1544
1545// END-MqIoComE - created by 'c_MqS.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
1546
1548// MqIoComE
1549
1552
1558// [MqWaitOnEventE]
1591// [MqWaitOnEventE]
1592
1593// BEGIN-MqWaitOnEventE - created by 'c_MqS.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
1594
1597__parser__(doc-group=Enum,doc-index=_ignore_,class=MqMsgque,no-rpc,prefix=EnumFunc,return-type-default-no)
1598MQ_EXTERN MK_STRN MK_DECL MqWaitOnEventE_ToString ( enum MqWaitOnEventE value ) MK_ATTR_STATIC ;
1599
1602__parser__(doc-group=Enum,doc-index=_ignore_,class=MqMsgque,no-rpc,prefix=EnumFunc,return-type-default-no)
1604mk_inline MK_I32 MqWaitOnEventE_ToInt ( enum MqWaitOnEventE value ) {
1605 return (MK_I32) value;
1606}
1607
1610__parser__(doc-group=Enum,doc-index=_ignore_,class=MqMsgque,no-rpc,prefix=EnumFunc)
1611MQ_EXTERN enum MkErrorE MqWaitOnEventE_FromInt ( MK_I32 const value, enum MqWaitOnEventE * value_out ) MK_ATTR_STATIC ;
1612
1613// END-MqWaitOnEventE - created by 'c_MqS.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
1614
1616// MqWaitOnEventE
1617
1620
1627// [MqSlaveE]
1628__parser__(enum-accept-integer=int32)
1640// [MqSlaveE]
1641
1642// BEGIN-MqSlaveE - created by 'c_MqS.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
1643
1646__parser__(doc-group=Enum,doc-index=_ignore_,class=MqMsgque,no-rpc,prefix=EnumFunc,return-type-default-no)
1647MQ_EXTERN MK_STRN MK_DECL MqSlaveE_ToString ( enum MqSlaveE value ) MK_ATTR_STATIC ;
1648
1651__parser__(doc-group=Enum,doc-index=_ignore_,class=MqMsgque,no-rpc,prefix=EnumFunc,return-type-default-no)
1653mk_inline MK_I32 MqSlaveE_ToInt ( enum MqSlaveE value ) {
1654 return (MK_I32) value;
1655}
1656
1659__parser__(doc-group=Enum,doc-index=_ignore_,class=MqMsgque,no-rpc,prefix=EnumFunc)
1660MQ_EXTERN enum MkErrorE MqSlaveE_FromInt ( MK_I32 const value, enum MqSlaveE * value_out ) MK_ATTR_STATIC ;
1661
1662// END-MqSlaveE - created by 'c_MqS.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
1663
1665// MqSlaveE
1666
1668
1670// MqMsgque_Enum_C_API
1671
1674__parser__(ignore)
1679
1680// #######################################################################
1681// -----------------------------------------------------------------------
1685
1687__parser__(ignore)
1689
1695
1698
1701
1709
1711 struct MqIoUdsConfigS uds;
1712
1714 struct MqIoTcpConfigS tcp;
1715
1717 struct MqIoPipeConfigS pipe;
1718
1720 struct MqIoLoopConfigS loop;
1721
1723 struct MqIoInitConfigS init;
1724};
1725
1727__parser__(ignore)
1729
1732
1754
1755 #define MqConfigS_dispName_size 64
1784
1785 #define MqConfigS_dispPrefix_size 64
1801
1802 #define MqConfigS_dispPostfix_size 64
1816
1819
1822
1825
1827 struct MqIoConfigS io;
1828
1836 #define MqConfigS_storageFile_size 256
1838
1839 struct {
1840 bool dispNameLOCK :1 ;
1844 } bits;
1845
1883
1885
1886#if META_HAVE_LIBCONFIG
1937
1940
1943#else
1944 void * cfg_dummy;
1945 void * rootH_dummy;
1946 void * filterH_dummy;
1947#endif // META_HAVE_LIBCONFIG
1948
1949};
1950
1952__parser__(ignore)
1953struct MqSetupS {
1954
1975 //MK_STRN ident;
1977
1980
1991 struct MqCallbackS BgError;
1992
2002
2015 // PRIVATE: \attention the \RMKNS{BFL} commandline-arguments are available at \RCNs{LinkS::alfa} in \RCNs{ContextS::link}
2016 struct MqCallbackS ServerSetup;
2017
2027 struct MqCallbackS ServerCleanup;
2028
2029 // misc
2030
2050 struct MqCallbackS Event;
2051
2054
2067};
2068
2070// MqContextC_ConfigApi_Misc_C_API
2071
2072// #######################################################################
2073// -----------------------------------------------------------------------
2078
2079__parser__push__(doc-group=Set,doc-index=ConfigApi);
2080
2082MQ_EXTERN void
2085 MQ_CTX const ctx,
2086 MK_STRN data
2088
2096__parser__(internal)
2097MQ_EXTERN void
2100 MQ_CTX const ctx,
2101 MK_STRN data
2103
2105MQ_EXTERN void
2108 MQ_CTX const ctx,
2109 MK_STRN data
2111
2113MQ_EXTERN void
2116 MQ_CTX const ctx,
2117 MK_STRN data
2119
2121MQ_EXTERN void
2124 MQ_CTX const ctx,
2125 MK_STRN data
2127
2128
2132__parser__(internal)
2133MQ_EXTERN void
2135 MQ_CTX const ctx,
2136 MK_TIME_T data
2138
2145 MQ_CTX const ctx,
2146 MK_I32 const data
2148
2152MQ_EXTERN void
2154 MQ_CTX const ctx,
2155 bool data
2157
2161 MQ_CTX const ctx,
2162 enum MqStartE data
2164
2168 MQ_CTX const ctx,
2169 MK_STRN data
2171
2173MQ_EXTERN bool
2175 MQ_CTX const ctx,
2176 enum MqStartE data
2178
2188 MQ_CTX const ctx,
2189 MK_STRN file
2191
2198__parser__(flags=public-internal)
2202 MQ_CTX const ctx,
2203 MK_STRN host __parser__(default=F#STRING_NULL),
2204 MK_STRN port __parser__(default=F#STRING_NULL),
2205 MK_STRN myhost __parser__(default=F#STRING_NULL),
2206 MK_STRN myport __parser__(default=F#STRING_NULL)
2208
2210//
2215__parser__(no-type-extension,overload=MqConfigSetIoTcp)
2219 MQ_CTX const ctx,
2220 MK_BFL const vals
2222
2227//
2235 MQ_CTX const ctx,
2236 MQ_SOCK_HDL fh
2238
2256 MQ_CTX const ctx,
2257 MK_STRN pidfile
2259
2261MQ_EXTERN void
2263 MQ_CTX const ctx,
2264 MK_I32 data
2266
2268MQ_EXTERN void
2270 MQ_CTX const ctx,
2271 MK_I32 data
2273
2275MQ_EXTERN void
2277 MQ_CTX const ctx,
2278 MK_TIME_T data
2280
2282MQ_EXTERN void
2284 MQ_CTX const ctx,
2285 bool data
2287
2289MQ_EXTERN void
2291 MQ_CTX const ctx,
2292 enum MqIdentE data
2294
2296MQ_EXTERN void
2298 MQ_CTX const ctx,
2299 bool data
2302
2304// MqContextC_ConfigApi_Set_C_API
2305
2306
2307// #######################################################################
2308// -----------------------------------------------------------------------
2330
2331__parser__push__(doc-group=Interface,doc-index=ConfigApi);
2332
2345#define MqInterfaceDoc(mkrt,ctx,fCall,callback,fFree,fCopy)
2346
2352__parser__(no-rpc,callback-name=ServerSetup,callback-null,flags=public-internal)
2353MQ_EXTERN void
2356 MQ_CTX const ctx,
2357 MqTokenF fCall __parser__(callback-call),
2358 MK_CBP callback __parser__(callback-data,null-allowed),
2359 MqDataFreeF fFree __parser__(callback-free,null-allowed),
2360 MqDataCopyF fCopy __parser__(callback-copy,null-allowed)
2362
2368__parser__(no-rpc,callback-name=ServerCleanup,callback-null,flags=public-internal)
2369MQ_EXTERN void
2372 MQ_CTX const ctx,
2373 MqTokenF fCall __parser__(callback-call),
2374 MK_CBP callback __parser__(callback-data),
2375 MqDataFreeF fFree __parser__(callback-free),
2376 MqDataCopyF fCopy __parser__(callback-copy)
2378
2384__parser__(no-rpc,callback-name=BgError,callback-null,flags=public-internal)
2385MQ_EXTERN void
2388 MQ_CTX const ctx,
2389 MqTokenF fCall __parser__(callback-call),
2390 MK_CBP callback __parser__(callback-data),
2391 MqDataFreeF fFree __parser__(callback-free),
2392 MqDataCopyF fCopy __parser__(callback-copy)
2394
2404__parser__(no-rpc,callback-name=Event,callback-null,flags=public-internal)
2405MQ_EXTERN void
2408 MQ_CTX const ctx,
2409 MqTokenF fCall __parser__(callback-call),
2410 MK_CBP callback __parser__(callback-data),
2411 MqDataFreeF fFree __parser__(callback-free),
2412 MqDataCopyF fCopy __parser__(callback-copy)
2414
2416
2418// MqContextC_ConfigApi_Interface_C_API
2419
2420// #######################################################################
2421// -----------------------------------------------------------------------
2426
2429#define MQ_IS_SERVER(ctx) (ctx->setup.isServer == true)
2430#define MQ_IS_SERVER_PARENT(ctx) (MQ_IS_SERVER(ctx) && MQ_IS_PARENT(ctx))
2431#define MQ_IS_CLIENT(ctx) (ctx->setup.isServer == false)
2432#define MQ_IS_CLIENT_PARENT(ctx) (MQ_IS_CLIENT(ctx) && MQ_IS_PARENT(ctx))
2433#define MQ_IS_CHILD(ctx) ((ctx)->config.parent != NULL)
2434#define MQ_IS_PARENT(ctx) ((ctx)->config.parent == NULL)
2435#define MQ_IS_SLAVE(ctx) ((ctx)->config.master != NULL)
2436#define MQ_IS_MASTER(ctx) ((ctx)->config.master == NULL)
2437#define MQ_IS_LOOPBACK(ctx) ((ctx)->config.io.com == MQ_IO_LOOP)
2438
2439#define MQ_GET_PARENT(ctx) (MQ_IS_CHILD(ctx) ? ctx->link.ctxIdP : ctx)
2440#define MQ_GET_MASTER(ctx) (MQ_IS_SLAVE(ctx) ? ctx->config.master : ctx)
2442
2444
2445/* ####################################################################### */
2446/* ### ### */
2447/* ### C T X - L O G - A P I ### */
2448/* ### ### */
2449/* ####################################################################### */
2450
2465
2466__parser__push__(doc-group=Log,doc-index=LogApi);
2467
2478__parser__(const,class-overload=MkObjectLog)
2479MQ_EXTERN void MK_DECL MqContextLog_RT (
2481 MQ_CTXN const ctx ,
2483 MK_DBG const debug __parser__(default=0),
2484 MK_STRN const callfunc __parser__(default=F#FUNC),
2485 MK_I32 const lvl __parser__(default=0)
2487
2499__parser__(const)
2500MQ_EXTERN void MK_DECL MqContextLogShort_RT (
2502 MQ_CTXN const ctx ,
2504 MK_DBG const debug __parser__(default=0),
2505 MK_STRN const callfunc __parser__(default=F#FUNC),
2506 MK_I32 const lvl __parser__(default=0),
2507 MK_STRN const label __parser__(default=F#STRING_NULL)
2509
2518__parser__(const)
2519MQ_EXTERN void MK_DECL MqContextLogConfig_RT (
2521 MQ_CTXN const ctx ,
2523 MK_DBG const debug __parser__(default=0),
2524 MK_STRN const callfunc __parser__(default=F#FUNC),
2525 MK_I32 const lvl __parser__(default=0)
2527
2536__parser__(const)
2537MQ_EXTERN void MK_DECL MqContextLogSetup_RT (
2539 MQ_CTXN const ctx ,
2541 MK_DBG const debug __parser__(default=0),
2542 MK_STRN const callfunc __parser__(default=F#FUNC),
2543 MK_I32 const lvl __parser__(default=0)
2545
2554__parser__(const)
2555MQ_EXTERN void MK_DECL MqContextLogLink_RT (
2557 MQ_CTXN ctx ,
2559 MK_DBG const debug __parser__(default=0),
2560 MK_STRN const callfunc __parser__(default=F#FUNC),
2561 MK_I32 const lvl __parser__(default=0)
2563
2574__parser__(const)
2575MQ_EXTERN void MK_DECL MqContextLogEnv_RT (
2577 MQ_CTX const ctx ,
2579 MK_DBG const debug __parser__(default=0),
2580 MK_STRN const callfunc __parser__(default=F#FUNC),
2581 MK_I32 const lvl __parser__(default=0)
2583
2594__parser__(const)
2595MQ_EXTERN void MK_DECL MqContextLogType_RT (
2597 MQ_CTX const ctx ,
2599 MK_DBG const debug __parser__(default=0),
2600 MK_STRN const callfunc __parser__(default=F#FUNC),
2601 MK_I32 const lvl __parser__(default=0)
2603
2604__parser__(ignore)
2605MQ_EXTERN void MK_DECL MqContextLogDebug (MQ_CTX const ctx);
2606
2607// end of class=MqContextC,doc-group=Log
2609
2611// MqContextC_LogApi_Log_C_API
2612
2613// #######################################################################
2614// -----------------------------------------------------------------------
2627
2636typedef int (*MqSysSelectF) (int max, void* read, void* write, void* except, struct timeval* timeout);
2637
2651
2676__parser__(hide)
2677MQ_EXTERN void MK_DECL MqSysServerThreadMain (
2678 struct MqSysServerThreadMainS *data __parser__(in,silent)
2679);
2680
2695typedef enum MkErrorE (*MqSysServerSpawnF) (
2697 MQ_CTX const ctx,
2698 char *const * argv,
2699 MK_STRN name,
2700 struct MkIdS * idPtrOut
2701);
2702
2717typedef enum MkErrorE (*MqSysServerThreadF) (
2719 MQ_CTX const ctx,
2720 struct MqSysServerThreadMainS * const argP __parser__(in) ,
2721 MK_STRN name,
2722 int state,
2723 struct MkIdS * idPtrOut __parser__(in)
2724);
2725
2742typedef enum MkErrorE (*MqSysServerForkF) (
2744 MQ_CTX const ctx,
2745 MQ_FCT factory,
2746 MK_BFL* argsP,
2747 MK_STRN name,
2748 MQ_SOCK_HDL socket,
2749 struct MkIdS * idPtrOut __parser__(in)
2750);
2751
2753__parser__(ignore)
2767
2769__parser__(ignore)
2771
2773// - MqMsgque_Sys_C_API
2774
2775/* MARK_E ################################################################ */
2776/* ### ### */
2777/* ### E R R O R - A P I ### */
2778/* ### ### */
2779/* ####################################################################### */
2780
2791
2793__parser__(internal)
2794struct MqErrorS {
2795 // BEGIN-MqErrorS-super - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
2796
2797 union {
2798 struct MkObjectS obj; // instance-base MkObjectS
2799 struct MkExtensionS ext; // instance-base MkExtensionS
2800 struct MkErrExtS errext; // instance-base MkErrExtS
2801 } super;
2802
2803 // END-MqErrorS-super - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
2804
2805 // instance attributes
2806 char errhint; // the TYPE if the \e errobj U=undefined, C=client, S=server
2807
2808 MQ_CTXN client_ctx; // context source of the error, NULL = current context
2809
2810 // The \e error_protect is used in \RCNs{SendERROR} to restructure the environment at
2811 // the time of the error. The data is a copy of the \RCNs{LinkS::protect} data
2812 struct MqEnvS client_protect;
2813
2814 MQ_CTXN server_ctx; // context source of the error, NULL = current context
2815
2816 // The \e error_protect is used in \RCNs{SendERROR} to restructure the environment at
2817 // the time of the error. The data is a copy of the \RCNs{LinkS::protect} data
2818 struct MqEnvS server_protect;
2819};
2820
2821// BEGIN-MqErrorS-Definition - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
2822
2826 __parser__push__(prefix=Class, doc-group=Define, doc-index=Class);
2827
2828// Signature --------------------------------------------------------------
2831
2832 #define MqErrorC_SIGNATURE (MkErrExtC_SIGNATURE ^ (1u<<3))
2833 #define MqErrorC_MASK (((1u<<29)-1)<<3)
2834
2836
2837// CompileTimeCast --------------------------------------------------------------
2840
2841 #define MqErrorC_X2err(x) (x)
2842 #define MqErrorC_X2errext(x) MkERREXT(x)
2843 #define MqErrorC_X2ext(x) MkEXT(x)
2844 #define MqErrorC_X2obj(x) MkOBJ(x)
2845
2847
2848// TypeDef --------------------------------------------------------------
2851
2853 __parser__(ignore) typedef struct MqErrorS MqErrorCR;
2855 __parser__(ignore) typedef const struct MqErrorS MqErrorCNR;
2857 #define MqErrorC_T (&MQ_RT_REF._MqErrorC_T)
2859 #define MqErrorC_TT (MkTYP(MqErrorC_T))
2861 #define MqErrorST MqErrorC_T
2863 #define MqErrorSTT (MkTYP(MqErrorST))
2865 #define MqErrorC_type MQ_ERR
2867 #define MqErrorCT_X(instance) ( (struct MkSuperTypeS *) (MkOBJ_R(instance).type) )
2869 #define MqErrorCTT_X(instance) (MkOBJ_R(instance).type)
2871 #define MqErrorCT_TT(typ) ( (struct MkSuperTypeS *) (typ) )
2873 #define MqErrorC_NS MQ
2875 #define MqErrorCTT MqErrorCTT
2877 #define MqErrorCT ( (struct MkSuperTypeS *) MqErrorCTT )
2878
2880
2881// TypeCheck --------------------------------------------------------------
2884
2885 #pragma GCC diagnostic push
2886 #pragma GCC diagnostic ignored "-Wattributes"
2887
2890 __parser__(class=MqErrorC,static,ignore)
2893 return MkSanitizeCheck(MqErrorC,mng);
2894 }
2895
2898 __parser__(class=MqErrorC,static,ignore)
2901 return MkSanitizeCheckO(MqErrorC,obj);
2902 }
2903
2904 #pragma GCC diagnostic pop
2905 #define MqErrorC_Check(mng) MqErrCheck(mng)
2906
2908
2909// RunTimeCast --------------------------------------------------------------
2912
2914 __parser__(class=MqErrorC,ignore,static)
2915 META_ATTRIBUTE_SANITIZE
2918 return (MqErrCheck(mng) ? (MQ_ERR)mng : NULL);
2919 }
2920
2922 __parser__(class=MqErrorC,ignore,static)
2923 META_ATTRIBUTE_SANITIZE
2926 return (MqErrCheck(mng) ? (MQ_ERRN)mng : NULL);
2927 }
2928
2930 #define MqErrRaise(_err) if (!_MkCheckX(MqErrorC,_err)) { \
2931 MkErrorSetC_1E("'MqErrorC' hdl is NULL"); \
2932 goto error ; \
2933 }
2934
2936 #define MqERR_R(x) (*(x)).super.err
2938 #define MqERR(x) (&MqERR_R(x))
2939
2941
2944// MqErrorC_Class_Define_C_API
2945
2946// END-MqErrorS-Definition - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
2947
2950#define MqERROR_R(r) ((*r).error_mq)
2951#define MqERROR_RT MqERROR_R(&MQ_RT_REF)
2952#define MqERROR_O(o) MqERROR_R(MqRT_O(o))
2953#define MqERROR_X(x) MqERROR_R(MqRT_X(x))
2954#define MqERROR_XN(x) MqERROR_R(MqRT_XN(x))
2955#define MqERROR MqERROR_R(&MqRuntimeRLS)
2957
2958
2964__parser__(ignore)
2965MQ_EXTERN void MK_DECL MqErrorEnvReset (
2966 MQ_ERR const err
2968
2970// MqErrorC_C_API
2971
2972/* ####################################################################### */
2973/* ### ### */
2974/* ### F A C T O R Y - A P I ### */
2975/* ### ### */
2976/* ####################################################################### */
2977
3035
3036#define MqFactoryPanic(fct) if (fct == NULL) MkPanicC(MK_ERROR_PANIC, __func__, -1, "MqFactoryS exception");
3037
3046typedef enum MkErrorE ( MK_DECL
3047 *MqFactoryCTorF
3048) (
3050 MQ_CTX const tmpl,
3051 enum MqFactoryE create,
3052 MQ_FCT const fct,
3053 MQ_CTX * ctx_out
3054);
3055
3057#define MQ_CALLBACK_FACTORY_CTOR_ARGS \
3058 MQ_RT_ARGS \
3059 MQ_CTX const tmpl, \
3060 enum MqFactoryE create, \
3061 struct MqFactoryS * const fct, \
3062 MQ_CTX *contextP \
3063
3064#define MQ_CALLBACK_FACTORY_CTOR_CALL MQ_RT_CALL tmpl, create, fct, contextP
3065
3079typedef void ( MK_DECL
3080 *MqFactoryDTorF
3081) (
3083 MQ_CTX ctx,
3084 bool doFactoryCleanup,
3085 MQ_FCT const fct
3086) ;
3087
3089typedef void ( MK_DECL
3090 *MqFactoryDataFreeF
3091) (
3093 MK_PTR *dataP __parser__(inout)
3094) ;
3095
3097typedef void ( MK_DECL
3098 *MqFactoryDataCopyF
3099) (
3101 MK_PTR *dataP __parser__(inout)
3102) ;
3103
3105__parser__(ignore)
3112
3114__parser__(ignore)
3121
3126 // BEGIN-MqFactoryS-super - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
3127
3128 union {
3129 struct MkObjectS obj; // instance-base MkObjectS
3130 } super;
3131
3132 // END-MqFactoryS-super - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
3133
3134 // instance attributes
3137 #define MqFactoryS_originalIdent_size 63
3140 struct MqFactoryCTorS fct_ctor;
3141 struct MqFactoryDTorS fct_dtor;
3142};
3143
3144// BEGIN-MqFactoryS-Definition - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
3145
3149 __parser__push__(prefix=Class, doc-group=Define, doc-index=Class);
3150
3151// Signature --------------------------------------------------------------
3154
3155 #define MqFactoryC_SIGNATURE (MkObjectC_SIGNATURE ^ (13u<<10))
3156 #define MqFactoryC_MASK (((1u<<22)-1)<<10)
3157
3159
3160// CompileTimeCast --------------------------------------------------------------
3163
3164 #define MqFactoryC_X2fct(x) (x)
3165 #define MqFactoryC_X2obj(x) MkOBJ(x)
3166
3168
3169// TypeDef --------------------------------------------------------------
3172
3174 __parser__(ignore) typedef struct MqFactoryS MqFactoryCR;
3176 __parser__(ignore) typedef const struct MqFactoryS MqFactoryCNR;
3178 #define MqFactoryC_T (&MQ_RT_REF._MqFactoryC_T)
3180 #define MqFactoryC_TT (MkTYP(MqFactoryC_T))
3182 #define MqFactoryST MqFactoryC_T
3184 #define MqFactorySTT (MkTYP(MqFactoryST))
3186 #define MqFactoryC_type MQ_FCT
3188 #define MqFactoryCT_X(instance) ( (struct MkSuperTypeS *) (MkOBJ_R(instance).type) )
3190 #define MqFactoryCTT_X(instance) (MkOBJ_R(instance).type)
3192 #define MqFactoryCT_TT(typ) ( (struct MkSuperTypeS *) (typ) )
3194 #define MqFactoryC_NS MQ
3196 #define MqFactoryCTT MqFactoryCTT
3198 #define MqFactoryCT ( (struct MkSuperTypeS *) MqFactoryCTT )
3199
3201
3202// TypeCheck --------------------------------------------------------------
3205
3206 #pragma GCC diagnostic push
3207 #pragma GCC diagnostic ignored "-Wattributes"
3208
3211 __parser__(class=MqFactoryC,static,hide)
3214 return MkSanitizeCheck(MqFactoryC,mng);
3215 }
3216
3219 __parser__(class=MqFactoryC,static,hide)
3222 return MkSanitizeCheckO(MqFactoryC,obj);
3223 }
3224
3225 #pragma GCC diagnostic pop
3226 #define MqFactoryC_Check(mng) MqFctCheck(mng)
3227
3229
3230// RunTimeCast --------------------------------------------------------------
3233
3235 __parser__(class=MqFactoryC,hide,static)
3236 META_ATTRIBUTE_SANITIZE
3239 return (MqFctCheck(mng) ? (MQ_FCT)mng : NULL);
3240 }
3241
3243 __parser__(class=MqFactoryC,hide,static)
3244 META_ATTRIBUTE_SANITIZE
3247 return (MqFctCheck(mng) ? (MQ_FCTN)mng : NULL);
3248 }
3249
3251 #define MqFctRaise(_fct) if (!_MkCheckX(MqFactoryC,_fct)) { \
3252 MkErrorSetC_1E("'MqFactoryC' hdl is NULL"); \
3253 goto error ; \
3254 }
3255
3257 #define MqFCT_R(x) (*(x)).super.fct
3259 #define MqFCT(x) (&MqFCT_R(x))
3260
3262
3265// MqFactoryC_Class_Define_C_API
3266
3267// END-MqFactoryS-Definition - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
3268
3269// =========================================================================
3270// BEGIN-MqFactoryS-Export - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
3271
3274
3277
3278__parser__push__(doc-group=_ignore_,doc-index=Class,doc-name=Export,class=MqFactoryC);
3279
3295__parser__(class-overload=MkObjectHandleGet)
3299 MQ_FCT const fct __parser__(null-allowed)
3300) {
3301 return MkObjectHandleGet(fct?MkOBJ(fct):NULL);
3302}
3303
3312__parser__(flags=new)
3314mk_inline MQ_FCT MqFactoryHandleResolve_RT (
3316 MK_HDL const netHdl
3317) {
3318 return MqFct(MkObjectHandleResolve(netHdl));
3319}
3320
3330#define MqFactoryHandleResolve_e(netHdl) ({ \
3331 MK_HDL tmpHdl=netHdl; \
3332 MQ_FCT tmp; \
3333 if (tmpHdl==0) { \
3334 tmp=NULL; \
3335 } else { \
3336 tmp=MqFactoryHandleResolve(tmpHdl); \
3337 if (tmp==NULL) { \
3338 MkErrorSetC_1_NULL("ERROR: 'MqFactoryC' handle is 'NULL'"); \
3339 goto error; \
3340 }; \
3341 }; \
3342 tmp; \
3343})
3344
3346
3348// Class export & import
3349
3353 __parser__(flags=new,doc-group=_ignore_,doc-index=Class,doc-name=Misc,class=MqFactoryC,null-return-allow)
3356 return (MQ_FCT)MK_NULL;
3357 }
3359// MqFactoryC - Misc - function
3360
3362// MqFactoryC_Class_C_API
3363
3364// END-MqFactoryS-Export - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
3365
3366// #######################################################################
3367// -----------------------------------------------------------------------
3372
3373__parser__push__(doc-group=Get);
3374
3376__parser__(hide)
3377MQ_EXTERN MK_PTR MK_DECL MqFactoryItemGetCreateData (
3378 MQ_FCTN const fct
3380
3382__parser__(internal)
3383MQ_EXTERN MK_PTR MK_DECL MqFactoryItemGetDeleteData (
3384 MQ_FCTN const fct
3386
3389MQ_EXTERN MK_STRN MK_DECL MqFactoryGetOriginalIdent (
3390 MQ_FCTN const fct
3392
3406 MK_STRN const ident __parser__(default=S#"")
3408
3420 MK_STRN const ident __parser__(default=S#"")
3422
3436// [MqFactoryGetCalledL_RT]
3437__parser__(no-type-extension,overload=MqFactoryGetCalled)
3438MQ_EXTERN MQ_FCT MK_DECL MqFactoryGetCalledL_RT (
3440 MK_BFLN largs __parser__(argument)
3442// [MqFactoryGetCalledL_RT]
3443
3445
3447// MqFactoryC_Get_C_API
3448
3449// #######################################################################
3450// -----------------------------------------------------------------------
3455
3456__parser__push__(doc-group=TOR);
3457
3465__parser__(hide)
3466MQ_EXTERN void MK_DECL MqFactoryFree_RT (
3468 MQ_FCT const fct
3470
3473
3486__parser__(destructor)
3487MQ_EXTERN void MK_DECL MqFactoryDelete_RT (
3489 MQ_FCT fct
3491
3493
3522__parser__(constructor,lng-constr,no-rpc,overload-c-no)
3523MQ_EXTERN MQ_FCT MK_DECL MqFactoryAdd_RT (
3525 MK_OBJN const error __parser__(internal,default=NULL), //C# reguire non "ERROR" name
3526// constructor
3527 MqFactoryCTorF const createCallF __parser__(internal,default=FactoryObjCreate),
3528 MK_CCP const constructor __parser__(constructor),
3529 MqFactoryDataFreeF const createDataFreeF __parser__(internal,default=FactoryFree),
3530 MqFactoryDataCopyF const createDataCopyF __parser__(internal,default=FactoryDup2),
3531// destructor
3532 MqFactoryDTorF const deleteCallF __parser__(internal,default=FactoryObjDelete),
3533 MK_CCP const destructor __parser__(internal,default=NULL),
3534 MqFactoryDataFreeF const deleteDataFreeF __parser__(internal,default=NULL),
3535 MqFactoryDataCopyF const deleteDataCopyF __parser__(internal,default=NULL),
3536
3537 MK_STRN const ident __parser__(default=F#CTOR#constructor)
3539
3540#define MqFactoryAdd_1(fct) MqFactoryAdd(MK_ERROR_PANIC,fct,NULL, NULL, NULL, NULL, NULL, NULL, NULL, #fct)
3541#define MqFactoryAdd_2(fct,ident) MqFactoryAdd(MK_ERROR_PANIC,fct,NULL, NULL, NULL, NULL, NULL, NULL, NULL, ident)
3542
3554__parser__(constructor,internal)
3555MQ_EXTERN MQ_FCT MK_DECL MqFactoryTypeAdd_RT (
3557 MK_OBJN const error,
3558 MK_STRN const ident,
3559 MkSelfCreateF const fctCreate,
3560 MkSelfDeleteF const fctDelete,
3561 MkConstructorF const constructor,
3562 MkSelfDeleteF const selfDelete
3564
3566__parser__(constructor)
3567MQ_EXTERN MQ_FCT MK_DECL MqFactoryDup2_RT (
3569 MQ_FCTN const fct,
3570 MK_STRN const ident
3572
3574
3576// MqFactoryC_TOR_C_API
3577
3578// #######################################################################
3579// -----------------------------------------------------------------------
3584
3585__parser__push__(doc-group=Misc);
3586
3601MQ_EXTERN MQ_FCT MK_DECL MqFactoryDefault (
3602 MQ_FCT const fct
3604
3621MQ_EXTERN MQ_FCT MK_DECL MqFactoryInitial (
3622 MQ_FCT const fct
3624
3626MQ_EXTERN MK_STRN MK_DECL MqFactoryDefaultIdent (
3627 void
3629
3631MQ_EXTERN MK_STRN MK_DECL MqFactoryInitialIdent (
3632 void
3634
3654__parser__(class=MqFactoryC,flags=virtual)
3655MQ_EXTERN enum MkErrorE MK_DECL MqFactoryNew_RT (
3657 MQ_FCT const fct,
3658 MQ_CTX const tmpl __parser__(internal,default=NULL),
3659 MQ_CTX* const val_out
3661
3666MQ_EXTERN void MK_DECL MqFactoryLogAll_RT (
3668 MK_STRN const callfunc __parser__(default=F#FUNC)
3670
3673
3684__parser__(const,class-overload=MkObjectLog)
3685MQ_EXTERN void MK_DECL MqFactoryLog_RT (
3687 MQ_FCTN const fct ,
3689 MK_DBG const debug __parser__(default=0),
3690 MK_STRN const callfunc __parser__(default=F#FUNC),
3691 MK_I32 const lvl __parser__(default=0)
3693
3694#define MqFactoryLog_2M(fct,m) MqFactoryLog_2(fct,MkObj(m))
3695
3697
3699
3701// MqFactoryC_Misc_C_API
3702
3704// MqFactoryC_C_API
3705
3706// #######################################################################
3707// -----------------------------------------------------------------------
3712
3718__parser__(ignore)
3720 // BEGIN-MqCtxTypeS-super - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
3721
3722 union {
3723 struct MkObjectS obj; // instance-base MkObjectS
3724 struct MkTypeS typ; // instance-base MkTypeS
3725 } super;
3726
3727 // END-MqCtxTypeS-super - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
3728
3729 // instance attributes
3730
3739
3742
3745
3748
3753
3758
3761
3764
3767
3770
3773
3776
3781 struct MqLinkSetupS Child;
3782
3785 struct MqLinkSetupS Parent;
3786
3799 struct MqCallbackS Idle;
3800
3803
3806
3816
3819
3822
3831};
3832
3833// BEGIN-MqCtxTypeS-Definition - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
3834
3838 __parser__push__(prefix=Class, doc-group=Define, doc-index=Class);
3839
3840// Signature --------------------------------------------------------------
3843
3844 #define MqCtxTypeC_SIGNATURE (MkTypeC_SIGNATURE ^ (2u<<6))
3845 #define MqCtxTypeC_MASK (((1u<<26)-1)<<6)
3846
3848
3849// CompileTimeCast --------------------------------------------------------------
3852
3853 #define MqCtxTypeC_X2ctxtyp(x) (x)
3854 #define MqCtxTypeC_X2typ(x) MkTYP(x)
3855 #define MqCtxTypeC_X2obj(x) MkOBJ(x)
3856
3858
3859// TypeDef --------------------------------------------------------------
3862
3864 __parser__(ignore) typedef struct MqCtxTypeS MqCtxTypeCR;
3866 __parser__(ignore) typedef const struct MqCtxTypeS MqCtxTypeCNR;
3868 #define MqCtxTypeSTT (&MQ_RT_REF._MqCtxTypeC_TT)
3870 #define MqCtxTypeC_TT (&MQ_RT_REF._MqCtxTypeC_TT)
3872 #define MqCtxTypeC_type MQ_CTXTYP
3874 #define MqCtxTypeCT_X(instance) ( (struct MkTypeS *) (MkOBJ_R(instance).type) )
3876 #define MqCtxTypeCTT_X(instance) (MkOBJ_R(instance).type)
3878 #define MqCtxTypeCT_TT(typ) ( (struct MkTypeS *) (typ) )
3880 #define MqCtxTypeC_NS MQ
3882 #define MqCtxTypeCTT MqCtxTypeCTT
3884 #define MqCtxTypeCT ( (struct MkTypeS *) MqCtxTypeCTT )
3885
3887
3888// TypeCheck --------------------------------------------------------------
3891
3892 #pragma GCC diagnostic push
3893 #pragma GCC diagnostic ignored "-Wattributes"
3894
3897 __parser__(class=MqCtxTypeC,static,ignore)
3900 return MkSanitizeCheck(MqCtxTypeC,mng);
3901 }
3902
3905 __parser__(class=MqCtxTypeC,static,ignore)
3908 return MkSanitizeCheckO(MqCtxTypeC,obj);
3909 }
3910
3911 #pragma GCC diagnostic pop
3912 #define MqCtxTypeC_Check(mng) MqCtxTypCheck(mng)
3913
3915
3918// MqCtxTypeC_Class_Define_C_API
3919
3920// END-MqCtxTypeS-Definition - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
3921
3923__parser__(class=MqContextC,internal,static)
3924mk_inline MQ_CTXT MqCtxTyp(MK_MNG mng) {
3925 if (!MkObjCheck(mng)) return NULL;
3926 MK_OBJ obj = (MK_OBJ) mng;
3927 if (MqCtxTypCheck(obj)) return (MQ_CTXT)obj;
3928 MQ_CTXT typ = (MQ_CTXT) obj->type;
3929 if (MqCtxTypCheck(typ)) return typ;
3930 return NULL;
3931}
3932
3943__parser__(ignore,const,class-overload=MkObjectLog)
3944MQ_EXTERN void MK_DECL MqCtxTypeLog_RT (
3946 MQ_CTXT const ctxtype ,
3948 MK_DBG const debug __parser__(default=0),
3949 MK_STRN const callfunc __parser__(default=F#FUNC),
3950 MK_I32 const lvl __parser__(default=0)
3952
3954// MqCtxTypeC_C_API
3955
3956/* ####################################################################### */
3957/* ### ### */
3958/* ### C O N T E X T - A P I ### */
3959/* ### ### */
3960/* ####################################################################### */
3961
4043
4044// ===================================================================================================
4045
4047#if defined(MQ_C_BUILD_DLL)
4048
4049 #define META_SECTION_DEFINE
4050 #include "MqContextS_mq.h"
4051 #undef META_SECTION_DEFINE
4052
4053#else // MQ_C_BUILD_DLL
4054
4056 // BEGIN-MqContextS-super - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
4057
4058 union {
4059 struct MkObjectS obj; // instance-base MkObjectS
4060 } super;
4061
4062 // END-MqContextS-super - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
4063
4064 // instance attributes
4065 const
4066 struct MqConfigS config;
4067 struct MqSetupS setup;
4068 struct MkBuffer64S ctxbuf;
4070 struct MqLinkS link;
4071
4072 // offset calculated by "Nhi1InternalSize"
4073 MK_BINB private_variables[16];
4074};
4075
4076#endif // MQ_C_BUILD_DLL
4077
4078// BEGIN-MqContextS-Definition - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
4079
4083 __parser__push__(prefix=Class, doc-group=Define, doc-index=Class);
4084
4085// Signature --------------------------------------------------------------
4088
4089 #define MqContextC_SIGNATURE (MkObjectC_SIGNATURE ^ (11u<<10))
4090 #define MqContextC_MASK (((1u<<22)-1)<<10)
4091
4093
4094// CompileTimeCast --------------------------------------------------------------
4097
4098 #define MqContextC_X2ctx(x) (x)
4099 #define MqContextC_X2obj(x) MkOBJ(x)
4100
4102
4103// TypeDef --------------------------------------------------------------
4106
4108 __parser__(ignore) typedef struct MqContextS MqContextCR;
4110 __parser__(ignore) typedef const struct MqContextS MqContextCNR;
4112 #define MqContextC_T (&MQ_RT_REF._MqContextC_T)
4114 #define MqContextC_TT (MkTYP(MqContextC_T))
4116 #define MqContextST MqContextC_T
4118 #define MqContextSTT (MkTYP(MqContextST))
4120 #define MqContextC_type MQ_CTX
4122 #define MqContextCT_X(instance) ( (struct MqCtxTypeS *) (MkOBJ_R(instance).type) )
4124 #define MqContextCTT_X(instance) (MkOBJ_R(instance).type)
4126 #define MqContextCT_TT(typ) ( (struct MqCtxTypeS *) (typ) )
4128 #define MqContextC_NS MQ
4130 #define MqContextCTT MqContextCTT
4132 #define MqContextCT ( (struct MqCtxTypeS *) MqContextCTT )
4133
4135
4136// TypeCheck --------------------------------------------------------------
4139
4140 #pragma GCC diagnostic push
4141 #pragma GCC diagnostic ignored "-Wattributes"
4142
4145 __parser__(class=MqContextC,static,hide)
4148 return MkSanitizeCheck(MqContextC,mng);
4149 }
4150
4153 __parser__(class=MqContextC,static,hide)
4156 return MkSanitizeCheckO(MqContextC,obj);
4157 }
4158
4159 #pragma GCC diagnostic pop
4160 #define MqContextC_Check(mng) MqCtxCheck(mng)
4161
4163
4164// RunTimeCast --------------------------------------------------------------
4167
4169 __parser__(class=MqContextC,hide,static)
4170 META_ATTRIBUTE_SANITIZE
4173 return (MqCtxCheck(mng) ? (MQ_CTX)mng : NULL);
4174 }
4175
4177 __parser__(class=MqContextC,hide,static)
4178 META_ATTRIBUTE_SANITIZE
4181 return (MqCtxCheck(mng) ? (MQ_CTXN)mng : NULL);
4182 }
4183
4185 #define MqCtxRaise(_ctx) if (!_MkCheckX(MqContextC,_ctx)) { \
4186 MkErrorSetC_1E("'MqContextC' hdl is NULL"); \
4187 goto error ; \
4188 }
4189
4191 #define MqCTX_R(x) (*(x)).super.ctx
4193 #define MqCTX(x) (&MqCTX_R(x))
4194
4196
4199// MqContextC_Class_Define_C_API
4200
4201// END-MqContextS-Definition - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
4202
4203// =========================================================================
4204// BEGIN-MqContextS-Export - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
4205
4208
4211
4212__parser__push__(doc-group=_ignore_,doc-index=Class,doc-name=Export,class=MqContextC);
4213
4229__parser__(class-overload=MkObjectHandleGet)
4233 MQ_CTX const ctx __parser__(null-allowed)
4234) {
4235 return MkObjectHandleGet(ctx?MkOBJ(ctx):NULL);
4236}
4237
4246__parser__(flags=new)
4248mk_inline MQ_CTX MqContextHandleResolve_RT (
4250 MK_HDL const netHdl
4251) {
4252 return MqCtx(MkObjectHandleResolve(netHdl));
4253}
4254
4264#define MqContextHandleResolve_e(netHdl) ({ \
4265 MK_HDL tmpHdl=netHdl; \
4266 MQ_CTX tmp; \
4267 if (tmpHdl==0) { \
4268 tmp=NULL; \
4269 } else { \
4270 tmp=MqContextHandleResolve(tmpHdl); \
4271 if (tmp==NULL) { \
4272 MkErrorSetC_1_NULL("ERROR: 'MqContextC' handle is 'NULL'"); \
4273 goto error; \
4274 }; \
4275 }; \
4276 tmp; \
4277})
4278
4280
4282// Class export & import
4283
4287 __parser__(flags=new,doc-group=_ignore_,doc-index=Class,doc-name=Misc,class=MqContextC,null-return-allow)
4290 return (MQ_CTX)MK_NULL;
4291 }
4293// MqContextC - Misc - function
4294
4296// MqContextC_Class_C_API
4297
4298// END-MqContextS-Export - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
4299
4301// MqContextC_C_API
4302
4303// #######################################################################
4304// -----------------------------------------------------------------------
4309
4310__parser__push__(doc-group=TOR);
4311
4313__parser__(internal)
4314MQ_EXTERN void MK_DECL MqContextInit_RT (
4316 MQ_CTX const ctx,
4317 MK_TYP type,
4318 MQ_CTX const tmpl
4320
4327__parser__(internal)
4328MQ_EXTERN void MK_DECL MqContextFree_RT (
4330 MQ_CTX const ctx
4332
4351__parser__(constructor,lng-constr)
4352MQ_EXTERN MQ_CTX MK_DECL MqContextCreate_RT (
4354 MK_TYP type __parser__(internal,default=NULL),
4355 MQ_CTX const tmpl __parser__(default=NULL)
4357
4364__parser__(internal,constructor)
4365MQ_EXTERN MQ_CTX MK_DECL MqContextSetup_RT (
4367 MK_TYP type __parser__(internal,default=NULL),
4368 MQ_CTX const tmpl __parser__(default=NULL),
4369 MQ_CTX *ctx_out
4371
4374
4385__parser__(destructor)
4386MQ_EXTERN void MK_DECL MqContextDelete_RT (
4388 MQ_CTX ctx
4390
4392
4394
4396// MqContextC_TOR_C_API
4397
4398// #######################################################################
4399// -----------------------------------------------------------------------
4405
4406__parser__push__(doc-group=Error,doc-index=ErrorApi);
4407
4428__parser__(error-ignore,no-static)
4429MQ_EXTERN enum MkErrorE MK_DECL MqContextErrorCopy_RT (
4431 MQ_CTXN const targetCtx ,
4432 MQ_CTXN const sourceCtx
4434
4449__parser__(error-ignore,no-static)
4450MQ_EXTERN enum MkErrorE MK_DECL MqContextErrorMove_RT (
4452 MQ_CTXN const targetCtx ,
4453 MQ_CTXN const sourceCtx
4455
4459mk_inline MK_ERR MqContextErrorFORMAT (
4460 MQ_CTXN const fmtobj __parser__(default=NULL)
4461) {
4462 return MkErrorFORMAT(MkOBJ(fmtobj));
4463}
4464
4466
4468// MqContextC_ErrorApi_Error_C_API
4469
4470
4471// #######################################################################
4472// -----------------------------------------------------------------------
4477
4478__parser__push__(doc-group=Misc,doc-index=MiscApi);
4479
4483 return ctx ? (MQ_IS_SLAVE(ctx) ? MqGetRoot(ctx->config.master) : MQ_GET_PARENT(ctx)) : NULL;
4484}
4485
4487__parser__(ignore)
4490 return ctx ? (MQ_IS_SLAVE(ctx) ? MqGetRoot(ctx->config.master) : MQ_GET_PARENT(ctx)) : NULL;
4491}
4492
4539 MQ_CTX const ctx,
4540 MK_STRN const callfunc __parser__(default=F#FUNC),
4541 MK_STRN const callfile __parser__(default=F#FILE),
4542 MK_I32 const callline __parser__(default=F#LINE)
4544
4557__parser__(internal)
4558MQ_EXTERN void MK_DECL MqContextMark_RT (
4560 MQ_CTX const ctx
4562
4579__parser__(hide)
4580MQ_EXTERN enum MkErrorE MK_DECL MqCheckForLeftOverArguments_RT (
4582 MQ_CTX const ctx,
4583 MK_BFLN args
4585
4593MQ_EXTERN MK_BUF MqContextGetBuffer_RT (
4595 MQ_CTX const ctx
4597
4646
4647MQ_EXTERN enum MkErrorE MK_DECL MqProcessEvent_RT (
4649 MQ_CTX const ctx,
4650 enum MqWaitOnEventE const wait __parser__(default=MQ_WAIT_NO),
4651 MK_TIME_T timeout __parser__(default=MK_TIMEOUT_DEFAULT)
4653
4654// sync with: MkObjectToString
4655//
4666__parser__(class-overload=MkObjectToString)
4667MQ_EXTERN MK_STRN MK_DECL MqContextToString_RT (
4669 MQ_CTXN const ctx
4671
4672/*
4684__parser__(internal)
4685MQ_EXTERN bool MK_DECL MqContextCheckLock (
4686 MQ_CTX ctx
4687) MK_ATTR_INSTANCE ;
4688*/
4689
4691
4693// MqContextC_MiscApi_Misc_C_API
4694
4695// #######################################################################
4696// -----------------------------------------------------------------------
4722
4723__parser__push__(doc-group=Env,doc-index=EnvApi);
4724
4728MQ_EXTERN void MK_DECL MqEnvProtect_RT (
4730 MQ_CTX ctx
4732
4735MQ_EXTERN void MK_DECL MqEnvRestore (
4736 MQ_CTX ctx
4738
4741
4753__parser__(const,ignore,class-overload=MkObjectLog)
4754MQ_EXTERN void MK_DECL MqEnvLog_RT (
4756 MQ_ENVN const env ,
4758 MK_DBG const debug __parser__(default=0),
4759 MK_STRN const callfunc __parser__(default=F#FUNC),
4760 MK_I32 const lvl __parser__(default=0),
4761 MK_STRN const label __parser__(default=S#"ENV")
4763
4764#define MqEnvLog_0() MqEnvLog(&(META_CONTEXT_S)->link.protect,META_CONTEXT_S,NULL,0,__func__,0,"ENV")
4765#define MqEnvLog_1(env) MqEnvLog(env,NULL,NULL,0,__func__,0,"ENV")
4766#define MqEnvLog_2(env,fmt) MqEnvLog(env,fmt,NULL,0,__func__,0,"ENV")
4767#define MqEnvLog_3(env,fmt,lbl) MqEnvLog(env,fmt,lbl,0,__func__,0,"ENV")
4768
4770
4772
4774// MqContextC_EnvApi_Env_C_API
4775
4776// #######################################################################
4777// -----------------------------------------------------------------------
4854
4876
4877__parser__push__(doc-group=Storage,doc-index=StorageApi);
4878
4888 MQ_CTX const ctx,
4889 MQ_LTR transLId,
4890 MK_I32 *cnt_out
4892
4907 MQ_CTX const ctx,
4908 MK_STRN const storageFile
4910
4921 MQ_CTX const ctx
4923
4937 MQ_CTX const ctx,
4938 MQ_LTR *ltid_out
4940
4978 MQ_CTX const ctx,
4979 MQ_LTR *transLIdP_inout __parser__(default=0)
4981
4989MQ_EXTERN enum MkErrorE MK_DECL MqStorageIncrRef_RT (
4991 MQ_CTX const ctx,
4992 MQ_LTR transLId
4994
5002MQ_EXTERN enum MkErrorE MK_DECL MqStorageDecrRef_RT (
5004 MQ_CTX const ctx,
5005 MQ_LTR transLId
5007
5020MQ_EXTERN enum MkErrorE MK_DECL MqStorageDelete_RT (
5022 MQ_CTX const ctx,
5023 MQ_LTR *transLIdP_inout __parser__(default=0)
5025
5032MQ_EXTERN enum MkErrorE MK_DECL MqStorageCount_RT (
5034 MQ_CTX const ctx,
5035 MQ_LTR *cnt_out
5037
5040
5042MQ_EXTERN enum MkErrorE MK_DECL MqStorageLog_RT (
5044 MQ_CTX const ctx,
5045 MK_STRN const callfunc __parser__(default=F#FUNC)
5047
5048#define MqStorageLog_1(ctx) MqStorageLog(ctx,__func__)
5049
5051
5058__parser__(no-rpc)
5059MQ_EXTERN enum MkErrorE MK_DECL MqStorageResolve_RT (
5061 MQ_CTX const ctx,
5062 MQ_CTX *otherCtxP_out,
5063 MQ_LTR *otherLIdP_out
5065
5067
5069// MqContextC_StorageApi_Storage_C_API
5070
5071// #######################################################################
5072// -----------------------------------------------------------------------
5155__parser__push__(doc-group=Link,doc-index=LinkApi);
5156
5194MQ_EXTERN enum MkErrorE MK_DECL MqLinkCreate_RT (
5196 MQ_CTX const ctx,
5197 MK_BAC args __parser__(default=NULL)
5199
5210MQ_EXTERN enum MkErrorE MK_DECL MqLinkConnect_RT (
5212 MQ_CTX const ctx
5214
5227MQ_EXTERN enum MkErrorE MK_DECL MqLinkShutdown_RT (
5229 MQ_CTX const ctx
5231
5248MQ_EXTERN enum MkErrorE MK_DECL MqLinkCreateChild_RT (
5250 MQ_CTX const ctx,
5251 MQ_CTX const parent,
5252 MK_BAC const args __parser__(default=NULL)
5254
5270__parser__(hide,overload-c-no)
5271MQ_EXTERN enum MkErrorE MK_DECL MqLinkDefault_RT (
5273 MQ_CTX const ctx,
5274 MK_BAC const args __parser__(default=NULL)
5276
5286MQ_EXTERN void MK_DECL MqLinkDelete_RT (
5288 MQ_CTX const ctx
5290
5300MQ_EXTERN bool MK_DECL MqLinkIsConnected (
5301 MQ_CTX const ctx
5303
5309mk_inline MQ_CTX MqLinkGetParent ( MQ_CTX const ctx) {
5310 // BUF FIX: result always a context id "ctx" is valid
5311 // test: Nhi1Exec lcconfig.test --block-2 --fast-testing --lang-tcl -verbose e
5312 // -match lcconfig-2-5-* --num "1 3 1" --com-uds
5313 // RPC send "object-delete-message" on server-parent-context which can be
5314 // a client-child. The MqLinkGetParent is used to resolve this
5315 // file: LibLcConfigRpcClient.tcl
5316 return ctx ? MQ_GET_PARENT(ctx) : NULL;
5317}
5318
5327 return ctx ? MQ_IS_PARENT(ctx) : false;
5328}
5329
5341 return ctx ? ctx->link.ctxId : 0;
5342}
5343
5353 return ctx && ctx->link.ctxIdP ? ctx->link.ctxIdP->link.targetIdent : "";
5354}
5355
5357
5359// MqContextC_LinkApi_Link_C_API
5360
5361
5362// #######################################################################
5363// -----------------------------------------------------------------------
5557
5558__parser__push__(doc-group=Route,doc-index=RouteApi);
5559
5572 MQ_CTX ctx,
5573 MK_STRN route,
5574 MK_STRN service,
5575 bool overwrite __parser__(default=false)
5577
5581MQ_EXTERN enum MkErrorE MK_DECL MqRouteDelete_RT (
5583 MQ_CTX ctx,
5584 MK_STRN route,
5585 MK_STRN service,
5586 bool overwrite __parser__(default=false)
5588
5615MQ_EXTERN enum MkErrorE MK_DECL MqRouteTraverse_RT (
5617 MQ_CTX ctx,
5618 MK_STRN service,
5619 MK_BAC args __parser__(default=NULL)
5621
5626#define MQ_ROUTE_CTX_MAX 50
5627
5657
5660 MQ_CTX const ctx,
5661 MK_STRN const ident,
5662 MK_NUM const retnum __parser__(default=-1)
5664
5678MQ_EXTERN enum MkErrorE MK_DECL MqRouteGetPath_RT (
5680 MQ_CTX const ctx,
5681 MK_STRN * path_out
5683
5743MQ_EXTERN enum MkErrorE MK_DECL MqRouteGetTree_RT (
5745 MQ_CTX const ctx,
5746 MK_BFL *treeP_out
5748
5750
5752// MqContextC_RouteApi_Route_C_API
5753
5754
5755// #######################################################################
5756// -----------------------------------------------------------------------
5816
5817__parser__push__(doc-group=Service,doc-index=ServiceApi);
5818
5852__parser__(type=ME_PSN_MQ_TOKEN:"token identifer")
5854
5856#define MQ_TOK_SIZE (8+1)
5857
5858// [MqServiceCallbackF]
5870// [MqServiceCallbackF]
5871
5881 MQ_CTX const ctx
5882) {
5883 MK_INSTANCE_HDL(ctx);
5884 return (ctx->link.protect.transSId != 0);
5885}
5886
5895 MQ_CTX const ctx
5897
5906 MQ_CTX const ctx,
5907 MQ_TOK const token
5909
5920 MQ_CTX const ctx,
5921 MQ_TOK const token
5923
5966__parser__(no-rpc,callback-name=Service)
5967MQ_EXTERN enum MkErrorE MK_DECL MqServiceCreate_RT (
5969 MQ_CTX const ctx,
5970 MQ_TOK const token,
5971 MqServiceCallbackF const fCall __parser__(callback-call),
5972 MK_CBP callback __parser__(callback-data),
5973 MqDataFreeF fFree __parser__(callback-free),
5974 MkMarkF fMark __parser__(internal,default=NULL)
5976
5977// \anchor \NS{StorageService}
5990MQ_EXTERN enum MkErrorE MK_DECL MqServiceStorage_RT (
5992 MQ_CTX const ctx,
5993 MQ_TOK const token
5995
6002MQ_EXTERN enum MkErrorE MK_DECL MqServiceDelete_RT (
6004 MQ_CTX const ctx,
6005 MQ_TOK const token
6007
6015
6029MQ_EXTERN enum MkErrorE MK_DECL MqServiceProxy_RT (
6031 MQ_CTX const ctx,
6032 MQ_TOK const token,
6033 MQ_SLAVE_ID const id __parser__(default=MQ_SLAVE_OTHER)
6035
6038MQ_EXTERN enum MkErrorE MK_DECL MqServiceProxyCtx_RT (
6040 MQ_CTX const ctx,
6041 MQ_TOK const token,
6042 MQ_CTX const target
6044
6063MQ_EXTERN enum MkErrorE MK_DECL MqServiceProxyRoundRobin_RT (
6065 MQ_CTX const ctx,
6066 MQ_TOK const token,
6067 MK_STRN const ident
6069
6074MQ_EXTERN bool MK_DECL MqServiceProxyCtxExists (
6075 MQ_CTX const ctx,
6076 MQ_TOK const token,
6077 MQ_CTX const target
6079
6081// MqServiceProxy
6082
6084
6086// MqContextC_ServiceApi_Service_C_API
6087
6088// #######################################################################
6089// -----------------------------------------------------------------------
6121// MqContextC_ReadApi_C_API
6122
6123// #######################################################################
6124// -----------------------------------------------------------------------
6129
6130__parser__push__(doc-group=Block,doc-index=ReadApi);
6131
6142MQ_EXTERN enum MkErrorE MK_DECL MqReadL_START_RT (
6144 MQ_CTX const ctx,
6145 MK_BUF buf __parser__(default=NULL)
6147
6153MQ_EXTERN enum MkErrorE MK_DECL MqReadL_END_RT (
6155 MQ_CTX const ctx
6157
6169MQ_EXTERN enum MkErrorE MK_DECL MqReadT_START_RT (
6171 MQ_CTX const ctx
6173
6179MQ_EXTERN enum MkErrorE MK_DECL MqReadT_END_RT (
6181 MQ_CTX const ctx
6183
6185
6187// MqContextC_ReadApi_Block_C_API
6188
6189// #######################################################################
6190// -----------------------------------------------------------------------
6195
6196__parser__push__(doc-group=Atom,doc-index=ReadApi);
6197
6203MQ_EXTERN enum MkErrorE MK_DECL MqReadI8_RT (
6205 MQ_CTX const ctx,
6206 MK_I8 * const val_out
6208
6211MQ_EXTERN enum MkErrorE MK_DECL MqReadBOL_RT (
6213 MQ_CTX const ctx,
6214 MK_BOL * const val_out
6216
6219MQ_EXTERN enum MkErrorE MK_DECL MqReadI16_RT (
6221 MQ_CTX const ctx,
6222 MK_I16 * const val_out
6224
6227MQ_EXTERN enum MkErrorE MK_DECL MqReadI32_RT (
6229 MQ_CTX const ctx,
6230 MK_I32 * const val_out
6232
6235MQ_EXTERN enum MkErrorE MK_DECL MqReadFLT_RT (
6237 MQ_CTX const ctx,
6238 MK_FLT * const val_out
6240
6243MQ_EXTERN enum MkErrorE MK_DECL MqReadI64_RT (
6245 MQ_CTX const ctx,
6246 MK_I64 * const val_out
6248
6251MQ_EXTERN enum MkErrorE MK_DECL MqReadDBL_RT (
6253 MQ_CTX const ctx,
6254 MK_DBL * const val_out
6256
6279MQ_EXTERN enum MkErrorE MK_DECL MqReadBUF_RT (
6281 MQ_CTX const ctx,
6282 MK_BUF* const val_out
6284
6300MQ_EXTERN enum MkErrorE MK_DECL MqReadBFL_RT (
6302 MQ_CTX const ctx,
6303 MK_BFL* const val_out
6305
6316MQ_EXTERN enum MkErrorE MK_DECL MqReadALL_RT (
6318 MQ_CTX const ctx,
6319 MK_BFL* const val_inout
6321
6336__parser__(template-required,no-rpc,keep,no-static)
6337MQ_EXTERN enum MkErrorE MK_DECL MqReadLIST_RT (
6339 MQ_CTX const ctx,
6340 MK_NAT_LIST* const val_out
6342
6351__parser__(template-required,no-rpc,keep,no-static)
6352MQ_EXTERN enum MkErrorE MK_DECL MqReadNEXT_RT (
6354 MQ_CTX const ctx,
6355 MK_NAT_OBJECT* const val_out
6357
6368MQ_EXTERN enum MkErrorE MK_DECL MqReadLONG_RT (
6370 MQ_CTX const ctx,
6371 MK_LONG* const val_out
6373
6384MQ_EXTERN enum MkErrorE MK_DECL MqReadHDL_RT (
6386 MQ_CTX const ctx,
6387 MK_HDL* const val_out
6389
6404MQ_EXTERN enum MkErrorE MK_DECL MqReadSTR_RT (
6406 MQ_CTX const ctx,
6407 MK_STRN * const val_out
6409
6426MQ_EXTERN enum MkErrorE MK_DECL MqReadBIN_RT (
6428 MQ_CTX const ctx,
6429 MkBinaryR * const val_out
6431
6440MQ_EXTERN enum MkErrorE MK_DECL MqReadStringR_RT (
6442 MQ_CTX const ctx,
6443 MkStringR * const val_out
6445
6454MQ_EXTERN enum MkErrorE MK_DECL MqReadBinaryR_RT (
6456 MQ_CTX const ctx,
6457 MkBinaryR * const val_out
6459
6461
6463// MqContextC_ReadApi_Atom_C_API
6464
6465// #######################################################################
6466// -----------------------------------------------------------------------
6471
6472__parser__push__(doc-group=Misc,doc-index=ReadApi);
6473
6474__parser__(doc-no)
6475MQ_EXTERN void MK_DECL MqReadDbg_RT (
6477 MQ_CTX const ctx
6479
6488MQ_EXTERN enum MkErrorE MK_DECL MqReadUndo_RT (
6490 MQ_CTX const ctx
6492
6497MQ_EXTERN MK_NUM MK_DECL MqReadGetNumItems (
6498 MQ_CTX const ctx
6500
6505MQ_EXTERN enum MkTypeE MK_DECL MqReadGetNextType (
6506 MQ_CTX const ctx
6508
6513MQ_EXTERN bool MK_DECL MqReadItemExists (
6514 MQ_CTX const ctx
6516
6521__parser__(internal)
6522MQ_EXTERN enum MqTransTypeE MK_DECL MqReadGetTransType (
6523 MQ_CTX const ctx
6525
6530__parser__(internal)
6531MQ_EXTERN enum MqHandShakeE MK_DECL MqReadGetHandShake (
6532 MQ_CTX const ctx
6534
6536
6538// MqContextC_ReadApi_Misc_C_API
6539
6540// #######################################################################
6541// -----------------------------------------------------------------------
6571
6572__parser__push__(doc-group=Proxy,doc-index=ProxyApi);
6573
6584MQ_EXTERN enum MkErrorE MK_DECL MqProxyItem_RT (
6586 MQ_CTX const sourceCtx,
6587 MQ_CTX const targetCtx
6589
6619__parser__(internal)
6620MQ_EXTERN enum MkErrorE MK_DECL MqProxyPackage_RT (
6622 MQ_CTX const sourceCtx,
6623 MQ_CTX const targetCtx,
6624 MQ_DMP const dump __parser__(default=NULL)
6626
6653MQ_EXTERN enum MkErrorE MK_DECL MqProxyForward_RT (
6655 MQ_CTX const sourceCtx,
6656 MQ_CTX const targetCtx,
6657 MQ_DMP const dump __parser__(default=NULL),
6658 MK_TIME_T const timeout __parser__(default=MK_TIMEOUT_DEFAULT)
6660
6662
6664// MqContextC_ProxyApi_Proxy_C_API
6665
6666// #######################################################################
6667// -----------------------------------------------------------------------
6798
6803__parser__(internal,doc-no,doc-group=Atom,doc-index=SendApi)
6804MQ_EXTERN enum MkErrorE MK_DECL MqSendSetHandShake (
6805 MQ_CTX const ctx,
6806 enum MqHandShakeE handShake
6808
6810// MqContextC_SendApi_C_API
6811
6812// #######################################################################
6813// -----------------------------------------------------------------------
6823
6824__parser__push__(doc-group=Atom,doc-index=SendApi);
6825
6832MQ_EXTERN enum MkErrorE MK_DECL MqSendI8_RT (
6834 MQ_CTX const ctx,
6835 MK_I8 const val
6837
6839MQ_EXTERN enum MkErrorE MK_DECL MqSendBOL_RT (
6841 MQ_CTX const ctx,
6842 MK_BOL const val
6844
6846MQ_EXTERN enum MkErrorE MK_DECL MqSendI16_RT (
6848 MQ_CTX const ctx,
6849 MK_I16 const val
6851
6853MQ_EXTERN enum MkErrorE MK_DECL MqSendI32_RT (
6855 MQ_CTX const ctx,
6856 MK_I32 const val
6858
6860MQ_EXTERN enum MkErrorE MK_DECL MqSendFLT_RT (
6862 MQ_CTX const ctx,
6863 MK_FLT const val
6865
6867MQ_EXTERN enum MkErrorE MK_DECL MqSendI64_RT (
6869 MQ_CTX const ctx,
6870 MK_I64 const val
6872
6874MQ_EXTERN enum MkErrorE MK_DECL MqSendDBL_RT (
6876 MQ_CTX const ctx,
6877 MK_DBL const val
6879
6880// \param[in] len the string leagth of \arg{val} or \arg{-1} to calculate with \c strlen
6886MQ_EXTERN enum MkErrorE MK_DECL MqSendSTR_RT (
6888 MQ_CTX const ctx,
6889 MK_STRN const val
6891
6897MQ_EXTERN enum MkErrorE MK_DECL MqSendStringR_RT (
6899 MQ_CTX const ctx,
6900 MkStringR const val
6902
6911MQ_EXTERN enum MkErrorE MK_DECL MqSendBIN_RT (
6913 MQ_CTX const ctx,
6914 MkBinaryR const val
6916
6926mk_inline enum MkErrorE MqSendBinaryR_RT (
6928 MQ_CTX const ctx,
6929 MkBinaryR const val
6930) {
6931 return MqSendBIN_RT(MK_RT_CALL ctx, val);
6932}
6933
6940 MQ_CTX const ctx,
6941 MK_BUFN const val
6943
6959 MQ_CTX const ctx,
6960 MK_BFLN const val
6962
6973 MQ_CTX const ctx,
6974 MK_BFLN const val
6976
6992 MQ_CTX const ctx,
6993 MK_BUSN const val
6995
7003 MQ_CTX const ctx,
7004 MK_FST const printfmt,
7005 ...
7007
7014MQ_EXTERN enum MkErrorE MK_DECL MqSendVL_RT (
7016 MQ_CTX const ctx,
7017 MK_FST const printfmt,
7018 va_list var_list
7020
7043__parser__(doc-no)
7044MQ_EXTERN enum MkErrorE MK_DECL MqSendLTR_RT (
7046 MQ_CTX const ctx,
7047 MQ_LTR const transLId
7049
7061MQ_EXTERN enum MkErrorE MK_DECL MqSendLONG_RT (
7063 MQ_CTX const ctx,
7064 MK_LONG const val
7066
7077MQ_EXTERN enum MkErrorE MK_DECL MqSendHDL_RT (
7079 MQ_CTX const ctx,
7080 MK_HDL const val
7082
7084
7086// MqContextC_SendApi_Atom_C_API
7087
7088// #######################################################################
7089// -----------------------------------------------------------------------
7094
7095__parser__push__(doc-group=Basics,doc-index=SendApi);
7096
7129MQ_EXTERN enum MkErrorE MK_DECL MqSendEND_RT (
7131 MQ_CTX const ctx,
7132 MQ_TOK const token,
7133 MK_TIME_T timeout __parser__(default=MK_TIMEOUT_DEFAULT)
7135
7160MQ_EXTERN enum MkErrorE MK_DECL MqSendSTART_RT (
7162 MQ_CTX const ctx
7164
7178MQ_EXTERN enum MkErrorE MK_DECL MqSendEND_AND_WAIT_RT (
7180 MQ_CTX const ctx,
7181 MQ_TOK const token,
7182 MK_TIME_T timeout __parser__(default=MK_TIMEOUT_DEFAULT)
7184
7246
7247__parser__(no-rpc)
7248MQ_EXTERN enum MkErrorE MK_DECL MqSendEND_AND_TRANSACTION_RT (
7250 MQ_CTX const ctx,
7251 MQ_TOK const token,
7252 MQ_TOK const callback,
7253 MK_TIME_T timeout __parser__(default=MK_TIMEOUT_DEFAULT)
7255
7278__parser__(no-rpc,callback-name=Service)
7279MQ_EXTERN enum MkErrorE MK_DECL MqSendEND_AND_SUB_RT (
7281 MQ_CTX const ctx,
7282 MQ_TOK const token,
7283 MqServiceCallbackF const fCall __parser__(callback-call),
7284 MK_CBP callback __parser__(callback-data),
7285 MqDataFreeF fFree __parser__(callback-free),
7286 MK_TIME_T timeout __parser__(default=MK_TIMEOUT_DEFAULT)
7288
7326__parser__(no-rpc,callback-name=Service)
7327MQ_EXTERN enum MkErrorE MK_DECL MqSendEND_AND_CALLBACK_RT (
7329 MQ_CTX const ctx,
7330 MQ_TOK const token,
7331 MqServiceCallbackF const fCall __parser__(callback-call),
7332 MK_CBP callback __parser__(callback-data),
7333 MqDataFreeF fFree __parser__(callback-free),
7334 MK_TIME_T const timeout __parser__(default=MK_TIMEOUT_DEFAULT)
7336
7353MQ_EXTERN enum MkErrorE MK_DECL MqSendSYNC_RT (
7355 MQ_CTX const ctx
7357
7359
7361// MqContextC_SendApi_Basics_C_API
7362
7363// #######################################################################
7364// -----------------------------------------------------------------------
7369
7370__parser__push__(doc-group=Return,doc-index=SendApi);
7371
7387MQ_EXTERN enum MkErrorE MK_DECL MqSendRETURN_RT (
7389 MQ_CTX const ctx
7391
7392//#define MqSendRETURN(ctx) (dbg(ctx),MqSendRETURNx(ctx))
7393
7403MQ_EXTERN enum MkErrorE MK_DECL MqSendRETURN_SUB_RT (
7405 MQ_CTX const ctx
7407
7418MQ_EXTERN enum MkErrorE MK_DECL MqSendERROR_RT (
7420 MQ_CTX const ctx
7422
7424
7426// MqContextC_SendApi_Return_C_API
7427
7428// #######################################################################
7429// -----------------------------------------------------------------------
7436
7437__parser__push__(doc-group=Block,doc-index=SendApi);
7438
7454MQ_EXTERN enum MkErrorE MK_DECL MqSendL_START_RT (
7456 MQ_CTX const ctx
7458
7464MQ_EXTERN enum MkErrorE MK_DECL MqSendL_END_RT (
7466 MQ_CTX const ctx
7468
7483MQ_EXTERN enum MkErrorE MK_DECL MqSendT_START_RT (
7485 MQ_CTX const ctx
7487
7496MQ_EXTERN enum MkErrorE MK_DECL MqSendT_END_RT (
7498 MQ_CTX const ctx
7500
7502
7504// MqContextC_SendApi_Block_C_API
7505
7506/* ####################################################################### */
7507/* ### ### */
7508/* ### S L A V E - A P I ### */
7509/* ### ### */
7510/* ####################################################################### */
7511
7686__parser__push__(doc-group=Slave,doc-index=SlaveApi);
7687
7715MK_DECL MqSlaveWorker_RT (
7717 MQ_CTX const ctx,
7718 MQ_SLAVE_ID const id,
7719 MK_STRN fct __parser__(default=S#"WORKER"),
7720 MK_BAC args __parser__(default=NULL)
7722
7746 MQ_CTX const ctx,
7747 MQ_SLAVE_ID const id,
7748 MQ_CTX const slave
7750
7766 MQ_CTX const ctx,
7767 MQ_SLAVE_ID const id
7769
7777mk_inline bool MqSlaveCheck ( MQ_CTXN const ctx, MQ_SLAVE_ID const id )
7778{
7779 return ctx ? id >= 0 && id < ctx->link.slave.used && ctx->link.slave.slaves[id] != NULL : false;
7780}
7781
7790MQ_EXTERN enum MkErrorE
7793 MQ_CTX const ctx,
7794 MQ_SLAVE_ID const id,
7795 MQ_CTX* ctx_out
7797
7809 MQ_CTX const ctx,
7810 MQ_SLAVE_ID const id,
7811 MQ_CTX* ctx_out
7813
7834 MQ_CTX const ctx,
7835 MQ_CTX* ctx_out
7837
7842{
7843 return ctx ? (MQ_IS_MASTER(ctx) ? ctx : ctx->config.master) : NULL;
7844}
7845
7851mk_inline bool MqSlaveIs ( MQ_CTXN const ctx)
7852{
7853 return ctx ? (ctx->config.master != NULL) : false;
7854}
7855
7857
7859// MqContextC_SlaveApi_Slave_C_API
7860
7861// #######################################################################
7862// -----------------------------------------------------------------------
8017
8018__parser__push__(doc-group=High,doc-index=HighApi);
8019
8027__parser__(template-required)
8030 MQ_CTX const ctx ,
8031 MK_STRN cstr ,
8032 ...
8034
8037#define MQ_SEND_TRANSACTION_TOKEN_SIZE 10
8038#define MQ_SEND_TOKEN_SIGNATURE_SIZE 50
8040
8043#define MqHigh_O BOL
8044#define MqHigh_Y I8
8045#define MqHigh_S I16
8046#define MqHigh_I I32
8047#define MqHigh_W I64
8048#define MqHigh_H HDL
8049#define MqHigh_F FLT
8050#define MqHigh_D DBL
8051#define MqHigh_C STR
8052#define MqHigh_B BIN
8053#define MqHigh_U BUF
8054#define MqHigh_L BFL
8055#define MqHigh_A BAC
8057
8067 MQ_CTX const ctx ,
8068 MK_STRN cstr ,
8069 va_list var_list
8071
8073
8075// MqContextC_HighApi_High_C_API
8076
8077/* ####################################################################### */
8078/* ### ### */
8079/* ### F I L T E R - A P I ### */
8080/* ### ### */
8081/* ####################################################################### */
8082
8208/* ####################################################################### */
8209/* ### ### */
8210/* ### C L A S S - A P I ### */
8211/* ### ### */
8212/* ####################################################################### */
8213
8233
8234__parser__push__(doc-group=Class,doc-index=ClassApi);
8235
8240 MQ_CTXN const ctx
8242
8250 MQ_CTX const ctx,
8251 MQ_FCT const item
8253
8266 MQ_CTX const ctx,
8267 MK_STRN ident
8269
8278 MQ_CTXN const ctx
8280
8287 MQ_CTXN const ctx
8289
8291
8293// MqContextC_ClassApi_Class_C_API
8294
8295// #######################################################################
8296// only - inline ---------------------------------------------------------
8300
8301__parser__push__(doc-group=Get,doc-index=ConfigApi);
8302
8308 MQ_CTX const ctx
8309) {
8310 MK_INSTANCE_HDL(ctx);
8311 return MQ_IS_SERVER(ctx);
8312}
8313
8319 MQ_CTX const ctx
8320) {
8321 MK_INSTANCE_HDL(ctx);
8322 return ctx->config.identFrom;
8323}
8324
8331 MQ_CTX const ctx
8332) {
8333 MK_INSTANCE_HDL(ctx);
8334 return MQ_IS_PARENT(ctx);
8335}
8336
8342 MQ_CTX const ctx
8343) {
8344 MK_INSTANCE_HDL(ctx);
8345 return (ctx->config.native == MK_NATIVE_IS_STRING);
8346}
8347
8355 MQ_CTXN const ctx
8356) {
8357 MK_INSTANCE_HDL(ctx);
8358 return MkSysStringGetNoNULL((ctx)->config.dispName);
8359}
8360
8368 MQ_CTXN const ctx
8369) {
8370 MK_INSTANCE_HDL(ctx);
8371 return MkSysStringGetNoNULL((ctx)->config.dispPrefix);
8372}
8373
8381 MQ_CTXN const ctx
8382) {
8383 MK_INSTANCE_HDL(ctx);
8384 return MkSysStringGetNoNULL((ctx)->config.dispPostfix);
8385}
8386
8394 MQ_CTXN const ctx
8395) {
8396 MK_INSTANCE_HDL(ctx);
8397 return MkSysStringGetNoNULL((ctx)->config.storageFile);
8398}
8399
8406 MQ_CTXN const ctx
8407) {
8408 MK_INSTANCE_HDL(ctx);
8409 return (ctx)->config.io.buffersize;
8410}
8411
8418 MQ_CTXN const ctx
8419) {
8420 MK_INSTANCE_HDL(ctx);
8421 return (ctx)->config.io.pkgsize;
8422}
8423
8430 MQ_CTXN const ctx
8431) {
8432 MK_INSTANCE_HDL(ctx);
8433 return (ctx)->config.io.timeout;
8434}
8435
8443 MQ_CTXN const ctx
8444) {
8445 MK_INSTANCE_HDL(ctx);
8446 return MkSysStringGetNoNULL(ctx->config.io.uds.file);
8447}
8448
8464__parser__(no-rpc)
8465MQ_EXTERN enum MkErrorE
8467 MQ_CTX const ctx,
8468 MK_STRN *host_out,
8469 MK_STRN *port_out,
8470 MK_STRN *myhost_out,
8471 MK_STRN *myport_out
8473
8498__parser__(no-type-extension)
8502 MQ_CTX const ctx,
8503 MK_BFL *vals_out
8505
8511 MQ_CTX const ctx
8512) {
8513 MK_INSTANCE_HDL(ctx);
8514 return ctx->config.io.pipe.hdl;
8515}
8516
8520 MQ_CTX const ctx
8521) {
8522 MK_INSTANCE_HDL(ctx);
8523 return ctx->config.startAs;
8524}
8525
8529 MQ_CTX const ctx
8530) {
8531 MK_INSTANCE_HDL(ctx);
8532 return ctx->statusIs;
8533}
8534
8538__parser__(internal)
8539MQ_EXTERN config_t * MK_DECL MqConfigGetConfigFile (
8540 MQ_CTX const ctx
8542
8548__parser__(internal)
8549MQ_EXTERN config_setting_t * MK_DECL MqConfigGetConfigRoot (
8550 MQ_CTX const ctx
8552
8559MQ_EXTERN enum MkErrorE MK_DECL MqConfigSetConfigFile_RT (
8561 MQ_CTX const ctx,
8562 MK_STRN const filename
8564
8566
8568// MqContextC_ConfigApi_Get_C_API
8569
8570/* ####################################################################### */
8571/* ### ### */
8572/* ### D U M P - A P I ### */
8573/* ### ### */
8574/* ####################################################################### */
8575
8595
8596#if defined(MQ_C_BUILD_DLL)
8597
8598 #define META_SECTION_DEFINE
8599 #include "MqDumpS_mq.h"
8600 #undef META_SECTION_DEFINE
8601
8602#else
8603
8606struct MqDumpS {
8607 // BEGIN-MqDumpS-super - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
8608
8609 union {
8610 struct MkObjectS obj; // instance-base MkObjectS
8611 } super;
8612
8613 // END-MqDumpS-super - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
8614
8615 // missing PRIVATE instance attributes
8616 MK_BINN dummy[];
8617};
8618
8619#endif
8620
8621// BEGIN-MqDumpS-Definition - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
8622
8626 __parser__push__(prefix=Class, doc-group=Define, doc-index=Class);
8627
8628// Signature --------------------------------------------------------------
8631
8632 #define MqDumpC_SIGNATURE (MkObjectC_SIGNATURE ^ (12u<<10))
8633 #define MqDumpC_MASK (((1u<<22)-1)<<10)
8634
8636
8637// CompileTimeCast --------------------------------------------------------------
8640
8641 #define MqDumpC_X2dmp(x) (x)
8642 #define MqDumpC_X2obj(x) MkOBJ(x)
8643
8645
8646// TypeDef --------------------------------------------------------------
8649
8651 __parser__(ignore) typedef struct MqDumpS MqDumpCR;
8653 __parser__(ignore) typedef const struct MqDumpS MqDumpCNR;
8655 #define MqDumpC_T (&MQ_RT_REF._MqDumpC_T)
8657 #define MqDumpC_TT (MkTYP(MqDumpC_T))
8659 #define MqDumpST MqDumpC_T
8661 #define MqDumpSTT (MkTYP(MqDumpST))
8663 #define MqDumpC_type MQ_DMP
8665 #define MqDumpCT_X(instance) ( (struct MkSuperTypeS *) (MkOBJ_R(instance).type) )
8667 #define MqDumpCTT_X(instance) (MkOBJ_R(instance).type)
8669 #define MqDumpCT_TT(typ) ( (struct MkSuperTypeS *) (typ) )
8671 #define MqDumpC_NS MQ
8673 #define MqDumpCTT MqDumpCTT
8675 #define MqDumpCT ( (struct MkSuperTypeS *) MqDumpCTT )
8676
8678
8679// TypeCheck --------------------------------------------------------------
8682
8683 #pragma GCC diagnostic push
8684 #pragma GCC diagnostic ignored "-Wattributes"
8685
8688 __parser__(class=MqDumpC,static,hide)
8691 return MkSanitizeCheck(MqDumpC,mng);
8692 }
8693
8696 __parser__(class=MqDumpC,static,hide)
8699 return MkSanitizeCheckO(MqDumpC,obj);
8700 }
8701
8702 #pragma GCC diagnostic pop
8703 #define MqDumpC_Check(mng) MqDmpCheck(mng)
8704
8706
8707// RunTimeCast --------------------------------------------------------------
8710
8712 __parser__(class=MqDumpC,hide,static)
8713 META_ATTRIBUTE_SANITIZE
8716 return (MqDmpCheck(mng) ? (MQ_DMP)mng : NULL);
8717 }
8718
8720 __parser__(class=MqDumpC,hide,static)
8721 META_ATTRIBUTE_SANITIZE
8724 return (MqDmpCheck(mng) ? (MQ_DMPN)mng : NULL);
8725 }
8726
8728 #define MqDmpRaise(_dmp) if (!_MkCheckX(MqDumpC,_dmp)) { \
8729 MkErrorSetC_1E("'MqDumpC' hdl is NULL"); \
8730 goto error ; \
8731 }
8732
8734 #define MqDMP_R(x) (*(x)).super.dmp
8736 #define MqDMP(x) (&MqDMP_R(x))
8737
8739
8742// MqDumpC_Class_Define_C_API
8743
8744// END-MqDumpS-Definition - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
8745
8746// =========================================================================
8747// BEGIN-MqDumpS-Export - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
8748
8751
8754
8755__parser__push__(doc-group=_ignore_,doc-index=Class,doc-name=Export,class=MqDumpC);
8756
8772__parser__(class-overload=MkObjectHandleGet)
8776 MQ_DMP const dmp __parser__(null-allowed)
8777) {
8778 return MkObjectHandleGet(dmp?MkOBJ(dmp):NULL);
8779}
8780
8789__parser__(flags=new)
8791mk_inline MQ_DMP MqDumpHandleResolve_RT (
8793 MK_HDL const netHdl
8794) {
8795 return MqDmp(MkObjectHandleResolve(netHdl));
8796}
8797
8807#define MqDumpHandleResolve_e(netHdl) ({ \
8808 MK_HDL tmpHdl=netHdl; \
8809 MQ_DMP tmp; \
8810 if (tmpHdl==0) { \
8811 tmp=NULL; \
8812 } else { \
8813 tmp=MqDumpHandleResolve(tmpHdl); \
8814 if (tmp==NULL) { \
8815 MkErrorSetC_1_NULL("ERROR: 'MqDumpC' handle is 'NULL'"); \
8816 goto error; \
8817 }; \
8818 }; \
8819 tmp; \
8820})
8821
8823
8825// Class export & import
8826
8830 __parser__(flags=new,doc-group=_ignore_,doc-index=Class,doc-name=Misc,class=MqDumpC,null-return-allow)
8833 return (MQ_DMP)MK_NULL;
8834 }
8836// MqDumpC - Misc - function
8837
8839// MqDumpC_Class_C_API
8840
8841// END-MqDumpS-Export - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
8842
8851__parser__(const,class-overload=MkObjectLog)
8852MQ_EXTERN void MK_DECL MqDumpLog_RT (
8854 MQ_DMP const dmp ,
8856 MK_I32 const debug __parser__(default=0),
8857 MK_STRN const callfunc __parser__(default=F#FUNC),
8858 MK_I32 const lvl __parser__(default=0)
8860
8861#define MqDumpLog_1XS(dump) MqDumpLog(dump,(MK_OBJ)META_CONTEXT_S,0,__func__,0)
8862
8863// #######################################################################
8864// -----------------------------------------------------------------------
8869
8870__parser__push__(doc-group=TOR);
8871
8902__parser__(constructor,lng-constr)
8903MQ_EXTERN enum MkErrorE MK_DECL MqDumpExport_RT (
8905 MQ_CTX const ctx __parser__(argument),
8906 MQ_DMP * const dumpP_inout
8908
8926
8927__parser__(constructor)
8928MQ_EXTERN enum MkErrorE MK_DECL MqDumpError_RT (
8930 MQ_CTX const error __parser__(argument),
8931 MQ_DMP * const dumpP_inout
8933
8950MQ_EXTERN enum MkErrorE MK_DECL MqDumpImport_RT (
8952 MQ_DMP const dump,
8953 MQ_CTX const ctx
8955
8970__parser__(constructor)
8971MQ_EXTERN enum MkErrorE MK_DECL MqDumpBinSet_RT (
8973 MkBinaryR data,
8974 MQ_DMP *dmp_out
8976
8986 MQ_DMPN const dump
8988
8991
8995__parser__(destructor)
8996MQ_EXTERN void MK_DECL MqDumpDelete_RT (
8998 MQ_DMP dmp
9000
9002
9004
9006// MqDumpC_TOR_C_API
9007
9008// #######################################################################
9009// -----------------------------------------------------------------------
9014
9015__parser__push__(doc-group=Misc);
9016
9025 MQ_DMPN const dump
9027
9031__parser__(internal)
9032MQ_EXTERN void MK_DECL MqDumpTransLIdSet (
9033 MQ_DMP const dump,
9034 MQ_LTR transLId
9036
9040__parser__(internal)
9041MQ_EXTERN void MK_DECL MqDumpRmtTransLIdSet (
9042 MQ_DMP const dump,
9043 MQ_LTR rmtTransLId
9045
9053__parser__(internal)
9054MQ_EXTERN void MK_DECL MqDumpAllocSizeSet (
9055 MQ_DMP const dump,
9056 MK_SIZE allocsize
9058
9062__parser__(internal)
9063MQ_EXTERN MK_SIZE MK_DECL MqDumpAllocSizeGet (
9064 MQ_DMPN const dump
9066
9070__parser__(internal)
9071MQ_EXTERN enum MqHandShakeE MK_DECL MqDumpHandShakeGet (
9072 MQ_DMPN const dump
9074
9078MQ_EXTERN MK_STRN MK_DECL MqDumpTokenGet (
9079 MQ_DMPN const dump
9081
9083
9085// MqDumpC_Misc_C_API
9086
9088// MqDumpC_C_API
9089
9090/* MARK_R ################################################################ */
9091/* ### ### */
9092/* ### R U N T I M E - A P I ### */
9093/* ### ### */
9094/* ####################################################################### */
9095
9096__parser__global__(prefix2class:MqRuntime=MqRuntimeC);
9097
9111
9112#pragma GCC diagnostic push
9113#pragma GCC diagnostic ignored "-Wlto-type-mismatch"
9114
9115#if defined(MQ_C_BUILD_DLL)
9116
9117 #define META_SECTION_DEFINE
9118 #include "MqRuntimeS_mq.h"
9119 #undef META_SECTION_DEFINE
9120
9121#else
9122
9124__parser__(internal)
9126
9127 // ======================================================================================
9128 // PUBLIC variables -> sync with MqRuntimeS_mk.h !!
9129
9136 // by default \ref __MqRtCheckX is \e false and will be set in \RMkNs{RuntimeSetup} .
9137
9138 // BEGIN-MqRuntimeS-super - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
9139
9140 union {
9141 struct MkObjectS obj; // instance-base MkObjectS
9142 struct MkExtensionS ext; // instance-base MkExtensionS
9143 struct MkRtExtS rtext; // instance-base MkRtExtS
9144 } super;
9145
9146 // END-MqRuntimeS-super - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
9147
9148 // instance attributes
9149 struct MqErrorS error_mq ;
9150
9151 // ======================================================================================
9152 // TYPES
9153
9154 // BEGIN-rtDef - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
9155
9156 struct MkSuperTypeS _MqErrorC_T ;
9157 struct MkSuperTypeS _MqRuntimeC_T ;
9158 struct MkTypeS _MqCtxTypeC_TT ;
9159 struct MqCtxTypeS _MqContextC_T ;
9160 struct MkSuperTypeS _MqDumpC_T ;
9161 struct MkSuperTypeS _MqFactoryC_T ;
9162 struct MkSuperTypeS _MqEnvC_T ;
9163
9164 // END-rtDef - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
9165
9166 // offset calculated by "Nhi1InternalSize"
9167 MK_BINB private_variables[290776];
9168};
9169
9170#endif
9171
9172#pragma GCC diagnostic pop
9173
9174// BEGIN-MqRuntimeS-Definition - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
9175
9179 __parser__push__(prefix=Class, doc-group=Define, doc-index=Class);
9180
9181// Signature --------------------------------------------------------------
9184
9185 #define MqRuntimeC_SIGNATURE (MkRtExtC_SIGNATURE ^ (1u<<3))
9186 #define MqRuntimeC_MASK (((1u<<29)-1)<<3)
9187
9189
9190// CompileTimeCast --------------------------------------------------------------
9193
9194 #define MqRuntimeC_X2rt(x) (x)
9195 #define MqRuntimeC_X2rtext(x) MkRTEXT(x)
9196 #define MqRuntimeC_X2ext(x) MkEXT(x)
9197 #define MqRuntimeC_X2obj(x) MkOBJ(x)
9198
9200
9201// TypeDef --------------------------------------------------------------
9204
9206 __parser__(ignore) typedef struct MqRuntimeS MqRuntimeCR;
9208 __parser__(ignore) typedef const struct MqRuntimeS MqRuntimeCNR;
9210 #define MqRuntimeC_T (&MQ_RT_REF._MqRuntimeC_T)
9212 #define MqRuntimeC_TT (MkTYP(MqRuntimeC_T))
9214 #define MqRuntimeST MqRuntimeC_T
9216 #define MqRuntimeSTT (MkTYP(MqRuntimeST))
9218 #define MqRuntimeC_type MQ_RT
9220 #define MqRuntimeCT_X(instance) ( (struct MkSuperTypeS *) (MkOBJ_R(instance).type) )
9222 #define MqRuntimeCTT_X(instance) (MkOBJ_R(instance).type)
9224 #define MqRuntimeCT_TT(typ) ( (struct MkSuperTypeS *) (typ) )
9226 #define MqRuntimeC_NS MQ
9228 #define MqRuntimeCTT MqRuntimeCTT
9230 #define MqRuntimeCT ( (struct MkSuperTypeS *) MqRuntimeCTT )
9231
9233
9234// TypeCheck --------------------------------------------------------------
9237
9238 #pragma GCC diagnostic push
9239 #pragma GCC diagnostic ignored "-Wattributes"
9240
9243 __parser__(class=MqRuntimeC,static,ignore)
9246 return MkSanitizeCheck(MqRuntimeC,mng);
9247 }
9248
9251 __parser__(class=MqRuntimeC,static,ignore)
9254 return MkSanitizeCheckO(MqRuntimeC,obj);
9255 }
9256
9257 #pragma GCC diagnostic pop
9258 #define MqRuntimeC_Check(mng) MqRtCheck(mng)
9259
9261
9262// RunTimeCast --------------------------------------------------------------
9265
9267 __parser__(class=MqRuntimeC,ignore,static)
9268 META_ATTRIBUTE_SANITIZE
9271 return (MqRtCheck(mng) ? (MQ_RT)mng : NULL);
9272 }
9273
9275 __parser__(class=MqRuntimeC,ignore,static)
9276 META_ATTRIBUTE_SANITIZE
9279 return (MqRtCheck(mng) ? (MQ_RTN)mng : NULL);
9280 }
9281
9283 #define MqRtRaise(_rt) if (!_MkCheckX(MqRuntimeC,_rt)) { \
9284 MkErrorSetC_1E("'MqRuntimeC' hdl is NULL"); \
9285 goto error ; \
9286 }
9287
9289
9292// MqRuntimeC_Class_Define_C_API
9293
9294// END-MqRuntimeS-Definition - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
9295
9297// MqRuntime_C_API
9298
9299#define MqRT &MqRuntimeRLS
9300#if 0
9301 #define MqRT_O(o) MqRuntimeGet( MK_RT_CALL_ONLY )
9302 #define MqRT_X(x) MqRuntimeGet( MK_RT_CALL_ONLY )
9303 #define MqRT_ON(o) MqRuntimeGet( MK_RT_CALL_ONLY )
9304 #define MqRT_XN(x) MqRuntimeGet( MK_RT_CALL_ONLY )
9305#else
9306 #define MqRT_O(o) ((o) && (*o).objRtExt ? (MQ_RT)(*o).objRtExt : MqRuntimeGet( MK_RT_CALL_ONLY ))
9307 #define MqRT_X(x) ((x) && MkOBJ_R(x).objRtExt ? (MQ_RT)MkOBJ_R(x).objRtExt : MqRuntimeGet( MK_RT_CALL_ONLY ))
9308 #define MqRT_ON(o) ( (*o).objRtExt ? (MQ_RT)(*o).objRtExt : MqRuntimeGet( MK_RT_CALL_ONLY ))
9309 #define MqRT_XN(x) ( MkOBJ_R(x).objRtExt ? (MQ_RT)MkOBJ_R(x).objRtExt : MqRuntimeGet( MK_RT_CALL_ONLY ))
9310#endif
9311
9312#if META_HAS_THREAD
9313 #define MqRtSetup_O(o) MK_RT_UNUSED MQ_RT const mqrt = MqRT_O(o)
9314 #define MqRtSetup_ON(o) MK_RT_UNUSED MQ_RT const mqrt = MqRT_ON(o)
9315 #define MqRtSetup_X(x) MK_RT_UNUSED MQ_RT const mqrt = MqRT_X(x)
9316 #define MqRtSetup_XN(x) MK_RT_UNUSED MQ_RT const mqrt = MqRT_XN(x)
9317 #define MqRtSetup_NULL MK_RT_UNUSED MQ_RT const mqrt = MqRuntimeGet( MK_RT_CALL_ONLY )
9318
9319 #define MqRtSetup_O_RT(o) MkRtSetup_O_RT(o) ; MqRtSetup_O(o)
9320 #define MqRtSetup_ON_RT(o) MkRtSetup_ON_RT(o) ; MqRtSetup_ON(o)
9321 #define MqRtSetup_X_RT(x) MkRtSetup_X_RT(x) ; MqRtSetup_X(x)
9322 #define MqRtSetup_XN_RT(x) MkRtSetup_XN_RT(x) ; MqRtSetup_XN(x)
9323 #define MqRtSetup_NULL_RT MkRtSetup_NULL_RT ; MqRtSetup_NULL
9324
9325 #undef AllRtSetup_O
9326 #undef AllRtSetup_ON
9327 #undef AllRtSetup_X
9328 #undef AllRtSetup_XN
9329 #undef AllRtSetup_NULL
9330
9331 #define AllRtSetup_O(o) MkRtSetup_O(o) ; MqRtSetup_O(o)
9332 #define AllRtSetup_ON(o) MkRtSetup_ON(o) ; MqRtSetup_ON(o)
9333 #define AllRtSetup_X(x) MkRtSetup_X(x) ; MqRtSetup_X(x)
9334 #define AllRtSetup_XN(x) MkRtSetup_XN(x) ; MqRtSetup_XN(x)
9335 #define AllRtSetup_NULL MkRtSetup_NULL ; MqRtSetup_NULL
9336#else
9337 #define MqRtSetup_O(o)
9338 #define MqRtSetup_ON(o)
9339 #define MqRtSetup_X(x)
9340 #define MqRtSetup_XN(x)
9341 #define MqRtSetup_NULL
9342
9343 #define MqRtSetup_O_RT(o)
9344 #define MqRtSetup_ON_RT(o)
9345 #define MqRtSetup_X_RT(x)
9346 #define MqRtSetup_XN_RT(x)
9347 #define MqRtSetup_NULL_RT
9348#endif
9349
9351__parser__(ignore)
9352MQ_EXTERN_DATA MkThreadLocal struct MqRuntimeS MqRuntimeRLS;
9353
9360__parser__(ignore)
9361MQ_EXTERN MQ_RT MK_DECL MqRuntimeSetup ( MK_RT const mkrt, MQ_RT const mqrt );
9362
9368__parser__(ignore)
9369MQ_EXTERN void MK_DECL MqRuntimeCleanup ( MQ_RT_ARGS_ONLY );
9370
9372MQ_EXTERN_DATA size_t MqRuntimeId;
9373
9375__parser__(ignore)
9377 return MK_RT_REF.mkRtExtAry[MqRuntimeId] ? (MQ_RT)MK_RT_REF.mkRtExtAry[MqRuntimeId] :
9378 __MkCheckX(MqRuntimeC,&MqRuntimeRLS) ? MqRT :
9380}
9381
9382/* ####################################################################### */
9383/* ### ### */
9384/* ### P A C K A G E - A P I ### */
9385/* ### ### */
9386/* ####################################################################### */
9387
9429// MqMsgque_C_API
9430
9431// #######################################################################
9432// -----------------------------------------------------------------------
9450
9451__parser__global__(doc-force=MqMsgque@Item);
9452
9454// MqMsgque_Item_C_API
9455
9456// #######################################################################
9457// -----------------------------------------------------------------------
9465__parser__global__(doc-force=MqMsgque@Main);
9466__parser__push__(doc-group=Main,class=MqMsgque);
9467
9475__parser__(hide,template-required,class=MqMsgque)
9476MQ_EXTERN void MK_DECL MqMain (
9477 void * code
9479
9481
9483// MqMsgque_Main_C_API
9484
9485// #######################################################################
9486// -----------------------------------------------------------------------
9491
9492__parser__push__(doc-group=Help,class=MqMsgque);
9493
9505 MK_STRN tool
9507
9510 void
9512
9514
9516// MqMsgque_Help_C_API
9517
9518// #######################################################################
9519// -----------------------------------------------------------------------
9527
9528__parser__push__(doc-group=Init,class=MqMsgque);
9529
9531__parser__(ignore)
9532MQ_EXTERN_DATA struct MkBufferListS * MqInitArg0;
9533
9549MQ_EXTERN MK_BFL MK_DECL MqInitResetArg0 (void) MK_ATTR_STATIC ;
9550
9564MQ_EXTERN void MK_DECL MqInitSetArg0 (
9565 MK_BAC bfl __parser__(argument,default=NULL)
9567
9571MQ_EXTERN void MK_DECL MqInitSetArg0VA (
9572 MK_STRN arg0,
9573 ...
9575
9577MQ_EXTERN void MK_DECL MqInitSetArg0VAL (
9578 MK_STRN arg0,
9579 va_list var_list
9581
9587MQ_EXTERN MK_BFL MK_DECL MqInitGetArg0 (
9588 void
9590
9592
9594// MqMsgque_Init_C_API
9595
9596// #######################################################################
9597// MARK_D ----------------------------------------------------------------
9598
9601
9604
9607
9608// BEGIN-Class-Doc-Order - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
9609
9610// external
9616
9617// internal
9624
9625// external
9631
9632// internal
9639
9640// internal
9647
9648// external
9654
9655// internal
9662
9663// END-Class-Doc-Order - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
9664
9665// #######################################################################
9666// -----------------------------------------------------------------------
9672__parser__global__(doc-force=MqMsgque@Enum@local);
9673
9674// BEGIN-Class-Introspection - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
9675
9680
9681__parser__push__(doc-name=Introspection,doc-index=Class,class=MqContextC,no-rpc,null-return-allow,flags=new);
9682
9686mk_inline MQ_CTX MqContextInstances_RT( MK_PARSER_RT_ONLY ) {
9688 return (MQ_CTX)MqContextC_TT->instances;
9689}
9690
9694 MK_INSTANCE_HDL(ctx);
9695 return (MQ_CTX)MqContextC_X2obj(ctx)->obj_protect.next;
9696}
9697
9701 MK_INSTANCE_HDL(ctx);
9702 return (MQ_CTX)MqContextC_X2obj(ctx)->obj_protect.prev;
9703}
9704
9706
9709// MqContextC_Class_C_API
9710
9715
9716__parser__push__(doc-name=Introspection,doc-index=Class,class=MqDumpC,no-rpc,null-return-allow,flags=new);
9717
9725
9729 MK_INSTANCE_HDL(dmp);
9730 return (MQ_DMP)MqDumpC_X2obj(dmp)->obj_protect.next;
9731}
9732
9736 MK_INSTANCE_HDL(dmp);
9737 return (MQ_DMP)MqDumpC_X2obj(dmp)->obj_protect.prev;
9738}
9739
9741
9744// MqDumpC_Class_C_API
9745
9750
9751__parser__push__(doc-name=Introspection,doc-index=Class,class=MqFactoryC,no-rpc,null-return-allow,flags=new);
9752
9760
9764 MK_INSTANCE_HDL(fct);
9765 return (MQ_FCT)MqFactoryC_X2obj(fct)->obj_protect.next;
9766}
9767
9771 MK_INSTANCE_HDL(fct);
9772 return (MQ_FCT)MqFactoryC_X2obj(fct)->obj_protect.prev;
9773}
9774
9776
9779// MqFactoryC_Class_C_API
9780
9781// END-Class-Introspection - created by 'c_Class.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
9782
9783// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
9784
9787
9788__parser__push__(doc-group=Log,doc-index=LogApi);
9789
9796 MQ_CTXN const ctx
9797) {
9798 MK_INSTANCE_HDL(ctx);
9799 return (MQ_IS_SERVER (ctx) ? "SERVER" : "CLIENT");
9800}
9801
9808 MQ_CTXN ctx
9809) {
9810 MK_INSTANCE_HDL(ctx);
9811 return (MQ_IS_PARENT (ctx) ? "PARENT" : "CHILD");
9812}
9813
9815
9817
9818// end c++ save definition
9820
9821// 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_NO_RETURN
#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 ? …
void MqExit_RT(MK_RT mkrt, MQ_CTX const ctx, MK_STRN const callfunc, MK_STRN const callfile, MK_I32 const callline) MK_NO_RETURN
delete the context and exit the current process or thread …
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)
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 …
void(* MqWaitForPipeF)(MK_RT mkrt, MQ_CTX const ctx, const struct MkIdS *idP)
Wait for a pipe-server to finish …
void(* MqExitF)(MK_RT mkrt, int num)
prototype for exit a process or thread …
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 …
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::MqCtxTypeS::fIncrSelf and libmqmsgque::MqCtxTypeS::fDecrSelf to protect an "embe...
static bool MqCtxTypCheckO(MK_OBJN obj)
check MqCtxTypeS -> libmkkernel::MkObjectS::signature …
static bool MqCtxTypCheck(MK_MNGN mng)
check MqCtxTypeS -> libmkkernel::MkObjectS::signature …
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(MK_STRN const ident)
returns the MqFactoryC identified by ident …
#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 …
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
MqCtxTypeS - the instance-base for the MqContextC …
MqWaitForPipeF MqWaitForPipeCB
wait for pipe target to finish
bool ignoreSpawn
do not allow the usage of spawn
bool ignoreDisasterSetup
do not setup the disaster-handler at startup.
MqRefCountF fDecrSelf
decrement the libmqmsgque::MqContextS::obj->self reference counting
MqSetupF fParentAfterFork
cleanup a parent fork-process after a new fork-process is created by ccmqmsgque
MqSetupF fThreadInit
setup and initialize a thread before a new thread is created by ccmqmsgque
MqHelpF fHelp
Create a link to the calling tool help function.
MqSetupF fSpawnInit
setup and initialize a spawn-process before a new spawn-process is created by ccmqmsgque
bool ignoreThread
do not allow the usage of threads
MqRefCountF fIncrSelf
increment the libmqmsgque::MqContextS::obj->self reference counting
MkMarkF callbackMF
Mark the callback-data-pointer.
bool argvFix
add first argument in MkBufferListC argument to MqLinkCreate and MqLinkCreateChild
MqExitF MqProcessExitCB
exit/cleanup a process
MqSetupF fChildAfterFork
cleanup a child fork-process after a new fork-process is created by ccmqmsgque
MkMarkF dataMF
Mark the data-pointer.
MqSetupF fParentBeforeFork
setup and initialize a fork-process before a new fork-process is created by ccmqmsgque
bool ignoreFork
do not allow the usage of fork
MqExitF MqThreadExitCB
exit/cleanup a thread
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 -> libmqmsgque::MqFactoryGet will ignore this factory
bool factoryCalled
was the factory called?
MK_NUM itemsId
entry-id in global "space.itemsP"
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 …
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 …
MK_PTR threadData
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 factory
server configuration (memory belongs to caller)
MQ_CTX tmpl
calling (parent) context