I was able to successfully reproduce what you wanted me to try: cam.GetParameterValueType(sdk.Picam...) returned a 5, and passing 0 to cam.GetParameterValueType returned a 0 with no error.
Continuing to operate on the picam branch, I was also able to instantiate an sdk.Picam() object which is a step in the right direction relative to where I was at a couple weeks ago. I continued with my ideal_simple_acquire.py script by running:
import instrumental.drivers.cameras.picam as sdk
picam = sdk.Picam()
picam.connect_demo_camera(1203, 'demo')
deviceArray, deviceCount = picam.get_available_camera_IDs()
but got the error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: not enough values to unpack (expected 2, got 1)
but a quick workaround is:
deviceArray = picam.get_available_camera_IDs()
deviceCount = len(deviceArray)
(the doc string says this function returns an ID_array and the ID_array count, so I think it may be worth opening up an issue on github. Anyway --) Getting a PicamCamera() object is the ultimate goal as that allows me to get and set camera parameters (e.g. sensor temperature, exposure time) and also returns a 2D numpy array of the sensor values. I attempted to get that by trying:
proEM = picam.open_camera(deviceArray[0], 'proEM')
but got the error:
Traceback (most recent call last):
File "C:\Users\Jason\Anaconda3\lib\site-packages\nicelib\nicelib.py", line 197, in make_c_args
c_args.append(handler.make_c_arg(self.ffi, py_arg))
File "C:\Users\Jason\Anaconda3\lib\site-packages\nicelib\nicelib.py", line 279, in make_c_arg
return _wrap_inarg(ffi, self.c_argtype, arg_value)
File "C:\Users\Jason\Anaconda3\lib\site-packages\nicelib\nicelib.py", line 756, in _wrap_inarg
"got '{}'".format(argtype, arg))
TypeError: A value castable to (or a valid initializer for) '<ctype 'struct PicamCameraID *'>' is required, got '<PicamCameraID(model=<Model.ProEMHS512BExcelon: 1203>, serial_number=b'demo:Demo')>'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\Jason\Instrumental\instrumental\drivers\cameras\picam.py", line 970, in open_camera
nice_cam = NicePicamLib.Camera(cam_id)
File "C:\Users\Jason\Anaconda3\lib\site-packages\nicelib\nicelib.py", line 662, in __init__
handles = self._init_func(*args) if self._init_func else args
File "C:\Users\Jason\Anaconda3\lib\site-packages\nicelib\nicelib.py", line 1142, in __call__
c_args = self.sig.make_c_args(args)
File "C:\Users\Jason\Anaconda3\lib\site-packages\nicelib\nicelib.py", line 203, in make_c_args
raise TypeError(msg)
so it looks like picam.get_available_camera_IDs() returns the actual PicamCameraID (which makes sense) but picam.open_camera() wants the pointer to the PicamCameraID. A workaround is to work through NicePicamLib directly:
lib = sdk.NicePicamLib
ids, ids_count = lib.GetAvailableCameraIDs()
proEM = picam.open_camera(ids[0], 'proEM')
but then get this error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\Jason\Instrumental\instrumental\drivers\cameras\picam.py", line 971, in open_camera
self.add_camera(cam_name, nice_cam)
File "C:\Users\Jason\Instrumental\instrumental\drivers\cameras\picam.py", line 965, in add_camera
self.cameras[cam_name] = PicamCamera(cam_name, nice_cam, self)
TypeError: __init__() takes 3 positional arguments but 4 were given
and that's where I'm at currently. I tried looking through open_camera, add_camera, and PicamCamera but couldn't find any workarounds.
Not exactly sure this is the direction you wanted to take with the picam branch, but I thought I should update you on my progress. I think we are getting somewhere, though!