Package fr.soleil.salsa.entity

Examples of fr.soleil.salsa.entity.ScanState


     * @param scanServerName
     * @return
     * @throws SalsaDeviceException
     */
    public ScanState getScanState(String scanServerName) throws SalsaDeviceException {
        ScanState state = ScanState.STOPPED;

        String stateString = DeviceConnectionManager.getDeviceState(scanServerName);
        if (StateUtilities.getNameForState(DevState.ON).equals(stateString)) {
            state = ScanState.STOPPED;
        }
View Full Code Here


     * @return A {@link ScanState}. If there is a problem with the given Scan Server, the default
     *         value {@link ScanState#STOPPED} is returned
     * @throws SalsaDeviceException If <code>scanServerName</code> is <code>null</code>
     */
    public static ScanState getScanState(String scanServerName) throws SalsaDeviceException {
        ScanState state = ScanApi.getScanState(scanServerName);
        LOGGER.info("{}.getScanState({})={}", SalsaAPI.class.getSimpleName(), scanServerName, state);
        return state;
    }
View Full Code Here

     * @return
     * @throws SalsaDeviceException
     */
    public ScanState getScanState(String scanServerName) throws SalsaDeviceException {
        DeviceProxy scanServerProxy;
        ScanState state;
        scanServerProxy = getScanServerProxy(scanServerName);
        try {
            DeviceAttribute stateAttribute = scanServerProxy.read_attribute("State");
            String stateString = AttributeHelper.extractToString(stateAttribute);
            if ("ON".equals(stateString)) {
View Full Code Here

     * @return
     * @throws SalsaDeviceException
     */
    public ScanState getScanState(String scanServerName) throws SalsaDeviceException {
        DeviceProxy scanServerProxy;
        ScanState state;
        scanServerProxy = getScanServerProxy(scanServerName);
        try {
            DeviceAttribute stateAttribute = scanServerProxy.read_attribute("State");
            String stateString = AttributeHelper.extractToString(stateAttribute);
            if ("ON".equals(stateString)) {
View Full Code Here

     * @param scanServerName
     * @return
     * @throws SalsaDeviceException
     */
    public ScanState getScanState(String scanServerName) throws SalsaDeviceException {
        ScanState state = null;
        DeviceProxy scanServerProxy = TangoDeviceHelper.getDeviceProxy(scanServerName, false);
        if (scanServerProxy != null) {
            try {
                // Time out
                scanServerProxy.set_timeout_millis(10000);
View Full Code Here

     * @see fr.soleil.salsa.client.view.tool.IPeridodicRefresh#doRefresh()
     */
    @Override
    public void refresh() {
        fireDAOChanged();
        ScanState newState = readScanState();

        if (newState != state) {
            state = newState;
            if (state == ScanState.STOPPED) {

View Full Code Here

     * Reads the state of the server and returns true if a scan is running.
     *
     * @return
     */
    protected ScanState readScanState() {
        ScanState newState;
        String scanServerName = ModelPreferences.getInstance().getScanServer();
        if (scanServerName != null && !"".equals(scanServerName.trim())) {
            try {
                newState = ScanApi.getScanState(scanServerName);
                inError = false;
View Full Code Here

     * Reads the state of the server and returns true if a scan is running.
     *
     * @return
     */
    protected ScanState readScanState() {
        ScanState newState;
        String scanServerName = ModelPreferences.getInstance().getScanServer();
        if (scanServerName != null && !"".equals(scanServerName.trim())) {
            try {
                newState = ScanApi.getScanState(scanServerName);
                inError = false;
View Full Code Here

     * Called at regular intervals by PeriodicRefreshUpdater so that the controller updates the
     * state of the read / resume buttons.
     */
    @Override
    public void refresh() {
        ScanState newState = readScanState();
        if (newState != state) {
            state = newState;
            updateView();
        }
    }
View Full Code Here

     * Reads the state of the server and returns true if a scan is running.
     *
     * @return
     */
    protected ScanState readScanState(String stringState) {
        ScanState newState = ScanState.STOPPED;
        if (stringState != null) {
            if (stringState.equalsIgnoreCase(StateUtilities.getNameForState(DevState.RUNNING))
                    || stringState
                            .equalsIgnoreCase(StateUtilities.getNameForState(DevState.MOVING))) {
                newState = ScanState.RUNNING;
View Full Code Here

TOP

Related Classes of fr.soleil.salsa.entity.ScanState

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.