Class StringConverter

java.lang.Object
org.yamcs.utils.StringConverter

public class StringConverter extends Object
  • Constructor Details

    • StringConverter

      public StringConverter()
  • Method Details

    • toString

      public static String toString(Yamcs.Value rv)
    • arrayToHexString

      public static String arrayToHexString(byte[] b, int offset, int length)
    • arrayToHexString

      public static String arrayToHexString(byte[] b, int offset, int length, boolean beautify)
    • arrayToHexString

      public static String arrayToHexString(byte[] b)
    • arrayToHexString

      public static String arrayToHexString(byte[] b, boolean beautify)
    • byteBufferToHexString

      public static String byteBufferToHexString(ByteBuffer bb)
    • hexStringToArray

      public static byte[] hexStringToArray(String s)
      Convert a hex string into a byte array. If the string has an odd number of hex digits, it is padded with 0 at the beginning.
      Parameters:
      s - - string to be converted
      Returns:
      binary array representation of the hex string
    • idToString

      public static String idToString(Yamcs.NamedObjectId id)
      Convert a NamedObjectId to a pretty string for use in log messages etc. This gives a better formatting than the default protobuf-generated toString.
    • idListToString

      public static String idListToString(List<Yamcs.NamedObjectId> idList)
      Convert a list of NamedObjectId to a pretty string for use in log messages etc. This gives a better formatting than the default protobuf-generated toString.
    • toString

      public static String toString(Commanding.CommandId cmdId)