theLink 10.0
Loading...
Searching...
No Matches
LibMqMsgque_tcl.h File Reference

tag: nhi1-release-250425 More...

+ Include dependency graph for LibMqMsgque_tcl.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  TclContextS
 

Macros

#define HEADER
 
#define MQ_TCL_EXTERN
 static library
 
#define MQ_TCL_EXTERN_DATA   extern
 
#define MQ(n)
 
#define NS(n)
 
#define MqContextC_ARGS   OBJECT_ARGS
 
#define MqContextC_ARGS_CALL   OBJECT_ARGS_CALL
 
#define MqDumpC_ARGS   OBJECT_ARGS
 
#define MqDumpC_ARGS_CALL   OBJECT_ARGS_CALL
 
#define MqFactoryC_ARGS   OBJECT_ARGS
 
#define MqFactoryC_ARGS_CALL   OBJECT_ARGS_CALL
 
#define MqContextC_lngO   MQ(MqContextC)
 
#define OT_retObj_SET_CTX(nat)
 
#define OT_TMP_CTX_OBJ(val)
 
#define MqDumpC_lngO   MQ(MqDumpC)
 
#define OT_retObj_SET_DMP(nat)
 
#define OT_TMP_DMP_OBJ(val)
 
#define MqFactoryC_lngO   MQ(MqFactoryC)
 
#define OT_retObj_SET_FCT(nat)
 
#define OT_TMP_FCT_OBJ(val)
 
#define Get_MqIdentE_FromObj_path   MQ(Get_MqIdentE_FromObj)
 
#define Get_MqSlaveE_FromObj_path   MQ(Get_MqSlaveE_FromObj)
 
#define Get_MqStartE_FromObj_path   MQ(Get_MqStartE_FromObj)
 
#define Get_MqStatusIsEF_FromObj_path   MQ(Get_MqStatusIsEF_FromObj)
 
#define Get_MqWaitOnEventE_FromObj_path   MQ(Get_MqWaitOnEventE_FromObj)
 
#define OT_NEW_Mq_enum_OBJ(typ, val)
 

Functions

int tclmqmsgque_pMqContextC_Init (MK_RT mkrt, OT_ENV_T, OT_NS_T)
 
static MK_ARTIFICIAL OT_OBJ_T tclmqmsgque_MqContextC_ObjNew (MK_RT mkrt, OT_ENV_T interp, MqContextC_type hdl)
 
int tclmqmsgque_pMqDumpC_Init (MK_RT mkrt, OT_ENV_T, OT_NS_T)
 
static MK_ARTIFICIAL OT_OBJ_T tclmqmsgque_MqDumpC_ObjNew (MK_RT mkrt, OT_ENV_T interp, MqDumpC_type hdl)
 
int tclmqmsgque_pMqFactoryC_Init (MK_RT mkrt, OT_ENV_T, OT_NS_T)
 
static MK_ARTIFICIAL OT_OBJ_T tclmqmsgque_MqFactoryC_ObjNew (MK_RT mkrt, OT_ENV_T interp, MqFactoryC_type hdl)
 
int tclmqmsgque_MqContextC_ReadLIST (MqContextC_ARGS)
 
int tclmqmsgque_MqContextC_ReadNEXT (MqContextC_ARGS)
 
void tclmqmsgque_ServiceFree (MQ_SERVICE_FREE_ARGS)
 
void tclmqmsgque_ServiceCopy (MQ_SERVICE_COPY_ARGS)
 
enum MkErrorE tclmqmsgque_ServiceCall (MQ_SERVICE_CALL_ARGS)
 
int tclmqmsgque_MqFactoryC_Setup (MK_RT mkrt, OT_ENV_T)
 
MQ_TCL_EXTERN int tclmqmsgque_Get_MqIdentE_FromObj (MK_RT mkrt, OT_ENV_T interp, OT_OBJ_T enumE, enum MqIdentE *ret)
 
MQ_TCL_EXTERN int tclmqmsgque_Get_MqSlaveE_FromObj (MK_RT mkrt, OT_ENV_T interp, OT_OBJ_T enumE, enum MqSlaveE *ret)
 
MQ_TCL_EXTERN int tclmqmsgque_Get_MqStartE_FromObj (MK_RT mkrt, OT_ENV_T interp, OT_OBJ_T enumE, enum MqStartE *ret)
 
MQ_TCL_EXTERN int tclmqmsgque_Get_MqStatusIsEF_FromObj (MK_RT mkrt, OT_ENV_T interp, OT_OBJ_T enumE, enum MqStatusIsEF *ret)
 
MQ_TCL_EXTERN int tclmqmsgque_Get_MqWaitOnEventE_FromObj (MK_RT mkrt, OT_ENV_T interp, OT_OBJ_T enumE, enum MqWaitOnEventE *ret)
 
MQ_TCL_EXTERN OT_OBJ_T tclmqmsgque_MqIdentE_ToString (const enum MqIdentE)
 
MQ_TCL_EXTERN OT_OBJ_T tclmqmsgque_MqSlaveE_ToString (const enum MqSlaveE)
 
MQ_TCL_EXTERN OT_OBJ_T tclmqmsgque_MqStartE_ToString (const enum MqStartE)
 
MQ_TCL_EXTERN OT_OBJ_T tclmqmsgque_MqStatusIsEF_ToString (const enum MqStatusIsEF)
 
MQ_TCL_EXTERN OT_OBJ_T tclmqmsgque_MqWaitOnEventE_ToString (const enum MqWaitOnEventE)
 

Variables

MQ_TCL_EXTERN_DATA __thread OT_CLS_T tclmqmsgque_MqContextC
 
MQ_TCL_EXTERN_DATA __thread OT_OBJ_T tclmqmsgque_MqContextC_MK_NULL
 
MQ_TCL_EXTERN_DATA __thread OT_CLS_T tclmqmsgque_MqDumpC
 
MQ_TCL_EXTERN_DATA __thread OT_OBJ_T tclmqmsgque_MqDumpC_MK_NULL
 
MQ_TCL_EXTERN_DATA __thread OT_CLS_T tclmqmsgque_MqFactoryC
 
MQ_TCL_EXTERN_DATA __thread OT_OBJ_T tclmqmsgque_MqFactoryC_MK_NULL
 

Detailed Description

tag: nhi1-release-250425

Definition in file LibMqMsgque_tcl.h.

Macro Definition Documentation

◆ Get_MqIdentE_FromObj_path

#define Get_MqIdentE_FromObj_path   MQ(Get_MqIdentE_FromObj)

Definition at line 207 of file LibMqMsgque_tcl.h.

◆ Get_MqSlaveE_FromObj_path

#define Get_MqSlaveE_FromObj_path   MQ(Get_MqSlaveE_FromObj)

Definition at line 210 of file LibMqMsgque_tcl.h.

◆ Get_MqStartE_FromObj_path

#define Get_MqStartE_FromObj_path   MQ(Get_MqStartE_FromObj)

Definition at line 213 of file LibMqMsgque_tcl.h.

◆ Get_MqStatusIsEF_FromObj_path

#define Get_MqStatusIsEF_FromObj_path   MQ(Get_MqStatusIsEF_FromObj)

Definition at line 216 of file LibMqMsgque_tcl.h.

◆ Get_MqWaitOnEventE_FromObj_path

#define Get_MqWaitOnEventE_FromObj_path   MQ(Get_MqWaitOnEventE_FromObj)

Definition at line 219 of file LibMqMsgque_tcl.h.

◆ HEADER

#define HEADER

Definition at line 24 of file LibMqMsgque_tcl.h.

◆ MQ

#define MQ ( n)
Value:
tclmqmsgque_ ## n

Definition at line 75 of file LibMqMsgque_tcl.h.

◆ MQ_TCL_EXTERN

#define MQ_TCL_EXTERN

static library

Definition at line 48 of file LibMqMsgque_tcl.h.

◆ MQ_TCL_EXTERN_DATA

#define MQ_TCL_EXTERN_DATA   extern

Definition at line 71 of file LibMqMsgque_tcl.h.

◆ MqContextC_ARGS

#define MqContextC_ARGS   OBJECT_ARGS

Definition at line 83 of file LibMqMsgque_tcl.h.

◆ MqContextC_ARGS_CALL

#define MqContextC_ARGS_CALL   OBJECT_ARGS_CALL

Definition at line 84 of file LibMqMsgque_tcl.h.

◆ MqContextC_lngO

#define MqContextC_lngO   MQ(MqContextC)

Definition at line 111 of file LibMqMsgque_tcl.h.

◆ MqDumpC_ARGS

#define MqDumpC_ARGS   OBJECT_ARGS

Definition at line 85 of file LibMqMsgque_tcl.h.

◆ MqDumpC_ARGS_CALL

#define MqDumpC_ARGS_CALL   OBJECT_ARGS_CALL

Definition at line 86 of file LibMqMsgque_tcl.h.

◆ MqDumpC_lngO

#define MqDumpC_lngO   MQ(MqDumpC)

Definition at line 129 of file LibMqMsgque_tcl.h.

◆ MqFactoryC_ARGS

#define MqFactoryC_ARGS   OBJECT_ARGS

Definition at line 87 of file LibMqMsgque_tcl.h.

◆ MqFactoryC_ARGS_CALL

#define MqFactoryC_ARGS_CALL   OBJECT_ARGS_CALL

Definition at line 88 of file LibMqMsgque_tcl.h.

◆ MqFactoryC_lngO

#define MqFactoryC_lngO   MQ(MqFactoryC)

Definition at line 147 of file LibMqMsgque_tcl.h.

◆ NS

#define NS ( n)
Value:
tclmqmsgque_ ## n

Definition at line 77 of file LibMqMsgque_tcl.h.

◆ OT_NEW_Mq_enum_OBJ

#define OT_NEW_Mq_enum_OBJ ( typ,
val )
Value:
MQ(Mq ## typ ## _ToString(val))
#define MQ(n)

Definition at line 225 of file LibMqMsgque_tcl.h.

◆ OT_retObj_SET_CTX

#define OT_retObj_SET_CTX ( nat)
Value:
retObj = MQ(MqContextC_ObjNew) (MK_RT_CALL interp,nat)
#define MK_RT_CALL

Definition at line 117 of file LibMqMsgque_tcl.h.

◆ OT_retObj_SET_DMP

#define OT_retObj_SET_DMP ( nat)
Value:
retObj = MQ(MqDumpC_ObjNew) (MK_RT_CALL interp,nat)

Definition at line 135 of file LibMqMsgque_tcl.h.

◆ OT_retObj_SET_FCT

#define OT_retObj_SET_FCT ( nat)
Value:
retObj = MQ(MqFactoryC_ObjNew) (MK_RT_CALL interp,nat)

Definition at line 153 of file LibMqMsgque_tcl.h.

◆ OT_TMP_CTX_OBJ

#define OT_TMP_CTX_OBJ ( val)
Value:
MQ(MqContextC_ObjNew) (MK_RT_CALL interp,val)

Definition at line 119 of file LibMqMsgque_tcl.h.

◆ OT_TMP_DMP_OBJ

#define OT_TMP_DMP_OBJ ( val)
Value:
MQ(MqDumpC_ObjNew) (MK_RT_CALL interp,val)

Definition at line 137 of file LibMqMsgque_tcl.h.

◆ OT_TMP_FCT_OBJ

#define OT_TMP_FCT_OBJ ( val)
Value:
MQ(MqFactoryC_ObjNew) (MK_RT_CALL interp,val)

Definition at line 155 of file LibMqMsgque_tcl.h.

Function Documentation

◆ tclmqmsgque_MqContextC_ObjNew()

static MK_ARTIFICIAL OT_OBJ_T tclmqmsgque_MqContextC_ObjNew ( MK_RT mkrt,
OT_ENV_T interp,
MqContextC_type hdl )
inlinestatic

Definition at line 122 of file LibMqMsgque_tcl.h.

122 {
123 return ( hdl ? MK(AtomObjNew) (MK_RT_CALL interp, MqContextC_X2obj(hdl)) : MQ(MqContextC_MK_NULL) );
124 }
#define MK(n)
#define MqContextC_X2obj(x)

◆ tclmqmsgque_MqContextC_ReadLIST()

int tclmqmsgque_MqContextC_ReadLIST ( MqContextC_ARGS )

◆ tclmqmsgque_MqContextC_ReadNEXT()

int tclmqmsgque_MqContextC_ReadNEXT ( MqContextC_ARGS )

◆ tclmqmsgque_MqDumpC_ObjNew()

static MK_ARTIFICIAL OT_OBJ_T tclmqmsgque_MqDumpC_ObjNew ( MK_RT mkrt,
OT_ENV_T interp,
MqDumpC_type hdl )
inlinestatic

Definition at line 140 of file LibMqMsgque_tcl.h.

140 {
141 return ( hdl ? MK(AtomObjNew) (MK_RT_CALL interp, MqDumpC_X2obj(hdl)) : MQ(MqDumpC_MK_NULL) );
142 }
#define MqDumpC_X2obj(x)

◆ tclmqmsgque_MqFactoryC_ObjNew()

static MK_ARTIFICIAL OT_OBJ_T tclmqmsgque_MqFactoryC_ObjNew ( MK_RT mkrt,
OT_ENV_T interp,
MqFactoryC_type hdl )
inlinestatic

Definition at line 158 of file LibMqMsgque_tcl.h.

158 {
159 return ( hdl ? MK(AtomObjNew) (MK_RT_CALL interp, MqFactoryC_X2obj(hdl)) : MQ(MqFactoryC_MK_NULL) );
160 }
#define MqFactoryC_X2obj(x)

◆ tclmqmsgque_MqFactoryC_Setup()

int tclmqmsgque_MqFactoryC_Setup ( MK_RT mkrt,
OT_ENV_T interp )

Public API

Definition at line 839 of file MqFactoryC_tcl.c.

840{
841 if (!strcmp(MqFactoryDefaultIdent(), "libmqmsgque")) {
842 if ( MqFactoryDefault(
845 NS(sFactoryCTor), NULL, NULL, NULL, NULL, NULL, NULL, NULL, "tclmqmsgque"
846 )
847 )
848 ) == NULL
849 )
850 {
851 Tcl_SetResult(interp,"MqFactoryS exception",TCL_STATIC);
852 return TCL_ERROR;
853 }
854 }
855 return TCL_OK;
856}
#define NS(n)
#define MK_ERROR_FORMAT
#define MqFactoryInitial(...)
#define MqFactoryDefaultIdent()
#define MqFactoryDefault(...)
#define MqFactoryAdd(...)

◆ tclmqmsgque_pMqContextC_Init()

int tclmqmsgque_pMqContextC_Init ( MK_RT mkrt,
OT_ENV_T interp,
OT_NS_T ns )

Definition at line 3966 of file MqContextC_tcl.c.

3967{
3969
3970 if (MqContextCTT == NULL) {
3971
3972 // register a new type
3973 MkRuntimeCallbackAdd( MK_RT_CALL &sTclMqRuntimeCallback, NS(sMqContextC_Type) , "TclMqContextC" );
3974
3975 // tcl does !not! support fork for a threaded interpreter
3976 if (Tcl_GetVar2Ex(interp,"tcl_platform","threaded",TCL_GLOBAL_ONLY) != NULL) {
3977 MqContextCT->ignoreFork = true;
3978 }
3979 }
3980
3981 ClassInit
3982
3983 return TCL_OK;
3984error:
3985 return TCL_ERROR;
3986}
static struct MkRuntimeCallbackS sTclMqRuntimeCallback
static __thread MK_TYP MqContextCTT
#define ClassInit
#define error
Definition high_lng.h:339
size_t MkRuntimeCallbackAdd(MK_RT mkrt, MkRuntimeCallbackS *cbdata, MkRuntimeInitF rt_callback, MK_STRN ident)
#define MqContextCT
class as MqTypeCtxS-class-type for MqContextC in the Target-Programming-Language (TPL) …
#define MQ_STATIC_RT

◆ tclmqmsgque_pMqDumpC_Init()

int tclmqmsgque_pMqDumpC_Init ( MK_RT mkrt,
OT_ENV_T interp,
OT_NS_T ns )

Public API

Definition at line 463 of file MqDumpC_tcl.c.

464{
467
468 return TCL_OK;
469error:
470 return TCL_ERROR;
471}
#define ClassInit
Definition MqDumpC_tcl.c:77

◆ tclmqmsgque_pMqFactoryC_Init()

int tclmqmsgque_pMqFactoryC_Init ( MK_RT mkrt,
OT_ENV_T interp,
OT_NS_T ns )

Definition at line 858 of file MqFactoryC_tcl.c.

859{
862
863 return TCL_OK;
864error:
865 return TCL_ERROR;
866}
#define ClassInit

◆ tclmqmsgque_ServiceCall()

enum MkErrorE tclmqmsgque_ServiceCall ( MQ_SERVICE_CALL_ARGS )

Definition at line 72 of file MqCall_tcl.c.

73{
75
76 // 1. setup environment
78 if (interp==NULL || Tcl_InterpDeleted(interp) ) return MK_OK;
79
80 // 2. setup arguments
81 struct MkCallS *call = __data__;
83 int objc = 0;
84
85//colorBLUE("call<%p>, type<%d>, nsO<%p>",call,call->type,call->nsO);
86
87 // 3. setup my
88rescan:
89 switch (call->type) {
90 case MkCallS_own_method: {
91//printLTxt("MkCallS_own_method");
92 // this is a instance->method
95 objv[objc++] = tclctx->my;
96 break;
97 }
99 case MkCallS_static:
100//printLTxt("MkCallS_other_method OR MkCallS_static");
101 objv[objc++] = call->my;
102 break;
103 case MkCallS_proc:
104//printLTxt("MkCallS_proc");
105 break;
106 case MkCallS_init: {
107 check_META(MK(ProcResolve)(MK_RT_CALL interp, MkOBJ(mqctx), call)) goto error_mq;
108 goto rescan;
109 }
110 case MkCallS_error:
111//printLTxt("MkCallS_error");
112 goto error;
113 case MkCallS_null:
114//printLTxt("MkCallS_null");
115 return MK_OK;
116 }
117
118 // 4. setup methode
119 if (call->mth) objv[objc++] = call->mth;
120
121 // 5. setup CTX arg
122 switch (call->type) {
124 break;
126 case MkCallS_static:
127 case MkCallS_proc:
128 objv[objc++] = META2VAL_X(mqctx);
129 break;
130 case MkCallS_init:
131 break;
132 case MkCallS_error:
133 goto error;
134 case MkCallS_null:
135 return MK_OK;
136 }
137
138 if (call->args) MK(ProcResolveAppendArgs)(call,&objc,objv);
139
140//printAryL("__data__", objc, objv);
141
142 // 3. call the callback
143 //int ret = Tcl_EvalObjv (interp, objc, objv, TCL_EVAL_GLOBAL);
144 int ret = MK(EvalObjv) (interp, objc, objv, TCL_EVAL_GLOBAL);
145
146//printV("ret=%i, code=%s\n", ret, MkLogErrorE(MkErrorGetCode_0E()))
147
148 if (ret == TCL_OK) {
149 Tcl_ResetResult(interp);
150 return MkErrorGetCode_0E();
151 }
152
153error:
154//ME
156//MkErrorLog_0E();
157
158error_mq:
159 return MkErrorStack_0E();
160}
#define SETUP_selfO
#define check_META(code)
#define META2VAL_X(x)
#define OT_ERROR_LNG_2_META(m)
#define MkProcResolve_maxArgsLen
Tcl_Obj * OT_OBJ_T
#define SETUP_interp
#define SETUP_my
Definition MqCall_tcl.c:44
#define mqctx
Definition MqCall_tcl.c:13
#define MkErrorGetCode_0E()
#define MkErrorStack_0E()
MK_OK
#define MkOBJ(x)
#define MQ_SERVICE_CALL_CHECK
enum MqCallE call
OT_OBJ_T mth
OT_ENV_T interp

◆ tclmqmsgque_ServiceCopy()

void tclmqmsgque_ServiceCopy ( MQ_SERVICE_COPY_ARGS )

Definition at line 170 of file MqCall_tcl.c.

171{
172 MK(CallCopy)(MK_RT_CALL MkOBJ(mqctx), dataP);
173}

◆ tclmqmsgque_ServiceFree()

void tclmqmsgque_ServiceFree ( MQ_SERVICE_FREE_ARGS )

Definition at line 162 of file MqCall_tcl.c.

163{
165 if ( interp == NULL || Tcl_InterpDeleted(interp)) return;
166
167 MK(CallFree) (dataP);
168}

Variable Documentation

◆ tclmqmsgque_MqContextC

MQ_TCL_EXTERN_DATA __thread OT_CLS_T tclmqmsgque_MqContextC

Definition at line 112 of file LibMqMsgque_tcl.h.

◆ tclmqmsgque_MqContextC_MK_NULL

MQ_TCL_EXTERN_DATA __thread OT_OBJ_T tclmqmsgque_MqContextC_MK_NULL

Definition at line 113 of file LibMqMsgque_tcl.h.

◆ tclmqmsgque_MqDumpC

MQ_TCL_EXTERN_DATA __thread OT_CLS_T tclmqmsgque_MqDumpC

Definition at line 130 of file LibMqMsgque_tcl.h.

◆ tclmqmsgque_MqDumpC_MK_NULL

MQ_TCL_EXTERN_DATA __thread OT_OBJ_T tclmqmsgque_MqDumpC_MK_NULL

Definition at line 131 of file LibMqMsgque_tcl.h.

◆ tclmqmsgque_MqFactoryC

MQ_TCL_EXTERN_DATA __thread OT_CLS_T tclmqmsgque_MqFactoryC

Definition at line 148 of file LibMqMsgque_tcl.h.

◆ tclmqmsgque_MqFactoryC_MK_NULL

MQ_TCL_EXTERN_DATA __thread OT_OBJ_T tclmqmsgque_MqFactoryC_MK_NULL

Definition at line 149 of file LibMqMsgque_tcl.h.