BitFlow.NET
Source code documentation of the BitFlow .NET interface.
BufferAcquisition.BufferedAcquisition Class Reference

Abstract base class of the Buffer Interface acquisition library. More...

Inheritance diagram for BufferAcquisition.BufferedAcquisition:
BufferAcquisition.CircularAcquisition BufferAcquisition.SequenceAcquisition

Public Member Functions

void Open (uint boardNumber)
 Opens a board for access. This method must be called before any other method. The board number refers to all model bitflow boards. If an R64, Karbon and Neon are installed in the system in that order, the R64 is board 0, the Karbon is number 1, and Neon is number 2. More...
 
void Open (uint boardNumber, OpenOptions Options)
 Opens a board for access with the given Options The board number refers to all model bitflow boards. If an R64, Karbon and Neon are installed in the system in that order, the R64 is board 0, the Karbon is number 1, and Neon is number 2. More...
 
void Open (uint boardNumber, string camFileName)
 Opens a board for access and loads the given camera file, bypassing the camera file displayed in SysReg. The board number refers to all model bitflow boards. If an R64, Karbon and Neon are installed in the system in that order, the R64 is board 0, the Karbon is number 1, and Neon is number 2. More...
 
void Open (uint boardNumber, string camFileName, OpenOptions Options)
 Opens a board for access and loads the given camera file, bypassing the camera file displayed in SysReg. The board number refers to all model bitflow boards. If an R64, Karbon and Neon are installed in the system in that order, the R64 is board 0, the Karbon is number 1, and Neon is number 2. More...
 
void OpenSWConnector (uint Switch, uint Connector)
 Opens a board with the given switch value and connector number for access. This function must return successfully before any other BI functions are called. More...
 
void OpenSWConnector (uint Switch, uint Connector, OpenOptions Options)
 Opens a board with the given switch value and connector number for access. This function must return successfully before any other BI functions are called. More...
 
void Close ()
 Closes the board and frees all associated resources. More...
 
IntPtr GetBoardHandle ()
 Returns the board handle. More...
 
uint GetBoardInfo (InquireParams brdInqVariable)
 Returns information about the board. More...
 
bool IsBoardOpen ()
 Returns if the board is open or not. More...
 
uint GetBoardNumber ()
 Returns the board number of the opened board. Only valid if opened by board number. More...
 
uint GetBoardSwitch ()
 Returns the board switch of the opened board. Only valid if opened by switch and connector. More...
 
uint GetBoardConnector ()
 Returns the board connector of the opened board. Only valid if opened by switch and connector. More...
 
void GetBoardSWConnector (out uint Switch, out uint Connector)
 Returns the board switch and connector of the opened board. Only valid if opened by switch and connector. More...
 
uint GetMajorVersion ()
 Returns the major version of the BufferAcquisition library. More...
 
uint GetMinorVersion ()
 Returns the minor version of the BufferAcquisition library. More...
 
uint EnumerateCameraModes (out String[] modes, out String[] descriptions)
 Retrieve a list of modes supported by the current camera file, returning the number of modes determined. R64 and older board models to not support multi-mode camera files, and no modes will be returned for that case. More...
 
void Setup (uint numberOfBuffers)
 Sets up the board for sequence or circular acquisition by allocating buffer memory and setting registers on the board based on the attached camera file at the time Setup is called. More...
 
void Setup (uint numberOfBuffers, uint alignment)
 Sets up the board for sequence or circular acquisition by allocating buffer memory and setting registers on the board based on the attached camera file at the time Setup is called. When allocating the buffer memory, each buffer will be aligned by the specified alignment boundary, specified by the alignment parameter. More...
 
void Setup (List< byte[]> bufferPtrList, uint numberOfBuffers)
 Sets up the board for sequence or circular acquisition with buffer memory allocated by the user. The user passes in a list of byte arrays into the method. The method sets registers on the board based on the attached camera file at the time Setup is called. More...
 
void Setup (List< IntPtr > bufferPtrList, uint numberOfBuffers)
 Sets up the board for sequence or circular acquisition with buffer memory allocated by the user. The user then passes in a list of buffer pointers into the method. The method sets registers on the board based on the attached camera file at the time Setup is called. More...
 
void Cleanup ()
 Shuts down current acquisition as needed, kills all internal threads, and releases all resources allocated by Setup. The Setup method should be called before this method, if Cleanup is called before Setup, Cleanup returns immediately, without doing anything. Cleanup also gets called from the desctructor so when the sequence or circular object is destroyed and cleanup has not been called, as soon as the garbage collector cleans up the object, the Setup resources will be freed. More...
 
bool IsBoardSetup ()
 Gets a value indicating the setup or not setup status of the acquisition engine on the board. If the acquisition engine on the board is setup, the Setup method has been called and the board is ready to acquire images. More...
 
void SetSetupOptions (SetupOptions options)
 Sets the setup options for the acquisition engine on the board. This method should be called before the Setup method is called. If this method is not called before the Setup method, the default option will be used. Once the setup option is set, the board will continue to use that option until it is changed, or a new sequence or circular object is instantiated. When a sequence or circular object is instantiated, the setup option is set to Default. Options may be ORed together. For instance, More...
 
void SetAcqFrameSize (uint xSize, uint ySize)
 Sets the size of the acuqired frame. The behaviour of this function depends somewhat on the camera configuration file being used. With some configurations it is not possible to modify the frame size. With others it is only possible to modify the image height. With most cameras it is possible to modify both the width and height. It is not possible to modify the acquisition size to be bigger than the sensor. However, with line scan cameras it is possible to set ySize to almost any number because on these cameras the frame height is arbitrary. This function must be called before acquisition has been setup using one of the setup methods. More...
 
void SetAcqROI (uint XOffset, uint YOffset, uint xSize, uint ySize)
 Set the Region Of Interest (ROI) of the acquired frame. The behaviour of this function depends somewhat on the camera configuration file being used. With some configurations it is not possible to modify the frame size. With others it is only possible to modify the image height. With most cameras it is possible to modify both the width and height. It is not possible to modify the acquisition size to be bigger than the sensor. However, with line scan cameras it is possible to set ySize to almost any number because on these cameras the frame height is arbitrary. Similar restrictions apply to the XOffset as do the xSize . This function must be called before acquisition has been setup using one of the setup methods. More...
 
void SetGPOut (uint GP0ut, uint Val)
 Sets the level of a General Purpose Output More...
 
uint GetGPIn (uint GPIn)
 Gets the level of a General Purpose Input More...
 
SetupOptions GetSetupOptions ()
 Gets a value indicating the setup options state. The returned value can be an ORed value of several options. More...
 
void StartAcquisition (AcqControlOptions options)
 Starts acquisition from the acquisition engine on the board. The board will begin acquiring images from the attached camera. More...
 
void StopAcquisition (AcqControlOptions options)
 Instructs the acquisition engine to stop acquiring images after the current image being acquired is done. More...
 
void AbortAcquisition (AcqControlOptions options)
 Instructs the acquisition engine to abort acquisition of images immediately, and does not wait for the current frame to be acquired. More...
 
void PauseAcquisition (AcqControlOptions options)
 Tells the acquisition engine to pause acqusition after the current frame has been acquired. When ResumeAcquisition is called, acquisition of images will continue where the pause left off. After a pause is called, only calls to StopAcquisition, AbortAcquisition or ResumeAcquisition are valid. A call to StartAcquisition or another call to PauseAcquisition will throw a InvalidOperationException exception. More...
 
void ResumeAcquisition (AcqControlOptions options)
 Resumes acquisition after a pause. If acquisition was paused on buffer number eight, when resume is called, acquisition will begin in buffer nine. ResumeAcquisition can only be called after a pause, in all other cases the System.InvalidOperationException will be thrown. More...
 
void SetTimeout (uint timeoutValue)
 Sets the timeout value for operations within the Buffer interface. These operations include, but are not limited to, waiting for frames, waiting for acquisition to start or abort, and waiting for active regions within a frame. If this method is not called the timeout value used will come from the attached camera file. For this timeout value to be active you have to call this method after Setup. More...
 
virtual SeqDoneReturns WaitForSequenceDone (uint timeout)
 
virtual void SetSeqSettings (uint startFrame, uint numberOfFrames)
 
virtual uint GetCurrentFrameAcquired ()
 
virtual BufferInfo GetBufferInfo (uint bufferNumber)
 
virtual void ClearBufferInfo ()
 
IntPtr GetBufferPointer (uint bufferNumber)
 Gets a pointer to the buffer specified by the bufferNumber parameter. The pointer returned by this method is a pointer to unmanaged memory allocated by the wrapped buffer interface. More...
 
byte[] GetBufferData (uint bufferNumber)
 Gets the image data from the buffer specified by the bufferNumber parameter. The byte array that is returned from this method is a copy of the unmanaged memory buffer that has been marshaled into managed memory. So, if the data in the returned byte array is modified, the modification only exists in managed memory. The underlying unmanaged memory will not be modified. If a call to this method was made for each buffer allocated into seperate locations and the Cleanup and/or Close methods were called, the byte array returned by this method will still be valid. More...
 
Bitmap GetBufferBitmap (uint bufferNumber)
 Gets a bitmap from the buffer specified by the bufferNumber parameter. Unlike the GetBufferData method, the Bitmap returned from this method is created from the unmanaged memory allocated by the underlying wrapped code. What this means is this method can not be called after calling Cleanup and/or Close. When Cleanup is called the underlying unmanaged memory is de-allocated and the Bitmap can no longer be created. Any modifications to the Bitmap also modifiy the underlying unmanaged memory. More...
 
uint GetNumberOfBuffers ()
 Gets the number of buffers that have been allocated for buffered acquisition. This number is passed into the buffer interface from the Setup method. If this method is called before Setup, the number of buffers returned will be zero. More...
 
void ClearBuffers ()
 Clears the buffers's contents by writing zeros to all buffers. Setup must be called before calling this method. More...
 
virtual void SetOverwriteMethod (OverwriteMethod overwriteMethod)
 
virtual uint GetBufferQueueSize ()
 
virtual uint SetBufferStatus (uint bufferNumber, BufferStatus status)
 
virtual CirBufferStatus GetBufferStatus (uint bufferNumber)
 
WaitFrameDoneReturns WaitForFrameDone (uint timeout)
 
WaitFrameDoneReturns WaitForNextFrame (uint timeout)
 
WaitFrameDoneReturns WaitForFrameDone (uint timeout, ref BufferInfo bufInfo)
 
WaitFrameDoneReturns WaitForNextFrame (uint timeout, out BufferInfo bufInfo)
 This method will wait until an image has been completly acquired into memory, and the return. The method will return immediately if an image has already been acquired into memory. More...
 
bool GetAcqStartFlag ()
 Gets the status of the the start acquisition command flag. More...
 
bool GetAcqStopFlag ()
 Gets the status of the the stop acquisition command flag. More...
 
bool GetAcqAbortFlag ()
 Gets the status of the the abort acquisition command flag. More...
 
bool GetAcqPauseFlag ()
 Gets the status of the the pause acquisition command flag. More...
 
uint GetNumberOfFramesAcquired ()
 Gets the number of frames that have been captured the moment the method is called. More...
 
uint GetNumberOfFramesOverwritten ()
 Gets the number of frames that have been overwritten by another frame. This is different from overwriting frames in the ignore mode for circular acquisition. These are frames that are overwritten because the internal worker thread has been held off long enough so that in sequence capture, the internal stop is issued beyond the last buffer in the sequence or in circular acquisition, the number of buffers on internal queue is greater than the number of buffers that have been allocated. More...
 
uint WaitForError ()
 Waits for an error to occur. Idealy, this method should be called in a seperate thread, where it will efficiently wait for an error to occur. If an error occurs, this method will return and appropriate action can be taken. For more information on the error that occured see the GetErrorCode method. More...
 
uint GetErrorCode ()
 Gets any error codes from the error stack. A zero is returned when no errors are on the error stack. The method can be called multiple times until zero is returned to remove all errors from the error stack. The error code returned from this method can then be used as a parameter for the GetErrorText and ShowErrorDialog methods. More...
 
string GetErrorText (uint errorCode)
 Gets a description of the error that is passed in through the the errorCode parameter. See the GetErrorCode method on retrieving the error code from the error stack. More...
 
uint ShowErrorDialog (uint errorCode)
 Displays a dialog with a description of the error of the error code passed in by the errorCode parameter. See the GetErrorCode method on retrieving the error code from the error stack. More...
 
void SetTriggerMode (TriggerModes triggerMode, TriggerPolarity triggerPolarity)
 Sets the trigger mode for the acquisition engine. More...
 
TriggerModes GetTriggerMode ()
 Gets the trigger mode being used by the board. More...
 
TriggerPolarity GetTriggerPolarity ()
 Gets the trigger polarity being used by the board. More...
 
void IssueSoftwareTrigger ()
 Issues a software trigger to the board. More...
 
void SetExposureControl (double ExposurePeriod, double LineFramePeriod, NTGTrigModes TriggerMode, TriggerPolarity AssertionPolarity, NTGOutputSignal OutputSignal)
 Programs the New Timing Generator (NTG), used to create waveforms to control the line/frame rate and exposure time of cameras. More...
 
void GetExposureControl (out double ExposurePeriod, out double LineFramePeriod, out NTGTrigModes TriggerMode, out TriggerPolarity AssertionPolarity, out NTGOutputSignal OutputSignal)
 Retrieve the current configuration of the New Timing Generator (NTG), which is used to create waveforms to control the line/frame rate and exposure time of cameras. More...
 
void SetWriteBufferOptions (WriteOptions options)
 Sets the different write options when writing images to disk. The write options must be set before calling the WriteBuffer and WriteBuffers methods. If this method is not called before calling the WriteBuffer and WriteBuffers methods, the WriteOptions.Default option will be used. Once the write option is set, it will remain at that value until it is set to something else. All options can be or'ed together. For instance, the following is setting options for packing 32-bit RGB to 24-bit, swapping RGB to BGR, flipping the image and overwriting existing files. More...
 
void WriteBuffer (String fileName, uint bufferNumber)
 Writes one buffer to a file on disk in the BMP, TIFF or RAW file format. More...
 
void WriteBuffers (String fileName, uint startBufferNumber, uint numBuffers)
 Writes multiple buffers to a file on disk in the BMP, TIFF, RAW or AVI file formats. More...
 
void ReadImageFiles (String FileName, uint startBufferNumber, uint numBuffers)
 Reads image files from disk into memory, that were saved with the WriteBuffer and WriteBuffers methods. More...
 
void LoadCameraFile (string cameraFileName)
 Loads the specified camera file bypassing the camera file displayed in SysReg. After loading the camera file, Setup should be called and the new camera file will be used. This method can not be called if the board is already setup with another camera file. The UnloadCamFile method can be used to free resources used by this method. More...
 
void UnloadCameraFile ()
 Unloads and frees resources associated with the LoadCamFile method. More...
 
uint CXPReadReg (uint address)
 Read the value of a single CoaXPress register. More...
 
uint CXPReadReg (uint link, uint address)
 Read the value of a single CoaXPress register. More...
 
void CXPWriteReg (uint address, uint value)
 Write the value of a single CoaXPress register. More...
 
void CXPWriteReg (uint link, uint address, uint value)
 Write the value of a single CoaXPress register. More...
 
byte[] CXPReadData (uint address, uint bytes)
 Read the values from a sequence of CoaXPress registers, and return them as an array. More...
 
byte[] CXPReadData (uint link, uint address, uint bytes)
 Read the values from a sequence of CoaXPress registers, and return them as an array. More...
 
void CXPWriteData (uint address, byte[] data)
 Write data to a sequence of CoaXPress registers. More...
 
void CXPWriteData (uint link, uint address, byte[] data)
 Write data to a sequence of CoaXPress registers. More...
 
String BFRegName (uint RegId)
 Use this function to iteratively retrieve the string name of every frame grabber register available on the currently open board. The name and ID pairing used by this function is the same used by BFRegId, and valid values of RegId may be used with BFRegPeek and BFRegPoke functions, as well. The ID value will be static for any given release of the BitFlow SDK, but may change with even a minor release. More...
 
uint BFRegId (String RegName)
 Return the ID of the named frame grabber register. The ID is used in conjunction with the BFRegPeek and BFRegPoke methods. The ID of any given register may change betwee releases, but the RegName will always remain the same. The ID returned by this function can be converted back into the register name, RegName using the BFRegName function. The ID value will be static for any given release of the BitFlow SDK, but may change with even a minor release. More...
 
uint BFRegPeek (uint RegId)
 Peek (read) the value of the frame grabber register with ID RegId . Retrieve the ID of a named register using BFRegId. More...
 
void BFRegPoke (uint RegId, uint Value)
 Poke (write) Value to the frame grabber register with ID RegId . Retrieve the ID of a named register using BFRegId. More...
 

Properties

static uint BoardCount [get]
 Return the number of BitFlow board installed on this system. More...
 
BoardProperties Properties [get]
 Retrieve a BufferedAcquisition::BoardProperties handle for this BufferAcqisition object. More...
 
String[] CameraModes [get]
 Alternative accessor of the board modes. More...
 
String CameraMode [get, set]
 Get or set the current camera mode's name. R64 and older board models do not support camera modes. More...
 

Detailed Description

Abstract base class of the Buffer Interface acquisition library.

Member Function Documentation

◆ AbortAcquisition()

void BufferAcquisition.BufferedAcquisition.AbortAcquisition ( AcqControlOptions  options)

Instructs the acquisition engine to abort acquisition of images immediately, and does not wait for the current frame to be acquired.

Parameters
optionsThe options parameter can be one of the following:
Exceptions
System.InvalidOperationExceptionThrown if the board is not open and/or not setup before calling this method.
System.TimeoutExceptionThrown when a timeout occurs while waiting for acquisition to abort when using the Wait option.
System.ApplicationExceptionThrown when an internal error occurs. For more information on the exception, check the Message property.

◆ BFRegId()

uint BufferAcquisition.BufferedAcquisition.BFRegId ( String  RegName)

Return the ID of the named frame grabber register. The ID is used in conjunction with the BFRegPeek and BFRegPoke methods. The ID of any given register may change betwee releases, but the RegName will always remain the same. The ID returned by this function can be converted back into the register name, RegName using the BFRegName function. The ID value will be static for any given release of the BitFlow SDK, but may change with even a minor release.

Parameters
RegNameThe name of the desired frame grabber register. This value is case sensitive.
Returns
The ID of the named register, RegName .
Exceptions
System.ApplicationExceptionThrown if no register is available with the given RegName .
System.InvalidOperationExceptionThrown if no board has been opened with the Open function.
See also
BFRegName, BFRegPeek, BFRegPoke

◆ BFRegName()

String BufferAcquisition.BufferedAcquisition.BFRegName ( uint  RegId)

Use this function to iteratively retrieve the string name of every frame grabber register available on the currently open board. The name and ID pairing used by this function is the same used by BFRegId, and valid values of RegId may be used with BFRegPeek and BFRegPoke functions, as well. The ID value will be static for any given release of the BitFlow SDK, but may change with even a minor release.

Iterate continuously from zero to retrieve the name of every BitFlow register available on the open board.

List<String> bfRegList = new List<String>();<br/>
bufAcq.Open(0);<br/>
try<br/>
{<br/>
&nbsp;&nbsp;for (uint i = 0; true; i++)<br/>
&nbsp;&nbsp;{<br/>
&nbsp;&nbsp;&nbsp;&nbsp;String name = bufAcq.BFRegName(i);<br/>
&nbsp;&nbsp;&nbsp;&nbsp;if (!String.IsNullOrEmpty(name))<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bfRegList.Add(name);<br/>
&nbsp;&nbsp;}<br/>
}<br/>
catch (ApplicationException)<br/>
{&nbsp;}&nbsp;// Complete.<br/>
Abstract base class of the Buffer Interface acquisition library.
Definition: BufferedAcquisition.cs:29
void Open(uint boardNumber)
Opens a board for access. This method must be called before any other method. The board number refers...
Definition: BufferedAcquisition.cs:108
This class provides the ability to acquire a sequence of images using a BitFlow interface board.
Definition: SequenceAcquisition.cs:15
Buffer Interface image acquisition library.
Definition: AcqTrigger.cs:6
Parameters
RegIdThe ID of the frame grabber register who's name is to be returned.
Returns
The string name corresponding to the register ID, or an empty string.
Exceptions
System.ApplicationExceptionThrown if the specified register ID exceeds the number of registers known to the BitFlow SDK.
System.InvalidOperationExceptionThrown if no board has been opened with the Open function.
See also
BFRegId, BFRegPeek, BFRegPoke

◆ BFRegPeek()

uint BufferAcquisition.BufferedAcquisition.BFRegPeek ( uint  RegId)

Peek (read) the value of the frame grabber register with ID RegId . Retrieve the ID of a named register using BFRegId.

Parameters
RegIdThe ID of the frame grabber register to peek.
Returns
The value peeked from the specified frame grabber register, RegId . Undefined, if RegId does not match an available register.
Exceptions
System.InvalidOperationExceptionThrown if no board has been opened with the Open function.
See also
BFRegId, BFRegName, BFRegPoke

◆ BFRegPoke()

void BufferAcquisition.BufferedAcquisition.BFRegPoke ( uint  RegId,
uint  Value 
)

Poke (write) Value to the frame grabber register with ID RegId . Retrieve the ID of a named register using BFRegId.

Parameters
RegIdThe ID of the frame grabber register to poke.
ValueThe value to be written to the frame grabber register specified by RegId .
Exceptions
System.ApplicationExceptionThrown if the specified RegId is not available on the current frame grabber.
System.InvalidOperationExceptionThrown if no board has been opened with the Open function.
See also
BFRegId, BFRegName, BFRegPeek

◆ Cleanup()

void BufferAcquisition.BufferedAcquisition.Cleanup ( )

Shuts down current acquisition as needed, kills all internal threads, and releases all resources allocated by Setup. The Setup method should be called before this method, if Cleanup is called before Setup, Cleanup returns immediately, without doing anything. Cleanup also gets called from the desctructor so when the sequence or circular object is destroyed and cleanup has not been called, as soon as the garbage collector cleans up the object, the Setup resources will be freed.

Exceptions
System.ApplicationExceptionThrown if an internal error occurs while freeing resources. For more information on the exception, check the message property.

◆ ClearBufferInfo()

virtual void BufferAcquisition.BufferedAcquisition.ClearBufferInfo ( )
virtual

◆ ClearBuffers()

void BufferAcquisition.BufferedAcquisition.ClearBuffers ( )

Clears the buffers's contents by writing zeros to all buffers. Setup must be called before calling this method.

Exceptions
System.InvalidOperationExceptionThrown if the board is not open and/or not setup before calling this method.

◆ Close()

void BufferAcquisition.BufferedAcquisition.Close ( )

Closes the board and frees all associated resources.

◆ CXPReadData() [1/2]

byte [] BufferAcquisition.BufferedAcquisition.CXPReadData ( uint  address,
uint  bytes 
)

Read the values from a sequence of CoaXPress registers, and return them as an array.

Parameters
addressThe byte address of the first register to be read.
bytesThe number of bytes to be read from the register space.
Returns
A byte array of all the values read.
Exceptions
System.InvalidOperationExceptionThrown when the board is not open, and this method is called.
System.ApplicationExceptionThrown when an internal error occurs. For more information on the exception, check the Message property.
See also
CXPReadReg, CXPWriteReg, CXPWriteData

◆ CXPReadData() [2/2]

byte [] BufferAcquisition.BufferedAcquisition.CXPReadData ( uint  link,
uint  address,
uint  bytes 
)

Read the values from a sequence of CoaXPress registers, and return them as an array.

Parameters
linkThe camera link to read from.
addressThe byte address of the first register to be read.
bytesThe number of bytes to be read from the register space.
Returns
A byte array of all the values read.
Exceptions
System.InvalidOperationExceptionThrown when the board is not open, and this method is called.
System.ApplicationExceptionThrown when an internal error occurs. For more information on the exception, check the Message property.
See also
CXPReadReg, CXPWriteReg, CXPWriteData

◆ CXPReadReg() [1/2]

uint BufferAcquisition.BufferedAcquisition.CXPReadReg ( uint  address)

Read the value of a single CoaXPress register.

Returns
The value of the specified register.
Parameters
addressThe byte address of the register to be read.
Exceptions
System.InvalidOperationExceptionThrown when the board is not open, and this method is called.
System.ApplicationExceptionThrown when an internal error occurs. For more information on the exception, check the Message property.
See also
CXPWriteReg, CXPReadData, CXPWriteData

◆ CXPReadReg() [2/2]

uint BufferAcquisition.BufferedAcquisition.CXPReadReg ( uint  link,
uint  address 
)

Read the value of a single CoaXPress register.

Returns
The value of the specified register.
Parameters
linkThe camera link to read from.
addressThe byte address of the register to be read.
Exceptions
System.InvalidOperationExceptionThrown when the board is not open, and this method is called.
System.ApplicationExceptionThrown when an internal error occurs. For more information on the exception, check the Message property.
See also
CXPWriteReg, CXPReadData, CXPWriteData

◆ CXPWriteData() [1/2]

void BufferAcquisition.BufferedAcquisition.CXPWriteData ( uint  address,
byte[]  data 
)

Write data to a sequence of CoaXPress registers.

Parameters
addressThe byte address of the first register to be written.
dataA byte array of data to be written to the register space.
Exceptions
System.InvalidOperationExceptionThrown when the board is not open, and this method is called.
System.ApplicationExceptionThrown when an internal error occurs. For more information on the exception, check the Message property.
See also
CXPReadReg, CXPWriteReg, CXPReadData

◆ CXPWriteData() [2/2]

void BufferAcquisition.BufferedAcquisition.CXPWriteData ( uint  link,
uint  address,
byte[]  data 
)

Write data to a sequence of CoaXPress registers.

Parameters
linkThe camera link to write on.
addressThe byte address of the first register to be written.
dataA byte array of data to be written to the register space.
Exceptions
System.InvalidOperationExceptionThrown when the board is not open, and this method is called.
System.ApplicationExceptionThrown when an internal error occurs. For more information on the exception, check the Message property.
See also
CXPReadReg, CXPWriteReg, CXPReadData

◆ CXPWriteReg() [1/2]

void BufferAcquisition.BufferedAcquisition.CXPWriteReg ( uint  address,
uint  value 
)

Write the value of a single CoaXPress register.

Parameters
addressThe byte address of the register to be read.
valueThe value to write to the specified register.
Exceptions
System.InvalidOperationExceptionThrown when the board is not open, and this method is called.
System.ApplicationExceptionThrown when an internal error occurs. For more information on the exception, check the Message property.
See also
CXPReadReg, CXPReadData, CXPWriteData

◆ CXPWriteReg() [2/2]

void BufferAcquisition.BufferedAcquisition.CXPWriteReg ( uint  link,
uint  address,
uint  value 
)

Write the value of a single CoaXPress register.

Parameters
linkThe camera link to write on.
addressThe byte address of the register to be read.
valueThe value to write to the specified register.
Exceptions
System.InvalidOperationExceptionThrown when the board is not open, and this method is called.
System.ApplicationExceptionThrown when an internal error occurs. For more information on the exception, check the Message property.
See also
CXPReadReg, CXPReadData, CXPWriteData

◆ EnumerateCameraModes()

uint BufferAcquisition.BufferedAcquisition.EnumerateCameraModes ( out String[]  modes,
out String[]  descriptions 
)

Retrieve a list of modes supported by the current camera file, returning the number of modes determined. R64 and older board models to not support multi-mode camera files, and no modes will be returned for that case.

Parameters
modesReturn parameter for the available modes.
descriptionsReturn parameter for descriptions of the available modes.
Returns
The number of modes supported.
Exceptions
ApplicationExceptionThrown if the board isn't configured.
See also
CameraModes, CameraMode

◆ GetAcqAbortFlag()

bool BufferAcquisition.BufferedAcquisition.GetAcqAbortFlag ( )

Gets the status of the the abort acquisition command flag.

Returns
  • true The acquisition engine has been given a command to abort.
  • false The acquisition engine is currently acquiring images.
Exceptions
System.InvalidOperationExceptionThrown if the board is not open and/or not setup before calling this method.

◆ GetAcqPauseFlag()

bool BufferAcquisition.BufferedAcquisition.GetAcqPauseFlag ( )

Gets the status of the the pause acquisition command flag.

Returns
  • true The acquisition engine has been given a command to pause.
  • false The acquisition engine is not paused.
Exceptions
System.InvalidOperationExceptionThrown if the board is not open and/or not setup before calling this method.

◆ GetAcqStartFlag()

bool BufferAcquisition.BufferedAcquisition.GetAcqStartFlag ( )

Gets the status of the the start acquisition command flag.

Returns
  • true The acquisition engine has been given a command to start.
  • false The acquisition engine has not been given a command to start, or acquisition has been completed, stopped or aborted.
Exceptions
System.InvalidOperationExceptionThrown if the board is not open and/or not setup before calling this method.

◆ GetAcqStopFlag()

bool BufferAcquisition.BufferedAcquisition.GetAcqStopFlag ( )

Gets the status of the the stop acquisition command flag.

Returns
  • true The acquisition engine has been given a command to stop.
  • false The acquisition engine is currently acquiring images.
Exceptions
System.InvalidOperationExceptionThrown if the board is not open and/or not setup before calling this method.

◆ GetBoardConnector()

uint BufferAcquisition.BufferedAcquisition.GetBoardConnector ( )

Returns the board connector of the opened board. Only valid if opened by switch and connector.

Returns
The board connector of the opened board.
See also
GetBoardSwitch, OpenSWConnector

◆ GetBoardHandle()

IntPtr BufferAcquisition.BufferedAcquisition.GetBoardHandle ( )

Returns the board handle.

Returns
Handle to the board.
Exceptions
System.InvalidOperationExceptionThrown when a method is called before the board is open.

◆ GetBoardInfo()

uint BufferAcquisition.BufferedAcquisition.GetBoardInfo ( InquireParams  brdInqVariable)

Returns information about the board.

Parameters
brdInqVariableThe parameter to find the value of. Can be one of the following:
Not all parameters will work for all model boards. Please refer to the BitFlow SDK documentation for more information.
Returns
The value of the parameter that was asked for.
Exceptions
System.ArgumentExceptionThrown when the parameter specified by BrdInqVariable is not valid for that model board.
System.InvalidOperationExceptionThrown when a method is called before the board is open.

◆ GetBoardNumber()

uint BufferAcquisition.BufferedAcquisition.GetBoardNumber ( )

Returns the board number of the opened board. Only valid if opened by board number.

Returns
The board number of the opened board.

◆ GetBoardSWConnector()

void BufferAcquisition.BufferedAcquisition.GetBoardSWConnector ( out uint  Switch,
out uint  Connector 
)

Returns the board switch and connector of the opened board. Only valid if opened by switch and connector.

Parameters
SwitchThe board switch value for the board opened.
ConnectorThe board connector of the board opened.
See also
GetBoardSwitch, GetBoardConnector, OpenSWConnector

◆ GetBoardSwitch()

uint BufferAcquisition.BufferedAcquisition.GetBoardSwitch ( )

Returns the board switch of the opened board. Only valid if opened by switch and connector.

Returns
The board switch of the opened board.
See also
GetBoardConnector, OpenSWConnector

◆ GetBufferBitmap()

Bitmap BufferAcquisition.BufferedAcquisition.GetBufferBitmap ( uint  bufferNumber)

Gets a bitmap from the buffer specified by the bufferNumber parameter. Unlike the GetBufferData method, the Bitmap returned from this method is created from the unmanaged memory allocated by the underlying wrapped code. What this means is this method can not be called after calling Cleanup and/or Close. When Cleanup is called the underlying unmanaged memory is de-allocated and the Bitmap can no longer be created. Any modifications to the Bitmap also modifiy the underlying unmanaged memory.

The Bitmap supports 8, 24 and 32-bit images out of the box. For 10, 12, 14 and 16-bit images an 8-bit Bitmap will be created with the most significant 8-bits used to make up the Bitmap. For 3x10 and 3x12 color images a 48-bit Bitmap will be created with the upper most bits not being used set to zero.

Parameters
bufferNumberThe buffer number to create the bitmap from.
Returns
A Bitmap of the image data from the buffer specified by the bufferNumber parameter.
Exceptions
System.InvalidOperationExceptionThrown if the board is not open and/or not setup before calling this method.
System.ArgumentOutOfRangeExceptionThrown when a bufferNumber is passed in that is larger than the number of buffers that have been allocated.
System.NotSupportedExceptionThrown when an image bit depth is being used, that is not supported by the Bitmap class. An example would be a 64-bit image.

◆ GetBufferData()

byte [] BufferAcquisition.BufferedAcquisition.GetBufferData ( uint  bufferNumber)

Gets the image data from the buffer specified by the bufferNumber parameter. The byte array that is returned from this method is a copy of the unmanaged memory buffer that has been marshaled into managed memory. So, if the data in the returned byte array is modified, the modification only exists in managed memory. The underlying unmanaged memory will not be modified. If a call to this method was made for each buffer allocated into seperate locations and the Cleanup and/or Close methods were called, the byte array returned by this method will still be valid.

Parameters
bufferNumberThe buffer number to get the data from.
Returns
A byte array of the image data from the buffer specified by the bufferNumber parameter.
Exceptions
System.InvalidOperationExceptionThrown if the board is not open and/or not setup before calling this method.
System.ArgumentOutOfRangeExceptionThrown when a bufferNumber is passed in that is larger than the number of buffers that have been allocated.

◆ GetBufferInfo()

virtual BufferInfo BufferAcquisition.BufferedAcquisition.GetBufferInfo ( uint  bufferNumber)
virtual

◆ GetBufferPointer()

IntPtr BufferAcquisition.BufferedAcquisition.GetBufferPointer ( uint  bufferNumber)

Gets a pointer to the buffer specified by the bufferNumber parameter. The pointer returned by this method is a pointer to unmanaged memory allocated by the wrapped buffer interface.

Parameters
bufferNumberThe buffer number to get a pointer to.
Returns
A pointer to a specified buffer. This pointer can then be cast to the appropriate data type for image processing. The following shows an example:
unsafe
{
for(uint i=0; i<NumBuffers; i++)
{
byte* pBuf = (byte*)Buf.GetBufferPointer(i);
ProcessBuffer(pBuf);
}
}
Please note that in order to use the pointer, the code must use the unsafe keyword. If unsafe code cannot be used, please refer to the GetBufferData or GetBufferBitmap methods.
Exceptions
System.InvalidOperationExceptionThrown if the board is not open and/or not setup before calling this method.
System.ArgumentOutOfRangeExceptionThrown when a bufferNumber is passed in that is larger than the number of buffers that have been allocated.

◆ GetBufferQueueSize()

virtual uint BufferAcquisition.BufferedAcquisition.GetBufferQueueSize ( )
virtual

◆ GetBufferStatus()

virtual CirBufferStatus BufferAcquisition.BufferedAcquisition.GetBufferStatus ( uint  bufferNumber)
virtual

◆ GetCurrentFrameAcquired()

virtual uint BufferAcquisition.BufferedAcquisition.GetCurrentFrameAcquired ( )
virtual

◆ GetErrorCode()

uint BufferAcquisition.BufferedAcquisition.GetErrorCode ( )

Gets any error codes from the error stack. A zero is returned when no errors are on the error stack. The method can be called multiple times until zero is returned to remove all errors from the error stack. The error code returned from this method can then be used as a parameter for the GetErrorText and ShowErrorDialog methods.

Returns
The top most error on the error stack. If there are no errors on the error stack, a zero is returned.
Exceptions
System.InvalidOperationExceptionThrown if the board is not open and/or not setup before calling this method.
System.ApplicationExceptionThrown when an internal error occurs. For more information check the message property.

◆ GetErrorText()

string BufferAcquisition.BufferedAcquisition.GetErrorText ( uint  errorCode)

Gets a description of the error that is passed in through the the errorCode parameter. See the GetErrorCode method on retrieving the error code from the error stack.

Parameters
errorCodeThe error code to get the description of.
Returns
A string description of the error.
Exceptions
System.InvalidOperationExceptionThrown if the board is not open and/or not setup before calling this method.
System.ApplicationExceptionThrown when an internal error occurs. For more information check the message property.
System.ArgumentOutOfRangeExceptionThrown when the errorCode parameter that is passed into the method cannot be found or is not in the range of known error codes.

◆ GetExposureControl()

void BufferAcquisition.BufferedAcquisition.GetExposureControl ( out double  ExposurePeriod,
out double  LineFramePeriod,
out NTGTrigModes  TriggerMode,
out TriggerPolarity  AssertionPolarity,
out NTGOutputSignal  OutputSignal 
)

Retrieve the current configuration of the New Timing Generator (NTG), which is used to create waveforms to control the line/frame rate and exposure time of cameras.

Parameters
ExposurePeriodThe exposure period of image capture, in milliseconds.
LineFramePeriodThe line or frame period of image capture, in milliseconds.
TriggerModeThe triggering mode of the NTG.
AssertionPolarityDetermines the assertion level of the NTG waveform output, high or low.
OutputSignalThe outputs that the NTG waveform triggers. This value is a flag.
See also
SetExposureControl

◆ GetGPIn()

uint BufferAcquisition.BufferedAcquisition.GetGPIn ( uint  GPIn)

Gets the level of a General Purpose Input

Parameters
GPInThe GPIN signal to get the level of
Returns
Returns the current value of the input
Exceptions
System.ApplicationExceptionThrown if the if the GPIn parameter is not known

◆ GetMajorVersion()

uint BufferAcquisition.BufferedAcquisition.GetMajorVersion ( )

Returns the major version of the BufferAcquisition library.

Returns
The major version of the BufferAcquisition library.

◆ GetMinorVersion()

uint BufferAcquisition.BufferedAcquisition.GetMinorVersion ( )

Returns the minor version of the BufferAcquisition library.

Returns
The major minor of the BufferAcquisition library.

◆ GetNumberOfBuffers()

uint BufferAcquisition.BufferedAcquisition.GetNumberOfBuffers ( )

Gets the number of buffers that have been allocated for buffered acquisition. This number is passed into the buffer interface from the Setup method. If this method is called before Setup, the number of buffers returned will be zero.

Returns
The number of buffers being used for acquisition.

◆ GetNumberOfFramesAcquired()

uint BufferAcquisition.BufferedAcquisition.GetNumberOfFramesAcquired ( )

Gets the number of frames that have been captured the moment the method is called.

Returns
The number of frames acquired.
Exceptions
System.InvalidOperationExceptionThrown if the board is not open and/or not setup before calling this method.

◆ GetNumberOfFramesOverwritten()

uint BufferAcquisition.BufferedAcquisition.GetNumberOfFramesOverwritten ( )

Gets the number of frames that have been overwritten by another frame. This is different from overwriting frames in the ignore mode for circular acquisition. These are frames that are overwritten because the internal worker thread has been held off long enough so that in sequence capture, the internal stop is issued beyond the last buffer in the sequence or in circular acquisition, the number of buffers on internal queue is greater than the number of buffers that have been allocated.

Returns
The number of buffers that have been overwritten. Under normal conditions that number will be zero.
Exceptions
System.InvalidOperationExceptionThrown if the board is not open and/or not setup before calling this method.

◆ GetSetupOptions()

SetupOptions BufferAcquisition.BufferedAcquisition.GetSetupOptions ( )

Gets a value indicating the setup options state. The returned value can be an ORed value of several options.

Returns
Returns can be one or more of the following options ORed together:
  • SetupOptions.Default Create error signals and reset the acquisition engine on an overflow or hardware exception, and continue acquiring images. If a buffer is overwritten, acquisition of images continues. No frames will be inverted.
  • SetupOptions.AbortMissedFrame In circular acquisition, if a buffer is missed, acquisition is aborted. A buffer is missed if the internal worker thread is delayed, and the hardware acquires images overwriting a buffer before the worker thread has been given its time slice back. This option is not applicable for sequence acquisition.
  • SetupOptions.DisableAqErrorSig The overflow and hardware exception signals will not be created.
  • SetupOptions.InvertEvenFrames Acquires the even buffers upside down.
  • SetupOptions.InvertOddFrames Acquires the odd buffers upside down.

◆ GetTriggerMode()

TriggerModes BufferAcquisition.BufferedAcquisition.GetTriggerMode ( )

Gets the trigger mode being used by the board.

Returns
The trigger mode being used by the board. The returned value can be one of the following:
Exceptions
System.InvalidOperationExceptionThrown if the board is not open and/or not setup before calling this method.
System.ApplicationExceptionThrown when an internal error occurs. For more information check the message property.

◆ GetTriggerPolarity()

TriggerPolarity BufferAcquisition.BufferedAcquisition.GetTriggerPolarity ( )

Gets the trigger polarity being used by the board.

Returns
The trigger polarity being used by the board. The trigger polarity can be one of the following:
Exceptions
System.InvalidOperationExceptionThrown if the board is not open and/or not setup before calling this method.
System.ApplicationExceptionThrown when an internal error occurs. For more information check the message property.

◆ IsBoardOpen()

bool BufferAcquisition.BufferedAcquisition.IsBoardOpen ( )

Returns if the board is open or not.

Returns
true - The board is open.
false - The board is closed.

◆ IsBoardSetup()

bool BufferAcquisition.BufferedAcquisition.IsBoardSetup ( )

Gets a value indicating the setup or not setup status of the acquisition engine on the board. If the acquisition engine on the board is setup, the Setup method has been called and the board is ready to acquire images.

Returns
true - if the acquisition engine is setup.
false - if the acquisition engine is not setup.

◆ IssueSoftwareTrigger()

void BufferAcquisition.BufferedAcquisition.IssueSoftwareTrigger ( )

Issues a software trigger to the board.

Exceptions
System.InvalidOperationExceptionThrown if the board is not open and/or not setup before calling this method.
System.ApplicationExceptionThrown when an internal error occurs. For more information check the message property.

◆ LoadCameraFile()

void BufferAcquisition.BufferedAcquisition.LoadCameraFile ( string  cameraFileName)

Loads the specified camera file bypassing the camera file displayed in SysReg. After loading the camera file, Setup should be called and the new camera file will be used. This method can not be called if the board is already setup with another camera file. The UnloadCamFile method can be used to free resources used by this method.

Parameters
cameraFileNameThe name of the camera file with no path. The Camera Configuration path will be searched for the camera file.
Exceptions
System.InvalidOperationExceptionThrown when the board is already setup with another camera file. Please call Cleanup and then call this method again.
System.ApplicationExceptionThrown when the camera file could not be loaded. Verify that the camera file exists in the Camera Configuration path. (Usually the Config folder under the SDK root directory.)

◆ Open() [1/4]

void BufferAcquisition.BufferedAcquisition.Open ( uint  boardNumber)

Opens a board for access. This method must be called before any other method. The board number refers to all model bitflow boards. If an R64, Karbon and Neon are installed in the system in that order, the R64 is board 0, the Karbon is number 1, and Neon is number 2.

Parameters
boardNumberSpecifies the board number to open.
Exceptions
System.InvalidOperationExceptionThrown if there is an attempt to open the board twice.
System.ArgumentExceptionThrown when a boardNumber can not be found in the system.
System.ApplicationExceptionThrown when the board can not be successfully opened.

◆ Open() [2/4]

void BufferAcquisition.BufferedAcquisition.Open ( uint  boardNumber,
OpenOptions  Options 
)

Opens a board for access with the given Options The board number refers to all model bitflow boards. If an R64, Karbon and Neon are installed in the system in that order, the R64 is board 0, the Karbon is number 1, and Neon is number 2.

Parameters
boardNumberSpecifies the board number to open.
OptionsOptions for use in opening the board.
Exceptions
System.InvalidOperationExceptionThrown if there is an attempt to open the board twice.
System.ArgumentExceptionThrown when a boardNumber can not be found in the system.
System.ApplicationExceptionThrown when the board can not be successfully opened.

◆ Open() [3/4]

void BufferAcquisition.BufferedAcquisition.Open ( uint  boardNumber,
string  camFileName 
)

Opens a board for access and loads the given camera file, bypassing the camera file displayed in SysReg. The board number refers to all model bitflow boards. If an R64, Karbon and Neon are installed in the system in that order, the R64 is board 0, the Karbon is number 1, and Neon is number 2.

Parameters
boardNumberSpecifies the board number to open.
camFileNameThe camera file to attach to the board. If only the name of the camera file is given, with the extention, the camera configuration path is searched for the camera file. By default the camera configuration path is the Config folder in the SDK installation. If the full path is given, then that is where the camera file will be retrieved from.
Exceptions
System.InvalidOperationExceptionThrown if there is an attempt to open the board twice.
System.ArgumentExceptionThrown when a boardNumber can not be found in the system.
System.ApplicationExceptionThrown when the board can not be successfully opened.

◆ Open() [4/4]

void BufferAcquisition.BufferedAcquisition.Open ( uint  boardNumber,
string  camFileName,
OpenOptions  Options 
)

Opens a board for access and loads the given camera file, bypassing the camera file displayed in SysReg. The board number refers to all model bitflow boards. If an R64, Karbon and Neon are installed in the system in that order, the R64 is board 0, the Karbon is number 1, and Neon is number 2.

Parameters
boardNumberSpecifies the board number to open.
camFileNameThe camera file to attach to the board. If only the name of the camera file is given, with the extention, the camera configuration path is searched for the camera file. By default the camera configuration path is the Config folder in the SDK installation. If the full path is given, then that is where the camera file will be retrieved from.
OptionsOptions for use in opening the board.
Exceptions
System.InvalidOperationExceptionThrown if there is an attempt to open the board twice.
System.ArgumentExceptionThrown when a boardNumber can not be found in the system.
System.ApplicationExceptionThrown when the board can not be successfully opened.

◆ OpenSWConnector() [1/2]

void BufferAcquisition.BufferedAcquisition.OpenSWConnector ( uint  Switch,
uint  Connector 
)

Opens a board with the given switch value and connector number for access. This function must return successfully before any other BI functions are called.

Parameters
SwitchSpecifies the switch setting of the board that you wish to open. The swith is a small mechanical switch that is mounted on the upper edge of the board. See that hardware reference manual for more details on location. The acceptable values are 0 to 3.
ConnectorSpecifies the connector number of the board that you wish to open. This parameter is only for use for boards that have more than one Virtual Frame Grabber (VFG). For boards with only one VFG, this value must be 1. Connector numbers start with 1, as per the hardware manual. For example, the Neon-CLQ has connectors CL1, CL2, CL3 and CL4. Therefore, to open CL2, this parameter must be set to two.
Exceptions
System.InvalidOperationExceptionThrown if there is an attempt to open the board twice.
System.ArgumentExceptionThrown when a Switch of Connector can not be found in the system.
System.ApplicationExceptionThrown when the board can not be successfully opened.

◆ OpenSWConnector() [2/2]

void BufferAcquisition.BufferedAcquisition.OpenSWConnector ( uint  Switch,
uint  Connector,
OpenOptions  Options 
)

Opens a board with the given switch value and connector number for access. This function must return successfully before any other BI functions are called.

Parameters
SwitchSpecifies the switch setting of the board that you wish to open. The swith is a small mechanical switch that is mounted on the upper edge of the board. See that hardware reference manual for more details on location. The acceptable values are 0 to 3.
ConnectorSpecifies the connector number of the board that you wish to open. This parameter is only for use for boards that have more than one Virtual Frame Grabber (VFG). For boards with only one VFG, this value must be 1. Connector numbers start with 1, as per the hardware manual. For example, the Neon-CLQ has connectors CL1, CL2, CL3 and CL4. Therefore, to open CL2, this parameter must be set to two.
OptionsOptions for use in opening the board.
Exceptions
System.InvalidOperationExceptionThrown if there is an attempt to open the board twice.
System.ArgumentExceptionThrown when a Switch of Connector can not be found in the system.
System.ApplicationExceptionThrown when the board can not be successfully opened.

◆ PauseAcquisition()

void BufferAcquisition.BufferedAcquisition.PauseAcquisition ( AcqControlOptions  options)

Tells the acquisition engine to pause acqusition after the current frame has been acquired. When ResumeAcquisition is called, acquisition of images will continue where the pause left off. After a pause is called, only calls to StopAcquisition, AbortAcquisition or ResumeAcquisition are valid. A call to StartAcquisition or another call to PauseAcquisition will throw a InvalidOperationException exception.

Parameters
optionsThe options parameter can be one of the following:
Exceptions
System.InvalidOperationExceptionThrown if the board is not open and/or not setup before calling this method. Will also be thrown if a stop, abort or another pause is called while acquisition is paused.
System.TimeoutExceptionThrown when a timeout occurs while waiting for acquisition to pause when using the Wait option.
System.ApplicationExceptionThrown when an internal error occurs. For more information on the exception, check the Message property.

◆ ReadImageFiles()

void BufferAcquisition.BufferedAcquisition.ReadImageFiles ( String  FileName,
uint  startBufferNumber,
uint  numBuffers 
)

Reads image files from disk into memory, that were saved with the WriteBuffer and WriteBuffers methods.

Parameters
FileNameThe file name of the first image file to read into memory. For multiple files, the XXXX portion of the file name will be incremented. The file name should include the full path along with the file extension.
startBufferNumberThe first buffer that the files on disk will be read into. If startBufferNumber is greater than one, images will continue to be read into subsequent internal buffers. In order for multiple images to be read, they must have the format "prefixXXXX.ext", where XXXX is a sequential number series.
numBuffersThe number of buffers to be read into.
Exceptions
System.ArgumentExceptionThrown when trying to read a raw image file into memory.
System.OutOfMemoryExceptionThrown when there is not enough memory available to read in an image.
System.ArgumentExceptionThrown if the file extension is something other than bmp, tif or avi. Also will be thrown if the numBuffers or a combination of numBuffers and startBufferNumber exceed the number of buffers allocated with Setup.
System.IO.IOExceptionThrown if the file name passed into the method could not be found, or is invalid.
System.ApplicationExceptionThrown when an internal error occurs. For more information on the exception, check the Message property.

◆ ResumeAcquisition()

void BufferAcquisition.BufferedAcquisition.ResumeAcquisition ( AcqControlOptions  options)

Resumes acquisition after a pause. If acquisition was paused on buffer number eight, when resume is called, acquisition will begin in buffer nine. ResumeAcquisition can only be called after a pause, in all other cases the System.InvalidOperationException will be thrown.

Parameters
optionsThe options parameter can be one of the following:
Exceptions
System.InvalidOperationExceptionThrown if the board is not open and/or not setup before calling this method. Will also be thrown if a resume is call at anytime other than after a pause.
System.TimeoutExceptionThrown when a timeout occurs while waiting for acquisition to resume when using the Wait option.
System.ApplicationExceptionThrown when an internal error occurs. For more information on the exception, check the Message property.

◆ SetAcqFrameSize()

void BufferAcquisition.BufferedAcquisition.SetAcqFrameSize ( uint  xSize,
uint  ySize 
)

Sets the size of the acuqired frame. The behaviour of this function depends somewhat on the camera configuration file being used. With some configurations it is not possible to modify the frame size. With others it is only possible to modify the image height. With most cameras it is possible to modify both the width and height. It is not possible to modify the acquisition size to be bigger than the sensor. However, with line scan cameras it is possible to set ySize to almost any number because on these cameras the frame height is arbitrary. This function must be called before acquisition has been setup using one of the setup methods.

Parameters
xSizeThe width of the acquired frame in pixels
ySizeThe hieght of the acquired frame in lines
Exceptions
System.ApplicationExceptionThrown if the acquisition frame size cannot be modified

◆ SetAcqROI()

void BufferAcquisition.BufferedAcquisition.SetAcqROI ( uint  XOffset,
uint  YOffset,
uint  xSize,
uint  ySize 
)

Set the Region Of Interest (ROI) of the acquired frame. The behaviour of this function depends somewhat on the camera configuration file being used. With some configurations it is not possible to modify the frame size. With others it is only possible to modify the image height. With most cameras it is possible to modify both the width and height. It is not possible to modify the acquisition size to be bigger than the sensor. However, with line scan cameras it is possible to set ySize to almost any number because on these cameras the frame height is arbitrary. Similar restrictions apply to the XOffset as do the xSize . This function must be called before acquisition has been setup using one of the setup methods.

Parameters
XOffsetThe pixel offset from the left edge of the image.
YOffsetThe pixel offset from the top of the image.
xSizeThe width of the acquired frame in pixels
ySizeThe hieght of the acquired frame in lines
Exceptions
System.ApplicationExceptionThrown if the acquisition frame size cannot be modified.

◆ SetBufferStatus()

virtual uint BufferAcquisition.BufferedAcquisition.SetBufferStatus ( uint  bufferNumber,
BufferStatus  status 
)
virtual

◆ SetExposureControl()

void BufferAcquisition.BufferedAcquisition.SetExposureControl ( double  ExposurePeriod,
double  LineFramePeriod,
NTGTrigModes  TriggerMode,
TriggerPolarity  AssertionPolarity,
NTGOutputSignal  OutputSignal 
)

Programs the New Timing Generator (NTG), used to create waveforms to control the line/frame rate and exposure time of cameras.

Parameters
ExposurePeriodThe exposure period of image capture, in milliseconds.
LineFramePeriodThe line or frame period of image capture, in milliseconds.
TriggerModeThe triggering mode of the NTG.
AssertionPolarityDetermines the assertion level of the NTG waveform output, high or low.
OutputSignalThe outputs that the NTG waveform triggers. This value is a flag.
See also
GetExposureControl

◆ SetGPOut()

void BufferAcquisition.BufferedAcquisition.SetGPOut ( uint  GP0ut,
uint  Val 
)

Sets the level of a General Purpose Output

Parameters
GP0utThe GPOUT signal to change (0 to 6)
ValThe value to set the output (0 or 1)
Exceptions
System.ApplicationExceptionThrown if the if the GPOUT can not be set or if the GPOut parameter is not known

◆ SetOverwriteMethod()

virtual void BufferAcquisition.BufferedAcquisition.SetOverwriteMethod ( OverwriteMethod  overwriteMethod)
virtual

◆ SetSeqSettings()

virtual void BufferAcquisition.BufferedAcquisition.SetSeqSettings ( uint  startFrame,
uint  numberOfFrames 
)
virtual

◆ SetSetupOptions()

void BufferAcquisition.BufferedAcquisition.SetSetupOptions ( SetupOptions  options)

Sets the setup options for the acquisition engine on the board. This method should be called before the Setup method is called. If this method is not called before the Setup method, the default option will be used. Once the setup option is set, the board will continue to use that option until it is changed, or a new sequence or circular object is instantiated. When a sequence or circular object is instantiated, the setup option is set to Default. Options may be ORed together. For instance,

SetSetupOptions(SetupOptions.InvertOddFrames | SetupOptions.InvertEvenFrames) will set the options for inverting the odd and even frames, all frames.

Parameters
options
  • SetupOptions.Default Creates error signals and resets the acquisition engine on an overflow or hardware exception, and continues acquiring images. If a buffer is overwritten, acquisition of images continues. No frames will be inverted.
  • SetupOptions.AbortMissedFrame In circular acquisition, if a buffer is missed, acquisition is aborted. This option is not applicable for sequence acquisition.
  • SetupOptions.DisableAqErrorSig The overflow and hardware exception signals will not be created.
  • SetupOptions.InvertEvenFrames Acquires the even buffers upside down.
  • SetupOptions.InvertOddFrames Acquires the odd buffers upside down.
  • SetupOptions.OnlyOddLines Writes camera data to only the odd lines in the host memory buffer. This option is only for use with the 2x DMA engine for high speed 80-bit cameras.
  • SetupOptions.OnlyEvenLines Writes camera data to only the even lines in the host memory buffer. This option is only for use with the 2x DMA engine for high speed 80-bit cameras.

◆ SetTimeout()

void BufferAcquisition.BufferedAcquisition.SetTimeout ( uint  timeoutValue)

Sets the timeout value for operations within the Buffer interface. These operations include, but are not limited to, waiting for frames, waiting for acquisition to start or abort, and waiting for active regions within a frame. If this method is not called the timeout value used will come from the attached camera file. For this timeout value to be active you have to call this method after Setup.

Parameters
timeoutValueThe value to set the timeout value too.
Exceptions
System.InvalidOperationExceptionThrown when the board is not open, and this method is called.
System.ApplicationExceptionThrown when an internal error occurs. For more information on the exception, check the Message property.

◆ SetTriggerMode()

void BufferAcquisition.BufferedAcquisition.SetTriggerMode ( TriggerModes  triggerMode,
TriggerPolarity  triggerPolarity 
)

Sets the trigger mode for the acquisition engine.

Parameters
triggerModeThe trigger mode to setup for acquisition. The trigger mode can be one of the following:
triggerPolarityDetermines the polarity of the when the trigger should occur, on a rising or falling egde. The trigger polarity can be one of the following:
Exceptions
System.InvalidOperationExceptionThrown if the board is not open and/or not setup before calling this method.
System.ApplicationExceptionThrown when an internal error occurs. For more information check the message property.

◆ Setup() [1/4]

void BufferAcquisition.BufferedAcquisition.Setup ( List< byte[]>  bufferPtrList,
uint  numberOfBuffers 
)

Sets up the board for sequence or circular acquisition with buffer memory allocated by the user. The user passes in a list of byte arrays into the method. The method sets registers on the board based on the attached camera file at the time Setup is called.

Parameters
bufferPtrListA list of byte arrays to hold the acquired image data. The byte arrays are allocated by the user and passed into the method. The board then acquires image data into those buffers.
numberOfBuffersThe number of buffers allocated by the user.
Exceptions
System.InvalidOperationExceptionThrown if the board is not open or if the board is already setup.
System.OutOfMemoryExceptionThrown when there is not enough available memory for buffer allocation and/or other memory resources.
System.ArgumentExceptionThrown if the bufferPtrArray pointer is null.
System.ApplicationExceptionThrown when an internal error occurs while trying to setup the board for acquisitioin. For more information check the message property.
// Allocate a list of each buffer
List<byte[]> BufferList = new List<byte[]>(NumberOfBuffers);
// Allocate buffer memory and add the buffers to the buffer list
for (int i = 0; i < NumberOfBuffers; i++)
{
BufferList.Add(new byte[BufferSize]);
}
// Setup the board for acquisition
Seq.Setup(BufferList, NumberOfBuffers);

◆ Setup() [2/4]

void BufferAcquisition.BufferedAcquisition.Setup ( List< IntPtr >  bufferPtrList,
uint  numberOfBuffers 
)

Sets up the board for sequence or circular acquisition with buffer memory allocated by the user. The user then passes in a list of buffer pointers into the method. The method sets registers on the board based on the attached camera file at the time Setup is called.

Parameters
bufferPtrListA list of pointers that point to each of the buffers allocated by the user.
numberOfBuffersThe number of buffers allocated by the user.
Exceptions
System.InvalidOperationExceptionThrown if the board is not open or if the board is already setup.
System.OutOfMemoryExceptionThrown when there is not enough available memory for buffer allocation and/or other memory resources.
System.ArgumentExceptionThrown if the bufferPtrArray is zero or if the numberOfBuffers is larger than the number of pointers in the list.
System.ApplicationExceptionThrown when an internal error occurs while trying to setup the board for acquisitioin. For more information check the message property.
// Create a list of IntPtrs for each buffer
List<IntPtr> BufPtrList = new List<IntPtr>(NumberOfBuffers);
// Allocate buffer memory and add the buffers to the buffer list
for (int i = 0; i < NumberOfBuffers; i++)
{
BufPtrList.Add(Marshal.AllocHGlobal(BufferSize));
}
// Setup the board for acquisition
Seq.Setup(BufferList, NumberOfBuffers);

◆ Setup() [3/4]

void BufferAcquisition.BufferedAcquisition.Setup ( uint  numberOfBuffers)

Sets up the board for sequence or circular acquisition by allocating buffer memory and setting registers on the board based on the attached camera file at the time Setup is called.

Parameters
numberOfBuffersThe number of buffers to allocate for sequence or circular acquisition.
Exceptions
System.InvalidOperationExceptionThrown if the board is not open or if the board is already setup. The board must be open before calling the setup method. Setup can only be called one, subsequent calls to setup will throw the System.InvalidOperationException exception. In the case where the board is already setup, Cleanup should be called before another call to Setup.
System.OutOfMemoryExceptionThrown when there is not enough available memory for buffer allocation and/or other memory resources.
System.ArgumentExceptionThrown if the number of buffers passed into the method is less than two.
System.ApplicationExceptionThrown when an internal error occurs while trying to setup the board for acquisitioin. For more information check the message property.

◆ Setup() [4/4]

void BufferAcquisition.BufferedAcquisition.Setup ( uint  numberOfBuffers,
uint  alignment 
)

Sets up the board for sequence or circular acquisition by allocating buffer memory and setting registers on the board based on the attached camera file at the time Setup is called. When allocating the buffer memory, each buffer will be aligned by the specified alignment boundary, specified by the alignment parameter.

Parameters
numberOfBuffersThe number of buffers to allocate for sequence or circular acquisition.
alignmentAllocation will be on this specified alignment boundary. The alignment value must be an integer power of 2.
Exceptions
System.InvalidOperationExceptionThrown if the board is not open or if the board is already setup.
System.OutOfMemoryExceptionThrown when there is not enough available memory for buffer allocation and/or other memory resources.
System.ArgumentExceptionThrown if the number of buffers passed into the method is less than two or if the Alignment parameter is not a power of 2.
System.ApplicationExceptionThrown when an internal error occurs while trying to setup the board for acquisitioin. For more information check the message property.

◆ SetWriteBufferOptions()

void BufferAcquisition.BufferedAcquisition.SetWriteBufferOptions ( WriteOptions  options)

Sets the different write options when writing images to disk. The write options must be set before calling the WriteBuffer and WriteBuffers methods. If this method is not called before calling the WriteBuffer and WriteBuffers methods, the WriteOptions.Default option will be used. Once the write option is set, it will remain at that value until it is set to something else. All options can be or'ed together. For instance, the following is setting options for packing 32-bit RGB to 24-bit, swapping RGB to BGR, flipping the image and overwriting existing files.

SetWriteBufferOptions(WriteOptions.Pack32To24Bit | WriteOptions.SwapRGB | WriteOptions.BottomUp | WriteOptions.OverwriteFile);

Parameters
optionsThe write options can be one of the following:

◆ ShowErrorDialog()

uint BufferAcquisition.BufferedAcquisition.ShowErrorDialog ( uint  errorCode)

Displays a dialog with a description of the error of the error code passed in by the errorCode parameter. See the GetErrorCode method on retrieving the error code from the error stack.

Parameters
errorCodeThe error code to get a description of and display on the dialog.
Returns
Returns a zero when the user click the OK button to close the dialog, and a non-zero value when the user clicked the cancel button to close the dialog.
Exceptions
System.InvalidOperationExceptionThrown if the board is not open and/or not setup before calling this method.
System.ArgumentOutOfRangeExceptionThrown when the errorCode parameter that is passed into the method cannot be found or is not in the range of known error codes.

◆ StartAcquisition()

void BufferAcquisition.BufferedAcquisition.StartAcquisition ( AcqControlOptions  options)

Starts acquisition from the acquisition engine on the board. The board will begin acquiring images from the attached camera.

Parameters
optionsThe options parameter can be one of the following:
Exceptions
System.InvalidOperationExceptionThrown if the board is not open and/or not setup before calling this method, and will also be thrown if acquisition has already been started.
System.TimeoutExceptionThrown when a timeout occurs while waiting for acquisition to begin when using the Wait option.
System.ApplicationExceptionThrown when an internal error occurs. For more information on the exception, check the Message property.

◆ StopAcquisition()

void BufferAcquisition.BufferedAcquisition.StopAcquisition ( AcqControlOptions  options)

Instructs the acquisition engine to stop acquiring images after the current image being acquired is done.

Parameters
optionsThe options parameter can be one of the following:
  • AcqControlOptions.Wait The method will not return until the acquisition engine finishes acquiring the current image.
  • AcqControlOptions.Async The method will return immediately after issuing a stop to the acquisition engine.
Exceptions
System.InvalidOperationExceptionThrown if the board is not open and/or not setup before calling this method.
System.TimeoutExceptionThrown when a timeout occurs while waiting for acquisition to finish when using the Wait option.
System.ApplicationExceptionThrown when an internal error occurs. For more information on the exception, check the Message property.

◆ UnloadCameraFile()

void BufferAcquisition.BufferedAcquisition.UnloadCameraFile ( )

Unloads and frees resources associated with the LoadCamFile method.

◆ WaitForError()

uint BufferAcquisition.BufferedAcquisition.WaitForError ( )

Waits for an error to occur. Idealy, this method should be called in a seperate thread, where it will efficiently wait for an error to occur. If an error occurs, this method will return and appropriate action can be taken. For more information on the error that occured see the GetErrorCode method.

Returns
Returns a non-zero value if an error has occured or a zero if the method returned because Cleanup was called.
Exceptions
System.InvalidOperationExceptionThrown if the board is not open and/or not setup before calling this method.
System.ApplicationExceptionThrown when an internal error occurs. For more information check the message property.

◆ WaitForFrameDone() [1/2]

WaitFrameDoneReturns BufferAcquisition.BufferedAcquisition.WaitForFrameDone ( uint  timeout)

This method will wait until an image has been completly acquired into memory, and the return. The method will return immediately if an image has already been acquired into memory.

WaitForFrameDone(uint) and WaitForNextFrame(uint) behave identically. Prefer WaitForNextFrame(uint) for new code.

Parameters
timeoutThe number of milliseconds to wait for a frame to be acquired.
Returns
Returns one of the following:
Exceptions
System.InvalidOperationExceptionThrown if the board is not open and/or not setup before calling this method.
System.TimeoutExceptionThrown when a frame is not acquired within the time specified by the timeout parameter.
System.ApplicationExceptionThrown when an internal error occurs. For more information check the message property.

◆ WaitForFrameDone() [2/2]

WaitFrameDoneReturns BufferAcquisition.BufferedAcquisition.WaitForFrameDone ( uint  timeout,
ref BufferInfo  bufInfo 
)

This method has been deprecated, and should be replaced by WaitForNextFrame(uint, out BufferInfo), for correct "out" reference usage.

This method will wait until an image has been completly acquired into memory, and the return. The method will return immediately if an image has already been acquired into memory.

Parameters
timeoutThe number of milliseconds to wait for a frame to be acquired.
bufInfoOn return of WaitFrameDoneReturns.FrameAcquired, instantiated with a new BufferInfo handle. Otherwise, set to null. The BufferInfo class contains the following information about the image acquired:
  • BufData A pointer to the buffer of the image that has just been acquired. This is a pointer into unmanaged memory.
  • FrameCount The number of frames that have been acquired. This number includes frames that have been missed due to overflows. If there is a gap in the frame count the number missing is the frame that is missing. An example would be a frame count of 1, 2, 4, 5, ... N. In this case frame 3 overflowed and was overwritten by frame number 4.
  • TimeStamp A high-resolution time stamp of when the image finished acquisition into memory. This time stamp uses the CPU clock to determine time. Hence, the faster the CPU the more accurate the time stamp. Using a modern day CPU the time stamp should be accurate to at least +/- 1mS. It is recommended that the user benchmark the time stamp for their particular system.
  • BufferNumber The buffer number that the image was acquired into.
  • NumLinesAcquired The number of line acquired, usually ysize unless in start stop trigger mode.
  • NumItemsOnQueue The number of frames that have not been removed from the buffer queue in circular acquisition. For sequence acquisition this value is always zero.
  • CXPSrcTag The CXP source tag frame metadata returned with the frame.
  • CXPXOffset The CXP x-offset frame metadata returned with the frame.
  • CXPYOffset The CXP y-offset frame metadata returned with the frame.
Returns
Returns one of the following:
Exceptions
System.InvalidOperationExceptionThrown if the board is not open and/or not setup before calling this method.
System.TimeoutExceptionThrown when a frame is not acquired within the time specified by the timeout parameter.
System.ApplicationExceptionThrown when an internal error occurs. For more information check the message property.

◆ WaitForNextFrame() [1/2]

WaitFrameDoneReturns BufferAcquisition.BufferedAcquisition.WaitForNextFrame ( uint  timeout)

This method will wait until an image has been completly acquired into memory, and the return. The method will return immediately if an image has already been acquired into memory.

WaitForFrameDone(uint) and WaitForNextFrame(uint) behave identically. Prefer WaitForNextFrame(uint) for new code.

Parameters
timeoutThe number of milliseconds to wait for a frame to be acquired.
Returns
Returns one of the following:
Exceptions
System.InvalidOperationExceptionThrown if the board is not open and/or not setup before calling this method.
System.TimeoutExceptionThrown when a frame is not acquired within the time specified by the timeout parameter.
System.ApplicationExceptionThrown when an internal error occurs. For more information check the message property.

◆ WaitForNextFrame() [2/2]

WaitFrameDoneReturns BufferAcquisition.BufferedAcquisition.WaitForNextFrame ( uint  timeout,
out BufferInfo  bufInfo 
)

This method will wait until an image has been completly acquired into memory, and the return. The method will return immediately if an image has already been acquired into memory.

Parameters
timeoutThe number of milliseconds to wait for a frame to be acquired.
bufInfoOn return of WaitFrameDoneReturns.FrameAcquired, instantiated with a new BufferInfo handle. Otherwise, set to null. The BufferInfo class contains the following information about the image acquired:
  • BufData A pointer to the buffer of the image that has just been acquired. This is a pointer into unmanaged memory.
  • FrameCount The number of frames that have been acquired. This number includes frames that have been missed due to overflows. If there is a gap in the frame count the number missing is the frame that is missing. An example would be a frame count of 1, 2, 4, 5, ... N. In this case frame 3 overflowed and was overwritten by frame number 4.
  • TimeStamp A high-resolution time stamp of when the image finished acquisition into memory. This time stamp uses the CPU clock to determine time. Hence, the faster the CPU the more accurate the time stamp. Using a modern day CPU the time stamp should be accurate to at least +/- 1mS. It is recommended that the user benchmark the time stamp for their particular system.
  • BufferNumber The buffer number that the image was acquired into.
  • NumLinesAcquired The number of line acquired, usually ysize unless in start stop trigger mode.
  • NumItemsOnQueue The number of frames that have not been removed from the buffer queue in circular acquisition. For sequence acquisition this value is always zero.
  • CXPSrcTag The CXP source tag frame metadata returned with the frame.
  • CXPXOffset The CXP x-offset frame metadata returned with the frame.
  • CXPYOffset The CXP y-offset frame metadata returned with the frame.
Returns
Returns one of the following:
Exceptions
System.InvalidOperationExceptionThrown if the board is not open and/or not setup before calling this method.
System.TimeoutExceptionThrown when a frame is not acquired within the time specified by the timeout parameter.
System.ApplicationExceptionThrown when an internal error occurs. For more information check the message property.

◆ WaitForSequenceDone()

virtual SeqDoneReturns BufferAcquisition.BufferedAcquisition.WaitForSequenceDone ( uint  timeout)
virtual

◆ WriteBuffer()

void BufferAcquisition.BufferedAcquisition.WriteBuffer ( String  fileName,
uint  bufferNumber 
)

Writes one buffer to a file on disk in the BMP, TIFF or RAW file format.

Parameters
fileNameThe file name to be saved to disk. The file name should be the full path along with the the file extension.
bufferNumberThe number of the buffer to be written to disk.
Exceptions
System.ArgumentOutOfRangeExceptionThrown if the

bufferNumber

parameter is an invalid buffer number.

Exceptions
System.OutOfMemoryExceptionThrown when there is not enough memory available for writing the image to disk.
System.ArgumentExceptionThrown when the

fileName

parameter is not a valid file type(BMP, Tiff, Raw). Can also be thrown if the write options are not valid for the image. For instance, if the swap RGB option is used on a 8-bit image.

Exceptions
System.ApplicationExceptionThrown when an internal error occurs. For more information on the exception, check the Message property.
System.IO.IOExcptionThrown when the file already exists and the WriteOptions.OverwriteFile is not being used.

◆ WriteBuffers()

void BufferAcquisition.BufferedAcquisition.WriteBuffers ( String  fileName,
uint  startBufferNumber,
uint  numBuffers 
)

Writes multiple buffers to a file on disk in the BMP, TIFF, RAW or AVI file formats.

Parameters
fileNameThe file name to be saved to disk. The file name should be the full path along with the the file extension.
startBufferNumberThe first buffer to write to disk.
numBuffersThe number of buffers to be written to disk.
Exceptions
System.ArgumentOutOfRangeExceptionThrown if the any of the parameters are invalid, or a combination of parameters is invalid. For instance, if 10 buffers are allocated and the start buffer is 5, and then number of buffers is 6.
System.OutOfMemoryExceptionThrown when there is not enough memory available for writing the image to disk.
System.ArgumentExceptionThrown when the fileName parameter is not a valid file type(BMP, Tiff, Raw). Can also be thrown if the write options are not valid for the image. For instance, if the swap RGB option is used on a 8-bit image.
System.ApplicationExceptionThrown when an internal error occurs. For more information on the exception, check the Message property.
System.IO.IOExcptionThrown when the file already exists and the WriteOptions.OverwriteFile is not being used.

Property Documentation

◆ BoardCount

uint BufferAcquisition.BufferedAcquisition.BoardCount
staticget

Return the number of BitFlow board installed on this system.

Returns
The number of BitFlow boards installed on this system.
Exceptions
System.ApplicationExceptionThrown if the board count cannot be determined.

◆ CameraMode

String BufferAcquisition.BufferedAcquisition.CameraMode
getset

Get or set the current camera mode's name. R64 and older board models do not support camera modes.

See also
EnumerateCameraModes, CameraModes

◆ CameraModes

String [] BufferAcquisition.BufferedAcquisition.CameraModes
get

Alternative accessor of the board modes.

See also
EnumerateCameraModes, CameraMode

◆ Properties

BoardProperties BufferAcquisition.BufferedAcquisition.Properties
get

Retrieve a BufferedAcquisition::BoardProperties handle for this BufferAcqisition object.


The documentation for this class was generated from the following file: