For full documentation, go here: https://midas.triumf.ca/MidasWiki/index.php/Mhttpd.js
List of functions used in this example:
mjsonrpc_set_url(url); mjsonrpc_db_get_values(paths); mjsonrpc_db_copy(paths); mjsonrpc_db_paste(paths, values); mjsonrpc_db_ls(paths); mjsonrpc_db_create(specs); mjsonrpc_db_resize(paths, new_lengths); mjsonrpc_db_key(paths); test db_rename test db_link test db_reorder mjsonrpc_db_delete(paths); mjsonrpc_cm_msg(message); test cm_exist() test cm_shutdown() test start_program() test al_trigger_alarm() test al_reset_alarm() test get_alarms() test jrpc() --- ODBSet(path, value, pwdname); ---- use mjsonrpc_db_paste() instead --- ODBGet(path, format, defval, len, type); ---- use ODBMCopy() instead ---- use mjsonrpc_db_get_values() instead --- ODBMGet(paths, callback, formats); ---- use ODBMCopy() instead ---- use mjsonrpc_db_get_values() instead --- ODBGetRecord(path); ---- use ODBMCopy() instead ---- use mjsonrpc_db_get_values() instead --- ODBExtractRecord(record, key); ---- use ODBMCopy() instead ---- use mjsonrpc_db_get_values() instead --- new ODBKey(path); ---- use ODBMKey() instead --- ODBCopy(path, format); ---- use ODBMCopy() instead ---- use mjsonrpc_db_get_values() instead --- ODBMCopy(paths, callback, format); ---- use mjsonrpc_db_get_values() instead --- ODBMLs(paths, callback); ---- use mjsonrpc_db_ls() instead --- ODBMCreate(paths, types); ---- use mjsonrpc_db_create() instead --- ODBMCreate(paths, types, arraylengths, stringlengths, callback); ---- use mjsonrpc_db_create() instead --- ODBMResize(paths, arraylengths, stringlengths, callback); ---- use mjsonrpc_db_resize() instead --- ODBMRename(paths, names, callback); ---- use RPC "db_rename" --- ODBMLink(paths, links, callback); ---- use RPC "db_link" --- ODBMReorder(paths, indices, callback); ---- use RPC "db_reorder" --- ODBMKey(paths, callback); ---- use mjsonrpc_db_key() instead --- ODBMDelete(paths, callback); ---- use mjsonrpc_db_delete() instead --- ODBRpc(name, command, args[, callback[, max_reply_length]]); ---- use RPC "jrpc" ODBGetMsg(n); --- ODBGenerateMsg(m); ---- use mjsonrpc_cm_msg() instead --- ODBGetAlarms(); ---- use mjsonrpc_call("get_alarms") ODBEdit(path);
Last updated: never
This data is updated by web page reload - press your web browser "reload" button
Settings/Example_int:
Variables/SLOW[2]:
Type in a message and press Enter. See the new message on the MIDAS "messages" page or press "Get MIDAS messages" button in the ODBGetMsg() section above
This data is updated by the javascript update() function - press the "update now" button above
Settings/Example_int: not loaded yet
Variables/SLOW[2]: not loaded yet
This data is updated by the javascript update() function - press the "update now" button above
Settings/Example_int: not loaded yet
Variables/SLOW[2]: not loaded yet
(empty)
(empty)
(empty)
(empty)
(empty)
Data in ODB format:
(empty)Data in XML format:
(empty)Data in JSON format:
(empty)
Paths:
(empty)Data in ODB format:
(empty)Data in XML format:
(empty)Data in JSON format:
(empty)Data in JSON-P format:
(empty)Data in JSON-P format without KEY data:
(empty)
Reply:
Reply:
Reply:
Reply:
Reply:
Reply:
Reply:
Reply:
Reply:
Press these buttons to write new values to ODB. ODB variables of appropriate type have to be created before calling ODBSet(). Observe updated values in the ODBGet() section above.
Set Settings/Example_int to:
Set Settings/Example_int to any value: (type in any value and press Enter)
Observe updated values in the ODBGet() section above. (Hint: press the "update now" button above)
Call the rpc_callback function in fejrpc.cxx:
Data returned by the RPC call:
Observe the output of the example rpc handler in midas messages or in the ODBGetMsg() section below
(empty)
Type in a message and press Enter. See the new message on the MIDAS "messages" page or press "Get MIDAS messages" button in the ODBGetMsg() section above
(empty)
Test built-in functions:
Test error responses:
Test examples from mjsonrpc_user.cxx
test other stuff
test mjsonrpc_db_get_values() crash
test mjsonrpc_db_paste() korner cases
nan and inf
(note: frontend "fetest" should be running)