RealPslDriver.h 2.32 KB
Newer Older
Elaazzouzi Abdelali's avatar
first  
Elaazzouzi Abdelali committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108
/*
 * Nomad Instrument Control Software
 *
 * Copyright 2011 Institut Laue-Langevin
 *
 * Licensed under the EUPL, Version 1.1 only (the "License");
 * You may not use this work except in compliance with the Licence.
 * You may obtain a copy of the Licence at:
 *
 * http://joinup.ec.europa.eu/software/page/eupl
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the Licence is distributed on an "AS IS" basis,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the Licence for the specific language governing permissions and
 * limitations under the Licence.
 */

#ifndef REALPSLDRIVER_H
#define REALPSLDRIVER_H

#include "Utilities/Counter.h"
#include "PslDef.h"
#include "PslState.h"

namespace psl {
class PslDriver;

/*!
 * \class RealPslDriver
 * \brief Real implementation class for the Psl device driver
 *
 * This class is a real implementation of Psl device driver.
 */
class RealPslDriver: public PslState {

public:

	/*!
	 * \brief Constructor
	 * \param[in] owner The device driver main class link
	 */
	RealPslDriver(PslDriver* owner);

	/*!
	 * \brief Destructor
	 */
	virtual ~RealPslDriver();

	/*!
	 * \brief Init command implementation
	 */
	virtual void init();

	/*!
	 * \brief Clear command implementation
	 */
	virtual void clear();

	/*!
	 * \brief Write Param command implementation
	 */
	virtual void writeParam();

	/*!
	 * \brief Read command implementation
	 */
	virtual void read();

	/*!
	 * \brief Synchronize Read command implementation
	 */
	virtual void synchroniseRead();

	/*!
	 * \brief Start command implementation
	 */
	virtual void start();

	/*!
	 * \brief Resume command implementation
	 */
	virtual void resume();

	/*!
	 * \brief Pause command implementation
	 */
	virtual void pause();

	/*!
	 * \brief Stop command implementation
	 */
	virtual void stop();

	/*!
	 * \brief Read Infos command implementation
	 */
	virtual void readStatus();

	/*!
	 * \brief Read Infos command implementation
	 */
	virtual void readInfos();
	int32 GetAvailableCameras();

private:

	std::string writeAndRead(const std::string& command, const std::string& terminator);
109
	std::string writeAndRead(const std::string& command, const std::string& terminator,const uint32 nbchar);
Elaazzouzi Abdelali's avatar
first  
Elaazzouzi Abdelali committed
110 111 112 113 114 115 116 117

	int16 m_Handle;
	int16 lNumCameras;
	Counter m_TimeCounter;
};

}
#endif //REALPSLDRIVER_H