Changeset 18909
- Timestamp:
- 09/18/17 16:43:32 (7 years ago)
- Location:
- trunk/FACT++/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/ConnectionUSB.cc
r18615 r18909 270 270 } 271 271 272 void ConnectionUSB::Connect() 272 void ConnectionUSB::Connect(int _baud_rate, int _character_size, 273 parity::type _parity, stop_bits::type _stop_bits, 274 flow_control::type _flow_control) 273 275 { 274 276 fConnectionStatus = kConnecting; … … 292 294 try 293 295 { 296 set_option(baud_rate(_baud_rate)); 297 set_option(character_size(_character_size)); 298 set_option(parity(_parity)); 299 set_option(stop_bits(_stop_bits)); 300 set_option(flow_control(_flow_control)); 301 /* 294 302 Info("Setting Baud Rate"); 295 303 set_option(fBaudRate); … … 302 310 Info("Setting Flow control"); 303 311 set_option(fFlowControl); 312 */ 304 313 } 305 314 catch (const bs::system_error &erc) … … 327 336 ConnectionUSB::ConnectionUSB(ba::io_service& ioservice, ostream &out) : 328 337 MessageImp(out), ba::serial_port(ioservice), fLog(0), 329 fBaudRate(115200), 338 /* 339 fBaudRate(115200), 330 340 fCharacterSize(8), fParity(parity::none), fStopBits(stop_bits::one), 331 341 fFlowControl(flow_control::none), 342 */ 332 343 fInTimeout(ioservice), fOutTimeout(ioservice), fConnectTimeout(ioservice), 333 344 fQueueSize(0), fConnectionStatus(kDisconnected) -
trunk/FACT++/src/ConnectionUSB.h
r16768 r18909 18 18 19 19 std::string fAddress; 20 21 boost::asio::serial_port_base::baud_rate fBaudRate; // unisgned int22 boost::asio::serial_port_base::character_size fCharacterSize; // unisgned int23 boost::asio::serial_port_base::parity fParity; // unisgned int24 boost::asio::serial_port_base::stop_bits fStopBits; // unisgned int25 boost::asio::serial_port_base::flow_control fFlowControl; // unisgned int26 20 27 21 enum ConnectionStatus_t … … 76 70 void SetEndpoint(const std::string &addr); 77 71 78 void Connect(); 72 void Connect(int baud_rate=115200, 73 int character_size=8, 74 boost::asio::serial_port_base::parity::type parity=boost::asio::serial_port_base::parity::none, 75 boost::asio::serial_port_base::stop_bits::type stop_bits=boost::asio::serial_port_base::stop_bits::one, 76 boost::asio::serial_port_base::flow_control::type flow_control=boost::asio::serial_port_base::flow_control::hardware); 77 78 void ConfigureConnection(); 79 79 80 80 // ------------------------ close --------------------------
Note:
See TracChangeset
for help on using the changeset viewer.