V3.java [src/java/m/example/simpleservice] Revision: 26039c3b41fbd165e445d9fc70f6850608012db7  Date: Sun Aug 26 19:27:52 MDT 2018
/*
 * 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.Unit;
import oms3.annotations.Description;
import oms3.annotations.In;
import oms3.annotations.Out;
import oms3.annotations.Execute;
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;
    }
}