Pleora Technologies Inc. eBUS SDK v6.2.8.5877 API



PvDeviceAdapter.h
1 // *****************************************************************************
2 //
3 // Copyright (c) 2013, Pleora Technologies Inc., All rights reserved.
4 //
5 // *****************************************************************************
6 
7 #ifndef __PVDEVICEADAPTER_H__
8 #define __PVDEVICEADAPTER_H__
9 
10 #include <IPvDeviceAdapter.h>
11 #include <PvDevice.h>
12 
13 
14 class IPvDeviceEventSinkList;
15 
16 namespace PtUtilsLib
17 {
18  class Mutex;
19 }
20 
21 
23 {
24 public:
25 
26  PvDeviceAdapter( PvDevice *aDevice );
27  virtual ~PvDeviceAdapter();
28 
29  bool IsGenIntegerInNodeMap( const PvString &aParameterName );
30  bool IsGenEnumInNodeMap( const PvString &aParameterName );
31  bool IsGenBooleanInNodeMap( const PvString &aParameterName );
32  bool IsGenRegisterInNodeMap( const PvString &aParameterName );
33  bool IsGenReadable( const PvString &aParameterName );
34  bool IsGenWritable( const PvString &aParameterName );
35  bool IsGenEnumEntryAvailable( const PvString &aParameterName, const PvString &aEnumEntry );
36 
37  PvResult GetGenIntegerValue( const PvString &aParameterName, int64_t &aValue );
38  PvResult GetGenEnumEntriesAvailable( const PvString &aParameterName, PvStringList &aList );
39  PvResult GetGenEnumValue( const PvString &aParameterName, PvString &aEnumEntry );
40  PvResult SetGenEnumValue( const PvString &aParameterName, const PvString &aEnumEntry );
41  PvResult GetGenBooleanValue( const PvString &aParameterName, bool &aValue );
42  PvResult SetGenBooleanValue( const PvString &aParameterName, bool aValue );
43  PvResult GetGenStringValue( const PvString &aParameterName, PvString &aValue );
44  PvResult GetGenRegisterLength( const PvString &aParameterName, int64_t &aLength );
45  PvResult GetGenRegisterData( const PvString &aParameterName, uint8_t *aDataBuffer, int64_t aByteCount );
46  PvResult SetGenRegisterData( const PvString &aParameterName, const uint8_t *aDataBuffer, int64_t aByteCount );
47 
48  PvResult RegisterGenInvalidator( const PvString &aParameterName );
49  PvResult UnregisterGenInvalidator( const PvString &aParameterName );
50 
51  PvResult WriteRegister( int64_t aAddress, uint32_t aValue );
52  PvResult ReadRegister( int64_t aAddress, uint32_t &aValue );
53  PvResult WriteMemory( const uint8_t *aBuffer, int64_t aAddress, int64_t aLength );
54  PvResult ReadMemory( uint8_t *aBuffer, int64_t aAddress, int64_t aLength );
55 
56  PvResult WaitForMessagingChannelIdle( uint32_t aTimeout );
57 
58  bool IsConnected();
59  bool IsPleoraPowered();
60  bool IsGigEVision();
61  bool IsUSB3Vision();
62 
65 
66  PvResult GetUniqueID( PvString &aID );
67 
68 protected:
69 
70  // PvDeviceEventSink
71  void OnEvent( PvDevice *aDevice,
72  uint16_t aEventID, uint16_t aChannel, uint64_t aBlockID, uint64_t aTimestamp,
73  const void *aData, uint32_t aDataLength );
74 
75  // PvGenEventSink
76  void OnParameterUpdate( PvGenParameter *aParameter );
77 
78 private:
79 
80  PvDevice *mDevice;
81 
82  IPvDeviceEventSinkList *mEventSinkList;
83  PtUtilsLib::Mutex *mEventSinkListMutex;
84 
85 };
86 
87 #endif
PvResult
Result information.
Definition: PvResult.h:13
IPvDeviceAdapter::IsGenRegisterInNodeMap
virtual bool IsGenRegisterInNodeMap(const PvString &aParameterName)=0
Returns true if the device node map contains a raw register of the specified name.
IPvDeviceEventSink
Interface used by a class implementing IPvDeviceAdapter to forward notifications to PvDeviceSerialPor...
Definition: IPvDeviceEventSink.h:14
IPvDeviceAdapter::IsPleoraPowered
virtual bool IsPleoraPowered()=0
Returns true if the device runs on a Pleora design.
IPvDeviceAdapter::WaitForMessagingChannelIdle
virtual PvResult WaitForMessagingChannelIdle(uint32_t aTimeout)=0
Waits for the messaging channel queue to be empty.
IPvDeviceAdapter::ReadRegister
virtual PvResult ReadRegister(int64_t aAddress, uint32_t &aValue)=0
Reads a 32 bit value from a GigE Vision register.
IPvDeviceAdapter::UnregisterEventSink
virtual PvResult UnregisterEventSink(IPvDeviceEventSink *aEventSink)=0
Unregisters an event sink registered with RegisterEventSink.
IPvDeviceAdapter::GetGenIntegerValue
virtual PvResult GetGenIntegerValue(const PvString &aParameterName, int64_t &aValue)=0
Returns the value of an integer identified by its name.
IPvDeviceAdapter::GetGenEnumEntriesAvailable
virtual PvResult GetGenEnumEntriesAvailable(const PvString &aParameterName, PvStringList &aList)=0
Returns a list of all available enum entries for an enumeration.
IPvDeviceAdapter::SetGenEnumValue
virtual PvResult SetGenEnumValue(const PvString &aParameterName, const PvString &aEnumEntry)=0
Sets the value of an enumeration identified by its name.
IPvDeviceAdapter
Interface used by PvDeviceSerialPort to interact with a device controller.
Definition: IPvDeviceAdapter.h:31
IPvDeviceAdapter::IsGenEnumInNodeMap
virtual bool IsGenEnumInNodeMap(const PvString &aParameterName)=0
Returns true if the device node map contains an enumeration of the specified name.
IPvDeviceAdapter::UnregisterGenInvalidator
virtual PvResult UnregisterGenInvalidator(const PvString &aParameterName)=0
Unregisters (and forward to the device serial object) invalidation events for a parameter identified ...
IPvDeviceAdapter::IsGenEnumEntryAvailable
virtual bool IsGenEnumEntryAvailable(const PvString &aParameterName, const PvString &aEnumEntry)=0
Returns true if an enumeration is present in the node map and has a specific enum entry.
IPvDeviceAdapter::SetGenBooleanValue
virtual PvResult SetGenBooleanValue(const PvString &aParameterName, bool aValue)=0
Sets the value of a Boolean identified by its name.
IPvDeviceAdapter::GetGenEnumValue
virtual PvResult GetGenEnumValue(const PvString &aParameterName, PvString &aEnumEntry)=0
Returns the string value of an enumeration identified by its name.
IPvDeviceAdapter::GetGenStringValue
virtual PvResult GetGenStringValue(const PvString &aParameterName, PvString &aValue)=0
Returns the string value of string parameter identified by its name.
IPvDeviceAdapter::IsGenReadable
virtual bool IsGenReadable(const PvString &aParameterName)=0
Returns true if a parameter is present and readable in the node map.
PvDeviceEventSink::OnEvent
virtual void OnEvent(PvDevice *aDevice, uint16_t aEventID, uint16_t aChannel, uint64_t aBlockID, uint64_t aTimestamp, const void *aData, uint32_t aDataLength)
Messaging channel raw event notification.
Definition: PvDeviceEventSink.cpp:137
PvString
String class.
Definition: PvString.h:21
IPvDeviceAdapter::SetGenRegisterData
virtual PvResult SetGenRegisterData(const PvString &aParameterName, const uint8_t *aDataBuffer, int64_t aByteCount)=0
Sets the data contained in a register identified by its name.
IPvDeviceAdapter::IsGigEVision
virtual bool IsGigEVision()=0
Returns true if the device uses the GigE Vision protocol.
IPvDeviceAdapter::WriteRegister
virtual PvResult WriteRegister(int64_t aAddress, uint32_t aValue)=0
Writes a 32 bit value to a GigE Vision register.
IPvDeviceAdapter::RegisterGenInvalidator
virtual PvResult RegisterGenInvalidator(const PvString &aParameterName)=0
Registers (and forward to the device serial object) invalidation events for a parameter identified by...
IPvDeviceAdapter::RegisterEventSink
virtual PvResult RegisterEventSink(IPvDeviceEventSink *aEventSink)=0
Registers an event sink that will want to receive the raw events and GenICam invalidator events.
PvGenEventSink::OnParameterUpdate
virtual void OnParameterUpdate(PvGenParameter *aParameter)=0
Callback that is invoked when a feature's value is updated.
PvGenEventSink
Observer interface for an observable PvGenParameter object.
Definition: PvGenParameter.h:146
IPvDeviceAdapter::WriteMemory
virtual PvResult WriteMemory(const uint8_t *aBuffer, int64_t aAddress, int64_t aLength)=0
Writes data to a the memory of a device.
PvStringList
Class used to hold a group of PvString objects.
Definition: PvStringList.h:19
IPvDeviceAdapter::GetGenRegisterData
virtual PvResult GetGenRegisterData(const PvString &aParameterName, uint8_t *aDataBuffer, int64_t aByteCount)=0
Gets the data contained in a register identified by its name.
PvDeviceAdapter
IPvDeviceAdapter default implementation for the eBUS SDK.
Definition: PvDeviceAdapter.h:22
IPvDeviceAdapter::IsGenIntegerInNodeMap
virtual bool IsGenIntegerInNodeMap(const PvString &aParameterName)=0
Returns true if the device node map contains an integer of the specified name.
IPvDeviceAdapter::ReadMemory
virtual PvResult ReadMemory(uint8_t *aBuffer, int64_t aAddress, int64_t aLength)=0
Reads data from the memory of a device.
IPvDeviceAdapter::GetGenRegisterLength
virtual PvResult GetGenRegisterLength(const PvString &aParameterName, int64_t &aLength)=0
Gets the length (in bytes) of a register identified by its name.
PvDevice
Connect, configure and control a GigE Vision or USB3 Vision device.
Definition: PvDevice.h:30
IPvDeviceAdapter::IsGenBooleanInNodeMap
virtual bool IsGenBooleanInNodeMap(const PvString &aParameterName)=0
Returns true if the device node map contains a Boolean of the specified name.
PvGenParameter
Base class for all GenICam feature types.
Definition: PvGenParameter.h:37
PvDeviceEventSink
Observer interface for an observable PvDevice object.
Definition: PvDeviceEventSink.h:17
IPvDeviceAdapter::IsGenWritable
virtual bool IsGenWritable(const PvString &aParameterName)=0
Returns true if a parameter is present and writable in the node map.
IPvDeviceAdapter::IsConnected
virtual bool IsConnected()=0
Returns true if the device is connected.
IPvDeviceAdapter::GetGenBooleanValue
virtual PvResult GetGenBooleanValue(const PvString &aParameterName, bool &aValue)=0
Returns the value of a Boolean identified by its name.
IPvDeviceAdapter::IsUSB3Vision
virtual bool IsUSB3Vision()=0
Returns true if the device uses the USB3 Vision protocol.

Copyright (c) 2002-2021 Pleora Technologies Inc.
www.pleora.com