Пример #1
0
C1Wire::C1Wire(const int ID) :
	m_stoprequested(false),
	m_system(NULL)
{
	m_HwdID=ID;
  DetectSystem();
}
Пример #2
0
C1Wire::C1Wire(const int ID, const int sensorThreadPeriod, const int switchThreadPeriod, const std::string& path) :
	m_stoprequested(false),
	m_system(NULL),
	m_sensorThreadPeriod(sensorThreadPeriod),
	m_switchThreadPeriod(switchThreadPeriod),
	m_path(path)
{
	m_HwdID = ID;

	// Defaults for pre-existing 1wire instances
	if (0 == m_sensorThreadPeriod)
		m_sensorThreadPeriod = 5 * 60 * 1000;

	if (0 == m_switchThreadPeriod)
			m_switchThreadPeriod = 100;

	DetectSystem();
}