CTYPES structure passing

Rhodri James rhodri at wildebst.demon.co.uk
Thu Jun 3 18:59:38 EDT 2010


On Thu, 03 Jun 2010 11:54:13 +0100, Peter West <peter at 4doptics.com> wrote:

> class LUCAM_FRAME_FORMAT(Structure):
>    __fields__ = [( "xOffset", c_ulong),  # x coordinate on imager of
> top left corner of subwindow in pixels
[snip]
>                 ( "XUnion", FRAME_FORMAT_UNION),
>                 ( "flagsX", c_ushort),   # LUCAM_FRAME_FORMAT_FLAGS_*
>                 ( "YUnion", FRAME_FORMAT_UNION),
>                 ( "flagsY", c_ushort)]
> LP_FRAME_FORMAT = POINTER(LUCAM_FRAME_FORMAT)
> and make the call like this

>    FrameFormat.XUnion = 0

Doesn't this replace the union object with an integer zero?  Do
you mean
     FrameFormat.XUnion.subSample = 0
     FrameFormat.XUnion.binning = 0
instead?

>    FrameFormat.flagsX = 0
>    FrameFormat.YUnion = 0

Ditto here?


-- 
Rhodri James *-* Wildebeeste Herder to the Masses



More information about the Python-list mailing list