public static int CompressdData(uint ascanNum, uint ascanPort, AscanCompressedActive active) { int error_code; uint attr = DaqAttrType.ascanVideo.CompressedData; uint val = (uint)active; if (ascanNum < ascanNumMin || ascanNum > ascanNumMax) { error_code = -1; return(error_code); } error_code = DAQ.daqSet(ascanNum, ascanPort, attr, val); if (error_code != (int)PDAQ_ERR.GOOD) { MessageShow.show("Error:Set Compressed Data failed", "错误:设置Ascan Compressed Data失败"); } return(error_code); }
public static int CompressdData(uint ascanNum, uint port, ref AscanCompressedActive active) { int error_code; uint attr = DaqAttrType.ascanVideo.CompressedData; uint val = 0; if (ascanNum < ascanNumMin || ascanNum > ascanNumMax) { error_code = -1; return(error_code); } error_code = DAQ.daqGet(ascanNum, port, attr, ref val); if (error_code != (int)PDAQ_ERR.GOOD) { MessageShow.show("Error:Get Compressed Data failed", "错误:获得Ascan Compressed Data失败"); } active = (AscanCompressedActive)val; return(error_code); }