I recently because the need, useful to the headless signal hound API
His Library and DLL are produced by vc + + 2008, I have to use vc + + 2008 tried
Can the normal use, but because of only using BCB 6, so a simple call to action is always wrong,
Hope to have experience greatly can advise
I also used the lib and DLL implib way but will appear the following error messages: always open files.
I am confirm my path is right
Here are the API header file
MySignalhound. H
Revision History (Windows) :
12 JAN 2012, Mr Crooks Created from Signal Hound code, Removed the Windows dependencies.
19 APR 2012, Mr Crooks Added AD9864 recalibration support and cleaned up a bit
*/
H # include "Settings."
# include "MeasRcvr. H"
//0 for OK, 1 for no Signal Hound, 2 for couldn 't open Signal Hound ports, 98 for no tempco file, 99 for no CAL data
# define ERROR_HOUND_MISSING 1
# define ERROR_HOUND_PORTS 2
# define ERROR_HOUND_TEMPCOFILE 98
# define ERROR_HOUND_CALFILE 99
# pragma once
__declspec (dllimport) double mW2dBm (double mWIn);//a Simple function to convert a reading in milliwatts to a reading in dBm.
__declspec (dllimport) double GetRBWFromIndex (int independence idx);//Returns RBW in Hz
The class CMySignalHound
{
Public:
__declspec (dllimport) CMySignalHound (void);
__declspec (dllimport) ~ CMySignalHound (void);
__declspec (dllimport) int the Initialize (void);
//* * * * * Sweep functions provides * * * * *
__declspec (dllimport) int SetupForSweep (void);
__declspec (dllimport) int PreamplifierOnOff (bool onoff);
__declspec (dllimport) int SetCenterAndSpan (double cf, double span);
__declspec (dllimport) int SetStartAndStop (double start, double stop);
__declspec (dllimport) int DoSweep ();
__declspec (dllimport) double GetFrequencyFromIdx (int independence idx);
__declspec (dllimport) int SetExternalRef ();
//* * * * * the Channel power functions provides * * * * *
__declspec (dllimport) double GetACPL ();
__declspec (dllimport) double GetACPR ();
__declspec (dllimport) double GetCP ();
//* * * * * Special Purpose functions provides * * * * *
__declspec (dllimport) int DoPhaseNoiseSweep (int startDecade, int stopDecade, double referenceAmplitude);
__declspec (dllimport) double ReadTemperature ();
__declspec (dllimport) int DoMeasuringReceiver (MEAS_RCVR_STRUCT * pMeasRcvr);
__declspec (dllimport) void * OpenAudio ();
__declspec (dllimport) void CloseAudio pAudioStr (void *);
Protected://Functions provides for internal use only.
Int SetBestClock (void);
Int GetBestSensitivity (void);
Int GetMaxFFTPowerFromRBW (double RBW);
Int GetMinFFTPowerFromRBW (double RBW);
Bool ForceFastSweep (double span, int swptmsetpt);
Int CheckRBWVBW (void);
Double m_lastCal9864Temp;//Variable for internal use only
Public:
CSettings m_settings;
Double * pDataMin;
Double * pDataMax;
Double m_channelBW;
Double m_channelSpacing;
Int m_BBSPSetpt;
Int m_serialNumber;
Double m_HzPerPt;
Int m_traceSize;
Int m_SubTraceSize;
};
Settings. H
# pragma once
# define MAX_FREQ 4.4 e9
//Modes for Zero Span (m_ZSMode)
# define HOUND_ZS_MODE_AMPLITUDE 0
# define HOUND_ZS_MODE_FREQUENCY 1
# define HOUND_ZS_MODE_PHASE 2
//Modes for the Video Detector Min Max (m_VDMMA)
# define HOUND_VDMMA_MIN_MAX 1
# define HOUND_VDMMA_MIN_ONLY 2
# define HOUND_VDMMA_MAX_ONLY 3
# define HOUND_VDMMA_AVERAGE_ONLY 4
//Modes for Video Detector Processing (m_VDMode)
# define HOUND_PROCESS_AS_POWER 1
# define HOUND_PROCESS_AS_VOLTAGE 2
# define HOUND_PROCESS_AS_LOG 3
# define HOUND_PROCESS_BYPASSED 4
//Sweep Modes (m_sweepMode)
# define HOUND_SWEEP_MODE_SLOW_SWEEP 0
# define HOUND_SWEEP_MODE_FAST_SWEEP 1
# define HOUND_SWEEP_MODE_RBW_5MHz 2
# define HOUND_SWEEP_MODE_ZERO_SPAN 3
# define HOUND_SWEEP_MODE_TRACK_GEN 5
# define HOUND_SWEEP_MODE_PHASE_NOISE 7
9 # define HOUND_SWEEP_MODE_BB_SIG_PEAK
//ZERO SPAN "IF Bandwidth" (m_RBWSetpoint) in the when m_sweepMode=HOUND_SWEEP_MODE_ZERO_SPAN
# define HOUND_IFBW_240kHz 1
# define HOUND_IFBW_120kHz 2
# define HOUND_IFBW_60kHz 4
# define HOUND_IFBW_30kHz 8
# define HOUND_IFBW_15kHz 16
The class CSettings
{
Public:
CSettings (void);
~ CSettings (void);
Double m_startFreq;//Values in Hz. Start, stop, the center and span must all be valid before beginning sweep
Double m_stopFreq;//Use the
Double m_centerFreq;
Double m_spanFreq;
Double m_stepFreq;//the Default 1 MHz step (IGNORED IN API)
Double m_stepAmpl;//Amplitude step (IGNORED IN API)
Double m_refLevel;//Ref level in dBm. 2 set gains
Double m_refLevelOffset;//(IGNORED IN API)
Int m_refUnitsmV;//(IGNORED IN API)
Double m_logDbDiv;//(IGNORED IN API)
nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull