|
Brick
|
#include <device.h>
Base class for devices connected to physical Smart Ports.
Stores the physical port, expected device type, and C SDK handle. Derived classes use handle() to call C SDK functions.
Public Member Functions | |
| int | port () const |
| Gets the physical Smart Port number. | |
| bool | installed () const |
| Checks whether the expected device is currently connected. | |
Protected Member Functions | |
| Device (int port, int expected_type) | |
| Resolves and caches the C SDK handle for a physical Smart Port. | |
| ~Device ()=default | |
| Destroys the device. | |
| _V5_Device * | handle () const |
| Provides the device handle associated with this port. | |
|
protected |
Resolves and caches the C SDK handle for a physical Smart Port.
| port | Physical Smart Port number [1, 21]. |
| expected_type | C SDK device type supplied by the base class. |
| bool crust::Device::installed | ( | ) | const |
Checks whether the expected device is currently connected.
|
inline |
Gets the physical Smart Port number.