assertrequestResponseCode!=RequestResponseCode.DISCOVER_RESPONSE||(thisinstanceofDiscoverResponse):"DISCOVER_RESPONSE must use DiscoverResponse class";
assertrequestResponseCode!=RequestResponseCode.REGISTER||(thisinstanceofRegister):"REGISTER must use Register class";
assertrequestResponseCode!=RequestResponseCode.UNREGISTER||(thisinstanceofUnregister):"UNREGISTER must use Unregister class";
assertrequestResponseCode!=RequestResponseCode.RATIO_REQUEST||(thisinstanceofRatioRequest):"RATIO_REQUEST must use RatioRequest class";
assertrequestResponseCode!=RequestResponseCode.RATIO_RESPONSE||(thisinstanceofRatioResponse):"RATIO_RESPONSE must use RatioResponse class";
assertrequestResponseCode!=RequestResponseCode.UPDATE_RATIO||(thisinstanceofUpdateRatio):"UPDATE_RATIO must use UpdateRatio class";
this.requestResponseCode=requestResponseCode;
checkRequestResponseCode();// this can throw InternalError
}
@ -67,6 +73,9 @@ public class Payload {
assertRequestResponseCode.fromCode(packet[RequestResponseCode.RRCODE_POSITION])!=RequestResponseCode.DISCOVER_RESPONSE||(thisinstanceofDiscoverResponse):"DISCOVER_RESPONSE must use DiscoverResponse class";
assertRequestResponseCode.fromCode(packet[RequestResponseCode.RRCODE_POSITION])!=RequestResponseCode.REGISTER||(thisinstanceofRegister):"REGISTER must use Register class";
assertRequestResponseCode.fromCode(packet[RequestResponseCode.RRCODE_POSITION])!=RequestResponseCode.UNREGISTER||(thisinstanceofUnregister):"UNREGISTER must use Unregister class";
assertRequestResponseCode.fromCode(packet[RequestResponseCode.RRCODE_POSITION])!=RequestResponseCode.RATIO_REQUEST||(thisinstanceofRatioRequest):"RATIO_REQUEST must use RatioRequest class";
assertRequestResponseCode.fromCode(packet[RequestResponseCode.RRCODE_POSITION])!=RequestResponseCode.RATIO_RESPONSE||(thisinstanceofRatioResponse):"RATIO_RESPONSE must use RatioResponse class";
assertRequestResponseCode.fromCode(packet[RequestResponseCode.RRCODE_POSITION])!=RequestResponseCode.UPDATE_RATIO||(thisinstanceofUpdateRatio):"UPDATE_RATIO must use UpdateRatio class";