IDS peak genericC++  v1.6.1
peak_common_device_enums.hpp
Go to the documentation of this file.
1 
11 #pragma once
12 
13 
14 namespace peak
15 {
16 namespace core
17 {
18 
25 {
26  ReadWrite = 1,
27  ReadOnly,
28  NoAccess,
29  Busy,
32 
33  Custom = 1000
34 };
35 
36 inline std::string ToString(DeviceAccessStatus entry)
37 {
38  std::string entryString;
39 
40  if (entry == DeviceAccessStatus::ReadWrite)
41  {
42  entryString = "ReadWrite";
43  }
44  else if (entry == DeviceAccessStatus::ReadOnly)
45  {
46  entryString = "ReadOnly";
47  }
48  else if (entry == DeviceAccessStatus::NoAccess)
49  {
50  entryString = "NoAccess";
51  }
52  else if (entry == DeviceAccessStatus::Busy)
53  {
54  entryString = "Busy";
55  }
56  else if (entry == DeviceAccessStatus::OpenReadWrite)
57  {
58  entryString = "OpenReadWrite";
59  }
60  else if (entry == DeviceAccessStatus::OpenReadOnly)
61  {
62  entryString = "OpenReadOnly";
63  }
64  else if (entry >= DeviceAccessStatus::Custom)
65  {
66  entryString = "Custom";
67  }
68 
69  return entryString;
70 }
71 
72 } /* namespace core */
73 } /* namespace peak */
The "peak" namespace directly contains convenience functionality like the DeviceManager as well as th...
Definition: peak_dynamic_loader.h:32
std::string ToString(BufferPayloadType entry)
Definition: peak_buffer.hpp:472
DeviceAccessStatus
Current accessibility of the device.
Definition: peak_common_device_enums.hpp:24