- sliceByteBuffer() was not setting native order on the duplicated buffer.
This caused all array-copyin functions to generate bad values.
- Correctly handle unsigned byte and unsigned short values. These could
read/write to bad locations previously.
- Implement custom version of imaqReadFile() to always pass in NULL for
the colorTable. Eventually a more-complete version should be written.
Also this works around a crash in imaqGetErrorText() by not calling it from
throwJavaException(). It's not clear why imaqGetErrorText() is crashing at
present (my best guess is there's still something fishy with multiple C++
lib versions getting loaded somehow), as this used to work. Instead,
the exception now just gives the error code without the error message,
which is not user friendly but at least doesn't crash. This will be fixed
in a future commit by creating our own version of imaqGetErrorText() based
on the information available in the header file.
Change-Id: I4d099e62ee41f8e2a50089806561be191cb5d9d7
This includes getters, setters, video mode enumerate, and get image data.
These are necessary to improve the CameraServer code performance.
Also clean up unused return generation.
Change-Id: I3e7365e046d0ea9370586c5158138a5b07e20218
The API is basically the same as the C++ one.
The JNI function for Priv_ReadJPEGString_C was manually renamed, since the
python scripts don't name the C++ functions correctly, causing an
UnsatisfiedLinkError at runtime. If further changes are made to the bindings,
either the method will have to be manually renamed again after the code is
regenerated, or the python scripts will have to be updated.
The old ignored edu.wpi.first.wpilibj.camera package was removed.
Change-Id: Icd37fc15c7bb41061568c3b2f580c6765cbf0300
- IMAQdx typedef overrides were being ignored, resulting in incorrect types
(e.g. IMAQdxSession was a long instead of an int).
- Allocated byte buffers byte order was not being set.
- imaqDispose was incorrectly named.
Change-Id: I5d038d45e82755615f0a5bb928defb98f557f93e
Quite a few functions aren't wrapped, but the most critical ones for
vision should be.
This also fixes a couple of issues:
- nivision_arm.ini (and imaqdx_arm.ini) are now generated without need for
running the output on the RoboRIO.
- enum values are generated even if the value is not directly specified.
Only very basic testing performed to date.
The wrappers are still a bit incomplete (some structures and functions),
but are much more complete than the old ones.
Fixes artf3796.
Changes from initial changeset:
- Use // for comments.
- Add auto-generate notices to the beginning of each generated file.
- Include error number with error text in exception.
- Add free() function to structures.
- Fix out-of-order / non-array enums.
- Avoid duplicate calls to DisposedStruct.write() as .getAddress() does it.
- Refactor OpaqueStruct.
- Default to no null allowed except when overridden.
- Implement unowned return values.
- Add gen_struct_sizer script.
Change-Id: Ie0d102c45817ea8812d98fe4938d1a2255c61664