public PDescription(PDescription other) : this(PapillonPINVOKE.new_PDescription__SWIG_3(PDescription.getCPtr(other)), true) { if (PapillonPINVOKE.SWIGPendingException.Pending) { throw PapillonPINVOKE.SWIGPendingException.Retrieve(); } }
/// <summary> /// Найти номер параметра на сервере данных, который необходимо обновить /// </summary> /// <param name="t_number">Номер параметра</param> /// <returns>Номер параметра который нужно обновить на сервере данных</returns> protected int NumberTechOnDev(int t_number) { try { if (t_number != -1) { foreach (Parameter parameter in parameters) { PDescription channel = parameter.Channel; if (channel != null && channel.Number == t_number) { //if (channel.Type == DeviceManager.FormulaType.Capture) { return(channel.Number); } } } } return(-1); } catch (Exception ex) { ErrorHandler.WriteToLog(this, new ErrorArgs(ex.Message, ErrorType.NotFatal)); } return(-1); }
/// <summary> /// Передать данные серверу данных данные АСУ /// </summary> protected void UpdateDevManData() { try { Parameter[] updated = { commutator.Speed_1, commutator.Speed_2, commutator.Speed_rotor, commutator.Torque_rotor, commutator.Wedges_state, commutator.Force, commutator.Diameter_1, commutator.Diameter_2, commutator.CodeButton }; if (updated != null) { foreach (Parameter p_updated in updated) { if (p_updated != null) { PDescription channel = p_updated.Channel; if (channel != null) { DevManClient.UpdateParameter(channel.Number, p_updated.CurrentValue); } } } } } catch { } }
/// <summary> /// загружаемся /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void ParameterCheckerForm_Load(object sender, EventArgs e) { try { if (_app != null) { Parameter[] parameters = _app.Commutator.Parameters; if (parameters != null) { foreach (Parameter parameter in parameters) { if (parameter.Description != "-----" && parameter.Name != "Параметр не определен") { PDescription param = parameter.Channel; if (param.Type != DeviceManager.FormulaType.Capture) { InsertToList(parameter); } } } } } timer1_Tick(timer1, EventArgs.Empty); timer1.Start(); } catch { } }
public PResult EnrollFromImage(string imageFilename, PDescription description, string subjectName) { PResult ret = new PResult(PapillonPINVOKE.PEnrollment_EnrollFromImage__SWIG_4(swigCPtr, imageFilename, PDescription.getCPtr(description), subjectName), true); if (PapillonPINVOKE.SWIGPendingException.Pending) { throw PapillonPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public PResult Describe(PDetection example, string name, PGuid identityId, PDescription description) { PResult ret = new PResult(PapillonPINVOKE.PDescriber_Describe__SWIG_1(swigCPtr, PDetection.getCPtr(example), name, PGuid.getCPtr(identityId), PDescription.getCPtr(description)), true); if (PapillonPINVOKE.SWIGPendingException.Pending) { throw PapillonPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public PResult Describe(PExampleSet exampleSet, PDescription outputDescription) { PResult ret = new PResult(PapillonPINVOKE.PDescriber_Describe__SWIG_0(swigCPtr, PExampleSet.getCPtr(exampleSet), PDescription.getCPtr(outputDescription)), true); if (PapillonPINVOKE.SWIGPendingException.Pending) { throw PapillonPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public PResult ReadObjectDescription(PDescription t) { PResult ret = new PResult(PapillonPINVOKE.PMemoryStream_ReadObjectDescription(swigCPtr, PDescription.getCPtr(t)), true); if (PapillonPINVOKE.SWIGPendingException.Pending) { throw PapillonPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public PResult AddDescription(PDescription description) { PResult ret = new PResult(PapillonPINVOKE.PDescription_AddDescription(swigCPtr, PDescription.getCPtr(description)), true); if (PapillonPINVOKE.SWIGPendingException.Pending) { throw PapillonPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public virtual PResult Apply(PExampleSet exampleSet, PDescription outputDescription) { PResult ret = new PResult(PapillonPINVOKE.PDescriberInterface_Apply(swigCPtr, PExampleSet.getCPtr(exampleSet), PDescription.getCPtr(outputDescription)), true); if (PapillonPINVOKE.SWIGPendingException.Pending) { throw PapillonPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public static PResult WriteToFile(string filename, PDescription arg1, ESerialisationFormat format) { PResult ret = new PResult(PapillonPINVOKE.PFileIO_WriteToFile__SWIG_2(filename, PDescription.getCPtr(arg1), (int)format), true); if (PapillonPINVOKE.SWIGPendingException.Pending) { throw PapillonPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public static PResult ReadFromFile(string filename, PDescription arg1) { PResult ret = new PResult(PapillonPINVOKE.PFileIO_ReadFromFile__SWIG_3(filename, PDescription.getCPtr(arg1)), true); if (PapillonPINVOKE.SWIGPendingException.Pending) { throw PapillonPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public PResult EnrollFromVideo(string videoFilename, PDescription description) { PResult ret = new PResult(PapillonPINVOKE.PEnrollment_EnrollFromVideo__SWIG_4(swigCPtr, videoFilename, PDescription.getCPtr(description)), true); if (PapillonPINVOKE.SWIGPendingException.Pending) { throw PapillonPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public PResult EnrollFromVideo(string videoFilename, PDescription description, int maxFrames, int maxExamples, string subjectName) { PResult ret = new PResult(PapillonPINVOKE.PEnrollment_EnrollFromVideo__SWIG_1(swigCPtr, videoFilename, PDescription.getCPtr(description), maxFrames, maxExamples, subjectName), true); if (PapillonPINVOKE.SWIGPendingException.Pending) { throw PapillonPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public PResult EnrollFromVideoStream(PInputVideoStream ivs, PDescription description, int maxFrames, int maxExamples, PGuid subjectId, string subjectName) { PResult ret = new PResult(PapillonPINVOKE.PEnrollment_EnrollFromVideoStream__SWIG_1(swigCPtr, PInputVideoStream.getCPtr(ivs), PDescription.getCPtr(description), maxFrames, maxExamples, PGuid.getCPtr(subjectId), subjectName), true); if (PapillonPINVOKE.SWIGPendingException.Pending) { throw PapillonPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public PResult EnrollFromImages(string path, PDescription description) { PResult ret = new PResult(PapillonPINVOKE.PEnrollment_EnrollFromImages__SWIG_3(swigCPtr, path, PDescription.getCPtr(description)), true); if (PapillonPINVOKE.SWIGPendingException.Pending) { throw PapillonPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public static PFaceMetaData FromDescription(PDescription description) { PFaceMetaData ret = new PFaceMetaData(PapillonPINVOKE.PFaceMetaData_FromDescription(PDescription.getCPtr(description)), true); if (PapillonPINVOKE.SWIGPendingException.Pending) { throw PapillonPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public PResult Describe(PDetection detection, PDescription description) { PResult ret = new PResult(PapillonPINVOKE.PDescriber_Describe__SWIG_2(swigCPtr, PDetection.getCPtr(detection), PDescription.getCPtr(description)), true); if (PapillonPINVOKE.SWIGPendingException.Pending) { throw PapillonPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public PResult VerifyFromVideoFile(PDescription description, string videoFilename, PMatchScore matchScore, PDescription outputDescription) { PResult ret = new PResult(PapillonPINVOKE.PVerify_VerifyFromVideoFile__SWIG_2(swigCPtr, PDescription.getCPtr(description), videoFilename, PMatchScore.getCPtr(matchScore), PDescription.getCPtr(outputDescription)), true); if (PapillonPINVOKE.SWIGPendingException.Pending) { throw PapillonPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public PResult VerifyFromDescription(PDescription description1, PDescription description2, PMatchScore matchScore) { PResult ret = new PResult(PapillonPINVOKE.PVerify_VerifyFromDescription(swigCPtr, PDescription.getCPtr(description1), PDescription.getCPtr(description2), PMatchScore.getCPtr(matchScore)), true); if (PapillonPINVOKE.SWIGPendingException.Pending) { throw PapillonPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public PResult EnrollFromImage(PImage image, PDescription description) { PResult ret = new PResult(PapillonPINVOKE.PEnrollment_EnrollFromImage__SWIG_2(swigCPtr, PImage.getCPtr(image), PDescription.getCPtr(description)), true); if (PapillonPINVOKE.SWIGPendingException.Pending) { throw PapillonPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public PResult GetDescription(PGuid objectId, PDescription description) { PResult ret = new PResult(PapillonPINVOKE.PWatchlist_GetDescription(swigCPtr, PGuid.getCPtr(objectId), PDescription.getCPtr(description)), true); if (PapillonPINVOKE.SWIGPendingException.Pending) { throw PapillonPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
/// <summary> /// Выбрать канал для параметра /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void selectChannel_Click(object sender, EventArgs e) { DevManParametersForm frm = new DevManParametersForm(false); if (frm.ShowDialog(this) == DialogResult.OK) { channel = frm.SelectedParameter; textBoxParameterChannelName.Text = channel.Description; } }
public PResult Search(PDescription unknown, PComparer comparer, PWatchlistOptions options, PIdentifyResults results) { PResult ret = new PResult(PapillonPINVOKE.PWatchlist_Search__SWIG_2(swigCPtr, PDescription.getCPtr(unknown), PComparer.getCPtr(comparer), PWatchlistOptions.getCPtr(options), PIdentifyResults.getCPtr(results)), true); if (PapillonPINVOKE.SWIGPendingException.Pending) { throw PapillonPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public PResult Search(PDescription unknown, PComparer compare, PIdentifyResults results, int topN, float threshold) { PResult ret = new PResult(PapillonPINVOKE.PWatchlist_Search__SWIG_1(swigCPtr, PDescription.getCPtr(unknown), PComparer.getCPtr(compare), PIdentifyResults.getCPtr(results), topN, threshold), true); if (PapillonPINVOKE.SWIGPendingException.Pending) { throw PapillonPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public PResult Update(PDescription d) { PResult ret = new PResult(PapillonPINVOKE.PWatchlist_Update(swigCPtr, PDescription.getCPtr(d)), true); if (PapillonPINVOKE.SWIGPendingException.Pending) { throw PapillonPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
/// <summary> /// Получили данные от devMan /// </summary> /// <param name="sender">Источник события</param> /// <param name="e">Параметры события</param> protected void DevManClient_onReceive(object sender, ReceivedEventArgs e) { try { DateTime now = DateTime.Now; TimeDatAacquisition = now; if (now > lastTime) { TimeSpan interval = now - lastTime; if (interval.Ticks > tInterval.Ticks) { lastTime = now; foreach (Parameter parameter in parameters) { PDescription channel = parameter.Channel; if (channel != null) { if (channel.Number >= 0 && channel.Number < e.Slice.Length) { CommutatorParameter.setCurrent(parameter, e.Slice[channel.Number]); e.Slice[channel.Number] = parameter.CalculatedValue; } } } SgtApplication app = SgtApplication.CreateInstance(); if (app != null) { app.Technology.Calculate(this, new CommutatorEventArgs(e.Slice)); if (tech_saver != null) { tech_saver(e.Slice); } } buffer.Append(new Slice(DateTime.Now, e.Slice)); UpdateTechnologyParameters(); if (onUpdated != null) { onUpdated(this, new CommutatorEventArgs(e.Slice)); } } } else { lastTime = now; } } catch (Exception ex) { ErrorHandler.WriteToLog(sender, new ErrorArgs(ex.Message, ErrorType.NotFatal)); } }
/// <summary> /// определяем место куда сохранять объем процесса /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void buttonTechSaveProccessVolume_Click(object sender, EventArgs e) { DevManParametersForm frm = new DevManParametersForm(true); if (frm.ShowDialog(this) == DialogResult.OK) { PDescription selected = frm.SelectedParameter; if (selected != null) { textBoxTechSaveProccessVolume.Text = selected.Description; _app.Commutator.Technology.ProccessVolume.IndexToSave = selected.Number; } } }
private PDescription channel = null; // канал public EditParameterForm(Parameter parameter) { InitializeComponent(); if (parameter != null) { edited = parameter; channel = edited.Channel; } else { MessageBox.Show("jnjnjnj"); this.Close(); } }
/// <summary> /// Получили данные от devMan /// </summary> /// <param name="sender">Источник события</param> /// <param name="e">Параметры события</param> protected void DevManClient_onReceive(object sender, ReceivedEventArgs e) { try { DateTime now = DateTime.Now; if (now > lastTime) { TimeSpan interval = now - lastTime; if (interval.Ticks > tInterval.Ticks) { lastTime = now; //buffer.Append(new Slice(DateTime.Now, e.Slice)); foreach (Parameter parameter in parameters) { PDescription channel = parameter.Channel; if (channel != null) { if (channel.Number >= 0 && channel.Number < e.Slice.Length) { parameter.setCurrent(e.Slice[channel.Number]); e.Slice[channel.Number] = parameter.CurrentValue; } } } buffer.Append(new Slice(DateTime.Now, e.Slice)); tech.Updated(parameters); if (onParameterUpdated != null) { onParameterUpdated(this, EventArgs.Empty); } } } else { lastTime = now; } } catch (Exception ex) { ErrorHandler.WriteToLog(sender, new ErrorArgs(ex.Message, ErrorType.NotFatal)); } }