3#include "../../global.hpp"
4#include "../../string.hpp"
6#include "../driver.hpp"
27 template <
class PARAM>
40 template <
class PARAM = std::u
int32_t>
43 return static_cast<PARAM
>(command_ & ParameterMask);
51 template <
class PARAM = std::u
int32_t>
54 command_ = (command_ & OperationMask) |
static_cast<std::uint32_t>(parameter);
74 command_ =
static_cast<std::int32_t>(operation) | (command_ & ParameterMask);
94 explicit DeviceControl(
const DevicePtr &device)
127 template <
class IN_TYPE,
class OUT_TYPE>
130 std::size_t outputSize =
static_cast<int>(
sizeof(OUT_TYPE));
131 SendCommand(command, &value,
sizeof(IN_TYPE), &result, outputSize);
142 template <
class OUT_TYPE>
145 std::size_t outputSize =
static_cast<int>(
sizeof(OUT_TYPE));
146 SendCommand(command,
nullptr, 0, &result, outputSize);
91 class DeviceControl {
…};
170 using Driver::DeviceControl;
171 using Driver::DeviceControlCommand;
DeviceControlCommand(PARAM parameter, DeviceControlOperation operation) noexcept
Creates a command from the given operation and command parameter.
Definition decl_device_control.hpp:28
A specific command to send to the driver.
Definition decl_device_control.hpp:19
void SetParameter(PARAM parameter) noexcept
Sets the parameter part of the command.
Definition decl_device_control.hpp:52
void SetOperation(DeviceControlOperation operation) noexcept
Sets the operation part of the command.
Definition decl_device_control.hpp:72
DeviceControlCommand(PARAM parameter, DeviceControlOperation operation) noexcept
Creates a command from the given operation and command parameter.
Definition decl_device_control.hpp:28
DeviceControlOperation Operation() const noexcept
Gets the operation part of the command.
Definition decl_device_control.hpp:62
PARAM Parameter() const noexcept
Gets the parameter part of the command.
Definition decl_device_control.hpp:41
void SendCommand(DeviceControlCommand command, OUT_TYPE &result)
Sends the given command value to the driver.
Definition decl_device_control.hpp:143
String SendStringCommand(DeviceControlCommand command, const String &value)
Sends the given command value to the driver.
Definition detail_device_control.hpp:19
void SendCommand(DeviceControlCommand command, IN_TYPE value, OUT_TYPE &result)
Sends the given command value to the driver.
Definition decl_device_control.hpp:128
DevicePtr Parent() const noexcept
Gets the parent device of this interface.
Definition decl_device_control.hpp:104
Namespace for driver or device related operations.
Definition decl_composite.hpp:28
DeviceControlOperation
Operation on driver specific parameter.
Definition driver.hpp:526
@ String
String value.
Definition driver.hpp:366
Root namespace for the Image Manager interface.
Definition c_bayer_to_rgb.h:17
std::shared_ptr< Device > DevicePtr
Convenience shared pointer for Device.
Definition global.hpp:98