blob: 6f7aceac2ce875446cb73a6b2312c76e6bfb01bd [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE FBType SYSTEM "http://www.holobloc.com/xml/LibraryElement.dtd" >
<FBType Name="COLOR_HUE" Comment="Compute Color Hue" >
<Identification Standard="61499-1" />
<VersionInfo Organization="Rockwell Automation" Version="0.1" Author="JHC" Date="2001-06-03" Remarks="XML version" />
<VersionInfo Organization="Rockwell Automation" Version="0.0" Author="JHC" Date="2000-01-22" Remarks="SRC version" />
<CompilerInfo header="package fb.rt.hmi;" >
<Compiler Language="Java" Vendor="IBM" Product="VisualAge" Version="3.0" />
</CompilerInfo>
<InterfaceList>
<EventInputs>
<Event Name="REQ" Comment="Normal Execution Request" >
<With Var="IN" />
</Event>
</EventInputs>
<EventOutputs>
<Event Name="CNF" Comment="Execution Confirmation" >
<With Var="OUT" />
</Event>
</EventOutputs>
<InputVars>
<VarDeclaration Name="IN" Type="COLOR" />
</InputVars>
<OutputVars>
<VarDeclaration Name="OUT" Type="REAL" Comment="Color saturation value" />
</OutputVars>
</InterfaceList>
<BasicFB>
<Algorithm Name="REQ" >
<Other Language="JAVA" Text="private float[]hsbvals=new float[3];&#10;&#10;protected void service_REQ(boolean ei){&#10;&#10;java.awt.Color c=IN.value;&#10;&#10;hsbvals=java.awt.Color.RGBtoHSB(c.getRed(),c.getGreen(),c.getBlue(),hsbvals);&#10;&#10;OUT.value=hsbvals[0];&#10;&#10;CNF.serviceEvent(this);&#10;&#10;}&#10;" />
</Algorithm>
</BasicFB>
</FBType>