﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
4064	string inputs to external object constructor	Volker Waurich	Volker Waurich	"Hi,

String arguments to external object constructors are usually handled like this:

{{{
static const MMC_DEFSTRINGLIT(tmp0,11,""stringinput"");
data->simulationInfo->extObjs[0]  = omc_ExtObj_Name_constructor(threadData, MMC_REFSTRINGLIT(tmp0));
}}}
if the actual external constructor call is reached,it gets as an input 
{{{
MMC_STRINGDATA(_inputArgument)
}}}

These macros put the string in some data structure. The {{{MMC_STRINGDATA}}} does bitshifting to reach the original string.

This is the case for simulation. In FMU-Generation, the original string reaches the constructor call without being transformed to some other structure. Anyway, the bit shifting using {{{MMC_STRINGDATA}}} is applied and hence the string argument to the constructor is incomplete.

So simulation needs the {{{MMC_STRINGDATA}}} call and FMU-generation does not.

How should this problem being adressed? Shall we check if an FMU
should be generated and decide in the template call whether to set the macro or not? Or can we leave these macros at all? (I have no overview where these things are necessary)

Thanks.

"	defect	closed	normal	Future	Code Generation		fixed		Martin Sjölund Willi Braun Adrian Pop
