コード例 #1
0
        internal unsafe ConcreteToolResultUpdatedEventArgs(VsaRunningInfo *runninfInfo)
        {
            uint dwDetectTime    = runninfInfo->dwDetectTime;
            uint dwBankTriggerNo = runninfInfo->dwBankTriggerNo;
            bool flag            = runninfInfo->byDetectOk == (byte)1;

            SensorSetting *[] sensorSettings = ConcreteToolResultUpdatedEventArgs.GetSensorSettings(runninfInfo);
            SensorResult *[]  sensorResults  = ConcreteToolResultUpdatedEventArgs.GetSensorResults(runninfInfo);
            this._toolResults = new ToolResultBase[17];
            for (int index = 0; index < sensorResults.Length; ++index)
            {
                this._toolResults[index] = (ToolResultBase)ToolKindBase.Create(sensorResults[index], sensorSettings[index]);
            }
            this.ProcessingTimeMicroSec = dwDetectTime;
            this.TotalStatusResult      = flag;
            this.TriggerCount           = dwBankTriggerNo;
            this.PositionAdjust         = this._toolResults[0];
        }
コード例 #2
0
 internal unsafe ProgramSetting(IProgramNo programNumber, ReplyForGetBankSetting *reply)
 {
     this.Error                 = (SensorError) new ConcreteSensorError((ErrI)reply->header.wErrorId);
     this._programNo            = programNumber.No;
     this._externalTrigger      = reply->bankSetting.sBankSettingCommon.sTriggerSetting.byExternalTrigger != (byte)0;
     this._triggerCycleMilliSec = reply->bankSetting.sBankSettingCommon.sTriggerSetting.wInternalyCycleTime;
     this._programName          = StringConverter.StringFromUnicode(reply->bankSetting.sBankSettingCommon.sBankName.awcBankName, 16);
     this._monochromeMaster     = new byte[76800];
     this._colorMaster          = new short[76800];
     Marshal.Copy((IntPtr)((void *)reply->bankSetting.sBankSettingCommon.sMasterImage.sMasterImageSet.uMono.abyImageBuffer), this._monochromeMaster, 0, 76800);
     Marshal.Copy((IntPtr)((void *)reply->bankSetting.sBankSettingCommon.sMasterImage.sMasterImageSet.uColor.awImageBuffer), this._colorMaster, 0, 76800);
     BankSettingVsa *[] bankSettingVsaPtrArray = new BankSettingVsa *[17]
     {
         &reply->bankSetting.asBankSettingVsa0,
         &reply->bankSetting.asBankSettingVsa1,
         &reply->bankSetting.asBankSettingVsa2,
         &reply->bankSetting.asBankSettingVsa3,
         &reply->bankSetting.asBankSettingVsa4,
         &reply->bankSetting.asBankSettingVsa5,
         &reply->bankSetting.asBankSettingVsa6,
         &reply->bankSetting.asBankSettingVsa7,
         &reply->bankSetting.asBankSettingVsa8,
         &reply->bankSetting.asBankSettingVsa9,
         &reply->bankSetting.asBankSettingVsa10,
         &reply->bankSetting.asBankSettingVsa11,
         &reply->bankSetting.asBankSettingVsa12,
         &reply->bankSetting.asBankSettingVsa13,
         &reply->bankSetting.asBankSettingVsa14,
         &reply->bankSetting.asBankSettingVsa15,
         &reply->bankSetting.asBankSettingVsa16
     };
     for (int index = 0; index < 17; ++index)
     {
         this._sensorSettings[index] = ToolKindBase.Create(bankSettingVsaPtrArray[index]);
     }
 }