corrected unit for arbitration delay measurement
This commit is contained in:
Regular → Executable
+2
-2
@@ -693,7 +693,7 @@ result_t BusHandler::handleSymbol() {
|
||||
- m_lastSynReceiveTime.tv_sec*1000000000 - m_lastSynReceiveTime.tv_nsec)/1000;
|
||||
if (latencyLong >= 0 && latencyLong <= 10000) { // skip clock skew or out of reasonable range
|
||||
int latency = (int)latencyLong;
|
||||
logDebug(lf_bus, "arbitration delay %d ns", latency);
|
||||
logDebug(lf_bus, "arbitration delay %d micros", latency);
|
||||
if (m_arbitrationDelayMin < 0 || (latency < m_arbitrationDelayMin || latency > m_arbitrationDelayMax)) {
|
||||
if (m_arbitrationDelayMin == -1 || latency < m_arbitrationDelayMin) {
|
||||
m_arbitrationDelayMin = latency;
|
||||
@@ -701,7 +701,7 @@ result_t BusHandler::handleSymbol() {
|
||||
if (m_arbitrationDelayMax == -1 || latency > m_arbitrationDelayMax) {
|
||||
m_arbitrationDelayMax = latency;
|
||||
}
|
||||
logInfo(lf_bus, "arbitration delay %d - %d ns", m_arbitrationDelayMin, m_arbitrationDelayMax);
|
||||
logInfo(lf_bus, "arbitration delay %d - %d micros", m_arbitrationDelayMin, m_arbitrationDelayMax);
|
||||
}
|
||||
}
|
||||
m_nextSendPos = 1;
|
||||
|
||||
Regular → Executable
+6
-6
@@ -560,14 +560,14 @@ class BusHandler : public WaitThread {
|
||||
int getMaxSymbolLatency() const { return m_symbolLatencyMax; }
|
||||
|
||||
/**
|
||||
* Return the minimal measured delay between received SYN and sent own master address in nanoseconds.
|
||||
* @return the minimal measured delay between received SYN and sent own master address in nanoseconds, -1 if not yet known.
|
||||
* Return the minimal measured delay between received SYN and sent own master address in microseconds.
|
||||
* @return the minimal measured delay between received SYN and sent own master address in microseconds, -1 if not yet known.
|
||||
*/
|
||||
int getMinArbitrationDelay() const { return m_arbitrationDelayMin; }
|
||||
|
||||
/**
|
||||
* Return the maximal measured delay between received SYN and sent own master address in nanoseconds.
|
||||
* @return the maximal measured delay between received SYN and sent own master address in nanoseconds, -1 if not yet known.
|
||||
* Return the maximal measured delay between received SYN and sent own master address in microseconds.
|
||||
* @return the maximal measured delay between received SYN and sent own master address in microseconds, -1 if not yet known.
|
||||
*/
|
||||
int getMaxArbitrationDelay() const { return m_arbitrationDelayMax; }
|
||||
|
||||
@@ -698,10 +698,10 @@ class BusHandler : public WaitThread {
|
||||
/** the maximal measured latency between send and receive of a symbol in milliseconds, -1 if not yet known. */
|
||||
int m_symbolLatencyMax;
|
||||
|
||||
/** the minimal measured delay between received SYN and sent own master address in nanoseconds, -1 if not yet known. */
|
||||
/** the minimal measured delay between received SYN and sent own master address in microseconds, -1 if not yet known. */
|
||||
int m_arbitrationDelayMin;
|
||||
|
||||
/** the maximal measured delay between received SYN and sent own master address in nanoseconds, -1 if not yet known. */
|
||||
/** the maximal measured delay between received SYN and sent own master address in microseconds, -1 if not yet known. */
|
||||
int m_arbitrationDelayMax;
|
||||
|
||||
/** the time of the last received SYN symbol, or 0 for never. */
|
||||
|
||||
Regular → Executable
+4
-4
@@ -1570,8 +1570,8 @@ result_t MainLoop::executeInfo(const vector<string>& args, const string& user, o
|
||||
<< "symbol rate: " << m_busHandler->getSymbolRate() << "\n"
|
||||
<< "max symbol rate: " << m_busHandler->getMaxSymbolRate() << "\n";
|
||||
if (m_busHandler->getMinArbitrationDelay() >= 0) {
|
||||
*ostream << "min arbitration nanos: " << m_busHandler->getMinArbitrationDelay() << "\n"
|
||||
<< "max arbitration nanos: " << m_busHandler->getMaxArbitrationDelay() << "\n";
|
||||
*ostream << "min arbitration micros: " << m_busHandler->getMinArbitrationDelay() << "\n"
|
||||
<< "max arbitration micros: " << m_busHandler->getMaxArbitrationDelay() << "\n";
|
||||
}
|
||||
if (m_busHandler->getMinSymbolLatency() >= 0) {
|
||||
*ostream << "min symbol latency: " << m_busHandler->getMinSymbolLatency() << "\n"
|
||||
@@ -1796,8 +1796,8 @@ result_t MainLoop::executeGet(const vector<string>& args, bool* connected, ostri
|
||||
*ostream << ",\n \"symbolrate\": " << m_busHandler->getSymbolRate()
|
||||
<< ",\n \"maxsymbolrate\": " << m_busHandler->getMaxSymbolRate();
|
||||
if (m_busHandler->getMinArbitrationDelay() >= 0) {
|
||||
*ostream << ",\n \"minarbitrationnanos\": " << m_busHandler->getMinArbitrationDelay()
|
||||
<< ",\n \"minarbitrationnanos\": " << m_busHandler->getMaxArbitrationDelay();
|
||||
*ostream << ",\n \"minarbitrationmicros\": " << m_busHandler->getMinArbitrationDelay()
|
||||
<< ",\n \"minarbitrationmicros\": " << m_busHandler->getMaxArbitrationDelay();
|
||||
}
|
||||
if (m_busHandler->getMinSymbolLatency() >= 0) {
|
||||
*ostream << ",\n \"minsymbollatency\": " << m_busHandler->getMinSymbolLatency()
|
||||
|
||||
Reference in New Issue
Block a user