Esempio n. 1
0
        unsafe public static void SetLevels()
        {
            VARI_LEVEL_INFO_STRUC vari = new VARI_LEVEL_INFO_STRUC();
            int retval = dpGetDevVariLevelOutInfo(0, &vari);

            if (retval != 0)
            {
                return;
            }

            VARI_LEVEL_VALUE_STRUC val = new VARI_LEVEL_VALUE_STRUC();

            val.dwPort1Level = vari.dwLevelMinus10dBV;
            val.dwPort2Level = vari.dwLevelMinus10dBV;
            val.dwPort3Level = vari.dwLevelMinus10dBV;
            val.dwPort4Level = vari.dwLevelMinus10dBV;
            val.dwPort5Level = vari.dwLevelMinus10dBV;
            val.dwPort6Level = vari.dwLevelMinus10dBV;

            retval = dpSetDevVariLevelOut(0, &val);
            if (retval != 0)
            {
                return;
            }

            retval = dpGetDevVariLevelInInfo(0, &vari);
            if (retval != 0)
            {
                return;
            }

            retval = dpGetDevVariLevelIn(0, &val);
            if (retval != 0)
            {
                return;
            }

            val.dwPort1Level = vari.dwLevelPlus4dBu;
            val.dwPort2Level = vari.dwLevelPlus4dBu;
            //val.dwPort3Level = vari.dwLevelMinus10dBV;
            //val.dwPort4Level = vari.dwLevelMinus10dBV;
            //val.dwPort5Level = vari.dwLevelMinus10dBV;
            //val.dwPort6Level = vari.dwLevelMinus10dBV;

            retval = dpSetDevVariLevelIn(0, &val);
        }
Esempio n. 2
0
 private static unsafe extern int dpSetDevVariLevelOut(
     int iDeviceNum,
     VARI_LEVEL_VALUE_STRUC *pVariLevelOutValues);
Esempio n. 3
0
        public static unsafe void SetLevels()
        {
            VARI_LEVEL_INFO_STRUC vari = new VARI_LEVEL_INFO_STRUC();
            int retval = dpGetDevVariLevelOutInfo(0, &vari);
            if(retval != 0) return;

            VARI_LEVEL_VALUE_STRUC val = new VARI_LEVEL_VALUE_STRUC();
            val.dwPort1Level = vari.dwLevelMinus10dBV;
            val.dwPort2Level = vari.dwLevelMinus10dBV;
            val.dwPort3Level = vari.dwLevelMinus10dBV;
            val.dwPort4Level = vari.dwLevelMinus10dBV;
            val.dwPort5Level = vari.dwLevelMinus10dBV;
            val.dwPort6Level = vari.dwLevelMinus10dBV;

            retval = dpSetDevVariLevelOut(0, &val);
            if(retval != 0) return;

            retval = dpGetDevVariLevelInInfo(0, &vari);
            if(retval != 0) return;

            retval = dpGetDevVariLevelIn(0, &val);
            if(retval != 0) return;

            val.dwPort1Level = vari.dwLevelPlus4dBu;
            val.dwPort2Level = vari.dwLevelPlus4dBu;
            //val.dwPort3Level = vari.dwLevelMinus10dBV;
            //val.dwPort4Level = vari.dwLevelMinus10dBV;
            //val.dwPort5Level = vari.dwLevelMinus10dBV;
            //val.dwPort6Level = vari.dwLevelMinus10dBV;

            retval = dpSetDevVariLevelIn(0, &val);
        }
Esempio n. 4
0
		unsafe private static extern int dpGetDevVariLevelIn(
			int iDeviceNum,
			VARI_LEVEL_VALUE_STRUC *pVariLevelInValues);