Skip to content
Snippets Groups Projects
Commit 4a478b13 authored by Gwenaelle ABEILLE's avatar Gwenaelle ABEILLE
Browse files

migration to maven mutli-modules

parent 54ffcb38
No related branches found
No related tags found
No related merge requests found
Showing
with 0 additions and 4796 deletions
//+======================================================================
// $Source: /cvsroot/tango-cs/tango/jserver/archiving/ArchivingManager/ArchivingConfigureCmd.java,v $
//
// Project: Tango Device Server
//
// Description: Java source code for the command TemplateClass of the
// ArchivingManager class.
//
// $Author: chinkumo $
//
// $Revision: 1.6 $
//
// $Log: ArchivingConfigureCmd.java,v $
// Revision 1.6 2005/11/29 17:34:41 chinkumo
// no message
//
// Revision 1.5.10.2 2005/11/29 16:14:07 chinkumo
// Code reformated (pogo compatible)
//
// Revision 1.5.10.1 2005/11/15 13:46:23 chinkumo
// ...
//
// Revision 1.5 2005/06/14 10:24:03 chinkumo
// Branch (archivingManager_1_0_1-branch_0) and HEAD merged.
//
// Revision 1.4.4.1 2005/06/13 14:51:15 chinkumo
// The ArchivingManager device was regenerated in Tango V5.
//
// Revision 1.4 2005/01/28 13:11:13 taurel
// Some changes in source files to be Pogo compatible
//
//
// 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.6 $
*/
package ArchivingManager;
import org.omg.CORBA.Any;
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.Util;
/**
* Class Description: This command configures the connection to the historical
* and temporary databases. It then needs 4 parameters : a login and password
* for Hdb + a login and password for Tdb
*/
public class ArchivingConfigureCmd extends Command {
// ===============================================================
/**
* Constructor for Command class ArchivingConfigureCmd
*
* @param name
* command name
* @param in
* argin type
* @param out
* argout type
*/
// ===============================================================
public ArchivingConfigureCmd(final String name, final int in, final int out) {
super(name, in, out);
}
// ===============================================================
/**
* Constructor for Command class ArchivingConfigureCmd
*
* @param name
* command name
* @param in
* argin type
* @param inComments
* argin description
* @param out
* argout type
* @param outComments
* argout description
*/
// ===============================================================
public ArchivingConfigureCmd(final String name, final int in, final int out, final String inComments,
final String outComments) {
super(name, in, out, inComments, outComments);
}
// ===============================================================
/**
* Constructor for Command class ArchivingConfigureCmd
*
* @param name
* command name
* @param in
* argin type
* @param inComments
* argin description
* @param out
* argout type
* @param outComments
* argout description
* @param level
* The command display type OPERATOR or EXPERT
*/
// ===============================================================
public ArchivingConfigureCmd(final String name, final int in, final int out, final String inComments,
final String outComments, final DispLevel level) {
super(name, in, out, inComments, outComments, level);
}
// ===============================================================
/**
* return the result of the device's command.
*/
// ===============================================================
@Override
public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
Util.out2.println("ArchivingConfigureCmd.execute(): arrived");
if (!(device instanceof ArchivingManager)) {
Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of ArchivingManager",
"ArchivingManager");
}
final String[] argin = extract_DevVarStringArray(in_any);
((ArchivingManager) device).archiving_configure(argin);
return insert();
}
// ===============================================================
/**
* Check if it is allowed to execute the command.
*/
// ===============================================================
@Override
public boolean is_allowed(final DeviceImpl device, final Any dataIn) {
// End of Generated Code
// Re-Start of Generated Code
return true;
}
}
// -----------------------------------------------------------------------------
/*
* end of $Source:
* /cvsroot/tango-cs/tango/jserver/archiving/ArchivingManager/ArchivingConfigureCmd
* .java,v $
*/
This diff is collapsed.
This diff is collapsed.
//+======================================================================
// $Source: /cvsroot/tango-cs/tango/jserver/archiving/ArchivingManager/ArchivingModifHdbCmd.java,v $
//
// Project: Tango Device Server
//
// Description: Java source code for the command TemplateClass of the
// ArchivingManager class.
//
// $Author: chinkumo $
//
// $Revision: 1.4 $
//
// $Log: ArchivingModifHdbCmd.java,v $
// Revision 1.4 2005/11/29 17:34:41 chinkumo
// no message
//
// Revision 1.3.10.2 2005/11/29 16:14:07 chinkumo
// Code reformated (pogo compatible)
//
// Revision 1.3.10.1 2005/11/15 13:46:24 chinkumo
// ...
//
// Revision 1.3 2005/06/14 10:24:03 chinkumo
// Branch (archivingManager_1_0_1-branch_0) and HEAD merged.
//
// Revision 1.2.4.1 2005/06/13 14:29:28 chinkumo
// The ArchivingManager device was regenerated in Tango V5.
// This command was also modified. It now returns a void object.
//
// Revision 1.2 2005/01/28 13:11:14 taurel
// Some changes in source files to be Pogo compatible
//
//
// 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.4 $
*/
package ArchivingManager;
import org.omg.CORBA.Any;
import fr.esrf.Tango.DevFailed;
import fr.esrf.Tango.DevState;
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;
import fr.esrf.TangoDs.Util;
/**
* Class Description: Change the mode of an historical archiving.
*/
public class ArchivingModifHdbCmd extends Command implements TangoConst {
// ===============================================================
/**
* Constructor for Command class ArchivingModifHdbCmd
*
* @param name
* command name
* @param in
* argin type
* @param out
* argout type
*/
// ===============================================================
public ArchivingModifHdbCmd(String name, int in, int out) {
super(name, in, out);
}
// ===============================================================
/**
* Constructor for Command class ArchivingModifHdbCmd
*
* @param name
* command name
* @param in
* argin type
* @param in_comments
* argin description
* @param out
* argout type
* @param out_comments
* argout description
*/
// ===============================================================
public ArchivingModifHdbCmd(String name, int in, int out, String in_comments, String out_comments) {
super(name, in, out, in_comments, out_comments);
}
// ===============================================================
/**
* Constructor for Command class ArchivingModifHdbCmd
*
* @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 ArchivingModifHdbCmd(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 {
Util.out2.println("ArchivingModifHdbCmd.execute(): arrived");
if (!(device instanceof ArchivingManager)) {
Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of ArchivingManager", "ArchivingManager");
}
String[] argin = extract_DevVarStringArray(in_any);
((ArchivingManager) (device)).archiving_modif_hdb(argin);
return insert();
}
// ===============================================================
/**
* Check if it is allowed to execute the command.
*/
// ===============================================================
@Override
public boolean is_allowed(DeviceImpl device, Any data_in) {
if (device.get_state() == DevState.INIT || device.get_state() == DevState.FAULT) {
// End of Generated Code
// Re-Start of Generated Code
return false;
}
return true;
}
}
// -----------------------------------------------------------------------------
/*
* end of $Source:
* /cvsroot/tango-cs/tango/jserver/archiving/ArchivingManager/ArchivingModifHdbCmd
* .java,v $
*/
//+======================================================================
// $Source: /cvsroot/tango-cs/tango/jserver/archiving/ArchivingManager/ArchivingModifTdbCmd.java,v $
//
// Project: Tango Device Server
//
// Description: Java source code for the command TemplateClass of the
// ArchivingManager class.
//
// $Author: chinkumo $
//
// $Revision: 1.4 $
//
// $Log: ArchivingModifTdbCmd.java,v $
// Revision 1.4 2005/11/29 17:34:41 chinkumo
// no message
//
// Revision 1.3.10.2 2005/11/29 16:14:07 chinkumo
// Code reformated (pogo compatible)
//
// Revision 1.3.10.1 2005/11/15 13:46:24 chinkumo
// ...
//
// Revision 1.3 2005/06/14 10:24:03 chinkumo
// Branch (archivingManager_1_0_1-branch_0) and HEAD merged.
//
// Revision 1.2.4.1 2005/06/13 14:29:28 chinkumo
// The ArchivingManager device was regenerated in Tango V5.
// This command was also modified. It now returns a void object.
//
// Revision 1.2 2005/01/28 13:11:14 taurel
// Some changes in source files to be Pogo compatible
//
//
// 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.4 $
*/
package ArchivingManager;
import org.omg.CORBA.Any;
import fr.esrf.Tango.DevFailed;
import fr.esrf.Tango.DevState;
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;
import fr.esrf.TangoDs.Util;
/**
* Class Description: Change the mode of a temporary archiving.
*/
public class ArchivingModifTdbCmd extends Command implements TangoConst {
// ===============================================================
/**
* Constructor for Command class ArchivingModifTdbCmd
*
* @param name
* command name
* @param in
* argin type
* @param out
* argout type
*/
// ===============================================================
public ArchivingModifTdbCmd(String name, int in, int out) {
super(name, in, out);
}
// ===============================================================
/**
* Constructor for Command class ArchivingModifTdbCmd
*
* @param name
* command name
* @param in
* argin type
* @param in_comments
* argin description
* @param out
* argout type
* @param out_comments
* argout description
*/
// ===============================================================
public ArchivingModifTdbCmd(String name, int in, int out, String in_comments, String out_comments) {
super(name, in, out, in_comments, out_comments);
}
// ===============================================================
/**
* Constructor for Command class ArchivingModifTdbCmd
*
* @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 ArchivingModifTdbCmd(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 {
Util.out2.println("ArchivingModifTdbCmd.execute(): arrived");
if (!(device instanceof ArchivingManager)) {
Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of ArchivingManager", "ArchivingManager");
}
String[] argin = extract_DevVarStringArray(in_any);
((ArchivingManager) (device)).archiving_modif_tdb(argin);
return insert();
}
// ===============================================================
/**
* Check if it is allowed to execute the command.
*/
// ===============================================================
@Override
public boolean is_allowed(DeviceImpl device, Any data_in) {
if (device.get_state() == DevState.INIT || device.get_state() == DevState.FAULT) {
// End of Generated Code
// Re-Start of Generated Code
return false;
}
return true;
}
}
// -----------------------------------------------------------------------------
/*
* end of $Source:
* /cvsroot/tango-cs/tango/jserver/archiving/ArchivingManager/ArchivingModifTdbCmd
* .java,v $
*/
//+======================================================================
// $Source: /cvsroot/tango-cs/tango/jserver/archiving/ArchivingManager/ArchivingStartHdbCmd.java,v $
//
// Project: Tango Device Server
//
// Description: Java source code for the command TemplateClass of the
// ArchivingManager class.
//
// $Author: chinkumo $
//
// $Revision: 1.4 $
//
// $Log: ArchivingStartHdbCmd.java,v $
// Revision 1.4 2005/11/29 17:34:41 chinkumo
// no message
//
// Revision 1.3.10.2 2005/11/29 16:14:07 chinkumo
// Code reformated (pogo compatible)
//
// Revision 1.3.10.1 2005/11/15 13:46:24 chinkumo
// ...
//
// Revision 1.3 2005/06/14 10:24:03 chinkumo
// Branch (archivingManager_1_0_1-branch_0) and HEAD merged.
//
// Revision 1.2.4.1 2005/06/13 14:29:28 chinkumo
// The ArchivingManager device was regenerated in Tango V5.
// This command was also modified. It now returns a void object.
//
// Revision 1.2 2005/01/28 13:11:14 taurel
// Some changes in source files to be Pogo compatible
//
//
// 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.4 $
*/
package ArchivingManager;
import org.omg.CORBA.Any;
import fr.esrf.Tango.DevFailed;
import fr.esrf.Tango.DevState;
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;
import fr.esrf.TangoDs.Util;
/**
* Class Description: Start an historical archiving for the specified
* attributes, and following the specified mode.
*/
public class ArchivingStartHdbCmd extends Command implements TangoConst {
// ===============================================================
/**
* Constructor for Command class ArchivingStartHdbCmd
*
* @param name
* command name
* @param in
* argin type
* @param out
* argout type
*/
// ===============================================================
public ArchivingStartHdbCmd(String name, int in, int out) {
super(name, in, out);
}
// ===============================================================
/**
* Constructor for Command class ArchivingStartHdbCmd
*
* @param name
* command name
* @param in
* argin type
* @param in_comments
* argin description
* @param out
* argout type
* @param out_comments
* argout description
*/
// ===============================================================
public ArchivingStartHdbCmd(String name, int in, int out, String in_comments, String out_comments) {
super(name, in, out, in_comments, out_comments);
}
// ===============================================================
/**
* Constructor for Command class ArchivingStartHdbCmd
*
* @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 ArchivingStartHdbCmd(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 {
Util.out2.println("ArchivingStartHdbCmd.execute(): arrived");
if (!(device instanceof ArchivingManager)) {
Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of ArchivingManager", "ArchivingManager");
}
String[] argin = extract_DevVarStringArray(in_any);
((ArchivingManager) (device)).archiving_start_hdb(argin);
return insert();
}
// ===============================================================
/**
* Check if it is allowed to execute the command.
*/
// ===============================================================
@Override
public boolean is_allowed(DeviceImpl device, Any data_in) {
if (device.get_state() == DevState.INIT || device.get_state() == DevState.FAULT) {
// End of Generated Code
// Re-Start of Generated Code
return false;
}
return true;
}
}
// -----------------------------------------------------------------------------
/*
* end of $Source:
* /cvsroot/tango-cs/tango/jserver/archiving/ArchivingManager/ArchivingStartHdbCmd
* .java,v $
*/
//+======================================================================
// $Source: /cvsroot/tango-cs/tango/jserver/archiving/ArchivingManager/ArchivingStartTdbCmd.java,v $
//
// Project: Tango Device Server
//
// Description: Java source code for the command TemplateClass of the
// ArchivingManager class.
//
// $Author: chinkumo $
//
// $Revision: 1.4 $
//
// $Log: ArchivingStartTdbCmd.java,v $
// Revision 1.4 2005/11/29 17:34:41 chinkumo
// no message
//
// Revision 1.3.10.2 2005/11/29 16:14:07 chinkumo
// Code reformated (pogo compatible)
//
// Revision 1.3.10.1 2005/11/15 13:46:24 chinkumo
// ...
//
// Revision 1.3 2005/06/14 10:24:03 chinkumo
// Branch (archivingManager_1_0_1-branch_0) and HEAD merged.
//
// Revision 1.2.4.1 2005/06/13 14:29:28 chinkumo
// The ArchivingManager device was regenerated in Tango V5.
// This command was also modified. It now returns a void object.
//
// Revision 1.2 2005/01/28 13:11:14 taurel
// Some changes in source files to be Pogo compatible
//
//
// 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.4 $
*/
package ArchivingManager;
import org.omg.CORBA.Any;
import fr.esrf.Tango.DevFailed;
import fr.esrf.Tango.DevState;
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;
import fr.esrf.TangoDs.Util;
/**
* Class Description: Start an temporary archiving for the specified attributes,
* and following the specified mode.
*/
public class ArchivingStartTdbCmd extends Command implements TangoConst {
// ===============================================================
/**
* Constructor for Command class ArchivingStartTdbCmd
*
* @param name
* command name
* @param in
* argin type
* @param out
* argout type
*/
// ===============================================================
public ArchivingStartTdbCmd(String name, int in, int out) {
super(name, in, out);
}
// ===============================================================
/**
* Constructor for Command class ArchivingStartTdbCmd
*
* @param name
* command name
* @param in
* argin type
* @param in_comments
* argin description
* @param out
* argout type
* @param out_comments
* argout description
*/
// ===============================================================
public ArchivingStartTdbCmd(String name, int in, int out, String in_comments, String out_comments) {
super(name, in, out, in_comments, out_comments);
}
// ===============================================================
/**
* Constructor for Command class ArchivingStartTdbCmd
*
* @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 ArchivingStartTdbCmd(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 {
Util.out2.println("ArchivingStartTdbCmd.execute(): arrived");
if (!(device instanceof ArchivingManager)) {
Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of ArchivingManager", "ArchivingManager");
}
String[] argin = extract_DevVarStringArray(in_any);
((ArchivingManager) (device)).archiving_start_tdb(argin);
return insert();
}
// ===============================================================
/**
* Check if it is allowed to execute the command.
*/
// ===============================================================
@Override
public boolean is_allowed(DeviceImpl device, Any data_in) {
if (device.get_state() == DevState.INIT || device.get_state() == DevState.FAULT) {
// End of Generated Code
// Re-Start of Generated Code
return false;
}
return true;
}
}
// -----------------------------------------------------------------------------
/*
* end of $Source:
* /cvsroot/tango-cs/tango/jserver/archiving/ArchivingManager/ArchivingStartTdbCmd
* .java,v $
*/
//+======================================================================
// $Source: /cvsroot/tango-cs/tango/jserver/archiving/ArchivingManager/ArchivingStopHdbCmd.java,v $
//
// Project: Tango Device Server
//
// Description: Java source code for the command TemplateClass of the
// ArchivingManager class.
//
// $Author: chinkumo $
//
// $Revision: 1.4 $
//
// $Log: ArchivingStopHdbCmd.java,v $
// Revision 1.4 2005/11/29 17:34:41 chinkumo
// no message
//
// Revision 1.3.10.2 2005/11/29 16:14:07 chinkumo
// Code reformated (pogo compatible)
//
// Revision 1.3.10.1 2005/11/15 13:46:24 chinkumo
// ...
//
// Revision 1.3 2005/06/14 10:24:03 chinkumo
// Branch (archivingManager_1_0_1-branch_0) and HEAD merged.
//
// Revision 1.2.4.1 2005/06/13 14:29:28 chinkumo
// The ArchivingManager device was regenerated in Tango V5.
// This command was also modified. It now returns a void object.
//
// Revision 1.2 2005/01/28 13:11:14 taurel
// Some changes in source files to be Pogo compatible
//
//
// 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.4 $
*/
package ArchivingManager;
import org.omg.CORBA.Any;
import fr.esrf.Tango.DevFailed;
import fr.esrf.Tango.DevState;
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;
import fr.esrf.TangoDs.Util;
/**
* Class Description: Stops the historical archiving for the given attributes.
*/
public class ArchivingStopHdbCmd extends Command implements TangoConst {
// ===============================================================
/**
* Constructor for Command class ArchivingStopHdbCmd
*
* @param name
* command name
* @param in
* argin type
* @param out
* argout type
*/
// ===============================================================
public ArchivingStopHdbCmd(String name, int in, int out) {
super(name, in, out);
}
// ===============================================================
/**
* Constructor for Command class ArchivingStopHdbCmd
*
* @param name
* command name
* @param in
* argin type
* @param in_comments
* argin description
* @param out
* argout type
* @param out_comments
* argout description
*/
// ===============================================================
public ArchivingStopHdbCmd(String name, int in, int out, String in_comments, String out_comments) {
super(name, in, out, in_comments, out_comments);
}
// ===============================================================
/**
* Constructor for Command class ArchivingStopHdbCmd
*
* @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 ArchivingStopHdbCmd(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 {
Util.out2.println("ArchivingStopHdbCmd.execute(): arrived");
if (!(device instanceof ArchivingManager)) {
Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of ArchivingManager", "ArchivingManager");
}
String[] argin = extract_DevVarStringArray(in_any);
((ArchivingManager) (device)).archiving_stop_hdb(argin);
return insert();
}
// ===============================================================
/**
* Check if it is allowed to execute the command.
*/
// ===============================================================
@Override
public boolean is_allowed(DeviceImpl device, Any data_in) {
if (device.get_state() == DevState.INIT || device.get_state() == DevState.FAULT) {
// End of Generated Code
// Re-Start of Generated Code
return false;
}
return true;
}
}
// -----------------------------------------------------------------------------
/*
* end of $Source:
* /cvsroot/tango-cs/tango/jserver/archiving/ArchivingManager/ArchivingStopHdbCmd
* .java,v $
*/
//+======================================================================
// $Source: /cvsroot/tango-cs/tango/jserver/archiving/ArchivingManager/ArchivingStopTdbCmd.java,v $
//
// Project: Tango Device Server
//
// Description: Java source code for the command TemplateClass of the
// ArchivingManager class.
//
// $Author: chinkumo $
//
// $Revision: 1.4 $
//
// $Log: ArchivingStopTdbCmd.java,v $
// Revision 1.4 2005/11/29 17:34:41 chinkumo
// no message
//
// Revision 1.3.10.2 2005/11/29 16:14:07 chinkumo
// Code reformated (pogo compatible)
//
// Revision 1.3.10.1 2005/11/15 13:46:24 chinkumo
// ...
//
// Revision 1.3 2005/06/14 10:24:03 chinkumo
// Branch (archivingManager_1_0_1-branch_0) and HEAD merged.
//
// Revision 1.2.4.1 2005/06/13 14:29:28 chinkumo
// The ArchivingManager device was regenerated in Tango V5.
// This command was also modified. It now returns a void object.
//
// Revision 1.2 2005/01/28 13:11:14 taurel
// Some changes in source files to be Pogo compatible
//
//
// 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.4 $
*/
package ArchivingManager;
import org.omg.CORBA.Any;
import fr.esrf.Tango.DevFailed;
import fr.esrf.Tango.DevState;
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;
import fr.esrf.TangoDs.Util;
/**
* Class Description: Stops the temporary archiving for the given attributes.
*/
public class ArchivingStopTdbCmd extends Command implements TangoConst {
// ===============================================================
/**
* Constructor for Command class ArchivingStopTdbCmd
*
* @param name
* command name
* @param in
* argin type
* @param out
* argout type
*/
// ===============================================================
public ArchivingStopTdbCmd(String name, int in, int out) {
super(name, in, out);
}
// ===============================================================
/**
* Constructor for Command class ArchivingStopTdbCmd
*
* @param name
* command name
* @param in
* argin type
* @param in_comments
* argin description
* @param out
* argout type
* @param out_comments
* argout description
*/
// ===============================================================
public ArchivingStopTdbCmd(String name, int in, int out, String in_comments, String out_comments) {
super(name, in, out, in_comments, out_comments);
}
// ===============================================================
/**
* Constructor for Command class ArchivingStopTdbCmd
*
* @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 ArchivingStopTdbCmd(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 {
Util.out2.println("ArchivingStopTdbCmd.execute(): arrived");
if (!(device instanceof ArchivingManager)) {
Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of ArchivingManager", "ArchivingManager");
}
String[] argin = extract_DevVarStringArray(in_any);
((ArchivingManager) (device)).archiving_stop_tdb(argin);
return insert();
}
// ===============================================================
/**
* Check if it is allowed to execute the command.
*/
// ===============================================================
@Override
public boolean is_allowed(DeviceImpl device, Any data_in) {
if (device.get_state() == DevState.INIT || device.get_state() == DevState.FAULT) {
// End of Generated Code
// Re-Start of Generated Code
return false;
}
return true;
}
}
// -----------------------------------------------------------------------------
/*
* end of $Source:
* /cvsroot/tango-cs/tango/jserver/archiving/ArchivingManager/ArchivingStopTdbCmd
* .java,v $
*/
//+======================================================================
// $Source: /cvsroot/tango-cs/tango/jserver/archiving/ArchivingManager/GetArchivingModeHdbCmd.java,v $
//
// Project: Tango Device Server
//
// Description: Java source code for the command TemplateClass of the
// ArchivingManager class.
//
// $Author: chinkumo $
//
// $Revision: 1.4 $
//
// $Log: GetArchivingModeHdbCmd.java,v $
// Revision 1.4 2005/11/29 17:34:41 chinkumo
// no message
//
// Revision 1.3.10.2 2005/11/29 16:14:07 chinkumo
// Code reformated (pogo compatible)
//
// Revision 1.3.10.1 2005/11/15 13:46:24 chinkumo
// ...
//
// Revision 1.3 2005/06/14 10:24:03 chinkumo
// Branch (archivingManager_1_0_1-branch_0) and HEAD merged.
//
// Revision 1.2.4.1 2005/06/13 14:27:26 chinkumo
// The ArchivingManager device was regenerated in Tango V5.
//
// Revision 1.2 2005/01/28 13:11:14 taurel
// Some changes in source files to be Pogo compatible
//
//
// 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.4 $
*/
package ArchivingManager;
import org.omg.CORBA.Any;
import fr.esrf.Tango.DevFailed;
import fr.esrf.Tango.DevState;
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;
import fr.esrf.TangoDs.Util;
/**
* Class Description: Return the historical archiving mode applied to an
* attribute.
*/
public class GetArchivingModeHdbCmd extends Command implements TangoConst {
// ===============================================================
/**
* Constructor for Command class GetArchivingModeHdbCmd
*
* @param name
* command name
* @param in
* argin type
* @param out
* argout type
*/
// ===============================================================
public GetArchivingModeHdbCmd(String name, int in, int out) {
super(name, in, out);
}
// ===============================================================
/**
* Constructor for Command class GetArchivingModeHdbCmd
*
* @param name
* command name
* @param in
* argin type
* @param in_comments
* argin description
* @param out
* argout type
* @param out_comments
* argout description
*/
// ===============================================================
public GetArchivingModeHdbCmd(String name, int in, int out, String in_comments, String out_comments) {
super(name, in, out, in_comments, out_comments);
}
// ===============================================================
/**
* Constructor for Command class GetArchivingModeHdbCmd
*
* @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 GetArchivingModeHdbCmd(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 {
Util.out2.println("GetArchivingModeHdbCmd.execute(): arrived");
if (!(device instanceof ArchivingManager)) {
Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of ArchivingManager", "ArchivingManager");
}
String argin = extract_DevString(in_any);
return insert(((ArchivingManager) (device)).get_archiving_mode_hdb(argin));
}
// ===============================================================
/**
* Check if it is allowed to execute the command.
*/
// ===============================================================
@Override
public boolean is_allowed(DeviceImpl device, Any data_in) {
if (device.get_state() == DevState.INIT || device.get_state() == DevState.FAULT) {
// End of Generated Code
// Re-Start of Generated Code
return false;
}
return true;
}
}
// -----------------------------------------------------------------------------
/*
* end of $Source:
* /cvsroot/tango-cs/tango/jserver/archiving/ArchivingManager/GetArchivingModeHdbCmd
* .java,v $
*/
//+======================================================================
// $Source: /cvsroot/tango-cs/tango/jserver/archiving/ArchivingManager/GetArchivingModeTdbCmd.java,v $
//
// Project: Tango Device Server
//
// Description: Java source code for the command TemplateClass of the
// ArchivingManager class.
//
// $Author: chinkumo $
//
// $Revision: 1.4 $
//
// $Log: GetArchivingModeTdbCmd.java,v $
// Revision 1.4 2005/11/29 17:34:41 chinkumo
// no message
//
// Revision 1.3.10.2 2005/11/29 16:14:07 chinkumo
// Code reformated (pogo compatible)
//
// Revision 1.3.10.1 2005/11/15 13:46:24 chinkumo
// ...
//
// Revision 1.3 2005/06/14 10:24:03 chinkumo
// Branch (archivingManager_1_0_1-branch_0) and HEAD merged.
//
// Revision 1.2.4.1 2005/06/13 14:27:26 chinkumo
// The ArchivingManager device was regenerated in Tango V5.
//
// Revision 1.2 2005/01/28 13:11:14 taurel
// Some changes in source files to be Pogo compatible
//
//
// 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.4 $
*/
package ArchivingManager;
import org.omg.CORBA.Any;
import fr.esrf.Tango.DevFailed;
import fr.esrf.Tango.DevState;
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;
import fr.esrf.TangoDs.Util;
/**
* Class Description: Return the temporary archiving mode applied to an
* attribute.
*/
public class GetArchivingModeTdbCmd extends Command implements TangoConst {
// ===============================================================
/**
* Constructor for Command class GetArchivingModeTdbCmd
*
* @param name
* command name
* @param in
* argin type
* @param out
* argout type
*/
// ===============================================================
public GetArchivingModeTdbCmd(String name, int in, int out) {
super(name, in, out);
}
// ===============================================================
/**
* Constructor for Command class GetArchivingModeTdbCmd
*
* @param name
* command name
* @param in
* argin type
* @param in_comments
* argin description
* @param out
* argout type
* @param out_comments
* argout description
*/
// ===============================================================
public GetArchivingModeTdbCmd(String name, int in, int out, String in_comments, String out_comments) {
super(name, in, out, in_comments, out_comments);
}
// ===============================================================
/**
* Constructor for Command class GetArchivingModeTdbCmd
*
* @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 GetArchivingModeTdbCmd(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 {
Util.out2.println("GetArchivingModeTdbCmd.execute(): arrived");
if (!(device instanceof ArchivingManager)) {
Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of ArchivingManager", "ArchivingManager");
}
String argin = extract_DevString(in_any);
return insert(((ArchivingManager) (device)).get_archiving_mode_tdb(argin));
}
// ===============================================================
/**
* Check if it is allowed to execute the command.
*/
// ===============================================================
@Override
public boolean is_allowed(DeviceImpl device, Any data_in) {
if (device.get_state() == DevState.INIT || device.get_state() == DevState.FAULT) {
// End of Generated Code
// Re-Start of Generated Code
return false;
}
return true;
}
}
// -----------------------------------------------------------------------------
/*
* end of $Source:
* /cvsroot/tango-cs/tango/jserver/archiving/ArchivingManager/GetArchivingModeTdbCmd
* .java,v $
*/
//+======================================================================
// $Source: /cvsroot/tango-cs/tango/jserver/archiving/ArchivingManager/GetStatusHdbCmd.java,v $
//
// Project: Tango Device Server
//
// Description: Java source code for the command TemplateClass of the
// ArchivingManager class.
//
// $Author: chinkumo $
//
// $Revision: 1.4 $
//
// $Log: GetStatusHdbCmd.java,v $
// Revision 1.4 2005/11/29 17:34:41 chinkumo
// no message
//
// Revision 1.3.10.2 2005/11/29 16:14:07 chinkumo
// Code reformated (pogo compatible)
//
// Revision 1.3.10.1 2005/11/15 13:46:24 chinkumo
// ...
//
// Revision 1.3 2005/06/14 10:24:03 chinkumo
// Branch (archivingManager_1_0_1-branch_0) and HEAD merged.
//
// Revision 1.2.4.1 2005/06/13 14:27:26 chinkumo
// The ArchivingManager device was regenerated in Tango V5.
//
// Revision 1.2 2005/01/28 13:11:14 taurel
// Some changes in source files to be Pogo compatible
//
//
// 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.4 $
*/
package ArchivingManager;
import org.omg.CORBA.Any;
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;
import fr.esrf.TangoDs.Util;
/**
* Class Description: For each attribute of the given list, get the status of
* the device in charge of its historical archiving
*/
public class GetStatusHdbCmd extends Command implements TangoConst {
// ===============================================================
/**
* Constructor for Command class GetStatusHdbCmd
*
* @param name
* command name
* @param in
* argin type
* @param out
* argout type
*/
// ===============================================================
public GetStatusHdbCmd(String name, int in, int out) {
super(name, in, out);
}
// ===============================================================
/**
* Constructor for Command class GetStatusHdbCmd
*
* @param name
* command name
* @param in
* argin type
* @param in_comments
* argin description
* @param out
* argout type
* @param out_comments
* argout description
*/
// ===============================================================
public GetStatusHdbCmd(String name, int in, int out, String in_comments, String out_comments) {
super(name, in, out, in_comments, out_comments);
}
// ===============================================================
/**
* Constructor for Command class GetStatusHdbCmd
*
* @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 GetStatusHdbCmd(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 {
Util.out2.println("GetStatusHdbCmd.execute(): arrived");
if (!(device instanceof ArchivingManager)) {
Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of ArchivingManager", "ArchivingManager");
}
String[] argin = extract_DevVarStringArray(in_any);
return insert(((ArchivingManager) (device)).get_status_hdb(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/archiving/ArchivingManager/GetStatusHdbCmd
* .java,v $
*/
//+======================================================================
// $Source: /cvsroot/tango-cs/tango/jserver/archiving/ArchivingManager/GetStatusTdbCmd.java,v $
//
// Project: Tango Device Server
//
// Description: Java source code for the command TemplateClass of the
// ArchivingManager class.
//
// $Author: chinkumo $
//
// $Revision: 1.4 $
//
// $Log: GetStatusTdbCmd.java,v $
// Revision 1.4 2005/11/29 17:34:41 chinkumo
// no message
//
// Revision 1.3.10.2 2005/11/29 16:14:07 chinkumo
// Code reformated (pogo compatible)
//
// Revision 1.3.10.1 2005/11/15 13:46:24 chinkumo
// ...
//
// Revision 1.3 2005/06/14 10:24:03 chinkumo
// Branch (archivingManager_1_0_1-branch_0) and HEAD merged.
//
// Revision 1.2.4.1 2005/06/13 14:27:26 chinkumo
// The ArchivingManager device was regenerated in Tango V5.
//
// Revision 1.2 2005/01/28 13:11:14 taurel
// Some changes in source files to be Pogo compatible
//
//
// 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.4 $
*/
package ArchivingManager;
import org.omg.CORBA.Any;
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;
import fr.esrf.TangoDs.Util;
/**
* Class Description: For each attribute of the given list, get the status of
* the device in charge of its temporary archiving.
*/
public class GetStatusTdbCmd extends Command implements TangoConst {
// ===============================================================
/**
* Constructor for Command class GetStatusTdbCmd
*
* @param name
* command name
* @param in
* argin type
* @param out
* argout type
*/
// ===============================================================
public GetStatusTdbCmd(String name, int in, int out) {
super(name, in, out);
}
// ===============================================================
/**
* Constructor for Command class GetStatusTdbCmd
*
* @param name
* command name
* @param in
* argin type
* @param in_comments
* argin description
* @param out
* argout type
* @param out_comments
* argout description
*/
// ===============================================================
public GetStatusTdbCmd(String name, int in, int out, String in_comments, String out_comments) {
super(name, in, out, in_comments, out_comments);
}
// ===============================================================
/**
* Constructor for Command class GetStatusTdbCmd
*
* @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 GetStatusTdbCmd(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 {
Util.out2.println("GetStatusTdbCmd.execute(): arrived");
if (!(device instanceof ArchivingManager)) {
Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of ArchivingManager", "ArchivingManager");
}
String[] argin = extract_DevVarStringArray(in_any);
return insert(((ArchivingManager) (device)).get_status_tdb(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/archiving/ArchivingManager/GetStatusTdbCmd
* .java,v $
*/
//+======================================================================
// $Source: /cvsroot/tango-cs/tango/jserver/archiving/ArchivingManager/IsArchivedHdbCmd.java,v $
//
// Project: Tango Device Server
//
// Description: Java source code for the command TemplateClass of the
// ArchivingManager class.
//
// $Author: chinkumo $
//
// $Revision: 1.4 $
//
// $Log: IsArchivedHdbCmd.java,v $
// Revision 1.4 2005/11/29 17:34:41 chinkumo
// no message
//
// Revision 1.3.10.2 2005/11/29 16:14:07 chinkumo
// Code reformated (pogo compatible)
//
// Revision 1.3.10.1 2005/11/15 13:46:24 chinkumo
// ...
//
// Revision 1.3 2005/06/14 10:24:03 chinkumo
// Branch (archivingManager_1_0_1-branch_0) and HEAD merged.
//
// Revision 1.2.4.1 2005/06/13 14:27:26 chinkumo
// The ArchivingManager device was regenerated in Tango V5.
//
// Revision 1.2 2005/01/28 13:11:14 taurel
// Some changes in source files to be Pogo compatible
//
//
// 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.4 $
*/
package ArchivingManager;
import org.omg.CORBA.Any;
import fr.esrf.Tango.DevFailed;
import fr.esrf.Tango.DevState;
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;
import fr.esrf.TangoDs.Util;
/**
* Class Description: Check the archiving state (historical archiving) for each
* attribute of the given list.
*/
public class IsArchivedHdbCmd extends Command implements TangoConst {
// ===============================================================
/**
* Constructor for Command class IsArchivedHdbCmd
*
* @param name
* command name
* @param in
* argin type
* @param out
* argout type
*/
// ===============================================================
public IsArchivedHdbCmd(String name, int in, int out) {
super(name, in, out);
}
// ===============================================================
/**
* Constructor for Command class IsArchivedHdbCmd
*
* @param name
* command name
* @param in
* argin type
* @param in_comments
* argin description
* @param out
* argout type
* @param out_comments
* argout description
*/
// ===============================================================
public IsArchivedHdbCmd(String name, int in, int out, String in_comments, String out_comments) {
super(name, in, out, in_comments, out_comments);
}
// ===============================================================
/**
* Constructor for Command class IsArchivedHdbCmd
*
* @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 IsArchivedHdbCmd(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 {
Util.out2.println("IsArchivedHdbCmd.execute(): arrived");
if (!(device instanceof ArchivingManager)) {
Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of ArchivingManager", "ArchivingManager");
}
String[] argin = extract_DevVarStringArray(in_any);
return insert(((ArchivingManager) (device)).is_archived_hdb(argin));
}
// ===============================================================
/**
* Check if it is allowed to execute the command.
*/
// ===============================================================
@Override
public boolean is_allowed(DeviceImpl device, Any data_in) {
if (device.get_state() == DevState.INIT || device.get_state() == DevState.FAULT) {
// End of Generated Code
// Re-Start of Generated Code
return false;
}
return true;
}
}
// -----------------------------------------------------------------------------
/*
* end of $Source:
* /cvsroot/tango-cs/tango/jserver/archiving/ArchivingManager/IsArchivedHdbCmd
* .java,v $
*/
//+======================================================================
// $Source: /cvsroot/tango-cs/tango/jserver/archiving/ArchivingManager/IsArchivedTdbCmd.java,v $
//
// Project: Tango Device Server
//
// Description: Java source code for the command TemplateClass of the
// ArchivingManager class.
//
// $Author: chinkumo $
//
// $Revision: 1.4 $
//
// $Log: IsArchivedTdbCmd.java,v $
// Revision 1.4 2005/11/29 17:34:41 chinkumo
// no message
//
// Revision 1.3.10.2 2005/11/29 16:14:07 chinkumo
// Code reformated (pogo compatible)
//
// Revision 1.3.10.1 2005/11/15 13:46:24 chinkumo
// ...
//
// Revision 1.3 2005/06/14 10:24:03 chinkumo
// Branch (archivingManager_1_0_1-branch_0) and HEAD merged.
//
// Revision 1.2.4.1 2005/06/13 14:27:26 chinkumo
// The ArchivingManager device was regenerated in Tango V5.
//
// Revision 1.2 2005/01/28 13:11:14 taurel
// Some changes in source files to be Pogo compatible
//
//
// 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.4 $
*/
package ArchivingManager;
import org.omg.CORBA.Any;
import fr.esrf.Tango.DevFailed;
import fr.esrf.Tango.DevState;
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;
import fr.esrf.TangoDs.Util;
/**
* Class Description: Check the archiving state (temporary archiving) for each
* attribute of the given list.
*/
public class IsArchivedTdbCmd extends Command implements TangoConst {
// ===============================================================
/**
* Constructor for Command class IsArchivedTdbCmd
*
* @param name
* command name
* @param in
* argin type
* @param out
* argout type
*/
// ===============================================================
public IsArchivedTdbCmd(String name, int in, int out) {
super(name, in, out);
}
// ===============================================================
/**
* Constructor for Command class IsArchivedTdbCmd
*
* @param name
* command name
* @param in
* argin type
* @param in_comments
* argin description
* @param out
* argout type
* @param out_comments
* argout description
*/
// ===============================================================
public IsArchivedTdbCmd(String name, int in, int out, String in_comments, String out_comments) {
super(name, in, out, in_comments, out_comments);
}
// ===============================================================
/**
* Constructor for Command class IsArchivedTdbCmd
*
* @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 IsArchivedTdbCmd(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 {
Util.out2.println("IsArchivedTdbCmd.execute(): arrived");
String[] argin = extract_DevVarStringArray(in_any);
if (!(device instanceof ArchivingManager)) {
Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of ArchivingManager", "ArchivingManager");
}
return insert(((ArchivingManager) (device)).is_archived_tdb(argin));
}
// ===============================================================
/**
* Check if it is allowed to execute the command.
*/
// ===============================================================
@Override
public boolean is_allowed(DeviceImpl device, Any data_in) {
if (device.get_state() == DevState.INIT || device.get_state() == DevState.FAULT) {
// End of Generated Code
// Re-Start of Generated Code
return false;
}
return true;
}
}
// -----------------------------------------------------------------------------
/*
* end of $Source:
* /cvsroot/tango-cs/tango/jserver/archiving/ArchivingManager/IsArchivedTdbCmd
* .java,v $
*/
ArchivingManager
src/main/java/ArchivingManager/doc_html/html/resources/inherit.gif

57 B

/* Javadoc style sheet */
/* Define colors, fonts and other style attributes here to override the defaults */
/* Page background color */
body { background-color: #FFFFFF }
/* Table colors */
.TableHeadingColor { background: #CCCCFF } /* Dark mauve */
.TableSubHeadingColor { background: #EEEEFF } /* Light mauve */
.TableRowColor { background: #FFFFFF } /* White */
/* Font used in left-hand frame lists */
.FrameTitleFont { font-size: 10pts; font-family: Helvetica, Arial, san-serif }
.FrameHeadingFont { font-size: 10pts; font-family: Helvetica, Arial, san-serif }
.FrameItemFont { font-size: 10pts; font-family: Helvetica, Arial, san-serif }
/* Example of smaller, sans-serif font in frames */
/* .FrameItemFont { font-size: 10pt; font-family: Helvetica, Arial, sans-serif } */
/* Navigation bar fonts and colors */
.NavBarCell1 { background-color:#EEEEFF;}/* Light mauve */
.NavBarCell1Rev { background-color:#00008B;}/* Dark Blue */
.NavBarFont1 { font-family: Arial, Helvetica, sans-serif; color:#000000;}
.NavBarFont1Rev { font-family: Arial, Helvetica, sans-serif; color:#FFFFFF;}
.NavBarCell2 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF;}
.NavBarCell3 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF;}
package Common.Archiver.Collector;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Date;
import java.util.Enumeration;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import org.slf4j.Logger;
import fr.esrf.TangoDs.Util;
import fr.esrf.tangoatk.core.AttributePolledList;
import fr.esrf.tangoatk.core.ErrorEvent;
import fr.esrf.tangoatk.core.IAttribute;
import fr.esrf.tangoatk.core.IErrorListener;
import fr.soleil.archiving.common.api.tools.ArchivingEvent;
import fr.soleil.archiving.hdbtdb.api.tools.DBTools;
import fr.soleil.archiving.hdbtdb.api.tools.ScalarEvent;
public abstract class ArchiverCollector implements IErrorListener {
private static final long serialVersionUID = -1493388817049590482L;
/**
* This list is the list used by the refresher of the Collector
*/
protected final AttributePolledList attributeList;
// This Map contains the mode counters by attribute
private final Map<String, ModesCounters> attributeModeCounterMap;
// This Map contains the error messages
private final Map<String, String> errorMessageMap;
// Diary file
protected final Logger logger;
/**
* An ModeHandler is associated to each Collector to handle the archiving
* mode
*/
protected ModeHandler m_modeHandler;
/**
* This field represent the refreshing rate of the Collector
*/
private boolean refreshing;
protected final SimpleDateFormat dateFormat;
public ArchiverCollector(ModeHandler modeHandler, Logger logger) {
dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
attributeList = new AttributePolledList();
attributeModeCounterMap = new ConcurrentHashMap<String, ModesCounters>();
errorMessageMap = new ConcurrentHashMap<String, String>();
m_modeHandler = modeHandler;
this.logger = logger;
}
/* Allows to indicate to the collector that a new attribute must be managed */
protected void addAttribute(String name) {
if (name != null) {
String lower = name.toLowerCase();
ModesCounters counters = attributeModeCounterMap.get(lower);
if (counters == null) {
attributeModeCounterMap.put(lower, new ModesCounters());
} else {
logger.debug("ArchiverCollector.addAttribute : The attribute " + name
+ "already exists in the map ==> Counter Re-init");
counters.init();
}
}
}
/* Allows to indicate to the collector that an attribute has been stopped */
protected void removeAttribute(String name) {
if (name != null) {
name = name.toLowerCase();
attributeModeCounterMap.remove(name);
removeErrorMessage(name);
}
}
/* Allows to retrieve the ModesCounters object of one attribute */
protected ModesCounters getModeCounter(String name) {
ModesCounters result;
if (name == null) {
result = null;
} else {
result = attributeModeCounterMap.get(name.toLowerCase());
}
return result;
}
/* Creates a ScalarEvent object from the ErrorEvent with a null value */
protected ScalarEvent getNullValueScalarEvent(ErrorEvent errorEvent, int data_type, int writable) {
return new ScalarEvent(errorEvent.getSource().toString(), data_type, writable, errorEvent.getTimeStamp(), null,
null);
}
/* Return true if the value must be archived, false otherwise */
protected boolean doArchiveEvent(ModesCounters mc, int dataType, Object readValueObject, Object lastValueObject,
String attCompleteName) {
boolean doArchive = false;
try {
doArchive = m_modeHandler.isDataArchivable(mc, dataType, readValueObject, lastValueObject);
} catch (Exception e) {
e.printStackTrace();
logger.error(this.getClass().getSimpleName() + "/doArchiveEvent/catch " + e + " with the value of "
+ attCompleteName);
}
return doArchive;
}
/**
* Triggers the collecting action of this HdbCollector.
*/
protected synchronized void startCollecting() {
if (!attributeList.isEmpty()) {
if (!attributeList.isRefresherStarted()) {
attributeList.setRefreshInterval(m_modeHandler.getRefreshInterval());
attributeList.setSynchronizedPeriod(true);
attributeList.startRefresher();
refreshing = true;
logger.debug(this.getClass() + " start refresh for " + attributeList.getSize() + " attributes");
} else {
// force a refresh for newly added attributes
attributeList.refresh();
logger.debug("FORCING refresh for " + this.getClass());
}
}
}
/**
* Stops the collecting action of this TdbCollector.
*/
protected synchronized void stopCollecting() {
try {
logger.debug(this.getClass() + " stop refresh on " + attributeList.getSize() + " attributes");
attributeList.stopRefresher();
refreshing = false;
} catch (final Exception e) {
Util.out2.println("ERROR !! " + "\r\n" + "\t Origin : \t " + "TdbCollector.stopCollecting" + "\r\n"
+ "\t Reason : \t " + e.getClass().getName() + "\r\n" + "\t Description : \t " + e.getMessage()
+ "\r\n" + "\t Additional information : \t " + "" + "\r\n");
e.printStackTrace();
}
}
/**
* Returns a boolean to know whether the attribute list is empty or not
*
* @return A boolean to know whether the attribute list is empty or not
*/
public boolean hasEmptyList() {
return attributeList.isEmpty();
}
public synchronized int[] loadAssessment() {
final int[] ret = new int[3];
final Enumeration<?> myAttList = attributeList.elements();
while (myAttList.hasMoreElements()) {
final IAttribute nextAttr = (IAttribute) myAttList.nextElement();
final int X = nextAttr.getMaxXDimension();
final int Y = nextAttr.getMaxYDimension();
int type = 0;
if (X > 1) {
type++;
}
if (Y > 1) {
type++;
}
ret[type]++;
}
return ret;
}
public Collection<String> getAttributeList() {
final Collection<String> attributeListResult = new ArrayList<String>();
final Enumeration<?> myAttList = attributeList.elements();
while (myAttList.hasMoreElements()) {
final IAttribute attr = (IAttribute) myAttList.nextElement();
attributeListResult.add(attr.getName());
}
return attributeListResult;
}
public synchronized boolean isCollected(String attributeName) {
boolean isCollected = false;
final Enumeration<?> myAttList = attributeList.elements();
while (myAttList.hasMoreElements()) {
final IAttribute attr = (IAttribute) myAttList.nextElement();
if (attr.getName().equalsIgnoreCase(attributeName)) {
isCollected = true;
break;
}
}
return isCollected;
}
public boolean isPotentiallyCollected(String attributeName) {
boolean collected;
if (attributeName == null) {
collected = false;
} else {
collected = (attributeModeCounterMap.get(attributeName.toLowerCase()) != null);
}
return collected;
}
public synchronized String assessment() {
final StringBuilder ass = new StringBuilder();
ass.append("Collector Reference : " + toString() + "\r\n");
ass.append("Activity (refreshing) : " + isRefreshing() + "\r\n");
ass.append("Mode : " + "\r\n" + m_modeHandler.getMode().toString() + "\r\n");
ass.append("Attribute list (" + attributeList.getSize() + "): " + "\r\n");
final Enumeration<?> myAttList = attributeList.elements();
int i = 1;
while (myAttList.hasMoreElements()) {
final IAttribute iNumberScalar = (IAttribute) myAttList.nextElement();
ass.append("\t" + i++ + "\t" + iNumberScalar.getName() + "\r\n");
}
return ass.toString();
}
public boolean isRefreshing() {
return refreshing;
}
protected void transmitBooleanArray(ArchivingEvent<boolean[]> event, int dim, boolean[] bval, boolean[] nullElements) {
final boolean[] bvalue = Arrays.copyOf(bval, dim);
event.setValue(bvalue, nullElements);
}
protected void transmitByteArray(ArchivingEvent<boolean[]> event, int dim, byte[] bval, boolean[] nullElements) {
final byte[] bvalue = Arrays.copyOf(bval, dim);
event.setValue(bvalue, nullElements);
}
protected void transmitShortArray(ArchivingEvent<boolean[]> event, int dim, short[] sval, boolean[] nullElements) {
final short[] svalue = Arrays.copyOf(sval, dim);
event.setValue(svalue, nullElements);
}
protected void transmitIntArray(ArchivingEvent<boolean[]> event, int dim, int[] ival, boolean[] nullElements) {
final int[] ivalue = Arrays.copyOf(ival, dim);
event.setValue(ivalue, nullElements);
}
protected void transmitLongArray(ArchivingEvent<boolean[]> event, int dim, long[] lval, boolean[] nullElements) {
final long[] lvalue = Arrays.copyOf(lval, dim);
event.setValue(lvalue, nullElements);
}
protected void transmitFloatArray(ArchivingEvent<boolean[]> event, int dim, float[] fval, boolean[] nullElements) {
final float[] fvalue = Arrays.copyOf(fval, dim);
event.setValue(fvalue, nullElements);
}
protected void transmitDoubleArray(ArchivingEvent<boolean[]> event, int dim, double[] dval, boolean[] nullElements) {
final double[] dvalue = Arrays.copyOf(dval, dim);
event.setValue(dvalue, nullElements);
}
protected void transmitObjectArray(ArchivingEvent<boolean[]> event, int dim, Object[] oval, boolean[] nullElements) {
final Object[] ovalue = Arrays.copyOf(oval, dim);
event.setValue(ovalue, nullElements);
}
@Override
public void errorChange(ErrorEvent errorEvent) {
String attributeName = String.valueOf(errorEvent.getSource());
StringBuilder builder = new StringBuilder(getClass().getSimpleName());
builder.append(".errorChange : Unable to read the attribute named ").append(attributeName);
builder.append("\n\tTime: ").append(dateFormat.format(new Date(errorEvent.getTimeStamp())));
Throwable error = errorEvent.getError();
if (error != null) {
builder.append("\n\tReason: ");
DBTools.appendErrorToStringBuilder(builder, error);
}
String errorMess = builder.toString();
logger.error(errorMess);
registerErrorMessage(attributeName, errorMess);
treatErrorEventAfterLogging(errorEvent);
}
protected abstract void treatErrorEventAfterLogging(ErrorEvent errorEvent);
protected void registerErrorMessage(String name, String message) {
if ((name != null) && (message != null)) {
errorMessageMap.put(name.toLowerCase(), message);
}
}
protected void registerErrorMessage(String name, Throwable error) {
registerErrorMessage(name, DBTools.appendErrorToStringBuilder(new StringBuilder(), error).toString());
}
protected void removeErrorMessage(String name) {
if (name != null) {
errorMessageMap.remove(name.toLowerCase());
}
}
public String getErrorMessage(String attributeName) {
String result;
if (attributeName == null) {
result = null;
} else {
result = errorMessageMap.get(attributeName.toLowerCase());
}
return result;
}
// synchronized because of attribute list
public synchronized void clear() {
attributeList.clear();
attributeModeCounterMap.clear();
errorMessageMap.clear();
}
}
package Common.Archiver.Collector;
import fr.esrf.Tango.DevState;
import fr.esrf.TangoDs.TangoConst;
import fr.soleil.archiving.hdbtdb.api.tools.mode.Mode;
import fr.soleil.archiving.hdbtdb.api.tools.mode.ModeAbsolu;
import fr.soleil.archiving.hdbtdb.api.tools.mode.ModeRelatif;
import fr.soleil.lib.project.ObjectUtils;
public abstract class ModeHandler {
// This class has been defined as abstract just to keep one object in the
// Hdb part and an other in the Tdb part
// It has been done after the archiver developement, and it allows to reduce
// the impacts in the archivers code
private final Mode mode;
private int factorModePeriodic = 0;
private int factorModeAbsolute = 0;
private int factorModeRelative = 0;
private int factorModeThreshold = 0;
public int factorModeDifference = 0;
// private int factorModeCalcul = 0;
// private final String name = this.getClass().getSimpleName();
private int refresherInterval;
private final boolean hasRounding = true;
public ModeHandler(final Mode archiverMode) {
mode = archiverMode;
// Minimum polling interval definition
setMinRefreshInterval();
// Mode factor calculation
initFactor();
}
public int getRefreshInterval() {
return refresherInterval;
}
public Mode getMode() {
return mode;
}
public boolean isDataArchivable(final ModesCounters attModeCounter, final int dataType, final Object currentEvent,
final Object previousEvent) {
double currentEventD = -1;
double previousEventD = -1;
final boolean isCurrentNull = currentEvent == null;
final boolean isPreviousNull = previousEvent == null;
switch (dataType) {
case TangoConst.Tango_DEV_STRING:
// here, currentEvent and previousEvent are String values
if (!ObjectUtils.sameObject(currentEvent, previousEvent)) {
currentEventD = previousEventD + 1;// so that the difference mode's archiving condition is triggered
}
break;
case TangoConst.Tango_DEV_STATE:
final DevState currentEventState = (DevState) currentEvent;
final DevState previousEventState = (DevState) previousEvent;
currentEventD = isCurrentNull ? -1 : currentEventState.value();
previousEventD = isPreviousNull ? -1 : previousEventState.value();
// System.out.println(
// "TdbModeHandler/isDataArchivable/currentEventD/"+currentEventD+"/previousEventD/"+previousEventD
// );
break;
// case TangoConst.Tango_DEV_UCHAR:
// currentEventD = isCurrentNull ? -1 : ((Byte)
// currentEvent).doubleValue();
// previousEventD = isPreviousNull ? -1 : ((Byte)
// previousEvent).doubleValue();
// break;
case TangoConst.Tango_DEV_LONG:
case TangoConst.Tango_DEV_ULONG:
currentEventD = isCurrentNull ? -1 : ((Integer) currentEvent).doubleValue();
previousEventD = isPreviousNull ? -1 : ((Integer) previousEvent).doubleValue();
break;
case TangoConst.Tango_DEV_LONG64:
case TangoConst.Tango_DEV_ULONG64:
currentEventD = isCurrentNull ? -1 : ((Long) currentEvent).doubleValue();
previousEventD = isPreviousNull ? -1 : ((Long) previousEvent).doubleValue();
break;
case TangoConst.Tango_DEV_BOOLEAN:
currentEventD = isCurrentNull ? -1 : ((Boolean) currentEvent).booleanValue() ? 1 : 0;
previousEventD = isPreviousNull ? -1 : ((Boolean) previousEvent).booleanValue() ? 1 : 0;
break;
case TangoConst.Tango_DEV_UCHAR:
case TangoConst.Tango_DEV_SHORT:
case TangoConst.Tango_DEV_USHORT:
currentEventD = isCurrentNull ? -1 : ((Short) currentEvent).doubleValue();
previousEventD = isPreviousNull ? -1 : ((Short) previousEvent).doubleValue();
break;
case TangoConst.Tango_DEV_FLOAT:
currentEventD = isCurrentNull ? -1 : ((Float) currentEvent).doubleValue();
previousEventD = isPreviousNull ? -1 : ((Float) previousEvent).doubleValue();
break;
case TangoConst.Tango_DEV_DOUBLE:
currentEventD = isCurrentNull ? -1 : ((Double) currentEvent).doubleValue();
previousEventD = isPreviousNull ? -1 : ((Double) previousEvent).doubleValue();
break;
default:
if (currentEvent instanceof Number && previousEvent instanceof Number) {
currentEventD = isCurrentNull ? -1 : ((Double) currentEvent).doubleValue();
previousEventD = isPreviousNull ? -1 : ((Double) previousEvent).doubleValue();
}
if (currentEvent instanceof String && previousEvent instanceof String) {
String newCurrentEventString = currentEvent == null ? "" : (String) currentEvent;
String newPreviousEventString = previousEvent == null ? "" : (String) previousEvent;
if (!newCurrentEventString.equals(newPreviousEventString)) {
currentEventD = previousEventD + 1;// so that the difference
// mode's archiving
// condition is triggered
}
}
break;
}
boolean result = false;
// All the modes must be tested at least to increment the various
// counters
if (isDataArchivableModeP(attModeCounter)) {
result = true;
}
if (isDataArchivableModeA(attModeCounter, isCurrentNull, isPreviousNull, currentEventD, previousEventD)) {
result = true;
}
if (isDataArchivableModeR(attModeCounter, isCurrentNull, isPreviousNull, currentEventD, previousEventD)) {
result = true;
}
if (isDataArchivableModeT(attModeCounter, isCurrentNull, currentEventD)) {
result = true;
}
if (isDataArchivableModeC(attModeCounter, isCurrentNull, isPreviousNull, currentEventD, previousEventD)) {
result = true;
}
if (isDataArchivableModeD(attModeCounter, isCurrentNull, isPreviousNull, currentEventD, previousEventD)) {
result = true;
}
if (isDataArchivableModeE(attModeCounter, isCurrentNull, isPreviousNull, currentEventD, previousEventD)) {
result = true;
}
return result;
}
private boolean isDataArchivableModeP(final ModesCounters attModeCounter) {
if (mode.getModeP() == null) {
return false;
}
if (attModeCounter.getCountModeP() < factorModePeriodic) {
// Util.out4.println(m_myName + ".isDataArchivableModeP");
// Util.out4.println("countModePeriodic = " +
// attModeCounter.getCountModeP() + " < " +
// "m_factorModePeriodic = " + m_factorModePeriodic);
attModeCounter.incremCountModeP();
return false;
} else {
attModeCounter.initCountModeP();
// Util.out4.println(m_myName + ".isDataArchivableModeP");
// Util.out4.println("countModePeriodic = " +
// attModeCounter.getCountModeP() + " > " +
// "m_factorModePeriodic = " + m_factorModePeriodic);
return true;
}
}
private boolean isDataArchivableModeA(final ModesCounters attModeCounter, final boolean isCurrentNull,
final boolean isPreviousNull, final double currentEvent, double previousEvent) {
if (mode.getModeA() == null) {
return false;
}
if (attModeCounter.getCountModeA() < factorModeAbsolute) {
attModeCounter.incremCountModeA();
return false;
} else {
attModeCounter.initCountModeA();
if (isCurrentNull && isPreviousNull) {
return false;
} else if (isCurrentNull || isPreviousNull) {
return true;
}
// System.out.println("=/=/=/=/=/=/=/=/=/=//=/=/=/=/=/=/=/=/=/=/=/=/=/=/=/=/=/ derive lente: "
// + m_mode.getModeA().isSlow_drift());
if (mode.getModeA().isSlow_drift()) {
if (mode.getModeA().getPrev_stored_val() == ModeAbsolu.SLOW_DRIFT_FIRST_VAL) {
mode.getModeA().setPrev_stored_val(previousEvent);
} else {
previousEvent = mode.getModeA().getPrev_stored_val();
}
}
final double lowerLimit = previousEvent - Math.abs(mode.getModeA().getValInf());
final double upperLimit = previousEvent + Math.abs(mode.getModeA().getValSup());
if (currentEvent <= lowerLimit || currentEvent >= upperLimit) {
if (mode.getModeA().isSlow_drift()) {
mode.getModeA().setPrev_stored_val(currentEvent);
}
return true;
} else {
return false;
}
}
}
private boolean isDataArchivableModeR(final ModesCounters attModeCounter, final boolean isCurrentNull,
final boolean isPreviousNull, final double currentEvent, double previousEvent) {
if (mode.getModeR() == null) {
return false;
}
if (attModeCounter.getCountModeR() < factorModeRelative) {
attModeCounter.incremCountModeR();
return false;
} else {
attModeCounter.initCountModeR();
if (isCurrentNull && isPreviousNull) {
return false;
} else if (isCurrentNull || isPreviousNull) {
return true;
}
if (mode.getModeR().isSlow_drift()
&& mode.getModeR().getPrev_stored_val() != ModeRelatif.SLOW_DRIFT_FIRST_VAL) {
previousEvent = mode.getModeR().getPrev_stored_val();
}
double lower_limit = 0;
double upper_limit = 0;
final double percentInf = Math.abs(mode.getModeR().getPercentInf() / 100.0);
final double percentSup = Math.abs(mode.getModeR().getPercentSup() / 100.0);
final double deltaInf = percentInf * Math.abs(previousEvent);
final double deltaSup = percentSup * Math.abs(previousEvent);
lower_limit = previousEvent - deltaInf;
upper_limit = previousEvent + deltaSup;
if (currentEvent < lower_limit || currentEvent > upper_limit) {
if (mode.getModeR().isSlow_drift()) {
mode.getModeR().setPrev_stored_val(currentEvent);
}
// System.out.println("TRUE");
return true;
} else {
// System.out.println("FALSE");
return false;
}
}
}
private boolean isDataArchivableModeT(final ModesCounters attModeCounter, final boolean isCurrentNull,
final double currentEvent) {
if (mode.getModeT() == null) {
return false;
}
if (attModeCounter.getCountModeT() < factorModeThreshold) {
attModeCounter.incremCountModeT();
return false;
} else {
attModeCounter.initCountModeT();
if (isCurrentNull) {
return false;
}
/*
* System.out.println (m_myName + ".isDataArchivableModeT \r\n\t" +
* "\r\n\t" + "current value :" + currentEvent + "\r\n\t" +
* "previous value :" + previousEvent);
*/
if (currentEvent <= mode.getModeT().getThresholdInf() || currentEvent >= mode.getModeT().getThresholdSup()) {
// System.out.println ("TRUE");
return true;
} else {
// System.out.println ("FALSE");
return false;
}
}
}
private boolean isDataArchivableModeD(final ModesCounters attModeCounter, final boolean isCurrentNull,
final boolean isPreviousNull, final double currentEvent, final double previousEvent) {
if (mode.getModeD() == null) {
return false;
}
if (attModeCounter.getCountModeD() < factorModeDifference) {
attModeCounter.incremCountModeD();
return false;
} else {
attModeCounter.initCountModeD();
if (isCurrentNull && isPreviousNull || (Double.isNaN(currentEvent) && Double.isNaN(previousEvent))) {
return false;
} else if (isCurrentNull || isPreviousNull) {
return true;
}
// if (isCurrentNull || isPreviousNull) {
// System.out
// .println("IF isDataArchivableModeD: " + (isCurrentNull !=
// isPreviousNull));
// return isCurrentNull != isPreviousNull;
// }
if (currentEvent != previousEvent) {
// System.out.println("TRUE");
return true;
} else {
// System.out.println("FALSE");
return false;
}
}
}
// todo faire la suite ...
private boolean isDataArchivableModeC(final ModesCounters attModeCounter, final boolean isCurrentNull,
final boolean isPreviousNull, final double currentEvent, final double previousEvent) {
return false;
}
private boolean isDataArchivableModeE(final ModesCounters attModeCounter, final boolean isCurrentNull,
final boolean isPreviousNull, final double currentEvent, final double previousEvent) {
return false;
}
private void initFactor() {
if (hasRounding) {
initFactorWithRounding();
} else {
initFactorWithoutRounding();
}
}
private void initFactorWithRounding() {
factorModePeriodic = (int) Math.round(mode.getModeP().getPeriod() * 1.0 / (refresherInterval * 1.0));
if (mode.getModeA() != null) {
factorModeAbsolute = (int) Math.round(mode.getModeA().getPeriod() * 1.0 / (refresherInterval * 1.0));
}
if (mode.getModeR() != null) {
factorModeRelative = (int) Math.round(mode.getModeR().getPeriod() * 1.0 / (refresherInterval * 1.0));
}
if (mode.getModeT() != null) {
factorModeThreshold = (int) Math.round(mode.getModeT().getPeriod() * 1.0 / (refresherInterval * 1.0));
}
if (mode.getModeD() != null) {
factorModeDifference = (int) Math.round(mode.getModeD().getPeriod() * 1.0 / (refresherInterval * 1.0));
}
// if (mode.getModeC() != null) {
// factorModeCalcul = (int) Math.round(mode.getModeC().getPeriod() * 1.0
// / (refresherInterval * 1.0));
// }
}
// Not really used
private void initFactorWithoutRounding() {
if (mode.getModeP().getPeriod() % refresherInterval == 0) {
factorModePeriodic = mode.getModeP().getPeriod() / refresherInterval;
} else {
// Todo send an exception
}
if (mode.getModeA() != null && mode.getModeA().getPeriod() % refresherInterval == 0) {
factorModeAbsolute = mode.getModeA().getPeriod() / refresherInterval;
} else {
// Todo send an exception
}
if (mode.getModeR() != null && mode.getModeR().getPeriod() % refresherInterval == 0) {
factorModeRelative = mode.getModeR().getPeriod() / refresherInterval;
} else {
// Todo send an exception
}
if (mode.getModeT() != null && mode.getModeT().getPeriod() % refresherInterval == 0) {
factorModeThreshold = mode.getModeT().getPeriod() / refresherInterval;
} else {
// Todo send an exception
}
// if (mode.getModeC() != null && mode.getModeC().getPeriod() %
// refresherInterval == 0) {
// factorModeCalcul = mode.getModeC().getPeriod() / refresherInterval;
// }
// else {
// // Todo send an exception
// }
if (mode.getModeD() != null && mode.getModeD().getPeriod() % refresherInterval == 0) {
factorModeDifference = mode.getModeD().getPeriod() / refresherInterval;
} else {
// Todo send an exception
}
}
private void setMinRefreshInterval() {
// the Periodical Mode is supposed to never be null !!
refresherInterval = mode.getModeP().getPeriod();
if (mode.getModeA() != null && refresherInterval > mode.getModeA().getPeriod()) {
refresherInterval = mode.getModeA().getPeriod();
}
if (mode.getModeR() != null && refresherInterval > mode.getModeR().getPeriod()) {
refresherInterval = mode.getModeR().getPeriod();
}
if (mode.getModeT() != null && refresherInterval > mode.getModeT().getPeriod()) {
refresherInterval = mode.getModeT().getPeriod();
}
/*
* if ( ( m_mode.getModeC() != null ) && ( min >
* m_mode.getModeC().getPeriod() ) ) { m_refresherInterval =
* m_mode.getModeC().getPeriod(); }
*/
if (mode.getModeD() != null && refresherInterval > mode.getModeD().getPeriod()) {
refresherInterval = mode.getModeD().getPeriod();
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment