Dante Application Library API
InstanceConfig.hpp
1 #pragma once
2 
3 #include "audinate/dal/Common.hpp"
4 
5 #include <map>
6 
7 namespace Audinate { namespace DAL {
8 
17 {
18 public:
19  // Constructor
21 
22  // Destructor
23  ~InstanceConfig();
24 
25  //------------------------------------------------------
26  // Identity
27  //------------------------------------------------------
28 
33  void setManufacturerName(const std::string & manufacturerName);
34 
39  std::string getManufacturerName() const;
40 
45  void setManufacturerVersion(const Version & manufacturerVersion);
46 
52 
57  void setModelName(const std::string & modelName);
58 
63  std::string getModelName() const;
64 
69  void setModelId(const Id64 & modelId);
70 
75  Id64 getModelId() const;
76 
82  void setDefaultName(const std::string & name);
83 
88  std::string getDefaultName() const;
89 
90  //------------------------------------------------------
91  // General Dante capabilities.
92  //------------------------------------------------------
93 
98  void setNumTxChannels(unsigned int numTxChannels);
99 
104  unsigned int getNumTxChannels() const;
105 
112  void setTxChannelName(unsigned int txChannelIndex, const std::string & name);
113 
119  std::string getTxChannelName(unsigned int txChannelIndex) const;
120 
125  void setNumRxChannels(unsigned int numRxChannels);
126 
131  unsigned int getNumRxChannels() const;
132 
139  void setRxChannelName(unsigned int rxChannelIndex, const std::string & name);
140 
146  std::string getRxChannelName(unsigned int rxChannelIndex) const;
147 
152  void setNumTxFlows(unsigned int numTxFlows);
153 
158  unsigned int getNumTxFlows() const;
159 
164  void setNumRxFlows(unsigned int numRxFlows);
165 
170  unsigned int getNumRxFlows() const;
171 
179  void setSamplerate(Samplerate samplerate);
180 
185  Samplerate getSamplerate() const;
186 
187  //------------------------------------------------------
188  // Platform
189  //------------------------------------------------------
190 
197  void setInterfaceName(InterfaceName name);
198 
203  InterfaceName getInterfaceName() const;
204 
210  void setInterfaceIndex(InterfaceIndex index);
211 
216  InterfaceIndex getInterfaceIndex() const;
217 
218  //------------------------------------------------------
219  // Port configuration
220  //------------------------------------------------------
221 
227  void setProtocolSocketDescriptor(Protocol protocol, SocketDescriptor socketDescriptor);
228 
233  SocketDescriptor getProtocolSocketDescriptor(Protocol protocol) const;
234 
239  void setAudioPortRange(uint16_t range);
240 
245  uint16_t getAudioPortRange() const;
246 
247  //------------------------------------------------------
248  // Network time configuration
249  //------------------------------------------------------
250 
255  void setTimeSource(TimeSource timeSource);
256 
261  TimeSource getTimeSource() const;
262 
263  //------------------------------------------------------
264  // Process and file management configuration
265  //------------------------------------------------------
266 
271  void setProcessPath(std::string processPath);
272 
277  std::string getProcessPath() const;
278 
283  void setConfigurationPath(std::string configurationPath);
284 
289  std::string getConfigurationPath() const;
290 
295  void setLoggingPath(std::string loggingPath);
296 
301  std::string getLoggingPath() const;
302 
303  //------------------------------------------------------
304  // Audio Buffer configuration
305  //------------------------------------------------------
306 
311  void setSamplesPerPeriod(unsigned int samplesPerPeriod);
312 
317  unsigned int getSamplesPerPeriod() const;
318 
323  void setPeriodsPerBuffer(unsigned int periodsPerBuffer);
324 
329  unsigned int getPeriodsPerBuffer() const;
330 
335  void setEncoding(unsigned int encoding);
336 
341  unsigned int getEncoding() const;
342 
348  void setPerChannelEncodingFile(const std::string & fileName);
349 
355  std::string getPerChannelEncodingFile() const;
356 
361  void setLogLevel(LogLevel logLevel);
362 
367  LogLevel getLogLevel() const;
368 
374  void setNetworkLatency(unsigned int networkLatency);
375 
380  unsigned int getNetworkLatency() const;
381 
387  void setActivationDirectory(const std::string & path);
388 
393  std::string getActivationDirectory() const;
394 
395 private:
396  std::string mManufacturerName;
397  Version mManufacturerVersion;
398  std::string mModelName;
399  Id64 mModelId;
400  std::string mDefaultName;
401  std::vector<std::string> mTxChannels;
402  std::vector<std::string> mRxChannels;
403  unsigned int mNumTxFlows;
404  unsigned int mNumRxFlows;
405  Samplerate mSamplerate;
406  InterfaceName mInterfaceName;
407  InterfaceIndex mInterfaceIndex;
408  std::map<Protocol, SocketDescriptor> mProtocolSocketDescriptors;
409  unsigned int mAudioPortRange;
410  TimeSource mTimeSource;
411  unsigned int mSamplesPerPeriod;
412  unsigned int mPeriodsPerBuffer;
413  unsigned int mEncoding;
414  std::string mPerChannelEncodingFile;
415  std::string mProcessPath;
416  std::string mConfigurationPath;
417  std::string mLoggingPath;
418  LogLevel mLogLevel;
419  unsigned int mNetworkLatency;
420  std::string mActivationDirectory;
421 };
422 
423 
424 
425 };};
Audinate::DAL::InstanceConfig::getProcessPath
std::string getProcessPath() const
Get the local filesystem path where the DAL instance's supporting binaries can be found.
Audinate::DAL::InstanceConfig::getNumTxFlows
unsigned int getNumTxFlows() const
Get the number of transmit (tx) flows.
Audinate::DAL::InstanceConfig::getModelName
std::string getModelName() const
Get the model name for the DAL Instance.
Audinate::DAL::InstanceConfig::setEncoding
void setEncoding(unsigned int encoding)
Set the encoding used by the DAL instance.
Audinate::DAL::Version
A Version class used for tracking updates to your DAL Dante device.
Definition: Types.hpp:52
Audinate::DAL::InstanceConfig::getLoggingPath
std::string getLoggingPath() const
Get the logging path used by the child processes for storing log information.
Audinate::DAL::SocketDescriptor
Definition: Common.hpp:71
Audinate::DAL::InstanceConfig::setNumRxChannels
void setNumRxChannels(unsigned int numRxChannels)
Set the number of receive channels for the DAL instance.
Audinate::DAL::InstanceConfig::setNumTxFlows
void setNumTxFlows(unsigned int numTxFlows)
Override the default number of the transmit flows for the DAL instance.
Audinate::DAL::InstanceConfig::setLoggingPath
void setLoggingPath(std::string loggingPath)
Set the logging path used by the child processes for storing log information.
Audinate::DAL::InstanceConfig::setConfigurationPath
void setConfigurationPath(std::string configurationPath)
Set the configuration path used by the DAL instance (including its child processes) for storing confi...
Audinate::DAL::InstanceConfig::setNumTxChannels
void setNumTxChannels(unsigned int numTxChannels)
Set the number of transmit channels for the DAL instance.
Audinate::DAL::InstanceConfig
Configuration for an DAL instance.
Definition: InstanceConfig.hpp:16
Audinate::DAL::InstanceConfig::getInterfaceName
InterfaceName getInterfaceName() const
Get the name of the local network interface on which DAL will run.
Audinate::DAL::InstanceConfig::setDefaultName
void setDefaultName(const std::string &name)
Set the default device name for the DAL instance.
Audinate::DAL::InstanceConfig::setSamplerate
void setSamplerate(Samplerate samplerate)
Set the samplerate for the DAL instance.
Audinate::DAL::InstanceConfig::getTimeSource
TimeSource getTimeSource() const
Get the time source for the DAL instance.
Audinate::DAL::InstanceConfig::setInterfaceIndex
void setInterfaceIndex(InterfaceIndex index)
Set the index of the local network interface on which DAL will run.
Audinate::DAL::InstanceConfig::setProcessPath
void setProcessPath(std::string processPath)
Set the local filesystem path where the DAL instance's supporting binaries can be found.
Audinate::DAL::InstanceConfig::setProtocolSocketDescriptor
void setProtocolSocketDescriptor(Protocol protocol, SocketDescriptor socketDescriptor)
Set the socket descriptor (port number or socket path) to be used by DAL for the given protocol.
Audinate::DAL::Id64
Definition: Types.hpp:90
Audinate::DAL::InstanceConfig::getNumRxFlows
unsigned int getNumRxFlows() const
Get the number of receive (rx) flows.
Audinate::DAL::InstanceConfig::getConfigurationPath
std::string getConfigurationPath() const
Get the configuration path used by the child processes for storing configuration data.
Audinate::DAL::InstanceConfig::setInterfaceName
void setInterfaceName(InterfaceName name)
Set the name of the local network interface on which DAL will run.
Audinate::DAL::InstanceConfig::getProtocolSocketDescriptor
SocketDescriptor getProtocolSocketDescriptor(Protocol protocol) const
Get the socket descriptor (port number or socket path) to be used by DAL for the given protocol.
Audinate::DAL::InstanceConfig::getInterfaceIndex
InterfaceIndex getInterfaceIndex() const
Get the index of the local network interface on which DAL will run.
Audinate::DAL::InstanceConfig::getModelId
Id64 getModelId() const
Get the model id for the DAL Instance.
Audinate::DAL::InstanceConfig::getSamplerate
Samplerate getSamplerate() const
Get the samplerate for the DAL instance.
Audinate::DAL::InstanceConfig::getEncoding
unsigned int getEncoding() const
Get the encoding used by the DAL instance.
Audinate::DAL::InstanceConfig::getManufacturerVersion
Version getManufacturerVersion() const
Get the manufacturer product version for the DAL Instance.
Audinate::DAL::InstanceConfig::setAudioPortRange
void setAudioPortRange(uint16_t range)
Set the audio port range to be used by DAL instance.
Audinate::DAL::InstanceConfig::setLogLevel
void setLogLevel(LogLevel logLevel)
Set the log level for DAL instance.
Audinate::DAL::InstanceConfig::getLogLevel
LogLevel getLogLevel() const
Get the log level for DAL instance.
Audinate::DAL::InstanceConfig::setNetworkLatency
void setNetworkLatency(unsigned int networkLatency)
Set the DAL device network latency
Audinate::DAL::InstanceConfig::getActivationDirectory
std::string getActivationDirectory() const
Get the activation directory path for the DAL instance.
Audinate::DAL::InstanceConfig::getNumTxChannels
unsigned int getNumTxChannels() const
Get the number of transmit channels for the DAL instance.
Audinate::DAL::InstanceConfig::setPeriodsPerBuffer
void setPeriodsPerBuffer(unsigned int periodsPerBuffer)
Set the number of periods to be stored in each channel buffer.
Audinate::DAL::InstanceConfig::setTxChannelName
void setTxChannelName(unsigned int txChannelIndex, const std::string &name)
Set the default name for the given transmit (tx) channel.
Audinate::DAL::InstanceConfig::getSamplesPerPeriod
unsigned int getSamplesPerPeriod() const
Get the number of samples between audio period events.
Audinate::DAL::InstanceConfig::getRxChannelName
std::string getRxChannelName(unsigned int rxChannelIndex) const
Get the default name for the given receive (rx) channel.
Audinate::DAL::InstanceConfig::setActivationDirectory
void setActivationDirectory(const std::string &path)
Set the activation directory path for the DAL instance.
Audinate::DAL::InstanceConfig::setManufacturerVersion
void setManufacturerVersion(const Version &manufacturerVersion)
Set the manufacturer product version for the DAL Instance.
Audinate::DAL::InstanceConfig::setTimeSource
void setTimeSource(TimeSource timeSource)
Set the time source for the DAL instance.
Audinate::DAL::InstanceConfig::getAudioPortRange
uint16_t getAudioPortRange() const
Get the audio port range to be used by DAL instance.
Audinate::DAL::InstanceConfig::setModelId
void setModelId(const Id64 &modelId)
Set the model id for the DAL Instance.
Audinate::DAL::InstanceConfig::setNumRxFlows
void setNumRxFlows(unsigned int numRxFlows)
Override the default number of receive flows for the DAL instance.
Audinate::DAL::InstanceConfig::getDefaultName
std::string getDefaultName() const
Get the default device name for the DAL instance.
Audinate::DAL::InstanceConfig::setRxChannelName
void setRxChannelName(unsigned int rxChannelIndex, const std::string &name)
Set the default name for the given receive (rx) channel.
Audinate::DAL::InstanceConfig::getTxChannelName
std::string getTxChannelName(unsigned int txChannelIndex) const
Get the default name for the given tx channel.
Audinate::DAL::InstanceConfig::getManufacturerName
std::string getManufacturerName() const
Get the manufacturer friendly name for the DAL Instance.
Audinate::DAL::InstanceConfig::setManufacturerName
void setManufacturerName(const std::string &manufacturerName)
Set the manufacturer friendly name for the DAL Instance.
Audinate::DAL::InstanceConfig::getPerChannelEncodingFile
std::string getPerChannelEncodingFile() const
Get the path to per-channel encoding file used by DAL instance.
Audinate::DAL::InstanceConfig::getNetworkLatency
unsigned int getNetworkLatency() const
Get DAL device network latency.
Audinate::DAL::InstanceConfig::getPeriodsPerBuffer
unsigned int getPeriodsPerBuffer() const
Get the number of periods for each channel buffer.
Audinate::DAL::InstanceConfig::setSamplesPerPeriod
void setSamplesPerPeriod(unsigned int samplesPerPeriod)
Set the number of samples between audio period events.
Audinate::DAL::InstanceConfig::setModelName
void setModelName(const std::string &modelName)
Set the model name for the DAL Instance.
Audinate::DAL::InstanceConfig::getNumRxChannels
unsigned int getNumRxChannels() const
Get the number of receive channels for the DAL instance.
Audinate::DAL::InstanceConfig::setPerChannelEncodingFile
void setPerChannelEncodingFile(const std::string &fileName)
Set per-channel encoding configuration in DAL.