File: portlist.cpp

package info (click to toggle)
dashel 1.3.3-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,208 kB
  • sloc: cpp: 3,196; ansic: 181; javascript: 15; makefile: 10
file content (17 lines) | stat: -rw-r--r-- 425 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include <dashel/dashel.h>
#include <iostream>

using namespace Dashel;

int main()
{
	std::map<int, std::pair<std::string, std::string> > ports = SerialPortEnumerator::getPorts();

	for(std::map<int, std::pair<std::string, std::string> >::iterator it = ports.begin(); it != ports.end(); ++it)
	{
		std::cout << "(" << it->first << ") " << it->second.first << " [" << it->second.second << "]" << std::endl;
	}


	return 0;
}