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