FpgaManager
Software API Documentation
FpgaManager_Config.h
1 #pragma once
2 
3 // ================================================================================
4 // PUBLIC INCLUDES
5 // ================================================================================
6 
7 #include "FpgaManager_Types.h"
8 
9 #include <cstdio>
10 #include <string>
11 #include <ostream>
12 #include <iomanip>
13 #include <stdint.h>
14 
21 
22 // ================================================================================
23 // NAMESPACE
24 // ================================================================================
25 
26 namespace enclustra {
27 namespace fpgamanager {
28 namespace config {
29 
30 // ================================================================================
31 // TYPES
32 // ================================================================================
33 
37 enum class Profile
38 {
45 };
46 
50 enum class CallbackOperationMode_t
51 {
52  Continuous = 0,
53  Synchronous = 1,
54 };
55 
59 enum class Fx3FifoMode_t
60 {
62  Half_16bit = 0,
64  Full_32bit = 1,
65 };
66 
67 // ================================================================================
68 // PROPERTY
69 // ================================================================================
70 
75 template<typename T>
76 struct Property
77 {
85  : _isprovisioned(false)
86  {
87  }
88 
96  explicit Property(const T& value)
97  : _value(value)
98  , _isprovisioned(true)
99  {
100  }
101 
107  Property& operator=(const T& value)
108  {
109  _value = value;
110  _isprovisioned = true;
111  return *this;
112  }
113 
118  bool provisioned() const
119  {
120  return _isprovisioned;
121  }
122 
127  const T& get() const
128  {
129  return _value;
130  }
131 
139  void set(const T& value)
140  {
141  _value = value;
142  _isprovisioned = true;
143  }
144 
145 private:
146  T _value;
147  bool _isprovisioned;
148 };
149 
150 // ================================================================================
151 // SETTINGS
152 // ================================================================================
153 
158 {
171 
174 
181 
184 
191  static ConfigSettings From(types::ApiUrl::Protocol protocol, Profile profile);
192 };
193 
194 // ================================================================================
195 // PREDEFINED
196 // ================================================================================
197 
202 ConfigSettings UdpMaxPerformance();
207 ConfigSettings UdpMinResources();
212 ConfigSettings Fx3MaxPerformance();
217 ConfigSettings Fx3MinResources();
222 ConfigSettings FtdiMaxPerformance();
227 ConfigSettings FtdiMinResources();
232 ConfigSettings PCIeMaxPerformance();
237 ConfigSettings PCIeMinResources();
238 
239 // ================================================================================
240 // TRAILER
241 // ================================================================================
242 
243 }
244 }
245 }
246 
Property< unsigned > UniScpUpPktRate
UniScp upstream packet rate limit
Definition: FpgaManager_Config.h:168
Property< Fx3FifoMode_t > Fx3FifoMode
FX3 FIFO Mode
Definition: FpgaManager_Config.h:176
Configuration Property
Definition: FpgaManager_Config.h:76
Enclustra predefined Minimum Resources
Configuration Parameter
Definition: FpgaManager_Config.h:157
Profile
Configuration profile
Definition: Types.cs:45
Enclustra predefined Maximum performance
Property< uint32_t > UniScpProductId
UniScp Product ID (must match FPGA FW implementation)
Definition: FpgaManager_Config.h:162
Property< unsigned > UniScpMaxPacketSize
UniScp Maximum Packet size
Definition: FpgaManager_Config.h:164
static ConfigSettings From(types::ApiUrl::Protocol protocol, Profile profile)
Construct configuration parameter from protocol/profile
Property< CallbackOperationMode_t > CallbackOperationMode
Callback operation mode
Definition: FpgaManager_Config.h:183
None, use internal default values
Protocol
Transport Protocol
Definition: FpgaManager_Types.h:39
Property()
Property default constructor
Definition: FpgaManager_Config.h:84
Property< unsigned > Fx3PacketSizeMultiplier
FX3 Packet Size Multiplier
Definition: FpgaManager_Config.h:178
Definition: FpgaManager.h:28
Property< unsigned > UniMmBufferDivider
UniMM buffer divider
Definition: FpgaManager_Config.h:173
Property< uint32_t > UniScpVendorId
UniScp Vendor ID (must match FPGA FW implementation)
Definition: FpgaManager_Config.h:160
Property(const T &value)
Property construction from value
Definition: FpgaManager_Config.h:96
Property< unsigned > UniScpMaxPendingPackets
UniScp Maximum pending packet count
Definition: FpgaManager_Config.h:166
Property< types::Duration > UniScpKeepAliveTimeout
UniScp keep-alive timeout
Definition: FpgaManager_Config.h:170
bool provisioned() const
Property provisioned checker
Definition: FpgaManager_Config.h:118
Property & operator=(const T &value)
Assign type value to property
Definition: FpgaManager_Config.h:107
Property< unsigned > Fx3OpenTransfers
FX3 Simultaneous open transfers
Definition: FpgaManager_Config.h:180