示例#1
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);
        }
示例#2
0
 private static unsafe extern int dpGetDevVariLevelOutInfo(
     int iDeviceNum,
     VARI_LEVEL_INFO_STRUC *pVariLevelOutInfo);
示例#3
0
 unsafe private static extern int dpGetDevVariLevelInInfo(
     int ideviceNum,
     VARI_LEVEL_INFO_STRUC* pVariLevelInInfo);