Class StringConverter


  • public class StringConverter
    extends Object
    • Constructor Detail

      • StringConverter

        public StringConverter()
    • Method Detail

      • toString

        public static String toString​(org.yamcs.protobuf.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​(org.yamcs.protobuf.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<org.yamcs.protobuf.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​(org.yamcs.protobuf.Commanding.CommandId cmdId)