|
MIDAS
|
#include <stdio.h>#include <stdlib.h>#include <assert.h>#include <map>#include "mjson.h"#include "midas.h"#include "msystem.h"#include "mstrlcpy.h"#include "mjsonrpc.h"#include <mutex>#include "history.h"
Go to the source code of this file.
Classes | |
| class | JsonHistoryBuffer |
| class | BinaryHistoryBuffer |
| struct | EventStashEntry |
| struct | MethodsTableEntry |
| struct | NestedLine |
| class | NestedOutput |
Typedefs | |
| typedef std::map< std::string, MidasHistoryInterface * > | MhiMap |
| typedef std::map< std::string, MethodsTableEntry > | MethodsTable |
| typedef MethodsTable::iterator | MethodsTableIterator |
Functions | |
| static double | GetTimeSec () |
| MJsonNode * | mjsonrpc_make_error (int code, const char *message, const char *data) |
| MJsonNode * | mjsonrpc_make_result (MJsonNode *node) |
| MJsonNode * | mjsonrpc_make_result (const char *name, MJsonNode *value, const char *name2, MJsonNode *value2, const char *name3, MJsonNode *value3) |
| MJsonNode * | mjsonrpc_make_result (const char *name, MJsonNode *value, const char *name2, MJsonNode *value2, const char *name3, MJsonNode *value3, const char *name4, MJsonNode *value4) |
| const MJsonNode * | mjsonrpc_get_param (const MJsonNode *params, const char *name, MJsonNode **error) |
| const MJsonNodeVector * | mjsonrpc_get_param_array (const MJsonNode *params, const char *name, MJsonNode **error) |
| static std::string | remove (const std::string s, char c) |
| static MJsonNode * | xnull (const MJsonNode *params) |
| static MJsonNode * | js_cm_exist (const MJsonNode *params) |
| static MJsonNode * | js_cm_shutdown (const MJsonNode *params) |
| static MJsonNode * | start_program (const MJsonNode *params) |
| static MJsonNode * | exec_script (const MJsonNode *params) |
| static int | parse_array_index_list (const char *method, const char *path, std::vector< unsigned > *list) |
| static MJsonNode * | js_db_get_values (const MJsonNode *params) |
| static MJsonNode * | js_db_ls (const MJsonNode *params) |
| static MJsonNode * | js_db_copy (const MJsonNode *params) |
| static MJsonNode * | js_db_paste (const MJsonNode *params) |
| static MJsonNode * | js_db_create (const MJsonNode *params) |
| static MJsonNode * | js_db_delete (const MJsonNode *params) |
| static MJsonNode * | js_db_resize (const MJsonNode *params) |
| static MJsonNode * | js_db_resize_string (const MJsonNode *params) |
| static MJsonNode * | js_db_key (const MJsonNode *params) |
| static MJsonNode * | js_db_rename (const MJsonNode *params) |
| static MJsonNode * | js_db_link (const MJsonNode *params) |
| static MJsonNode * | js_db_reorder (const MJsonNode *params) |
| static MJsonNode * | js_db_sor (const MJsonNode *params) |
| static MJsonNode * | js_db_scl (const MJsonNode *params) |
| static MJsonNode * | js_cm_msg_facilities (const MJsonNode *params) |
| static MJsonNode * | js_cm_msg1 (const MJsonNode *params) |
| static MJsonNode * | js_cm_msg_retrieve (const MJsonNode *params) |
| static MJsonNode * | js_al_reset_alarm (const MJsonNode *params) |
| static MJsonNode * | js_al_trigger_alarm (const MJsonNode *params) |
| static MJsonNode * | js_al_trigger_class (const MJsonNode *params) |
| static MJsonNode * | js_hs_get_active_events (const MJsonNode *params) |
| static MidasHistoryInterface * | GetHistory (const char *name) |
| static void | js_hs_exit () |
| static MJsonNode * | js_hs_get_channels (const MJsonNode *params) |
| static MJsonNode * | js_hs_get_events (const MJsonNode *params) |
| static MJsonNode * | js_hs_reopen (const MJsonNode *params) |
| static MJsonNode * | js_hs_get_tags (const MJsonNode *params) |
| static MJsonNode * | js_hs_get_last_written (const MJsonNode *params) |
| static MJsonNode * | js_hs_read (const MJsonNode *params) |
| static MJsonNode * | js_hs_read_binned (const MJsonNode *params) |
| static MJsonNode * | js_hs_read_arraybuffer (const MJsonNode *params) |
| static MJsonNode * | js_hs_read_binned_arraybuffer (const MJsonNode *params) |
| static MJsonNode * | js_hs_image_retrieve (const MJsonNode *params) |
| static MJsonNode * | js_el_retrieve (const MJsonNode *params) |
| static MJsonNode * | js_el_query (const MJsonNode *params) |
| static MJsonNode * | js_el_delete (const MJsonNode *params) |
| static MJsonNode * | jrpc (const MJsonNode *params) |
| static MJsonNode * | brpc (const MJsonNode *params) |
| static MJsonNode * | js_cm_transition (const MJsonNode *params) |
| static const EVENT_HEADER * | CopyEvent (const EVENT_HEADER *pevent) |
| static void | StashEvent (const std::string buffer_name, int event_id, int trigger_mask, const EVENT_HEADER *pevent) |
| static void | MatchEvent (const std::string buffer_name, const EVENT_HEADER *pevent) |
| static void | DeleteEventStash () |
| static const EVENT_HEADER * | FindEvent (const std::string buffer_name, int event_id, int trigger_mask, int last_event_id, int last_trigger_mask, DWORD last_serial_number, DWORD last_time_stamp) |
| static MJsonNode * | js_bm_receive_event (const MJsonNode *params) |
| static MJsonNode * | js_ss_millitime (const MJsonNode *params) |
| static MJsonNode * | get_alarms (const MJsonNode *params) |
| static MJsonNode * | js_make_subdir (const MJsonNode *params) |
| static MJsonNode * | js_ext_list_files (const MJsonNode *params) |
| static MJsonNode * | js_ext_save_file (const MJsonNode *params) |
| static MJsonNode * | js_ext_read_file (const MJsonNode *params) |
| static MJsonNode * | js_read_binary_file (const MJsonNode *params) |
| static MJsonNode * | get_debug (const MJsonNode *params) |
| static MJsonNode * | set_debug (const MJsonNode *params) |
| static MJsonNode * | get_sleep (const MJsonNode *params) |
| static MJsonNode * | set_sleep (const MJsonNode *params) |
| static MJsonNode * | get_time (const MJsonNode *params) |
| static MJsonNode * | set_time (const MJsonNode *params) |
| static MJsonNode * | get_schema (const MJsonNode *params) |
| static MJsonNode * | js_get_timezone (const MJsonNode *params) |
| void | mjsonrpc_add_handler (const char *method, mjsonrpc_handler_t *handler, bool needs_locking) |
| void | mjsonrpc_set_std_mutex (void *mutex) |
| void | mjsonrpc_init () |
| void | mjsonrpc_exit () |
| static MJsonNode * | mjsonrpc_make_schema (MethodsTable *h) |
| MJsonNode * | mjsonrpc_get_schema () |
| static std::string | indent (int x, const char *p=" ") |
| static std::string | mjsonrpc_schema_to_html_anything (const MJsonNode *schema, int nest_level, NestedOutput *o) |
| static std::string | mjsonrpc_schema_to_html_object (const MJsonNode *schema, int nest_level, NestedOutput *o) |
| static std::string | mjsonrpc_schema_to_html_array (const MJsonNode *schema, int nest_level, NestedOutput *o) |
| std::string | mjsonrpc_schema_to_text (const MJsonNode *schema) |
| static void | add (std::string *s, const char *text) |
| static MJsonNode * | mjsonrpc_handle_request (const MJsonNode *request) |
| MJsonNode * | mjsonrpc_decode_post_data (const char *post_data) |
Variables | |
| int | mjsonrpc_debug = 0 |
| static int | mjsonrpc_sleep = 0 |
| static int | mjsonrpc_time = 0 |
| static MJsonNode * | gNullNode = NULL |
| static MhiMap | gHistoryChannels |
| static std::mutex | gEventStashMutex |
| static std::vector< EventStashEntry * > | gEventStash |
| static MethodsTable | gMethodsTable |
| static std::mutex * | gMutex = NULL |
| typedef std::map<std::string, MethodsTableEntry> MethodsTable |
Definition at line 4638 of file mjsonrpc.cxx.
| typedef MethodsTable::iterator MethodsTableIterator |
Definition at line 4639 of file mjsonrpc.cxx.
| typedef std::map<std::string,MidasHistoryInterface*> MhiMap |
Definition at line 1685 of file mjsonrpc.cxx.
|
static |
Definition at line 5102 of file mjsonrpc.cxx.
|
static |
Definition at line 3419 of file mjsonrpc.cxx.


|
static |
Definition at line 3546 of file mjsonrpc.cxx.

|
static |
Definition at line 3634 of file mjsonrpc.cxx.

|
static |
Definition at line 519 of file mjsonrpc.cxx.


|
static |
Definition at line 3645 of file mjsonrpc.cxx.


|
static |
Definition at line 3853 of file mjsonrpc.cxx.


|
static |
Definition at line 4509 of file mjsonrpc.cxx.


|
static |
Definition at line 4590 of file mjsonrpc.cxx.


|
static |
Definition at line 4536 of file mjsonrpc.cxx.


|
static |
Definition at line 4563 of file mjsonrpc.cxx.

|
static |
Definition at line 1689 of file mjsonrpc.cxx.


|
static |
Definition at line 116 of file mjsonrpc.cxx.


|
static |
Definition at line 4796 of file mjsonrpc.cxx.

|
static |
Definition at line 3348 of file mjsonrpc.cxx.


|
static |
Definition at line 1579 of file mjsonrpc.cxx.


|
static |
Definition at line 1603 of file mjsonrpc.cxx.


|
static |
Definition at line 1630 of file mjsonrpc.cxx.


|
static |
Definition at line 3667 of file mjsonrpc.cxx.


|
static |
Definition at line 432 of file mjsonrpc.cxx.


|
static |
Definition at line 1500 of file mjsonrpc.cxx.


|
static |
Definition at line 1475 of file mjsonrpc.cxx.


|
static |
Definition at line 1532 of file mjsonrpc.cxx.


|
static |
Definition at line 459 of file mjsonrpc.cxx.


|
static |
Definition at line 3486 of file mjsonrpc.cxx.


|
static |
Definition at line 860 of file mjsonrpc.cxx.


|
static |
Definition at line 1030 of file mjsonrpc.cxx.


|
static |
Definition at line 1095 of file mjsonrpc.cxx.


|
static |
Definition at line 640 of file mjsonrpc.cxx.


|
static |
Definition at line 1225 of file mjsonrpc.cxx.


|
static |
Definition at line 1343 of file mjsonrpc.cxx.


|
static |
Definition at line 805 of file mjsonrpc.cxx.


|
static |
Definition at line 915 of file mjsonrpc.cxx.


|
static |
Definition at line 1293 of file mjsonrpc.cxx.


|
static |
Definition at line 1385 of file mjsonrpc.cxx.


|
static |
Definition at line 1123 of file mjsonrpc.cxx.


|
static |
Definition at line 1172 of file mjsonrpc.cxx.


|
static |
Definition at line 1452 of file mjsonrpc.cxx.


|
static |
Definition at line 1430 of file mjsonrpc.cxx.


|
static |
Definition at line 3325 of file mjsonrpc.cxx.


|
static |
Definition at line 3050 of file mjsonrpc.cxx.


|
static |
Definition at line 2984 of file mjsonrpc.cxx.


|
static |
Definition at line 4143 of file mjsonrpc.cxx.


|
static |
Definition at line 4347 of file mjsonrpc.cxx.


|
static |
Definition at line 4271 of file mjsonrpc.cxx.


|
static |
Definition at line 4603 of file mjsonrpc.cxx.


|
static |
Definition at line 1739 of file mjsonrpc.cxx.


|
static |
Definition at line 1661 of file mjsonrpc.cxx.


|
static |
Definition at line 1748 of file mjsonrpc.cxx.


|
static |
Definition at line 1825 of file mjsonrpc.cxx.


|
static |
Definition at line 1969 of file mjsonrpc.cxx.


|
static |
Definition at line 1891 of file mjsonrpc.cxx.


|
static |
Definition at line 2939 of file mjsonrpc.cxx.


|
static |
Definition at line 2098 of file mjsonrpc.cxx.


|
static |
Definition at line 2441 of file mjsonrpc.cxx.


|
static |
Definition at line 2207 of file mjsonrpc.cxx.


|
static |
Definition at line 2626 of file mjsonrpc.cxx.


|
static |
Definition at line 1866 of file mjsonrpc.cxx.


|
static |
Definition at line 4077 of file mjsonrpc.cxx.


|
static |
Definition at line 4429 of file mjsonrpc.cxx.


|
static |
Definition at line 3834 of file mjsonrpc.cxx.


|
static |
Definition at line 3621 of file mjsonrpc.cxx.


| const MJsonNodeVector * mjsonrpc_get_param_array | ( | const MJsonNode * | params, |
| const char * | name, | ||
| MJsonNode ** | error | ||
| ) |
Definition at line 201 of file mjsonrpc.cxx.


|
static |
Definition at line 5110 of file mjsonrpc.cxx.


| MJsonNode * mjsonrpc_make_result | ( | const char * | name, |
| MJsonNode * | value, | ||
| const char * | name2, | ||
| MJsonNode * | value2, | ||
| const char * | name3, | ||
| MJsonNode * | value3, | ||
| const char * | name4, | ||
| MJsonNode * | value4 | ||
| ) |
Definition at line 158 of file mjsonrpc.cxx.
|
static |
Definition at line 4751 of file mjsonrpc.cxx.

|
static |
Definition at line 5050 of file mjsonrpc.cxx.


|
static |
Definition at line 4994 of file mjsonrpc.cxx.


|
static |
Definition at line 4908 of file mjsonrpc.cxx.


|
static |
Definition at line 560 of file mjsonrpc.cxx.


|
static |
Definition at line 253 of file mjsonrpc.cxx.

|
static |
Definition at line 4522 of file mjsonrpc.cxx.


|
static |
Definition at line 4549 of file mjsonrpc.cxx.


|
static |
Definition at line 4576 of file mjsonrpc.cxx.


|
static |
Definition at line 486 of file mjsonrpc.cxx.


|
static |
Definition at line 3594 of file mjsonrpc.cxx.


|
static |
Definition at line 413 of file mjsonrpc.cxx.


|
static |
Definition at line 3592 of file mjsonrpc.cxx.
|
static |
Definition at line 3591 of file mjsonrpc.cxx.
|
static |
Definition at line 1687 of file mjsonrpc.cxx.
|
static |
Definition at line 4641 of file mjsonrpc.cxx.
|
static |
Definition at line 4642 of file mjsonrpc.cxx.
|
static |
Definition at line 176 of file mjsonrpc.cxx.
|
static |
Definition at line 113 of file mjsonrpc.cxx.
|
static |
Definition at line 114 of file mjsonrpc.cxx.