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 
53  virtual void InitDriver(void* pvErrorCallBackOwner, TErrorCallback fErrorCallback) = 0;
54 
64  virtual void DiscoverDevices(int& iDeviceCount) = 0;
65 
72  virtual void DiscoverDevicesAsync() = 0;
73 
85  virtual IDevice* CreateDevice(int iIdx) = 0;
86 
98  virtual IDevice* CreateDevice(const char* pcSerial) = 0;
99 
107  virtual void DestroyDevice(IDevice* pDevice) = 0;
108 
117  virtual void RegisterErrorCallback(void* callBackOwner, TErrorCallback fErrorCallback) = 0;
118 
124  virtual void UnregisterErrorCallback(void) = 0;
125 
136  virtual void RegisterPnpConnectCallback(void* callBackOwner, TCallbackFunctionPnpConnect pCallbackFunction) = 0;
137 
143  virtual void UnregisterPnpConnectCallback(void) = 0;
144 
156  virtual void RegisterPnpDisconnectCallback(void* callBackOwner, TCallbackFunctionPnpDisconnect pCallbackFunction) = 0;
157 
163  virtual void UnregisterPnpDisconnectCallback(void) = 0;
164 
173  virtual void GetProperty(EDriverProperty::ID eProp, int& theValue) = 0;
174 
183  virtual void GetProperty(EDriverProperty::ID eProp, double& theValue) = 0;
184 
193  virtual void GetProperty(EDriverProperty::ID eProp, long long& theValue) = 0;
194 
204  virtual void GetProperty(EDriverProperty::ID eProp, int& theValue, int& theValue2) = 0;
205 
215  virtual void GetProperty(EDriverProperty::ID eProp, double& theValue, double& theValue2) = 0;
216 
226  virtual void GetProperty(EDriverProperty::ID eProp, long long& theValue, long long& theValue2) = 0;
227 
237  virtual void GetProperty(EDriverProperty::ID eProp, void* theValue, int& theSize) = 0;
238 
248  virtual void GetProperty(EDriverProperty::ID eProp, char* theValue, int& theSize) = 0;
249 
259  virtual void GetProperty(EDriverProperty::ID eProp, wchar_t* theValue, int& theSize) = 0;
260 
270  virtual void GetPropertyRange(EDriverProperty::ID eProp, int& newMinValue, int& newMaxValue) = 0;
271 
281  virtual void GetPropertyRange(EDriverProperty::ID eProp, double& newMinValue, double& newMaxValue) = 0;
282 
292  virtual void GetPropertyRange(EDriverProperty::ID eProp, long long& newMinValue, long long& newMaxValue) = 0;
293 
301  virtual void HasProperty(EDriverProperty::ID eProp) = 0;
302 
311  virtual void SetProperty(EDriverProperty::ID eProp, int newValue) = 0;
312 
321  virtual void SetProperty(EDriverProperty::ID eProp, double newValue) = 0;
322 
331  virtual void SetProperty(EDriverProperty::ID eProp, long long newValue) = 0;
332 
342  virtual void SetProperty(EDriverProperty::ID eProp, int newValue, int newValue2) = 0;
343 
353  virtual void SetProperty(EDriverProperty::ID eProp, double newValue, double newValue2) = 0;
354 
364  virtual void SetProperty(EDriverProperty::ID eProp, long long newValue, long long newValue2) = 0;
365 
375  virtual void SetProperty(EDriverProperty::ID eProp, void* theValue, int theSize) = 0;
376 
386  virtual void SetProperty(EDriverProperty::ID eProp, char* theValue, int theSize) = 0;
387 
397  virtual void SetProperty(EDriverProperty::ID eProp, wchar_t* theValue, int theSize) = 0;
398 
408  virtual void SetPropertyRange(EDriverProperty::ID eProp, int newMinValue, int newMaxValue) = 0;
409 
419  virtual void SetPropertyRange(EDriverProperty::ID eProp, double newMinValue, double newMaxValue) = 0;
420 
430  virtual void SetPropertyRange(EDriverProperty::ID eProp, long long newMinValue, long long newMaxValue) = 0;
431 
443  virtual void UpdateFirmware(Rx::RayCam::IDevice* pxCamera) = 0;
444 
458  virtual int UpdateCheck(Rx::RayCam::IDevice* pxCamera) = 0;
459  };
460  }
461 }
462 
463 #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.