theLink 10.0
Loading...
Searching...
No Matches
MqHigh_atl.c
Go to the documentation of this file.
1
9/* LABEL-NO */
10
11#define META_FILE_NAME "MqHigh_atl.c"
12
14
15#define OT_CLASS amqrt->AtlMqContextC
16#define OT_NULL amqrt->AtlMqContextC_MK_NULL
17#define OT_CLASS_NAME "MqContextC"
18
19#define SELF2HDL(O) MqCtx(VAL2MNG(O))
20
21#define OT_SETUP_hdl SetupHdlFromMetaData_2(MQ_CTX);
22
23#if !defined(SetupRtFromHdl_XN)
24 #define SetupRtFromHdl_XN(hdl) AllRtSetup_XN(hdl)
25 #define SetupRtFromHdl_X(hdl) AllRtSetup_X(hdl)
26#endif
27
28/* LABEL-END */
29
30#define META_CONTEXT_S hdl
31
34int NS(MqContextC_Send) (MqContextC_ARGS) {
35 //static const MK_STRN doc="[list…] [$ctx Send…]";
36
37#define highSELF "MqContextC::Send $ctx"
38
39#define highSKIP __skip
40#define highSKIP_SHIFT 1
41#define highSIZE objc
42
43#define highSIZE_AVAILABLE 1
44#define highREAD_RETURN_LIST 1
45#define highREAD_HAS_REFERENCE 1
46
47#define highINITcstr OT_CHECK_STR(cstr)
48#define highCMD "%s '%s' ... '%s' ..."
49#define highFARGS(f) NS(ServiceCall),f,NS(ServiceFree)
50
51#define highTRAN(str) OT_CHECK_C_COPY(str,MQ_SEND_TRANSACTION_TOKEN_SIZE)
52#define highTOKEN(str) OT_CHECK_C_COPY(str,MQ_SEND_TOKEN_SIGNATURE_SIZE)
53#define highTIME(t) OT_CHECK_TIME_T(timeout)
54#define highCALL(f) OT_CHECK_CALLABLE(f)
55
56// Tcl has no "easy way" to check for an TCL error set with Tcl_SetObjErrorCode - dito -
57// if it is not a MQ error -> it is an TCL error
58#define highERRORnative if (!MkErrorCheckE_0E()) OT_ERROR_LNG_2_META(mqctx)
59
60#define highRETerror OT_ERROR_META_2_LNG(hdl); retObj = NULL
61
62#define highRETURN highRETURN_type_S
63#define highRETok goto end
64
65#define highSend(T) { \
66 high_T_##T val; \
67 OT_CHECK_REQUIRED(OT_CHECK_##T(val)); \
68 MkErrorCheck(MqSend##T(mqctx,val)); \
69 break; \
70}
71
72#define highSendObj(T) { \
73 high_T_##T val; \
74 OT_CHECK_REQUIRED(OT_CHECK_##T(val,false)); \
75 MkErrorCheck(MqSend##T(mqctx,val)); \
76 break; \
77}
78
79/*
80#define highSendBUF(T) { \
81 high_T_##T val; \
82printObjv; \
83 OT_CHECK_REQUIRED(OT_CHECK_##T(val)); \
84printU(val); \
85 MkErrorCheck(MqSend##T(mqctx,val)); \
86 break; \
87}
88*/
89
90#define highSend_BOL highSend(BOL)
91#define highSend_I8 highSend(I8)
92#define highSend_I16 highSend(I16)
93#define highSend_I32 highSend(I32)
94#define highSend_I64 highSend(I64)
95#define highSend_HDL highSend(HDL)
96#define highSend_FLT highSend(FLT)
97#define highSend_DBL highSend(DBL)
98#define highSend_STR highSend(STR)
99#define highSend_BUF highSendObj(BUF)
100#define highSend_BFL { \
101 MkBufferListCreateTLS_T(bfl,5); \
102 OT_CHECK_REQUIRED(OT_CHECK_BFL(bfl,false)) \
103 MqSendBFL_E(mqctx, bfl); \
104 break; \
105}
106#define highSend_BIN { \
107 MkBinaryR cbi={0}; \
108 OT_CHECK_REQUIRED(OT_CHECK__ME_REF_MkBinaryR(cbi)) \
109 MqSendBIN_E(mqctx, cbi); \
110 break; \
111}
112
113#define highReadRef(T) { \
114 high_T_##T val = 0; \
115 OT_CHECK_REQUIRED(OT_CHECK_LNG_T(readVal)); \
116 MkErrorCheck(MqRead##T(mqctx,&val)); \
117 if (readVal != NULL) { \
118 OT_LNG_SET_VAR(readVal, high_C_##T (val)); \
119 } \
120 break; \
121}
122
123#define highREADprepare
124#define highREADinit readVal=NULL
125
126#define highReadRef_I8 highReadRef(I8);
127#define highReadRef_BOL highReadRef(BOL);
128#define highReadRef_I16 highReadRef(I16);
129#define highReadRef_I32 highReadRef(I32);
130#define highReadRef_I64 highReadRef(I64);
131#define highReadRef_HDL highReadRef(HDL);
132#define highReadRef_FLT highReadRef(FLT);
133#define highReadRef_DBL highReadRef(DBL);
134#define highReadRef_STR highReadRef(STR);
135#define highReadRef_BUF highReadRef(BUF);
136#define highReadRef_BFL highReadRef(BFL);
137#define highReadRef_ARGS highReadRef(A);
138#define highReadRef_BIN { \
139 MkBinaryR cbi; \
140 OT_CHECK_REQUIRED(OT_CHECK_LNG_T(readVal)); \
141 MqReadBIN_E(mqctx, &cbi); \
142 if (readVal) { \
143 OT_LNG_SET_VAR(readVal, OT_TMP_BIN_OBJ(cbi.data,(int)cbi.size)); \
144 } \
145 break; \
146}
147
149 #define error error1
150 OT_SETUP_VARARGS(1,99,highSELF "...");
151 #undef error
152#define mqctx hdl
153 //Tcl_ResetResult(interp);
154 Tcl_Obj *readVal;
155
156 MK_CBP fCall = NULL;
157 MK_STRN cstr = NULL;
158
159// **************************************************************************************************
160#define error high_error
161 #include "tmpl/high_lng.h"
162#undef error
163// ********************************************************************************************
164
165end:
167error1:
168 return TCL_ERROR;
169}
170
172
173// vim: nowrap
#define OT_SETUP_VARARGS(min, max, d)
#define OT_retObj_RETURN
#define NS(n)
#define MqContextC_ARGS
tag: nhi1-release-250425
#define OT_SETUP_hdl
Definition MqHigh_atl.c:21
#define highSELF
const MK_STRB * MK_STRN
MK_PTRB * MK_CBP
tag: nhi1-release-250425