private static String extractGroupName(LocoNetMessage m){
  StringBuilder gr_name=new StringBuilder();
  int gr_msb1;
  int gr_msb2;
  gr_msb1=m.getElement(4) & LnConstants.RE_DPLX_MAX_NOT_OPC;
  gr_msb2=m.getElement(9) & LnConstants.RE_DPLX_MAX_NOT_OPC;
  gr_name.append(Character.toString((char)((m.getElement(5) & LnConstants.RE_DPLX_MAX_NOT_OPC) + ((gr_msb1 & LnConstants.RE_DPLX_MSB1_BIT) << LnConstants.RE_DPLX_BUMP_MSB1_BIT))));
  gr_name.append(Character.toString((char)((m.getElement(6) & LnConstants.RE_DPLX_MAX_NOT_OPC) + ((gr_msb1 & LnConstants.RE_DPLX_MSB2_BIT) << LnConstants.RE_DPLX_BUMP_MSB2_BIT))));
  gr_name.append(Character.toString((char)((m.getElement(7) & LnConstants.RE_DPLX_MAX_NOT_OPC) + ((gr_msb1 & LnConstants.RE_DPLX_MSB3_BIT) << LnConstants.RE_DPLX_BUMP_MSB3_BIT))));
  gr_name.append(Character.toString((char)((m.getElement(8) & LnConstants.RE_DPLX_MAX_NOT_OPC) + ((gr_msb1 & LnConstants.RE_DPLX_MSB4_BIT) << LnConstants.RE_DPLX_BUMP_MSB4_BIT))));
  gr_name.append(Character.toString((char)((m.getElement(10) & LnConstants.RE_DPLX_MAX_NOT_OPC) + ((gr_msb2 & LnConstants.RE_DPLX_MSB1_BIT) << LnConstants.RE_DPLX_BUMP_MSB1_BIT))));
  gr_name.append(Character.toString((char)((m.getElement(11) & LnConstants.RE_DPLX_MAX_NOT_OPC) + ((gr_msb2 & LnConstants.RE_DPLX_MSB2_BIT) << LnConstants.RE_DPLX_BUMP_MSB2_BIT))));
  gr_name.append(Character.toString((char)((m.getElement(12) & LnConstants.RE_DPLX_MAX_NOT_OPC) + ((gr_msb2 & LnConstants.RE_DPLX_MSB3_BIT) << LnConstants.RE_DPLX_BUMP_MSB3_BIT))));
  gr_name.append(Character.toString((char)((m.getElement(13) & LnConstants.RE_DPLX_MAX_NOT_OPC) + ((gr_msb2 & LnConstants.RE_DPLX_MSB4_BIT) << LnConstants.RE_DPLX_BUMP_MSB4_BIT))));
  return gr_name.toString();
}

private static String extractGroupName ( LocoNetMessage m ) { StringBuilder gr_name = new StringBuilder ( ) ; int gr_msb1 ; int gr_msb2 ; gr_msb1 = m . getElement ( 4 ) & LnConstants . RE_DPLX_MAX_NOT_OPC ; gr_msb2 = m . getElement ( 9 ) & LnConstants . RE_DPLX_MAX_NOT_OPC ; gr_name . append ( Character . toString ( ( char ) ( ( m . getElement ( 5 ) & LnConstants . RE_DPLX_MAX_NOT_OPC ) + ( ( gr_msb1 & LnConstants . RE_DPLX_MSB1_BIT ) << LnConstants . RE_DPLX_BUMP_MSB1_BIT ) ) ) ) ; gr_name . append ( Character . toString ( ( char ) ( ( m . getElement ( 6 ) & LnConstants . RE_DPLX_MAX_NOT_OPC ) + ( ( gr_msb1 & LnConstants . RE_DPLX_MSB2_BIT ) << LnConstants . RE_DPLX_BUMP_MSB2_BIT ) ) ) ) ; gr_name . append ( Character . toString ( ( char ) ( ( m . getElement ( 7 ) & LnConstants . RE_DPLX_MAX_NOT_OPC ) + ( ( gr_msb1 & LnConstants . RE_DPLX_MSB3_BIT ) << LnConstants . RE_DPLX_BUMP_MSB3_BIT ) ) ) ) ; gr_name . append ( Character . toString ( ( char ) ( ( m . getElement ( 8 ) & LnConstants . RE_DPLX_MAX_NOT_OPC ) + ( ( gr_msb1 & LnConstants . RE_DPLX_MSB4_BIT ) << LnConstants . RE_DPLX_BUMP_MSB4_BIT ) ) ) ) ; gr_name . append ( Character . toString ( ( char ) ( ( m . getElement ( 10 ) & LnConstants . RE_DPLX_MAX_NOT_OPC ) + ( ( gr_msb2 & LnConstants . RE_DPLX_MSB1_BIT ) << LnConstants . RE_DPLX_BUMP_MSB1_BIT ) ) ) ) ; gr_name . append ( Character . toString ( ( char ) ( ( m . getElement ( 11 ) & LnConstants . RE_DPLX_MAX_NOT_OPC ) + ( ( gr_msb2 & LnConstants . RE_DPLX_MSB2_BIT ) << LnConstants . RE_DPLX_BUMP_MSB2_BIT ) ) ) ) ; gr_name . append ( Character . toString ( ( char ) ( ( m . getElement ( 12 ) & LnConstants . RE_DPLX_MAX_NOT_OPC ) + ( ( gr_msb2 & LnConstants . RE_DPLX_MSB3_BIT ) << LnConstants . RE_DPLX_BUMP_MSB3_BIT ) ) ) ) ; gr_name . append ( Character . toString ( ( char ) ( ( m . getElement ( 13 ) & LnConstants . RE_DPLX_MAX_NOT_OPC ) + ( ( gr_msb2 & LnConstants . RE_DPLX_MSB4_BIT ) << LnConstants . RE_DPLX_BUMP_MSB4_BIT ) ) ) ) ; return gr_name . toString ( ) ; }
assumes that m is a message with a duplex group name encoded inside . extracts the duplex group name and returns it as an 8 character string .
