/*
*= CMU (UNIVERSAL RADIO COMMUNICATION TESTER VISA) =========================
* LabWindows/CVI 5.0 Instrument Driver
* Original Release : June, 1999
*
* By : ROHDE & SCHWARZ FRANCE
* CONTACTS :
*
* Fran�ois Ribiere
* Telephone : 00 33 1 41 36 10 83
* Fax : 00 33 1 41 36 11 10
* e-Mail : Francois.Ribiere@rsf.rohde-schwarz.com
*
* Rohde & Schwarz France
* Parc Tertiaire de Meudon
* 9-11, rue Jeanne Braconnier
* 92366 Meudon-la-Foret Cedex
*
* Version : V5.00.7, 11/2010
*
* Modification History:
* see ChangeLog
*===========================================================================*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <ctype.h>
#include <stdarg.h>
#include <visa.h>
#include "rscmuk2g.h"
#include <rscmu200.h>
/*****************************************************************************/
/*= DEFINES =================================================================*/
/*****************************************************************************/
/*---------------------------------------------------------------------------*/
/* Instrument driver revision:
/*---------------------------------------------------------------------------*/
#define RSCMU_K2G_VERSION "5.0.7" // Instrument driver version string
#define RSCMU_K2G_CREATIONDATE "11/2010" // Instrument driver creation month/year
#define RSCMU_K2G_CVIVERSION "9.0" // Used Labwindows/CVI-version
#define RSCMU_K2G_REVISION "Rev " RSCMU_K2G_VERSION", "RSCMU_K2G_CREATIONDATE", CVI "RSCMU_K2G_CVIVERSION // Instrument driver revision
/*****************************************************************************/
/*= INSTRUMENT-DEPENDENT COMMAND ARRAYS======================================*/
/*****************************************************************************/
static ViString mode_On_Off[] = {"OFF","ON",VI_NULL}; // Common for every
static ViString mode_low_upp[] = {":LOW",":UPP",VI_NULL};
static ViString mode_ScopeMeas [] = {"SCAL","ARR",VI_NULL};
static ViString StrRepetition[] = {"CONT","SING",VI_NULL};
static ViString StrStopCondition[] = {"NONE","SON",VI_NULL};
static ViString StrStepMode[] = {"NONE","STEP",VI_NULL};
//static ViString StrMode[] = {"OFF","SRQ","SOPC","SRSQ",VI_NULL};
static ViString StrStatistics[] = {"ALL","ARIT","MIN","MAX","IVAL",VI_NULL};
static ViString StrModulation[] = {"",":GMSK",":EPSK",VI_NULL};
static ViString StrCommand[] = {"CONF","INIT","ABOR","STOP","CONT","READ","FETC","SAMP","CALC",VI_NULL};
static ViString StrObject[] = {":POW",":MOD",":SPEC",":SPOW",":WPOW",":SPEC:MOD",":SPEC:SWIT",":POW:MPR",":POW:SLOT",
":POW:XSL",":POW:FRAM",":POW:PCL",":MOD:XPER",":MOD:OVER",":MOD:EVM",":MOD:PERR",
":MOD:MERR", ":POW:ABUR",":POW:MSL",":NPOW",":NPOW",":SPECtrum:MSWitching",VI_NULL};
static ViString StrStatMode[] = {"CURR","AVER","MAX","MIN",VI_NULL};
static ViString StrEventReporting[] = {"OFF","SRQ","SOPC","SRSQ",VI_NULL};
static ViString recoveryArr[] = {"NON","TSC",VI_NULL};
static ViString offTemplateArr[] = {"RMAX","RSL",VI_NULL};
static ViString subchannelArr[] = {"SC0","SC1",VI_NULL};
static ViString bandArr[] = {"G450","G480","G700","G850","G900PGSM","G900EGSM","G900RGSM","G1800",
"G1900","GGT800","UFDD","U384TDD","U128TDD","C2000",VI_NULL};
static ViString repetitionArr[] = {"CONT","SING","MULT",VI_NULL};
static ViString stopConditionArr[] = {"NONE","SON",VI_NULL};
static ViString stepModeArr[] = {"NONE","STEP",VI_NULL};
static ViString measurementStatusArr[] = {"OFF","RUN","STOP","ERR","STEP","RDY",VI_NULL};
static ViString burstTypeArr[] = {"SCH","FCH","S6D","DALL","FS5D",VI_NULL};
static ViString powerLevelArr[] = {"LLIS","RLEV","PLEV1","PLEV2","PLEV3","PLEV4","PLEV5","PLEV6",VI_NULL};
static ViString searchLevelArr[] = {"LLR","MCR",VI_NULL};
static ViString wstrModeArr[] = {"OFF","MAST","SLAV",VI_NULL};
static ViString negPosArr[] = {"NEG","POS", VI_NULL};
static ViString fillingSigTypeArr[] = {"DBUR","PRBS",VI_NULL};
static ViString epcUplinkContArr[] = {"SACCH","EPCCH",VI_NULL};
static ViString driftStepSizeArr[] = {"0","-1","+1",VI_NULL};
static ViString generationArr[] = {"GSM","WCDM",VI_NULL};
static ViString quadrantArr[] = {"RSCP","ECNO",VI_NULL};
static ViString rxqRdsStatusArr[] = {"INV","PASS","FAIL","TLOW","IMP", VI_NULL};
static ViString enaDisaArr[] = {"DISA","ENAB",VI_NULL};
static ViString confProcArr[] = {"CONF","PROC", VI_NULL};
static ViString codecModeList[] = {"","CM1","CM2","CM3","CM4", VI_NULL};
static ViString netwProcModeArr[] = {"FAST","REL", VI_NULL};
static ViString netwSmsContentArr[] = {"INT","FILE", VI_NULL};
static ViString reloadStatusArr[] = {"FAIL","OK", VI_NULL};
static ViString netwCMIPhaseArr[] = {"ODD","EVEN", VI_NULL};
static ViString netwRateReconfigArr[] = {"RATSCCH","CMM", VI_NULL};
static ViString netwTrafModeHandArr[] = {"SOURCE","DEST", VI_NULL};
static ViString aburstDetectTimeoutArr[] = {"20","60","120", VI_NULL};
static ViString repeatedDownlinkSACCHArr[] = {"DISA","ENAB","SRR", VI_NULL};
static ViString rxcLevelModeArr[] = {"LLIS","IFL", VI_NULL};
static ViString netwSmsMsgClassArr[] = {"NONE","C0","C1","C2","C3", VI_NULL};
static ViString CTMTextTelephonyArr[] = {"NSUP","SUP", "NAN", VI_NULL};
// Structure "RSCMU_GSM_Sig_Globals" is initialized for each Session in an 'init' function
struct RSCMU_GSM_Sig_Globals
{
struct RSCMU_SESSION_Globals RSCMU_tGlobal;
struct RSCMU_HandOver RSCMU_tHandOver;
ViInt32 RSCMU_SigChannelConf;
};
// Structure "RSCMU_GSM_NSig_Globals" is initialized for each Session in an 'init' function
struct RSCMU_GSM_NSig_Globals
{
struct RSCMU_SESSION_Globals RSCMU_tGlobal;
};
/*****************************************************************************/
/*****************************************************************************/
/*========== Local functions ================================================*/
/*****************************************************************************/
/*****************************************************************************/
ViStatus RSCMU_ScanMod (ViChar[100][100], ViInt32, ViInt32, ViReal64*, ViReal64*, ViReal64*, ViReal64*, ViReal64*);
ViStatus RSCMU_ScanModXper (ViChar[100][100], ViInt32, ViInt32, ViReal64*, ViReal64*, ViReal64*, ViReal64*, ViReal64*, ViReal64*, ViReal64*, ViReal64*);
ViStatus RSCMU_ScanModOver (ViChar[100][100], ViInt32, ViInt32, ViReal64*, ViReal64*, ViReal64*, ViReal64*, ViReal64*, ViReal64*, ViReal64*, ViReal64*, ViReal64*, ViReal64*, ViReal64*, ViReal64*, ViReal64*, ViReal64*);
ViStatus RSCMU_ScanModOverV307 (ViChar[100][100], ViInt32, ViInt32, ViReal64*, ViReal64*, ViReal64*, ViReal64*, ViReal64*, ViReal64*, ViReal64*, ViReal64*, ViReal64*, ViReal64*, ViReal64*, ViReal64*, ViReal64*, ViReal64*);
ViStatus RSCMU_ScanModOverV423 (ViChar[100][100], ViInt32, ViInt32, ViReal64*, ViReal64*, ViReal64*, ViReal64*, ViReal64*, ViReal64*, ViReal64*, ViReal64*, ViReal64*, ViReal64*, ViReal64*, ViReal64*, ViReal64*, ViReal64*);
ViStatus RSCMU_ScanModEvm (ViChar[100][100], ViInt32, ViInt32, ViReal64*, ViReal64*, ViReal64*, ViReal64*, ViReal64*, ViReal64*, ViReal64*, ViReal64*);
ViStatus RSCMU_ScanModEvmV307 (ViChar[100][100], ViInt32, ViInt32, ViReal64*, ViReal64*, ViReal64*, ViReal64*, ViReal64*, ViReal64*, ViReal64*, ViReal64*);
ViStatus RSCMU_ScanModEvmV423 (ViChar[100][100], ViInt32, ViInt32, ViReal64*, ViReal64*, ViReal64*, ViReal64*, ViReal64*, ViReal64*, ViReal64*, ViReal64*);
ViStatus RSCMU_EDGE_ScanModPerr (ViChar[100][100], ViInt32, ViInt32, ViReal64*, ViReal64*, ViReal64*, ViReal64*, ViReal64*, ViReal64*, ViReal64*, ViReal64*);
ViStatus