36 #ifndef IMS_IMSTYPEDEFS_H__
37 #define IMS_IMSTYPEDEFS_H__
45 #if defined _WIN32 || defined __CYGWIN__
47 #define DLL_EXPORT __attribute__ ((dllexport))
48 #define DLL_IMPORT __attribute__ ((dllimport))
50 #define DLL_EXPORT __declspec(dllexport) // Note: actually gcc seems to also supports this syntax.
51 #define DLL_IMPORT __declspec(dllimport) // Note: actually gcc seems to also supports this syntax.
56 #define DLL_EXPORT __attribute__ ((visibility ("default")))
57 #define DLL_IMPORT __attribute__ ((visibility ("default")))
58 #define DLL_LOCAL __attribute__ ((visibility ("hidden")))
66 #if defined(_EXPORTING_IMS)
67 #define LIBSPEC DLL_EXPORT
68 #define LIBLOCAL DLL_LOCAL
69 #define EXPIMP_TEMPLATE
70 #elif defined(_STATIC_IMS)
73 #define EXPIMP_TEMPLATE
75 #define LIBSPEC DLL_IMPORT
76 #define LIBLOCAL DLL_LOCAL
77 #define EXPIMP_TEMPLATE extern
130 operator double()
const {
return value; }
136 static unsigned int RenderAsPointRate(
const IMSSystem&,
const Frequency,
const bool PrescalerDisable =
false);
163 kHz& operator = (
double arg) {
164 value = 1000.0 * arg;
179 operator double()
const {
return (value / 1000.0); }
206 MHz& operator = (
double arg) {
207 value = 1000000.0 * arg;
222 operator double()
const {
return (value / 1000000.0); }
228 static unsigned int RenderAsImagePoint(
const IMSSystem&,
const MHz);
254 if (arg < 0.0) value = 0.0;
255 if (arg > 100.0) value = 100.0;
273 if (arg < 0.0) value = 0.0;
274 else if (arg > 100.0) value = 100.0;
281 operator double()
const {
return value; }
293 static unsigned int RenderAsCompensationPoint(
const IMSSystem&,
const Percent);
301 static unsigned int RenderAsCalibrationTone(
const IMSSystem&,
const Percent);
324 value = std::fmod(arg, 360.0);
346 value = std::fmod(arg, 360.0);
352 operator double()
const {
return value; }
364 static unsigned int RenderAsCompensationPoint(
const IMSSystem&,
const Degrees);
372 static unsigned int RenderAsCalibrationTone(
const IMSSystem&,
const Degrees);
397 FAP() : freq(0.0), ampl(0.0), phase(0.0) {};
399 FAP(
double f,
double a,
double p) : freq(f), ampl(a), phase(p) {};
405 bool operator==(
const FAP &other)
const;
409 bool operator!=(
const FAP &other)
const;
440 if (arg < 1 || arg > 4) {
442 throw std::invalid_argument(
"Invalid RF Channel Number");
456 if (arg < 1 || arg > 4) {
458 throw std::invalid_argument(
"Invalid RF Channel Number");
469 if (value<4) value++;
473 RFChannel operator++(
int) {
474 RFChannel temp = *
this;
479 RFChannel& operator--() {
480 if (value>1) value--;
484 RFChannel operator--(
int) {
485 RFChannel temp = *
this;
493 operator int()
const {
return value; }
498 #undef EXPIMP_TEMPLATE
FAP(double f, double a, double p)
Construct a FAP object from raw double precision input data.
Definition: IMSTypeDefs.h:399
RFChannel()
Default construct an RF Channel object initialised to the first RF Channel.
Definition: IMSTypeDefs.h:431
FAP(MHz f, Percent a, Degrees p)
Construct a FAP object from pre-existing MHz, Percent and Degrees objects.
Definition: IMSTypeDefs.h:401
Type Definition for all operations that require an angle specification in degrees.
Definition: IMSTypeDefs.h:314
Percent ampl
The RF Channel Output Amplitude.
Definition: IMSTypeDefs.h:392
kHz(double arg)
Construct a kHz object from a double argument representing kiloHertz.
Definition: IMSTypeDefs.h:153
Percent(double arg)
Construct a Percent object from a double argument and check its value is within the range 0...
Definition: IMSTypeDefs.h:253
RFChannel(int arg)
Construct an RF Channel object and check that it is being created with an integer value within the ra...
Definition: IMSTypeDefs.h:439
MHz(double arg)
Construct a MHz object from a double argument representing MegaHertz.
Definition: IMSTypeDefs.h:196
Percent()
Default Constructor assigns 0.0%.
Definition: IMSTypeDefs.h:247
An object representing the overall configuration of an attached iMS System and permits applications t...
Definition: IMSSystem.h:361
FAP (Frequency/Amplitude/Phase) triad stores the instantaneous definition of a single RF output...
Definition: IMSTypeDefs.h:387
The entire API is encapsulated by the iMS namespace.
Definition: Auxiliary.h:95
Type that represents the integer values 1, 2, 3 and 4, one each for the RF Channels of an iMS Synthes...
Definition: IMSTypeDefs.h:425
MHz freq
The RF Channel Output Frequency.
Definition: IMSTypeDefs.h:390
Type Definition for all operations that require a percentage specification.
Definition: IMSTypeDefs.h:241
Type Definition for all operations that require a frequency specification in MegaHertz.
Definition: IMSTypeDefs.h:191
FAP()
Default construct a FAP object with zero data.
Definition: IMSTypeDefs.h:397
Degrees(double arg)
Construct a Degrees object from a double argument and check its value is within the range 0...
Definition: IMSTypeDefs.h:323
Type Definition for all operations that require a frequency specification in kiloHertz.
Definition: IMSTypeDefs.h:148
Frequency(double arg=0.0)
Construct a Frequency object from a double argument representing Hertz.
Definition: IMSTypeDefs.h:104
Degrees phase
The RF Channel Output Phase.
Definition: IMSTypeDefs.h:394
Type Definition for all operations that require a frequency specification.
Definition: IMSTypeDefs.h:96