public static final LocoNetMessage createSetUr92GroupNamePacket(String sGroupName) throws jmri.jmrix.loconet.LocoNetException {
  int gr_msb1=0;
  int gr_msb2=0;
  int i;
  if (validateGroupName(sGroupName) == false) {
    throw new jmri.jmrix.loconet.LocoNetException("Invalid Duplex Group Name - must be exactly 8 characters");
  }
  LocoNetMessage m=new LocoNetMessage(LnConstants.RE_DPLX_OP_LEN);
  gr_msb1+=(Character.valueOf(sGroupName.charAt(0)) > LnConstants.RE_DPLX_7BITS_MAX) ? LnConstants.RE_DPLX_MSB1_BIT : 0;
  gr_msb1+=(Character.valueOf(sGroupName.charAt(1)) > LnConstants.RE_DPLX_7BITS_MAX) ? LnConstants.RE_DPLX_MSB2_BIT : 0;
  gr_msb1+=(Character.valueOf(sGroupName.charAt(2)) > LnConstants.RE_DPLX_7BITS_MAX) ? LnConstants.RE_DPLX_MSB3_BIT : 0;
  gr_msb1+=(Character.valueOf(sGroupName.charAt(3)) > LnConstants.RE_DPLX_7BITS_MAX) ? LnConstants.RE_DPLX_MSB4_BIT : 0;
  gr_msb2+=(Character.valueOf(sGroupName.charAt(4)) > LnConstants.RE_DPLX_7BITS_MAX) ? LnConstants.RE_DPLX_MSB1_BIT : 0;
  gr_msb2+=(Character.valueOf(sGroupName.charAt(5)) > LnConstants.RE_DPLX_7BITS_MAX) ? LnConstants.RE_DPLX_MSB2_BIT : 0;
  gr_msb2+=(Character.valueOf(sGroupName.charAt(6)) > LnConstants.RE_DPLX_7BITS_MAX) ? LnConstants.RE_DPLX_MSB3_BIT : 0;
  gr_msb2+=(Character.valueOf(sGroupName.charAt(7)) > LnConstants.RE_DPLX_7BITS_MAX) ? LnConstants.RE_DPLX_MSB4_BIT : 0;
  i=0;
  m.setElement(i++,LnConstants.OPC_PEER_XFER);
  m.setElement(i++,LnConstants.RE_DPLX_OP_LEN);
  m.setElement(i++,LnConstants.RE_DPLX_GP_NAME_TYPE);
  m.setElement(i++,LnConstants.RE_DPLX_OP_TYPE_WRITE);
  m.setElement(i++,gr_msb1);
  m.setElement(i++,Character.valueOf(sGroupName.charAt(0)) & LnConstants.RE_DPLX_MAX_NOT_OPC);
  m.setElement(i++,Character.valueOf(sGroupName.charAt(1)) & LnConstants.RE_DPLX_MAX_NOT_OPC);
  m.setElement(i++,Character.valueOf(sGroupName.charAt(2)) & LnConstants.RE_DPLX_MAX_NOT_OPC);
  m.setElement(i++,Character.valueOf(sGroupName.charAt(3)) & LnConstants.RE_DPLX_MAX_NOT_OPC);
  m.setElement(i++,gr_msb2);
  m.setElement(i++,Character.valueOf(sGroupName.charAt(4)) & LnConstants.RE_DPLX_MAX_NOT_OPC);
  m.setElement(i++,Character.valueOf(sGroupName.charAt(5)) & LnConstants.RE_DPLX_MAX_NOT_OPC);
  m.setElement(i++,Character.valueOf(sGroupName.charAt(6)) & LnConstants.RE_DPLX_MAX_NOT_OPC);
  m.setElement(i++,Character.valueOf(sGroupName.charAt(7)) & LnConstants.RE_DPLX_MAX_NOT_OPC);
  for (; i < (LnConstants.RE_DPLX_OP_LEN - 1); i++) {
    m.setElement(i,0);
  }
  return m;
}

public static final LocoNetMessage createSetUr92GroupNamePacket ( String sGroupName ) throws jmri . jmrix . loconet . LocoNetException { int gr_msb1 = 0 ; int gr_msb2 = 0 ; int i ; if ( validateGroupName ( sGroupName ) == false ) { throw new jmri . jmrix . loconet . LocoNetException ( "Invalid Duplex Group Name - must be exactly 8 characters" ) ; } LocoNetMessage m = new LocoNetMessage ( LnConstants . RE_DPLX_OP_LEN ) ; gr_msb1 += ( Character . valueOf ( sGroupName . charAt ( 0 ) ) > LnConstants . RE_DPLX_7BITS_MAX ) ? LnConstants . RE_DPLX_MSB1_BIT : 0 ; gr_msb1 += ( Character . valueOf ( sGroupName . charAt ( 1 ) ) > LnConstants . RE_DPLX_7BITS_MAX ) ? LnConstants . RE_DPLX_MSB2_BIT : 0 ; gr_msb1 += ( Character . valueOf ( sGroupName . charAt ( 2 ) ) > LnConstants . RE_DPLX_7BITS_MAX ) ? LnConstants . RE_DPLX_MSB3_BIT : 0 ; gr_msb1 += ( Character . valueOf ( sGroupName . charAt ( 3 ) ) > LnConstants . RE_DPLX_7BITS_MAX ) ? LnConstants . RE_DPLX_MSB4_BIT : 0 ; gr_msb2 += ( Character . valueOf ( sGroupName . charAt ( 4 ) ) > LnConstants . RE_DPLX_7BITS_MAX ) ? LnConstants . RE_DPLX_MSB1_BIT : 0 ; gr_msb2 += ( Character . valueOf ( sGroupName . charAt ( 5 ) ) > LnConstants . RE_DPLX_7BITS_MAX ) ? LnConstants . RE_DPLX_MSB2_BIT : 0 ; gr_msb2 += ( Character . valueOf ( sGroupName . charAt ( 6 ) ) > LnConstants . RE_DPLX_7BITS_MAX ) ? LnConstants . RE_DPLX_MSB3_BIT : 0 ; gr_msb2 += ( Character . valueOf ( sGroupName . charAt ( 7 ) ) > LnConstants . RE_DPLX_7BITS_MAX ) ? LnConstants . RE_DPLX_MSB4_BIT : 0 ; i = 0 ; m . setElement ( i ++ , LnConstants . OPC_PEER_XFER ) ; m . setElement ( i ++ , LnConstants . RE_DPLX_OP_LEN ) ; m . setElement ( i ++ , LnConstants . RE_DPLX_GP_NAME_TYPE ) ; m . setElement ( i ++ , LnConstants . RE_DPLX_OP_TYPE_WRITE ) ; m . setElement ( i ++ , gr_msb1 ) ; m . setElement ( i ++ , Character . valueOf ( sGroupName . charAt ( 0 ) ) & LnConstants . RE_DPLX_MAX_NOT_OPC ) ; m . setElement ( i ++ , Character . valueOf ( sGroupName . charAt ( 1 ) ) & LnConstants . RE_DPLX_MAX_NOT_OPC ) ; m . setElement ( i ++ , Character . valueOf ( sGroupName . charAt ( 2 ) ) & LnConstants . RE_DPLX_MAX_NOT_OPC ) ; m . setElement ( i ++ , Character . valueOf ( sGroupName . charAt ( 3 ) ) & LnConstants . RE_DPLX_MAX_NOT_OPC ) ; m . setElement ( i ++ , gr_msb2 ) ; m . setElement ( i ++ , Character . valueOf ( sGroupName . charAt ( 4 ) ) & LnConstants . RE_DPLX_MAX_NOT_OPC ) ; m . setElement ( i ++ , Character . valueOf ( sGroupName . charAt ( 5 ) ) & LnConstants . RE_DPLX_MAX_NOT_OPC ) ; m . setElement ( i ++ , Character . valueOf ( sGroupName . charAt ( 6 ) ) & LnConstants . RE_DPLX_MAX_NOT_OPC ) ; m . setElement ( i ++ , Character . valueOf ( sGroupName . charAt ( 7 ) ) & LnConstants . RE_DPLX_MAX_NOT_OPC ) ; for ( ; i < ( LnConstants . RE_DPLX_OP_LEN - 1 ) ; i ++ ) { m . setElement ( i , 0 ) ; } return m ; }
create a loconet packet to set the duplex group name . < p > throws an exception if s provides a 0 - length group name string . if s is too short , it is padded with spaces at the end of the string . < p >
