The device class encapsulates a Genicam device. More...
#include <device.h>
Public Types | |
enum | ACCESS { READONLY, CONTROL, EXCLUSIVE } |
Public Member Functions | |
void | close () |
Closes the device. | |
Device (const std::shared_ptr< Interface > &parent, const std::shared_ptr< const GenTLWrapper > &gentl, const char *id) | |
Constructs a device class. | |
std::string | getAccessStatus () |
Returns the access status of the device. | |
std::string | getDisplayName () |
Returns the display name of the device. | |
void * | getHandle () const |
Get internal interface handle. | |
const std::string & | getID () const |
Get the internal ID of this device. | |
std::string | getModel () |
Returns the model of the device. | |
std::shared_ptr < GenApi::CNodeMapRef > | getNodeMap () |
Returns the node map of this object. | |
std::shared_ptr< Interface > | getParent () const |
Returns the pointer to the parent interface object. | |
std::shared_ptr < GenApi::CNodeMapRef > | getRemoteNodeMap (const char *xml=0) |
Returns the node map of the remote device. | |
std::string | getSerialNumber () |
Returns the serial number of the device. | |
std::vector< std::shared_ptr < Stream > > | getStreams () |
Returns the currently available streams of this device. | |
uint64_t | getTimestampFrequency () |
Returns the timestamp frequency of the device. | |
std::string | getTLType () |
Returns the transport layer type of the device. | |
std::string | getUserDefinedName () |
Returns the user defined name of the device. | |
std::string | getVendor () |
Returns the vendor of the device. | |
std::string | getVersion () |
Returns the version of the device. | |
void | open (ACCESS access) |
Opens the device for working with it. | |
~Device () | |
Private Member Functions | |
Device (class Device &) | |
Device & | operator= (const Device &) |
Private Attributes | |
std::shared_ptr< CPort > | cport |
void * | dev |
std::shared_ptr< const GenTLWrapper > | gentl |
std::string | id |
std::mutex | mtx |
int | n_open |
std::shared_ptr < GenApi::CNodeMapRef > | nodemap |
std::shared_ptr< Interface > | parent |
std::shared_ptr < GenApi::CNodeMapRef > | rnodemap |
void * | rp |
std::shared_ptr< CPort > | rport |
std::vector< std::weak_ptr < Stream > > | slist |
The device class encapsulates a Genicam device.
NOTE: A GenTLException is thrown in case of a severe error.
enum rcg::Device::ACCESS |
rcg::Device::Device | ( | const std::shared_ptr< Interface > & | parent, |
const std::shared_ptr< const GenTLWrapper > & | gentl, | ||
const char * | id | ||
) |
rcg::Device::Device | ( | class Device & | ) | [private] |
void rcg::Device::close | ( | ) |
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.
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.
void * rcg::Device::getHandle | ( | ) | const |
const std::string & rcg::Device::getID | ( | ) | const |
std::string rcg::Device::getModel | ( | ) |
Returns the model 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.
std::shared_ptr< GenApi::CNodeMapRef > rcg::Device::getNodeMap | ( | ) |
std::shared_ptr< Interface > rcg::Device::getParent | ( | ) | const |
std::shared_ptr< GenApi::CNodeMapRef > rcg::Device::getRemoteNodeMap | ( | const char * | xml = 0 | ) |
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.
xml | Path and name for storing the received XML file or 0 if xml file should not be stored. |
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.
std::vector< std::shared_ptr< Stream > > rcg::Device::getStreams | ( | ) |
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.
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.
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.
std::string rcg::Device::getVendor | ( | ) |
Returns the vendor 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.
std::string rcg::Device::getVersion | ( | ) |
Returns the version 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.
void rcg::Device::open | ( | ACCESS | access | ) |
std::shared_ptr<CPort> rcg::Device::cport [private] |
void* rcg::Device::dev [private] |
std::shared_ptr<const GenTLWrapper> rcg::Device::gentl [private] |
std::string rcg::Device::id [private] |
std::mutex rcg::Device::mtx [private] |
int rcg::Device::n_open [private] |
std::shared_ptr<GenApi::CNodeMapRef> rcg::Device::nodemap [private] |
std::shared_ptr<Interface> rcg::Device::parent [private] |
std::shared_ptr<GenApi::CNodeMapRef> rcg::Device::rnodemap [private] |
void* rcg::Device::rp [private] |
std::shared_ptr<CPort> rcg::Device::rport [private] |
std::vector<std::weak_ptr<Stream> > rcg::Device::slist [private] |