diff options
| author | John Sun <jsun@sightmachine.com> | 2014-04-02 16:22:14 -0700 |
|---|---|---|
| committer | John Sun <jsun@sightmachine.com> | 2014-04-02 16:22:14 -0700 |
| commit | 01e24424971ffa9faa5dabf2e6724cea997a2afb (patch) | |
| tree | 8882d0e2c93e2a1f74178c21b6bffa02a2edee16 /vimbastructure.py | |
| parent | 54bec3f39dc7915593a29c22ed1aac0e29ab53b6 (diff) | |
| download | pymba-01e24424971ffa9faa5dabf2e6724cea997a2afb.tar.gz pymba-01e24424971ffa9faa5dabf2e6724cea997a2afb.zip | |
First pass at making pymba a pip installable module.
1) Moved all the source-code under a new folder "pyvimba". Yes I changed the name. Feel free to change it back
2) Added initial CHANGES.txt, MANIFEST.in, LICENSE, README.txt
3) Move opencv_example.py to "tests" directory
Diffstat (limited to 'vimbastructure.py')
| -rw-r--r-- | vimbastructure.py | 99 |
1 files changed, 0 insertions, 99 deletions
diff --git a/vimbastructure.py b/vimbastructure.py deleted file mode 100644 index 7b1e65c..0000000 --- a/vimbastructure.py +++ /dev/null @@ -1,99 +0,0 @@ -# -*- coding: utf-8 -*- -from ctypes import * - - -class VimbaVersion(Structure): - _fields_ = [('major', c_uint32), - ('minor', c_uint32), - ('patch', c_uint32)] - - -class VimbaInterfaceInfo(Structure): - _fields_ = [('interfaceIdString', c_char_p), # Unique identifier for each interface - ('interfaceType', c_uint32), # Interface type, see VmbInterfaceType - ('interfaceName', c_char_p), # Interface name, given by the transport layer - ('serialString', c_char_p), # Serial number - ('permittedAccess', c_uint32)] # Used access mode, see VmbAccessModeType - - def getFieldNames(self): - """ - Get field names. - """ - return [field[0] for field in self._fields_] - - -class VimbaCameraInfo(Structure): - _fields_ = [('cameraIdString', c_char_p), # Unique identifier for each camera - ('cameraName', c_char_p), # Name of the camera - ('modelName', c_char_p), # Model name - ('serialString', c_char_p), # Serial number - ('permittedAccess', c_uint32), # Used access mode, see VmbAccessModeType - ('interfaceIdString', c_char_p)] # Unique value for each interface or bus - - def getFieldNames(self): - """ - Get field names. - """ - return [field[0] for field in self._fields_] - - -class VimbaFeatureInfo(Structure): - - _fields_ = [('name', c_char_p), - ('featureDataType', c_uint32), - ('featureFlags', c_uint32), - ('category', c_char_p), - ('displayName', c_char_p), - ('pollingTime', c_uint32), - ('unit', c_char_p), - ('representation', c_char_p), - ('visibility', c_uint32), - ('tooltip', c_char_p), - ('description', c_char_p), - ('sfncNamespace', c_char_p), - ('isStreamable', c_bool), - ('hasAffectedFeatures', c_bool), - ('hasSelectedFeatures', c_bool)] - - def getFieldNames(self): - """ - Get field names. - """ - return [field[0] for field in self._fields_] - - -class VimbaFrame(Structure): - - # IN - _fields_ = [('buffer', c_void_p), # Comprises image and ancillary data - ('bufferSize', c_uint32), # Size of the data buffer - - ('context', c_void_p * 4), # User context filled during queuing - - # OUT - ('receiveStatus', c_int32), # Resulting status of the receive operation - ('receiveFlags', c_uint32), # Resulting flags of the receive operation - - ('imageSize', c_uint32), # Size of the image data inside the data buffer - ('ancillarySize', c_uint32), # Size of the ancillary data inside the data buffer - - ('pixelFormat', c_uint32), # Pixel format of the image - - ('width', c_uint32), # Width of an image - ('height', c_uint32), # Height of an image - ('offsetX', c_uint32), # Horizontal offset of an image - ('offsetY', c_uint32), # Vertical offset of an image - - ('frameID', c_uint64), # Unique ID of this frame in this stream - ('timestamp', c_uint64)] # Timestamp of the data transfer - - def getFieldNames(self): - """ - Get field names. - """ - return [field[0] for field in self._fields_] - - - - - |
