BlinkenArea - GitList
Repositories
Blog
Wiki
Blinker
Code
Commits
Branches
Tags
Search
Tree:
798cf1b
Branches
Tags
master
Blinker
src
linux
Device.h
implemented character device class
Stefan Schuermans
commited
798cf1b
at 2011-12-11 20:22:55
Device.h
Blame
History
Raw
/* Blinker Copyright 2011 Stefan Schuermans <stefan@blinkenarea.org> Copyleft GNU public license - http://www.gnu.org/copyleft/gpl.html a blinkenarea.org project */ #ifndef DEVICE_H #define DEVICE_H #include <string> #include "Io.h" #include "SerCfg.h" namespace Blinker { /// a character device class Device: public Io { public: /** * @brief constructor * @param[in] path path to device */ Device(const std::string &path); /// destructor ~Device(); private: /// copy constructor disabled Device(const Device &that); /// assignment operator disabled const Device & operator=(const Device &that); public: /** * @brief set serial port configuration * @param[in] serCfg serial port configuration * @return if configuration succeeded * * This function should only be used if device is a serial port. */ bool setSerCfg(const SerCfg& serCfg); /** * @brief write data to device * @param[in] data data to write * @return if the data could be written */ bool write(const std::string &data); }; // class Device } // namespace Blinker #endif // #ifndef DEVICE_H