20"""Alpao deformable mirrors SDK.
25from ctypes
import c_char_p, c_double, c_int, c_size_t, c_uint32
28if os.name
in (
"nt",
"ce"):
29 SDK = ctypes.WinDLL(
"ASDK")
32 SDK = ctypes.CDLL(
"libasdk.so")
35class DM(ctypes.Structure):
39pDM = ctypes.POINTER(DM)
44Scalar_p = ctypes.POINTER(Scalar)
53def make_prototype(name, argtypes, restype=COMPL_STAT):
54 func = getattr(SDK, name)
55 func.argtypes = argtypes
56 func.restype = restype
60Get = make_prototype(
"asdkGet", [pDM, CStr, Scalar_p])
62GetLastError = make_prototype(
63 "asdkGetLastError", [ctypes.POINTER(UInt), CStr, Size_T]
66Init = make_prototype(
"asdkInit", [CStr], pDM)
68Release = make_prototype(
"asdkRelease", [pDM])
70Send = make_prototype(
"asdkSend", [pDM, Scalar_p])
72SendPattern = make_prototype(
"asdkSendPattern", [pDM, Scalar_p, UInt, UInt])
74Set = make_prototype(
"asdkSet", [pDM, CStr, Scalar])
76Stop = make_prototype(
"asdkStop", [pDM])