Examples for MIDAS Javascript functions

List of mhttpd.js functions

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);

Example custom page starts here

Last updated: never


MIDAS Example
Last modified: Wed Jan 27 18:04:43 PST 2016