Skip to content
Snippets Groups Projects
Commit e55b3538 authored by gwen-soleil's avatar gwen-soleil
Browse files

Fix not supported DevState spectrum (SOLEIL Jira TANGOARCH-745)

parent 18195307
No related branches found
No related tags found
No related merge requests found
......@@ -122,7 +122,7 @@ public class DeviceAttributeWrapper {
return this.attribute.getQuality();
}
public DevState extractState() throws DevFailed {
return attribute.extractState();
public DevState[] extractDevStateArray() throws DevFailed {
return attribute.extractDevStateArray();
}
}
/* Synchrotron Soleil
*
* File : PersistencePluginAction.java
*
* Project : TangoParser
*
* Description :
*
* Author : CLAISSE
*
* Original : 25 janv. 07
*
* Revision: Author:
* Date: State:
*
* Log: PersistencePluginAction.java,v
*
*/
/*
* Created on 25 janv. 07
*
* To change the template for this generated file go to
* Window>Preferences>Java>Code Generation>Code and Comments
*/
package fr.soleil.actiongroup.collectiveaction.onattributes.plugin;
import fr.soleil.actiongroup.collectiveaction.components.tangowrapping.DeviceAttributeWrapper;
......@@ -37,19 +13,13 @@ import fr.soleil.actiongroup.collectiveaction.onattributes.plugin.persistance.Pe
* <LI> storing the attribute
* </UL>
* The persistence management is delegated to the chosen IPersistenceManager implementation
*
* @author CLAISSE
*/
public class PersistencePlugin implements Plugin
{
public PersistencePlugin ()
{
public class PersistencePlugin implements Plugin {
}
public void execute ( PluginContext context, String deviceName, DeviceAttributeWrapper attribute ) throws Exception
{
public void execute(PluginContext context, String deviceName, DeviceAttributeWrapper attribute) throws Exception {
AnyAttribute anyAttribute = new AnyAttribute(deviceName, attribute);
PersistenceContext persistenceContext = context.getPersistenceContext();
PersistenceManager manager = persistenceContext.getManager();
manager.store(anyAttribute, persistenceContext);
......
......@@ -111,7 +111,7 @@ public class AnyAttribute {
/**
* The attribute's State value
*/
private DevState rawValueState;
private DevState[] rawValueState;
private final int numberOfComponents;
......@@ -199,8 +199,8 @@ public class AnyAttribute {
break;
case TangoConst.Tango_DEV_STATE:
rawValueState = attribute.extractState();
_numberOfComponents = 1;
rawValueState = attribute.extractDevStateArray();
_numberOfComponents = rawValueState == null ? 0 : rawValueState.length;
break;
case TangoConst.Tango_DEV_STRING:
......@@ -270,8 +270,8 @@ public class AnyAttribute {
break;
case TangoConst.Tango_DEV_STATE:
convertedNumericValuesTable[i] = rawValueState.value();
convertedStringValuesTable[i] = TangoConst.Tango_DevStateName[rawValueState.value()];
convertedNumericValuesTable[i] = rawValueState[i].value();
convertedStringValuesTable[i] = rawValueState[i].value()+"";
break;
case TangoConst.Tango_DEV_STRING:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment