Giter VIP home page Giter VIP logo

Comments (2)

aZholtikov avatar aZholtikov commented on July 1, 2024

Hi!

In only the branch "esp32" added experimental function zh_network_get_route(). Not fully tested.
I would appreciate for the test and feedback.

In your program add task (for example):

void zh_network_get_routing(void *pvParameter)
{
    typedef struct zh_network_routing_table_t
    {
        uint8_t original_target_mac[6];
        uint8_t intermediate_target_mac[6];
    } __attribute__((packed)) zh_network_routing_table_t;
    zh_vector_t *route_vector = zh_network_get_route();
    vTaskDelay(60000 / portTICK_PERIOD_MS); // Just wait a little while for the routing table to fill up.
    for (uint16_t i = 0; i < zh_vector_get_size(route_vector); ++i)
    {
        zh_network_routing_table_t *routing_table = zh_vector_get_item(route_vector, i);
        printf("Target MAC %02X:%02X:%02X:%02X:%02X:%02X route MAC %02X:%02X:%02X:%02X:%02X:%02X.\n", MAC2STR(routing_table->original_target_mac), MAC2STR(routing_table->intermediate_target_mac));
    }
    vTaskDelete(NULL);
}

And start it:

xTaskCreatePinnedToCore(&zh_network_get_routing, "zh_network_get_routing", 2048, NULL, 3, NULL, tskNO_AFFINITY);

from zh_network.

aZholtikov avatar aZholtikov commented on July 1, 2024

The function has been fully tested. It will be added to other branches soon. And will not be added to the example because its incorrect use may cause errors. Who needs it - will find it himself.

from zh_network.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.