The device class encapsulates a Genicam device.
More...
#include <device.h>
The device class encapsulates a Genicam device.
NOTE: A GenTLException is thrown in case of a severe error.
Definition at line 54 of file device.h.
Enumerator |
---|
READONLY |
|
CONTROL |
|
EXCLUSIVE |
|
Definition at line 58 of file device.h.
rcg::Device::Device |
( |
const std::shared_ptr< Interface > & |
parent, |
|
|
const std::shared_ptr< const GenTLWrapper > & |
gentl, |
|
|
const char * |
id |
|
) |
| |
Constructs a device class.
Devices must only be created by the interface class.
Definition at line 48 of file device.cc.
rcg::Device::Device |
( |
class Device & |
| ) |
|
|
private |
void rcg::Device::close |
( |
| ) |
|
Closes the device.
Each call of open() must be followed by a call to close() at some point in time.
Definition at line 137 of file device.cc.
std::string rcg::Device::getAccessStatus |
( |
| ) |
|
Returns the access status of the device.
NOTE: This method only returns a non empty string if the parent interface has NOT been closed after Interface::getDevice() or Interface::getDevices() call, or if this device itself has been opened with the open() call.
- Returns
- Access status.
Definition at line 305 of file device.cc.
std::string rcg::Device::getDisplayName |
( |
| ) |
|
Returns the display name of the device.
NOTE: This method only returns a non empty string if the parent interface has NOT been closed after Interface::getDevice() or Interface::getDevices() call, or if this device itself has been opened with the open() call.
- Returns
- Display name.
Definition at line 299 of file device.cc.
void * rcg::Device::getHandle |
( |
| ) |
const |
Get internal interface handle.
- Returns
- Internal handle.
Definition at line 432 of file device.cc.
const std::string & rcg::Device::getID |
( |
| ) |
const |
Get the internal ID of this device.
- Returns
- ID.
Definition at line 80 of file device.cc.
std::string rcg::Device::getModel |
( |
| ) |
|
Returns the node map of this object.
NOTE: open() must be called before calling this method. The returned pointer remains valid until close() of this object is called.
- Returns
- Node map of this object.
Definition at line 403 of file device.cc.
std::shared_ptr< Interface > rcg::Device::getParent |
( |
| ) |
const |
Returns the pointer to the parent interface object.
- Returns
- Pointer to parent interface object.
Definition at line 75 of file device.cc.
Returns the node map of the remote device.
NOTE: open() must be called before calling this method. The returned pointer remains valid until close() of this object is called.
- Parameters
-
xml | Path and name for storing the received XML file or 0 if xml file should not be stored. |
- Returns
- Node map of this object.
Definition at line 416 of file device.cc.
std::string rcg::Device::getSerialNumber |
( |
| ) |
|
Returns the serial number of the device.
NOTE: This method only returns a non empty string if the parent interface has NOT been closed after Interface::getDevice() or Interface::getDevices() call, or if this device itself has been opened with the open() call.
- Returns
- Serial number.
Definition at line 371 of file device.cc.
std::vector< std::shared_ptr< Stream > > rcg::Device::getStreams |
( |
| ) |
|
Returns the currently available streams of this device.
NOTE: The device must have been opened with the open() call before calling this method.
- Returns
- List of streams.
Definition at line 180 of file device.cc.
uint64_t rcg::Device::getTimestampFrequency |
( |
| ) |
|
Returns the timestamp frequency of the device.
NOTE: This method only returns a non empty string if the parent interface has NOT been closed after Interface::getDevice() or Interface::getDevices() call, or if this device itself has been opened with the open() call.
- Returns
- Tick-frequency of the time stamp clock.
Definition at line 383 of file device.cc.
std::string rcg::Device::getTLType |
( |
| ) |
|
Returns the transport layer type of the device.
NOTE: This method only returns a non empty string if the parent interface has NOT been closed after Interface::getDevice() or Interface::getDevices() call, or if this device itself has been opened with the open() call.
- Returns
- Transport layer type.
Definition at line 293 of file device.cc.
std::string rcg::Device::getUserDefinedName |
( |
| ) |
|
Returns the user defined name of the device.
NOTE: This method only returns a non empty string if the parent interface has NOT been closed after Interface::getDevice() or Interface::getDevices() call, or if this device itself has been opened with the open() call.
- Returns
- User defined name.
Definition at line 365 of file device.cc.
std::string rcg::Device::getVendor |
( |
| ) |
|
std::string rcg::Device::getVersion |
( |
| ) |
|
void rcg::Device::open |
( |
ACCESS |
access | ) |
|
Opens the device for working with it.
The interface may be opened multiple times. However, for each open(), the close() method must be called as well.
Definition at line 85 of file device.cc.
std::shared_ptr<CPort> rcg::Device::cport |
|
private |
std::string rcg::Device::id |
|
private |
std::mutex rcg::Device::mtx |
|
private |
std::shared_ptr<Interface> rcg::Device::parent |
|
private |
std::shared_ptr<CPort> rcg::Device::rport |
|
private |
std::vector<std::weak_ptr<Stream> > rcg::Device::slist |
|
private |
The documentation for this class was generated from the following files: