Using Points in C Functions

From SoftMC-Wiki
Revision as of 13:55, 16 December 2012 by Nurit (talk | contribs)
Jump to: navigation, search

Both non-generic points (bound to a fixed robot-type) and generic points can be passed as arguments to C functions. In addition, both types of points can also serve as C function parameters, differing in PROTO.PRO prototypes, but shareing identical C prototypes.

PROTO.PRO PROTOTYPES FOR FIXED ROBOT-TYPE POINTS

IMPORT_C CFUNC_PNT1(ByVal As Joint Of XYZ) As Joint Of XYZ
IMPORT_C CFUNC_PNT2(As Location Of XYZR, As Location[*] Of XYZR)

PROTO.PRO PROTOTYPES FOR GENERIC POINTS

IMPORT_C CFUNC_PNT1(ByVal As Generic Joint) As Generic Joint
IMPORT_C CFUNC_PNT2(As Generic Location, As Generic Location[*])

C PROTOTYPES FOR BOTH TYPES OF POINTS

SYS_POINT* CFUNC_PNT1(SYS_POINT* PNT1)
void CFUNC_PNT2(SYS_POINT** PNT1, SYS_POINT** PNTARR1)