def makeDataObject(num):
"""
Creates the ctypes data object used by both processes - defines the layout
of the shared memory.
"""
class DataBlock(ctypes.Structure):
_fields_ = [("y", ctypes.c_float*(num*3)),
("y10", ctypes.c_float*(num//10*3)),
("y100", ctypes.c_float*(num//100*3)),
("endpoint", ctypes.c_ssize_t),
("startpoint", ctypes.c_ssize_t),
("pltcurrent", ctypes.c_ssize_t)]
return num
评论列表
文章目录