COM interface exposing the methods of Device. Forced to use the same GUID as the original driver interface does. Provides both interface implementations (Dual), IDispatch and IUnknown for early and late binding.
Returns an interface pointer to the associated Sensor object. For COM interop this must be marshaled explicitly to Interface. The DispId attribute states the vtable entry of the method.
Returns an interface pointer to the associated Keyboard object. For COM interop this must be marshaled explicitly to Interface. The DispId attribute states the vtable entry of the method.
Returns type of the connected device. The DispId attribute states the vtable entry of the method.
Returns true if a device is connected with the driver. The DispId attribute states the vtable entry of the method.
Tries to find connected devices. For proper operation this method must be called before getting data from the device. The DispId attribute states the vtable entry of the method.
Disconnects already connected devices. Before the client application shuts down, this method should be called in order to disconnect event handlers and save application profiles. The DispId attribute states the vtable entry of the method.
Loads the application profile in argument preferencesName. As usual in a COM environment the stings are of type BSTR, so marshal strings that way. The DispId attribute states the vtable entry of the method.
COM interface exposing the methods of Keyboard. Forced to use the same GUID as the original driver interface does. Provides both interface implementations (Dual), IDispatch and IUnknown for early and late binding.
Returns number of keys the device offers. The DispId attribute states the vtable entry of the method.
Returns number of programmable keys the device offers. The DispId attribute states the vtable entry of the method.
Returns an IDispatch pointer to the parent Device object associated with the Sensor. For COM interop compatibility, the object must be marshaled to IDispatch. (See Blender Plugin) The DispId attribute states the vtable entry of the method.
Returns the Label of the supplied key, if any. As usual in a COM environment the stings are of type BSTR, so marshal strings that way. "In" states that the argument will be passed to the structure. The DispId attribute states the vtable entry of the method.
Returns the Name of the supplied key, if any. As usual in a COM environment the stings are of type BSTR, so marshal strings that way. "In" states that the argument will be passed to the structure. The DispId attribute states the vtable entry of the method.
Returns true if the supplied key is pressed down at the time. The DispId attribute states the vtable entry of the method.
Returns true if the supplied key is up at the time. The DispId attribute states the vtable entry of the method.
Provides translational data in three dimensions and a length (euclidean norm). Implements the IVector3D interface which exposes its methods to COM. Because of that the ClassInterfaceType must be "None", otherwise the CLR provides another class interface (and does not use IVector3D). The class is forced to use the same GUID as the original CoClass does in order to be accessible by binary-only clients.
Represents the X component of the translation.
Represents the Y component of the translation.
Represents the Z component of the translation.
Represents the length of the translation (euclidean length of the three components). If set to 0.0 all three components are set to 0.0, if set to 1.0 the components are scaled to be a unit vector.
Vector3D constructor
COM interface exposing the methods of Vector3D. Forced to use the same GUID as the original driver interface does. Provides both interface implementations (Dual), IDispatch and IUnknown for early and late binding.
Gets or sets the x component of the vector. The DispId attribute states the vtable entry of the method. param: In states that the argument will be passed to the structure.
Gets or sets the y component of the vector. The DispId attribute states the vtable entry of the method. param: In states that the argument will be passed to the structure.
Gets or sets the z component of the vector. The DispId attribute states the vtable entry of the method. param: In states that the argument will be passed to the structure.
Gets or sets the euclidean length of the vector. The DispId attribute states the vtable entry of the method. param: In states that the argument will be passed to the structure.
Enumeration of possible functions in order to save numeric values to the config file (and not delegates..)
Represents a configuration profile on a per-application basis. In order to load another profile just use the Setter of PreferencesName. If a profile of this name exists it will be loaded, if not a new default profile of this name will be created. This class is an extension of the orginal API, there is no such class exposed to COM. Thatswhy the Attribute ComVisible(false). So this is our implementation of the LoadPreferencesName() call of Device. The documentation says nothing about that so we can only guess the real functionality. This is our "educated" guess so ;)
Contains the exact path (with file name) to the XML config file.
Gets or Sets the filter function which shall be applied to the rotational input data.
Gets or Sets the list index of the current profile.
Gets or Sets the Translation Filter Function of the current profile. Possible values: sin, cos, square, cube, none.
Gets or Sets the Name of the current profile. When a name is set which is not in the list holding all known profiles, it will be created.
Gets the count of stored profiles.
Gets or Sets the scaling factor the Translation X value will be multiplied with.
Gets or Sets the scaling factor the Translation Y value will be multiplied with.
Gets or Sets the scaling factor the Translation Z value will be multiplied with.
Gets or Sets the scaling factor the Rotation X value will be multiplied with.
Gets or Sets the scaling factor the Rotation Y value will be multiplied with.
Gets or Sets the scaling factor the Rotation Z value will be multiplied with.
Gets or Sets the Rotation threshold value.
Gets or Sets the Translation threshold value.
Creates the path variable to the XML config file. Usually this is "C:\Documents and Settings\%username%\Application Data\AerionInput\config.xml". If directories do not exist, they will be created.
Loads the XML config file stored in "path" and parses the config data to its local variables. If anything goes wrong, all fields will be initialized with defaults. So if file is malformed, a new valid config file will be created.
Writes all preferences into XML config file stored in "path". Must be called explicitly in order to save values for the next session. Overwrites any existing config file with the values in this object.
Calls ConstructPath() to have a valid path string
Delegate declaration for DeviceChange event handler. Only states the return type of the event which is void for COM events and the signature of the event. This is implicitly COM visible and needed for COM to determine the signature of the event.
reserved: Not yet defined functionality.
COM Events publisher interface forced to use the same GUID as the original driver interface does. Must be IDispatch Interface for late binding, not standard dual.
The DeviceChange event is fired whenever a device is plugged in or pulled off. The reserved argument has no use for now.
reserved:
COM interface exposing the methods of TDxInfo. Forced to use the same GUID as the original driver interface does. Provides both interface implementations (Dual), IDispatch and IUnknown for early and late binding.
Returns the revision number of the driver. As usual in a COM environment the stings are of type BSTR, so marshal strings that way. The DispId attribute states the vtable entry of the method.
COM interface exposing the methods of AngleAxis. Forced to use the same GUID as the original driver interface does. Provides both interface implementations (Dual), IDispatch and IUnknown for early and late binding.
Gets or sets the x component of the vector. The DispId attribute states the vtable entry of the method. param: In states that the argument will be passed to the structure.
Gets or sets the y component of the vector. The DispId attribute states the vtable entry of the method. param: In states that the argument will be passed to the structure.
Gets or sets the z component of the vector. The DispId attribute states the vtable entry of the method. param: In states that the argument will be passed to the structure.
Gets or sets the angle of the vector (arbitrary units but euclidean norm). The DispId attribute states the vtable entry of the method. param: In states that the argument will be passed to the structure.
Filter function delegate. If you want to define a new filter function, use this signature for it (input value x and maximum value max). Then process the input value through your function (e.g. f(x)=x^4) and return this value. Possible extensions can be an accumulation of function values and returning a median of the last 5 values for example.
p_x:
p_max:
Return Value:
Represents the motion sensor of the device. Encapsulates movements and twists of the cap or ball of the device. Holds data in the AngleAxis (for Rotation) and Vector3D (for Translation) members which are accessible trough COM. Processes (accelerate and multiply with constant) raw Input data. Fires SensorInput event whenever new Input is detected. Implements the ISensor interface which exposes its methods to COM. Because of that the ClassInterfaceType must be "None", otherwise the CLR provides another class interface (and does not use IVector3D). The class is forced to use the same GUID as the original CoClass does in order to be accessible by binary-only clients.
Maximum value for translation data used for scaling with filter function. THIS MUST BE ADJUSTED IF ANY DEVICE SENDS HIGHER VALUES!! At the time this value is far from optimal for 3DConnexion Devices but seems to work properly. These devices offer 11 bit precison, however setting MaxValue to 2048 causes the sensor not to move. Will digg in that later.
Maximum value for translation data used for scaling with filter function. THIS MUST BE ADJUSTED IF ANY DEVICE SENDS HIGHER VALUES!! At the time this value is far from optimal for 3DConnexion Devices but seems to work properly. These devices offer 11 bit precison, however setting MaxValue to 2048 causes the sensor not to move. Will digg in that later.
Usage page for Translation Reports
Usage page for Rotation Reports
IHidDevice object of HidLibrary which raises events when Hid Reports are recieved.
IDisposeable implementation help variable.
HidDataReceived event handler member variable storing the function pointer (delegate) to the method m_HidDevice will call back if a HidDataReceived is detected.
Binary semaphore for locking event access.
Gets or Sets the X translation scaling factor which is mulitiplied with the raw input data from the Sensor before passed to the client. This property is an extension of the orginal API, which is not exposed to COM. Thatswhy the Attribute ComVisible(false).
Gets or Sets the Y translation scaling factor which is mulitiplied with the raw input data from the Sensor before passed to the client. This property is an extension of the orginal API, which is not exposed to COM. Thatswhy the Attribute ComVisible(false).
Gets or Sets the Z translation scaling factor which is mulitiplied with the raw input data from the Sensor before passed to the client. This property is an extension of the orginal API, which is not exposed to COM. Thatswhy the Attribute ComVisible(false).
Gets or Sets the X rotation scaling factor which is mulitiplied with the raw input data from the Sensor before passed to the client. This property is an extension of the orginal API, which is not exposed to COM. Thatswhy the Attribute ComVisible(false).
Gets or Sets the Y rotation scaling factor which is mulitiplied with the raw input data from the Sensor before passed to the client. This property is an extension of the orginal API, which is not exposed to COM. Thatswhy the Attribute ComVisible(false).
Gets or Sets the Z rotation scaling factor which is mulitiplied with the raw input data from the Sensor before passed to the client. This property is an extension of the orginal API, which is not exposed to COM. Thatswhy the Attribute ComVisible(false).
Sets the Translation filter function which takes the raw input data from the Sensor and passes it to this function as argument. The result of this will be passed to the client. This property is an extension of the orginal API, which is not exposed to COM. Thatswhy the Attribute ComVisible(false).
Sets the Rotation filter function which takes the raw input data from the Sensor and passes it to this function as argument. The result of this will be passed to the client. This property is an extension of the orginal API, which is not exposed to COM. Thatswhy the Attribute ComVisible(false).
Gets or Sets the Translation Threshold. The Vector3D.Length attribute must be > TranslationThreshold to be passed to the client. This property is an extension of the orginal API, which is not exposed to COM. Thatswhy the Attribute ComVisible(false).
Gets or Sets the Rotation Threshold. The AngleAxis.Angle attribute must be > RotationThreshold to be passed to the client. This property is an extension of the orginal API, which is not exposed to COM. Thatswhy the Attribute ComVisible(false).
Gets the time frame the values of Translation and Rotation are scaled to.
Gets lengths of movement for all 3 axes.
Gets angles for all 3 axes.
Gets the parent Device object associated with the Sensor.
Converts numeric function types to function pointers for filter processing. Used to convert the enum type coming from the XML config to delegate.
Handles HidDataReceived events and processes incoming raw data from the Device. Fills m_Translation and m_Rotation objects with the filtered and scaled raw data. At the end fire SensorInput to notify clients.
sender:
p_HidDataReceivedEventArgs:
Null filter. Output = Input.
p_x: input value
p_max: maximum value the function is scaled to
Return Value:
Sinus filter. Output = sin(Input) [Shifted to origin]
p_x: input value
p_max: maximum value the function is scaled to
Return Value:
Cube filter. Output = Input*Input*Input [Shifted to origin]
p_x: input value
p_max: maximum value the function is scaled to
Return Value:
Sqaure filter. Output = Input*Input [Shifted to origin]
p_x: input value
p_max: maximum value the function is scaled to
Return Value:
Binds the HidDataReceivedEvent to HidDataReceived() and sets parent Device object. This method is an extension of the orginal API, which is not exposed to COM. Thatswhy the Attribute ComVisible(false).
Unbinds the HidDataReceivedEvent from HidDataReceived(). This method is an extension of the orginal API, which is not exposed to COM. Thatswhy the Attribute ComVisible(false).
Constructor which inits the TranslationFunction and RotationFunction attributes.
Destructor supporting IDisposeable implementation.
Suppress garbage collection of this object, take care of it yourself.
Clean up managed and unmanged ressources by hand.
Disposing:
COM interface exposing the methods of Sensor. Forced to use the same GUID as the original driver interface does. Provides both interface implementations (Dual), IDispatch and IUnknown for early and late binding.
Holds lengths of movement for all 3 axes. For COM interop this must be marshaled explicitly to Interface. The DispId attribute states the vtable entry of the method.
Holds angles for all 3 axes. For COM interop this must be marshaled explicitly to Interface. The DispId attribute states the vtable entry of the method.
Returns an IDispatch pointer to the parent Device object associated with the Sensor. For COM interop compatibility, the object must be marshaled to IDispatch. (See Blender Plugin) The DispId attribute states the vtable entry of the method.
Holds the time frame the values of Translation and Rotation are scaled to. The DispId attribute states the vtable entry of the method.
Main device class representing the entire NDOF device encapsulating Keyboard and Sensor. Indirectly implements the _ISimpleDeviceEvents_Event interface via the ComSourceInterfaces attribute in order to properly expose events to COM. Implements the IDisposeable interface which helps to properly dispose this object and its events. Implements the ISimpleDevice interface which exposes its methods to COM. Because of that the ClassInterfaceType must be "None", otherwise the CLR provides another class interface (and does not use IAngleAxis). The class is forced to use the same GUID as the original CoClass does in order to be accessible by binary-only clients.
Object which encapsulates LoadPreferencesName() functionality.
Used to communicate with the sigleton instance of HidControl for searching devices and registering DeviceChange events.
Object of HidLibrary used to raise events when Hid Reports are recieved.
DeviceChange event handler member variable storing the function pointer (delegate) to the method m_HidControl will call back if a DeviceChange is detected.
Binary semaphore for locking event access.
Returns the associated Sensor object.
Returns the associated Keyboard object.
Returns type of the connected device.
Returns true if a device is connected with the driver.
Predicate which queries p_IHidDeviceInfo.VendorID and p_IHidDeviceInfo.ProductID and returns true if an Aerion device is connected.
p_IHidDeviceInfo:
Return Value: boolean
Predicate which queries p_IHidDeviceInfo.VendorID and p_IHidDeviceInfo.ProductID and returns true if a SpaceExplorer device is connected.
p_IHidDeviceInfo:
Return Value: boolean
Predicate which queries p_IHidDeviceInfo.VendorID and p_IHidDeviceInfo.ProductID and returns true if a SpaceNavigator device is connected.
p_IHidDeviceInfo:
Return Value: boolean
Predicate which queries p_IHidDeviceInfo.VendorID and p_IHidDeviceInfo.ProductID and returns true if a SpaceTraveler device is connected.
p_IHidDeviceInfo:
Return Value: boolean
Predicate which queries p_IHidDeviceInfo.VendorID and p_IHidDeviceInfo.ProductID and returns true if a SpacePilot device is connected.
p_IHidDeviceInfo:
Return Value: boolean
Connects the AerionInput main instance with a plugged NDOF-device by passing a predicate. Instructs m_IHidDevice to handle incoming data and sets the global Type of the device.
Return Value: true if device is connected
Connects the AerionInput main instance with a plugged NDOF-device by passing a predicate. Instructs m_IHidDevice to handle incoming data and sets the global Type of the device.
Return Value: true if device is connected
Connects the AerionInput main instance with a plugged NDOF-device by passing a predicate. Instructs m_IHidDevice to handle incoming data and sets the global Type of the device.
Return Value: true if device is connected
Connects the AerionInput main instance with a plugged NDOF-device by passing a predicate. Instructs m_IHidDevice to handle incoming data and sets the global Type of the device.
Return Value: true if device is connected
Connects the AerionInput main instance with a plugged NDOF-device by passing a predicate. Instructs m_IHidDevice to handle incoming data and sets the global Type of the device.
Return Value: true if device is connected
Handles the HidControlDeviceChange event. First disconnects the current device from the driver, then calls Connect() which looks for new devices. Fires DeviceChange event in order to notify clients.
sender:
e:
Loads the application profile in argument preferencesName and updates all relevant fields. For now save the config file, as the Blender plugin does not disconnect (and thereby save the config file) correctly.
Look for connected supported devices and register for HidControl.DeviceChange event to be notified if devices are connected. If a supported device is found init the Sensor and the Keyboard. Then load initial "default" profile.
Disconnect a connected device. Stop the HidDevice processing input data, and deregister from HidDevice.DeviceChange event handler. Save the config file.
Default constructor needed by COM to create objects.
Destructor supporting IDisposeable implementation.
Suppress garbage collection of this object, take care of it yourself.
Clean up managed and unmanged ressources by hand.
Disposing:
Delegate declaration for SensorInput event handler. Only states the return type of the event which is void for COM events and the signature of the event. This is implicitly COM visible and needed for COM to determine the signature of the event.
COM Events publisher interface forced to use the same GUID as the original driver interface does. Must be IDispatch Interface for late binding, not standard dual.
The SensorInput event is fired whenever the Sensor recieves valid data from the device.
Delegate declaration for KeyDown event handler. Only states the return type of the event which is void for COM events and the signature of the event. This is implicitly COM visible and needed for COM to determine the signature of the event.
keyCode: KeyCode of the button which is pressed down.
Delegate declaration for KeyUp event handler. Only states the return type of the event which is void for COM events and the signature of the event. This is implicitly COM visible and needed for COM to determine the signature of the event.
keyCode: KeyCode of the button which pulled up.
COM Events publisher interface forced to use the same GUID as the original driver interface does. Must be IDispatch Interface for late binding, not standard dual.
The KeyDown event is fired whenever a key is pressed. The keyCode argument contains the number of the key that fired.
keyCode:
The KeyUp event is fired whenever a key is released. The keyCode argument contains the number of the key that fired.
keyCode:
Provides information about the used Revision of the driver. Implements the ITDxInfo interface which exposes its methods to COM. Because of that the ClassInterfaceType must be "None", otherwise the CLR provides another class interface (and does not use ITDxInfo). The class is forced to use the same GUID as the original CoClass does in order to be accessible by binary-only clients.
Returns the revision number of the driver. It is not implemented as a classic getter method in the original driver but as a simple constant return function.
Return Value: constant string c_RevisionNumber
TDxInfo constructor
Represents the keys of the device. Holds boolean array with the state of all keys. Fires KeyUp and KeyDown events whenever Keys are pressed and released. Implements the IKeyboard interface which exposes its methods to COM. Because of that the ClassInterfaceType must be "None", otherwise the CLR provides another class interface (and does not use IVector3D). The class is forced to use the same GUID as the original CoClass does in order to be accessible by binary-only clients.
Usage page for Button Reports
BitArray containing one bit (0 = up, 1 = down) for each key of the device.
IHidDevice object of HidLibrary which raises events when Hid Reports are recieved.
IDisposeable implementation help variable.
HidDataReceived event handler member variable storing the function pointer (delegate) to the method m_HidDevice will call back if a HidDataReceived is detected.
Binary semaphore for locking event access.
Returns number of keys the device offers.
Returns the parent Device object associated with the Sensor.
Returns number of programmable keys the device offers.
Handles HidDataReceived events and processes incoming raw data from the Device. Fills BitArray m_KeyDownList with key press data. At the end fire KeyDown or KeyUp to notify clients.
sender:
p_HidDataReceivedEventArgs:
Returns the Name of the supplied key, if any.
Returns the Label of the supplied key, if any.
Returns true if the supplied key is up at the time.
Returns true if the supplied key is pressed down at the time.
Binds the HidDataReceivedEvent to HidDataReceived() and sets parent Device object. TODO: Send feature report to device to query number of keys. This method is an extension of the orginal API, which is not exposed to COM. Thatswhy the Attribute ComVisible(false).
Unbinds the HidDataReceivedEvent from HidDataReceived(). This method is an extension of the orginal API, which is not exposed to COM. Thatswhy the Attribute ComVisible(false).
Default constructor needed by COM to create objects.
Destructor supporting IDisposeable implementation.
Suppress garbage collection of this object, take care of it yourself.
Clean up managed and unmanged ressources by hand.
Disposing:
Provides rotational data in three dimensions and an angle in arbitrary units (euclidean norm). Implements the IAngleAxis interface which exposes its methods to COM. Because of that the ClassInterfaceType must be "None", otherwise the CLR provides another class interface (and does not use IAngleAxis). The class is forced to use the same GUID as the original CoClass does in order to be accessible by binary-only clients.
Represents the X component of the rotation
Represents the Y component of the rotation
Represents the Z component of the rotation
Represents the angle of the rotation (euclidean length of the three components). If set to 0.0 all three components are set to 0.0, too.
AngleAxis constructor