My Project
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros
Classes | Macros | Functions | Variables
cli.c File Reference
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <pthread.h>
#include <sys/types.h>
#include <unistd.h>
#include <arpa/inet.h>
#include <strings.h>
#include "controller_stats.h"
#include "scheduling.h"
#include "logging.h"
#include "communication.h"
#include "cli.h"
#include "dedos_msu_msg_type.h"
#include "runtime_messages.h"
#include "controller_dfg.h"
#include "runtime_communication.h"
#include "dfg.h"
#include "api.h"

Go to the source code of this file.

Classes

struct  cmd_action
 

Macros

#define NEXT_MSU_LOCAL   1
 
#define NEXT_MSU_REMOTE   2
 
#define BLD   "\e[1m"
 
#define UL   "\e[4m"
 
#define NOSTYLE   "\e[0m"
 
#define HELP_PREAMBLE
 
#define NEXT_ARG(arg, args)
 

Functions

static int parse_show_runtimes (char *args)
 
static int parse_allocate ()
 //FIXME: broken behavior since dfg_vertex members are not pointers anymore Get a list of all MSU not possessing a "scheduling" object, and ask for an allocation plan More...
 
static int parse_show_stats (char *args)
 Display controller's time series for a given msu. More...
 
static int parse_show_msus (char *args)
 
static int parse_add_msu (char *args)
 
static int parse_del_msu (char *args)
 
static int parse_add_route (char *args)
 
static int parse_del_route (char *args)
 
static int parse_add_endpoint (char *args)
 
static int parse_del_endpoint (char *args)
 
static int parse_mod_endpoint (char *args)
 
static int parse_create_thread (char *args)
 
static int parse_load_cfg (char *args)
 
static int parse_clone_msu (char *args)
 
static int parse_unclone_msu (char *args)
 
static int parse_show_routes (char *args)
 
static int parse_show_route (char *args)
 
static int parse_help (char *cmd)
 
int parse_cmd_action (char *cmd)
 
static void * cli_loop ()
 
int start_cli_thread (pthread_t *cli_thread)
 

Variables

struct cmd_action cmd_actions []
 

Macro Definition Documentation

#define BLD   "\e[1m"

Definition at line 44 of file cli.c.

#define HELP_PREAMBLE
Value:
"\nList of available commands : \n" \
"\n" \
"\t******* Note: " UL "ARGUMENTS" NOSTYLE " fields are required, excluding " \
UL "[BRACKETED]" NOSTYLE " ****\n" \
"\n"
#define NOSTYLE
Definition: cli.c:46
#define UL
Definition: cli.c:45

Definition at line 48 of file cli.c.

#define NEXT_ARG (   arg,
  args 
)
Value:
if ( ( arg = strtok(args, " \r\n") ) == NULL){ \
log_error("Missing required argument"); \
return -1; \
}
#define log_error(fmt,...)
Definition: logging.h:101

Definition at line 78 of file cli.c.

#define NEXT_MSU_LOCAL   1

Definition at line 41 of file cli.c.

#define NEXT_MSU_REMOTE   2

Definition at line 42 of file cli.c.

#define NOSTYLE   "\e[0m"

Definition at line 46 of file cli.c.

#define UL   "\e[4m"

Definition at line 45 of file cli.c.

Function Documentation

static void* cli_loop ( )
static

Definition at line 546 of file cli.c.

static int parse_add_endpoint ( char *  args)
static

Definition at line 260 of file cli.c.

static int parse_add_msu ( char *  args)
static

Definition at line 175 of file cli.c.

static int parse_add_route ( char *  args)
static

Definition at line 229 of file cli.c.

static int parse_allocate ( )
static

//FIXME: broken behavior since dfg_vertex members are not pointers anymore Get a list of all MSU not possessing a "scheduling" object, and ask for an allocation plan

Parameters
none
Returns
none

Definition at line 90 of file cli.c.

static int parse_clone_msu ( char *  args)
static

Definition at line 358 of file cli.c.

int parse_cmd_action ( char *  cmd)

Definition at line 506 of file cli.c.

static int parse_create_thread ( char *  args)
static

Definition at line 313 of file cli.c.

static int parse_del_endpoint ( char *  args)
static

Definition at line 278 of file cli.c.

static int parse_del_msu ( char *  args)
static

Definition at line 216 of file cli.c.

static int parse_del_route ( char *  args)
static

Definition at line 244 of file cli.c.

static int parse_help ( char *  cmd)
static

Definition at line 534 of file cli.c.

static int parse_load_cfg ( char *  args)
static

Definition at line 333 of file cli.c.

static int parse_mod_endpoint ( char *  args)
static

Definition at line 293 of file cli.c.

static int parse_show_msus ( char *  args)
static

Definition at line 142 of file cli.c.

static int parse_show_route ( char *  args)
static

Definition at line 417 of file cli.c.

static int parse_show_routes ( char *  args)
static

Definition at line 398 of file cli.c.

static int parse_show_runtimes ( char *  args)
static

Definition at line 64 of file cli.c.

static int parse_show_stats ( char *  args)
static

Display controller's time series for a given msu.

Parameters
*argsstring received from the CLI
Returns
none

Definition at line 127 of file cli.c.

static int parse_unclone_msu ( char *  args)
static

Definition at line 377 of file cli.c.

int start_cli_thread ( pthread_t *  cli_thread)

Definition at line 568 of file cli.c.

Variable Documentation

struct cmd_action cmd_actions[]

Definition at line 439 of file cli.c.