2 // Copyright (c) 2020 Fraunhofer Institute for Applied Information Technology (FIT)
     3 //                    Network Research Group (NET)
     4 //                    Schloss Birlinghoven, 53754 Sankt Augustin, GERMANY
     5 //                    Contact: support@wiback.org
     7 // This file is part of the SENF code tree.
     8 // It is licensed under the 3-clause BSD License (aka New BSD License).
     9 // See LICENSE.txt in the top level directory for details or visit
    10 // https://opensource.org/licenses/BSD-3-Clause
    15     \brief ForwardSwitch inline non-template implementation */
    17 #include "ForwardSwitch.hh"
    21 #define prefix_ inline
    22 ///////////////////////////////cc.p////////////////////////////////////////
    24 prefix_ senf::emu::ForwardSwitch::ForwardSwitch(bool state)
    26     route( input, output );
    30 prefix_ void senf::emu::ForwardSwitch::onRequest_discard()
    32     input.read(); // discard automatically
    35 prefix_ void senf::emu::ForwardSwitch::onRequest_forward()
    37     output.write( input.read());
    40 prefix_ bool senf::emu::ForwardSwitch::forward()
    46 prefix_ void senf::emu::ForwardSwitch::forward(bool state)
    50         input.onRequest( &ForwardSwitch::onRequest_forward );
    52         input.onRequest( &ForwardSwitch::onRequest_discard );
    56 ///////////////////////////////cci.e////////////////////////////////////////