/// <summary> /// execute the get der status SOAP call /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void getButton_Click(object sender, EventArgs e) { DERMSInterface.CIM cs = new DERMSInterface.CIM(_cim); try { // call SOAP function DERMSInterface.CIMData.DERStatus reply = cs.getDERGroupStatus(_group.Mrid, _q); // load screen with return values from call this.minValueText.Text = reply.PresentMinCapability.ToString(); this.currentValueText.Text = reply.PresentValue.ToString(); this.maxValueText.Text = reply.PresentMaxCapability.ToString(); this.MRIDReturnText.Text = reply.Mrid; this.quantityText.Text = _q.ToString(); logControl1.addEntry(LogControl.entryType.OK, "Message Sent...", cs.LastMessageSent); logControl1.addEntry(LogControl.entryType.OK, "Message Received...", cs.LastMessageReceived); } catch (Exception ex) { if (cs.LastMessageSent.Length > 0) { logControl1.addEntry(LogControl.entryType.OK, "Message Sent...", cs.LastMessageSent); } logControl1.addEntry(LogControl.entryType.FAIL, "Exception...", ex.ToString()); } }
public void TestMethod3() { DERMSInterface.CIM c = DERMSInterface.CIM.loadConfigFile("testConfig.xml"); DERMSInterface.CIMData.DERStatus status = c.getDERGroupStatus("1234-5678", DERMSInterface.quantity.RealPower); Console.WriteLine("xml : " + c.LastMessageSent + c.LastMessageReceived); Assert.IsTrue(c.LastMessageSent.Length > 100); Assert.IsTrue(c.LastMessageReceived.Length > 100); Assert.AreEqual(status.PresentValue, (float)11.1); }
/// <summary> /// execute the get der status SOAP call /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void getButton_Click(object sender, EventArgs e) { DERMSInterface.CIM cs = new DERMSInterface.CIM(_cim); try { // call SOAP function DERMSInterface.CIMData.DERStatus reply = cs.getDERGroupStatus(_group.Mrid, _q); // load screen with return values from call this.minValueText.Text = reply.PresentMinCapability.ToString(); this.currentValueText.Text = reply.PresentValue.ToString(); this.maxValueText.Text = reply.PresentMaxCapability.ToString(); this.MRIDReturnText.Text = reply.Mrid; this.quantityText.Text = _q.ToString(); logControl1.addEntry(LogControl.entryType.OK, "Message Sent...", cs.LastMessageSent); logControl1.addEntry(LogControl.entryType.OK, "Message Received...", cs.LastMessageReceived); } catch (Exception ex) { if (cs.LastMessageSent.Length > 0) logControl1.addEntry(LogControl.entryType.OK, "Message Sent...", cs.LastMessageSent); logControl1.addEntry(LogControl.entryType.FAIL, "Exception...", ex.ToString()); } }