public String toString(Locale locale){
  String returnString;
  log.debug("interpreting an SV2 message - cmd is " + sv_cmd);
switch (sv_cmd) {
case (SV_CMD_WRITE_ONE):
    returnString=Bundle.getMessage(locale,"SV2_WRITE_ONE_INTERPRETED",src,dst,sv_adr,d1);
  break;
case (SV_CMD_WRITE_ONE_REPLY):
returnString=Bundle.getMessage(locale,"SV2_WRITE_ONE_REPLY_INTERPRETED",src,dst,sv_adr,d1);
break;
case (SV_CMD_QUERY_ONE):
returnString=Bundle.getMessage(locale,"SV2_READ_ONE_REQUEST_INTERPRETED",src,dst,sv_adr);
break;
case (SV_CMD_REPORT_ONE):
returnString=Bundle.getMessage(locale,"SV2_READ_ONE_REPORT_INTERPRETED",src,dst,sv_adr,d1);
break;
case (SV_CMD_WRITE_ONE_MASKED):
returnString=Bundle.getMessage(locale,"SV2_WRITE_ONE_MASKED_INTERPRETED",src,dst,sv_adr,d1,d2);
break;
case (SV_CMD_WRITE_ONE_MASKED_REPLY):
returnString=Bundle.getMessage(locale,"SV2_WRITE_ONE_MASKED_REPLY_INTERPRETED",src,dst,sv_adr,d1,d2);
break;
case (SV_CMD_WRITE_FOUR):
returnString=Bundle.getMessage(locale,"SV2_WRITE_FOUR_INTERPRETED",src,dst,sv_adr,sv_adr + 3,d1,d2,d3,d4);
break;
case (SV_CMD_WRITE_FOUR_REPLY):
returnString=Bundle.getMessage(locale,"SV2_WRITE_FOUR_REPLY_INTERPRETED",src,dst,sv_adr,sv_adr + 3,d1,d2,d3,d4);
break;
case (SV_CMD_QUERY_FOUR):
returnString=Bundle.getMessage(locale,"SV2_READ_FOUR_REQUEST_INTERPRETED",src,dst,sv_adr,sv_adr + 3);
break;
case (SV_CMD_REPORT_FOUR):
returnString=Bundle.getMessage(locale,"SV2_READ_FOUR_REPORT_INTERPRETED",src,dst,sv_adr,sv_adr + 3,d1,d2,d3,d4);
break;
case (SV_CMD_DISCOVER_DEVICES_QUERY):
returnString=Bundle.getMessage(locale,"SV2_DISCOVER_DEVICES_INTERPRETED",src);
break;
case (SV_CMD_DISCOVER_DEVICE_REPORT):
returnString=Bundle.getMessage(locale,"SV2_DEVICE_TYPE_REPORT_INTEPRETED",src,dst,sv_adrl,sv_adrh,d1 + (256 * d2),d3 + (256 * d4));
break;
case (SV_CMD_IDENTIFY_DEVICE_BY_DEVICE_ADDRESS):
returnString=Bundle.getMessage(locale,"SV2_IDENTIFY_DEVICE_REQUEST_INTEPRETED",src,dst);
break;
case (SV_CMD_IDENTIFY_DEVICE_BY_DEVICE_ADDRESS_REPLY):
returnString=Bundle.getMessage(locale,"SV2_DEVICE_IDENTITY_REPORT_INTEPRETED",src,dst,sv_adrl,sv_adrh,d1 + (256 * d2),d3 + (256 * d4));
break;
case (SV_CMD_CHANGE_ADDRESS_REQUEST):
returnString=Bundle.getMessage(locale,"SV2_CHANGE_ADDRESS_REQUEST_INTEPRETED",src,dst,sv_adrl,sv_adrh,d1 + (256 * d2),d3 + (256 * d4));
break;
case (SV_CMD_CHANGE_ADDRESS_REPLY):
if ((sv_adrl == 0) && (sv_adrh == 0) && (d1 == 0)&& (d2 == 0)&& (d3 == 0)&& (d4 == 0)) {
returnString=Bundle.getMessage(locale,"SV2_CHANGE_ADDRESS_REPLY_NEEDS_RECONFIGURE_INTEPRETED",src,dst);
break;
}
 else returnString=Bundle.getMessage(locale,"SV2_CHANGE_ADDRESS_REPLY_INTEPRETED",src,dst,sv_adrl,sv_adrh,d1 + (256 * d2),d3 + (256 * d4));
break;
case (SV_CMD_RECONFIGURE_REQUEST):
returnString=Bundle.getMessage(locale,"SV2_RECONFIGURE_REQUEST_INTEPRETED",src,dst);
break;
case (SV_CMD_RECONFIGURE_REPLY):
returnString=Bundle.getMessage(locale,"SV2_DEVICE_RECONFIGURE_REPLY_INTEPRETED",src,dst,sv_adrl,sv_adrh,d1 + (256 * d2),d3 + (256 * d4));
break;
default :
return Bundle.getMessage(locale,"SV2_UNDEFINED_MESSAGE");
}
log.debug("interpreted: " + returnString);
return returnString + "\n";
}

public String toString ( Locale locale ) { String returnString ; log . debug ( "interpreting an SV2 message - cmd is " + sv_cmd ) ; switch ( sv_cmd ) { case ( SV_CMD_WRITE_ONE ) : returnString = Bundle . getMessage ( locale , "SV2_WRITE_ONE_INTERPRETED" , src , dst , sv_adr , d1 ) ; break ; case ( SV_CMD_WRITE_ONE_REPLY ) : returnString = Bundle . getMessage ( locale , "SV2_WRITE_ONE_REPLY_INTERPRETED" , src , dst , sv_adr , d1 ) ; break ; case ( SV_CMD_QUERY_ONE ) : returnString = Bundle . getMessage ( locale , "SV2_READ_ONE_REQUEST_INTERPRETED" , src , dst , sv_adr ) ; break ; case ( SV_CMD_REPORT_ONE ) : returnString = Bundle . getMessage ( locale , "SV2_READ_ONE_REPORT_INTERPRETED" , src , dst , sv_adr , d1 ) ; break ; case ( SV_CMD_WRITE_ONE_MASKED ) : returnString = Bundle . getMessage ( locale , "SV2_WRITE_ONE_MASKED_INTERPRETED" , src , dst , sv_adr , d1 , d2 ) ; break ; case ( SV_CMD_WRITE_ONE_MASKED_REPLY ) : returnString = Bundle . getMessage ( locale , "SV2_WRITE_ONE_MASKED_REPLY_INTERPRETED" , src , dst , sv_adr , d1 , d2 ) ; break ; case ( SV_CMD_WRITE_FOUR ) : returnString = Bundle . getMessage ( locale , "SV2_WRITE_FOUR_INTERPRETED" , src , dst , sv_adr , sv_adr + 3 , d1 , d2 , d3 , d4 ) ; break ; case ( SV_CMD_WRITE_FOUR_REPLY ) : returnString = Bundle . getMessage ( locale , "SV2_WRITE_FOUR_REPLY_INTERPRETED" , src , dst , sv_adr , sv_adr + 3 , d1 , d2 , d3 , d4 ) ; break ; case ( SV_CMD_QUERY_FOUR ) : returnString = Bundle . getMessage ( locale , "SV2_READ_FOUR_REQUEST_INTERPRETED" , src , dst , sv_adr , sv_adr + 3 ) ; break ; case ( SV_CMD_REPORT_FOUR ) : returnString = Bundle . getMessage ( locale , "SV2_READ_FOUR_REPORT_INTERPRETED" , src , dst , sv_adr , sv_adr + 3 , d1 , d2 , d3 , d4 ) ; break ; case ( SV_CMD_DISCOVER_DEVICES_QUERY ) : returnString = Bundle . getMessage ( locale , "SV2_DISCOVER_DEVICES_INTERPRETED" , src ) ; break ; case ( SV_CMD_DISCOVER_DEVICE_REPORT ) : returnString = Bundle . getMessage ( locale , "SV2_DEVICE_TYPE_REPORT_INTEPRETED" , src , dst , sv_adrl , sv_adrh , d1 + ( 256 * d2 ) , d3 + ( 256 * d4 ) ) ; break ; case ( SV_CMD_IDENTIFY_DEVICE_BY_DEVICE_ADDRESS ) : returnString = Bundle . getMessage ( locale , "SV2_IDENTIFY_DEVICE_REQUEST_INTEPRETED" , src , dst ) ; break ; case ( SV_CMD_IDENTIFY_DEVICE_BY_DEVICE_ADDRESS_REPLY ) : returnString = Bundle . getMessage ( locale , "SV2_DEVICE_IDENTITY_REPORT_INTEPRETED" , src , dst , sv_adrl , sv_adrh , d1 + ( 256 * d2 ) , d3 + ( 256 * d4 ) ) ; break ; case ( SV_CMD_CHANGE_ADDRESS_REQUEST ) : returnString = Bundle . getMessage ( locale , "SV2_CHANGE_ADDRESS_REQUEST_INTEPRETED" , src , dst , sv_adrl , sv_adrh , d1 + ( 256 * d2 ) , d3 + ( 256 * d4 ) ) ; break ; case ( SV_CMD_CHANGE_ADDRESS_REPLY ) : if ( ( sv_adrl == 0 ) && ( sv_adrh == 0 ) && ( d1 == 0 ) && ( d2 == 0 ) && ( d3 == 0 ) && ( d4 == 0 ) ) { returnString = Bundle . getMessage ( locale , "SV2_CHANGE_ADDRESS_REPLY_NEEDS_RECONFIGURE_INTEPRETED" , src , dst ) ; break ; } else returnString = Bundle . getMessage ( locale , "SV2_CHANGE_ADDRESS_REPLY_INTEPRETED" , src , dst , sv_adrl , sv_adrh , d1 + ( 256 * d2 ) , d3 + ( 256 * d4 ) ) ; break ; case ( SV_CMD_RECONFIGURE_REQUEST ) : returnString = Bundle . getMessage ( locale , "SV2_RECONFIGURE_REQUEST_INTEPRETED" , src , dst ) ; break ; case ( SV_CMD_RECONFIGURE_REPLY ) : returnString = Bundle . getMessage ( locale , "SV2_DEVICE_RECONFIGURE_REPLY_INTEPRETED" , src , dst , sv_adrl , sv_adrh , d1 + ( 256 * d2 ) , d3 + ( 256 * d4 ) ) ; break ; default : return Bundle . getMessage ( locale , "SV2_UNDEFINED_MESSAGE" ) ; } log . debug ( "interpreted: " + returnString ) ; return returnString + "\n" ; }
interprets the sv programming format 2 message into a human - readable string .
