Class PvDeviceAdapter
IPvDeviceAdapter default implementation for the eBUS SDK.
Implements
Inherited Members
Namespace: eBUSDotNetReceive
Assembly: eBUSDotNetReceive.dll
Syntax
public class PvDeviceAdapter : IPvDeviceAdapterSwigInterface, PvDeviceEventSinkSwigInterface, PvGenEventSinkSwigInterface, IDisposable
Constructors
View SourcePvDeviceAdapter(PvDevice)
Constructor.
Declaration
public PvDeviceAdapter(PvDevice aDevice)
Parameters
| Type | Name | Description |
|---|---|---|
| PvDevice | aDevice | A device. |
Fields
View SourceswigCMemOwn
Determines who is responsible for deleting the underlying C++ object.
Declaration
protected bool swigCMemOwn
Field Value
| Type | Description |
|---|---|
| bool |
Methods
View SourceDispose()
Dispose.
Declaration
public void Dispose()
Dispose(bool)
Dispose
Declaration
protected virtual void Dispose(bool disposing)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | disposing |
~PvDeviceAdapter()
Destructor.
Declaration
protected ~PvDeviceAdapter()
GetGenBooleanValue(string, out bool)
See IPvDeviceAdapter for description.
Declaration
public virtual PvResult GetGenBooleanValue(string aParameterName, out bool aValue)
Parameters
| Type | Name | Description |
|---|---|---|
| string | aParameterName | Name of the parameter. |
| bool | aValue | Value of the parameter. |
Returns
| Type | Description |
|---|---|
| PvResult | OK on success. |
GetGenEnumEntriesAvailable(string, SWIGTYPE_p_PvStringList)
See IPvDeviceAdapter for description.
Declaration
public virtual PvResult GetGenEnumEntriesAvailable(string aParameterName, SWIGTYPE_p_PvStringList aList)
Parameters
| Type | Name | Description |
|---|---|---|
| string | aParameterName | Name of the parameter. |
| SWIGTYPE_p_PvStringList | aList | A list containing the string representation of all available enum entries. |
Returns
| Type | Description |
|---|---|
| PvResult | OK on success. |
GetGenEnumValue(string, out string)
See IPvDeviceAdapter for description.
Declaration
public virtual PvResult GetGenEnumValue(string aParameterName, out string aEnumEntry)
Parameters
| Type | Name | Description |
|---|---|---|
| string | aParameterName | Name of the parameter. |
| string | aEnumEntry | Value of the parameter. |
Returns
| Type | Description |
|---|---|
| PvResult | OK on success. |
GetGenIntegerValue(string, out long)
See IPvDeviceAdapter for description.
Declaration
public virtual PvResult GetGenIntegerValue(string aParameterName, out long aValue)
Parameters
| Type | Name | Description |
|---|---|---|
| string | aParameterName | Name of the parameter. |
| long | aValue | Value of the parameter. |
Returns
| Type | Description |
|---|---|
| PvResult | OK on success. |
GetGenRegisterData(string, byte[], long)
See IPvDeviceAdapter for description.
Declaration
public PvResult GetGenRegisterData(string aParameterName, byte[] aDataBuffer, long aByteCount)
Parameters
| Type | Name | Description |
|---|---|---|
| string | aParameterName | Name of the parameter. |
| byte[] | aDataBuffer | Buffer where to copy the data. |
| long | aByteCount | How many bytes to copy to aDataBuffer. |
Returns
| Type | Description |
|---|---|
| PvResult | OK on success. |
GetGenRegisterLength(string, out long)
See IPvDeviceAdapter for description.
Declaration
public virtual PvResult GetGenRegisterLength(string aParameterName, out long aLength)
Parameters
| Type | Name | Description |
|---|---|---|
| string | aParameterName | Name of the parameter. |
| long | aLength | Length (in bytes) of the register. |
Returns
| Type | Description |
|---|---|
| PvResult | OK on success. |
GetGenStringValue(string, out string)
Returns the string value of string parameter identified by its name.
Declaration
public virtual PvResult GetGenStringValue(string aParameterName, out string aValue)
Parameters
| Type | Name | Description |
|---|---|---|
| string | aParameterName | Name of the parameter. |
| string | aValue | Value of the parameter. |
Returns
| Type | Description |
|---|---|
| PvResult | OK on success. |
GetUniqueID(out string)
Returns a unique string identifier for the device.
Declaration
public virtual PvResult GetUniqueID(out string aID)
Parameters
| Type | Name | Description |
|---|---|---|
| string | aID | Unique string identifier for the device. |
Returns
| Type | Description |
|---|---|
| PvResult | Includes:
|
IsConnected()
See IPvDeviceAdapter for description.
Declaration
public virtual bool IsConnected()
Returns
| Type | Description |
|---|---|
| bool | True if the device is connected, false if not. |
IsGenBooleanInNodeMap(string)
See IPvDeviceAdapter for description.
Declaration
public virtual bool IsGenBooleanInNodeMap(string aParameterName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | aParameterName | Name of the parameter to test for. |
Returns
| Type | Description |
|---|---|
| bool | True if the parameter is present, false if not. |
IsGenEnumEntryAvailable(string, string)
See IPvDeviceAdapter for description.
Declaration
public virtual bool IsGenEnumEntryAvailable(string aParameterName, string aEnumEntry)
Parameters
| Type | Name | Description |
|---|---|---|
| string | aParameterName | Name of the parameter to test for. |
| string | aEnumEntry | Name of the enum entry to test for. |
Returns
| Type | Description |
|---|---|
| bool | True if the parameter is present and contains the specific enum entry, false if either condition fails. |
IsGenEnumInNodeMap(string)
See IPvDeviceAdapter for description.
Declaration
public virtual bool IsGenEnumInNodeMap(string aParameterName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | aParameterName | Name of the parameter to test for. |
Returns
| Type | Description |
|---|---|
| bool | True if the parameter is present, false if not. |
IsGenIntegerInNodeMap(string)
See IPvDeviceAdapter for description.
Declaration
public virtual bool IsGenIntegerInNodeMap(string aParameterName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | aParameterName | Name of the parameter to test for. |
Returns
| Type | Description |
|---|---|
| bool | True if the parameter is present, false if not. |
IsGenReadable(string)
See IPvDeviceAdapter for description.
Declaration
public virtual bool IsGenReadable(string aParameterName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | aParameterName | Name of the parameter to test for. |
Returns
| Type | Description |
|---|---|
| bool | True if the parameter is present and readable, false if either condition fails. |
IsGenRegisterInNodeMap(string)
See IPvDeviceAdapter for description.
Declaration
public virtual bool IsGenRegisterInNodeMap(string aParameterName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | aParameterName | Name of the parameter to test for. |
Returns
| Type | Description |
|---|---|
| bool | True if the parameter is present, false if not. |
IsGenWritable(string)
See IPvDeviceAdapter for description.
Declaration
public virtual bool IsGenWritable(string aParameterName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | aParameterName | Name of the parameter to test for. |
Returns
| Type | Description |
|---|---|
| bool | True if the parameter is present and writable, false if either condition fails. |
IsGigEVision()
See IPvDeviceAdapter for description.
Declaration
public virtual bool IsGigEVision()
Returns
| Type | Description |
|---|---|
| bool | True if using the GigE Vision protocol, false if not. |
IsPleoraPowered()
See IPvDeviceAdapter for description.
Declaration
public virtual bool IsPleoraPowered()
Returns
| Type | Description |
|---|---|
| bool | True if the device runs on a Pleora design, false if not. |
IsUSB3Vision()
See IPvDeviceAdapter for description.
Declaration
public virtual bool IsUSB3Vision()
Returns
| Type | Description |
|---|---|
| bool | True if using the USB3 Vision protocol, false if not. |
OnCmdLinkRead(byte[], long, long)
Callback invoked after a port read.
Declaration
public virtual void OnCmdLinkRead(byte[] aBuffer, long aAddress, long aLength)
Parameters
| Type | Name | Description |
|---|---|---|
| byte[] | aBuffer | Pointer to the data read. |
| long | aAddress | Address of the data read on the device. |
| long | aLength | Length of the data, in bytes. |
OnCmdLinkWrite(byte[], long, long)
Callback invoked after a port write.
Declaration
public virtual void OnCmdLinkWrite(byte[] aBuffer, long aAddress, long aLength)
Parameters
| Type | Name | Description |
|---|---|---|
| byte[] | aBuffer | Pointer to the data that was written. |
| long | aAddress | Address of the data written to the device. |
| long | aLength | Length of the data, in bytes. |
OnEvent(PvDevice, ushort, ushort, ulong, ulong, byte[], uint)
Messaging channel raw event notification. Do not implement in PvDeviceAdapter; use PvDeviceEventSink instead.
Declaration
public virtual void OnEvent(PvDevice aDevice, ushort aEventID, ushort aChannel, ulong aBlockID, ulong aTimestamp, byte[] aData, uint aDataLength)
Parameters
| Type | Name | Description |
|---|---|---|
| PvDevice | aDevice | Pointer to the PvDevice object that triggered the callback. |
| ushort | aEventID | Event ID. Some standard event IDs are defined but usually device dependent. |
| ushort | aChannel | Streaming channel associated with the event, if any. |
| ulong | aBlockID | Streaming block ID associated with the event, if any. |
| ulong | aTimestamp | Timestamp of the event on the time domain of the device. |
| byte[] | aData | Pointer to Event Data, if applicable. |
| uint | aDataLength | Data length, in bytes. |
OnEventGenICam(PvDevice, ushort, ushort, ulong, ulong, PvGenParameterList)
Messaging channel GenICam event notification.
Declaration
public virtual void OnEventGenICam(PvDevice aDevice, ushort aEventID, ushort aChannel, ulong aBlockID, ulong aTimestamp, PvGenParameterList aData)
Parameters
| Type | Name | Description |
|---|---|---|
| PvDevice | aDevice | Pointer to the PvDevice object that triggered the callback. |
| ushort | aEventID | Event ID. Some standard event IDs are defined but usually device dependent. |
| ushort | aChannel | Streaming channel associated with the event, if any. 0xFFFF is used if the event is not associated to a streaming channel. |
| ulong | aBlockID | Streaming block ID associated with the event, if any. Can be used to pair one or more than one event with a block received from a device. 0 is used if the event is not associated to a block. |
| ulong | aTimestamp | Timestamp of the event on the time domain of the device. Time unit is defined by the device. 0 if timestamps are not supported by the device that generated the event. |
| PvGenParameterList | aData | List containing all parameters invalidated by this event. Can be NULL if the event carried no data or the data was does not invalidate any GenApi parameters of the device. |
OnLinkDisconnected(PvDevice)
Notification that the #PvDevice unexpectedly lost contact with the device.
Declaration
public virtual void OnLinkDisconnected(PvDevice aDevice)
Parameters
| Type | Name | Description |
|---|---|---|
| PvDevice | aDevice | Pointer to the device object that invoked this callback. |
OnLinkReconnected(PvDevice)
Deprecated, no longer used.
Declaration
public virtual void OnLinkReconnected(PvDevice aDevice)
Parameters
| Type | Name | Description |
|---|---|---|
| PvDevice | aDevice | Pointer to the device object that invoked this callback. |
OnParameterUpdate(PvGenParameter)
Callback invoked when a GenICam parameter is updated. Do not implement in PvDeviceAdapter; use PvGenEventSink instead.
Declaration
public virtual void OnParameterUpdate(PvGenParameter aParameter)
Parameters
| Type | Name | Description |
|---|---|---|
| PvGenParameter | aParameter | The invalidated parameter. |
ReadMemory(byte[], long, long)
See IPvDeviceAdapter for description.
Declaration
public PvResult ReadMemory(byte[] aBuffer, long aAddress, long aLength)
Parameters
| Type | Name | Description |
|---|---|---|
| byte[] | aBuffer | Pointer of the buffer where the data will be written. |
| long | aAddress | Address where to read the daa. |
| long | aLength | Length of the data to read, in bytes. |
Returns
| Type | Description |
|---|---|
| PvResult | OK on success. |
ReadRegister(long, out uint)
See IPvDeviceAdapter for description.
Declaration
public virtual PvResult ReadRegister(long aAddress, out uint aValue)
Parameters
| Type | Name | Description |
|---|---|---|
| long | aAddress | Address of the register. |
| uint | aValue | Value read from the register. |
Returns
| Type | Description |
|---|---|
| PvResult | OK on success. |
RegisterEventSink(SWIGTYPE_p_IPvDeviceEventSink)
See IPvDeviceAdapter for description.
Declaration
public PvResult RegisterEventSink(SWIGTYPE_p_IPvDeviceEventSink aEventSink)
Parameters
| Type | Name | Description |
|---|---|---|
| SWIGTYPE_p_IPvDeviceEventSink | aEventSink | Pointer to an object implementing the IPvDeviceEventSink interface. |
Returns
| Type | Description |
|---|---|
| PvResult | OK on success. |
RegisterGenInvalidator(string)
See IPvDeviceAdapter for description.
Declaration
public virtual PvResult RegisterGenInvalidator(string aParameterName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | aParameterName | Name of the parameter. |
Returns
| Type | Description |
|---|---|
| PvResult | OK on success. |
SetGenBooleanValue(string, bool)
See IPvDeviceAdapter for description.
Declaration
public virtual PvResult SetGenBooleanValue(string aParameterName, bool aValue)
Parameters
| Type | Name | Description |
|---|---|---|
| string | aParameterName | Name of the parameter. |
| bool | aValue | New value for the enumeration. |
Returns
| Type | Description |
|---|---|
| PvResult | OK on success. |
SetGenEnumValue(string, string)
See IPvDeviceAdapter for description.
Declaration
public virtual PvResult SetGenEnumValue(string aParameterName, string aEnumEntry)
Parameters
| Type | Name | Description |
|---|---|---|
| string | aParameterName | Name of the parameter. |
| string | aEnumEntry | New value for the enumeration. |
Returns
| Type | Description |
|---|---|
| PvResult | OK on success. |
SetGenRegisterData(string, byte[], long)
See IPvDeviceAdapter for description.
Declaration
public PvResult SetGenRegisterData(string aParameterName, byte[] aDataBuffer, long aByteCount)
Parameters
| Type | Name | Description |
|---|---|---|
| string | aParameterName | Name of the parameter. |
| byte[] | aDataBuffer | Buffer to copy the data from. |
| long | aByteCount | How many bytes to copy from aDataBuffer to the register. |
Returns
| Type | Description |
|---|---|
| PvResult | OK on success. |
UnregisterEventSink(SWIGTYPE_p_IPvDeviceEventSink)
See IPvDeviceAdapter for description.
Declaration
public PvResult UnregisterEventSink(SWIGTYPE_p_IPvDeviceEventSink aEventSink)
Parameters
| Type | Name | Description |
|---|---|---|
| SWIGTYPE_p_IPvDeviceEventSink | aEventSink | Pointer to an object implementing the IPvDeviceEventSink interface. |
Returns
| Type | Description |
|---|---|
| PvResult | OK on success. |
UnregisterGenInvalidator(string)
See IPvDeviceAdapter for description.
Declaration
public virtual PvResult UnregisterGenInvalidator(string aParameterName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | aParameterName | Name of the parameter. |
Returns
| Type | Description |
|---|---|
| PvResult | OK on success. |
WaitForMessagingChannelIdle(uint)
See IPvDeviceAdapter for description.
Declaration
public virtual PvResult WaitForMessagingChannelIdle(uint aTimeout)
Parameters
| Type | Name | Description |
|---|---|---|
| uint | aTimeout | A timeout. |
Returns
| Type | Description |
|---|---|
| PvResult | OK if the messaging channel is idle. TIMEOUT if the timeout elapsed before it becomes idle. |
WriteMemory(byte[], long, long)
See IPvDeviceAdapter for description.
Declaration
public PvResult WriteMemory(byte[] aBuffer, long aAddress, long aLength)
Parameters
| Type | Name | Description |
|---|---|---|
| byte[] | aBuffer | Pointer to the data to write. |
| long | aAddress | Address where to write the data. |
| long | aLength | Length of the data to write, in bytes. |
Returns
| Type | Description |
|---|---|
| PvResult | OK on success. |
WriteRegister(long, uint)
See IPvDeviceAdapter for description.
Declaration
public virtual PvResult WriteRegister(long aAddress, uint aValue)
Parameters
| Type | Name | Description |
|---|---|---|
| long | aAddress | Address of the register. |
| uint | aValue | Value to write to the register. |
Returns
| Type | Description |
|---|---|
| PvResult | OK on success. |