📄 grabber.h
字号:
virtual LVSTATUS StoreROI(U8BIT _Huge_ *Buffer, LvROI *Info, U8BIT InMode=ColF_Output);
/** Retrieves the content of the defined region of interest.
* This method is used to retrieve an image buffer from the acquisition
* memory using the memory view specified in the provided LvROI object;
* this object has to be initialized by using the GetConnectionInfo()
* method.\n
* The @b Buffer parameter is a huge pointer to a block of CPU memory
* allocated by the calling application and it has to be large enough to contain
* the requested data. The size of the buffer can be requested to the LvROI
* object after the setting of the dimension and the size of the ROI by using
* its LvROI::GetArea() method.\n
* Using this method, the user has not to @a Enable and @a Disable the Video
* Memory access, Daisy will do it.
* @param Buffer User allocated buffer where Daisy will copy
* the part of video memory specified in the
* LvROI object. Daisy assumes that this buffer
* will be large enough to contain the whole
* image. The size of the retrieving memory
* area can be known by calling the LvROI::GetArea()
* method of the initialized LvROI object.
* @param Info Object defining the Region of interest that has
* to be retrieved from the video memory.
* @return @ref ErrorDefinitions
* @sa StoreROI() LvROI::GetArea()
*/
virtual LVSTATUS RetrieveROI(U8BIT _Huge_ *Buffer, LvROI *Info);
/** Sets the scale mode used for a target.
* When the user application activates a Roi for a specified camera and
* target, the way the image will fit the requested size is determined by calls
* to this function.
* @param hConnection Handle of the camera to be
* set; this handle must be retrieved by calling
* the ConnectCamera() method.
* @param ScaleMode Scaling mode; one of the ScalingMode
* values
* @param Targets @link Targets Target@endlink for which the new scale mode has to
* be set.
* @return @ref ErrorDefinitions
* @sa ConnectCamera(), ActivateRoi(), LvCameraNode::SetSourceRoi(), LvCameraNode::GetSourceRoi()
*/
virtual LVSTATUS SetScaleMode(HCONNECTION hConnection, U8BIT ScaleMode, U8BIT Targets=Tgt_Default);
/** Loads the output gray palette.
* Allows the user to load a Rey scale in the output Look up table; even if it
* is working with all the resolutions and color formats, the user can see the
* effects of the loading only if the grabber is set to work in 256 colors.
* @param LutMode The mode (8 bits or 6 bit) with which the LUT
* will be loaded.\n
* - If 6 bits mode is selected the gray scale is loaded with 64 gray levels,
* while in 8 bits mode with 256 gray levels.
* - On the active board Windows uses part of the LUT so not all
* the positions are available to be set.
* @return @ref ErrorDefinitions
* @sa LoadOutPalette(), SaveOutPalette()
*/
virtual LVSTATUS LoadOutGreyScale(int LutMode=8);
/** Loads the specified output palette.
* Allows the user to load a palette in the output Look up table; even if it is
* working with all the resolutions and color formats, the user can see the
* effects of the loading only if the grabber is set to work in 256 colors.\n
* The @b RGBQUAD structure is the one defined by Windows in which the user
* will specify each component value for the color being defined. The choice
* to use a typical @a Windows structure was determined by the easier handling
* of bitmaps that the user could want to load in a grabber video memory. Of
* course, @a Windows provides the same functionality but @b ONLY on the active
* VGA device; this method works on all the PrimaView on the system.
* @param ThePalette Pointer to palette
* @param NrItem Number of item
* @return @ref ErrorDefinitions
* @sa SaveOutPalette()
*/
virtual LVSTATUS LoadOutPalette(RGBQUAD *ThePalette, U16BIT NrItem);
/** Saves the currently set output palette.
* Allows the user to save a palette from the output Look up table; even if it is
* working with all the resolutions and color formats, the user can have
* meaningful data only if the grabber is set to work in 256 colors.\n
* The @b RGBQUAD structure is the one defined by @a Windows in which the user
* will find each component value for the defined color.
* @param ThePalette Pointer to palette
* @param NrItem Number of item
* @return @ref ErrorDefinitions
* @sa LoadOutPalette()
*/
virtual LVSTATUS SaveOutPalette(RGBQUAD *ThePalette, U16BIT NrItem);
virtual LVSTATUS SetOutPaletteBitSize(U8BIT PalSize=8);
virtual U8BIT GetOutPaletteBitSize(void);
/** Sets optocoupler output state.
* This function allows a user application to determine the state of on-board
* optocouplers output.
* Depending on the actual grabber hardware the output optocouplers can be
* independent from the input optocouplers.
* This function should be considered obsolete and should not be used
* anymore by new developed applications. See SetOptocouplerBank.
* @param Mask Determines how to set the output
* optocouplers; Note that ALL the optocouplers
* will be affected by this command, so the
* application should keep track of the desired
* state of the output optocouplers, since,
* depending on the hardware, there could be
* no way to read back their actual state. The
* mask should be composed by OR-ing values
* from the @ref DefOptocoupler definitions.
* @param Enable Obsolete parameter. Set to 0.
* @return @ref ErrorDefinitions
* @sa GetOptocoupler()
*/
virtual LVSTATUS SetOptocoupler(U16BIT Mask, BOOL Enable=TRUE) { return DSY_E_NotSupported; }
/** Gets the actual state of the input optocouplers.
* Gets the actual state of the input optocouplers.
* The mask should be checked by AND-ing the retrieved value with values
* from the @ref DefOptocoupler definitions.\n
* \n
* This function should be considered obsolete and should not be used
* anymore by new developed applications. See GetOptocouplerBank().
* @param Mask pointer to 16 bits variable where Daisy copies
* the actual state of the optocouplers.\n
* Depending on the actual grabber hardware
* the input optocouplers can be independent
* from the output optocouplers.
* @return @ref ErrorDefinitions
* @sa SetOptocoupler()
*/
virtual LVSTATUS GetOptocoupler(U16BIT *Mask) { return DSY_E_NotSupported; }
/** Gets optocoupler mask.
* Each type of the grabber should has different number of optocouplers. There could be used
* this function to retrieve mask of actual grabber optocoupler
* @return optocoupler mask
*/
virtual U32BIT GetOptocouplerMask(void);
/** Sets the actual state of the output optocouplers.
* Sets the actual state of the output optocouplers on the specified bank.\n
* The mask should be created by @a ORing values from the @ref DefOptocoupler
* definitions.
* @param Mask Determines how to set the output
* optocouplers in the Bank bank.\n
* Note that ALL the optocouplers in the bank
* will be affected by this command, so the
* application should keep track of the desired
* state of the output optocouplers, since,
* depending on the hardware, there could be
* no way to read back their actual state. The
* mask should be composed by @a ORing values
* from the @ref DefOptocoupler definitions.
* @param Flag Not used.
* @param Bank Determines the bank to be set with the
* specified mask.
* @return @ref ErrorDefinitions
* @sa Optocoupler handling in the Daisy Tutorial manual
*/
virtual LVSTATUS SetOptocouplerBank(U32BIT Mask, U32BIT Flag=OptoFlag_Default, int Bank=0);
/** Gets the actual state of the input optocouplers.
* Gets the actual state of the input optocouplers of the specified bank.\n
* When no flag is specified in the @b Flag parameter, the value returned is the
* state of the input optocouplers at the time of the call.\n
* When the @ref OptoFlags_def "OptoFlag_Buffered" is specified in the @b Flag parameter, the
* value returned is the buffered state of the input optocouplers. In case the
* flag is set and the board does not support the buffered state reading, the
* function returns @ref ErrorDefinitions "DSY_E_NotSupported" .\n
* To verify if a specific optocoupler is active or not, the mask should be
* checked by AND-ing the retrieved value with values from the
* @ref DefOptocoupler.
* @param Mask pointer to 32 bits variable where Daisy copies
* the actual state of the optocouplers.\n
* Depending on the actual grabber hardware
* the input optocouplers can be independent
* from the output optocouplers.
* @param Flag combination of @ref OptoFlags_def. The
* flags can be OR-ed.
* @param Bank Determines which bank to retrieve.
* @return @ref ErrorDefinitions
*/
virtual LVSTATUS GetOptocouplerBank(U32BIT *Mask, U32BIT Flag=OptoFlag_Default, int Bank=0);
/** Gets the optocoupler mask in specified bank.
* Each type of grabber should have different number of optocoupler. This function returns
* mask of specified bank in actual grabber optocoupler
* @return Mask of specified bank in actual grabber optocoupler
*/
virtual U32BIT GetOptocouplerBankMask(int Bank=0);
/** Gets the input mask of the optocoupler.
* Similar to function GetOptocouplerBankMask() but this function returns input
* mask of specified bank in actual grabber optocoupler.
* @param Bank Determines which bank to retrieve.
* @return Input mask of specified bank in actual grabber optocoupler
*/
virtual U32BIT GetOptocouplerBankMaskIn(int Bank=0);
/** Gets the output mask of the optocoupler.
* Similar to function GetOptocouplerBankMask() but this function returns output
* mask of specified bank in actual grabber optocoupler.
* @param Bank Determines which bank to retrieve.
* @return Output mask of specified bank in actual grabber optocoupler
*/
virtual U32BIT GetOptocouplerBankMaskOut(int Bank=0);
/** Sets the configuration for the input optocouplers.
* Configures the specified input optocoupler to be reported in the buffered
* status returned by GetOptocouplerBank() function. This configuration
* does not affect the immediate state read through the same function.
* @param OptoNrInBank Determines which optocoupler in the
* specified is being configured. The value in
* this parameter is the index inside the 32 opto
* bank.
* @param How How the optocoupler has to be configured.
* One of the @ref OptoCfg_definitions
* @param Bank Determines in which bank is the optocoupler
* to be configured.
* @return @ref ErrorDefinitions
* @sa Optocoupler handling in the Daisy Tutorial manual
*/
virtual LVSTATUS SetOptocouplerBankCfg(int OptoNrInBank, U32BIT How, int Bank=0);
/** Gets the actual configuration of an input optocoupler.
* Retrieves the configuration of the specified input optocoupler when
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -