I'm writing a script to run various remote tests, and one of the values I need to get comes in a large struct that currently has 38 members. The IDL has the struct as an "inout" parameter for the function to get this data:

long GetCartridgeInfo(inout CartridgeInfo cartridgeInfo );

The problem is that sometimes members are added or removed, and I don't want to have to update my script just because someone decided stuff a new piece of data into the struct. Is there a way to create an instance of this struct class without having to fill in each of the 38 members? I just need something to pass to the function that doesn't trigger a omniORB.BAD_PARAM_WrongPythonType.

The struct has all sorts of different types, so I can't just do something like:

initArgs = [0] * 38
info = _GlobalIDL.CartridgeInfo(*initArgs)

It looks more like this:

initArgs = [0]*4 + ["0"*16] + ["0"] + ["0"*16] + ["0"*36] + [0]*2 + ["0"*16] + [0]*3 + ["0"*30] + [0.0] + [0]*13 + ["0"*16] + [0]*4 + ["0"*8]
info = _GlobalIDL.CartridgeInfo(*initArgs)

I want to be able to do this without statically defining initArgs:

info = _GlobalIDL.CartridgeInfo(*initArgs)
res = self.orb.GetCartridgeInfo(info)
material = res[1].materialDisplayName

0 Answers