Package fr.esrf.TangoApi

Examples of fr.esrf.TangoApi.AttributeInfo


    if (withSetAttUpdate) {
      widget.setAttributeName(attributeName);
    }
    Sleeper.SECONDS.sleep(2);

    final AttributeInfo info = devProx.get_attribute_info(attributeName);
    final String format = info.format;

    System.out.println(format);

    // writeInTextField(txtField, jbEnvoyer, value);
View Full Code Here


     * @throws SalsaDeviceException
     */
    public static String getFormat(IDevice device) throws SalsaDeviceException {
        String format;
        if (device != null && device.getName() != null && !"".equals(device.getName().trim())) {
            AttributeInfo info = getAttributeInfo(device);
            if (info != null) {
                format = info.format;
            }
            else {
                format = null;
View Full Code Here

     * @throws SalsaDeviceException
     */
    public static boolean getReadOnly(IDevice device) throws SalsaDeviceException {
        boolean readOnly;
        if (device != null && device.getName() != null && !"".equals(device.getName().trim())) {
            AttributeInfo info = getAttributeInfo(device);
            if (info != null) {
                readOnly = info.writable == AttrWriteType.READ;
            }
            else {
                readOnly = false;
View Full Code Here

        String attributeName = name.substring(separatorPos + 1);
        DeviceProxy proxy = getDeviceProxy(device);
        if (proxy == null) {
            return null;
        }
        AttributeInfo info = getAttributeInfo(proxy, attributeName);
        return info;
    }
View Full Code Here

     * @return
     * @throws SalsaDeviceException
     */
    private static AttributeInfo getAttributeInfo(DeviceProxy proxy, String attributeName)
            throws SalsaDeviceException {
        AttributeInfo info;
        try {
            info = proxy.get_attribute_info(attributeName);
        }
        catch (DevFailed e) {
            e.printStackTrace();
View Full Code Here

    }

    public static IReadWriteAccess getReadWriteAccess(IDevice device) throws SalsaDeviceException {
        IReadWriteAccess rwa = new ReadWriteAccessImpl();
        if (device != null && device.getName() != null && !"".equals(device.getName().trim())) {
            AttributeInfo info = getAttributeInfo(device);
            if (info != null) {

                rwa.setReadable(true);

                if (info.writable != AttrWriteType.READ) {
View Full Code Here

     * @return
     * @throws SalsaDeviceException
     */
    public static DimensionType getDimensionType(IDevice device) throws SalsaDeviceException {
        DimensionType dimensionType;
        AttributeInfo info = getAttributeInfo(device);
        switch (info.data_format.value()) {
            case AttrDataFormat._SCALAR:
                dimensionType = DimensionType.SCALAR;
                break;
            case AttrDataFormat._SPECTRUM:
View Full Code Here

        String deviceName = name.substring(0, separatorPos);
        String attributeName = name.substring(separatorPos + 1);

        DeviceProxy proxy = getDeviceProxy(deviceName);
        DeviceAttribute attribute = getDeviceAttribute(proxy, attributeName);
        AttributeInfo info = getAttributeInfo(proxy, attributeName);
        // Report.

        // Readable / writable.
        boolean readable;
        boolean writeable;
        switch (info.writable.value()) {
            case AttrWriteType._READ:
                readable = true;
                writeable = false;
                break;
            case AttrWriteType._READ_WITH_WRITE:
            case AttrWriteType._READ_WRITE:
                readable = true;
                writeable = true;
                break;
            case AttrWriteType._WRITE:
                readable = false;
                writeable = true;
                break;
            default:
                // Normally impossible.
                throw new SalsaDeviceException("Unknown write type for the device " + name + ".");
        }
        report.setReadable(readable);
        report.setWriteable(writeable);

        // Data and data format.
        try {
            TangoAttribute tangoAttribute = new TangoAttribute(name);
            String format = null;
            try {
                AttributeProxy attributeProxy = tangoAttribute.getAttributeProxy();
                if (attributeProxy != null) {
                    AttributeInfo attributeInfo = attributeProxy.get_info();
                    if (attributeInfo != null) {
                        format = attributeInfo.format;
                    }
                }
            }
View Full Code Here

     * @throws SalsaDeviceException
     */
    public static String getFormat(IDevice device) throws SalsaDeviceException {
        String format;
        if (device != null && device.getName() != null && !"".equals(device.getName().trim())) {
            AttributeInfo info = getAttributeInfo(device);
            if (info != null) {
                format = info.format;
            }
            else {
                format = null;
View Full Code Here

     * @throws SalsaDeviceException
     */
    public static boolean getReadOnly(IDevice device) throws SalsaDeviceException {
        boolean readOnly;
        if (device != null && device.getName() != null && !"".equals(device.getName().trim())) {
            AttributeInfo info = getAttributeInfo(device);
            if (info != null) {
                readOnly = info.writable == AttrWriteType.READ;
            }
            else {
                readOnly = false;
View Full Code Here

TOP

Related Classes of fr.esrf.TangoApi.AttributeInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.