b |= 0x02; b |= (globalTitleIndicator.getValue() << 2);
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((globalTitleIndicator == null) ? 0 : globalTitleIndicator.hashCode()); result = prime * result + (pcPresent ? 1231 : 1237); result = prime * result + ((routingIndicator == null) ? 0 : routingIndicator.hashCode()); result = prime * result + (ssnPresent ? 1231 : 1237); result = prime * result + (reservedForNationalUseBit ? 1231 : 1237); return result; }
private void init(byte v, SccpProtocolVersion sccpProtocolVersion) { if (sccpProtocolVersion == SccpProtocolVersion.ANSI) { ssnPresent = (v & 0x01) == 0x01; pcPresent = (v & 0x02) == 0x02; int gtiCode = ((v >> 2) & 0x0f); switch (gtiCode) { case 1: globalTitleIndicator = GlobalTitleIndicator.GLOBAL_TITLE_INCLUDES_TRANSLATION_TYPE_NUMBERING_PLAN_AND_ENCODING_SCHEME; break; case 2: globalTitleIndicator = GlobalTitleIndicator.GLOBAL_TITLE_INCLUDES_TRANSLATION_TYPE_ONLY; break; default: globalTitleIndicator = GlobalTitleIndicator.NO_GLOBAL_TITLE_INCLUDED; break; } } else { pcPresent = (v & 0x01) == 0x01; ssnPresent = (v & 0x02) == 0x02; globalTitleIndicator = GlobalTitleIndicator.valueOf((v >> 2) & 0x0f); } routingIndicator = ((v >> 6) & 0x01) == 0x01 ? RoutingIndicator.ROUTING_BASED_ON_DPC_AND_SSN : RoutingIndicator.ROUTING_BASED_ON_GLOBAL_TITLE; reservedForNationalUseBit = (v & 0x80) == 0x80; }
writer.write(this.txHttpCharging.toString(), TX_HTTP_CHARGING, String.class); writer.write(this.globalTitleIndicator.toString(), GLOBAL_TITLE_INDICATOR, String.class); writer.write(this.translationType, TRANSLATION_TYPE, Integer.class); writer.write(this.correlationIdLiveTime, CORRELATION_ID_LIVE_TIME, Integer.class);