Package org.yamcs.utils
Class StringConverter
java.lang.Object
org.yamcs.utils.StringConverter
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
arrayToHexString
(byte[] b) static String
arrayToHexString
(byte[] b, boolean beautify) static String
arrayToHexString
(byte[] b, int offset, int length) static String
arrayToHexString
(byte[] b, int offset, int length, boolean beautify) static String
static byte[]
Convert a hex string into a byte array.static String
idListToString
(List<Yamcs.NamedObjectId> idList) Convert a list of NamedObjectId to a pretty string for use in log messages etc.static String
Convert a NamedObjectId to a pretty string for use in log messages etc.static String
toString
(Commanding.CommandId cmdId) static String
toString
(Yamcs.Value rv)
-
Constructor Details
-
StringConverter
public StringConverter()
-
-
Method Details
-
toString
-
arrayToHexString
-
arrayToHexString
-
arrayToHexString
-
arrayToHexString
-
byteBufferToHexString
-
hexStringToArray
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
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
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
-