#include <interpreter.h>
Collaboration diagram for SMP::SMPInterpreter:

Public Member Functions | |
| void | start_kernel (void) |
| SMP starts working here. | |
| void | setup (void) |
| setup SMP kernel with the current setup of filters and buffers | |
| void | reset (void) |
| reset SMP kernel with empty filters and buffers | |
| void | clear_project (void) |
| clear current project (will clear both filter and buffer) | |
| void | print_project (void) |
| print current project information | |
| void | print_help (void) |
| print SMP interpreter available commands | |
| int | get_filter_property (vector< _filter * > &target, int id) |
| get and display filter's adjustable properties from _filter structure | |
| void | get_filter_property (vector< _filter * > &target) |
| get and display all loaded filters' adjustable properties | |
| void | get_buffer_property () |
| get and display all buffers' detailed information | |
| int | get_buffer_property (int id) |
| get and display buffer's adjustable properties from _buffer structure | |
| int | set_filter_property (int id, string property_name, string value) |
| set property of a filter | |
| int | reset_filter_property (int id) |
| reset property of a filter to default values | |
| int | reset_filter_property (void) |
| reset property of all filters to default values | |
| SMPInterpreter (int *pargc, char ***pargv) | |
| ~SMPInterpreter () | |
| void | start (void) |
| Start the interpreter the entry point of the SMP interpreter. Start the interpreter the entry point of the SMP interpreter. SMP kernel control prompt, working as a thread it receives user input commands and invokes proper functions. A text-mode user interface. | |
| bool | load_project (char *filename) |
| load project at first | |
| void | set_repository (char *path) |
| Set repository path. | |
| char * | get_repository () |
| Get repository path. | |
| int | execute_cmd (char *cmd) |
| execute user command | |
| void | show_current_filters () |
| show the filters used in current project on stdout | |
| void | show_current_buffers () |
| show the buffers used in current project on stdout | |
| bool | _load_filters () |
| bool | _print_filters () |
| bool | _add_filter (int fid, bool is_prompt=true) |
| bool | _add_filter_byname (string fname, bool is_prompt=true) |
| bool | _add_filter (_filter *filter, bool is_prompt=true) |
| bool | _add_buffer (int src_fid, int src_pid, int dest_fid, int dest_pid, int type=DATA_BUFFER) |
| bool | _set_buffer_size (int src_fid, int src_pid, int size, int type) |
| bool | _del_filter (int fidx) |
| bool | _del_buffer (int bidx) |
| bool | _del_buffer (int src_fid, int src_pid, int dest_fid, int dest_pid) |
| int | _get_fidx_by_fuid (uint fuid) |
| int | _get_bidx_by_buid (uint buid) |
| void | _start () |
| void | _stop () |
| void | _pause () |
| void | _resume () |
| bool | _isStopped () |
| bool | _isPaused () |
Static Public Member Functions | |
| static void * | cmd_handler (void *arg) |
| this starts SMP server, which waits for any SMP controller to take control of itself. the socket connection handler thread, which handles incoming command | |
| static void * | run (void *arg) |
| threading callback function, which calls prompt() | |
Public Attributes | |
| void * | kernel_lib |
| SMPKernel * | kernel |
| SMPParser * | parser |
| pthread_t | kernel_thread |
| vector< string > | cmd_history |
| map< string, int > | kernel_config |
| vector< _filter * > | filter_list |
| vector< _buffer * > | buffer_list |
| vector< _filter * > | filters |
| char | repos_path [100] |
| int | sw_fd |
| string | err_string |
Friends | |
| class | SMPParser |
| SMP::SMPInterpreter::SMPInterpreter | ( | int * | pargc, | |
| char *** | pargv | |||
| ) |
the constructor
| SMP::SMPInterpreter::~SMPInterpreter | ( | ) |
the destructor
| void SMP::SMPInterpreter::start_kernel | ( | void | ) |
SMP starts working here.
| int SMP::SMPInterpreter::get_filter_property | ( | vector< _filter * > & | target, | |
| int | id | |||
| ) |
get and display filter's adjustable properties from _filter structure
| target | the target vector, can be either filter_list or filters | |
| id | filter id in target |
| void SMP::SMPInterpreter::get_filter_property | ( | vector< _filter * > & | target | ) |
| void SMP::SMPInterpreter::get_buffer_property | ( | ) |
| int SMP::SMPInterpreter::get_buffer_property | ( | int | id | ) |
get and display buffer's adjustable properties from _buffer structure
| id | buffer id in vector<_buffer> buffer_list |
| int SMP::SMPInterpreter::set_filter_property | ( | int | id, | |
| string | property_name, | |||
| string | value | |||
| ) |
set property of a filter
| id | filter id | |
| property_name | the name of the property | |
| value | the value to set |
| int SMP::SMPInterpreter::reset_filter_property | ( | int | id | ) |
reset property of a filter to default values
| id | filter id |
| void * SMP::SMPInterpreter::run | ( | void * | arg | ) | [static] |
threading callback function, which calls prompt()
| arg | "this" pointer of SMPInterpreter so as to call prompt() |
| int SMP::SMPInterpreter::execute_cmd | ( | char * | cmd | ) |
execute user command
| cmd | the user command |
| void SMP::SMPInterpreter::show_current_filters | ( | ) |
show the filters used in current project on stdout
| void SMP::SMPInterpreter::show_current_buffers | ( | ) |
show the buffers used in current project on stdout
| pthread_t SMP::SMPInterpreter::kernel_thread |
a pthread thread to run kernel
| vector<string> SMP::SMPInterpreter::cmd_history |
command history list
| map<string, int> SMP::SMPInterpreter::kernel_config |
kernel configuration maps
| vector<_filter*> SMP::SMPInterpreter::filter_list |
the filter list SMP kernel will produce filters according to the list
| vector<_buffer*> SMP::SMPInterpreter::buffer_list |
the buffer list SMP kernel will produce buffers according to the list
| vector<_filter*> SMP::SMPInterpreter::filters |
the total filter list in the system
| char SMP::SMPInterpreter::repos_path[100] |
repository path
file descriptor for socket object
1.5.1