Add S8 methods to java parser
@@ -156,6 +156,16 @@ public class SBPMessage {
return ret;
}
+ public int[] getArrayofS8() {
+ return getArrayofS8(buf.remaining());
+ }
+ public int[] getArrayofS8(int n) {
+ int[] ret = new int[n];
+ for (int i = 0; i < n; i++)
+ ret[i] = getS8();
+ return ret;
+ }
+
public int[] getArrayofU16() {
return getArrayofU16(buf.remaining());
}
@@ -279,6 +289,15 @@ public class SBPMessage {
putArrayofU8(data);
}
+ public void putArrayofS8(int[] data) {
+ for (int x : data)
+ buf.put((byte)x);
+ }
+ public void putArrayofS8(int[] data, int n) {
+ assert(n == data.length);
+ putArrayofS8(data);
+ }
+
public void putArrayofU16(int[] data) {
for (int x : data)
buf.putShort((short)x);
