[dss-commits] r8915 - dss/trunk/core
dss-commits at forum.digitalstrom.org
dss-commits at forum.digitalstrom.org
Tue Nov 17 12:25:01 CET 2009
Author: skohler
Date: 2009-11-17 12:25:00 +0100 (Tue, 17 Nov 2009)
New Revision: 8915
Modified:
dss/trunk/core/ds485client.cpp
dss/trunk/core/ds485client.h
Log:
Added a DS485Client::sendFrameSingleResult method that takes the functionID from the frame payload. Relates to #216
Modified: dss/trunk/core/ds485client.cpp
===================================================================
--- dss/trunk/core/ds485client.cpp 2009-11-11 15:17:55 UTC (rev 8914)
+++ dss/trunk/core/ds485client.cpp 2009-11-17 11:25:00 UTC (rev 8915)
@@ -71,6 +71,10 @@
DSS::getInstance()->getDS485Interface().sendFrame(_frame);
} // sendFrameDiscardResult
+ boost::shared_ptr<DS485CommandFrame> DS485Client::sendFrameSingleResult(DS485CommandFrame& _frame, int _timeoutMS) {
+ return sendFrameSingleResult(_frame, _frame.getPayload().toChar()[1], _timeoutMS);
+ }
+
boost::shared_ptr<DS485CommandFrame> DS485Client::sendFrameSingleResult(DS485CommandFrame& _frame, int _functionID, int _timeoutMS) {
DS485Proxy* proxy = dynamic_cast<DS485Proxy*>(&DSS::getInstance()->getDS485Interface());
assert(proxy != NULL);
Modified: dss/trunk/core/ds485client.h
===================================================================
--- dss/trunk/core/ds485client.h 2009-11-11 15:17:55 UTC (rev 8914)
+++ dss/trunk/core/ds485client.h 2009-11-17 11:25:00 UTC (rev 8915)
@@ -40,6 +40,8 @@
/** Sends a frame and discards incoming frames */
void sendFrameDiscardResult(DS485CommandFrame& _frame);
+ /** Sends a frame and receives one response frame with the same functionID as the one set in the frame payload within _timeoutMS */
+ boost::shared_ptr<DS485CommandFrame> sendFrameSingleResult(DS485CommandFrame& _frame, int _timeoutMS);
/** Sends a frame and receives one response frame with the same functionID as \a _functionID within _timeoutMS */
boost::shared_ptr<DS485CommandFrame> sendFrameSingleResult(DS485CommandFrame& _frame, int _functionID, int _timeoutMS);
/** Sends a frame and receives all frames with the same functionID as \a _functionID within _timeoutMS */
More information about the dss-commits
mailing list