Merge pull request #307 from simonduq/contrib/tsch-print-schedule
TSCH schedule printout
This commit is contained in:
commit
2138eb08d6
@ -3,9 +3,12 @@ all: $(CONTIKI_PROJECT)
|
|||||||
|
|
||||||
CONTIKI=../../..
|
CONTIKI=../../..
|
||||||
|
|
||||||
MAKE_WITH_ORCHESTRA ?= 0 # force Orchestra from command line
|
# force Orchestra from command line
|
||||||
MAKE_WITH_SECURITY ?= 0 # force Security from command line
|
MAKE_WITH_ORCHESTRA ?= 0
|
||||||
MAKE_WITH_PERIODIC_ROUTES_PRINT ?= 0 # print #routes periodically, used for regression tests
|
# force Security from command line
|
||||||
|
MAKE_WITH_SECURITY ?= 0
|
||||||
|
# print #routes periodically, used for regression tests
|
||||||
|
MAKE_WITH_PERIODIC_ROUTES_PRINT ?= 0
|
||||||
|
|
||||||
MAKE_MAC = MAKE_MAC_TSCH
|
MAKE_MAC = MAKE_MAC_TSCH
|
||||||
MODULES += os/services/shell
|
MODULES += os/services/shell
|
||||||
|
@ -452,16 +452,15 @@ tsch_schedule_print(void)
|
|||||||
if(!tsch_is_locked()) {
|
if(!tsch_is_locked()) {
|
||||||
struct tsch_slotframe *sf = list_head(slotframe_list);
|
struct tsch_slotframe *sf = list_head(slotframe_list);
|
||||||
|
|
||||||
printf("Schedule: slotframe list\n");
|
LOG_PRINT("----- start slotframe list -----\n");
|
||||||
|
|
||||||
while(sf != NULL) {
|
while(sf != NULL) {
|
||||||
struct tsch_link *l = list_head(sf->links_list);
|
struct tsch_link *l = list_head(sf->links_list);
|
||||||
|
|
||||||
printf("[Slotframe] Handle %u, size %u\n", sf->handle, sf->size.val);
|
LOG_PRINT("Slotframe Handle %u, size %u\n", sf->handle, sf->size.val);
|
||||||
printf("List of links:\n");
|
|
||||||
|
|
||||||
while(l != NULL) {
|
while(l != NULL) {
|
||||||
printf("[Link] Options %02x, type %u, timeslot %u, channel offset %u, address %u\n",
|
LOG_PRINT("* Link Options %02x, type %u, timeslot %u, channel offset %u, address %u\n",
|
||||||
l->link_options, l->link_type, l->timeslot, l->channel_offset, l->addr.u8[7]);
|
l->link_options, l->link_type, l->timeslot, l->channel_offset, l->addr.u8[7]);
|
||||||
l = list_item_next(l);
|
l = list_item_next(l);
|
||||||
}
|
}
|
||||||
@ -469,7 +468,7 @@ tsch_schedule_print(void)
|
|||||||
sf = list_item_next(sf);
|
sf = list_item_next(sf);
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("Schedule: end of slotframe list\n");
|
LOG_PRINT("----- end slotframe list -----\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
|
@ -145,21 +145,25 @@ extern struct log_module all_modules[];
|
|||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
/* More compact versions of LOG macros */
|
/* More compact versions of LOG macros */
|
||||||
|
#define LOG_PRINT(...) LOG(1, 0, "PRI", __VA_ARGS__)
|
||||||
#define LOG_ERR(...) LOG(1, LOG_LEVEL_ERR, "ERR", __VA_ARGS__)
|
#define LOG_ERR(...) LOG(1, LOG_LEVEL_ERR, "ERR", __VA_ARGS__)
|
||||||
#define LOG_WARN(...) LOG(1, LOG_LEVEL_WARN, "WARN", __VA_ARGS__)
|
#define LOG_WARN(...) LOG(1, LOG_LEVEL_WARN, "WARN", __VA_ARGS__)
|
||||||
#define LOG_INFO(...) LOG(1, LOG_LEVEL_INFO, "INFO", __VA_ARGS__)
|
#define LOG_INFO(...) LOG(1, LOG_LEVEL_INFO, "INFO", __VA_ARGS__)
|
||||||
#define LOG_DBG(...) LOG(1, LOG_LEVEL_DBG, "DBG", __VA_ARGS__)
|
#define LOG_DBG(...) LOG(1, LOG_LEVEL_DBG, "DBG", __VA_ARGS__)
|
||||||
|
|
||||||
|
#define LOG_PRINT_(...) LOG(0, 0, "PRI", __VA_ARGS__)
|
||||||
#define LOG_ERR_(...) LOG(0, LOG_LEVEL_ERR, "ERR", __VA_ARGS__)
|
#define LOG_ERR_(...) LOG(0, LOG_LEVEL_ERR, "ERR", __VA_ARGS__)
|
||||||
#define LOG_WARN_(...) LOG(0, LOG_LEVEL_WARN, "WARN", __VA_ARGS__)
|
#define LOG_WARN_(...) LOG(0, LOG_LEVEL_WARN, "WARN", __VA_ARGS__)
|
||||||
#define LOG_INFO_(...) LOG(0, LOG_LEVEL_INFO, "INFO", __VA_ARGS__)
|
#define LOG_INFO_(...) LOG(0, LOG_LEVEL_INFO, "INFO", __VA_ARGS__)
|
||||||
#define LOG_DBG_(...) LOG(0, LOG_LEVEL_DBG, "DBG", __VA_ARGS__)
|
#define LOG_DBG_(...) LOG(0, LOG_LEVEL_DBG, "DBG", __VA_ARGS__)
|
||||||
|
|
||||||
|
#define LOG_PRINT_LLADDR(...) LOG_LLADDR(0, __VA_ARGS__)
|
||||||
#define LOG_ERR_LLADDR(...) LOG_LLADDR(LOG_LEVEL_ERR, __VA_ARGS__)
|
#define LOG_ERR_LLADDR(...) LOG_LLADDR(LOG_LEVEL_ERR, __VA_ARGS__)
|
||||||
#define LOG_WARN_LLADDR(...) LOG_LLADDR(LOG_LEVEL_WARN, __VA_ARGS__)
|
#define LOG_WARN_LLADDR(...) LOG_LLADDR(LOG_LEVEL_WARN, __VA_ARGS__)
|
||||||
#define LOG_INFO_LLADDR(...) LOG_LLADDR(LOG_LEVEL_INFO, __VA_ARGS__)
|
#define LOG_INFO_LLADDR(...) LOG_LLADDR(LOG_LEVEL_INFO, __VA_ARGS__)
|
||||||
#define LOG_DBG_LLADDR(...) LOG_LLADDR(LOG_LEVEL_DBG, __VA_ARGS__)
|
#define LOG_DBG_LLADDR(...) LOG_LLADDR(LOG_LEVEL_DBG, __VA_ARGS__)
|
||||||
|
|
||||||
|
#define LOG_PRINT_6ADDR(...) LOG_6ADDR(0, __VA_ARGS__)
|
||||||
#define LOG_ERR_6ADDR(...) LOG_6ADDR(LOG_LEVEL_ERR, __VA_ARGS__)
|
#define LOG_ERR_6ADDR(...) LOG_6ADDR(LOG_LEVEL_ERR, __VA_ARGS__)
|
||||||
#define LOG_WARN_6ADDR(...) LOG_6ADDR(LOG_LEVEL_WARN, __VA_ARGS__)
|
#define LOG_WARN_6ADDR(...) LOG_6ADDR(LOG_LEVEL_WARN, __VA_ARGS__)
|
||||||
#define LOG_INFO_6ADDR(...) LOG_6ADDR(LOG_LEVEL_INFO, __VA_ARGS__)
|
#define LOG_INFO_6ADDR(...) LOG_6ADDR(LOG_LEVEL_INFO, __VA_ARGS__)
|
||||||
|
Loading…
Reference in New Issue
Block a user