1 package org.ocera.orte.demo;
3 import org.ocera.orte.DomainApp;
4 import org.ocera.orte.types.MessageData;
5 import org.ocera.orte.types.ORTEConstant;
7 public class HokuyoScanType extends MessageData {
9 public int[] hokuyo = new int[681];
11 public HokuyoScanType(DomainApp domainApp, String newTopic) {
13 this.setTopic(newTopic);
14 if (!domainApp.regNewDataType("hokuyo_scan",getMaxDataLength())) {
15 System.out.println(":j!: cannot register data type \"hokuyo_scan\"!");
22 for (int i = 0; i < hokuyo.length; i++) {
23 this.hokuyo[i] = buffer.getShort() & 0xffff;
28 public void write() {}
31 public int getMaxDataLength() {
32 return 681 * ORTEConstant.SHORT_FIELD_SIZE;