prefix_ void senf::ppi::connector::Connector::connect(Connector & target)
{
// The connector is not registered -> route() or noroute() statement missing
- SENF_ASSERT( module_ &&
+ SENF_ASSERT( module_,
"senf::ppi::connector::Connector::connect(): (source) "
"Missing route() or noroute()" );
// The connector is already connected
- SENF_ASSERT( ! peer_ &&
+ SENF_ASSERT( ! peer_,
"senf::ppi::connector::Connector::connect(): (source) "
"duplicate connection" );
// The target connector is not registered -> route() or noroute() statement missing
- SENF_ASSERT( target.module_ &&
+ SENF_ASSERT( target.module_,
"senf::ppi::connector::Connector::connect(): (target) "
"Missing route() or noroute()" );
// The target connector is already connected
- SENF_ASSERT( ! target.peer_ &&
+ SENF_ASSERT( ! target.peer_,
"senf::ppi::connector::Connector::connect(): (target) "
"duplicate connection" );
if (! (packetTypeID() == typeid(void) ||
prefix_ void senf::ppi::connector::Connector::trace(Packet const & p, char const * label)
{
- if (traceState_ == NO_TRACING)
+ if (traceState_ == NO_TRACING)
return;
SENF_LOG_BLOCK(({
std::string type (prettyName(p.typeId().id()));
ConsoleRegister::ConsoleRegister()
{
+#ifndef SENF_PPI_NOTRACE
senf::ppi::ModuleManager::instance().consoleDir()
.add("tracing", senf::console::factory::Command(
SENF_FNP(senf::ppi::connector::Connector::TraceState,
(senf::ppi::connector::Connector::TraceState)))
.arg("state", "new tracing state")
);
+#endif
}
ConsoleRegister consoleRegister;
prefix_ void senf::ppi::connector::Connector::disconnect()
{
// Cannot disconnected a non-connected connector
- SENF_ASSERT( peer_ &&
+ SENF_ASSERT( peer_,
"senf::ppi::connector::Connector::disconnect(): Not connected" );
Connector & peer (*peer_);
if (!nativeThrottled_)
emitUnthrottle();
} else
- throttleTrace("OUT", "not forwarding unthrottle event");
+ SENF_PPI_THROTTLE_TRACE("OUT", "not forwarding unthrottle event");
}
///////////////////////////////////////////////////////////////////////////
prefix_ void senf::ppi::connector::ActiveConnector::notifyThrottle()
{
- throttleTrace("IN ", "throttle");
+ SENF_PPI_THROTTLE_TRACE("IN ", "throttle");
if (! throttled_) {
throttled_ = true;
if (throttleCallback_)
prefix_ void senf::ppi::connector::ActiveConnector::notifyUnthrottle()
{
- throttleTrace("IN ", "unthrottle");
+ SENF_PPI_THROTTLE_TRACE("IN ", "unthrottle");
if (throttled_) {
throttled_ = false;
if (unthrottleCallback_)
queue_.pop_back();
v_dequeueEvent();
}
- trace(p, "IN ");
+ SENF_PPI_TRACE(p, "IN ");
return p;
}