Isomet Modular Synthesiser (iMS) API  v1.4.2
iMS API
Public Types | List of all members
iMS::Auxiliary Class Reference

Provides auxiliary additional functions not directly related to Synthesiser operation. More...

#include <include\Auxiliary.h>

Public Types

enum  LED_SOURCE : std::uint16_t {
  LED_SOURCE::OFF = 0, LED_SOURCE::ON = 1, LED_SOURCE::PULS = 2, LED_SOURCE::NPULS = 3,
  LED_SOURCE::PIXEL_ACT = 4, LED_SOURCE::CTRL_ACT = 5, LED_SOURCE::COMMS_HEALTHY = 6, LED_SOURCE::COMMS_UNHEALTHY = 7,
  LED_SOURCE::RF_GATE = 8, LED_SOURCE::INTERLOCK = 9, LED_SOURCE::LASER = 10, LED_SOURCE::CHECKSUM = 11,
  LED_SOURCE::OVERTEMP = 12, LED_SOURCE::PLL_LOCK = 13
}
 Selects the function to be assigned to an LED. More...
 
enum  LED_SINK { LED_SINK::GREEN, LED_SINK::YELLOW, LED_SINK::RED }
 Which LED to assign function to. More...
 
enum  DDS_PROFILE : std::uint16_t { DDS_PROFILE::OFF = 0, DDS_PROFILE::EXTERNAL = 16, DDS_PROFILE::HOST = 32 }
 Control Source for Profile input to DDS Synthesiser IC. More...
 
enum  EXT_ANLG_INPUT { EXT_ANLG_INPUT::A, EXT_ANLG_INPUT::B }
 Reference enum for addressing both analog inputs. More...
 

Public Member Functions

Constructor & Destructor
 Auxiliary (const IMSSystem &ims)
 Constructor for Auxiliary Object. More...
 
 ~Auxiliary ()
 Destructor for Auxiliary Object.
 
LEDs
bool AssignLED (const LED_SINK &sink, const LED_SOURCE &src) const
 Assignment function for LEDs. More...
 
DDS Profile Control
bool SetDDSProfile (const DDS_PROFILE &prfl) const
 Control the DDS Profile feature. More...
 
bool SetDDSProfile (const DDS_PROFILE &prfl, const std::uint16_t &select) const
 
External Analog I/O
bool UpdateAnalogIn ()
 Instructs the synthesiser to capture the current value of both the external analog inputs. More...
 
const std::map< EXT_ANLG_INPUT, Percent > & GetAnalogData () const
 Returns the analog measurements read by the conversion triggered by a call to UpdateAnalogIn() More...
 
bool UpdateAnalogOut (Percent &pct) const
 Instructs the synthesiser to update the analog output value provided externally. More...
 
Event Notifications
void AuxiliaryEventSubscribe (const int message, IEventHandler *handler)
 Subscribe a callback function handler to a given AuxiliaryEvents event. More...
 
void AuxiliaryEventUnsubscribe (const int message, const IEventHandler *handler)
 Unsubscribe a callback function handler from a given AuxiliaryEvents event. More...
 

Detailed Description

Provides auxiliary additional functions not directly related to Synthesiser operation.

Author
Dave Cowan
Date
2016-02-18
Since
1.1

Member Enumeration Documentation

enum iMS::Auxiliary::DDS_PROFILE : std::uint16_t
strong

Control Source for Profile input to DDS Synthesiser IC.

Since
1.1
Enumerator
OFF 

Profile Selection disabled (default)

EXTERNAL 

Profile can be controlled from external signal pin inputs.

HOST 

Profile can be controlled from user application software.

Reference enum for addressing both analog inputs.

Since
1.1
Enumerator

Refer to analog input A.

Refer to analog input B.

Which LED to assign function to.

Since
1.1
Enumerator
GREEN 

Synthesiser Green LED.

YELLOW 

Synthesiser Yellow LED.

RED 

Synthesiser Red LED.

enum iMS::Auxiliary::LED_SOURCE : std::uint16_t
strong

Selects the function to be assigned to an LED.

Since
1.1
Enumerator
OFF 

LED turned off.

ON 

LED turned on.

PULS 

LED slowly pulses.

NPULS 

LED slowly pulses with opposite phase to PULS.

PIXEL_ACT 

Illuminates whenever there is activity on the Pixel Interface between Controller and Synthesiser.

CTRL_ACT 

Illuminates whenever serial communications activity is detected.

COMMS_HEALTHY 

Illuminates when communications is in a normal condition.

COMMS_UNHEALTHY 

Illuminates when Communications Healthy state has detected a timeout (no message received within healthy comms window)

RF_GATE 

Illuminates when RF Gate to power amplifier is enabled and interlock is not set.

INTERLOCK 

Illuminates when interlock is active (overtemperature, user disabled or no connection to amplifier/acoust-optic device)

LASER 

Illuminates when external equipment is turned on by user.

CHECKSUM 

Illuminates when a checksum error is detected on the pixel interface between Controller and Synthesiser (remains on until cleared in software)

OVERTEMP 

Illuminates when iMS system is overtemperature or a fan has failed.

PLL_LOCK 

Illuminates when master clock circuit PLL is locked (either to internal TCXO or externally supplied reference)

Constructor & Destructor Documentation

iMS::Auxiliary::Auxiliary ( const IMSSystem ims)

Constructor for Auxiliary Object.

An IMSSystem object, representing the configuration of an iMS target must be passed by const reference to the Auxiliary constructor.

The IMSSystem object must exist before the Auxiliary object, and must remain valid (not destroyed) until the Auxiliary object itself is destroyed.

Once constructed, the object can neither be copied or assigned to another instance.

Parameters
[in]imsA const reference to the iMS System
Since
1.1

Member Function Documentation

bool iMS::Auxiliary::AssignLED ( const LED_SINK sink,
const LED_SOURCE src 
) const

Assignment function for LEDs.

Provide two inputs indicating which LED to target and what function to assign to it.

Parameters
[in]sinkWhich LED to target
[in]srcthe function that the LED should now perform
Returns
true if the assignment request was sent successfully
Since
1.1
void iMS::Auxiliary::AuxiliaryEventSubscribe ( const int  message,
IEventHandler handler 
)

Subscribe a callback function handler to a given AuxiliaryEvents event.

Auxiliary can callback user application code when an event occurs that affects the signal path. Supported events are listed under AuxiliaryEvents. The callback function must inherit from the IEventHandler interface and override its EventAction() method.

Use this member function call to subscribe a callback function to a AuxiliaryEvents event. For the period that a callback is subscribed, each time an event in Auxiliary occurs that would trigger the subscribed AuxiliaryEvents event, the user function callback will be executed.

Parameters
[in]messageUse the AuxiliaryEvents::Event enum to specify an event to subscribe to
[in]handlerA function pointer to the user callback function to execute on the event trigger.
Since
1.1
void iMS::Auxiliary::AuxiliaryEventUnsubscribe ( const int  message,
const IEventHandler handler 
)

Unsubscribe a callback function handler from a given AuxiliaryEvents event.

Removes all links to a user callback function from the Event Trigger map so that any events that occur in the Auxiliary object following the Unsubscribe request will no longer execute that function

Parameters
[in]messageUse the AuxiliaryEvents::Event enum to specify an event to unsubscribe from
[in]handlerA function pointer to the user callback function that will no longer execute on an event
Since
1.1
const std::map<EXT_ANLG_INPUT, Percent>& iMS::Auxiliary::GetAnalogData ( ) const

Returns the analog measurements read by the conversion triggered by a call to UpdateAnalogIn()

Returns
a std::map containing one entry for each analog input to the Synthesiser. The value associated with each entry in the map is returned as a percentage object where 100% represents the full scale analog voltage (typically 10.0V)
Since
1.1
bool iMS::Auxiliary::SetDDSProfile ( const DDS_PROFILE prfl) const

Control the DDS Profile feature.

The DDS IC used at the heart of the Synthesiser has a 4-wide signal input that can be used for modulation (FSK, PSK, ASK), to start/stop the sweep accumulators or used to ramp up/ramp down the output amplitude. By default, the feature is disabled but this function can be used to set the control source for the profile signal either to external for hardware selection or to host for software selection

Parameters
[in]prflselect the profile pin control source
Returns
true if the profile control soruce request was sent successfully
bool iMS::Auxiliary::SetDDSProfile ( const DDS_PROFILE prfl,
const std::uint16_t &  select 
) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
[in]selectchooses the profile signal value to provide when driven from software
[in]prflselect the profile pin control source
bool iMS::Auxiliary::UpdateAnalogIn ( )

Instructs the synthesiser to capture the current value of both the external analog inputs.

There are 2 external analog input sources which can provide an auxiliary measurement of external signal data to user software for example to monitor environmental data.

Call this function to initiate a measurement conversion. Once completed, the results will be returned to user code by a callback with Event EXT_ANLG_UPDATE_AVAILABLE. The callback handler can then read the conversion results from the GetAnalogData() function.

Returns
true if the conversion request was sent successfully.
Since
1.1
bool iMS::Auxiliary::UpdateAnalogOut ( Percent pct) const

Instructs the synthesiser to update the analog output value provided externally.

There is a single channel of analog output data which may provide an auxiliary analog signal to the external signal for example to indicate some internal system parameter state.

Parameters
[in]pctThe percentage value to output where 100% represents full scale analog voltage (typ. 10.0V)
Returns
true if the update request was sent successfully

The documentation for this class was generated from the following file: