GenAPI does not handle fixed buffers
See original GitHub issue- This issue is blocking
- This issue is causing unreasonable pain
When using GenAPI on an assembly that contains fixed buffers, it will output the generated fixed buffer structures with unspeakable names, rather than fixed
fields.
Given the following type:
public struct MyFixedBuffer
{
public unsafe fixed int Buffer[64];
}
GenAPI will produce this output:
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
public partial struct MyFixedBuffer
{
public MyFixedBuffer.<Buffer>e__FixedBuffer Buffer;
[System.Runtime.CompilerServices.CompilerGeneratedAttribute]
[System.Runtime.CompilerServices.UnsafeValueTypeAttribute]
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential, Size=256)]
public partial struct <Buffer>e__FixedBuffer
{
public int FixedElementField;
}
}
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Can't fetch buffer · Issue #210 · genicam/harvesters
I am using Allied Vision camera Manta_G-125B, it is GigE Vision camera. ... genapi.RuntimeException: Invalid layout of buffer attached to ...
Read more >GenICam GenTL Standard
GenICam XML description implementation: there is no standardized implementation. The GenApi is only a reference implementation, not a ...
Read more >Image Acquisition Interface for GenICam GenTL compliant ...
Only if the necessary information about the buffer are missing (i.e., the GenTL Producer does not support it) , the current settings are...
Read more >Pylon::CStreamGrabberProxyT
Creates a CStreamGrabberProxyT object that is not attached to a pylon stream grabber. Use the Attach() method to attach the pylon stream grabber....
Read more >How to handle heap allocated fixed length byte buffers?
resize() is called to allocate the required memory and then data can be memcpy ed into .data() . Personally I think std::vector shouldn't...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Should this be transferred to dotnet/sdk since that is now where GenAPI lives? The issue appears to still exist there.
I should note that the
[FixedBuffer]
attribute doesn’t seem to be preserved in the current output, oddly. At least, it didn’t seem to be in the few cases I tested with (all of which were similar to the example in the OP.)