V3.java [src/java/m/example/simpleservice] Revision: 1572f2247372537df70090f135538920c9cc91ba Date: Mon Sep 12 14:29:39 MDT 2016
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package m.example.simpleservice;
import csip.annotations.*;
import oms3.annotations.*;
import javax.ws.rs.Path;
@Name("Temperature conversion.")
@Path("m/conv/1.0")
@Resource(type = ResourceType.OMS_COMP)
public class V3 extends csip.ModelDataService {
@Description("Temperature in C")
@Unit("C")
@In public double temp_c = 45.2;
@Description("Temperature in F")
@Unit("F")
@Out public double temp_f;
@Execute
public void exec() throws Exception {
temp_f = temp_c * 9 / 5 + 32;
}
}