1234567891011121314151617181920212223242526272829303132333435363738 |
- package at.acdp.urweb.sclient.data;
- import at.acdp.urweb.CountDataInputStream;
- import com.eclipsesource.json.JsonObject;
- import java.io.IOException;
- import java.util.Arrays;
- //49 byte
- public class JointDataList implements IRead, IJsonObject{
- JointData[] jds;
- //TODO: float/double propably wrong
- //total length 41 bytes
- public void read(CountDataInputStream di, int size) throws IOException {
- int joints = size / 41;
- JointData[] jds = new JointData[size];
- for (int i = 0; i < joints; i++) {
- JointData jd = new JointData();
- jd.read(di, size);
- jds[i] = jd;
- }
- this.jds=jds;
- }
- @Override
- public String toString() {
- return "{\"JointDataList\":{"
- + " \"jds\":" + Arrays.toString(jds)
- + "}}";
- }
- @Override
- public JsonObject toJSON() {
- return new JsonObject().add("jds",Arrays.toString(jds));
- }
- }
|