|
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_cxx (const MJsonNode *params) |
| static MJsonNode * | jrpc_old (const MJsonNode *params) |
| static MJsonNode * | brpc_cxx (const MJsonNode *params) |
| static MJsonNode * | brpc_old (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 4729 of file mjsonrpc.cxx.
| typedef MethodsTable::iterator MethodsTableIterator |
Definition at line 4730 of file mjsonrpc.cxx.
| typedef std::map<std::string,MidasHistoryInterface*> MhiMap |
Definition at line 1682 of file mjsonrpc.cxx.
|
static |
Definition at line 5197 of file mjsonrpc.cxx.
|
static |
Definition at line 3467 of file mjsonrpc.cxx.


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


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

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

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


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


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


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


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


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


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

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


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


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

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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


|
static |
Definition at line 3715 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 5205 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 4846 of file mjsonrpc.cxx.

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


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


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


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


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

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


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


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


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


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


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


|
static |
Definition at line 3686 of file mjsonrpc.cxx.
|
static |
Definition at line 3685 of file mjsonrpc.cxx.
|
static |
Definition at line 1684 of file mjsonrpc.cxx.
|
static |
Definition at line 4732 of file mjsonrpc.cxx.
|
static |
Definition at line 4733 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.