Echo

Echo

Purchase

Required:
$55

The Echo plugin is arguably the most straightforward layer imaginable—its functionality is exactly what the name suggests: it echoes back whatever data it receives. The moment any input arrives, it’s instantly transmitted back unchanged.

Despite its simplicity, the Echo plugin serves a number of valuable purposes. It’s an ideal tool for validating the behavior of transmission and reception pipelines, checking latency and throughput, and ensuring that fundamental data flows are functioning as expected.

In fact, here's the entire code for the plugin:

class EchoLayer: doc.Layer
{
    construct (doc.PluginHost* pluginHost)
    {
        basetype.construct (pluginHost);
        pluginHost.m_log.attachListener (onLogRecord @ pluginHost.m_mainThreadScheduler);
    }

    onLogRecord (
        uint64_t timestamp,
        uint_t recordCode,
        void const* p,
        size_t size
        )
    {
        if (recordCode == log.StdRecordCode.Rx)
            try transmit (p, size);
    }
}

And that's it: a simple tool for testing, and could be your starting point for a more sophisticated testing utility.

Getting Started

Documentation