~ubuntu-branches/debian/sid/ion/sid

« back to all changes in this revision

Viewing changes to nm/mgr/nm_mgr_ui.h

  • Committer: Package Import Robot
  • Author(s): Leo Iannacone
  • Date: 2013-07-09 16:22:20 UTC
  • mfrom: (1.2.2)
  • Revision ID: package-import@ubuntu.com-20130709162220-vfrvtfbl78wqzn9x
Tags: 3.2.0~dfsg1-1
* New upstream release.
* Updated debian/ion-tools.pod and debian/ion.links
  with new binaries.
* Updated fix-manpages-errors.patch (closes: #724143).
* Refreshed old patches.
* Removed fix-gcc4.8-errors.patch. Applied to upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/******************************************************************************
 
2
 **                           COPYRIGHT NOTICE
 
3
 **      (c) 2012 The Johns Hopkins University Applied Physics Laboratory
 
4
 **                         All rights reserved.
 
5
 **
 
6
 **     This material may only be used, modified, or reproduced by or for the
 
7
 **       U.S. Government pursuant to the license rights granted under
 
8
 **          FAR clause 52.227-14 or DFARS clauses 252.227-7013/7014
 
9
 **
 
10
 **     For any other permissions, please contact the Legal Office at JHU/APL.
 
11
 ******************************************************************************/
 
12
 
 
13
/*****************************************************************************
 
14
 **
 
15
 ** \file nm_mgr_ui.h
 
16
 **
 
17
 **
 
18
 ** Description: A text-based DTNMP Manager. This manager provides the
 
19
 **              following functions associated with DTN network management:
 
20
 **
 
21
 **              1. Define and send custom report and macro definitions
 
22
 **              2. Provide tools to build all versions of MIDs and OIDs.
 
23
 **              3. Configure Agents for time- and state- based production
 
24
 **              4. Print data reports received from a DTNMP Agent
 
25
 **
 
26
 ** Notes:
 
27
 **             1. Currently we do not support ACLs.
 
28
 **             2. Currently, we do not support multiple DTNMP agents.
 
29
 **
 
30
 ** Assumptions:
 
31
 **
 
32
 ** Modification History:
 
33
 **  MM/DD/YY  AUTHOR         DESCRIPTION
 
34
 **  --------  ------------   ---------------------------------------------
 
35
 **  01/18/13  E. Birrane     Code comments and cleanup
 
36
 *****************************************************************************/
 
37
#include "nm_mgr.h"
 
38
 
 
39
#include "shared/utils/nm_types.h"
 
40
#include "shared/adm/adm.h"
 
41
#include "shared/primitives/mid.h"
 
42
 
 
43
 
 
44
#define UI_MAIN_MENU  0
 
45
#define UI_ADMIN_MENU 1
 
46
#define UI_DEF_MENU   2
 
47
#define UI_RPT_MENU   3
 
48
#define UI_CTRL_MENU  4
 
49
 
 
50
extern int gContext;
 
51
 
 
52
 
 
53
mid_t *ui_build_mid(char *mid_str);
 
54
 
 
55
void ui_clear_reports(agent_t* agent);
 
56
 
 
57
agent_t *ui_select_agent();
 
58
 
 
59
void ui_construct_ctrl_by_idx(agent_t* agent);
 
60
void ui_construct_time_rule_by_idx(agent_t* agent);
 
61
void ui_construct_time_rule_by_mid(agent_t* agent);
 
62
 
 
63
void ui_define_macro(agent_t* agent);
 
64
void ui_define_report(agent_t* agent);
 
65
void ui_define_mid_params(char *name, int num_parms, mid_t *mid);
 
66
 
 
67
void ui_register_agent();
 
68
void ui_deregister_agent();
 
69
 
 
70
void ui_event_loop();
 
71
 
 
72
int ui_get_user_input(char *prompt, char **line, int max_len);
 
73
 
 
74
mid_t *ui_input_mid();
 
75
int ui_input_mid_flag(uint8_t *flag);
 
76
 
 
77
Lyst ui_parse_mid_str(char *mid_str, int max_idx, int type);
 
78
 
 
79
void ui_print_ctrls();
 
80
int ui_print_agents();
 
81
void ui_print_custom_rpt(rpt_data_entry_t *rpt_entry, def_gen_t *rpt_def);
 
82
void ui_print_menu_admin();
 
83
void ui_print_menu_ctrl();
 
84
void ui_print_menu_def();
 
85
void ui_print_menu_main();
 
86
void ui_print_menu_rpt();
 
87
void ui_print_mids();
 
88
void ui_print_predefined_rpt(mid_t *mid, uint8_t *data, uint64_t data_size, uint64_t *data_used, adm_datadef_t *adu);
 
89
void ui_print_reports(agent_t *agent);
 
90
 
 
91
void ui_run_tests();
 
92
 
 
93
 
 
94
void *ui_thread(void * threadId);