<commit_before>#include "contiki.h"

#if SHELL
#include "shell.h"
#include "serial-shell.h"
#include "dev/serial-line.h"
#include "dev/uart1.h"
#include "shell-6lbr.h"
#endif

PROCESS(demo_6lbr_process, "6LBR Demo");

PROCESS_NAME(web_sense_process);
PROCESS_NAME(webserver_nogui_process);
PROCESS_NAME(udp_client_process);

/*---------------------------------------------------------------------------*/
void
start_apps(void)
{
#if UDPCLIENT
  process_start(&udp_client_process, NULL);
#endif

#if WEBSERVER
  process_start(&web_sense_process, NULL);
  process_start(&webserver_nogui_process, NULL);
#endif
}

PROCESS_THREAD(demo_6lbr_process, ev, data)
{
  PROCESS_BEGIN();

#if SHELL
  uart1_set_input(serial_line_input_byte);
  serial_line_init();

  serial_shell_init();
  shell_ping_init();
  shell_6lbr_init();
#endif
#if !WITH_DELAY_IP
  start_apps();
#endif

  PROCESS_END();
}
/*---------------------------------------------------------------------------*/<commit_msg>Generalize 6lbr-demo-main tu support UART numbering on Z1<commit_after>#include "contiki.h"

#if SHELL
#include "shell.h"
#include "serial-shell.h"
#include "dev/serial-line.h"
#ifdef CONTIKI_TARGET_Z1
#include "dev/uart0.h"
#else
#include "dev/uart1.h"
#endif
#include "shell-6lbr.h"
#endif

PROCESS(demo_6lbr_process, "6LBR Demo");

PROCESS_NAME(web_sense_process);
PROCESS_NAME(webserver_nogui_process);
PROCESS_NAME(udp_client_process);

/*---------------------------------------------------------------------------*/
void
start_apps(void)
{
#if UDPCLIENT
  process_start(&udp_client_process, NULL);
#endif

#if WEBSERVER
  process_start(&web_sense_process, NULL);
  process_start(&webserver_nogui_process, NULL);
#endif
}

PROCESS_THREAD(demo_6lbr_process, ev, data)
{
  PROCESS_BEGIN();

#if SHELL
#ifdef CONTIKI_TARGET_Z1
  uart0_set_input(serial_line_input_byte);
#else
  uart1_set_input(serial_line_input_byte);
#endif
  serial_line_init();

  serial_shell_init();
  shell_ping_init();
  shell_6lbr_init();
#endif
#if !WITH_DELAY_IP
  start_apps();
#endif

  PROCESS_END();
}
/*---------------------------------------------------------------------------*/
{'fraction_non_alphanumeric': 0.2549019607843137, 'fraction_numerical': 0.009337068160597572, 'mean_word_length': 3.0357815442561207, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1668913', 'n_tokens_mistral': 782, 'n_tokens_neox': 765, 'n_words': 122}