I am importing external C code using the ucb block to be used both under sysbld autocode. Therefore, I am using "sa_user.c" template for the UCB.
The basic functionality works fine under both sysbld and autocode simulation.
I would like to use SIM API functions from the ucb code while running under sysbld. I can protect the sim API function from being called when running with autocode using "#ifdef SBUSER".
However, the problem is that simAPI function to gather information on the current UCB requires, as input, a pointer to the iinfo structure:
SIMAPI_GetUCBBlockInfo(int *iinfo, SB **SBptr, BLK **BLKptr)
The function prototype for main ucb function for this template:
void USR01(INFO,T,U,NU,X,XDOT,NX,Y,NY,RP,IP)
struct STATUS_RECORD *INFO ;
RT_DURATION T ;
.....
does not provide access to the iinfo strcutre (which is usaualy passed as an input argument to the ucb functions based on sybld usr01.c template).
Is there a way to get around that?
I would try to create an integer array and set the content. However, I do not have any information about what should be the size and values of this array.
Thanks
Farshid