Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
6c74056
MdsLib: include libroutines.h
mwinkel-dev Feb 26, 2025
f8a2014
MACOS_ARM64: calling LibCallgFfi
mwinkel-dev Feb 27, 2025
f7809f1
LibCallgFfi: added the function
mwinkel-dev Feb 27, 2025
2cb8f00
LibCallgFfi: enums defined
mwinkel-dev Mar 9, 2025
0f5a609
LibCallgFfi: enum members renamed VA_N_FIXED_ARGS
mwinkel-dev Mar 9, 2025
0b72e17
LibCallgFfi: define MDSPLUS_USE_FFI
mwinkel-dev Mar 12, 2025
f5aa189
LibCallgFfi: revisions as per review of PR 2877
mwinkel-dev Mar 12, 2025
c83e5f7
LibCallgFfi: added status = to the t4012.c device to prevent compiler…
mwinkel-dev Mar 12, 2025
b578585
fixed_args: changes to TdiCall.c
mwinkel-dev Feb 28, 2025
541a700
LibCallgFfi: now uses NOT_VARIADIC in TdiCall.c
mwinkel-dev Mar 9, 2025
4de5070
TdiCall: switch to MDSPLUS_USE_FFI, etc
mwinkel-dev Mar 12, 2025
f6f8b90
TdiCall: fix indentation
mwinkel-dev Mar 12, 2025
98c6516
fixed_args: change to lex
mwinkel-dev Feb 27, 2025
f14eb74
fixed_args: update Java and TDI tests
mwinkel-dev Feb 26, 2025
835cc4c
TdiCall: refactor the LibCallg sections
mwinkel-dev Mar 13, 2025
88ac58f
LibCallgFfi: eliminate MDS_BYPASS_FFI define by adding boolean parame…
mwinkel-dev Mar 14, 2025
6701827
TdiCall: ignore compiler warning about unused parameter
mwinkel-dev Mar 15, 2025
1b3acbc
TdiCall: remove unnecessary strdup and strtok
mwinkel-dev Mar 15, 2025
1820abc
LibCallgFfi: add comments about limitations
mwinkel-dev Mar 15, 2025
f11cdba
TdiCall: changes reviewer suggested re tdi_call()
mwinkel-dev Mar 18, 2025
176dc1b
TdiCall: fix bypass_ffi declaration
mwinkel-dev Mar 18, 2025
04391f2
TdiCall: fix num_fixed_args declaration
mwinkel-dev Mar 18, 2025
b57f013
TdiExtFunction: now only executes TDI *.fun files
mwinkel-dev Mar 21, 2025
d4bbe2f
TdiExtFunction: remove rest of unneded code
mwinkel-dev Mar 22, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -1232,6 +1232,13 @@ AH_VERBATIM([MACOS_ARM64],[
#endif
])

AH_VERBATIM([MDSPLUS_USE_FFI],[
// List of platforms that need libffi for variadic functions.
#if defined(MACOS_ARM64)
#define MDSPLUS_USE_FFI
#endif
])

dnl add here what goes on bottom of mdsconfig.h
AH_BOTTOM(
#endif // _MSC_VER else
Expand Down
16 changes: 16 additions & 0 deletions include/libroutines.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,22 @@
/// defined in MdsShr.so

extern void *LibCallg();

#ifdef MDSPLUS_USE_FFI
extern void *LibCallgFfi();
enum MDS_FFI_Rtype {
MDS_FFI_RTN_VOID = 0,
MDS_FFI_RTN_POINTER = 1,
MDS_FFI_RTN_INT32 = 2,
MDS_FFI_RTN_INT64 = 3
};
#endif
#ifdef MDSPLUS_USE_FFI
#define LIB_CALL_G(args, routine, fixed, rtype) (int)(intptr_t)LibCallgFfi(args, routine, fixed, rtype)
#else
#define LIB_CALL_G(args, routine, fixed, rtype) (int)(intptr_t)LibCallg(args, routine)
#endif

extern int LibCreateVmZone(ZoneList **const zone);
extern int LibDeleteVmZone(ZoneList **const zone);
extern int LibResetVmZone(ZoneList **const zone);
Expand Down
4 changes: 2 additions & 2 deletions java/mdsplus-api/src/main/java/mds/Mds.java
Original file line number Diff line number Diff line change
Expand Up @@ -569,8 +569,8 @@ protected final int MdsEND_ARG()
if (this.mds_end_arg == 0)
try
{
if (this.getDescriptor("TdiShr->TdiPi(val(0),val(1))").toLong() == 1) //
this.mds_end_arg = 1;
if (this.getDescriptor("TdiShr->TdiPi#1(val(0),val(1))").toLong() == 1)
this.mds_end_arg = 1;
else
this.mds_end_arg = -1;
}
Expand Down
2 changes: 1 addition & 1 deletion java/mdsplus-api/src/test/java/mds/MdsShr_Test.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public final void testMdsCompress() throws MdsException
{
ARRAY<?> ca;
Assert.assertEquals("Set_Range(15000,0 /*** etc. ***/)", MdsShr_Test.mds.getString(
"_a=DATA(0:29999:2);_s=MdsShr->MdsCompress(0,0,xd(_a),xd(_a));_s=TdiShr->TdiDecompile(xd(_a),xd(_a),val(1));_a"));
"_a=DATA(0:29999:2);_s=MdsShr->MdsCompress(0,0,xd(_a),xd(_a));_s=TdiShr->TdiDecompile#1(xd(_a),xd(_a),val(1));_a"));
Assert.assertEquals("Set_Range(15000,0 /*** etc. ***/)",
(ca = MdsShr_Test.mdsshr.mdsCompress(null, new Range(0, 29999, 2).getDataA())).decompile());
Assert.assertEquals(10, ca.getDataA().toInt(5));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public final void testARRAY() throws MdsException
{ 8, 0, 5, 4, 16, 0, 0, 0, 0, 0, 48, 1, 8, 0, 0, 0, 0, 16, -91, -44, -24, 0, 0, 0 }, test.serializeArray());
Assert.assertEquals("ABS([1000000000000QU])",
Descriptor_A_Test.mds.getString(
"_a=*;_s=MdsShr->MdsSerializeDscIn(ref($),xd(_a));_s=TdiShr->TdiDecompile(xd(_a),xd(_a),val(1));_a",
"_a=*;_s=MdsShr->MdsSerializeDscIn(ref($),xd(_a));_s=TdiShr->TdiDecompile#1(xd(_a),xd(_a),val(1));_a",
Function.ABS(new Uint64Array(1000000000000l)).serializeDsc()));
Assert.assertEquals("Build_Signal([1D0,2D0,3D0], *, [1Q,2Q,3Q])",
new Signal(new Float64Array(1, 2, 3), null, new Int64Array(1, 2, 3)).decompile());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public final void testARRAY() throws MdsException
{ 8, 0, 5, 4, 16, 0, 0, 0, 0, 0, 48, 1, 8, 0, 0, 0, 0, 16, -91, -44, -24, 0, 0, 0 }, test.serializeArray());
Assert.assertEquals("ABS([1000000000000QU])",
Descriptor_CA_Test.mds.getString(
"_a=*;_s=MdsShr->MdsSerializeDscIn(ref($),xd(_a));_s=TdiShr->TdiDecompile(xd(_a),xd(_a),val(1));_a",
"_a=*;_s=MdsShr->MdsSerializeDscIn(ref($),xd(_a));_s=TdiShr->TdiDecompile#1(xd(_a),xd(_a),val(1));_a",
Function.ABS(new Uint64Array(1000000000000l)).serializeDsc()));
Assert.assertEquals("Build_Signal([1D0,2D0,3D0], *, [1Q,2Q,3Q])",
new Signal(new Float64Array(1, 2, 3), null, new Int64Array(1, 2, 3)).decompile());
Expand Down
12 changes: 6 additions & 6 deletions javamds/mdsobjects.c
Original file line number Diff line number Diff line change
Expand Up @@ -1441,7 +1441,7 @@ JNIEXPORT jobject JNICALL Java_MDSplus_Data_compile(JNIEnv *env,
arglist[varIdx++] = &outXd;
arglist[varIdx++] = MdsEND_ARG;
*(int *)&arglist[0] = varIdx - 1;
status = (int)(intptr_t)LibCallg(arglist, TdiCompile);
status = LIB_CALL_G(arglist, TdiCompile, 1, MDS_FFI_RTN_INT32);
(*env)->ReleaseStringUTFChars(env, jexpr, expr);
for (i = 0; i < numArgs; i++)
FreeDescrip(arglist[2 + i]);
Expand Down Expand Up @@ -1553,7 +1553,7 @@ JNIEXPORT jobject JNICALL Java_MDSplus_Data_execute(JNIEnv *env,
arglist[varIdx++] = &outXd;
arglist[varIdx++] = MdsEND_ARG;
*(int *)&arglist[0] = varIdx - 1;
status = (int)(intptr_t)LibCallg(arglist, TdiCompile);
status = LIB_CALL_G(arglist, TdiCompile, 1, MDS_FFI_RTN_INT32);
(*env)->ReleaseStringUTFChars(env, jexpr, expr);
for (i = 0; i < numArgs; i++)
FreeDescrip(arglist[2 + i]);
Expand Down Expand Up @@ -2235,7 +2235,7 @@ JNIEXPORT jobject JNICALL Java_MDSplus_Tree_compile(JNIEnv *env,
arglist[varIdx++] = &outXd;
arglist[varIdx++] = MdsEND_ARG;
*(int *)&arglist[0] = varIdx - 1;
status = (int)(intptr_t)LibCallg(arglist, _TdiCompile);
status = LIB_CALL_G(arglist, _TdiCompile, 2, MDS_FFI_RTN_INT32);
(*env)->ReleaseStringUTFChars(env, jexpr, expr);
for (i = 0; i < numArgs; i++)
FreeDescrip(arglist[3 + i]);
Expand Down Expand Up @@ -2291,7 +2291,7 @@ JNIEXPORT jobject JNICALL Java_MDSplus_Tree_execute(JNIEnv *env,
arglist[varIdx++] = &outXd;
arglist[varIdx++] = MdsEND_ARG;
*(int *)&arglist[0] = varIdx - 1;
status = (int)(intptr_t)LibCallg(arglist, _TdiExecute);
status = LIB_CALL_G(arglist, _TdiExecute, 2, MDS_FFI_RTN_INT32);
(*env)->ReleaseStringUTFChars(env, jexpr, expr);
for (i = 0; i < numArgs; i++)
FreeDescrip(arglist[3 + i]);
Expand Down Expand Up @@ -2331,7 +2331,7 @@ JNIEXPORT jobject JNICALL Java_MDSplus_Tree_data(JNIEnv *env,
arglist[3] = &outXd;
arglist[4] = MdsEND_ARG;
*(int *)&arglist[0] = 4;
status = (int)(intptr_t)LibCallg(arglist, _TdiData);
status = LIB_CALL_G(arglist, _TdiData, 2, MDS_FFI_RTN_INT32);
FreeDescrip(arglist[2]);
if (STATUS_NOT_OK)
{
Expand Down Expand Up @@ -2370,7 +2370,7 @@ JNIEXPORT jobject JNICALL Java_MDSplus_Tree_evaluate(JNIEnv *env,
arglist[3] = &outXd;
arglist[4] = MdsEND_ARG;
*(int *)&arglist[0] = 4;
status = (int)(intptr_t)LibCallg(arglist, _TdiEvaluate);
status = LIB_CALL_G(arglist, _TdiEvaluate, 2, MDS_FFI_RTN_INT32);
FreeDescrip(arglist[2]);
if (STATUS_NOT_OK)
{
Expand Down
12 changes: 6 additions & 6 deletions mdslib/MdsLib.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <mdsshr.h>
#include <stdint.h>
#include <strroutines.h>
#include <libroutines.h>
static int MdsCONNECTION = -1;
#define NDESCRIP_CACHE 1024
#ifndef _CLIENT_ONLY
Expand All @@ -42,7 +43,6 @@ extern int TdiExecute(mdsdsc_t *, ...);
extern int TdiCompile(mdsdsc_t *, ...);
extern int TdiData(mdsdsc_t *, ...);
extern int TdiCvt(mdsdsc_t *, ...);
extern void *LibCallg();
extern int TreeFindNode();
extern int TreePutRecord();
extern int TreeWait();
Expand Down Expand Up @@ -640,7 +640,7 @@ static inline int mds_value_vargs(va_list incrmtr, int connection,
arglist[argidx++] = (void *)&xd1;
arglist[argidx++] = MdsEND_ARG;
*(int *)&arglist[0] = argidx - 1;
status = (int)(intptr_t)LibCallg(arglist, TdiExecute);
status = LIB_CALL_G(arglist, TdiExecute, 1, MDS_FFI_RTN_INT32);

if (STATUS_OK)
{
Expand Down Expand Up @@ -898,7 +898,7 @@ static inline int mds_value2_vargs(va_list incrmtr, int connection,
arglist[argidx++] = (void *)&xd1;
arglist[argidx++] = MdsEND_ARG;
*(int *)&arglist[0] = argidx - 1;
status = (int)(intptr_t)LibCallg(arglist, TdiExecute);
status = LIB_CALL_G(arglist, TdiExecute, 1, MDS_FFI_RTN_INT32);

if (STATUS_OK)
{
Expand Down Expand Up @@ -1062,7 +1062,7 @@ static inline int mds_put_vargs(va_list incrmtr, int connection, char *pathname,
arglist[argidx++] = MdsEND_ARG;
*(int *)&arglist[0] = argidx - 1;

status = (int)(intptr_t)LibCallg(arglist, TdiCompile);
status = LIB_CALL_G(arglist, TdiCompile, 1, MDS_FFI_RTN_INT32);

if (STATUS_OK)
{
Expand Down Expand Up @@ -1205,7 +1205,7 @@ static int mds_put2_vargs(va_list incrmtr, int connection, char *pathname,
arglist[argidx++] = MdsEND_ARG;
*(int *)&arglist[0] = argidx - 1;

status = (int)(intptr_t)LibCallg(arglist, TdiCompile);
status = LIB_CALL_G(arglist, TdiCompile, 1, MDS_FFI_RTN_INT32);

if (STATUS_OK)
{
Expand Down Expand Up @@ -1334,7 +1334,7 @@ extern EXPORT int *cdescr(int dtype, void *data, ...)
va_end(incrmtr);
arglist[argidx++] = MdsEND_ARG;
*(int *)&arglist[0] = argidx - 1;
status = (int)(intptr_t)LibCallg(arglist, descr);
status = LIB_CALL_G(arglist, descr, 3, MDS_FFI_RTN_INT32);
return (&status);
}
#endif
Expand Down
4 changes: 2 additions & 2 deletions mdslibidl/MdsLibIdl.c
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ EXPORT int IdlMdsValue(int argc, void **argv)
arglist[argidx++] = (void *)&tmp;
arglist[argidx++] = MdsEND_ARG;
*(long *)&arglist[0] = argidx;
status = (int)(intptr_t)LibCallg(arglist, TdiExecute);
status = LIB_CALL_G(arglist, TdiExecute, 1, MDS_FFI_RTN_INT32);
if (STATUS_OK)
{
status = TdiData(tmp.pointer, &mdsValueAnswer MDS_END_ARG);
Expand Down Expand Up @@ -626,7 +626,7 @@ EXPORT int IdlMdsPut(int argc, void **argv)
arglist[argidx++] = (void *)&tmp;
arglist[argidx++] = MdsEND_ARG;
*(int *)&arglist[0] = argidx;
status = (int)(intptr_t)LibCallg(arglist, TdiCompile);
status = LIB_CALL_G(arglist, TdiCompile, 1, MDS_FFI_RTN_INT32);
if (STATUS_OK)
{
status = TreePutRecord(nid, (struct descriptor *)&tmp, 0);
Expand Down
4 changes: 2 additions & 2 deletions mdsobjects/cpp/mdsdata.c
Original file line number Diff line number Diff line change
Expand Up @@ -497,11 +497,11 @@ void *compileFromExprWithArgs(char *expr, int nArgs, void **args, void *tree,

if (ctx)
{
status = *retStatus = (int)(intptr_t)LibCallg(arglist, _TdiCompile);
status = *retStatus = LIB_CALL_G(arglist, _TdiCompile, 2, MDS_FFI_RTN_INT32);
}
else
{
status = *retStatus = (int)(intptr_t)LibCallg(arglist, TdiCompile);
status = *retStatus = LIB_CALL_G(arglist, TdiCompile, 1, MDS_FFI_RTN_INT32);
}
if (STATUS_NOT_OK)
return NULL;
Expand Down
2 changes: 1 addition & 1 deletion mdsobjects/cpp/mdsobjects.c
Original file line number Diff line number Diff line change
Expand Up @@ -987,7 +987,7 @@ JNIEXPORT jobject JNICALL Java_mdsdata_Data_compileWithArgs(
arglist[varIdx++] = (struct descriptor *)&outXd;
arglist[varIdx++] = MdsEND_ARG;
*(int *)&arglist[0] = varIdx - 1;
LibCallg(arglist, TdiCompile);
LIB_CALL_G(arglist, TdiCompile, 1, MDS_FFI_RTN_INT32);
for (i = 0; i < argLen; i++)
freeDescrip(arglist[2 + i]);
(*env)->ReleaseStringUTFChars(env, jexpr, expr);
Expand Down
2 changes: 1 addition & 1 deletion mdsobjects/cpp/testing/MdsExpressionCompileTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const char *PubCmds[] = {
const int PubNCmd = sizeof(PubCmds) / sizeof(*PubCmds);

const char *TreeCmds[] = {
"_a=*;ext_function('TreeShr','TreeCtx')",
"_a=*;TreeShr->TreeCtx()",
};
const int TreeNCmd = sizeof(TreeCmds) / sizeof(*TreeCmds);

Expand Down
82 changes: 82 additions & 0 deletions mdsshr/librtl.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <sys/time.h>
#include <time.h>
#include <unistd.h>
#include <assert.h>
#include <mdsshr.h>
#include <_mdsshr.h>

Expand All @@ -62,8 +63,14 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <strroutines.h>
#include "mdsthreadstatic.h"

#ifdef MDSPLUS_USE_FFI
#include <ffi.h>
#endif

#define LIBRTL_SRC

#define LIBCALLG_MAX_ARGS 32

typedef struct
{
char *env;
Expand Down Expand Up @@ -280,6 +287,81 @@ EXPORT void *LibCallg(void **const a, void *(*const routine)())
return 0;
}


#ifdef MDSPLUS_USE_FFI
// This routine can call many external functions, but not all.
// Each parameter can be passed by reference or by value.
// However call-by-value must have a "size" that fits in a pointer.
// If the external function does not fit that constraint, users will have to write a shim function.
EXPORT void *LibCallgFfi(void **const a, void *(*const routine)(), int num_fixed_args, int rtype)
{
assert(routine); // in DEBUG mode checks for stack corruption

// The "a" parameter is the arglist for the "routine" and contains the following:
// arglist[0] = N (total number of args excluding first and last elements of vector)
// arglist[1] = expression for TDI intrinsics, otherwise an ordinary arg
// arglist[2 .. N-1] = variable args (pointer to descriptors)
// arglist[N] = result xd1 descriptor
// arglist[N+1] = NULL
int num_args = *(int *)a & 0xff;

// Usually the check for non-variadic routines,and the associated call of LibCallg(), is
// done prior to calling this function.
if (num_fixed_args == 0) {
return LibCallg(a, routine);

} else {
ffi_cif cif;
ffi_type *arg_types[LIBCALLG_MAX_ARGS];
void *values[LIBCALLG_MAX_ARGS];
void *result;

if (num_args > LIBCALLG_MAX_ARGS) {
printf("Error - currently no more than %d arguments supported on external calls\n", LIBCALLG_MAX_ARGS);
return 0;
}

if ((num_fixed_args < 1) || (num_fixed_args > num_args)) {
printf("Error - number of 'fixed' arguments must be in the range 1 through %d\n", num_args);
return 0;
}

// Skip over first element because it is number of args, not an actual argument
for (int i=0; i <num_args; i++) {
arg_types[i] = &ffi_type_pointer;
values[i] = &a[i+1];
}

ffi_status prep_stat;
switch(rtype) {
case MDS_FFI_RTN_VOID:
prep_stat = ffi_prep_cif_var(&cif, FFI_DEFAULT_ABI, num_fixed_args, num_args, &ffi_type_void, arg_types);
break;
case MDS_FFI_RTN_POINTER:
prep_stat = ffi_prep_cif_var(&cif, FFI_DEFAULT_ABI, num_fixed_args, num_args, &ffi_type_pointer, arg_types);
break;
case MDS_FFI_RTN_INT32:
prep_stat = ffi_prep_cif_var(&cif, FFI_DEFAULT_ABI, num_fixed_args, num_args, &ffi_type_sint32, arg_types);
break;
case MDS_FFI_RTN_INT64:
prep_stat = ffi_prep_cif_var(&cif, FFI_DEFAULT_ABI, num_fixed_args, num_args, &ffi_type_sint64, arg_types);
break;
default:
prep_stat = ffi_prep_cif_var(&cif, FFI_DEFAULT_ABI, num_fixed_args, num_args, &ffi_type_sint32, arg_types);
break;
}
if (prep_stat == FFI_OK) {
ffi_call(&cif, (void (*)(void))routine, &result, values);
if (rtype != MDS_FFI_RTN_VOID) {
return result;
}
}
}
assert(FALSE); // should never reach this, triggers abort in DEBUG mode
return 0;
}
#endif

DEFINE_INITIALIZESOCKETS;
EXPORT int _LibGetHostAddr(const char *name, const char *portstr, struct sockaddr *sin)
{
Expand Down
11 changes: 8 additions & 3 deletions mitdevices/t4012.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <Xm/List.h>
#include <stdio.h>
#include <time.h>
#include <assert.h>
#include "devroutines.h"

static void Load(Widget w);
Expand Down Expand Up @@ -418,6 +419,7 @@ static int ReadChannel(InStoreStruct * setup, int chunk, int samples, unsigned s
return status;
}

// Usually called without a function, but once is called with TdiData().
static int AccessTraq(InStoreStruct * setup, int data, int memsize, void *arglist,
int (*routine) (struct descriptor *,...))
{
Expand All @@ -434,15 +436,18 @@ static int AccessTraq(InStoreStruct * setup, int data, int memsize, void *arglis
for (try = 0; (try < 30) && (!(CamQ(0) & 1)) && (STATUS_OK); try++) {
if (arglist && !called) {
called = 1;
LibCallg(arglist, routine);
assert(routine == &TdiData);
// Only called with TdiData() which is an intrinsic thus MDS_FFI_RTN_INT32
status = LIB_CALL_G(arglist, routine, 1, MDS_FFI_RTN_INT32);
} else
DevWait((float).001);
piomem(17, 0, &data, memsize);
}
if (try == 30)
status = DEV$_CAM_NOSQ;
if (arglist && !called)
LibCallg(arglist, routine);
if (arglist && !called) {
status = LIB_CALL_G(arglist, routine, 1, MDS_FFI_RTN_INT32);
}
return status;
}

Expand Down
2 changes: 1 addition & 1 deletion tdi/remote/MdsValue.fun
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ call: mdsvalue('2+3 * $,',_p1);
if(mdscurrent() == 'local') {
return(execute(_p1,_p2,_p3,_p4,_p5,_p6,_p7,_p8,_p9,_p10,_p11,_p12,_p13,_p14,_p15,_p16,_p17,_p18,_p10,_p20));
} else {
_oo = "build_call(24,'TdiShrExt','rMdsValue',descr(_p1";
_oo = "build_call(24,'TdiShrExt','rMdsValue#1',descr(_p1";
/* loop through verifying parameters */
for(_i=2;_i<=20; _i++) {
_ss = '_p'//trim(adjustl(_i));
Expand Down
Loading