Isomet Modular Synthesiser (iMS) API  v1.4.2
iMS API
Diagnostics.h
Go to the documentation of this file.
1 /*-----------------------------------------------------------------------------
2 / Title : Diagnostics Functions Header
3 / Project : Isomet Modular Synthesiser System
4 /------------------------------------------------------------------------------
5 / File : $URL: http://nutmeg.qytek.lan/svn/sw/trunk/09-Isomet/iMS_SDK/API/Diagnostics/h/Diagnostics.h $
6 / Author : $Author: dave $
7 / Company : Isomet (UK) Ltd
8 / Created : 2015-04-09
9 / Last update: $Date: 2017-09-11 23:55:34 +0100 (Mon, 11 Sep 2017) $
10 / Platform :
11 / Standard : C++11
12 / Revision : $Rev: 300 $
13 /------------------------------------------------------------------------------
14 / Description:
15 /------------------------------------------------------------------------------
16 / Copyright (c) 2015 Isomet (UK) Ltd. All Rights Reserved.
17 /------------------------------------------------------------------------------
18 / Revisions :
19 / Date Version Author Description
20 / 2015-04-09 1.0 dc Created
21 /
22 /----------------------------------------------------------------------------*/
23 
48 
49 #ifndef IMS_DIAGNOSTICS_H__
50 #define IMS_DIAGNOSTICS_H__
51 
52 #include "IMSSystem.h"
53 #include "IEventHandler.h"
54 
55 #include <memory>
56 #include <map>
57 
59 #if defined _WIN32 || defined __CYGWIN__
60  #ifdef __GNUC__
61  #define DLL_EXPORT __attribute__ ((dllexport))
62  #define DLL_IMPORT __attribute__ ((dllimport))
63  #else
64  #define DLL_EXPORT __declspec(dllexport) // Note: actually gcc seems to also supports this syntax.
65  #define DLL_IMPORT __declspec(dllimport) // Note: actually gcc seems to also supports this syntax.
66  #endif
67  #define DLL_LOCAL
68 #else
69  #if __GNUC__ >= 4
70  #define DLL_EXPORT __attribute__ ((visibility ("default")))
71  #define DLL_IMPORT __attribute__ ((visibility ("default")))
72  #define DLL_LOCAL __attribute__ ((visibility ("hidden")))
73  #else
74  #define DLL_EXPORT
75  #define DLL_IMPORT
76  #define DLL_LOCAL
77  #endif
78 #endif
79 
80 #if defined(_EXPORTING_IMS)
81  #define LIBSPEC DLL_EXPORT
82  #define LIBLOCAL DLL_LOCAL
83  #define EXPIMP_TEMPLATE
84 #elif defined(_STATIC_IMS)
85  #define LIBSPEC
86  #define LIBLOCAL
87  #define EXPIMP_TEMPLATE
88 #else
89  #define LIBSPEC DLL_IMPORT
90  #define LIBLOCAL DLL_LOCAL
91  #define EXPIMP_TEMPLATE extern
92 #endif
93 
95 namespace iMS
96 {
106  class LIBSPEC DiagnosticsEvents
107  {
108  public:
110  enum Events {
125  Count
126  };
127  };
128 
136  class LIBSPEC Diagnostics
137  {
138  public:
141 
142  Diagnostics(const IMSSystem& ims);
158  ~Diagnostics();
160 
164  enum class TARGET
165  {
167  SYNTH,
169  AO_DEVICE,
171  RF_AMPLIFIER
172  };
173 
177  enum class MEASURE
178  {
180  FORWARD_POWER_CH1,
182  FORWARD_POWER_CH2,
184  FORWARD_POWER_CH3,
186  FORWARD_POWER_CH4,
188  REFLECTED_POWER_CH1,
190  REFLECTED_POWER_CH2,
192  REFLECTED_POWER_CH3,
194  REFLECTED_POWER_CH4,
196  DC_CURRENT_CH1,
198  DC_CURRENT_CH2,
200  DC_CURRENT_CH3,
202  DC_CURRENT_CH4
203  };
204 
206 
207  void DiagnosticsEventSubscribe(const int message, IEventHandler* handler);
231  void DiagnosticsEventUnsubscribe(const int message, const IEventHandler* handler);
233 
235 
236  bool GetTemperature(const TARGET& tgt) const;
250 
252 
253  bool GetLoggedHours(const TARGET& tgt) const;
265 
267 
268  bool UpdateDiagnostics();
292  const std::map<MEASURE, Percent>& GetDiagnosticsData() const;
294 
295  private:
296  // Make this object non-copyable
297  Diagnostics(const Diagnostics &);
298  const Diagnostics &operator =(const Diagnostics &);
299 
300  // Declare Implementation
301  class Impl;
302  Impl * p_Impl;
303  };
304 
305 }
306 
307 #undef EXPIMP_TEMPLATE
308 #undef LIBSPEC
309 #endif
Returns the number of hours logged by the Acousto-Optic Device while powered up.
Definition: Diagnostics.h:118
Returns the number of hours logged by the Synthesiser while powered up.
Definition: Diagnostics.h:116
Indicates to the application that an update of diagnostics data is available to be read...
Definition: Diagnostics.h:122
Interface Class for User Application code to receive and process events from the iMS library...
Received a temperature update from the RF Power Amplifier.
Definition: Diagnostics.h:114
An object representing the overall configuration of an attached iMS System and permits applications t...
Definition: IMSSystem.h:361
The entire API is encapsulated by the iMS namespace.
Definition: Auxiliary.h:95
Classes within this group are used to store information about an iMS System and to Connect / Disconne...
All the different types of events that can be triggered by the Diagnostics class. ...
Definition: Diagnostics.h:106
Provides a mechanism for retrieving diagnostics data about the attached iMS System.
Definition: Diagnostics.h:136
Indicates that the update that was requested has failed to respond with updated results.
Definition: Diagnostics.h:124
Events
List of Events raised by the Diagnostics module.
Definition: Diagnostics.h:110
Interface Class for an Event Handler to be defined in User Code and subscribed to library events...
Definition: IEventHandler.h:146
Received a temperature update from the Acousto-Optic device.
Definition: Diagnostics.h:112
MEASURE
Selects which diagnostics measurement to access.
Definition: Diagnostics.h:177
Returns the number of hours logged by the RF Power Amplifier while powered up.
Definition: Diagnostics.h:120
TARGET
Sets which iMS device to request diagnostics data for.
Definition: Diagnostics.h:164