All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.arcsinc.hardwarehost.datamgmt.DataAcqMgrImpl

java.lang.Object
   |
   +----com.arcsinc.hardwarehost.datamgmt.DataAcqMgrImpl

public class DataAcqMgrImpl
extends Object
implements DataAcqMgr, HdwListener, Runnable
The DataAcqMgrImpl class controls the data acquisition processes in the hardware application program for the client.

See Also:
DataAcqClient, HdwListener, ExtVariableSpec, DataAcqMgr

Variable Index

 o appAvailable
The appAvailable indicates whether or not the application is running.

Constructor Index

 o DataAcqMgrImpl(HdwMgrImpl, HdwComm, HostDataMgrImpl, DataAcqClient)
Standard constructor:

Method Index

 o autoStartDataAcq()
Starts the data acquisition process on the hardware implicitly.
 o doDataAcqCmd(char)
Sends a simple data acquisition system command to the hardware application.
 o doDataAcqCmd(char, int[])
Sends a data acquisition system command to the hardware application.
 o getAvailParams()
Returns a Vector of the available parameters.
 o getCurrentApp() ()
Returns the name of the current application.
 o getDataAcqState()
Returns the current data acquisition state.
 o getHostName()
Returns the host name.
 o hdwStateChanged(HdwEvent)
Required function per HdwListener interface.
 o resetDataAcq()
Resets the data acquisition process.
 o retrieveData()
Retrieves the acquired data from the hardware and returns it to the calling agent.
 o run()
Function used by this to determine if the data acquisition is complete and to notify the client.
 o setAcquisitionSpec(int, int, int, Vector)
SetVector)
Set the data acquisition specification.
 o startDataAcq()
Starts the data acquisition process on the hardware explicitly.
 o stopDataAcq()
Stops the data acquisition process currently running on the hardware.

Variables

 o appAvailable
 protected boolean appAvailable
The appAvailable indicates whether or not the application is running.

Constructors

 o DataAcqMgrImpl
 public DataAcqMgrImpl(HdwMgrImpl hdwMgr,
                       HdwComm hdwComm,
    p_">HdwComm hdwComm,
                       HostDataMgrImpl hostDataMgrImpl,
                       DataAcqClient client)
Standard constructor:

Parameters:
hdwMgr - the hardware manager
hdwComm - communication to the hardware.
hostDataMgrImpl - the on-line data manager (used to get the symbol info)
client - my client

Methods

 o hdwStateChanged
 public void hdwStateChanged(HdwEvent e)
Required function per HdwListener interface. The HdwEvent is used to determine when data acquisition should and should not be allowed.

Parameters:
e - the HdwEvent
 o getAvailParams
 public Vector getAvailParams()
Returns a
Returns a Vector of the available parameters. The objects stored in the in the Vector are of type ExtVariableSpec.

Returns:
a Vector of ExtVariableSpec objects
 o getHostName
 public String getHostName()
Returns the host name. Currently, this always returns "local".

Returns:
a String with the host name.
 o getCurrentApp
 public String getCurrentApp()
Returns the name of the current application.

Returns:
a String with the current application name.
 o setAcquisitionSpec
 public boolean setAcquisitionSpec(int period,
                                   int noPoints,
                                   int channel,
                                   Vector acqParams)
Set the data acquisition specification. The specification will not be accepted if the application is not running or if the running application does not have sufficient memory to implement the specification.

Parameters:
period - sample period in milliseconds noPoints - number of points to acquire
channel - the interrupt channel in which the data is acquired
params - Vector of ExtVariableSpec(s) to be acquired at each point.
Returns:
returns true if the specification was accepted.
 o retrieveData
 public Number[] retrieveData()
Retrieves the acquired data from the hardware ane hardware and returns it to the calling agent. The data is in the form of a single dimensional array. The array is filled data point by data point; the point consists of the hardware-based time index and then each requested channel.

Returns:
an array of Number with the data
 o startDataAcq
 public boolean startDataAcq()
Starts the data acquisition process on the hardware explicitly.

Returns:
true if successfully started, otherwise false.
 o autoStartDataAcq
 public boolean autoStartDataAcq()
Starts the data acquisition process on the hardware implicitly. In this mode, the trigger event (start) is generated within the hardware application program.

Returns:
true if successfully started, otherwise false.
 o stopDataAcq
 public boolean stopDataAcq()
Stops the data acquisition process
Stops the data acquisition process currently running on the hardware.

Returns:
true if successfully stopped.
 o resetDataAcq
 public boolean resetDataAcq()
Resets the data acquisition process. This includes deleting any existing specification.

Returns:
true if successfully reset.
 o getDataAcqState
 public int getDataAcqState()
Returns the current data acquisition state.

Returns:
the current data acquisition state.
 o run
 public void run()
Function used by this to determine if the data acquisition is complete and to notify the client.

 o doDataAcqCmd
 protected int[] doDataAcqCmd(char dataAcqCmd)
Sends a simple data acquisition system command to the hardware application.

Parameters:
dataAcqCmd - a data acquisition command
Returns:
an array of int's from the hardware application
 o doDataAcqCmd
 protected int[] doDataAcqCmd(char dataAcqCmd,
                              int data[])
Sends a data acquisition system command to the hardware application.

Pe application.

Parameters:
dataAcqCmd - a data acquisition command
data - an array of int's to be sent as part of the command
Returns:
an array of int's from the hardware application

All Packages  Class Hierarchy  This Package  Previous  Next  Index
>