Zigbee Protocol Controller 1.6.0
uic_stdin_process.c File Reference
#include "uic_stdin_process.h"
#include <stdbool.h>
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
#include <fcntl.h>
#include <termios.h>
#include <pthread.h>
#include <signal.h>
#include "process.h"
#include "editline/readline.h"
#include "sl_log.h"
#include "uic_main_externals.h"
#include "uic_stdin_command_handler.h"
#include "unify_stdin_attribute_resolver_command_handler.h"
#include "unify_stdin_attribute_poll_command_handler.h"
#include "unify_stdin_attribute_store_command_handler.h"

Macros

#define LOG_TAG   "uic_stdin_process"
 

Enumerations

enum  { STARTUP }
 

Functions

 PROCESS (uic_stdin_process, "Unify Stdin")
 
static char ** completer (const char *text, int start, int end)
 
static void handle_signals (int signo)
 
static void * readline_loop (void *d)
 
static void uic_stdin_poll ()
 
 PROCESS_THREAD (uic_stdin_process, ev, data)
 
sl_status_t uic_stdin_setup (void)
 Unify interface to Contiki STDIN feature. More...
 
int uic_stdin_teardown ()
 Tear down the CLI. More...
 

Variables

static pthread_t stdin_thread
 
pthread_cond_t cond = PTHREAD_COND_INITIALIZER
 
pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER
 
static int fildes [2]
 
static bool thread_running
 

Macro Definition Documentation

◆ LOG_TAG

#define LOG_TAG   "uic_stdin_process"

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
STARTUP 

Function Documentation

◆ completer()

static char ** completer ( const char *  text,
int  start,
int  end 
)
static

◆ handle_signals()

static void handle_signals ( int  signo)
static

◆ PROCESS()

PROCESS ( uic_stdin_process  ,
"Unify Stdin"   
)

◆ PROCESS_THREAD()

PROCESS_THREAD ( uic_stdin_process  ,
ev  ,
data   
)

◆ readline_loop()

static void * readline_loop ( void *  d)
static

◆ uic_stdin_poll()

static void uic_stdin_poll ( )
static

◆ uic_stdin_teardown()

int uic_stdin_teardown ( )

Tear down the CLI.

Tear down CLI and restore the normal terminal.

Variable Documentation

◆ cond

pthread_cond_t cond = PTHREAD_COND_INITIALIZER

◆ fildes

int fildes[2]
static

◆ mutex

pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER

◆ stdin_thread

pthread_t stdin_thread
static

◆ thread_running

bool thread_running
static