Open ptapping opened 4 years ago
Hi @ptapping
this is an issue with the docstring for the OBPProtocol
. The size
parameter isn't used in the receive method.
The first read of 64bytes is enough to parse the header of the reply sent by the spectrometer and determine if the spectrometer needs to read more data.
https://github.com/ap--/python-seabreeze/blob/ff806a834019e2d5a548d2af629d01c90646fea8/src/seabreeze/pyseabreeze/protocol.py#L294-L345 is basically a minimal implementation of https://github.com/ap--/python-seabreeze/blob/ff806a834019e2d5a548d2af629d01c90646fea8/src/libseabreeze/src/vendors/OceanOptics/protocols/obp/exchanges/OBPTransaction.cpp#L74-L222
This should be better documented...
Cheers, Andreas 😃
spectrometer and system information
current problem
Attempted to add Ocean FX support to pyseabreeze, but the communications were timing out. Seemed like messages or responses might be incorrect sizes. Looked at code and saw this in the pyseabreeze.protocol.OBP.receive() method:
Clearly the
size
parameter is not doing what it says it should do...Not sure if it's related to my problem, but worth raising the issue...