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 { ...@@ -122,7 +122,7 @@ public class DeviceAttributeWrapper {
return this.attribute.getQuality(); return this.attribute.getQuality();
} }
public DevState extractState() throws DevFailed { public DevState[] extractDevStateArray() throws DevFailed {
return attribute.extractState(); 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; package fr.soleil.actiongroup.collectiveaction.onattributes.plugin;
import fr.soleil.actiongroup.collectiveaction.components.tangowrapping.DeviceAttributeWrapper; import fr.soleil.actiongroup.collectiveaction.components.tangowrapping.DeviceAttributeWrapper;
...@@ -37,19 +13,13 @@ import fr.soleil.actiongroup.collectiveaction.onattributes.plugin.persistance.Pe ...@@ -37,19 +13,13 @@ import fr.soleil.actiongroup.collectiveaction.onattributes.plugin.persistance.Pe
* <LI> storing the attribute * <LI> storing the attribute
* </UL> * </UL>
* The persistence management is delegated to the chosen IPersistenceManager implementation * The persistence management is delegated to the chosen IPersistenceManager implementation
*
* @author CLAISSE * @author CLAISSE
*/ */
public class PersistencePlugin implements Plugin public class PersistencePlugin implements Plugin {
{
public PersistencePlugin ()
{
} 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); AnyAttribute anyAttribute = new AnyAttribute(deviceName, attribute);
PersistenceContext persistenceContext = context.getPersistenceContext(); PersistenceContext persistenceContext = context.getPersistenceContext();
PersistenceManager manager = persistenceContext.getManager(); PersistenceManager manager = persistenceContext.getManager();
manager.store(anyAttribute, persistenceContext); manager.store(anyAttribute, persistenceContext);
......
...@@ -111,7 +111,7 @@ public class AnyAttribute { ...@@ -111,7 +111,7 @@ public class AnyAttribute {
/** /**
* The attribute's State value * The attribute's State value
*/ */
private DevState rawValueState; private DevState[] rawValueState;
private final int numberOfComponents; private final int numberOfComponents;
...@@ -199,8 +199,8 @@ public class AnyAttribute { ...@@ -199,8 +199,8 @@ public class AnyAttribute {
break; break;
case TangoConst.Tango_DEV_STATE: case TangoConst.Tango_DEV_STATE:
rawValueState = attribute.extractState(); rawValueState = attribute.extractDevStateArray();
_numberOfComponents = 1; _numberOfComponents = rawValueState == null ? 0 : rawValueState.length;
break; break;
case TangoConst.Tango_DEV_STRING: case TangoConst.Tango_DEV_STRING:
...@@ -270,8 +270,8 @@ public class AnyAttribute { ...@@ -270,8 +270,8 @@ public class AnyAttribute {
break; break;
case TangoConst.Tango_DEV_STATE: case TangoConst.Tango_DEV_STATE:
convertedNumericValuesTable[i] = rawValueState.value(); convertedNumericValuesTable[i] = rawValueState[i].value();
convertedStringValuesTable[i] = TangoConst.Tango_DevStateName[rawValueState.value()]; convertedStringValuesTable[i] = rawValueState[i].value()+"";
break; break;
case TangoConst.Tango_DEV_STRING: 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