src/luos.c
static void Luos_TransmitLocalRoutingTable(service_t *service, msg_t *routeTB_msg)
{
    uint16_t entry_nb = 0;
    routing_table_t local_routing_table[service_number + 1];

    //start by saving node entry
    RoutingTB_ConvertNodeToRoutingTable(&local_routing_table[entry_nb], Robus_GetNode());
    entry_nb++;
    // save services entry
    for (uint16_t i = 0; i < service_number; i++)
    {
        RoutingTB_ConvertServiceToRoutingTable((routing_table_t *)&local_routing_table[entry_nb++], &service_table[i]);
    }
    Luos_SendData(service, routeTB_msg, (void *)local_routing_table, (entry_nb * sizeof(routing_table_t)));
}
/******************************************************************************
 * @brief transmit local to network
 * @param none
 * @return none
 ******************************************************************************/
@brief transmit local to network
@param none
@return none
@brief transmit local to network @param none @return none
static void Luos_TransmitLocalRoutingTable(service_t *service, msg_t *routeTB_msg)
{
    uint16_t entry_nb = 0;
    routing_table_t local_routing_table[service_number + 1];
    RoutingTB_ConvertNodeToRoutingTable(&local_routing_table[entry_nb], Robus_GetNode());
    entry_nb++;
    for (uint16_t i = 0; i < service_number; i++)
    {
        RoutingTB_ConvertServiceToRoutingTable((routing_table_t *)&local_routing_table[entry_nb++], &service_table[i]);
    }
    Luos_SendData(service, routeTB_msg, (void *)local_routing_table, (entry_nb * sizeof(routing_table_t)));
}
static void Luos_TransmitLocalRoutingTable ( service_t * service , msg_t * routeTB_msg ) { uint16_t entry_nb = 0 ; routing_table_t local_routing_table [ service_number + 1 ] ; RoutingTB_ConvertNodeToRoutingTable ( & local_routing_table [ entry_nb ] , Robus_GetNode ( ) ) ; entry_nb ++ ; for ( uint16_t i = 0 ; i < service_number ; i ++ ) { RoutingTB_ConvertServiceToRoutingTable ( ( routing_table_t * ) & local_routing_table [ entry_nb ++ ] , & service_table [ i ] ) ; } Luos_SendData ( service , routeTB_msg , ( void * ) local_routing_table , ( entry_nb * sizeof ( routing_table_t ) ) ) ; }
@brief transmit local to network
 @param none
 @return none
@brief transmit local to network @param none @return none
//start by saving node entry // save services entry