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

remove deprecated code

parent d6dc7420
No related branches found
No related tags found
No related merge requests found
// +======================================================================
// $Source: /cvsroot/tango-cs/tango/jserver/snapshoting/SnapManager/CreateNewContextClass.java,v $
//
// Project: Tango Device Server
//
// Description: Java source code for the command TemplateClass of the
// SnapManager class.
//
// $Author: chinkumo $
//
// $Revision: 1.3 $
//
// $Log: CreateNewContextClass.java,v $
// Revision 1.3 2005/11/29 17:34:34 chinkumo
// no message
//
// Revision 1.2.2.2 2005/11/29 16:18:25 chinkumo
// Code reformated (pogo compatible)
//
// Revision 1.2.2.1 2005/11/15 13:45:32 chinkumo
// ...
//
// Revision 1.2 2005/08/19 14:03:26 chinkumo
// no message
//
// Revision 1.1 2005/06/22 09:27:21 chinkumo
// Tango V5 regenerated.
//
//
// copyleft : European Synchrotron Radiation Facility
// BP 220, Grenoble 38043
// FRANCE
//
//-======================================================================
//
// This file is generated by POGO
// (Program Obviously used to Generate tango Object)
//
// (c) - Software Engineering Group - ESRF
//=============================================================================
/**
* @author $Author: chinkumo $
* @version $Revision: 1.3 $
*/
package SnapManager;
import org.omg.CORBA.Any;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import fr.esrf.Tango.DevFailed;
import fr.esrf.Tango.DispLevel;
import fr.esrf.TangoDs.Command;
import fr.esrf.TangoDs.DeviceImpl;
import fr.esrf.TangoDs.TangoConst;
/**
* Class Description: This command is used to register a snapShot context. All
* informations concerning the snapshot pattern (creation date, reason,
* description and, the <I>list of attributes</I> that are included in the
* context) are passed through an array (DEVVAR_STRINGARRAY).
*/
public class CreateNewContextClass extends Command implements TangoConst {
private static final Logger LOGGER = LoggerFactory.getLogger(CreateNewContextClass.class);
// ===============================================================
/**
* Constructor for Command class CreateNewContextClass
*
* @param name command name
* @param in argin type
* @param out argout type
*/
// ===============================================================
public CreateNewContextClass(String name, int in, int out) {
super(name, in, out);
}
// ===============================================================
/**
* Constructor for Command class CreateNewContextClass
*
* @param name command name
* @param in argin type
* @param in_comments argin description
* @param out argout type
* @param out_comments argout description
*/
// ===============================================================
public CreateNewContextClass(String name, int in, int out, String in_comments, String out_comments) {
super(name, in, out, in_comments, out_comments);
}
// ===============================================================
/**
* Constructor for Command class CreateNewContextClass
*
* @param name command name
* @param in argin type
* @param in_comments argin description
* @param out argout type
* @param out_comments argout description
* @param level The command display type OPERATOR or EXPERT
*/
// ===============================================================
public CreateNewContextClass(String name, int in, int out, String in_comments, String out_comments,
DispLevel level) {
super(name, in, out, in_comments, out_comments, level);
}
// ===============================================================
/**
* return the result of the device's command.
*/
// ===============================================================
@Override
public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
LOGGER.info("CreateNewContextClass.execute(): arrived");
String[] argin = extract_DevVarStringArray(in_any);
return insert(((SnapManager) (device)).create_new_context(argin));
}
// ===============================================================
/**
* Check if it is allowed to execute the command.
*/
// ===============================================================
@Override
public boolean is_allowed(DeviceImpl device, Any data_in) {
// End of Generated Code
// Re-Start of Generated Code
return true;
}
}
// -----------------------------------------------------------------------------
/*
* end of $Source:
* /cvsroot/tango-cs/tango/jserver/snapshoting/SnapManager/CreateNewContextClass
* .java,v $
*/
// +======================================================================
// $Source$
//
// Project: Tango Device Server
//
// Description: Java source code for the command TemplateClass of the
// SnapArchiver class.
//
// $Author: candelrg $
//
// $Revision: 27049 $
//
// $Log$
// Revision 1.3 2009/12/17 10:29:53 pierrejoseph
// CheckStyle:Organize imports
//
// Revision 1.2 2009/05/29 09:08:03 soleilarc
// manage exception for the LaunchSnapshot command
//
// Revision 1.1 2009/01/27 14:05:50 soleilarc
// move LauchSnapshot command from Archiver to Manager
//
// Revision 1.5 2006/04/12 15:46:40 ounsy
// corrected the missing attributes problem
//
// Revision 1.4 2005/11/29 17:33:03 chinkumo
// no message
//
// Revision 1.3.10.2 2005/11/29 16:16:50 chinkumo
// Code reformated (pogo compatible)
//
// Revision 1.3.10.1 2005/11/15 13:46:17 chinkumo
// ...
//
// Revision 1.3 2005/06/15 14:02:53 chinkumo
// The device was regenerated in Tango V5.
//
//
// copyleft : European Synchrotron Radiation Facility
// BP 220, Grenoble 38043
// FRANCE
//
//-======================================================================
//
// This file is generated by POGO
// (Program Obviously used to Generate tango Object)
//
// (c) - Software Engineering Group - ESRF
//=============================================================================
/**
* @author $Author: candelrg $
* @version $Revision: 27049 $
*/
package SnapManager;
import org.omg.CORBA.Any;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import fr.esrf.Tango.DevFailed;
import fr.esrf.Tango.DispLevel;
import fr.esrf.TangoDs.Command;
import fr.esrf.TangoDs.DeviceImpl;
import fr.esrf.TangoDs.Except;
import fr.esrf.TangoDs.TangoConst;
/**
* Class Description: This command is used to trigger a snapShot. All
* informations concerning the snapshot will be retrieved with the identifier
* parameter.
*/
public class LaunchSnapShotCmd extends Command implements TangoConst {
private static final Logger LOGGER = LoggerFactory.getLogger(LaunchSnapShotCmd.class);
// ===============================================================
/**
* Constructor for Command class LaunchSnapShotCmd
*
* @param name command name
* @param in argin type
* @param out argout type
*/
// ===============================================================
public LaunchSnapShotCmd(String name, int in, int out) {
super(name, in, out);
}
// ===============================================================
/**
* Constructor for Command class LaunchSnapShotCmd
*
* @param name command name
* @param in argin type
* @param in_comments argin description
* @param out argout type
* @param out_comments argout description
*/
// ===============================================================
public LaunchSnapShotCmd(String name, int in, int out, String in_comments, String out_comments) {
super(name, in, out, in_comments, out_comments);
}
// ===============================================================
/**
* Constructor for Command class LaunchSnapShotCmd
*
* @param name command name
* @param in argin type
* @param in_comments argin description
* @param out argout type
* @param out_comments argout description
* @param level The command display type OPERATOR or EXPERT
*/
// ===============================================================
public LaunchSnapShotCmd(String name, int in, int out, String in_comments, String out_comments, DispLevel level) {
super(name, in, out, in_comments, out_comments, level);
}
// ===============================================================
/**
* return the result of the device's command.
*/
// ===============================================================
@Override
public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
LOGGER.info("LaunchSnapShotCmd.execute(): arrived");
int argin = extract_DevLong(in_any);
if (argin < 0) {
Except.throw_exception("INPUT_ERROR", "Invalid Context ID", "SnapManager.LaunchSnapshot");
}
((SnapManager) device).launch_snap_shot(argin);
return insert();
}
// ===============================================================
/**
* Check if it is allowed to execute the command.
*/
// ===============================================================
@Override
public boolean is_allowed(DeviceImpl device, Any data_in) {
// End of Generated Code
// Re-Start of Generated Code
return true;
}
}
// -----------------------------------------------------------------------------
/*
* end of $Source:
* /cvsroot/tango-cs/archiving/server/snapArchivingServers/src/main
* /java/SnapManager/LaunchSnapShotCmd.java,v $
*/
// +======================================================================
// $Source: /cvsroot/tango-cs/tango/jserver/snapshoting/SnapManager/SetEquipmentsClass.java,v $
//
// Project: Tango Device Server
//
// Description: Java source code for the command TemplateClass of the
// SnapManager class.
//
// $Author: soleilarc $
//
// $Revision: 1.1 $
//
// $Log: SetEquipmentsClass.java,v $
// Revision 1.1 2007/11/16 10:17:36 soleilarc
// Author: XPigeon
// Mantis bug ID: 5341
// Comment : Define this new class.
//
//
// copyleft : European Synchrotron Radiation Facility
// BP 220, Grenoble 38043
// FRANCE
//
//-======================================================================
//
// This file is generated by POGO
// (Program Obviously used to Generate tango Object)
//
// (c) - Software Engineering Group - ESRF
//=============================================================================
package SnapManager;
import org.omg.CORBA.Any;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import fr.esrf.Tango.DevFailed;
import fr.esrf.Tango.DispLevel;
import fr.esrf.TangoDs.Command;
import fr.esrf.TangoDs.DeviceImpl;
import fr.esrf.TangoDs.TangoConst;
/**
* Class Description: This command is used to set values to equipments.
*/
public class SetEquipmentsClass extends Command implements TangoConst {
private static final Logger LOGGER = LoggerFactory.getLogger(SetEquipmentsClass.class);
// ===============================================================
/**
* Constructor for Command class SetEquipmentsClass
*
* @param name command name
* @param in argin type
* @param out argout type
*/
// ===============================================================
public SetEquipmentsClass(String name, int in, int out) {
super(name, in, out);
}
// ===============================================================
/**
* Constructor for Command class SetEquipmentsClass
*
* @param name command name
* @param in argin type
* @param in_comments argin description
* @param out argout type
* @param out_comments argout description
*/
// ===============================================================
public SetEquipmentsClass(String name, int in, int out, String in_comments, String out_comments) {
super(name, in, out, in_comments, out_comments);
}
// ===============================================================
/**
* Constructor for Command class SetEquipmentsClass
*
* @param name command name
* @param in argin type
* @param in_comments argin description
* @param out argout type
* @param out_comments argout description
* @param level The command display type OPERATOR or EXPERT
*/
// ===============================================================
public SetEquipmentsClass(String name, int in, int out, String in_comments, String out_comments, DispLevel level) {
super(name, in, out, in_comments, out_comments, level);
}
// ===============================================================
/**
* return the result of the device's command.
*/
// ===============================================================
@Override
public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
LOGGER.info("SetEquipmentsClass.execute(): arrived");
String[] argin = extract_DevVarStringArray(in_any);
((SnapManager) (device)).set_equipments(argin);
return insert();
}
// ===============================================================
/**
* Check if it is allowed to execute the command.
*/
// ===============================================================
@Override
public boolean is_allowed(DeviceImpl device, Any data_in) {
// End of Generated Code
// Re-Start of Generated Code
return true;
}
}
// -----------------------------------------------------------------------------
/*
* end of $Source:
* /cvsroot/tango-cs/tango/jserver/snapshoting/SnapManager/SetEquipmentsClass
* .java,v $
*/
/**
* @author $Author: pierrejoseph $
* @version $Revision: 13956 $
*/
package SnapManager;
import org.omg.CORBA.Any;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import fr.esrf.Tango.DevFailed;
import fr.esrf.Tango.DispLevel;
import fr.esrf.TangoDs.Command;
import fr.esrf.TangoDs.DeviceImpl;
import fr.esrf.TangoDs.TangoConst;
/**
* Class Description: This command is used to set command to equipments.
*/
public class SetEquipmentsWithCommandClass extends Command implements TangoConst {
private static final Logger LOGGER = LoggerFactory.getLogger(SetEquipmentsWithCommandClass.class);
// ===============================================================
/**
* Constructor for Command class SetEquipmentsWithCommandClass
*
* @param name command name
* @param in argin type
* @param out argout type
*/
// ===============================================================
public SetEquipmentsWithCommandClass(String name, int in, int out) {
super(name, in, out);
}
// ===============================================================
/**
* Constructor for Command class SetEquipmentsWithCommandClass
*
* @param name command name
* @param in argin type
* @param in_comments argin description
* @param out argout type
* @param out_comments argout description
*/
// ===============================================================
public SetEquipmentsWithCommandClass(String name, int in, int out, String in_comments, String out_comments) {
super(name, in, out, in_comments, out_comments);
}
// ===============================================================
/**
* Constructor for Command class SetEquipmentsWithCommandClass
*
* @param name command name
* @param in argin type
* @param in_comments argin description
* @param out argout type
* @param out_comments argout description
* @param level The command display type OPERATOR or EXPERT
*/
// ===============================================================
public SetEquipmentsWithCommandClass(String name, int in, int out, String in_comments, String out_comments,
DispLevel level) {
super(name, in, out, in_comments, out_comments, level);
}
// ===============================================================
/**
* return the result of the device's command.
*/
// ===============================================================
@Override
public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
LOGGER.info("SetEquipmentsWithCommandClass.execute(): arrived");
String[] argin = extract_DevVarStringArray(in_any);
return insert(((SnapManager) (device)).set_equipments_with_command(argin));
}
// ===============================================================
/**
* Check if it is allowed to execute the command.
*/
// ===============================================================
@Override
public boolean is_allowed(DeviceImpl device, Any data_in) {
// End of Generated Code
// Re-Start of Generated Code
return true;
}
}
// -----------------------------------------------------------------------------
/*
* end of $Source:
* /cvsroot/tango-cs/archiving/server/snapArchivingServers/src/main
* /java/SnapManager/SetEquipmentsWithCommandClass.java,v $
*/
//+======================================================================
// $Source: /cvsroot/tango-cs/tango/jserver/snapshoting/SnapManager/SetEquipmentsWithSnapshotClass.java,v $
//
// Project: Tango Device Server
//
// Description: Java source code for the command TemplateClass of the
// SnapManager class.
//
// $Author: chinkumo $
//
// $Revision: 1.3 $
//
// $Log: SetEquipmentsWithSnapshotClass.java,v $
// Revision 1.3 2005/11/29 17:34:34 chinkumo
// no message
//
// Revision 1.2.2.2 2005/11/29 16:18:25 chinkumo
// Code reformated (pogo compatible)
//
// Revision 1.2.2.1 2005/11/15 13:45:32 chinkumo
// ...
//
// Revision 1.2 2005/08/19 14:48:31 chinkumo
// no message
//
// Revision 1.1.2.1 2005/08/11 08:17:45 chinkumo
// The 'SetEquipement' command and thus functionnality was added.
//
//
// copyleft : European Synchrotron Radiation Facility
// BP 220, Grenoble 38043
// FRANCE
//
//-======================================================================
//
// This file is generated by POGO
// (Program Obviously used to Generate tango Object)
//
// (c) - Software Engineering Group - ESRF
//=============================================================================
/**
* @author $Author: chinkumo $
* @version $Revision: 1.3 $
*/
package SnapManager;
import org.omg.CORBA.Any;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import fr.esrf.Tango.DevFailed;
import fr.esrf.Tango.DispLevel;
import fr.esrf.TangoDs.Command;
import fr.esrf.TangoDs.DeviceImpl;
import fr.esrf.TangoDs.TangoConst;
/**
* Class Description: This command is used to set values to equipments.
*/
public class SetEquipmentsWithSnapshotClass extends Command implements TangoConst {
private static final Logger LOGGER = LoggerFactory.getLogger(SetEquipmentsWithSnapshotClass.class);
// ===============================================================
/**
* Constructor for Command class SetEquipmentsWithSnapshotClass
*
* @param name command name
* @param in argin type
* @param out argout type
*/
// ===============================================================
public SetEquipmentsWithSnapshotClass(String name, int in, int out) {
super(name, in, out);
}
// ===============================================================
/**
* Constructor for Command class SetEquipmentsWithSnapshotClass
*
* @param name command name
* @param in argin type
* @param in_comments argin description
* @param out argout type
* @param out_comments argout description
*/
// ===============================================================
public SetEquipmentsWithSnapshotClass(String name, int in, int out, String in_comments, String out_comments) {
super(name, in, out, in_comments, out_comments);
}
// ===============================================================
/**
* Constructor for Command class SetEquipmentsWithSnapshotClass
*
* @param name command name
* @param in argin type
* @param in_comments argin description
* @param out argout type
* @param out_comments argout description
* @param level The command display type OPERATOR or EXPERT
*/
// ===============================================================
public SetEquipmentsWithSnapshotClass(String name, int in, int out, String in_comments, String out_comments,
DispLevel level) {
super(name, in, out, in_comments, out_comments, level);
}
// ===============================================================
/**
* return the result of the device's command.
*/
// ===============================================================
@Override
public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
LOGGER.info("SetEquipmentsWithSnapshotClass.execute(): arrived");
String[] argin = extract_DevVarStringArray(in_any);
((SnapManager) (device)).set_equipments_with_snapshot(argin);
return insert();
}
// ===============================================================
/**
* Check if it is allowed to execute the command.
*/
// ===============================================================
@Override
public boolean is_allowed(DeviceImpl device, Any data_in) {
// End of Generated Code
// Re-Start of Generated Code
return true;
}
}
// -----------------------------------------------------------------------------
/*
* end of $Source:/cvsroot/tango-cs/tango/jserver/snapshoting/SnapManager/
* SetEquipmentsWithSnapshotClass.java,v $
*/
This diff is collapsed.
// +======================================================================
// $Source: /cvsroot/tango-cs/tango/jserver/snapshoting/SnapManager/SnapManagerClass.java,v $
//
// Project: Tango Device Server
//
// Description: java source code for the SnapManager class .
// This class is a singleton class and implements everything
// which exists only once for all the SnapManager object
// It inherits from the DeviceClass class.
//
// $Author: pierrejoseph $
//
// $Revision: 1.14 $
//
// $Log: SnapManagerClass.java,v $
// Revision 1.14 2007/12/12 17:39:42 pierrejoseph
// Add comments on the SetEquipments method for the Javadoc
//
// Revision 1.13 2007/11/16 10:16:55 soleilarc
// Author: XPigeon
// Mantis bug ID: 5341
// Comment : Add the SetEquipments method in the commands list.
//
// Revision 1.12 2007/05/11 13:58:53 pierrejoseph
// Attribute addition : release version
//
// Revision 1.11 2006/12/06 10:16:02 ounsy
// minor changes
//
// Revision 1.10 2006/04/21 09:05:28 ounsy
// New command "UpdateSnapComment" added
//
// Revision 1.9 2006/03/27 13:58:35 ounsy
// organized imports
//
// Revision 1.8 2005/11/29 17:34:34 chinkumo
// no message
//
// Revision 1.7.2.2 2005/11/29 16:18:25 chinkumo
// Code reformated (pogo compatible)
//
// Revision 1.7.2.1 2005/11/15 13:45:32 chinkumo
// ...
//
// Revision 1.7 2005/08/19 14:03:26 chinkumo
// no message
//
// Revision 1.6.6.1 2005/08/11 08:16:44 chinkumo
// The 'SetEquipement' command and thus functionnality was added.
//
// Revision 1.6 2005/06/22 09:28:34 chinkumo
// Tango V5 regenerated.
//
//
// copyleft : European Synchrotron Radiation Facility
// BP 220, Grenoble 38043
// FRANCE
//
//-======================================================================
//
// This file is generated by POGO
// (Program Obviously used to Generate tango Object)
//
// (c) - Software Engineering Group - ESRF
//=============================================================================
package SnapManager;
import java.util.MissingResourceException;
import java.util.ResourceBundle;
import java.util.Vector;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import fr.esrf.Tango.AttrWriteType;
import fr.esrf.Tango.DevFailed;
import fr.esrf.Tango.DispLevel;
import fr.esrf.TangoApi.DbDatum;
import fr.esrf.TangoDs.Attr;
import fr.esrf.TangoDs.DeviceClass;
import fr.esrf.TangoDs.DeviceImpl;
import fr.esrf.TangoDs.TangoConst;
import fr.esrf.TangoDs.TemplCommandInOut;
import fr.esrf.TangoDs.Util;
public class SnapManagerClass extends DeviceClass implements TangoConst {
private static final Logger LOGGER = LoggerFactory.getLogger(SnapManagerClass.class);
/**
* SnapManagerClass class instance (it is a singleton).
*/
private static SnapManagerClass _instance = null;
/**
* Class properties array.
*/
// private final DbDatum[] cl_prop = null;
// --------- Start of properties data members ----------
// --------- End of properties data members ----------
// ===================================================================
//
// method : instance()
//
// description : static method to retrieve the SnapManagerClass object
// once it has been initialised
//
// ===================================================================
public static SnapManagerClass instance() {
if (_instance == null) {
LOGGER.error("SnapManagerClass is not initialised !!!");
LOGGER.error("Exiting");
System.exit(-1);
}
return _instance;
}
// ===================================================================
//
// method : Init()
//
// description : static method to create/retrieve the SnapManagerClass
// object. This method is the only one which enables a
// user to create the object
//
// in : - class_name : The class name
//
// ===================================================================
public static SnapManagerClass init(final String class_name) throws DevFailed {
if (_instance == null) {
_instance = new SnapManagerClass(class_name);
}
return _instance;
}
// ===================================================================
//
// method : SnapManagerClass()
//
// description : constructor for the SnapManagerClass class
//
// argument : in : - name : The class name
//
// ===================================================================
protected SnapManagerClass(final String name) throws DevFailed {
super(name);
LOGGER.info("Entering SnapManagerClass constructor");
LOGGER.info("Leaving SnapManagerClass constructor");
}
// ===================================================================
//
// method : command_factory()
//
// description : Create the command object(s) and store them in the
// command list
// ===================================================================
@SuppressWarnings("unchecked")
@Override
public void command_factory() {
command_list.addElement(new CreateNewContextClass("CreateNewContext", Tango_DEVVAR_STRINGARRAY, Tango_DEV_LONG,
"All the informations usefull to create a context ,Snapshot pattern).", "The new assigned context ID",
DispLevel.OPERATOR));
command_list
.addElement(new SetEquipmentsWithSnapshotClass("SetEquipmentsWithSnapshot", Tango_DEVVAR_STRINGARRAY,
Tango_DEV_VOID, "The snapshot from which equipments are set.", "", DispLevel.OPERATOR));
command_list.addElement(new SetEquipmentsWithCommandClass("SetEquipmentsWithCommand", Tango_DEVVAR_STRINGARRAY,
Tango_DEV_STRING,
"The command name, STORED_READ_VALUE || STORED_WRITE_VALUE ,\n and the snapshot ID from which equipments are set.",
"", DispLevel.OPERATOR));
command_list.addElement(new SetEquipmentsClass("SetEquipments", Tango_DEVVAR_STRINGARRAY, Tango_DEV_VOID,
"* First Case: Setpoint is done on all the snapshot attributes:\n"
+ " - argin[0]= the snap identifier\n"
+ " - argin[1]=STORED_READ_VALUE (Setpoint with theirs read values) or STORED_WRITE_VALUE (Setpoint with theirs write values)\n\n"
+ "* Second Case: Setpoint is done on a set of the snapshot attributes:\n "
+ " - argin[0]= the snap identifier\n" + " - argin[1]=the number of attributes.\n"
+ " Let us note index the last index used (for example, at this point,index = 2).\n"
+ " - argin[index]=NEW_VALUE or STORED_READ_VALUE or STORED_WRITE_VALUE\n"
+ " - argin[index+1]= the attribut name\n"
+ " - argin[index+2]= the value to set when NEW_VALUE is requested",
"", DispLevel.OPERATOR));
command_list.addElement(new UpdateSnapCommentClass("UpdateSnapComment", Tango_DEVVAR_LONGSTRINGARRAY,
Tango_DEV_VOID, "1) snapshot identifier 2) The new comment", "", DispLevel.OPERATOR));
// Modify LaunchSnapShot call from archiver to manager
command_list.addElement(new LaunchSnapShotCmd("LaunchSnapShot", Tango_DEV_LONG, Tango_DEV_VOID,
"The snapshot associated context's identifier", "", DispLevel.OPERATOR));
command_list.addElement(new TemplCommandInOut("GetSnapShotResult", "getSnapShotResult",
"The snapshot associated context's identifier", "The new snapshot identifier", DispLevel.OPERATOR));
command_list.addElement(new TemplCommandInOut("GetSnapShotComment", "getSnapComment", "The snapshot id",
"The comment", DispLevel.OPERATOR));
// // add polling if any
// for (int i = 0; i < command_list.size(); i++) {
// final Command cmd = (Command) command_list.elementAt(i);
// }
}
// =============================================================================
//
// Method: attribute_factory(Vector att_list)
//
// =============================================================================
@SuppressWarnings("unchecked")
@Override
public void attribute_factory(final Vector att_list) throws DevFailed {
// Attribute : version
final Attr version = new Attr("version", Tango_DEV_STRING, AttrWriteType.READ);
att_list.addElement(version);
}
// ===================================================================
//
// method : device_factory()
//
// description : Create the device object(s) and store them in the
// device list
//
// argument : in : String[] devlist : The device name list
//
// ===================================================================
@SuppressWarnings("unchecked")
@Override
public void device_factory(final String[] devlist) throws DevFailed {
String device_version = "unkown";
try {
device_version = ResourceBundle.getBundle("application").getString("project.version");
} catch (final MissingResourceException e) {
}
for (int i = 0; i < devlist.length; i++) {
// Util.out4.println("Device name : " + devlist[ i ]);
// Create device and add it into the device list
// ----------------------------------------------
device_list.addElement(new SnapManager(this, devlist[i], device_version));
// Export device to the outside world
// ----------------------------------------------
if (Util._UseDb == true) {
export_device((DeviceImpl) device_list.elementAt(i));
} else {
export_device((DeviceImpl) device_list.elementAt(i), devlist[i]);
}
}
}
// ===================================================================
/**
* Get the class property for specified name.
*
* @param name
* The property name.
* @throws DevFailed
*/
// ===================================================================
public DbDatum get_class_property(final String name) throws DevFailed {
final DbDatum[] classProps = get_db_class().get_property(new String[] { name });
return classProps[0];
}
}
// +======================================================================
// $Source$
//
// Project: Tango Device Server
//
// Description: Java source code for the command TemplateClass of the
// SnapManager class.
//
// $Author$
//
// $Revision$
//
// $Log$
// Revision 1.1 2006/04/21 09:05:28 ounsy
// New command "UpdateSnapComment" added
//
//
// copyleft : European Synchrotron Radiation Facility
// BP 220, Grenoble 38043
// FRANCE
//
//-======================================================================
//
// This file is generated by POGO
// (Program Obviously used to Generate tango Object)
//
// (c) - Software Engineering Group - ESRF
//=============================================================================
/**
* @author $Author$
* @version $Revision$
*/
package SnapManager;
import org.omg.CORBA.Any;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import fr.esrf.Tango.DevFailed;
import fr.esrf.Tango.DevVarLongStringArray;
import fr.esrf.Tango.DispLevel;
import fr.esrf.TangoDs.Command;
import fr.esrf.TangoDs.DeviceImpl;
import fr.esrf.TangoDs.TangoConst;
/**
* Class Description: This command updates the comment of given snapshot
*
*/
public class UpdateSnapCommentClass extends Command implements TangoConst {
private static final Logger LOGGER = LoggerFactory.getLogger(UpdateSnapCommentClass.class);
// ===============================================================
/**
* Constructor for Command class UpdateSnapCommentClass
*
* @param name command name
* @param in argin type
* @param out argout type
*/
// ===============================================================
public UpdateSnapCommentClass(String name, int in, int out) {
super(name, in, out);
}
// ===============================================================
/**
* Constructor for Command class UpdateSnapCommentClass
*
* @param name command name
* @param in argin type
* @param in_comments argin description
* @param out argout type
* @param out_comments argout description
*/
// ===============================================================
public UpdateSnapCommentClass(String name, int in, int out, String in_comments, String out_comments) {
super(name, in, out, in_comments, out_comments);
}
// ===============================================================
/**
* Constructor for Command class UpdateSnapCommentClass
*
* @param name command name
* @param in argin type
* @param in_comments argin description
* @param out argout type
* @param out_comments argout description
* @param level The command display type OPERATOR or EXPERT
*/
// ===============================================================
public UpdateSnapCommentClass(String name, int in, int out, String in_comments, String out_comments,
DispLevel level) {
super(name, in, out, in_comments, out_comments, level);
}
// ===============================================================
/**
* return the result of the device's command.
*/
// ===============================================================
@Override
public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
LOGGER.info("UpdateSnapCommentClass.execute(): arrived");
DevVarLongStringArray argin = extract_DevVarLongStringArray(in_any);
((SnapManager) (device)).update_snap_comment(argin);
return insert();
}
// ===============================================================
/**
* Check if it is allowed to execute the command.
*/
// ===============================================================
@Override
public boolean is_allowed(DeviceImpl device, Any data_in) {
// End of Generated Code
// Re-Start of Generated Code
return true;
}
}
// -----------------------------------------------------------------------------
/* end of $Source$ */
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment