Raytrix RayCam SDK  v2.1.0
IDriver.h
Go to the documentation of this file.
1 // Copyright (c) 2013 Raytrix GmbH. All rights reserved.
4 #pragma once
5 
6 #pragma managed(push, off)
7 
8 #include "EDriverProperty.h"
9 #include "IDevice.h"
10 
11 #include "Rx.Interop.Runtime31/IException.h"
12 
13 namespace Rx
14 {
15  namespace RayCam
16  {
18  typedef void (__cdecl * TErrorCallback)(void* callBackOwner, Rx::Interop::Runtime31::IException& ex, Rx::RayCam::IDevice* throwingDevice);
19 
21  typedef void (__cdecl * TCallbackFunctionPnpConnect)(void* callBackOwner, IDevice* newDevice);
22 
24  typedef void (__cdecl * TCallbackFunctionPnpDisconnect)(void* callBackOwner, IDevice* removedDevice);
25 
32  class IDriver
33  {
34  public:
35 
43  virtual void InitDriver(void) = 0;
44 
45 
54  virtual void InitDriver(void* pvErrorCallBackOwner, TErrorCallback fErrorCallback) = 0;
55 
65  virtual void DiscoverDevices(int& iDeviceCount) = 0;
66 
73  virtual void DiscoverDevicesAsync() = 0;
74 
86  virtual IDevice* CreateDevice(int iIdx) = 0;
87 
95  virtual void DestroyDevice(IDevice* pDevice) = 0;
96 
105  virtual void RegisterErrorCallback(void* callBackOwner, TErrorCallback fErrorCallback) = 0;
106 
112  virtual void UnregisterErrorCallback(void) = 0;
113 
124  virtual void RegisterPnpConnectCallback(void* callBackOwner, TCallbackFunctionPnpConnect pCallbackFunction) = 0;
125 
131  virtual void UnregisterPnpConnectCallback(void) = 0;
132 
144  virtual void RegisterPnpDisconnectCallback(void* callBackOwner, TCallbackFunctionPnpDisconnect pCallbackFunction) = 0;
145 
151  virtual void UnregisterPnpDisconnectCallback(void) = 0;
152 
161  virtual void GetProperty(EDriverProperty::ID eProp, int& theValue) = 0;
162 
171  virtual void GetProperty(EDriverProperty::ID eProp, double& theValue) = 0;
172 
181  virtual void GetProperty(EDriverProperty::ID eProp, long long& theValue) = 0;
182 
192  virtual void GetProperty(EDriverProperty::ID eProp, int& theValue, int& theValue2) = 0;
193 
203  virtual void GetProperty(EDriverProperty::ID eProp, double& theValue, double& theValue2) = 0;
204 
214  virtual void GetProperty(EDriverProperty::ID eProp, long long& theValue, long long& theValue2) = 0;
215 
225  virtual void GetProperty(EDriverProperty::ID eProp, void* theValue, int& theSize) = 0;
226 
236  virtual void GetProperty(EDriverProperty::ID eProp, char* theValue, int& theSize) = 0;
237 
247  virtual void GetProperty(EDriverProperty::ID eProp, wchar_t* theValue, int& theSize) = 0;
248 
258  virtual void GetPropertyRange(EDriverProperty::ID eProp, int& newMinValue, int& newMaxValue) = 0;
259 
269  virtual void GetPropertyRange(EDriverProperty::ID eProp, double& newMinValue, double& newMaxValue) = 0;
270 
280  virtual void GetPropertyRange(EDriverProperty::ID eProp, long long& newMinValue, long long& newMaxValue) = 0;
281 
289  virtual void HasProperty(EDriverProperty::ID eProp) = 0;
290 
299  virtual void SetProperty(EDriverProperty::ID eProp, int newValue) = 0;
300 
309  virtual void SetProperty(EDriverProperty::ID eProp, double newValue) = 0;
310 
319  virtual void SetProperty(EDriverProperty::ID eProp, long long newValue) = 0;
320 
330  virtual void SetProperty(EDriverProperty::ID eProp, int newValue, int newValue2) = 0;
331 
341  virtual void SetProperty(EDriverProperty::ID eProp, double newValue, double newValue2) = 0;
342 
352  virtual void SetProperty(EDriverProperty::ID eProp, long long newValue, long long newValue2) = 0;
353 
363  virtual void SetProperty(EDriverProperty::ID eProp, void* theValue, int theSize) = 0;
364 
374  virtual void SetProperty(EDriverProperty::ID eProp, char* theValue, int theSize) = 0;
375 
385  virtual void SetProperty(EDriverProperty::ID eProp, wchar_t* theValue, int theSize) = 0;
386 
396  virtual void SetPropertyRange(EDriverProperty::ID eProp, int newMinValue, int newMaxValue) = 0;
397 
407  virtual void SetPropertyRange(EDriverProperty::ID eProp, double newMinValue, double newMaxValue) = 0;
408 
418  virtual void SetPropertyRange(EDriverProperty::ID eProp, long long newMinValue, long long newMaxValue) = 0;
419 
431  virtual void UpdateFirmware(Rx::RayCam::IDevice* pxCamera) = 0;
432 
446  virtual int UpdateCheck(Rx::RayCam::IDevice* pxCamera) = 0;
447  };
448  }
449 }
450 
451 #pragma managed(pop)
virtual void HasProperty(EDriverProperty::ID eProp)=0
Check if a property is available for Get/Set operations.
virtual void GetPropertyRange(EDriverProperty::ID eProp, int &newMinValue, int &newMaxValue)=0
Gets a driver property of type int.
This class represents a camera. To use the camera in streaming mode:
Definition: IDevice.h:48
virtual void UnregisterPnpDisconnectCallback(void)=0
Unregisters the callback pnp disconnect.
Driver class initializes the driver and checks for connected and valid devices. You can search for de...
Definition: IDriver.h:32
void(__cdecl * TErrorCallback)(void *callBackOwner, Rx::Interop::Runtime31::IException &ex, Rx::RayCam::IDevice *throwingDevice)
This is the error callback function.
Definition: IDriver.h:18
virtual void SetPropertyRange(EDriverProperty::ID eProp, int newMinValue, int newMaxValue)=0
Sets a driver property of type int.
virtual void UpdateFirmware(Rx::RayCam::IDevice *pxCamera)=0
Searches for updates and updates the camera firmware. This function call can take up to 2 minutes...
ID
Definition: EDriverProperty.h:13
virtual void UnregisterPnpConnectCallback(void)=0
Unregisters the callback pnp connect.
virtual void DiscoverDevicesAsync()=0
Discover devices asynchronous. For each Device discovered, you will receive a callback invocation of ...
void(__cdecl * TCallbackFunctionPnpDisconnect)(void *callBackOwner, IDevice *removedDevice)
Defines a callback function for removed devices.
Definition: IDriver.h:24
virtual void RegisterPnpConnectCallback(void *callBackOwner, TCallbackFunctionPnpConnect pCallbackFunction)=0
Registers the callback pnp connect. After registering connect callback, you also have to register the...
virtual void SetProperty(EDriverProperty::ID eProp, int newValue)=0
Sets a driver property of type int.
virtual void RegisterPnpDisconnectCallback(void *callBackOwner, TCallbackFunctionPnpDisconnect pCallbackFunction)=0
Registers the callback pnp disconnect. After registering disconnect callback, you also have to regist...
virtual void DiscoverDevices(int &iDeviceCount)=0
Discovers devices and returns the total count of all devices.
virtual void DestroyDevice(IDevice *pDevice)=0
Destroys the Rx::RayCam::IDevice described by pDevice.
void(__cdecl * TCallbackFunctionPnpConnect)(void *callBackOwner, IDevice *newDevice)
Defines a callback function for new devices.
Definition: IDriver.h:21
virtual void UnregisterErrorCallback(void)=0
Unregisters the error callback.
Definition: RayCamAPI.h:27
virtual void InitDriver(void)=0
Initializes the driver. Only in case of success it is safe to proceed with e.g. DiscoverDevices(iDevi...
virtual void GetProperty(EDriverProperty::ID eProp, int &theValue)=0
Gets a driver property of type int.
virtual int UpdateCheck(Rx::RayCam::IDevice *pxCamera)=0
Checks for updates.
virtual void RegisterErrorCallback(void *callBackOwner, TErrorCallback fErrorCallback)=0
Registers the error callback.
virtual IDevice * CreateDevice(int iIdx)=0
Creates a device. Index represents the device attachment order.