Class SpinnakerNET::ManagedCameraBase¶
ClassList > SpinnakerNET > ManagedCameraBase
#include <ManagedCameraBase.h>
Inherits the following classes: SpinnakerNET::IManagedCameraBase
Inherited by the following classes: SpinnakerNET::ManagedCamera
Public Attributes¶
| Type | Name |
|---|---|
| internal | __pad0__ |
| List< ManagedTransportLayerStream^> | m_genTLDataStreamInfoList |
| ManagedTransportLayerDevice | m_genTLDeviceInfo |
Public Attributes inherited from SpinnakerNET::IManagedCameraBase¶
See SpinnakerNET::IManagedCameraBase
| Type | Name |
|---|---|
| property ManagedTransportLayerDevice | TLDevice = /* multi line expression */ |
| property ManagedTransportLayerStream | TLStream = /* multi line expression */ |
Public Functions¶
Public Functions inherited from SpinnakerNET::IManagedCameraBase¶
See SpinnakerNET::IManagedCameraBase
Protected Attributes¶
| Type | Name |
|---|---|
| SpinnakerNET::GenApi::NodeMap | m_pGenTLNodeMap |
| SpinnakerNET::GenApi::NodeMap | m_pNodeMap |
| List< SpinnakerNET::GenApi::NodeMap^> | m_pStreamNodeMapList |
Public Attributes Documentation¶
variable __pad0__¶
variable m_genTLDataStreamInfoList¶
variable m_genTLDeviceInfo¶
Public Functions Documentation¶
function BeginAcquisition¶
BeginAcquisition Starts the image acquisition engine. The camera must be initialized via a call to InitBase() before starting an acquisition.
Note that an error SPINNAKER_ERR_NOT_IMPLEMENTED will be thrown if an unsupported combination of stream mode and buffer ownership is set.
See also: InitBase()
Implements SpinnakerNET::IManagedCameraBase::BeginAcquisition
function DeInitBase¶
DeInitBase Disconnects camera port, resets camera back to read access and frees GenICam node map and GUI XML.
Do not call more functions that access the remote device such as WritePort/ReadPort after calling DeInitBase(). Events should also be unregistered before calling camera DeInitBase(). Otherwise an exception will be thrown in the DeInitBase() call and require the user to unregister events before the camera can be re-initialized again.
See also: InitBase()
See also: UnregisterEventHandler(EventHandler & evtHandlerToUnregister)
Implements SpinnakerNET::IManagedCameraBase::DeInitBase
function DiscoverMaxPacketSize¶
DiscoverMaxPacketSize Returns the largest packet size that can be safely used on the interface that device is connected to
Returns:
The maximum packet size returned.
Implements SpinnakerNET::IManagedCameraBase::DiscoverMaxPacketSize
function EndAcquisition¶
EndAcquisition Stops the image acquisition engine. If EndAcquisition() is called without a prior call to BeginAcquisition() an error message "Camera is not started" will be thrown. All Images that were acquired using GetNextImage() or GetNextImageSync() need to be released first using image->Release() or imageList->Release() before calling EndAcquisition(). All buffers in the input pool and output queue will be discarded when EndAcquisition() is called.
See also: InitBase()
See also: BeginAcquisition()
See also: GetNextImage( grabTimeout )
See also: GetNextImageSync( grabTimeout )
See also: Image::Release()
Implements SpinnakerNET::IManagedCameraBase::EndAcquisition
function ForceIP¶
ForceIP Forces the camera to be on the same subnet as its corresponding interface.
Implements SpinnakerNET::IManagedCameraBase::ForceIP
function GetAccessMode¶
GetAccessMode Returns the access mode that the software has on the Camera. The camera does not need to be initialized before calling this function.
See also: InitBase()
Returns:
An enumeration value indicating the access mode
Implements SpinnakerNET::IManagedCameraBase::GetAccessMode
function GetActiveNumDataStreams¶
GetActiveNumDataStreams Returns the number of data streams that are currently active.
Returns:
The number of active data streams
Implements SpinnakerNET::IManagedCameraBase::GetActiveNumDataStreams
function GetBufferOwnership¶
GetBufferOwnership Gets data buffer ownership. The data buffers can be owned by System or User. If the system owns the buffers, the memory required for the buffers are allocated and freed by the library. If user owns the buffers, the user is responsible for allocating and ultimately freeing the memory. By default, data buffers are owned by the System.
See also: SetBufferOwnership()
See also: SetUserBuffers()
Returns:
Buffer ownership
Implements SpinnakerNET::IManagedCameraBase::GetBufferOwnership
function GetDeviceID¶
GetDeviceID This returns a unique id string that identifies the camera; a unique string for USB devices, and MAC address for GEV devices.
Returns:
string that uniquely identifies the camera
Implements SpinnakerNET::IManagedCameraBase::GetDeviceID
function GetDeviceSerialNumber¶
GetDeviceSerialNumber This returns a manufacturer specific serial number that identifies the camera.
Returns:
serial number string that identifies the camera
Implements SpinnakerNET::IManagedCameraBase::GetDeviceSerialNumber
function GetGuiXml¶
GetGuiXml Returns the GUI XML that can be passed into the Spinnaker GUI framework
Returns:
handle to a System::String that represents the uncompressed GUI XML file
Implements SpinnakerNET::IManagedCameraBase::GetGuiXml
function GetNativeCameraPtrBase¶
function GetNextImage [1/3]¶
GetNextImage Gets the next image that was received by the transport layer. This function will block indefinitely until an image arrives.
See also: InitBase()
See also: BeginAcquisition()
See also: EndAcquisition()
Returns:
handle to a IManagedImage object
Implements SpinnakerNET::IManagedCameraBase::GetNextImage
function GetNextImage [2/3]¶
virtual IManagedImage SpinnakerNET::ManagedCameraBase::GetNextImage (
unsigned __int64 grabTimeout
)
GetNextImage Gets the next image that was received by the transport layer. This function will block for the specified timeout period until an image arrives.
See also: InitBase()
See also: BeginAcquisition()
See also: EndAcquisition()
Parameters:
grabTimeoutA 64bit value that represents a timeout in milliseconds
Returns:
handle to a IManagedImage object
Implements SpinnakerNET::IManagedCameraBase::GetNextImage
function GetNextImage [3/3]¶
virtual IManagedImage SpinnakerNET::ManagedCameraBase::GetNextImage (
unsigned __int64 grabTimeout,
unsigned __int64 streamIndex
)
GetNextImage Gets the next image that was received by the transport layer. This function will block for the specified timeout period until an image arrives.
See also: InitBase()
See also: BeginAcquisition()
See also: EndAcquisition()
Parameters:
grabTimeoutA 64bit value that represents a timeout in millisecondsstreamIndexThe index of the stream to return the image from
Returns:
handle to a IManagedImage object
Implements SpinnakerNET::IManagedCameraBase::GetNextImage
function GetNextImageSync¶
virtual IManagedImageList SpinnakerNET::ManagedCameraBase::GetNextImageSync (
unsigned __int64 grabTimeout
)
GetNextImageSync If a camera supports one or more streams, this function gets one image from each of the camera's streams, and returns the image(s) in a list. This function will block for the specified timeout period until an image arrives on all the streams.
Note: This function should not be used together with GetNextImage. Results will be undeterministic and could lead to missing or lost of images.
See also: InitBase()
See also: BeginAcquisition()
See also: EndAcquisition()
Parameters:
grabTimeoutA 64bit value that represents a timeout in milliseconds
Returns:
a list containing the Image objects
Implements SpinnakerNET::IManagedCameraBase::GetNextImageSync
function GetNodeMap¶
GetNodeMap Gets a reference to the node map that is generated from a GenICam XML file. The camera must be initialized by a call to InitBase() first before a node map reference can be successfully acquired.
See also: InitBase()
Returns:
A handle to the INodeMap.
Implements SpinnakerNET::IManagedCameraBase::GetNodeMap
function GetNumDataStreams¶
GetNumDataStreams Returns the total number of streams that the device supports. For configurable multistream cameras, use GetActiveNumDataStreams() to get the number of active streams.
See also: GetActiveNumDataStreams()
Returns:
The total number of data streams
Implements SpinnakerNET::IManagedCameraBase::GetNumDataStreams
function GetTLDeviceNodeMap¶
GetTLDeviceNodeMap Gets a reference to the node map that is generated from a GenICam XML file for the GenTL Device module. The camera does not need to be initialized before acquiring this node map.
Returns:
A handle to the INodeMap.
Implements SpinnakerNET::IManagedCameraBase::GetTLDeviceNodeMap
function GetTLStreamNodeMap [1/2]¶
GetTLStreamNodeMap Gets a reference to the node map that is generated from a GenICam XML file for the GenTL Stream module. The camera does not need to be initialized before acquiring this node map.
Returns:
A handle to the INodeMap.
Implements SpinnakerNET::IManagedCameraBase::GetTLStreamNodeMap
function GetTLStreamNodeMap [2/2]¶
virtual SpinnakerNET::GenApi::INodeMap SpinnakerNET::ManagedCameraBase::GetTLStreamNodeMap (
const int streamIndex
)
GetTLStreamNodeMap Gets a reference to the node map that is generated from a GenICam XML file for the GenTL Stream module, given a stream index. The camera does not need to be initialized before acquiring this node map.
Parameters:
streamIndexThe index of the stream to fetch node map from
Returns:
A handle to the INodeMap.
Implements SpinnakerNET::IManagedCameraBase::GetTLStreamNodeMap
function GetUniqueID¶
GetUniqueID This returns a unique id string that identifies the camera.
Deprecated
Use GetDeviceID() instead.
Returns:
string that uniquely identifies the camera
Implements SpinnakerNET::IManagedCameraBase::GetUniqueID
function GetUserBufferCount¶
GetUserBufferCount Gets the number of user memory buffers. This will throw an exception if user memory buffer has not been set. If the user memory is contiguous, this will throw an exception unless BeginAcquisition() has been called.
See also: BeginAcquisition()
See also: SetUserBuffers()
Returns:
The number of user memory buffers
Implements SpinnakerNET::IManagedCameraBase::GetUserBufferCount
function GetUserBufferSize¶
GetUserBufferSize Gets the size of one user memory buffer (in bytes). This will throw an exception if user memory buffer has not been set. If the user memory is contiguous, this will throw an exception unless BeginAcquisition() has been called. To prevent image tearing when working with USB3 cameras, the size of each buffer should be equal to: ((unsigned int) (bufferSize + 1024 - 1) / 1024) * 1024 where 1024 is the USB3 packet size.
See also: BeginAcquisition()
See also: SetUserBuffers()
Returns:
The size of one user memory buffer (in bytes)
Implements SpinnakerNET::IManagedCameraBase::GetUserBufferSize
function GetUserBufferTotalSize¶
GetUserBufferTotalSize Gets the total size of all the user memory buffers (in bytes). This will throw an exception if user memory buffer has not been set. The total size should be GetUserBufferSize() multiplied by GetUserBufferCount() or larger.
See also: GetUserBufferCount()
See also: GetUserBufferSize()
See also: SetUserBuffers()
Returns:
The total size of all the user memory buffers (in bytes)
Implements SpinnakerNET::IManagedCameraBase::GetUserBufferTotalSize
function InitBase¶
InitBase Connects to camera with read and write access, retrieves remote device and GUI XML and generates node map references.
This function needs to be called before any camera related API calls such as BeginAcquisition(), EndAcquisition(), GetNodeMap(), GetNextImage() and GetNextImageSync().
See also: BeginAcquisition()
See also: EndAcquisition()
See also: GetNodeMap()
See also: GetNextImage()
See also: GetNextImageSync()
Implements SpinnakerNET::IManagedCameraBase::InitBase
function IsInitialized¶
IsInitialized Checks if camera is initialized. This function needs to return true in order to retrieve a valid NodeMap from the GetNodeMap() call.
See also: GetNodeMap()
Returns:
If camera is initialized or not
Implements SpinnakerNET::IManagedCameraBase::IsInitialized
function IsStreaming¶
IsStreaming Returns true if the camera is currently streaming or false if it is not.
See also: InitBase()
Returns:
returns true if camera is streaming and false otherwise.
Implements SpinnakerNET::IManagedCameraBase::IsStreaming
function IsValid¶
IsValid Checks a flag to determine if camera is still valid for use.
Returns:
If camera is valid or not
Implements SpinnakerNET::IManagedCameraBase::IsValid
function ReadPort¶
virtual void SpinnakerNET::ManagedCameraBase::ReadPort (
unsigned __int64 address,
array < System::Byte >^ buffer,
unsigned __int64 length
)
ReadPort Reads a remote port on a physical Camera. This function can be used to read registers on Cameras.
Caution: Only perform direct read/write to a register if the register isn't supported in the device nodemap. Otherwise the camera and nodemap may be left in an undefined state after the register read/write.
See also: WritePort()
Parameters:
addressA 64 bit address to a register on the camerabufferA pointer to a data buffer that will store resultlengthNumber of bytes to read
Implements SpinnakerNET::IManagedCameraBase::ReadPort
function RegisterEventHandler [1/3]¶
virtual void SpinnakerNET::ManagedCameraBase::RegisterEventHandler (
ManagedEventHandler^ eventHandler
)
RegisterEventHandler(ManagedEventHandler &) Registers a generic device, image or image list event handler for the camera. The camera has to be initialized first with a call to InitBase() before registering handlers for events.
See also: InitBase()
See also: UnregisterEventHandler()
See also: DeviceEventHandler
See also: ImageEventHandler
See also: ImageListEventHandler
Parameters:
evtHandlerToRegisterThe event handler to register for the camera
Implements SpinnakerNET::IManagedCameraBase::RegisterEventHandler
function RegisterEventHandler [2/3]¶
virtual void SpinnakerNET::ManagedCameraBase::RegisterEventHandler (
ManagedDeviceEventHandler^ deviceEventHandler,
String^ eventName
)
RegisterEventHandler(ManagedDeviceEventHandler &, String &) Registers a specific device event handler for the camera given a device event name. The camera has to be initialized first with a call to InitBase() before registering handlers for events.
Deprecated
Use Node::Updated() event instead.
See also: InitBase()
See also: UnregisterEventHandler()
Parameters:
evtHandlerToRegisterThe event handler to register for the cameraeventNameThe event name to register
Implements SpinnakerNET::IManagedCameraBase::RegisterEventHandler
function RegisterEventHandler [3/3]¶
virtual void SpinnakerNET::ManagedCameraBase::RegisterEventHandler (
ManagedImageEventHandler^ imageEventHandler,
unsigned __int64 streamIndex
)
RegisterEventHandler(ManagedImageEventHandler &, unsigned int) Registers a specific stream handler for the camera given a stream index. The camera has to be initialized first with a call to InitBase() before registering handlers for events.
See also: InitBase()
See also: UnregisterEventHandler()
Parameters:
evtHandlerToRegisterThe event handler to register for the camerastreamIndexThe index of the stream of where this handler will be registered to
Implements SpinnakerNET::IManagedCameraBase::RegisterEventHandler
function SetBaseCamera¶
function SetBufferOwnership¶
SetBufferOwnership Sets data buffer ownership. The data buffers can be owned by System or User. If the system owns the buffers, the memory required for the buffers are allocated and freed by the library. If user owns the buffers, the user is responsible for allocating and ultimately freeing the memory. By default, data buffers are owned by the library.
Note that an error SPINNAKER_ERR_NOT_IMPLEMENTED will be thrown during BeginAcquisition() if an unsupported combination of stream mode and buffer ownership is set.
See also: GetBufferOwnership()
See also: SetUserBuffers()
Parameters:
modeBuffer ownership to set
Implements SpinnakerNET::IManagedCameraBase::SetBufferOwnership
function SetUserBuffers [1/2]¶
virtual void SpinnakerNET::ManagedCameraBase::SetUserBuffers (
IntPtr pMemBuffers,
uint64_t totalSize
)
SetUserBuffers Specify contiguous user allocated memory to use as data buffers. Make sure the memory allocated is pinned and cannot be moved by the garbage collector. To prevent image tearing when working with USB3 cameras, the size of each buffer should be equal to: ((unsigned int) (bufferSize + 1024 - 1) / 1024) * 1024 where 1024 is the USB3 packet size.
When working with GigE cameras, allocate memory and set at least 2 buffers for OldestFirst and NewestFirst stream modes, and 3 buffers for OldestFirstOverwrite and NewestOnly modes
Note that an error SPINNAKER_ERR_NOT_IMPLEMENTED will be thrown during BeginAcquisition() if an unsupported combination of stream mode and buffer ownership is set.
See also: GetBufferOwnership()
See also: SetBufferOwnership()
See also: GetUserBufferCount()
See also: GetUserBufferSize()
See also: GetUserBufferTotalSize()
Parameters:
pMemBuffersPointer to memory buffers to be written tototalSizeThe total size of the memory allocated for the user buffers (in bytes)
Implements SpinnakerNET::IManagedCameraBase::SetUserBuffers
function SetUserBuffers [2/2]¶
virtual void SpinnakerNET::ManagedCameraBase::SetUserBuffers (
array < IntPtr >^ ppMemBuffers,
const uint64_t bufferCount,
const uint64_t bufferSize
)
SetUserBuffers Specify non-contiguous user allocated memory to use as data buffers. Make sure the memory allocated is pinned and cannot be moved by the garbage collector. Each pointer to a buffer must have enough memory to hold one image. To prevent image tearing when working with USB3 cameras, the size of each buffer should be equal to: ((unsigned int) (bufferSize + 1024 - 1) / 1024) * 1024 where 1024 is the USB3 packet size.
See also: GetBufferOwnership()
See also: SetBufferOwnership()
See also: GetUserBufferCount()
See also: GetUserBufferSize()
See also: GetUserBufferTotalSize()
Parameters:
ppMemBuffersArray of pointers that each point to a single user memory buffer to be written tobufferCountThe number of user memory buffersbufferSizeThe size of the memory allocated for each user buffer (in bytes)
Implements SpinnakerNET::IManagedCameraBase::SetUserBuffers
function UnregisterEventHandler¶
virtual void SpinnakerNET::ManagedCameraBase::UnregisterEventHandler (
ManagedEventHandler^ eventHandler
)
UnregisterEventHandler Unregisters any type of event handler for the camera. Event handlers should be unregistered first before calling camera DeInitBase(). Otherwise an exception will be thrown in the DeInitBase() call and require the user to unregister event handlers before the camera can be re-initialized again.
See also: DeInitBase()
See also: RegisterEventHandler()
Parameters:
evtHandlerToUnregisterThe event handler to unregister from the camera
Implements SpinnakerNET::IManagedCameraBase::UnregisterEventHandler
function WritePort¶
virtual void SpinnakerNET::ManagedCameraBase::WritePort (
unsigned __int64 address,
array < System::Byte >^ buffer,
unsigned __int64 length
)
WritePort Writes a remote port on a physical Camera. This function can be used to write registers on Cameras.
Caution: Only perform direct read/write to a register if the register isn't supported in the device nodemap. Otherwise the camera and nodemap may be left in an undefined state after the register read/write.
See also: ReadPort()
Parameters:
addressA 64 bit address to a register on the camerabufferA pointer to a data buffer that will be writtenlengthNumber of bytes to write
Implements SpinnakerNET::IManagedCameraBase::WritePort
function ~ManagedCameraBase¶
Protected Attributes Documentation¶
variable m_pGenTLNodeMap¶
variable m_pNodeMap¶
variable m_pStreamNodeMapList¶
The documentation for this class was generated from the following file C:/workspace/src/SpinnakerNET/ManagedCameraBase.h