diff --git a/rtd_cina/source/java/ch/systemsx/cisd/cina/shared/labview/Cluster.java b/rtd_cina/source/java/ch/systemsx/cisd/cina/shared/labview/Cluster.java index c7a900fd01d868278ab96db3ec4151586c750d85..228791c494c3c6af1a113b7a7fd3e93f53e3c5f1 100644 --- a/rtd_cina/source/java/ch/systemsx/cisd/cina/shared/labview/Cluster.java +++ b/rtd_cina/source/java/ch/systemsx/cisd/cina/shared/labview/Cluster.java @@ -16,6 +16,7 @@ package ch.systemsx.cisd.cina.shared.labview; +import java.util.ArrayList; import java.util.List; import javax.xml.bind.annotation.XmlElement; @@ -29,13 +30,23 @@ public class Cluster private int numberOfElements; - private List<LVDataString> strings; + private List<LVDataString> strings = new ArrayList<LVDataString>(); - private List<LVDataTimestamp> timestamps; + private List<LVDataTimestamp> timestamps = new ArrayList<LVDataTimestamp>(); - private List<DBL> dbls; + private List<DBL> dbls = new ArrayList<DBL>(); - private List<I32> i32s; + private List<I32> i32s = new ArrayList<I32>(); + + private List<U8> u8s = new ArrayList<U8>(); + + private List<U32> u32s = new ArrayList<U32>(); + + private List<LVDataBoolean> booleans = new ArrayList<LVDataBoolean>(); + + private List<EW> ews = new ArrayList<EW>(); + + private List<Cluster> clusters = new ArrayList<Cluster>(); @XmlElement(name = "Name", namespace = "http://www.ni.com/LVData") public String getName() @@ -49,7 +60,7 @@ public class Cluster } @XmlElement(name = "NumElts", namespace = "http://www.ni.com/LVData") - int getNumberOfElements() + public int getNumberOfElements() { return numberOfElements; } @@ -103,4 +114,58 @@ public class Cluster this.i32s = i32s; } + @XmlElement(name = "U8", namespace = "http://www.ni.com/LVData") + public List<U8> getU8s() + { + return u8s; + } + + public void setU8s(List<U8> u8s) + { + this.u8s = u8s; + } + + @XmlElement(name = "U32", namespace = "http://www.ni.com/LVData") + public void setU32s(List<U32> u32s) + { + this.u32s = u32s; + } + + public List<U32> getU32s() + { + return u32s; + } + + @XmlElement(name = "Boolean", namespace = "http://www.ni.com/LVData") + public List<LVDataBoolean> getBooleans() + { + return booleans; + } + + public void setBooleans(List<LVDataBoolean> booleans) + { + this.booleans = booleans; + } + + @XmlElement(name = "EW", namespace = "http://www.ni.com/LVData") + public void setEws(List<EW> ews) + { + this.ews = ews; + } + + public List<EW> getEws() + { + return ews; + } + + @XmlElement(name = "Cluster", namespace = "http://www.ni.com/LVData") + public List<Cluster> getClusters() + { + return clusters; + } + + public void setClusters(List<Cluster> clusters) + { + this.clusters = clusters; + } } diff --git a/rtd_cina/source/java/ch/systemsx/cisd/cina/shared/labview/DBL.java b/rtd_cina/source/java/ch/systemsx/cisd/cina/shared/labview/DBL.java index 0f10f8d875d07bb59fc168e4592c10d6a4c197f2..d2f61ded13d99e3b408f092b2e0949b7afbc7c30 100644 --- a/rtd_cina/source/java/ch/systemsx/cisd/cina/shared/labview/DBL.java +++ b/rtd_cina/source/java/ch/systemsx/cisd/cina/shared/labview/DBL.java @@ -19,21 +19,19 @@ package ch.systemsx.cisd.cina.shared.labview; import javax.xml.bind.annotation.XmlElement; /** - * - * * @author Chandrasekhar Ramakrishnan */ public class DBL extends AbstractLVDataElement { - private float value; + private Float value; @XmlElement(name = "Val", namespace = "http://www.ni.com/LVData") - public void setValue(float value) + public void setValue(Float value) { this.value = value; } - public float getValue() + public Float getValue() { return value; } diff --git a/rtd_cina/source/java/ch/systemsx/cisd/cina/shared/labview/EW.java b/rtd_cina/source/java/ch/systemsx/cisd/cina/shared/labview/EW.java new file mode 100644 index 0000000000000000000000000000000000000000..6e9cfb8d50f5d7dafa9143671a9e55c364109d3e --- /dev/null +++ b/rtd_cina/source/java/ch/systemsx/cisd/cina/shared/labview/EW.java @@ -0,0 +1,59 @@ +/* + * Copyright 2010 ETH Zuerich, CISD + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package ch.systemsx.cisd.cina.shared.labview; + +import java.util.ArrayList; +import java.util.List; + +import javax.xml.bind.annotation.XmlElement; + +/** + * @author Chandrasekhar Ramakrishnan + */ +public class EW extends AbstractLVDataElement +{ + private List<String> choices = new ArrayList<String>(); + + private Integer value; + + @XmlElement(name = "Choice", namespace = "http://www.ni.com/LVData") + public void setChoices(List<String> choices) + { + this.choices = choices; + } + + public List<String> getChoices() + { + return choices; + } + + @XmlElement(name = "Val", namespace = "http://www.ni.com/LVData") + public Integer getValue() + { + return value; + } + + void setValue(Integer value) + { + this.value = value; + } + + public String getChosenValue() + { + return choices.get(value); + } +} diff --git a/rtd_cina/source/java/ch/systemsx/cisd/cina/shared/labview/LVData.java b/rtd_cina/source/java/ch/systemsx/cisd/cina/shared/labview/LVData.java index fa37543e229a67259aed6db7ccfc848bc7501e8b..9b937da55a33eb9bb32399e1ce3f5e43e83998fc 100644 --- a/rtd_cina/source/java/ch/systemsx/cisd/cina/shared/labview/LVData.java +++ b/rtd_cina/source/java/ch/systemsx/cisd/cina/shared/labview/LVData.java @@ -22,6 +22,8 @@ import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; /** + * Root of the LabView XML storage format. + * * @author Chandrasekhar Ramakrishnan */ @XmlRootElement(name = "LVData", namespace = "http://www.ni.com/LVData") diff --git a/rtd_cina/source/java/ch/systemsx/cisd/cina/shared/labview/LVDataBoolean.java b/rtd_cina/source/java/ch/systemsx/cisd/cina/shared/labview/LVDataBoolean.java new file mode 100644 index 0000000000000000000000000000000000000000..4920fc8a7df720064568a3ff75594aba49d0b3cd --- /dev/null +++ b/rtd_cina/source/java/ch/systemsx/cisd/cina/shared/labview/LVDataBoolean.java @@ -0,0 +1,38 @@ +/* + * Copyright 2010 ETH Zuerich, CISD + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package ch.systemsx.cisd.cina.shared.labview; + +import javax.xml.bind.annotation.XmlElement; + +/** + * @author Chandrasekhar Ramakrishnan + */ +public class LVDataBoolean extends AbstractLVDataElement +{ + private Boolean value; + + @XmlElement(name = "Val", namespace = "http://www.ni.com/LVData") + public void setValue(Boolean value) + { + this.value = value; + } + + public Boolean getValue() + { + return value; + } +} diff --git a/rtd_cina/source/java/ch/systemsx/cisd/cina/shared/labview/U32.java b/rtd_cina/source/java/ch/systemsx/cisd/cina/shared/labview/U32.java new file mode 100644 index 0000000000000000000000000000000000000000..bf3371faac6a6807c071e84c5de3b4c987231a25 --- /dev/null +++ b/rtd_cina/source/java/ch/systemsx/cisd/cina/shared/labview/U32.java @@ -0,0 +1,40 @@ +/* + * Copyright 2010 ETH Zuerich, CISD + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package ch.systemsx.cisd.cina.shared.labview; + +import javax.xml.bind.annotation.XmlElement; + +/** + * LabView unsigned 32 bit number. + * + * @author Chandrasekhar Ramakrishnan + */ +public class U32 extends AbstractLVDataElement +{ + private Long value; + + @XmlElement(name = "Val", namespace = "http://www.ni.com/LVData") + public Long getValue() + { + return value; + } + + void setValue(Long value) + { + this.value = value; + } +} diff --git a/rtd_cina/source/java/ch/systemsx/cisd/cina/shared/labview/U8.java b/rtd_cina/source/java/ch/systemsx/cisd/cina/shared/labview/U8.java new file mode 100644 index 0000000000000000000000000000000000000000..bb203e65756ff06fabf24089b5fedbf6f2111f5c --- /dev/null +++ b/rtd_cina/source/java/ch/systemsx/cisd/cina/shared/labview/U8.java @@ -0,0 +1,40 @@ +/* + * Copyright 2010 ETH Zuerich, CISD + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package ch.systemsx.cisd.cina.shared.labview; + +import javax.xml.bind.annotation.XmlElement; + +/** + * LabView unsigned 8 bit number. + * + * @author Chandrasekhar Ramakrishnan + */ +public class U8 extends AbstractLVDataElement +{ + private Short value; + + @XmlElement(name = "Val", namespace = "http://www.ni.com/LVData") + public Short getValue() + { + return value; + } + + void setValue(Short value) + { + this.value = value; + } +}