Pleora Technologies Inc. eBUS SDK v7.0.1.7536 API



Loading...
Searching...
No Matches
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
14class IPvDeviceEventSinkList;
15
16namespace PtUtilsLib
17{
18 class Mutex;
19}
20
31class PV_DEVICE_API PvDeviceAdapter : public IPvDeviceAdapter, public PvDeviceEventSink, public PvGenEventSink
32{
33public:
34
40 PvDeviceAdapter( PvDevice *aDevice );
41
45 virtual ~PvDeviceAdapter();
46
54 bool IsGenIntegerInNodeMap( const PvString &aParameterName );
55
63 bool IsGenEnumInNodeMap( const PvString &aParameterName );
64
72 bool IsGenBooleanInNodeMap( const PvString &aParameterName );
73
81 bool IsGenRegisterInNodeMap( const PvString &aParameterName );
82
90 bool IsGenReadable( const PvString &aParameterName );
91
99 bool IsGenWritable( const PvString &aParameterName );
100
109 bool IsGenEnumEntryAvailable( const PvString &aParameterName, const PvString &aEnumEntry );
110
119 PvResult GetGenIntegerValue( const PvString &aParameterName, int64_t &aValue );
120
129 PvResult GetGenEnumEntriesAvailable( const PvString &aParameterName, PvStringList &aList );
130
139 PvResult GetGenEnumValue( const PvString &aParameterName, PvString &aEnumEntry );
140
149 PvResult SetGenEnumValue( const PvString &aParameterName, const PvString &aEnumEntry );
150
159 PvResult GetGenBooleanValue( const PvString &aParameterName, bool &aValue );
160
169 PvResult SetGenBooleanValue( const PvString &aParameterName, bool aValue );
170
179 PvResult GetGenStringValue( const PvString &aParameterName, PvString &aValue );
180
189 PvResult GetGenRegisterLength( const PvString &aParameterName, int64_t &aLength );
190
200 PvResult GetGenRegisterData( const PvString &aParameterName, uint8_t *aDataBuffer, int64_t aByteCount );
201
211 PvResult SetGenRegisterData( const PvString &aParameterName, const uint8_t *aDataBuffer, int64_t aByteCount );
212
220 PvResult RegisterGenInvalidator( const PvString &aParameterName );
221
229 PvResult UnregisterGenInvalidator( const PvString &aParameterName );
230
239 PvResult WriteRegister( int64_t aAddress, uint32_t aValue );
240
249 PvResult ReadRegister( int64_t aAddress, uint32_t &aValue );
250
260 PvResult WriteMemory( const uint8_t *aBuffer, int64_t aAddress, int64_t aLength );
261
271 PvResult ReadMemory( uint8_t *aBuffer, int64_t aAddress, int64_t aLength );
272
280 PvResult WaitForMessagingChannelIdle( uint32_t aTimeout );
281
287 bool IsConnected();
288
294 bool IsPleoraPowered();
295
301 bool IsGigEVision();
302
308 bool IsUSB3Vision();
309
318
327
339
340protected:
341
353 void OnEvent( PvDevice *aDevice,
354 uint16_t aEventID, uint16_t aChannel, uint64_t aBlockID, uint64_t aTimestamp,
355 const void *aData, uint32_t aDataLength );
356
362 void OnParameterUpdate( PvGenParameter *aParameter );
363
364private:
365
366 PvDevice *mDevice;
367
368 IPvDeviceEventSinkList *mEventSinkList;
369 PtUtilsLib::Mutex *mEventSinkListMutex;
370
371};
372
373#endif
Interface used by PvDeviceSerialPort to interact with a device controller.
Definition IPvDeviceAdapter.h:49
virtual bool IsConnected()=0
Returns true if the device is connected.
virtual PvResult GetGenEnumEntriesAvailable(const PvString &aParameterName, PvStringList &aList)=0
Returns a list of all available enum entries for an enumeration.
virtual PvResult GetGenRegisterLength(const PvString &aParameterName, int64_t &aLength)=0
Gets the length (in bytes) of a register identified by its name.
virtual bool IsGenIntegerInNodeMap(const PvString &aParameterName)=0
Returns true if the device node map contains an integer of the specified name.
virtual PvResult GetGenEnumValue(const PvString &aParameterName, PvString &aEnumEntry)=0
Returns the string value of an enumeration identified by its name.
virtual bool IsGigEVision()=0
Returns true if the device uses the GigE Vision protocol.
virtual PvResult RegisterGenInvalidator(const PvString &aParameterName)=0
Registers (and forward to the device serial object) invalidation events for a parameter identified by...
virtual PvResult SetGenEnumValue(const PvString &aParameterName, const PvString &aEnumEntry)=0
Sets the value of an enumeration identified by its name.
virtual bool IsUSB3Vision()=0
Returns true if the device uses the USB3 Vision protocol.
virtual bool IsGenReadable(const PvString &aParameterName)=0
Returns true if a parameter is present and readable in the node map.
virtual PvResult GetGenIntegerValue(const PvString &aParameterName, int64_t &aValue)=0
Returns the value of an integer identified by its name.
virtual PvResult ReadRegister(int64_t aAddress, uint32_t &aValue)=0
Reads a 32 bit value from a GigE Vision register.
virtual bool IsGenWritable(const PvString &aParameterName)=0
Returns true if a parameter is present and writable in the node map.
virtual bool IsGenRegisterInNodeMap(const PvString &aParameterName)=0
Returns true if the device node map contains a raw register of the specified name.
virtual PvResult GetGenStringValue(const PvString &aParameterName, PvString &aValue)=0
Returns the string value of string parameter identified by its name.
virtual PvResult UnregisterEventSink(IPvDeviceEventSink *aEventSink)=0
Unregisters an event sink registered with RegisterEventSink.
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.
virtual bool IsPleoraPowered()=0
Returns true if the device runs on a Pleora design.
virtual PvResult GetGenBooleanValue(const PvString &aParameterName, bool &aValue)=0
Returns the value of a Boolean identified by its name.
virtual PvResult WaitForMessagingChannelIdle(uint32_t aTimeout)=0
Waits for the messaging channel queue to be empty.
virtual PvResult RegisterEventSink(IPvDeviceEventSink *aEventSink)=0
Registers an event sink that will want to receive the raw events and GenICam invalidator events.
virtual PvResult GetGenRegisterData(const PvString &aParameterName, uint8_t *aDataBuffer, int64_t aByteCount)=0
Gets the data contained in a register identified by its name.
virtual bool IsGenEnumInNodeMap(const PvString &aParameterName)=0
Returns true if the device node map contains an enumeration of the specified name.
virtual PvResult WriteMemory(const uint8_t *aBuffer, int64_t aAddress, int64_t aLength)=0
Writes data to a the memory of a device.
virtual PvResult GetUniqueID(PvString &aID)=0
Returns a unique string identifier for the device.
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.
virtual PvResult SetGenBooleanValue(const PvString &aParameterName, bool aValue)=0
Sets the value of a Boolean identified by its name.
virtual PvResult WriteRegister(int64_t aAddress, uint32_t aValue)=0
Writes a 32 bit value to a GigE Vision register.
virtual bool IsGenBooleanInNodeMap(const PvString &aParameterName)=0
Returns true if the device node map contains a Boolean of the specified name.
virtual PvResult UnregisterGenInvalidator(const PvString &aParameterName)=0
Unregisters (and forward to the device serial object) invalidation events for a parameter identified ...
virtual PvResult ReadMemory(uint8_t *aBuffer, int64_t aAddress, int64_t aLength)=0
Reads data from the memory of a device.
Interface used by a class implementing IPvDeviceAdapter to forward notifications to PvDeviceSerialPor...
Definition IPvDeviceEventSink.h:27
IPvDeviceAdapter default implementation for the eBUS SDK.
Definition PvDeviceAdapter.h:32
Observer interface for an observable PvDevice object.
Definition PvDeviceEventSink.h:66
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:58
Connect, configure and control a GigE Vision or USB3 Vision device.
Definition PvDevice.h:42
Observer interface for an observable PvGenParameter object.
Definition PvGenParameter.h:518
virtual void OnParameterUpdate(PvGenParameter *aParameter)=0
Callback that is invoked when a feature's value is updated.
Base class for all GenICam feature types.
Definition PvGenParameter.h:44
Result information.
Definition PvResult.h:30
String class.
Definition PvString.h:26
Class used to hold a group of PvString objects.
Definition PvStringList.h:20

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