]> rtime.felk.cvut.cz Git - orte.git/blob - orte/Robot_Demo/src/org/ocera/orte/demo/PwrVoltageType.java
Check whether windows dll is produced
[orte.git] / orte / Robot_Demo / src / org / ocera / orte / demo / PwrVoltageType.java
1 package org.ocera.orte.demo;
2
3 import org.ocera.orte.*;
4 import org.ocera.orte.types.*;
5
6
7 public class PwrVoltageType extends MessageData
8 {
9    public  double[]     voltage = new double[4];
10    
11   public PwrVoltageType(DomainApp domainApp, String newTopic) {
12     super();
13     this.setTopic(newTopic);
14     if (!domainApp.regNewDataType("pwr_voltage",getMaxDataLength())) {
15       System.out.println(":j!: cannot register data type \"pwr_voltage\"!");    
16     }
17   }
18       
19   @Override
20   public void write() {}
21  
22   @Override
23   public void read() {
24           buffer.rewind();
25           for (int i = 0; i < 4; i++) {
26                   voltage[i] = buffer.getDouble();
27           }
28   }
29
30   @Override
31   public int getMaxDataLength() {
32     return 4 * ORTEConstant.DOUBLE_FIELD_SIZE;
33   }
34 }