Esempio n. 1
0
void main(MemoryBus* bus1)
{
    std::cout << "app1 started" << std::endl;

    Kernel k;
    MemoryBusInterface ifc11(&k, "IF11", bus1);
    ifc11.setNetworkAddress(NetworkAddress(0x0101, 0xFF00));
    k.addInterface(&ifc11);
    ifc11.start();
    std::this_thread::sleep_for(std::chrono::milliseconds(250));

    k.addStaticRoute(uNet::NetworkAddress(0x0200, 0xFF00),
                     uNet::HostAddress(0x0102));

    test_client(k);

    std::this_thread::sleep_for(std::chrono::seconds(1));
    ifc11.stop();
}