Isomet Modular Synthesiser (iMS) API
v1.4.2
iMS API
|
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... | |
Provides auxiliary additional functions not directly related to Synthesiser operation.
|
strong |
|
strong |
|
strong |
|
strong |
Selects the function to be assigned to an LED.
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) |
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.
[in] | ims | A const reference to the iMS System |
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.
[in] | sink | Which LED to target |
[in] | src | the function that the LED should now perform |
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.
[in] | message | Use the AuxiliaryEvents::Event enum to specify an event to subscribe to |
[in] | handler | A function pointer to the user callback function to execute on the event trigger. |
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
[in] | message | Use the AuxiliaryEvents::Event enum to specify an event to unsubscribe from |
[in] | handler | A function pointer to the user callback function that will no longer execute on an event |
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()
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
[in] | prfl | select the profile pin control source |
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.
[in] | select | chooses the profile signal value to provide when driven from software |
[in] | prfl | select 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.
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.
[in] | pct | The percentage value to output where 100% represents full scale analog voltage (typ. 10.0V) |