public bool isEqual(ReportAddition value) { if (!this.getHeader().isEqual(value.getHeader())) { return(false); } if (!this.getAdditionOutputBody().isEqual(value.getAdditionOutputBody())) { return(false); } return(true); }
public virtual void sendReportAdditionAction(QueryAddition msg, uint sender) { uint A1 = msg.getAdditionInputBody().getAdditionInput().getA1(); uint A2 = msg.getAdditionInputBody().getAdditionInput().getA2(); // Now, lets pull out the two numbers we received Console.WriteLine(" Need to add " + A1 + " + " + A2); // Now let's formulate a response uint answer; answer = A1 + A2; ReportAddition theAnswer = new ReportAddition(); theAnswer.getAdditionOutputBody(). getAdditionOutput().setAdditionResult(answer); // Encode the response and send it back to the requestor. sendJausMessage(theAnswer, new JausAddress(sender)); Console.WriteLine("answer sent to client"); }
public bool isEqual(ReportAddition value) { if (!this.getHeader().isEqual(value.getHeader())) { return false; } if (!this.getAdditionOutputBody().isEqual(value.getAdditionOutputBody())) { return false; } return true; }