⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 functions.h

📁 该程序实现FIRE足球机器人竞赛中的3:3比赛源码
💻 H
📖 第 1 页 / 共 4 页
字号:

/**
* \brief IOCTL_BCAM_GET_DRIVER_VERSION_STRING
* Get a string denoting the current driver version. 
* \return Version string
*/
#define IOCTL_BCAM_GET_DRIVER_VERSION_STRING \
  _CTL_CODE(FILE_DEVICE_BCAM_1394, OrdGetDriverVersionString, METHOD_BUFFERED, FILE_ANY_ACCESS)


/**
* \brief IOCTL_BCAM_SET_TEST_IMAGE_CSR
* Set the test image advances feature CSR. 
* \param arg ArgSetTestImageCSR
* \return None
*/
#define IOCTL_BCAM_SET_TEST_IMAGE_CSR \
  _CTL_CODE(FILE_DEVICE_BCAM_1394, OrdSetTestImageCSR, METHOD_BUFFERED, FILE_ANY_ACCESS)
/// Argument for the SetTestImageCSR function
typedef struct _BCAM_SET_TEST_IMAGE_CSR_IN
{
  BcamTestImage TestImageCSR; ///< Specifies the test image mode
} ArgSetTestImageCSR;

/**
* \brief IOCTL_BCAM_GET_TEST_IMAGE_CSR
* Get the test image advanced feature CSR. 
* \return ResGetTestImageCSR
*/
#define IOCTL_BCAM_GET_TEST_IMAGE_CSR \
  _CTL_CODE(FILE_DEVICE_BCAM_1394, OrdGetTestImageCSR, METHOD_BUFFERED, FILE_ANY_ACCESS)
/// Result of the GetTestImageCSR function
typedef struct _BCAM_GET_TEST_IMAGE_CSR_OUT
{
  BcamTestImage TestImageCSR; ///< Specifies the test image advanced feature control register
} ResGetTestImageCSR;


/**
* \brief IOCTL_BCAM_SET_SHADING_CTRL
* Set the shading advanced feature control register. 
* \param arg ArgSetShadingCtrl
* \return None
*/
#define IOCTL_BCAM_SET_SHADING_CTRL \
  _CTL_CODE(FILE_DEVICE_BCAM_1394, OrdSetShadingCtrl, METHOD_BUFFERED, FILE_ANY_ACCESS)
/// Argument for the SetShadingCtrl function
typedef struct _BCAM_SET_SHADING_CTRL_IN
{
  BcamShadingCtrl ShadingCtrl;  ///< Specifies the shading mode
  ULONG Mask;                   ///< Bitmask for components to set (ShadingMode or Test)
}ArgSetShadingCtrl; 


/**
* \brief IOCTL_BCAM_GET_SHADING_CTRL
* Get the shading advanced feature control register. 
* \return #ResGetShadingCtrl
*/
#define IOCTL_BCAM_GET_SHADING_CTRL \
  _CTL_CODE(FILE_DEVICE_BCAM_1394, OrdGetShadingCtrl, METHOD_BUFFERED, FILE_ANY_ACCESS)
/// Result of the GetShadingCtrl function
typedef BcamShadingCtrl ResGetShadingCtrl; 

/**
* \brief IOCTL_BCAM_GET_SHADING_INQUIRY
*  Query shading modes.
* \return #ResGetShadingMode
*/
#define IOCTL_BCAM_GET_SHADING_INQUIRY \
  _CTL_CODE(FILE_DEVICE_BCAM_1394, OrdGetShadingInquiry, METHOD_BUFFERED, FILE_ANY_ACCESS)
/// Result of the GetShadingMode function
typedef BcamShadingInq ResGetShadingInq; ///< Specifies the shading mode

/**
* \brief IOCTL_BCAM_UPLOAD_SHADING_DATA
*  Upload the shading data to the BCAM device.
* \param arg : PVOID; Pointer to the shading data buffer
* \return None
*/
#define IOCTL_BCAM_UPLOAD_SHADING_DATA \
  _CTL_CODE(FILE_DEVICE_BCAM_1394, OrdUploadShadingData, METHOD_BUFFERED, FILE_ANY_ACCESS)


/**
* \brief IOCTL_BCAM_FLUSH
*  Abort all operations that are not yet completed.
* \return None
*/
#define IOCTL_BCAM_FLUSH \
  _CTL_CODE(FILE_DEVICE_BCAM_1394, OrdFlush, METHOD_NEITHER, FILE_ANY_ACCESS)


/**
* \brief IOCTL_BCAM_GET_DCAM_VERSION
*  Get the implemented DCAM version of the camera.
* \return ResGetDcamVersion
*/
#define IOCTL_BCAM_GET_DCAM_VERSION \
  _CTL_CODE(FILE_DEVICE_BCAM_1394, OrdGetDcamVersion, METHOD_BUFFERED, FILE_ANY_ACCESS)
/// Result of the GetDcamVersion function
typedef ULONG ResGetDcamVersion;


/**
* \brief IOCTL_BCAM_GET_BASIC_FUNC_INQ
*  Return the contents of the camera's BASIC_FUNC_INQ register.
* \return ResGetBasicFuncInq
*/
#define IOCTL_BCAM_GET_BASIC_FUNC_INQ \
  _CTL_CODE(FILE_DEVICE_BCAM_1394, OrdGetBasicFuncInq, METHOD_BUFFERED, FILE_ANY_ACCESS)
/// Result of the GetDcamVersion function
typedef ULONG ResGetBasicFuncInq;


/**
* \brief IOCTL_BCAM_SET_USER_THREAD_PRIORITY
*  Set the priority of the calling thread.
* \param arg ArgSetUserThreadPriority
* \return None
*/
#define IOCTL_BCAM_SET_USER_THREAD_PRIORITY \
  _CTL_CODE(FILE_DEVICE_BCAM_1394, OrdSetUserThreadPriority, METHOD_BUFFERED, FILE_ANY_ACCESS)
typedef ULONG ArgSetUserThreadPriority;


/**
* \brief IOCTL_BCAM_SET_QUEUE_SERVER_PRIORITY
*  Set the priority of the driver's internal queue server thread.
* \param arg ArgSetQueueServerPriority
* \return ResSetQueueServerPriority
*/
#define IOCTL_BCAM_SET_QUEUE_SERVER_PRIORITY \
  _CTL_CODE(FILE_DEVICE_BCAM_1394, OrdSetQueueServerPriority, METHOD_BUFFERED, FILE_ANY_ACCESS)
typedef ULONG ArgSetQueueServerPriority;
typedef ULONG ResSetQueueServerPriority;


/**
* \brief IOCTL_BCAM_GET_QUEUE_SERVER_PRIORITY
*  Get the priority of the driver's internal queue server thread.
* \param arg None
* \return ResSetQueueServerPriority
*/
#define IOCTL_BCAM_GET_QUEUE_SERVER_PRIORITY \
  _CTL_CODE(FILE_DEVICE_BCAM_1394, OrdGetQueueServerPriority, METHOD_BUFFERED, FILE_ANY_ACCESS)
typedef ULONG ResGetQueueServerPriority;



/**
* \brief IOCTL_BCAM_GET_AUTH_CHALLENGE
* Get a challenge value for the challenge/response authetication protocol
* \param arg String
* \return ResGetAuthChallenge
*/
#define IOCTL_BCAM_GET_AUTH_CHALLENGE \
  _CTL_CODE(FILE_DEVICE_BCAM_1394, OrdGetAuthChallenge, METHOD_BUFFERED, FILE_ANY_ACCESS)
typedef MD5Sum ResGetAuthChallenge;


/**
* \brief IOCTL_BCAM_AUTHORIZE
* \param arg ArgAuthorize
* \return None
*/
#define IOCTL_BCAM_AUTHORIZE \
  _CTL_CODE(FILE_DEVICE_BCAM_1394, OrdAuthorize, METHOD_BUFFERED, FILE_ANY_ACCESS)
typedef MD5Sum ArgAuthorize;


/**
* \brief IOCTL_BCAM_GET_NUM_MEMORY_CHANNELS
* \param None
* \return BCAM_GET_NUM_MEMORY_CHANNELS_OUT
*/
#define IOCTL_BCAM_GET_NUM_MEMORY_CHANNELS \
  _CTL_CODE(FILE_DEVICE_BCAM_1394, OrdGetNumMemoryChannels, METHOD_BUFFERED, FILE_ANY_ACCESS)

typedef struct _BCAM_GET_NUM_MEMORY_CHANNELS_OUT
{
  /// Highest available memory channel number. If zero, memory channels are not 
  /// supported at all. If different to zero, 1..ulMaxChannel are freely 
  /// available user memory channels. 0 references the factory settings.
  ULONG ulMaxChannel;
}
BCAM_GET_NUM_MEMORY_CHANNELS_OUT, *PBCAM_GET_NUM_MEMORY_CHANNELS_OUT;

typedef BCAM_GET_NUM_MEMORY_CHANNELS_OUT ResGetNumMemoryChannels;



/**
* \brief IOCTL_BCAM_GET_CURRENT_MEMORY_CHANNEL
* \param None
* \return BCAM_GET_CURRENT_MEMORY_CHANNEL_OUT
*/
#define IOCTL_BCAM_GET_CURRENT_MEMORY_CHANNEL \
  _CTL_CODE(FILE_DEVICE_BCAM_1394, OrdGetCurrentMemoryChannel, METHOD_BUFFERED, FILE_ANY_ACCESS)

typedef struct _BCAM_GET_CURRENT_MEMORY_CHANNEL_OUT
{
  /// Number of the current memory channel.
  ULONG ulCurrentChannel;
}
BCAM_GET_CURRENT_MEMORY_CHANNEL_OUT, *PBCAM_GET_CURRENT_MEMORY_CHANNEL_OUT;

typedef BCAM_GET_CURRENT_MEMORY_CHANNEL_OUT ResGetCurrentMemoryChannel;



/**
* \brief IOCTL_BCAM_LOAD_MEMORY_CHANNEL
* \param BCAM_LOAD_MEMORY_CHANNEL_IN
* \return None
*/
#define IOCTL_BCAM_LOAD_MEMORY_CHANNEL \
  _CTL_CODE(FILE_DEVICE_BCAM_1394, OrdLoadMemoryChannel, METHOD_BUFFERED, FILE_ANY_ACCESS)

typedef struct _BCAM_LOAD_MEMORY_CHANNEL_IN
{
  /// Number of memory channel to load. Must be in the range of 
  /// 0..NUM_MEMORY_CHANNELS. '0' means 'reload factory settings'.
  ULONG ulChannel;
}
BCAM_LOAD_MEMORY_CHANNEL_IN, *PBCAM_LOAD_MEMORY_CHANNEL_IN;

typedef BCAM_LOAD_MEMORY_CHANNEL_IN ArgLoadMemoryChannel;



/**
* \brief IOCTL_BCAM_SAVE_MEMORY_CHANNEL
* \param BCAM_SAVE_MEMORY_CHANNEL_IN
* \return None
*/
#define IOCTL_BCAM_SAVE_MEMORY_CHANNEL \
  _CTL_CODE(FILE_DEVICE_BCAM_1394, OrdSaveMemoryChannel, METHOD_BUFFERED, FILE_ANY_ACCESS)

typedef struct _BCAM_SAVE_MEMORY_CHANNEL_IN
{
  /// Number of memory channel to save. Must be in the 
  /// range of 1..NUM_MEMORY_CHANNELS.
  ULONG ulChannel;
}
BCAM_SAVE_MEMORY_CHANNEL_IN, *PBCAM_SAVE_MEMORY_CHANNEL_IN;

typedef BCAM_SAVE_MEMORY_CHANNEL_IN ArgSaveMemoryChannel;



/* Combined argument types for all driver functions */
typedef union _BCAM_ARG
{
  ArgGetVideoModeMask GetVideoModeMask;
  ArgGetFrameRateMask GetFrameRateMask;
  ArgSetVideoFormatModeFrameRate SetVideoFormatModeFrameRate;
  ArgGetString GetString;
  ArgFmt7GetModeDescriptor GetFmt7Mode;
  ArgFmt7SetAOI SetAOI;
  ArgGetBandwidthInfo GetBwInfo;
  ArgFmt7GetColorMode GetColorMode;
  ArgFmt7SetColorMode SetColorMode;
  ArgCameraControl CameraControl;
  ArgQueryDCSFeatureInq QueryDCSFeature;
  ArgSetDCSFeatureCSR SetDCSFeature;
  ArgGetDCSFeatureCSR GetDCSFeature;
  ArgAllocateResources AllocateResources;
  ArgSetCameraBytesPerPacket SetBytesPerPacket;
  ArgSetTestImageCSR SetTestImageCSR;
  ArgSetShadingCtrl SetShadingCtrl;
  ArgSetUserThreadPriority SetUserThreadPriority;
  ArgSetQueueServerPriority SetQueueServerPriority;
  ArgAuthorize Authorize;
  ArgLoadMemoryChannel LoadMemoryChannel;
  ArgSaveMemoryChannel SaveMemoryChannel;
} BcamArg;

/* Combined result types for all driver functions */
typedef union _BCAM_RESULT
{
  ResGetVideoFormatMask VideFormatMask;
  ResGetVideoModeMask VideoModeMask;
  ResGetFrameRateMask FrameRateMask;
  ResGetCameraID CameraID;
  ResFmt7GetModeDescriptor Fmt7Mode;
  ResGetBandwidthInfo BwInfo;
  ResAllocateResources Res;
  ResFmt7GetColorMode ColorMode;
  ResQueryDCSFeatureInq DCSFeature;
  ResQueryDCSFeaturePresence DCSFeaturePresence;
  ResGetDCSFeatureCSR DCSFeatureCSR;
  ResGetVideoFormatModeFrameRate GetVideoFormatModeFrameRate;
  ResGetTestImageCSR GetTestImageCSR;
  ResGetShadingInq GetShadingInq;
  ResGetShadingCtrl GetShadingCtrl;
  ResGetDcamVersion GetDcamVersion;
  ResGetBasicFuncInq GetBasicFuncInq;
  ResSetQueueServerPriority SetQueueServerPriority;
  ResGetQueueServerPriority GetQueueServerPriority;
  ResGetAuthChallenge AuthChallenge;
  ResGetNumMemoryChannels GetNumMemoryChannels;
  ResGetCurrentMemoryChannel GetCurrentMemoryChannel;
} BcamResult;

#pragma pack(pop)
#endif /* !defined(FUNCTIONS_H) */

/**
* Device class GUIDs. These are used to identify device interfaces. GUID definitions must
* be outside the section protected from multiple inclusion, for reasons explained in the
* DDK docs (but not easily understood).
*/
#include "bcam_guid.h"

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -