openc3-cosmos-tool-docs 5.12.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE.txt +729 -0
- data/README.md +42 -0
- data/Rakefile +42 -0
- data/plugin.txt +7 -0
- data/tools/docs/404.html +16 -0
- data/tools/docs/CNAME +1 -0
- data/tools/docs/assets/css/styles.7bc79028.css +1 -0
- data/tools/docs/assets/images/add_packet-f318d0e92e8a13bd56331350aa341c88c8b12f2c54a4424f6e287817f22fb327.png +0 -0
- data/tools/docs/assets/images/architecture-b78f12eba076a0c07af7abdd9dd4187c59aa6b4f5c51b47ad03f73e9f98a6ed6.png +0 -0
- data/tools/docs/assets/images/autonomic-3d6d152f700c8fc1878d0f952d013ace31fccd7872d28587dc761610a0959e9c.png +0 -0
- data/tools/docs/assets/images/bucket_explorer-983c087ee3bdcf8626219e782620b6c580fd82bfe2e8b0c662a0f90cdca43838.png +0 -0
- data/tools/docs/assets/images/calendar-9fbd635cf3df1ba684bb0c1ebc4f6ad34991efc582e9fd07820c8b74cbb66aa1.png +0 -0
- data/tools/docs/assets/images/checks_rb-a6049cdd99613cea2ee12d76fcfe798ff05270e39d208e93d37da7347049b2b3.png +0 -0
- data/tools/docs/assets/images/cmd_tlm_server-313e3f64afc0e374d9d28b46364235d7b793001f84690fc0ae90e1eefdd9142d.png +0 -0
- data/tools/docs/assets/images/command_sender-a0b113b65368263529d0f8f2d93276a0a44ed81af0d0100f56379346ba592928.png +0 -0
- data/tools/docs/assets/images/commands-3608d5c856fd34e771d1f9e69f9f449f52929249bdf4f0e7feed0aa2bd2d9fd7.png +0 -0
- data/tools/docs/assets/images/connecting-6e453f3d99800d4cb8fdc78f5b8fce1e8cf1bb04840a29dec7c5caefd07c004f.png +0 -0
- data/tools/docs/assets/images/data_extractor-62c5b1743ba9dfdff2e393bcbdf863c36effc5ef5319d845cfd17186bd757bca.png +0 -0
- data/tools/docs/assets/images/data_viewer-8c547cb5ad2ebd179aac5e46c2f4c147889ebad53a5359a5e6b6c580de7184fe.png +0 -0
- data/tools/docs/assets/images/date_chooser-10f7b740b9acc76604e5dc86fe409b6b777abe0fb3fa5ebf8f47cb1ac58b9676.png +0 -0
- data/tools/docs/assets/images/debug-04088348cc04bb8e1a1063fc44920dc8e39616840ef4b09a36c823f185c28669.png +0 -0
- data/tools/docs/assets/images/delete_all_mouseover-06083f3d3d712d39f21bc5eda45adbfff449732a2061e53cb1a0baf6c5f5d4b8.png +0 -0
- data/tools/docs/assets/images/delete_modified-a7ec0ceb61c37398d57fcecf11ebe2453ebd0110be6cfc960a5073a13a557638.png +0 -0
- data/tools/docs/assets/images/edit_all_items-2c57aff19d3b1ce52149c37f50dcaad8c30baa0c9931fdc629f1d163bb56ce96.png +0 -0
- data/tools/docs/assets/images/edit_all_mouseover-f6646df5320045ee10d4c0a15d0349fed6ede075f9cea6f9e449b3785c4f4f8d.png +0 -0
- data/tools/docs/assets/images/edit_graph-4ca61635376fae26cf5eb82fb9fd803f1a51c4d3584aaf9833a270b7916bf531.png +0 -0
- data/tools/docs/assets/images/edit_screen-5724ae13958c1631b3c187cf7cdb6dc9672ecd71f8b0786ac17c0266001edac3.png +0 -0
- data/tools/docs/assets/images/edit_temp1-7446e7c5b7869ccc9ddd467779fa86f44301a5e5896751b016a527587c483cb2.png +0 -0
- data/tools/docs/assets/images/file_menu-2fe13872737c0f3fef84ba5b58b80b609082733acce536ec1f56910c36f68299.png +0 -0
- data/tools/docs/assets/images/file_open-319761fd383fc513b3689ef0a7498c73ce9459a3967c8a395cc2da07c89240d0.png +0 -0
- data/tools/docs/assets/images/file_save_as-44468ed6a48bea3bc4fdd8f50d802569e4582b453e5bf946bfdcba400030d499.png +0 -0
- data/tools/docs/assets/images/four_graphs-826cf8145338fa46e037556df94c59aeb4448330b601953daa94c89de8494cfd.png +0 -0
- data/tools/docs/assets/images/graph_min_max-80a2bd83230c71b00ba9d6da24b8c32a09e4983976cdbf32c33d2680b534b106.png +0 -0
- data/tools/docs/assets/images/graph_temp1-de937a79b314cf856b783c936d2460a6c942bdd45e4d9b3fe488957df5bfa9bc.png +0 -0
- data/tools/docs/assets/images/graph_temp1_temp2-e96370f7d73a6cb68beaa92bcaaf18b72e6619ce948fe835762cca1048efbd18.png +0 -0
- data/tools/docs/assets/images/graph_temp1_time-fec5e99e3cc05ea87208abe9c4b66b63b7497bbefee55f65d034417e966b1c46.png +0 -0
- data/tools/docs/assets/images/handbooks-1d301c83c80a7cb96c548006f5139fe8ec967ed10a49df0142b37328cd987f33.png +0 -0
- data/tools/docs/assets/images/ignored-1e20d4ffe7fd88ffab610340957b1176294269f985e8fdb20a9af07d7a78215f.png +0 -0
- data/tools/docs/assets/images/inst_clear-5ecb859f06f14d91d2ebba27e5a7848d6393db5ad2357f95c12e776c45f6bc64.png +0 -0
- data/tools/docs/assets/images/inst_collect-4f4e453a6521b779e10c4d2be6a8b1acf15fcb083af0164b0df1de27ca250132.png +0 -0
- data/tools/docs/assets/images/inst_collect_hazardous-3aeabedb96bf114b4eb56b6b2ee7bcc601302ec8905a82a16c47ae7870f97978.png +0 -0
- data/tools/docs/assets/images/inst_collect_hazardous_history-952a6e6ff2fb1b5fdf2c6b3d84a3ccf9e303eeb310f35514dc4a6e95f2a7420e.png +0 -0
- data/tools/docs/assets/images/inst_collect_sent-0de429f724264ce8c52a6cb22d4bbb96f14e22b559c091ff4375bb59f124a7a2.png +0 -0
- data/tools/docs/assets/images/inst_collect_sent_3-91cf4e053d246917964330ab93534a0a5eb878b652e7ea879effca7c4eaefbea.png +0 -0
- data/tools/docs/assets/images/interface_read_logic-0deef27c1d2fec9de2a3720a3c9ecedb21a00dca7aabd13da0b8815c037e4c26.png +0 -0
- data/tools/docs/assets/images/interface_write_logic-3360afe1b4af20b10dafba848a21e09baccaacc06e2ec8b6c132ac7a3c99e994.png +0 -0
- data/tools/docs/assets/images/interfaces-5622abf50e3df63980661a48216bf71187f38cb636bd512f48917ca4a425f083.png +0 -0
- data/tools/docs/assets/images/items_table-2fc1bb4d03a2348c4af7df442e13cee2f310cf455228005d76cbfda7a706aa53.png +0 -0
- data/tools/docs/assets/images/items_table_raw-c4d454679c4503ec35710dcee6be5cd1940984595145b333d8604bc505dfe291.png +0 -0
- data/tools/docs/assets/images/items_table_temp1-ea091eaf8005cea839800f4514f72f94e9664993111b935f33e7c5aa3061ca64.png +0 -0
- data/tools/docs/assets/images/limits_monitor-c58d70daea7586b93d5069b9df068a90cea5f7cf2e51a445f3162bf3f66db3d0.png +0 -0
- data/tools/docs/assets/images/list_view-926f42bc1e43283c61616b0cd8fd630cad8e15c9b7298acd98536842472e673b.png +0 -0
- data/tools/docs/assets/images/log-ba64fd307e53adafae55fcea7eb31829ee1aacdf4aafe8b40b270b793be3aa27.png +0 -0
- data/tools/docs/assets/images/log_messages-19c3ce9c7ff86e43d459cb6591df8c05d25e1390d857728cb462a57b9d3ccc69.png +0 -0
- data/tools/docs/assets/images/log_messages-2cfad0fd6f6f980f69b5564a4b7ecfecf3331c6256c78bcfb2b084970db305ca.png +0 -0
- data/tools/docs/assets/images/minimized-59d0d8d8a179ff0475787e87237b77b24d59d78826d43dbc1a554a51380eb37f.png +0 -0
- data/tools/docs/assets/images/minimized-a658bd8f2115d3f9a386844e886de770b23bbf9c0c8c55a4ca587cea67ec320e.png +0 -0
- data/tools/docs/assets/images/minio-150460ac77a50711835de6f0150d019000e5515afae0f3adfcdda8e891484f47.png +0 -0
- data/tools/docs/assets/images/mouseover-95b774047b3c2ca23a3bc645caf75d90511c378729dd9cfb781510a1452e09fe.png +0 -0
- data/tools/docs/assets/images/new_screen-295720ec60219194c8c8dd64c755e8a188cc4a68c2b6cf66197b54514644d52a.png +0 -0
- data/tools/docs/assets/images/notifications-5b32d6619542431027ddd67491eb445469fa2d16fa8352a2b0917b9298b7bbb2.png +0 -0
- data/tools/docs/assets/images/open_config-2e61415a3c2d7a4ce427cf325f3708dd4a761092b7dd0c869279c4354dc34ae4.png +0 -0
- data/tools/docs/assets/images/open_config-3cd3be1ce4560d9e72bb37b83dc830149091dec9a088c36187e0e72660c6ec34.png +0 -0
- data/tools/docs/assets/images/open_config-55ef2f241d02047b252bb8201742f99cffed5680d0e9eb46b3cb53a644ca3dc9.png +0 -0
- data/tools/docs/assets/images/open_config-f848a8b371ae0ec31776834148e9f978d9be94efef03534e5ca3a59c0ae3847f.png +0 -0
- data/tools/docs/assets/images/packet_viewer-19c1015cc704a98d1f6d90dd0dadc13188d25f1d5d2e838b7cfb226e8c173c7b.png +0 -0
- data/tools/docs/assets/images/plugin-variables-5bc00c744182c9a9591e84cb3bbb1c4deb53ff22e05f62ce1b807c26bed782e5.png +0 -0
- data/tools/docs/assets/images/processing-b0c50908284739a76e1bbcfcb3eb34dc9446f8716117cb0e9089ad9df53ebed6.png +0 -0
- data/tools/docs/assets/images/project-fe7ac90f3e45971fca8f1be94be9dbabe494bafe705e7f8f485676e9d96e47ea.png +0 -0
- data/tools/docs/assets/images/project_update-8e7de3b0658b95d4d9931eb52ff8bf339d633cbdc273ce096eb11ceb357c009e.png +0 -0
- data/tools/docs/assets/images/raw_command-759d93759a73a6a3dd7e30f89fc4d1a544dfb6f7355abfed03897d404279161d.png +0 -0
- data/tools/docs/assets/images/raw_telemetry-ffeb6b603f9a9abbe0cb77afaaeb4b4f07dfee479682a5c9661f85589a679049.png +0 -0
- data/tools/docs/assets/images/raw_tlm_logs-8dcba4f020b36f8efbb793271b70d40d9cad627196afaeb5bf6f3931ed53fa52.png +0 -0
- data/tools/docs/assets/images/reactions-dd4a8ebf22eed921a82a5478d23178c62e2cf944d295c2b9e3f4d7ce555b0fcc.png +0 -0
- data/tools/docs/assets/images/reload_file-8e26cd3e1bc1eab7bb6c046d9a6a8231fcd76e56682d819b1e549182890c6486.png +0 -0
- data/tools/docs/assets/images/reloaded-9effa15527244928ee503eb0c3a48cc5e82c07cfb5d5c4300eacfcab913069d1.png +0 -0
- data/tools/docs/assets/images/running_scripts-78bfd36a6c8c7167234e03bd188e974927c2beea1f730498583169a81639e7a3.png +0 -0
- data/tools/docs/assets/images/save_config-0ae36ac1f8114665f2558e936ba3b30e5cba2a16cc01d3494e14ed689b4637f7.png +0 -0
- data/tools/docs/assets/images/save_config-8b028134b07c70d6de019825cbb328623fc485d72aad9ba5b1980246b316fec2.png +0 -0
- data/tools/docs/assets/images/save_config-e4ed80276ebdc2c4eaf9aaeb859cff8aecb380b22da8c659741c31ca66914098.png +0 -0
- data/tools/docs/assets/images/save_config-e748a338526ffd8f9e49def5c0d15f8a80cd987f40d210ff6c6d4b61b713555c.png +0 -0
- data/tools/docs/assets/images/script_error-ce060b3086e7b466e51a276fb6b27245b4d042f07a60fe121b0071dd65a42075.png +0 -0
- data/tools/docs/assets/images/script_runner-7d7f01b90be962b4de46c20568727c55488eec5d9844823b53a262c9cfc470fa.png +0 -0
- data/tools/docs/assets/images/script_suite-42832d936f91417740b76a39841996c8e4a7cf5391dbb19abe9d7b31ab07dd7d.png +0 -0
- data/tools/docs/assets/images/select_item-f063106a8d836656496ba81e7e7428f51bd8ab95aebab0aa4eb6ad41ed42e026.png +0 -0
- data/tools/docs/assets/images/select_packet-0b6d5a2b012445ab2bf0fd3e1545f015cd7787280d05d2bccb0a9c9220102529.png +0 -0
- data/tools/docs/assets/images/select_packet-be9d63c49f898cccb73f9e4b2b39c4b5879cead34a8ab2ede0bb08e953498e95.png +0 -0
- data/tools/docs/assets/images/select_target-71ebcab6cbefafd8958939130861a75f7544e99a043d90fa0734ec2f983d835f.png +0 -0
- data/tools/docs/assets/images/simple_screen-3c9d6d2366c716c03a301396a4ce0ea418532890f349d9bc9ebb8be90983a6e6.png +0 -0
- data/tools/docs/assets/images/status-80010882300d2f1c453fbc4cb35bdb1f06d3db578266dda95c56ea7ec230ac72.png +0 -0
- data/tools/docs/assets/images/table_manager-9a5357ce536102bc1bb0c859be552f4ac82f62e538935a3c45a8e76d4f9744db.png +0 -0
- data/tools/docs/assets/images/targets-d15296b133787be4997c3d5e7d43eec9030831f1758508a8f6a71d40d04478ce.png +0 -0
- data/tools/docs/assets/images/telemetry-3f1169fc67b3d2427047ba66a9b2f3ddf71f61edf498ee70d14e78f0ef3c1e3c.png +0 -0
- data/tools/docs/assets/images/telemetry_grapher-a96b7e0101f5e377a73a186683e967e79d748c5dff2dfed6ec0afcea5694d7c8.png +0 -0
- data/tools/docs/assets/images/telemetry_viewer-be6ee576f1efceb39c2f744889deb4c18f571c4922c69d5d0e5f49a653776a46.png +0 -0
- data/tools/docs/assets/images/temp1_details-f0b6e62bc28da18febacc936112735e1dbd5718ef675668f04d8b3e060d7f87a.png +0 -0
- data/tools/docs/assets/images/time_chooser-e4ca0705d5b97c3056b0de3ab7f71f8091482b9b2e8904e69866a43ce4e616f2.png +0 -0
- data/tools/docs/assets/images/timeline_lifecycle-0bd916dee06bf67936b043abfdbc4d5fdec7cc5a32a889ee6c05e9faf74f4c6a.png +0 -0
- data/tools/docs/assets/images/triggers-0b0b3f9cc2850c1b83b9a7aab6f8a936626fd847c3158e993e4baa0e64b38096.png +0 -0
- data/tools/docs/assets/images/two_full_height-7cf9d0bbdf0269ad85e312f6dcb77930e1e3c4319f9750968a9347fafcf26084.png +0 -0
- data/tools/docs/assets/images/two_full_width-db2d88c0e2e6fc417016f47e3bac0bf68374957d8fc014220f53870429ea1ef3.png +0 -0
- data/tools/docs/assets/images/view_portal-b2e5fef00be80f1551b965d170fc3cd8ed95597f0a1e475a8177ab2d306215f5.png +0 -0
- data/tools/docs/assets/images/view_portal_add-56f06135fc56f1fa85cbc22ea3b7ad52f311641aad25df08b6f4a6f979b30e3f.png +0 -0
- data/tools/docs/assets/js/019369f3.bb600de8.js +1 -0
- data/tools/docs/assets/js/058ffc22.ce27f074.js +1 -0
- data/tools/docs/assets/js/0686a885.5fe3bfd4.js +1 -0
- data/tools/docs/assets/js/078dbab0.0a98e0c9.js +1 -0
- data/tools/docs/assets/js/0f5d161c.3a7b00e4.js +1 -0
- data/tools/docs/assets/js/0ff569c9.930bab08.js +1 -0
- data/tools/docs/assets/js/103cc3be.451dd416.js +1 -0
- data/tools/docs/assets/js/1131.f9e1547d.js +1 -0
- data/tools/docs/assets/js/13196248.1be5ac81.js +1 -0
- data/tools/docs/assets/js/13c1b4e4.ad24c4f6.js +1 -0
- data/tools/docs/assets/js/15a39a64.4138456c.js +1 -0
- data/tools/docs/assets/js/2029.9e268a82.js +1 -0
- data/tools/docs/assets/js/2047b354.7995865f.js +1 -0
- data/tools/docs/assets/js/22b3ac48.73a6c979.js +1 -0
- data/tools/docs/assets/js/2846.a87f3fc4.js +1 -0
- data/tools/docs/assets/js/2923e883.0cbdcbc5.js +1 -0
- data/tools/docs/assets/js/3477.783e2e37.js +2 -0
- data/tools/docs/assets/js/3477.783e2e37.js.LICENSE.txt +61 -0
- data/tools/docs/assets/js/3dd7ef3b.8f77876c.js +1 -0
- data/tools/docs/assets/js/3df159b4.dded3e78.js +1 -0
- data/tools/docs/assets/js/40365d27.9322abd8.js +1 -0
- data/tools/docs/assets/js/411898ad.a1d949a2.js +1 -0
- data/tools/docs/assets/js/42170351.46c774f8.js +1 -0
- data/tools/docs/assets/js/43652efd.cbac4bc0.js +1 -0
- data/tools/docs/assets/js/5109.6a372217.js +1 -0
- data/tools/docs/assets/js/54d0d530.e9c8193b.js +1 -0
- data/tools/docs/assets/js/5bc719f6.fce76244.js +1 -0
- data/tools/docs/assets/js/5c6ce5ec.f909714f.js +1 -0
- data/tools/docs/assets/js/5e3ed378.cdfe0362.js +1 -0
- data/tools/docs/assets/js/5fe211ef.809c3f96.js +1 -0
- data/tools/docs/assets/js/6831b732.735c11e9.js +1 -0
- data/tools/docs/assets/js/696b4199.ff9185d0.js +1 -0
- data/tools/docs/assets/js/6b210247.248680ef.js +1 -0
- data/tools/docs/assets/js/6b65133b.2144fb1b.js +1 -0
- data/tools/docs/assets/js/6f92e431.608f28e7.js +1 -0
- data/tools/docs/assets/js/72c6d8a8.062b7650.js +1 -0
- data/tools/docs/assets/js/75e64983.d42f03f8.js +1 -0
- data/tools/docs/assets/js/7efc9fb0.6164fbad.js +1 -0
- data/tools/docs/assets/js/867640d5.28196e2c.js +1 -0
- data/tools/docs/assets/js/89e76475.5131b624.js +1 -0
- data/tools/docs/assets/js/8f7843ee.69e537b0.js +1 -0
- data/tools/docs/assets/js/9424f0b3.73086bed.js +1 -0
- data/tools/docs/assets/js/97535711.c7556831.js +1 -0
- data/tools/docs/assets/js/99581c43.30aef54d.js +1 -0
- data/tools/docs/assets/js/9d6e81d0.84fe3bb3.js +1 -0
- data/tools/docs/assets/js/9fb6059a.dc4760ab.js +1 -0
- data/tools/docs/assets/js/a182b3b3.25afec82.js +1 -0
- data/tools/docs/assets/js/a507c363.71a89240.js +1 -0
- data/tools/docs/assets/js/a677c089.2ec103f7.js +1 -0
- data/tools/docs/assets/js/a9987364.de63d165.js +1 -0
- data/tools/docs/assets/js/aa6b6c1b.6b24256f.js +1 -0
- data/tools/docs/assets/js/ada50b5c.1c75d3de.js +1 -0
- data/tools/docs/assets/js/b4596165.ab1c689f.js +1 -0
- data/tools/docs/assets/js/b6d70f94.ec27318b.js +1 -0
- data/tools/docs/assets/js/b9f60ba6.bb514133.js +1 -0
- data/tools/docs/assets/js/bd0034eb.0c60929d.js +1 -0
- data/tools/docs/assets/js/c24eae19.12176204.js +1 -0
- data/tools/docs/assets/js/cb8c3f08.762bb287.js +1 -0
- data/tools/docs/assets/js/cd879be4.3641a5cb.js +1 -0
- data/tools/docs/assets/js/d1b923aa.bf4b0c9e.js +1 -0
- data/tools/docs/assets/js/d24bf9b6.6ed3b576.js +1 -0
- data/tools/docs/assets/js/d370d7a7.28ef1aad.js +1 -0
- data/tools/docs/assets/js/d57a4b5d.017675ee.js +1 -0
- data/tools/docs/assets/js/d5d77c37.f472b18b.js +1 -0
- data/tools/docs/assets/js/d5f295fb.e008c3ec.js +1 -0
- data/tools/docs/assets/js/d797a795.9243eac2.js +1 -0
- data/tools/docs/assets/js/d7c988eb.2670948e.js +1 -0
- data/tools/docs/assets/js/d8ca4191.717db664.js +1 -0
- data/tools/docs/assets/js/d9b92eba.5eff70b2.js +1 -0
- data/tools/docs/assets/js/db8fa1d0.85784608.js +1 -0
- data/tools/docs/assets/js/dc5f7beb.120c148d.js +1 -0
- data/tools/docs/assets/js/e501b0d1.ae564e73.js +1 -0
- data/tools/docs/assets/js/f15615f1.3126a842.js +1 -0
- data/tools/docs/assets/js/fd886806.d2d0bdf4.js +1 -0
- data/tools/docs/assets/js/main.b5a535c2.js +2 -0
- data/tools/docs/assets/js/main.b5a535c2.js.LICENSE.txt +70 -0
- data/tools/docs/assets/js/runtime~main.e3a6c705.js +1 -0
- data/tools/docs/docs/configuration/command.html +40 -0
- data/tools/docs/docs/configuration/format.html +16 -0
- data/tools/docs/docs/configuration/interfaces.html +16 -0
- data/tools/docs/docs/configuration/plugins.html +17 -0
- data/tools/docs/docs/configuration/protocols.html +23 -0
- data/tools/docs/docs/configuration/ssl-tls.html +17 -0
- data/tools/docs/docs/configuration/table.html +30 -0
- data/tools/docs/docs/configuration/target.html +16 -0
- data/tools/docs/docs/configuration/telemetry-screens.html +36 -0
- data/tools/docs/docs/configuration/telemetry.html +16 -0
- data/tools/docs/docs/configuration.html +16 -0
- data/tools/docs/docs/development/curl.html +16 -0
- data/tools/docs/docs/development/developing.html +19 -0
- data/tools/docs/docs/development/host-install.html +16 -0
- data/tools/docs/docs/development/json-api.html +16 -0
- data/tools/docs/docs/development/log-structure.html +17 -0
- data/tools/docs/docs/development/roadmap.html +16 -0
- data/tools/docs/docs/development/streaming-api.html +18 -0
- data/tools/docs/docs/development/testing.html +16 -0
- data/tools/docs/docs/development.html +16 -0
- data/tools/docs/docs/getting-started/gettingstarted.html +16 -0
- data/tools/docs/docs/getting-started/installation.html +18 -0
- data/tools/docs/docs/getting-started/podman.html +18 -0
- data/tools/docs/docs/getting-started/requirements.html +16 -0
- data/tools/docs/docs/getting-started/upgrading.html +16 -0
- data/tools/docs/docs/getting-started.html +16 -0
- data/tools/docs/docs/guides/bridges.html +23 -0
- data/tools/docs/docs/guides/cfs.html +46 -0
- data/tools/docs/docs/guides/custom-widgets.html +16 -0
- data/tools/docs/docs/guides/little-endian-bitfields.html +16 -0
- data/tools/docs/docs/guides/local-mode.html +16 -0
- data/tools/docs/docs/guides/logging.html +16 -0
- data/tools/docs/docs/guides/monitoring.html +16 -0
- data/tools/docs/docs/guides/performance.html +16 -0
- data/tools/docs/docs/guides/raspberrypi.html +16 -0
- data/tools/docs/docs/guides/script-writing.html +18 -0
- data/tools/docs/docs/guides/scripting-api.html +17 -0
- data/tools/docs/docs/guides.html +16 -0
- data/tools/docs/docs/meta/contributing.html +20 -0
- data/tools/docs/docs/meta/philosophy.html +16 -0
- data/tools/docs/docs/meta/xtce.html +16 -0
- data/tools/docs/docs/meta.html +16 -0
- data/tools/docs/docs/privacy.html +23 -0
- data/tools/docs/docs/tools/autonomic.html +16 -0
- data/tools/docs/docs/tools/bucket-explorer.html +16 -0
- data/tools/docs/docs/tools/calendar.html +16 -0
- data/tools/docs/docs/tools/cmd-sender.html +16 -0
- data/tools/docs/docs/tools/cmd-tlm-server.html +17 -0
- data/tools/docs/docs/tools/data-extractor.html +16 -0
- data/tools/docs/docs/tools/data-viewer.html +16 -0
- data/tools/docs/docs/tools/handbooks.html +16 -0
- data/tools/docs/docs/tools/limits-monitor.html +16 -0
- data/tools/docs/docs/tools/packet-viewer.html +16 -0
- data/tools/docs/docs/tools/script-runner.html +16 -0
- data/tools/docs/docs/tools/table-manager.html +16 -0
- data/tools/docs/docs/tools/tlm-grapher.html +16 -0
- data/tools/docs/docs/tools/tlm-viewer.html +17 -0
- data/tools/docs/docs/tools.html +16 -0
- data/tools/docs/docs/v5/bridges/index.html +11 -0
- data/tools/docs/docs/v5/bucket-explorer/index.html +11 -0
- data/tools/docs/docs/v5/calendar/index.html +11 -0
- data/tools/docs/docs/v5/cfs/index.html +11 -0
- data/tools/docs/docs/v5/cmd-sender/index.html +11 -0
- data/tools/docs/docs/v5/cmd-tlm-server/index.html +11 -0
- data/tools/docs/docs/v5/command/index.html +11 -0
- data/tools/docs/docs/v5/contributing/index.html +11 -0
- data/tools/docs/docs/v5/custom-widgets/index.html +11 -0
- data/tools/docs/docs/v5/data-extractor/index.html +11 -0
- data/tools/docs/docs/v5/data-viewer/index.html +11 -0
- data/tools/docs/docs/v5/development/index.html +11 -0
- data/tools/docs/docs/v5/format/index.html +11 -0
- data/tools/docs/docs/v5/gettingstarted/index.html +11 -0
- data/tools/docs/docs/v5/handbooks/index.html +11 -0
- data/tools/docs/docs/v5/host-install/index.html +11 -0
- data/tools/docs/docs/v5/index.html +11 -0
- data/tools/docs/docs/v5/installation/index.html +11 -0
- data/tools/docs/docs/v5/interfaces/index.html +11 -0
- data/tools/docs/docs/v5/json-api/index.html +11 -0
- data/tools/docs/docs/v5/limits-monitor/index.html +11 -0
- data/tools/docs/docs/v5/little-endian-bitfields/index.html +11 -0
- data/tools/docs/docs/v5/local-mode/index.html +11 -0
- data/tools/docs/docs/v5/log-structure/index.html +11 -0
- data/tools/docs/docs/v5/logging/index.html +11 -0
- data/tools/docs/docs/v5/monitoring/index.html +11 -0
- data/tools/docs/docs/v5/packet-viewer/index.html +11 -0
- data/tools/docs/docs/v5/performance/index.html +11 -0
- data/tools/docs/docs/v5/philosophy/index.html +11 -0
- data/tools/docs/docs/v5/plugins/index.html +11 -0
- data/tools/docs/docs/v5/podman/index.html +11 -0
- data/tools/docs/docs/v5/protocols/index.html +11 -0
- data/tools/docs/docs/v5/raspberrypi/index.html +11 -0
- data/tools/docs/docs/v5/requirements/index.html +11 -0
- data/tools/docs/docs/v5/roadmap/index.html +11 -0
- data/tools/docs/docs/v5/script-runner/index.html +11 -0
- data/tools/docs/docs/v5/script-writing/index.html +11 -0
- data/tools/docs/docs/v5/scripting-api/index.html +11 -0
- data/tools/docs/docs/v5/ssl-tls/index.html +11 -0
- data/tools/docs/docs/v5/streaming-api/index.html +11 -0
- data/tools/docs/docs/v5/table/index.html +11 -0
- data/tools/docs/docs/v5/table-manager/index.html +11 -0
- data/tools/docs/docs/v5/target/index.html +11 -0
- data/tools/docs/docs/v5/telemetry/index.html +11 -0
- data/tools/docs/docs/v5/telemetry-screens/index.html +11 -0
- data/tools/docs/docs/v5/testing/index.html +11 -0
- data/tools/docs/docs/v5/tlm-grapher/index.html +11 -0
- data/tools/docs/docs/v5/tlm-viewer/index.html +11 -0
- data/tools/docs/docs/v5/tools/index.html +11 -0
- data/tools/docs/docs/v5/upgrading/index.html +11 -0
- data/tools/docs/docs/v5/xtce/index.html +11 -0
- data/tools/docs/docs.html +25 -0
- data/tools/docs/img/BCT.png +0 -0
- data/tools/docs/img/OpenC3.png +0 -0
- data/tools/docs/img/article-footer.png +0 -0
- data/tools/docs/img/ball.jpg +0 -0
- data/tools/docs/img/black_logo.svg +25 -0
- data/tools/docs/img/captech.gif +0 -0
- data/tools/docs/img/docusaurus-social-card.jpg +0 -0
- data/tools/docs/img/docusaurus.png +0 -0
- data/tools/docs/img/favicon.png +0 -0
- data/tools/docs/img/footer-logo.png +0 -0
- data/tools/docs/img/interface_read_logic.png +0 -0
- data/tools/docs/img/interface_write_logic.png +0 -0
- data/tools/docs/img/johnh.gif +0 -0
- data/tools/docs/img/lockheed.png +0 -0
- data/tools/docs/img/logo.svg +7 -0
- data/tools/docs/img/nasa.gif +0 -0
- data/tools/docs/img/sdlusu.gif +0 -0
- data/tools/docs/img/v5/architecture.png +0 -0
- data/tools/docs/img/v5/autonomic/autonomic.png +0 -0
- data/tools/docs/img/v5/autonomic/reactions.png +0 -0
- data/tools/docs/img/v5/autonomic/triggers.png +0 -0
- data/tools/docs/img/v5/bucket_explorer/bucket_explorer.png +0 -0
- data/tools/docs/img/v5/calendar/calendar.png +0 -0
- data/tools/docs/img/v5/calendar/list_view.png +0 -0
- data/tools/docs/img/v5/calendar/timeline_lifecycle.png +0 -0
- data/tools/docs/img/v5/cmd_tlm_server/cmd_tlm_server.png +0 -0
- data/tools/docs/img/v5/cmd_tlm_server/commands.png +0 -0
- data/tools/docs/img/v5/cmd_tlm_server/file_menu.png +0 -0
- data/tools/docs/img/v5/cmd_tlm_server/interfaces.png +0 -0
- data/tools/docs/img/v5/cmd_tlm_server/log_messages.png +0 -0
- data/tools/docs/img/v5/cmd_tlm_server/raw_command.png +0 -0
- data/tools/docs/img/v5/cmd_tlm_server/raw_telemetry.png +0 -0
- data/tools/docs/img/v5/cmd_tlm_server/routers.png +0 -0
- data/tools/docs/img/v5/cmd_tlm_server/status.png +0 -0
- data/tools/docs/img/v5/cmd_tlm_server/targets.png +0 -0
- data/tools/docs/img/v5/cmd_tlm_server/telemetry.png +0 -0
- data/tools/docs/img/v5/command_sender/command_sender.png +0 -0
- data/tools/docs/img/v5/command_sender/inst_clear.png +0 -0
- data/tools/docs/img/v5/command_sender/inst_collect.png +0 -0
- data/tools/docs/img/v5/command_sender/inst_collect_hazardous.png +0 -0
- data/tools/docs/img/v5/command_sender/inst_collect_hazardous_history.png +0 -0
- data/tools/docs/img/v5/command_sender/inst_collect_sent.png +0 -0
- data/tools/docs/img/v5/command_sender/inst_collect_sent_3.png +0 -0
- data/tools/docs/img/v5/command_sender/mode_menu.png +0 -0
- data/tools/docs/img/v5/contact/jason.png +0 -0
- data/tools/docs/img/v5/contact/ryan.jpeg +0 -0
- data/tools/docs/img/v5/data_extractor/data_extractor.png +0 -0
- data/tools/docs/img/v5/data_extractor/date_chooser.png +0 -0
- data/tools/docs/img/v5/data_extractor/delete_all_mouseover.png +0 -0
- data/tools/docs/img/v5/data_extractor/download.png +0 -0
- data/tools/docs/img/v5/data_extractor/edit_all_items.png +0 -0
- data/tools/docs/img/v5/data_extractor/edit_all_mouseover.png +0 -0
- data/tools/docs/img/v5/data_extractor/edit_temp1.png +0 -0
- data/tools/docs/img/v5/data_extractor/file_menu.png +0 -0
- data/tools/docs/img/v5/data_extractor/items_table.png +0 -0
- data/tools/docs/img/v5/data_extractor/items_table_raw.png +0 -0
- data/tools/docs/img/v5/data_extractor/items_table_temp1.png +0 -0
- data/tools/docs/img/v5/data_extractor/mode_menu.png +0 -0
- data/tools/docs/img/v5/data_extractor/open_config.png +0 -0
- data/tools/docs/img/v5/data_extractor/processing.png +0 -0
- data/tools/docs/img/v5/data_extractor/save_config.png +0 -0
- data/tools/docs/img/v5/data_extractor/select_item.png +0 -0
- data/tools/docs/img/v5/data_extractor/select_packet.png +0 -0
- data/tools/docs/img/v5/data_extractor/select_target.png +0 -0
- data/tools/docs/img/v5/data_extractor/time_chooser.png +0 -0
- data/tools/docs/img/v5/data_viewer/add_packet.png +0 -0
- data/tools/docs/img/v5/data_viewer/data_viewer.png +0 -0
- data/tools/docs/img/v5/data_viewer/file_menu.png +0 -0
- data/tools/docs/img/v5/data_viewer/open_config.png +0 -0
- data/tools/docs/img/v5/data_viewer/rename_tab.png +0 -0
- data/tools/docs/img/v5/data_viewer/save_config.png +0 -0
- data/tools/docs/img/v5/data_viewer/tab_right_click.png +0 -0
- data/tools/docs/img/v5/data_viewer/view_portal.png +0 -0
- data/tools/docs/img/v5/data_viewer/view_portal_add.png +0 -0
- data/tools/docs/img/v5/guides/local_mode/delete_modified.png +0 -0
- data/tools/docs/img/v5/guides/local_mode/minio.png +0 -0
- data/tools/docs/img/v5/guides/local_mode/project.png +0 -0
- data/tools/docs/img/v5/guides/local_mode/project_update.png +0 -0
- data/tools/docs/img/v5/guides/local_mode/reload_file.png +0 -0
- data/tools/docs/img/v5/guides/local_mode/reloaded.png +0 -0
- data/tools/docs/img/v5/guides/logging/browser.png +0 -0
- data/tools/docs/img/v5/guides/logging/log_messages.png +0 -0
- data/tools/docs/img/v5/guides/logging/notifications.png +0 -0
- data/tools/docs/img/v5/guides/logging/raw_tlm_logs.png +0 -0
- data/tools/docs/img/v5/guides/plugin-variables.png +0 -0
- data/tools/docs/img/v5/guides/simple_screen.png +0 -0
- data/tools/docs/img/v5/handbooks/handbooks.png +0 -0
- data/tools/docs/img/v5/limits_monitor/ignored.png +0 -0
- data/tools/docs/img/v5/limits_monitor/limits_monitor.png +0 -0
- data/tools/docs/img/v5/limits_monitor/log.png +0 -0
- data/tools/docs/img/v5/limits_monitor/mouseover.png +0 -0
- data/tools/docs/img/v5/navigation.png +0 -0
- data/tools/docs/img/v5/packet_viewer/file_menu.png +0 -0
- data/tools/docs/img/v5/packet_viewer/packet_viewer.png +0 -0
- data/tools/docs/img/v5/packet_viewer/select_packet.png +0 -0
- data/tools/docs/img/v5/packet_viewer/temp1_details.png +0 -0
- data/tools/docs/img/v5/packet_viewer/view_menu.png +0 -0
- data/tools/docs/img/v5/script_runner/checks_rb.png +0 -0
- data/tools/docs/img/v5/script_runner/connecting.png +0 -0
- data/tools/docs/img/v5/script_runner/debug.png +0 -0
- data/tools/docs/img/v5/script_runner/file_menu.png +0 -0
- data/tools/docs/img/v5/script_runner/file_open.png +0 -0
- data/tools/docs/img/v5/script_runner/file_save_as.png +0 -0
- data/tools/docs/img/v5/script_runner/running_scripts.png +0 -0
- data/tools/docs/img/v5/script_runner/script_error.png +0 -0
- data/tools/docs/img/v5/script_runner/script_menu.png +0 -0
- data/tools/docs/img/v5/script_runner/script_runner.png +0 -0
- data/tools/docs/img/v5/script_runner/script_suite.png +0 -0
- data/tools/docs/img/v5/table_manager/file_menu.png +0 -0
- data/tools/docs/img/v5/table_manager/table_manager.png +0 -0
- data/tools/docs/img/v5/telemetry_grapher/edit_graph.png +0 -0
- data/tools/docs/img/v5/telemetry_grapher/file_menu.png +0 -0
- data/tools/docs/img/v5/telemetry_grapher/four_graphs.png +0 -0
- data/tools/docs/img/v5/telemetry_grapher/graph_menu.png +0 -0
- data/tools/docs/img/v5/telemetry_grapher/graph_min_max.png +0 -0
- data/tools/docs/img/v5/telemetry_grapher/graph_temp1.png +0 -0
- data/tools/docs/img/v5/telemetry_grapher/graph_temp1_temp2.png +0 -0
- data/tools/docs/img/v5/telemetry_grapher/graph_temp1_time.png +0 -0
- data/tools/docs/img/v5/telemetry_grapher/grapher_controls.png +0 -0
- data/tools/docs/img/v5/telemetry_grapher/minimized.png +0 -0
- data/tools/docs/img/v5/telemetry_grapher/open_config.png +0 -0
- data/tools/docs/img/v5/telemetry_grapher/save_config.png +0 -0
- data/tools/docs/img/v5/telemetry_grapher/stop_start.png +0 -0
- data/tools/docs/img/v5/telemetry_grapher/telemetry_grapher.png +0 -0
- data/tools/docs/img/v5/telemetry_grapher/two_full_height.png +0 -0
- data/tools/docs/img/v5/telemetry_grapher/two_full_width.png +0 -0
- data/tools/docs/img/v5/telemetry_viewer/edit_screen.png +0 -0
- data/tools/docs/img/v5/telemetry_viewer/file_menu.png +0 -0
- data/tools/docs/img/v5/telemetry_viewer/minimized.png +0 -0
- data/tools/docs/img/v5/telemetry_viewer/new_screen.png +0 -0
- data/tools/docs/img/v5/telemetry_viewer/open_config.png +0 -0
- data/tools/docs/img/v5/telemetry_viewer/save_config.png +0 -0
- data/tools/docs/img/v5/telemetry_viewer/telemetry_viewer.png +0 -0
- data/tools/docs/index.html +16 -0
- data/tools/docs/lunr-index-1699630949575.json +1 -0
- data/tools/docs/lunr-index.json +1 -0
- data/tools/docs/markdown-page.html +16 -0
- data/tools/docs/search-doc-1699630949575.json +1 -0
- data/tools/docs/search-doc.json +1 -0
- data/tools/docs/sitemap.xml +1 -0
- metadata +477 -0
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([[3940],{1106:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>p,contentTitle:()=>m,default:()=>d,frontMatter:()=>l,metadata:()=>i,toc:()=>o});var n=a(7896),r=(a(2784),a(876));const l={title:"Scripting API Guide"},m=void 0,i={unversionedId:"guides/scripting-api",id:"guides/scripting-api",title:"Scripting API Guide",description:"This document provides the information necessary to write test procedures using the COSMOS scripting API. Scripting in COSMOS is designed to be simple and intuitive. The code completion ability for command and telemetry mnemonics makes Script Runner the ideal place to write your procedures, however any text editor will do. If there is functionality that you don't see here or perhaps an easier syntax for doing something, please submit a ticket.",source:"@site/docs/guides/scripting-api.md",sourceDirName:"guides",slug:"/guides/scripting-api",permalink:"/tools/docs/docs/guides/scripting-api",draft:!1,editUrl:"https://github.com/OpenC3/cosmos/tree/main/docs.openc3.com/docs/guides/scripting-api.md",tags:[],version:"current",frontMatter:{title:"Scripting API Guide"},sidebar:"defaultSidebar",previous:{title:"Script Writing Guide",permalink:"/tools/docs/docs/guides/script-writing"},next:{title:"Development",permalink:"/tools/docs/docs/development"}},p={},o=[{value:"Concepts",id:"concepts",level:2},{value:"Programming Languages",id:"programming-languages",level:3},{value:"Using Script Runner",id:"using-script-runner",level:3},{value:"Telemetry Types",id:"telemetry-types",level:3},{value:"Script Runner API",id:"script-runner-api",level:2},{value:"Migration from COSMOS v4",id:"migration-from-cosmos-v4",level:3},{value:"Retrieving User Input",id:"retrieving-user-input",level:2},{value:"ask",id:"ask",level:3},{value:"ask_string",id:"ask_string",level:3},{value:"message_box",id:"message_box",level:3},{value:"vertical_message_box",id:"vertical_message_box",level:3},{value:"combo_box",id:"combo_box",level:3},{value:"get_target_file",id:"get_target_file",level:3},{value:"put_target_file",id:"put_target_file",level:3},{value:"delete_target_file",id:"delete_target_file",level:3},{value:"open_file_dialog",id:"open_file_dialog",level:3},{value:"open_files_dialog",id:"open_files_dialog",level:3},{value:"Providing information to the user",id:"providing-information-to-the-user",level:2},{value:"prompt",id:"prompt",level:3},{value:"Commands",id:"commands",level:2},{value:"cmd",id:"cmd",level:3},{value:"cmd_no_range_check",id:"cmd_no_range_check",level:3},{value:"cmd_no_hazardous_check",id:"cmd_no_hazardous_check",level:3},{value:"cmd_no_checks",id:"cmd_no_checks",level:3},{value:"cmd_raw",id:"cmd_raw",level:3},{value:"cmd_raw_no_range_check",id:"cmd_raw_no_range_check",level:3},{value:"cmd_raw_no_hazardous_check",id:"cmd_raw_no_hazardous_check",level:3},{value:"cmd_raw_no_checks",id:"cmd_raw_no_checks",level:3},{value:"build_command (since 5.8.0)",id:"build_command-since-580",level:3},{value:"send_raw",id:"send_raw",level:3},{value:"get_all_commands (since 5.0.0)",id:"get_all_commands-since-500",level:3},{value:"get_all_command_names (since 5.0.6)",id:"get_all_command_names-since-506",level:3},{value:"get_command (since 5.0.0)",id:"get_command-since-500",level:3},{value:"get_parameter (since 5.0.0)",id:"get_parameter-since-500",level:3},{value:"get_cmd_buffer",id:"get_cmd_buffer",level:3},{value:"get_cmd_hazardous",id:"get_cmd_hazardous",level:3},{value:"get_cmd_value",id:"get_cmd_value",level:3},{value:"get_cmd_time",id:"get_cmd_time",level:3},{value:"get_cmd_cnt",id:"get_cmd_cnt",level:3},{value:"Handling Telemetry",id:"handling-telemetry",level:2},{value:"check, check_raw, check_formatted, check_with_units",id:"check-check_raw-check_formatted-check_with_units",level:3},{value:"check_tolerance",id:"check_tolerance",level:3},{value:"check_expression",id:"check_expression",level:3},{value:"check_exception",id:"check_exception",level:3},{value:"tlm, tlm_raw, tlm_formatted, tlm_with_units",id:"tlm-tlm_raw-tlm_formatted-tlm_with_units",level:3},{value:"get_tlm_buffer",id:"get_tlm_buffer",level:3},{value:"get_tlm_packet",id:"get_tlm_packet",level:3},{value:"get_tlm_values (modified in 5.0.0)",id:"get_tlm_values-modified-in-500",level:3},{value:"get_all_telemetry (since 5.0.0)",id:"get_all_telemetry-since-500",level:3},{value:"get_all_telemetry_names (since 5.0.6)",id:"get_all_telemetry_names-since-506",level:3},{value:"get_telemetry (since 5.0.0)",id:"get_telemetry-since-500",level:3},{value:"get_item (since 5.0.0)",id:"get_item-since-500",level:3},{value:"get_tlm_cnt",id:"get_tlm_cnt",level:3},{value:"set_tlm",id:"set_tlm",level:3},{value:"inject_tlm",id:"inject_tlm",level:3},{value:"override_tlm",id:"override_tlm",level:3},{value:"normalize_tlm",id:"normalize_tlm",level:3},{value:"get_overrides",id:"get_overrides",level:3},{value:"Packet Data Subscriptions",id:"packet-data-subscriptions",level:2},{value:"subscribe_packets (since 5.0.3)",id:"subscribe_packets-since-503",level:3},{value:"get_packets (since 5.0.3)",id:"get_packets-since-503",level:3},{value:"get_tlm_cnt",id:"get_tlm_cnt-1",level:3},{value:"get_tlm_cnts",id:"get_tlm_cnts",level:3},{value:"get_packet_derived_items",id:"get_packet_derived_items",level:3},{value:"Delays",id:"delays",level:2},{value:"wait",id:"wait",level:3},{value:"wait_tolerance",id:"wait_tolerance",level:3},{value:"wait_expression",id:"wait_expression",level:3},{value:"wait_packet",id:"wait_packet",level:3},{value:"wait_check",id:"wait_check",level:3},{value:"wait_check_tolerance",id:"wait_check_tolerance",level:3},{value:"wait_check_expression",id:"wait_check_expression",level:3},{value:"wait_check_packet",id:"wait_check_packet",level:3},{value:"Limits",id:"limits",level:2},{value:"limits_enabled?, limits_enabled",id:"limits_enabled-limits_enabled",level:3},{value:"enable_limits",id:"enable_limits",level:3},{value:"disable_limits",id:"disable_limits",level:3},{value:"enable_limits_group",id:"enable_limits_group",level:3},{value:"disable_limits_group",id:"disable_limits_group",level:3},{value:"get_limits_groups",id:"get_limits_groups",level:3},{value:"set_limits_set",id:"set_limits_set",level:3},{value:"get_limits_set",id:"get_limits_set",level:3},{value:"get_limits_sets",id:"get_limits_sets",level:3},{value:"get_limits",id:"get_limits",level:3},{value:"set_limits",id:"set_limits",level:3},{value:"get_out_of_limits",id:"get_out_of_limits",level:3},{value:"get_overall_limits_state",id:"get_overall_limits_state",level:3},{value:"get_limits_events",id:"get_limits_events",level:3},{value:"Targets",id:"targets",level:2},{value:"get_target_names",id:"get_target_names",level:3},{value:"get_target",id:"get_target",level:3},{value:"get_target_interfaces",id:"get_target_interfaces",level:3},{value:"Interfaces",id:"interfaces",level:2},{value:"get_interface (since 5.0.0)",id:"get_interface-since-500",level:3},{value:"get_interface_names",id:"get_interface_names",level:3},{value:"connect_interface",id:"connect_interface",level:3},{value:"disconnect_interface",id:"disconnect_interface",level:3},{value:"start_raw_logging_interface",id:"start_raw_logging_interface",level:3},{value:"stop_raw_logging_interface",id:"stop_raw_logging_interface",level:3},{value:"get_all_interface_info",id:"get_all_interface_info",level:3},{value:"map_target_to_interface",id:"map_target_to_interface",level:3},{value:"interface_cmd",id:"interface_cmd",level:3},{value:"interface_protocol_cmd",id:"interface_protocol_cmd",level:3},{value:"Routers",id:"routers",level:2},{value:"connect_router",id:"connect_router",level:3},{value:"disconnect_router",id:"disconnect_router",level:3},{value:"get_router_names",id:"get_router_names",level:3},{value:"get_router (since 5.0.0)",id:"get_router-since-500",level:3},{value:"get_all_router_info",id:"get_all_router_info",level:3},{value:"start_raw_logging_router",id:"start_raw_logging_router",level:3},{value:"stop_raw_logging_router",id:"stop_raw_logging_router",level:3},{value:"router_cmd",id:"router_cmd",level:3},{value:"router_protocol_cmd",id:"router_protocol_cmd",level:3},{value:"Stashing Data",id:"stashing-data",level:2},{value:"stash_set",id:"stash_set",level:3},{value:"stash_get",id:"stash_get",level:3},{value:"stash_all",id:"stash_all",level:3},{value:"stash_keys",id:"stash_keys",level:3},{value:"stash_delete",id:"stash_delete",level:3},{value:"Executing Other Procedures",id:"executing-other-procedures",level:2},{value:"start",id:"start",level:3},{value:"load_utility",id:"load_utility",level:3},{value:"Opening, Closing & Creating Telemetry Screens",id:"opening-closing--creating-telemetry-screens",level:2},{value:"display_screen",id:"display_screen",level:3},{value:"clear_screen",id:"clear_screen",level:3},{value:"clear_all_screens",id:"clear_all_screens",level:3},{value:"delete_screen",id:"delete_screen",level:3},{value:"get_screen_list",id:"get_screen_list",level:3},{value:"get_screen_definition",id:"get_screen_definition",level:3},{value:"create_screen",id:"create_screen",level:3},{value:"local_screen",id:"local_screen",level:3},{value:"Script Runner Settings",id:"script-runner-settings",level:2},{value:"set_line_delay",id:"set_line_delay",level:3},{value:"get_line_delay",id:"get_line_delay",level:3},{value:"set_max_output",id:"set_max_output",level:3},{value:"get_max_output",id:"get_max_output",level:3},{value:"disable_instrumentation",id:"disable_instrumentation",level:3},{value:"Script Runner Suites",id:"script-runner-suites",level:2},{value:"add_group, add_group_setup, add_group_teardown, add_script",id:"add_group-add_group_setup-add_group_teardown-add_script",level:3},{value:"Script Runner Debugging",id:"script-runner-debugging",level:2},{value:"step_mode",id:"step_mode",level:3},{value:"run_mode",id:"run_mode",level:3},{value:"disconnect_script",id:"disconnect_script",level:3},{value:"Metadata",id:"metadata",level:2},{value:"metadata_all",id:"metadata_all",level:3},{value:"metadata_get",id:"metadata_get",level:3},{value:"metadata_set",id:"metadata_set",level:3},{value:"metadata_update",id:"metadata_update",level:3},{value:"metadata_input",id:"metadata_input",level:3},{value:"Settings",id:"settings",level:2},{value:"list_settings",id:"list_settings",level:3},{value:"get_all_settings",id:"get_all_settings",level:3},{value:"get_setting, get_settings",id:"get_setting-get_settings",level:3},{value:"set_setting",id:"set_setting",level:3},{value:"Configuration",id:"configuration",level:2},{value:"config_tool_names",id:"config_tool_names",level:3},{value:"list_configs",id:"list_configs",level:3},{value:"load_config",id:"load_config",level:3},{value:"save_config",id:"save_config",level:3},{value:"delete_config",id:"delete_config",level:3}],u={toc:o},s="wrapper";function d(e){let{components:t,...a}=e;return(0,r.kt)(s,(0,n.Z)({},u,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"This document provides the information necessary to write test procedures using the COSMOS scripting API. Scripting in COSMOS is designed to be simple and intuitive. The code completion ability for command and telemetry mnemonics makes Script Runner the ideal place to write your procedures, however any text editor will do. If there is functionality that you don't see here or perhaps an easier syntax for doing something, please submit a ticket."),(0,r.kt)("h2",{id:"concepts"},"Concepts"),(0,r.kt)("h3",{id:"programming-languages"},"Programming Languages"),(0,r.kt)("p",null,"COSMOS scripting is implemented using either Ruby or Python. Ruby and Python are very similar scripting languages and in many cases the COSMOS APIs are identical between the two. This guide is written to support both with additional language specific information found in the ",(0,r.kt)("a",{parentName:"p",href:"/tools/docs/docs/guides/script-writing"},"Script Writing Guide"),"."),(0,r.kt)("h3",{id:"using-script-runner"},"Using Script Runner"),(0,r.kt)("p",null,"Script Runner is a graphical application that provides the ideal environment for running and implementing your test procedures. The Script Runner tool is broken into 4 main sections. At the top of the tool is a menu bar that allows you to do such things as open and save files, perform a syntax check, and execute your script."),(0,r.kt)("p",null,'Next is a tool bar that displays the currently executing script and three buttons, "Start/Go", "Pause/Retry", and "Stop". The Start/Go button is used to start the script and continue past errors or waits. The Pause/Retry button will pause the executing script. If an error is encountered the Pause button changes to Retry to re-execute the errored line. Finally, the Stop button will stop the executing script at any time.'),(0,r.kt)("p",null,"Third is the display of the actual script. While the script is not running, you may edit and compose scripts in this area. A handy code completion feature is provided that will list out the available commands or telemetry points as you are writing your script. Simply begin writing a cmd( or tlm( line to bring up code completion. This feature greatly reduces typos in command and telemetry mnemonics."),(0,r.kt)("p",null,"Finally, the bottom of the display is the log messages. All commands that are sent, errors that occur, and user print statements appear in this area."),(0,r.kt)("h3",{id:"telemetry-types"},"Telemetry Types"),(0,r.kt)("p",null,"There are four different ways that telemetry values can be retrieved in COSMOS. The following chart explains their differences."),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Telemetry Type"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Raw"),(0,r.kt)("td",{parentName:"tr",align:null},"Raw telemetry is exactly as it is in the telemetry packet before any conversions. All telemetry items will have a raw value except for Derived telemetry points which have no real location in a packet. Requesting raw telemetry on a derived item will return nil.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Converted"),(0,r.kt)("td",{parentName:"tr",align:null},"Converted telemetry is raw telemetry that has gone through a conversion factor such as a state conversion or a polynomial conversion. If a telemetry item does not have a conversion defined, then converted telemetry will be the same as raw telemetry. This is the most common type of telemety used in scripts.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Formatted"),(0,r.kt)("td",{parentName:"tr",align:null},"Formatted telemetry is converted telemetry that has gone through a printf style conversion into a string. Formatted telemetry will always have a string representation. If no format string is defined for a telemetry point, then formatted telemetry will be the same as converted telemetry except represented as string.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Formatted with Units"),(0,r.kt)("td",{parentName:"tr",align:null},"Formatted with Units telemetry is the same as Formatted telemetry except that a space and the units of the telemetry item are appended to the end of the string. If no units are defined for a telemetry item then this type is the same as Formatted telemetry.")))),(0,r.kt)("h2",{id:"script-runner-api"},"Script Runner API"),(0,r.kt)("p",null,"The following methods are designed to be used in Script Runner procedures. Many can also be used in custom built COSMOS tools. Please see the COSMOS Tool API section for methods that are more efficient to use in custom tools."),(0,r.kt)("h3",{id:"migration-from-cosmos-v4"},"Migration from COSMOS v4"),(0,r.kt)("p",null,"The following API methods are either deprecated (will not be ported to COSMOS 5) or currently unimplemented (eventually will be ported to COSMOS 5):"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Method"),(0,r.kt)("th",{parentName:"tr",align:null},"Tool"),(0,r.kt)("th",{parentName:"tr",align:null},"Status"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"clear"),(0,r.kt)("td",{parentName:"tr",align:null},"Telemetry Viewer"),(0,r.kt)("td",{parentName:"tr",align:null},"Deprecated, use clear_screen")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"clear_all"),(0,r.kt)("td",{parentName:"tr",align:null},"Telemetry Viewer"),(0,r.kt)("td",{parentName:"tr",align:null},"Deprecated, use clear_all_screens")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"close_local_screens"),(0,r.kt)("td",{parentName:"tr",align:null},"Telemetry Viewer"),(0,r.kt)("td",{parentName:"tr",align:null},"Deprecated, use clear_screen")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"clear_disconnected_targets"),(0,r.kt)("td",{parentName:"tr",align:null},"Script Runner"),(0,r.kt)("td",{parentName:"tr",align:null},"Deprecated")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"cmd_tlm_clear_counters"),(0,r.kt)("td",{parentName:"tr",align:null},"Command and Telemetry Server"),(0,r.kt)("td",{parentName:"tr",align:null},"Deprecated")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"cmd_tlm_reload"),(0,r.kt)("td",{parentName:"tr",align:null},"Command and Telemetry Server"),(0,r.kt)("td",{parentName:"tr",align:null},"Deprecated")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"display"),(0,r.kt)("td",{parentName:"tr",align:null},"Telemetry Viewer"),(0,r.kt)("td",{parentName:"tr",align:null},"Deprecated, use display_screen")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"get_all_packet_logger_info"),(0,r.kt)("td",{parentName:"tr",align:null},"Command and Telemetry Server"),(0,r.kt)("td",{parentName:"tr",align:null},"Deprecated")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"get_all_target_info"),(0,r.kt)("td",{parentName:"tr",align:null},"Command and Telemetry Server"),(0,r.kt)("td",{parentName:"tr",align:null},"Deprecated, use get_target_interfaces")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"get_background_tasks"),(0,r.kt)("td",{parentName:"tr",align:null},"Command and Telemetry Server"),(0,r.kt)("td",{parentName:"tr",align:null},"Deprecated")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"get_all_cmd_info"),(0,r.kt)("td",{parentName:"tr",align:null},"Command and Telemetry Server"),(0,r.kt)("td",{parentName:"tr",align:null},"Deprecated, use get_all_commands")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"get_all_tlm_info"),(0,r.kt)("td",{parentName:"tr",align:null},"Command and Telemetry Server"),(0,r.kt)("td",{parentName:"tr",align:null},"Deprecated, use get_all_telemetry")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"get_cmd_list"),(0,r.kt)("td",{parentName:"tr",align:null},"Command and Telemetry Server"),(0,r.kt)("td",{parentName:"tr",align:null},"Deprecated, use get_all_commands")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"get_cmd_log_filename"),(0,r.kt)("td",{parentName:"tr",align:null},"Command and Telemetry Server"),(0,r.kt)("td",{parentName:"tr",align:null},"Deprecated")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"get_cmd_param_list"),(0,r.kt)("td",{parentName:"tr",align:null},"Command and Telemetry Server"),(0,r.kt)("td",{parentName:"tr",align:null},"Deprecated, use get_command")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"get_cmd_tlm_disconnect"),(0,r.kt)("td",{parentName:"tr",align:null},"Script Runner"),(0,r.kt)("td",{parentName:"tr",align:null},"Deprecated, use $disconnect")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"get_disconnected_targets"),(0,r.kt)("td",{parentName:"tr",align:null},"Script Runner"),(0,r.kt)("td",{parentName:"tr",align:null},"Unimplemented")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"get_interface_info"),(0,r.kt)("td",{parentName:"tr",align:null},"Command and Telemetry Server"),(0,r.kt)("td",{parentName:"tr",align:null},"Deprecated, use get_interface")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"get_interface_targets"),(0,r.kt)("td",{parentName:"tr",align:null},"Command and Telemetry Server"),(0,r.kt)("td",{parentName:"tr",align:null},"Deprecated")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"get_output_logs_filenames"),(0,r.kt)("td",{parentName:"tr",align:null},"Command and Telemetry Server"),(0,r.kt)("td",{parentName:"tr",align:null},"Deprecated")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"get_packet"),(0,r.kt)("td",{parentName:"tr",align:null},"Command and Telemetry Server"),(0,r.kt)("td",{parentName:"tr",align:null},"Deprecated, use get_packets")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"get_packet_data"),(0,r.kt)("td",{parentName:"tr",align:null},"Command and Telemetry Server"),(0,r.kt)("td",{parentName:"tr",align:null},"Deprecated, use get_packets")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"get_packet_logger_info"),(0,r.kt)("td",{parentName:"tr",align:null},"Command and Telemetry Server"),(0,r.kt)("td",{parentName:"tr",align:null},"Deprecated")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"get_packet_loggers"),(0,r.kt)("td",{parentName:"tr",align:null},"Command and Telemetry Server"),(0,r.kt)("td",{parentName:"tr",align:null},"Deprecated")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"get_replay_mode"),(0,r.kt)("td",{parentName:"tr",align:null},"Replay"),(0,r.kt)("td",{parentName:"tr",align:null},"Deprecated")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"get_router_info"),(0,r.kt)("td",{parentName:"tr",align:null},"Command and Telemetry Server"),(0,r.kt)("td",{parentName:"tr",align:null},"Deprecated, use get_router")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"get_scriptrunner_message_log_filename"),(0,r.kt)("td",{parentName:"tr",align:null},"Command and Telemetry Server"),(0,r.kt)("td",{parentName:"tr",align:null},"Deprecated")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"get_server_message"),(0,r.kt)("td",{parentName:"tr",align:null},"Command and Telemetry Server"),(0,r.kt)("td",{parentName:"tr",align:null},"Deprecated")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"get_server_message_log_filename"),(0,r.kt)("td",{parentName:"tr",align:null},"Command and Telemetry Server"),(0,r.kt)("td",{parentName:"tr",align:null},"Deprecated")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"get_server_status"),(0,r.kt)("td",{parentName:"tr",align:null},"Command and Telemetry Server"),(0,r.kt)("td",{parentName:"tr",align:null},"Deprecated")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"get_stale"),(0,r.kt)("td",{parentName:"tr",align:null},"Command and Telemetry Server"),(0,r.kt)("td",{parentName:"tr",align:null},"Deprecated")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"get_target_ignored_items"),(0,r.kt)("td",{parentName:"tr",align:null},"Command and Telemetry Server"),(0,r.kt)("td",{parentName:"tr",align:null},"Deprecated, use get_target")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"get_target_ignored_parameters"),(0,r.kt)("td",{parentName:"tr",align:null},"Command and Telemetry Server"),(0,r.kt)("td",{parentName:"tr",align:null},"Deprecated, use get_target")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"get_target_info"),(0,r.kt)("td",{parentName:"tr",align:null},"Command and Telemetry Server"),(0,r.kt)("td",{parentName:"tr",align:null},"Deprecated, use get_target")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"get_target_list"),(0,r.kt)("td",{parentName:"tr",align:null},"Command and Telemetry Server"),(0,r.kt)("td",{parentName:"tr",align:null},"Deprecated, use get_target_names")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"get_tlm_details"),(0,r.kt)("td",{parentName:"tr",align:null},"Command and Telemetry Server"),(0,r.kt)("td",{parentName:"tr",align:null},"Deprecated")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"get_tlm_item_list"),(0,r.kt)("td",{parentName:"tr",align:null},"Command and Telemetry Server"),(0,r.kt)("td",{parentName:"tr",align:null},"Deprecated")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"get_tlm_list"),(0,r.kt)("td",{parentName:"tr",align:null},"Command and Telemetry Server"),(0,r.kt)("td",{parentName:"tr",align:null},"Deprecated")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"get_tlm_log_filename"),(0,r.kt)("td",{parentName:"tr",align:null},"Command and Telemetry Server"),(0,r.kt)("td",{parentName:"tr",align:null},"Deprecated")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"interface_state"),(0,r.kt)("td",{parentName:"tr",align:null},"Command and Telemetry Server"),(0,r.kt)("td",{parentName:"tr",align:null},"Deprecated, use get_interface")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"override_tlm_raw"),(0,r.kt)("td",{parentName:"tr",align:null},"Command and Telemetry Server"),(0,r.kt)("td",{parentName:"tr",align:null},"Deprecated, use override_tlm")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"open_directory_dialog"),(0,r.kt)("td",{parentName:"tr",align:null},"Script Runner"),(0,r.kt)("td",{parentName:"tr",align:null},"Deprecated")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"replay_move_end"),(0,r.kt)("td",{parentName:"tr",align:null},"Replay"),(0,r.kt)("td",{parentName:"tr",align:null},"Deprecated")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"replay_move_index"),(0,r.kt)("td",{parentName:"tr",align:null},"Replay"),(0,r.kt)("td",{parentName:"tr",align:null},"Deprecated")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"replay_move_start"),(0,r.kt)("td",{parentName:"tr",align:null},"Replay"),(0,r.kt)("td",{parentName:"tr",align:null},"Deprecated")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"replay_play"),(0,r.kt)("td",{parentName:"tr",align:null},"Replay"),(0,r.kt)("td",{parentName:"tr",align:null},"Deprecated")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"replay_reverse_play"),(0,r.kt)("td",{parentName:"tr",align:null},"Replay"),(0,r.kt)("td",{parentName:"tr",align:null},"Deprecated")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"replay_select_file"),(0,r.kt)("td",{parentName:"tr",align:null},"Replay"),(0,r.kt)("td",{parentName:"tr",align:null},"Deprecated")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"replay_set_playback_delay"),(0,r.kt)("td",{parentName:"tr",align:null},"Replay"),(0,r.kt)("td",{parentName:"tr",align:null},"Deprecated")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"replay_status"),(0,r.kt)("td",{parentName:"tr",align:null},"Replay"),(0,r.kt)("td",{parentName:"tr",align:null},"Deprecated")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"replay_step_back"),(0,r.kt)("td",{parentName:"tr",align:null},"Replay"),(0,r.kt)("td",{parentName:"tr",align:null},"Deprecated")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"replay_step_forward"),(0,r.kt)("td",{parentName:"tr",align:null},"Replay"),(0,r.kt)("td",{parentName:"tr",align:null},"Deprecated")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"replay_stop"),(0,r.kt)("td",{parentName:"tr",align:null},"Replay"),(0,r.kt)("td",{parentName:"tr",align:null},"Deprecated")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"require_utility"),(0,r.kt)("td",{parentName:"tr",align:null},"Script Runner"),(0,r.kt)("td",{parentName:"tr",align:null},"Deprecated but exists for backwards compatibility, use load_utility")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"router_state"),(0,r.kt)("td",{parentName:"tr",align:null},"Command and Telemetry Server"),(0,r.kt)("td",{parentName:"tr",align:null},"Deprecated, use get_router")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"save_file_dialog"),(0,r.kt)("td",{parentName:"tr",align:null},"Script Runner"),(0,r.kt)("td",{parentName:"tr",align:null},"Deprecated")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"save_setting"),(0,r.kt)("td",{parentName:"tr",align:null},"Command and Telemetry Server"),(0,r.kt)("td",{parentName:"tr",align:null},"Deprecated but exists for backwards compatibility, use set_setting")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"set_cmd_tlm_disconnect"),(0,r.kt)("td",{parentName:"tr",align:null},"Script Runner"),(0,r.kt)("td",{parentName:"tr",align:null},"Deprecated, use disconnect_script")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"set_disconnected_targets"),(0,r.kt)("td",{parentName:"tr",align:null},"Script Runner"),(0,r.kt)("td",{parentName:"tr",align:null},"Unimplemented")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"set_replay_mode"),(0,r.kt)("td",{parentName:"tr",align:null},"Replay"),(0,r.kt)("td",{parentName:"tr",align:null},"Deprecated")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"set_stdout_max_lines"),(0,r.kt)("td",{parentName:"tr",align:null},"Script Runner"),(0,r.kt)("td",{parentName:"tr",align:null},"Deprecated")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"set_tlm_raw"),(0,r.kt)("td",{parentName:"tr",align:null},"Script Runner"),(0,r.kt)("td",{parentName:"tr",align:null},"Deprecated, use set_tlm")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"show_backtrace"),(0,r.kt)("td",{parentName:"tr",align:null},"Script Runner"),(0,r.kt)("td",{parentName:"tr",align:null},"Deprecated, backtrace always shown")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"shutdown_cmd_tlm"),(0,r.kt)("td",{parentName:"tr",align:null},"Command and Telemetry Server"),(0,r.kt)("td",{parentName:"tr",align:null},"Deprecated")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"start_cmd_log"),(0,r.kt)("td",{parentName:"tr",align:null},"Command and Telemetry Server"),(0,r.kt)("td",{parentName:"tr",align:null},"Deprecated")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"start_logging"),(0,r.kt)("td",{parentName:"tr",align:null},"Command and Telemetry Server"),(0,r.kt)("td",{parentName:"tr",align:null},"Deprecated")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"start_new_scriptrunner_message_log"),(0,r.kt)("td",{parentName:"tr",align:null},"Command and Telemetry Server"),(0,r.kt)("td",{parentName:"tr",align:null},"Deprecated")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"start_new_server_message_log"),(0,r.kt)("td",{parentName:"tr",align:null},"Command and Telemetry Server"),(0,r.kt)("td",{parentName:"tr",align:null},"Deprecated")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"start_tlm_log"),(0,r.kt)("td",{parentName:"tr",align:null},"Command and Telemetry Server"),(0,r.kt)("td",{parentName:"tr",align:null},"Deprecated")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"stop_background_task"),(0,r.kt)("td",{parentName:"tr",align:null},"Command and Telemetry Server"),(0,r.kt)("td",{parentName:"tr",align:null},"Deprecated")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"stop_cmd_log"),(0,r.kt)("td",{parentName:"tr",align:null},"Command and Telemetry Server"),(0,r.kt)("td",{parentName:"tr",align:null},"Deprecated")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"stop_logging"),(0,r.kt)("td",{parentName:"tr",align:null},"Command and Telemetry Server"),(0,r.kt)("td",{parentName:"tr",align:null},"Deprecated")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"stop_tlm_log"),(0,r.kt)("td",{parentName:"tr",align:null},"Command and Telemetry Server"),(0,r.kt)("td",{parentName:"tr",align:null},"Deprecated")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"subscribe_limits_events"),(0,r.kt)("td",{parentName:"tr",align:null},"Command and Telemetry Server"),(0,r.kt)("td",{parentName:"tr",align:null},"Deprecated")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"subscribe_packet_data"),(0,r.kt)("td",{parentName:"tr",align:null},"Command and Telemetry Server"),(0,r.kt)("td",{parentName:"tr",align:null},"Deprecated, use subscribe_packets")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"subscribe_server_messages"),(0,r.kt)("td",{parentName:"tr",align:null},"Command and Telemetry Server"),(0,r.kt)("td",{parentName:"tr",align:null},"Unimplemented")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"tlm_variable"),(0,r.kt)("td",{parentName:"tr",align:null},"Script Runner"),(0,r.kt)("td",{parentName:"tr",align:null},"Deprecated, use tlm() and pass type")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"unsubscribe_limits_events"),(0,r.kt)("td",{parentName:"tr",align:null},"Command and Telemetry Server"),(0,r.kt)("td",{parentName:"tr",align:null},"Deprecated")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"unsubscribe_packet_data"),(0,r.kt)("td",{parentName:"tr",align:null},"Command and Telemetry Server"),(0,r.kt)("td",{parentName:"tr",align:null},"Deprecated")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"unsubscribe_server_messages"),(0,r.kt)("td",{parentName:"tr",align:null},"Command and Telemetry Server"),(0,r.kt)("td",{parentName:"tr",align:null},"Deprecated")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"wait_raw"),(0,r.kt)("td",{parentName:"tr",align:null},"Script Runner"),(0,r.kt)("td",{parentName:"tr",align:null},"Deprecated, use wait(..., type: :RAW)")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"wait_check_raw"),(0,r.kt)("td",{parentName:"tr",align:null},"Script Runner"),(0,r.kt)("td",{parentName:"tr",align:null},"Deprecated, use wait_check(..., type: :RAW)")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"wait_tolerance_raw"),(0,r.kt)("td",{parentName:"tr",align:null},"Script Runner"),(0,r.kt)("td",{parentName:"tr",align:null},"Deprecated, use wait_tolerance(..., type: :RAW)")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"wait_check_tolerance_raw"),(0,r.kt)("td",{parentName:"tr",align:null},"Script Runner"),(0,r.kt)("td",{parentName:"tr",align:null},"Deprecated, use wait_check_tolerance(..., type: :RAW)")))),(0,r.kt)("h2",{id:"retrieving-user-input"},"Retrieving User Input"),(0,r.kt)("p",null,"These methods allow the user to enter values that are needed by the script."),(0,r.kt)("h3",{id:"ask"},"ask"),(0,r.kt)("p",null,'Prompts the user for input with a question. User input is automatically converted from a string to the appropriate data type. For example if the user enters "1", the number 1 as an integer will be returned.'),(0,r.kt)("p",null,"Ruby / Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'ask("<question>", <blank_or_default>, <password>)\n')),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"question"),(0,r.kt)("td",{parentName:"tr",align:null},"Question to prompt the user with.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"blank_or_default"),(0,r.kt)("td",{parentName:"tr",align:null},"Whether or not to allow empty responses (optional - defaults to false). If a non-boolean value is passed it is used as a default value.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"password"),(0,r.kt)("td",{parentName:"tr",align:null},"Whether to treat the entry as a password which is displayed with dots and not logged. Default is false.")))),(0,r.kt)("p",null,"Ruby Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'value = ask("Enter an integer")\nvalue = ask("Enter a value or nothing", true)\nvalue = ask("Enter a value", 10)\npassword = ask("Enter your password", false, true)\n')),(0,r.kt)("p",null,"Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'value = ask("Enter an integer")\nvalue = ask("Enter a value or nothing", True)\nvalue = ask("Enter a value", 10)\npassword = ask("Enter your password", False, True)\n')),(0,r.kt)("h3",{id:"ask_string"},"ask_string"),(0,r.kt)("p",null,'Prompts the user for input with a question. User input is always returned as a string. For exampe if the user enters "1", the string "1" will be returned.'),(0,r.kt)("p",null,"Ruby / Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'ask_string("<question>", <blank_or_default>, <password>)\n')),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"question"),(0,r.kt)("td",{parentName:"tr",align:null},"Question to prompt the user with.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"blank_or_default"),(0,r.kt)("td",{parentName:"tr",align:null},"Whether or not to allow empty responses (optional - defaults to false). If a non-boolean value is passed it is used as a default value.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"password"),(0,r.kt)("td",{parentName:"tr",align:null},"Whether to treat the entry as a password which is displayed with dots and not logged. Default is false.")))),(0,r.kt)("p",null,"Ruby Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'string = ask_string("Enter a String")\nstring = ask_string("Enter a value or nothing", true)\nstring = ask_string("Enter a value", "test")\npassword = ask_string("Enter your password", false, true)\n')),(0,r.kt)("p",null,"Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'string = ask_string("Enter a String")\nstring = ask_string("Enter a value or nothing", True)\nstring = ask_string("Enter a value", "test")\npassword = ask_string("Enter your password", False, True)\n')),(0,r.kt)("h3",{id:"message_box"},"message_box"),(0,r.kt)("h3",{id:"vertical_message_box"},"vertical_message_box"),(0,r.kt)("h3",{id:"combo_box"},"combo_box"),(0,r.kt)("p",null,"The message_box, vertical_message_box, and combo_box methods create a message box with arbitrary buttons or selections that the user can click. The text of the button clicked is returned."),(0,r.kt)("p",null,"Ruby / Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'message_box("<message>", "<button text 1>", ...)\nvertical_message_box("<message>", "<button text 1>", ...)\ncombo_box("<message>", "<selection text 1>", ...)\n')),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"message"),(0,r.kt)("td",{parentName:"tr",align:null},"Message to prompt the user with.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"button/selection text"),(0,r.kt)("td",{parentName:"tr",align:null},"Text for a button or selection")))),(0,r.kt)("p",null,"Ruby Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},"value = message_box(\"Select the sensor number\", 'One', 'Two')\nvalue = vertical_message_box(\"Select the sensor number\", 'One', 'Two')\nvalue = combo_box(\"Select the sensor number\", 'One', 'Two')\ncase value\nwhen 'One'\n puts 'Sensor One'\nwhen 'Two'\n puts 'Sensor Two'\nend\n")),(0,r.kt)("p",null,"Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},"value = message_box(\"Select the sensor number\", 'One', 'Two')\nvalue = vertical_message_box(\"Select the sensor number\", 'One', 'Two')\nvalue = combo_box(\"Select the sensor number\", 'One', 'Two')\nmatch value:\n case 'One':\n print('Sensor One')\n case 'Two':\n print('Sensor Two')\n")),(0,r.kt)("h3",{id:"get_target_file"},"get_target_file"),(0,r.kt)("p",null,"Return a file handle to a file in the target directory"),(0,r.kt)("p",null,"Ruby Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'get_target_file("<File Path>", original: false)\n')),(0,r.kt)("p",null,"Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'get_target_file("<File Path>", original=False)\n')),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"path"),(0,r.kt)("td",{parentName:"tr",align:null},"The path to the file in the target directory. Should assume to start with a TARGET name, e.g. INST/procedures/proc.rb")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"original"),(0,r.kt)("td",{parentName:"tr",align:null},"Whether to get the original file from the plug-in, or any modifications to the file. Default is false which means to grab the modified file. If the modified file does not exist the API will automatically try to pull the original.")))),(0,r.kt)("p",null,"Ruby Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'file = get_target_file("INST/data/attitude.bin")\nputs file.read().formatted # format a binary file\nfile.unlink # delete file\nfile = get_target_file("INST/procedures/checks.rb", original: true)\nputs file.read()\nfile.unlink # delete file\n')),(0,r.kt)("p",null,"Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'from openc3.utilities.string import formatted\n\nfile = get_target_file("INST/data/attitude.bin")\nprint(formatted(file.read())) # format a binary file\nfile.close() # delete file\nfile = get_target_file("INST/procedures/checks.rb", original=True)\nprint(file.read())\nfile.close() # delete file\n')),(0,r.kt)("h3",{id:"put_target_file"},"put_target_file"),(0,r.kt)("p",null,"Writes a file to the target directory"),(0,r.kt)("p",null,"Ruby or Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'put_target_file("<File Path>", "IO or String")\n')),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"path"),(0,r.kt)("td",{parentName:"tr",align:null},"The path to the file in the target directory. Should assume to start with a TARGET name, e.g. INST/procedures/proc.rb. The file can previously exist or not. Note: The original file from the plug-in will not be modified, however existing modified files will be overwritten.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"data"),(0,r.kt)("td",{parentName:"tr",align:null},"The data can be an IO object or String")))),(0,r.kt)("p",null,"Ruby Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'put_target_file("INST/test1.txt", "this is a string test")\nfile = Tempfile.new(\'test\')\nfile.write("this is a Io test")\nfile.rewind\nput_target_file("INST/test2.txt", file)\nput_target_file("INST/test3.bin", "\\x00\\x01\\x02\\x03\\xFF\\xEE\\xDD\\xCC") # binary\n')),(0,r.kt)("p",null,"Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'put_target_file("INST/test1.txt", "this is a string test")\nfile = tempfile.NamedTemporaryFile(mode="w+t")\nfile.write("this is a Io test")\nfile.seek(0)\nput_target_file("INST/test2.txt", file)\nput_target_file("INST/test3.bin", b"\\x00\\x01\\x02\\x03\\xFF\\xEE\\xDD\\xCC") # binary\n')),(0,r.kt)("h3",{id:"delete_target_file"},"delete_target_file"),(0,r.kt)("p",null,"Delete a file in the target directory"),(0,r.kt)("p",null,"Ruby / Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'delete_target_file("<File Path>")\n')),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"path"),(0,r.kt)("td",{parentName:"tr",align:null},"The path to the file in the target directory. Should assume to start with a TARGET name, e.g. INST/procedures/proc.rb. Note: Only files created with put_target_file can be deleted. Original files from the plugin installation will remain.")))),(0,r.kt)("p",null,"Ruby / Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'put_target_file("INST/delete_me.txt", "to be deleted")\ndelete_target_file("INST/delete_me.txt")\n')),(0,r.kt)("h3",{id:"open_file_dialog"},"open_file_dialog"),(0,r.kt)("h3",{id:"open_files_dialog"},"open_files_dialog"),(0,r.kt)("p",null,"The open_file_dialog and open_files_dialog methods create a file dialog box so the user can select a single or multiple files. The selected file(s) is returned."),(0,r.kt)("p",null,"Note: COSMOS 5 has deprecated the save_file_dialog and open_directory_dialog methods. save_file_dialog can be replaced by put_target_file if you want to write a file back to the target. open_directory_dialog doesn't make sense in new architecture so you must request individual files."),(0,r.kt)("p",null,"Ruby Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'open_file_dialog("<title>", "<message>", filter: "<filter>")\nopen_files_dialog("<title>", "<message>", filter: "<filter>")\n')),(0,r.kt)("p",null,"Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'open_file_dialog("<title>", "<message>", filter="<filter>")\nopen_files_dialog("<title>", "<message>", filter="<filter>")\n')),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Title"),(0,r.kt)("td",{parentName:"tr",align:null},"The title to put on the dialog. Required.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Message"),(0,r.kt)("td",{parentName:"tr",align:null},"The message to display in the dialog box. Optional parameter.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"filter"),(0,r.kt)("td",{parentName:"tr",align:null},'Named parameter to filter allowed file types. Optional parameter, specified as comma delimited file types, e.g. ".txt,.doc". See ',(0,r.kt)("a",{parentName:"td",href:"https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#accept"},"https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#accept")," for more information.")))),(0,r.kt)("p",null,"Ruby Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'file = open_file_dialog("Open a single file", "Choose something interesting", filter: ".txt")\nputs file # Ruby File object\nputs file.read\nfile.delete\n\nfiles = open_files_dialog("Open multiple files") # message is optional\nputs files # Array of File objects (even if you select only one)\nfiles.each do |file|\n puts file\n puts file.read\n file.delete\nend\n')),(0,r.kt)("p",null,"Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'file = open_file_dialog("Open a single file", "Choose something interesting", filter=".txt")\nprint(file)\nprint(file.read())\nfile.close()\n\nfiles = open_files_dialog("Open multiple files") # message is optional\nprint(files) # Array of File objects (even if you select only one)\nfor file in files:\n print(file)\n print(file.read())\n file.close()\n')),(0,r.kt)("h2",{id:"providing-information-to-the-user"},"Providing information to the user"),(0,r.kt)("p",null,"These methods notify the user that something has occurred."),(0,r.kt)("h3",{id:"prompt"},"prompt"),(0,r.kt)("p",null,"Displays a message to the user and waits for them to press an ok button."),(0,r.kt)("p",null,"Ruby / Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'prompt("<message>")\n')),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"message"),(0,r.kt)("td",{parentName:"tr",align:null},"Message to prompt the user with.")))),(0,r.kt)("p",null,"Ruby / Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'prompt("Press OK to continue")\n')),(0,r.kt)("h2",{id:"commands"},"Commands"),(0,r.kt)("p",null,"These methods provide capability to send commands to a target and receive information about commands in the system."),(0,r.kt)("h3",{id:"cmd"},"cmd"),(0,r.kt)("p",null,"Sends a specified command."),(0,r.kt)("p",null,"Ruby Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'cmd("<Target Name> <Command Name> with <Param #1 Name> <Param #1 Value>, <Param #2 Name> <Param #2 Value>, ...")\ncmd("<Target Name>", "<Command Name>", "Param #1 Name" => <Param #1 Value>, "Param #2 Name" => <Param #2 Value>, ...)\n')),(0,r.kt)("p",null,"Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'cmd("<Target Name> <Command Name> with <Param #1 Name> <Param #1 Value>, <Param #2 Name> <Param #2 Value>, ...")\ncmd("<Target Name>", "<Command Name>", {"Param #1 Name": <Param #1 Value>, "Param #2 Name": <Param #2 Value>, ...})\n')),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Target Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the target this command is associated with.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Command Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of this command. Also referred to as its mnemonic.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Param #x Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of a command parameter. If there are no parameters then the 'with' keyword should not be given.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Param #x Value"),(0,r.kt)("td",{parentName:"tr",align:null},"Value of the command parameter. Values are automatically converted to the appropriate type.")))),(0,r.kt)("p",null,"Ruby Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'cmd("INST COLLECT with DURATION 10, TYPE NORMAL")\n# In Ruby the brackets around parameters are optional\ncmd("INST", "COLLECT", "DURATION" => 10, "TYPE" => "NORMAL")\ncmd("INST", "COLLECT", { "DURATION" => 10, "TYPE" => "NORMAL" })\n')),(0,r.kt)("p",null,"Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'cmd("INST COLLECT with DURATION 10, TYPE NORMAL")\ncmd("INST", "COLLECT", { "DURATION": 10, "TYPE": "NORMAL" })\n')),(0,r.kt)("h3",{id:"cmd_no_range_check"},"cmd_no_range_check"),(0,r.kt)("p",null,"Sends a specified command without performing range checking on its parameters. This should only be used when it is necessary to intentionally send a bad command parameter to test a target."),(0,r.kt)("p",null,"Ruby Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'cmd_no_range_check("<Target Name> <Command Name> with <Param #1 Name> <Param #1 Value>, <Param #2 Name> <Param #2 Value>, ...")\ncmd_no_range_check("<Target Name>", "<Command Name>", "Param #1 Name" => <Param #1 Value>, "Param #2 Name" => <Param #2 Value>, ...)\n')),(0,r.kt)("p",null,"Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'cmd_no_range_check("<Target Name> <Command Name> with <Param #1 Name> <Param #1 Value>, <Param #2 Name> <Param #2 Value>, ...")\ncmd_no_range_check("<Target Name>", "<Command Name>", {"Param #1 Name": <Param #1 Value>, "Param #2 Name": <Param #2 Value>, ...})\n')),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Target Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the target this command is associated with.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Command Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of this command. Also referred to as its mnemonic.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Param #x Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of a command parameter. If there are no parameters then the 'with' keyword should not be given.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Param #x Value"),(0,r.kt)("td",{parentName:"tr",align:null},"Value of the command parameter. Values are automatically converted to the appropriate type.")))),(0,r.kt)("p",null,"Ruby Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'cmd_no_range_check("INST COLLECT with DURATION 11, TYPE NORMAL")\ncmd_no_range_check("INST", "COLLECT", "DURATION" => 11, "TYPE" => "NORMAL")\n')),(0,r.kt)("p",null,"Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'cmd_no_range_check("INST COLLECT with DURATION 11, TYPE NORMAL")\ncmd_no_range_check("INST", "COLLECT", {"DURATION": 11, "TYPE": "NORMAL"})\n')),(0,r.kt)("h3",{id:"cmd_no_hazardous_check"},"cmd_no_hazardous_check"),(0,r.kt)("p",null,"Sends a specified command without performing the notification if it is a hazardous command. This should only be used when it is necessary to fully automate testing involving hazardous commands."),(0,r.kt)("p",null,"Ruby Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'cmd_no_hazardous_check("<Target Name> <Command Name> with <Param #1 Name> <Param #1 Value>, <Param #2 Name> <Param #2 Value>, ...")\ncmd_no_hazardous_check("<Target Name>", "<Command Name>", "Param #1 Name" => <Param #1 Value>, "Param #2 Name" => <Param #2 Value>, ...)\n')),(0,r.kt)("p",null,"Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'cmd_no_hazardous_check("<Target Name> <Command Name> with <Param #1 Name> <Param #1 Value>, <Param #2 Name> <Param #2 Value>, ...")\ncmd_no_hazardous_check("<Target Name>", "<Command Name>", {"Param #1 Name": <Param #1 Value>, "Param #2 Name": <Param #2 Value>, ...})\n')),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Target Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the target this command is associated with.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Command Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of this command. Also referred to as its mnemonic.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Param #x Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of a command parameter. If there are no parameters then the 'with' keyword should not be given.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Param #x Value"),(0,r.kt)("td",{parentName:"tr",align:null},"Value of the command parameter. Values are automatically converted to the appropriate type.")))),(0,r.kt)("p",null,"Ruby / Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'cmd_no_hazardous_check("INST CLEAR")\ncmd_no_hazardous_check("INST", "CLEAR")\n')),(0,r.kt)("h3",{id:"cmd_no_checks"},"cmd_no_checks"),(0,r.kt)("p",null,"Sends a specified command without performing the parameter range checks or notification if it is a hazardous command. This should only be used when it is necessary to fully automate testing involving hazardous commands that intentially have invalid parameters."),(0,r.kt)("p",null,"Ruby Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'cmd_no_checks("<Target Name> <Command Name> with <Param #1 Name> <Param #1 Value>, <Param #2 Name> <Param #2 Value>, ...")\ncmd_no_checks("<Target Name>", "<Command Name>", "Param #1 Name" => <Param #1 Value>, "Param #2 Name" => <Param #2 Value>, ...)\n')),(0,r.kt)("p",null,"Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'cmd_no_checks("<Target Name> <Command Name> with <Param #1 Name> <Param #1 Value>, <Param #2 Name> <Param #2 Value>, ...")\ncmd_no_checks("<Target Name>", "<Command Name>", {"Param #1 Name": <Param #1 Value>, "Param #2 Name": <Param #2 Value>, ...})\n')),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Target Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the target this command is associated with.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Command Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of this command. Also referred to as its mnemonic.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Param #x Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of a command parameter. If there are no parameters then the 'with' keyword should not be given.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Param #x Value"),(0,r.kt)("td",{parentName:"tr",align:null},"Value of the command parameter. Values are automatically converted to the appropriate type.")))),(0,r.kt)("p",null,"Ruby Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'cmd_no_checks("INST COLLECT with DURATION 11, TYPE SPECIAL")\ncmd_no_checks("INST", "COLLECT", "DURATION" => 11, "TYPE" => "SPECIAL")\n')),(0,r.kt)("p",null,"Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'cmd_no_checks("INST COLLECT with DURATION 11, TYPE SPECIAL")\ncmd_no_checks("INST", "COLLECT", {"DURATION": 11, "TYPE": "SPECIAL"})\n')),(0,r.kt)("h3",{id:"cmd_raw"},"cmd_raw"),(0,r.kt)("p",null,"Sends a specified command without running conversions."),(0,r.kt)("p",null,"Ruby Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'cmd_raw("<Target Name> <Command Name> with <Param #1 Name> <Param #1 Value>, <Param #2 Name> <Param #2 Value>, ...")\ncmd_raw("<Target Name>", "<Command Name>", "<Param #1 Name>" => <Param #1 Value>, "<Param #2 Name>" => <Param #2 Value>, ...)\n')),(0,r.kt)("p",null,"Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'cmd_raw("<Target Name> <Command Name> with <Param #1 Name> <Param #1 Value>, <Param #2 Name> <Param #2 Value>, ...")\ncmd_raw("<Target Name>", "<Command Name>", {"<Param #1 Name>": <Param #1 Value>, "<Param #2 Name>": <Param #2 Value>, ...})\n')),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Target Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the target this command is associated with.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Command Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of this command. Also referred to as its mnemonic.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Param #x Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of a command parameter. If there are no parameters then the 'with' keyword should not be given.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Param #x Value"),(0,r.kt)("td",{parentName:"tr",align:null},"Value of the command parameter. Values are automatically converted to the appropriate type.")))),(0,r.kt)("p",null,"Ruby Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'cmd_raw("INST COLLECT with DURATION 10, TYPE 0")\ncmd_raw("INST", "COLLECT", "DURATION" => 10, "TYPE" => 0)\n')),(0,r.kt)("p",null,"Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'cmd_raw("INST COLLECT with DURATION 10, TYPE 0")\ncmd_raw("INST", "COLLECT", {"DURATION": 10, "TYPE": 0})\n')),(0,r.kt)("h3",{id:"cmd_raw_no_range_check"},"cmd_raw_no_range_check"),(0,r.kt)("p",null,"Sends a specified command without running conversions or performing range checking on its parameters. This should only be used when it is necessary to intentionally send a bad command parameter to test a target."),(0,r.kt)("p",null,"Ruby Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'cmd_raw_no_range_check("<Target Name> <Command Name> with <Param #1 Name> <Param #1 Value>, <Param #2 Name> <Param #2 Value>, ...")\ncmd_raw_no_range_check("<Target Name>", "<Command Name>", "<Param #1 Name>" => <Param #1 Value>, "<Param #2 Name>" => <Param #2 Value>, ...)\n')),(0,r.kt)("p",null,"Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'cmd_raw_no_range_check("<Target Name> <Command Name> with <Param #1 Name> <Param #1 Value>, <Param #2 Name> <Param #2 Value>, ...")\ncmd_raw_no_range_check("<Target Name>", "<Command Name>", {"<Param #1 Name>": <Param #1 Value>, "<Param #2 Name>": <Param #2 Value>, ...})\n')),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Target Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the target this command is associated with.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Command Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of this command. Also referred to as its mnemonic.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Param #x Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of a command parameter. If there are no parameters then the 'with' keyword should not be given.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Param #x Value"),(0,r.kt)("td",{parentName:"tr",align:null},"Value of the command parameter. Values are automatically converted to the appropriate type.")))),(0,r.kt)("p",null,"Ruby Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'cmd_raw_no_range_check("INST COLLECT with DURATION 11, TYPE 0")\ncmd_raw_no_range_check("INST", "COLLECT", "DURATION" => 11, "TYPE" => 0)\n')),(0,r.kt)("p",null,"Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'cmd_raw_no_range_check("INST COLLECT with DURATION 11, TYPE 0")\ncmd_raw_no_range_check("INST", "COLLECT", {"DURATION": 11, "TYPE": 0})\n')),(0,r.kt)("h3",{id:"cmd_raw_no_hazardous_check"},"cmd_raw_no_hazardous_check"),(0,r.kt)("p",null,"Sends a specified command without running conversions or performing the notification if it is a hazardous command. This should only be used when it is necessary to fully automate testing involving hazardous commands."),(0,r.kt)("p",null,"Ruby Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'cmd_raw_no_hazardous_check("<Target Name> <Command Name> with <Param #1 Name> <Param #1 Value>, <Param #2 Name> <Param #2 Value>, ...")\ncmd_raw_no_hazardous_check("<Target Name>", "<Command Name>", "<Param #1 Name>" => <Param #1 Value>, "<Param #2 Name>" => <Param #2 Value>, ...)\n')),(0,r.kt)("p",null,"Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'cmd_raw_no_hazardous_check("<Target Name> <Command Name> with <Param #1 Name> <Param #1 Value>, <Param #2 Name> <Param #2 Value>, ...")\ncmd_raw_no_hazardous_check("<Target Name>", "<Command Name>", {"<Param #1 Name>": <Param #1 Value>, "<Param #2 Name>": <Param #2 Value>, ...})\n')),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Target Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the target this command is associated with.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Command Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of this command. Also referred to as its mnemonic.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Param #x Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of a command parameter. If there are no parameters then the 'with' keyword should not be given.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Param #x Value"),(0,r.kt)("td",{parentName:"tr",align:null},"Value of the command parameter. Values are automatically converted to the appropriate type.")))),(0,r.kt)("p",null,"Ruby / Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'cmd_raw_no_hazardous_check("INST CLEAR")\ncmd_raw_no_hazardous_check("INST", "CLEAR")\n')),(0,r.kt)("h3",{id:"cmd_raw_no_checks"},"cmd_raw_no_checks"),(0,r.kt)("p",null,"Sends a specified command without running conversions or performing the parameter range checks or notification if it is a hazardous command. This should only be used when it is necessary to fully automate testing involving hazardous commands that intentially have invalid parameters."),(0,r.kt)("p",null,"Ruby Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'cmd_raw_no_checks("<Target Name> <Command Name> with <Param #1 Name> <Param #1 Value>, <Param #2 Name> <Param #2 Value>, ...")\ncmd_raw_no_checks("<Target Name>", "<Command Name>", "<Param #1 Name>" => <Param #1 Value>, "<Param #2 Name>" => <Param #2 Value>, ...)\n')),(0,r.kt)("p",null,"Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'cmd_raw_no_checks("<Target Name> <Command Name> with <Param #1 Name> <Param #1 Value>, <Param #2 Name> <Param #2 Value>, ...")\ncmd_raw_no_checks("<Target Name>", "<Command Name>", {"<Param #1 Name>": <Param #1 Value>, "<Param #2 Name>": <Param #2 Value>, ...})\n')),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Target Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the target this command is associated with.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Command Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of this command. Also referred to as its mnemonic.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Param #x Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of a command parameter. If there are no parameters then the 'with' keyword should not be given.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Param #x Value"),(0,r.kt)("td",{parentName:"tr",align:null},"Value of the command parameter. Values are automatically converted to the appropriate type.")))),(0,r.kt)("p",null,"Ruby Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'cmd_raw_no_checks("INST COLLECT with DURATION 11, TYPE 1")\ncmd_raw_no_checks("INST", "COLLECT", "DURATION" => 11, "TYPE" => 1)\n')),(0,r.kt)("p",null,"Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'cmd_raw_no_checks("INST COLLECT with DURATION 11, TYPE 1")\ncmd_raw_no_checks("INST", "COLLECT", {"DURATION": 11, "TYPE": 1})\n')),(0,r.kt)("h3",{id:"build_command-since-580"},"build_command (since 5.8.0)"),(0,r.kt)("p",null,"Builds a command binary string"),(0,r.kt)("p",null,"Ruby Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},"build_command(<ARGS>, range_check: true, raw: false)\n")),(0,r.kt)("p",null,"Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},"build_command(<ARGS>, range_check=True, raw=False)\n")),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"ARGS"),(0,r.kt)("td",{parentName:"tr",align:null},"Command parameters (see cmd)")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"range_check"),(0,r.kt)("td",{parentName:"tr",align:null},"Whether to perform range checking on the command. Default is true.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"raw"),(0,r.kt)("td",{parentName:"tr",align:null},"Whether to write the command arguments as RAW or CONVERTED value. Default is CONVERTED.")))),(0,r.kt)("p",null,"Ruby Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'x = build_command("INST COLLECT with DURATION 10, TYPE NORMAL")\nputs x #=> {"id"=>"1696437370872-0", "result"=>"SUCCESS", "time"=>"1696437370872305961", "received_time"=>"1696437370872305961", "target_name"=>"INST", "packet_name"=>"COLLECT", "received_count"=>"3", "buffer"=>"\\x13\\xE7\\xC0\\x00\\x00\\f\\x00\\x01\\x00\\x00A \\x00\\x00\\xAB\\x00\\x00\\x00\\x00"}\n')),(0,r.kt)("p",null,"Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},"x = build_command(\"INST COLLECT with DURATION 10, TYPE NORMAL\")\nprint(x) #=> {'id': '1697298167748-0', 'result': 'SUCCESS', 'time': '1697298167749155717', 'received_time': '1697298167749155717', 'target_name': 'INST', 'packet_name': 'COLLECT', 'received_count': '2', 'buffer': bytearray(b'\\x13\\xe7\\xc0\\x00\\x00\\x0c\\x00\\x01\\x00\\x00A \\x00\\x00\\xab\\x00\\x00\\x00\\x00')}\n")),(0,r.kt)("h3",{id:"send_raw"},"send_raw"),(0,r.kt)("p",null,"Sends raw data on an interface."),(0,r.kt)("p",null,"Ruby / Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},"send_raw(<Interface Name>, <Data>)\n")),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Interface Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the interface to send the raw data on.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Data"),(0,r.kt)("td",{parentName:"tr",align:null},"Raw ruby string of data to send.")))),(0,r.kt)("p",null,"Ruby / Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'send_raw("INST_INT", data)\n')),(0,r.kt)("h3",{id:"get_all_commands-since-500"},"get_all_commands (since 5.0.0)"),(0,r.kt)("p",null,"Returns an array of the commands that are available for a particular target. The returned array is an array of hashes which fully describe the command packet."),(0,r.kt)("p",null,"Ruby / Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'get_all_commands("<Target Name>")\n')),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Target Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the target.")))),(0,r.kt)("p",null,"Ruby Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'cmd_list = get_all_commands("INST")\nputs cmd_list #=>\n# [{"target_name"=>"INST",\n# "packet_name"=>"ABORT",\n# "endianness"=>"BIG_ENDIAN",\n# "description"=>"Aborts a collect on the instrument",\n# "items"=> [{"name"=>"CCSDSVER", "bit_offset"=>0, "bit_size"=>3, ... }]\n# ...\n# }]\n')),(0,r.kt)("p",null,"Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},"cmd_list = get_all_commands(\"INST\")\nprint(cmd_list) #=>\n# [{'target_name': 'INST',\n# 'packet_name': 'ABORT',\n# 'endianness': 'BIG_ENDIAN',\n# 'description': 'Aborts a collect on the INST instrument',\n# 'items': [{'name': 'CCSDSVER', 'bit_offset': 0, 'bit_size': 3, ... }]\n# ...\n# }]\n")),(0,r.kt)("h3",{id:"get_all_command_names-since-506"},"get_all_command_names (since 5.0.6)"),(0,r.kt)("p",null,"Returns an array of the command names for a particular target."),(0,r.kt)("p",null,"Ruby / Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'get_all_command_names("<Target Name>")\n')),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Target Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the target")))),(0,r.kt)("p",null,"Ruby Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},"cmd_list = get_all_command_names(\"INST\")\nputs cmd_list #=> ['ABORT', 'ARYCMD', 'ASCIICMD', ...]\n")),(0,r.kt)("p",null,"Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},"cmd_list = get_all_command_names(\"INST\")\nprint(cmd_list) #=> ['ABORT', 'ARYCMD', 'ASCIICMD', ...]\n")),(0,r.kt)("h3",{id:"get_command-since-500"},"get_command (since 5.0.0)"),(0,r.kt)("p",null,"Returns a command hash which fully describes the command packet."),(0,r.kt)("p",null,"Ruby / Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'get_command("<Target Name>", "<Packet Name>")\n')),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Target Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the target.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Packet Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the packet.")))),(0,r.kt)("p",null,"Ruby / Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'abort_cmd = get_command("INST", "ABORT")\nputs abort_cmd #=>\n# [{"target_name"=>"INST",\n# "packet_name"=>"ABORT",\n# "endianness"=>"BIG_ENDIAN",\n# "description"=>"Aborts a collect on the instrument",\n# "items"=> [{"name"=>"CCSDSVER", "bit_offset"=>0, "bit_size"=>3, ... }]\n# ...\n# }]\n')),(0,r.kt)("p",null,"Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},"abort_cmd = get_command(\"INST\")\nprint(abort_cmd) #=>\n# [{'target_name': 'INST',\n# 'packet_name': 'ABORT',\n# 'endianness': 'BIG_ENDIAN',\n# 'description': 'Aborts a collect on the INST instrument',\n# 'items': [{'name': 'CCSDSVER', 'bit_offset': 0, 'bit_size': 3, ... }]\n# ...\n# }]\n")),(0,r.kt)("h3",{id:"get_parameter-since-500"},"get_parameter (since 5.0.0)"),(0,r.kt)("p",null,"Returns a hash of the given command parameter"),(0,r.kt)("p",null,"Ruby / Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'get_parameter("<Target Name>", "<Command Name>", "<Parameter Name>")\n')),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Target Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the target.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Command Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the command.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Parameter Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the parameter.")))),(0,r.kt)("p",null,"Ruby Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'param = get_parameter("INST", "COLLECT", "TYPE")\nputs param #=>\n# {"name"=>"TYPE", "bit_offset"=>64, "bit_size"=>16, "data_type"=>"UINT",\n# "description"=>"Collect type which can be normal or special", "default"=>0,\n# "minimum"=>0, "maximum"=>65535, "endianness"=>"BIG_ENDIAN", "required"=>true, "overflow"=>"ERROR",\n# "states"=>{"NORMAL"=>{"value"=>0}, "SPECIAL"=>{"value"=>1, "hazardous"=>""}}, "limits"=>{}}\n')),(0,r.kt)("p",null,"Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},"param = get_parameter(\"INST\", \"COLLECT\", \"TYPE\")\nprint(param) #=>\n# {'name': 'TYPE', 'bit_offset': 64, 'bit_size': 16, 'data_type': 'UINT',\n# 'description': 'Collect type which can be normal or special', 'default': 0,\n# 'minimum': 0, 'maximum': 65535, 'endianness': 'BIG_ENDIAN', 'required': True, 'overflow': 'ERROR',\n# 'states': {'NORMAL': {'value': 0}, 'SPECIAL': {'value': 1, 'hazardous': ''}}, 'limits': {}}\n")),(0,r.kt)("h3",{id:"get_cmd_buffer"},"get_cmd_buffer"),(0,r.kt)("p",null,"Returns a packet hash (similar to get_command) along with the raw packet buffer as a Ruby string."),(0,r.kt)("p",null,"Ruby / Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'buffer = get_cmd_buffer("<Target Name>", "<Packet Name>")[\'buffer\']\n')),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Target Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the target.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Packet Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the packet.")))),(0,r.kt)("p",null,"Ruby Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'packet = get_cmd_buffer("INST", "COLLECT")\nputs packet #=>\n# {"time"=>"1697298846752053420", "received_time"=>"1697298846752053420",\n# "target_name"=>"INST", "packet_name"=>"COLLECT", "received_count"=>"20", "stored"=>"false",\n# "buffer"=>"\\x13\\xE7\\xC0\\x00\\x00\\f\\x00\\x01\\x00\\x00@\\xE0\\x00\\x00\\xAB\\x00\\x00\\x00\\x00"}\n')),(0,r.kt)("p",null,"Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},"packet = get_cmd_buffer(\"INST\", \"COLLECT\")\nprint(packet) #=>\n# {'time': '1697298923745982470', 'received_time': '1697298923745982470',\n# 'target_name': 'INST', 'packet_name': 'COLLECT', 'received_count': '21', 'stored': 'false',\n# 'buffer': bytearray(b'\\x13\\xe7\\xc0\\x00\\x00\\x0c\\x00\\x01\\x00\\x00@\\xe0\\x00\\x00\\xab\\x00\\x00\\x00\\x00')}\n")),(0,r.kt)("h3",{id:"get_cmd_hazardous"},"get_cmd_hazardous"),(0,r.kt)("p",null,"Returns true/false indicating whether a particular command is flagged as hazardous."),(0,r.kt)("p",null,"Ruby / Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'get_cmd_hazardous("<Target Name>", "<Command Name>", <Command Params - optional>)\n')),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Target Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the target.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Command Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the command.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Command Params"),(0,r.kt)("td",{parentName:"tr",align:null},"Hash of the parameters given to the command (optional). Note that some commands are only hazardous based on parameter states.")))),(0,r.kt)("p",null,"Ruby Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},"hazardous = get_cmd_hazardous(\"INST\", \"COLLECT\", {'TYPE' => 'SPECIAL'})\nputs hazardous #=> true\n")),(0,r.kt)("p",null,"Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},"hazardous = get_cmd_hazardous(\"INST\", \"COLLECT\", {'TYPE': 'SPECIAL'})\nprint(hazardous) #=> True\n")),(0,r.kt)("h3",{id:"get_cmd_value"},"get_cmd_value"),(0,r.kt)("p",null,"Returns reads a value from the most recently sent command packet. The pseudo-parameters 'PACKET_TIMESECONDS', 'PACKET_TIMEFORMATTED', 'RECEIVED_COUNT', 'RECEIVED_TIMEFORMATTED', and 'RECEIVED_TIMESECONDS' are also supported."),(0,r.kt)("p",null,"Ruby / Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'get_cmd_value("<Target Name>", "<Command Name>", "<Parameter Name>", <Value Type - optional>)\n')),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Target Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the target.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Command Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the command.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Parameter Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the command parameter.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Value Type"),(0,r.kt)("td",{parentName:"tr",align:null},"Value Type to read. RAW, CONVERTED, FORMATTED, or WITH_UNITS. NOTE: Symbol in Ruby and str in Python")))),(0,r.kt)("p",null,"Ruby Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'value = get_cmd_value("INST", "COLLECT", "TEMP", :RAW)\nputs value #=> 0.0\n')),(0,r.kt)("p",null,"Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'value = get_cmd_value("INST", "COLLECT", "TEMP", "RAW")\nprint(value) #=> 0.0\n')),(0,r.kt)("h3",{id:"get_cmd_time"},"get_cmd_time"),(0,r.kt)("p",null,"Returns the time of the most recent command sent."),(0,r.kt)("p",null,"Ruby / Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'get_cmd_time("<Target Name - optional>", "<Command Name - optional>")\n')),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Target Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the target. If not given, then the most recent command time to any target will be returned")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Command Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the command. If not given, then the most recent command time to the given target will be returned")))),(0,r.kt)("p",null,"Ruby / Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'target_name, command_name, time = get_cmd_time() # Name of the most recent command sent to any target and time\ntarget_name, command_name, time = get_cmd_time("INST") # Name of the most recent command sent to the INST target and time\ntarget_name, command_name, time = get_cmd_time("INST", "COLLECT") # Name of the most recent INST COLLECT command and time\n')),(0,r.kt)("h3",{id:"get_cmd_cnt"},"get_cmd_cnt"),(0,r.kt)("p",null,"Returns the number of times a specified command has been sent."),(0,r.kt)("p",null,"Ruby / Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'get_cmd_cnt("<Target Name>", "<Command Name>")\n')),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Target Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the target.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Command Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the command.")))),(0,r.kt)("p",null,"Ruby / Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'cmd_cnt = get_cmd_cnt("INST", "COLLECT") # Number of times the INST COLLECT command has been sent\n')),(0,r.kt)("h2",{id:"handling-telemetry"},"Handling Telemetry"),(0,r.kt)("p",null,"These methods allow the user to interact with telemetry items."),(0,r.kt)("h3",{id:"check-check_raw-check_formatted-check_with_units"},"check, check_raw, check_formatted, check_with_units"),(0,r.kt)("p",null,"Performs a verification of a telemetry item using its specified telemetry type. If the verification fails then the script will be paused with an error. If no comparision is given to check then the telemetry item is simply printed to the script output. Note: In most cases using wait_check is a better choice than using check."),(0,r.kt)("p",null,"Ruby / Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'check("<Target Name> <Packet Name> <Item Name> <Comparison - optional>")\n')),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Target Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the target of the telemetry item.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Packet Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the telemetry packet of the telemetry item.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Item Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the telemetry item.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Comparison"),(0,r.kt)("td",{parentName:"tr",align:null},"A comparison to perform against the telemetry item. If a comparison is not given then the telemetry item will just be printed into the script log.")))),(0,r.kt)("p",null,"Ruby Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'check("INST HEALTH_STATUS COLLECTS > 1")\ncheck_raw("INST HEALTH_STATUS COLLECTS > 1")\ncheck_formatted("INST HEALTH_STATUS COLLECTS > 1")\ncheck_with_units("INST HEALTH_STATUS COLLECTS > 1")\n# Ruby passes type as symbol\ncheck("INST HEALTH_STATUS COLLECTS > 1", type: :RAW)\n')),(0,r.kt)("p",null,"Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'check("INST HEALTH_STATUS COLLECTS > 1")\ncheck_raw("INST HEALTH_STATUS COLLECTS > 1")\ncheck_formatted("INST HEALTH_STATUS COLLECTS > 1")\ncheck_with_units("INST HEALTH_STATUS COLLECTS > 1")\n# Python passes type as string\ncheck("INST HEALTH_STATUS COLLECTS > 1", type=\'RAW\')\n')),(0,r.kt)("h3",{id:"check_tolerance"},"check_tolerance"),(0,r.kt)("p",null,"Checks a converted telemetry item against an expected value with a tolerance. If the verification fails then the script will be paused with an error. Note: In most cases using wait_check_tolerance is a better choice than using check_tolerance."),(0,r.kt)("p",null,"Ruby / Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'check_tolerance("<Target Name> <Packet Name> <Item Name>", <Expected Value>, <Tolerance>)\n')),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Target Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the target of the telemetry item.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Packet Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the telemetry packet of the telemetry item.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Item Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the telemetry item.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Expected Value"),(0,r.kt)("td",{parentName:"tr",align:null},"Expected value of the telemetry item.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Tolerance"),(0,r.kt)("td",{parentName:"tr",align:null},"\xb1 Tolerance on the expected value.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"type"),(0,r.kt)("td",{parentName:"tr",align:null},"CONVERTED (default) or RAW (Ruby symbol, Python string)")))),(0,r.kt)("p",null,"Ruby Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'check_tolerance("INST HEALTH_STATUS COLLECTS", 10.0, 5.0)\ncheck_tolerance("INST HEALTH_STATUS TEMP1", 50000, 20000, type: :RAW)\n')),(0,r.kt)("p",null,"Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'check_tolerance("INST HEALTH_STATUS COLLECTS", 10.0, 5.0)\ncheck_tolerance("INST HEALTH_STATUS TEMP1", 50000, 20000, type=\'RAW\')\n')),(0,r.kt)("h3",{id:"check_expression"},"check_expression"),(0,r.kt)("p",null,"Evaluates an expression. If the expression evaluates to false the script will be paused with an error. This method can be used to perform more complicated comparisons than using check as shown in the example. Note: In most cases using ",(0,r.kt)("a",{parentName:"p",href:"#waitcheckexpression"},"wait_check_expression")," is a better choice than using check_expression."),(0,r.kt)("p",null,"Remember that everything inside the check_expression string will be evaluated directly and thus must be valid syntax. A common mistake is to check a variable like so (Ruby variable interpolation):"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"check_expression(\"#{answer} == 'yes'\") # where answer contains 'yes'")),(0,r.kt)("p",null,"This evaluates to ",(0,r.kt)("inlineCode",{parentName:"p"},"yes == 'yes'")," which is not valid syntax because the variable yes is not defined (usually). The correct way to write this expression is as follows:"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"check_expression(\"'#{answer}' == 'yes'\") # where answer contains 'yes'")),(0,r.kt)("p",null,"Now this evaluates to ",(0,r.kt)("inlineCode",{parentName:"p"},"'yes' == 'yes'")," which is true so the check passes."),(0,r.kt)("p",null,"Ruby / Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'check_expression("<Expression>")\n')),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Expression"),(0,r.kt)("td",{parentName:"tr",align:null},"An expression to evaluate.")))),(0,r.kt)("p",null,"Ruby / Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},"check_expression(\"tlm('INST HEALTH_STATUS COLLECTS') > 5 and tlm('INST HEALTH_STATUS TEMP1') > 25.0\")\n")),(0,r.kt)("h3",{id:"check_exception"},"check_exception"),(0,r.kt)("p",null,"Executes a method and expects an exception to be raised. If the method does not raise an exception, a CheckError is raised."),(0,r.kt)("p",null,"Ruby / Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'check_exception("<Method Name>", "<Method Params - optional>")\n')),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Method Name"),(0,r.kt)("td",{parentName:"tr",align:null},"The COSMOS scripting method to execute, e.g. 'cmd', etc.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Method Params"),(0,r.kt)("td",{parentName:"tr",align:null},"Parameters for the method")))),(0,r.kt)("p",null,"Ruby Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'check_exception("cmd", "INST", "COLLECT", "TYPE" => "NORMAL")\n')),(0,r.kt)("p",null,"Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'check_exception("cmd", "INST", "COLLECT", {"TYPE": "NORMAL"})\n')),(0,r.kt)("h3",{id:"tlm-tlm_raw-tlm_formatted-tlm_with_units"},"tlm, tlm_raw, tlm_formatted, tlm_with_units"),(0,r.kt)("p",null,"Reads the specified form of a telemetry item."),(0,r.kt)("p",null,"Ruby / Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'tlm("<Target Name> <Packet Name> <Item Name>")\n')),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Target Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the target of the telemetry item.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Packet Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the telemetry packet of the telemetry item.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Item Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the telemetry item.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"type"),(0,r.kt)("td",{parentName:"tr",align:null},"Named parameter specifying the type. RAW, CONVERTED (default), FORMATTED, WITH_UNITS (Ruby symbol, Python string).")))),(0,r.kt)("p",null,"Ruby Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'value = tlm("INST HEALTH_STATUS COLLECTS")\nvalue = tlm_raw("INST HEALTH_STATUS COLLECTS")\nvalue = tlm_formatted("INST HEALTH_STATUS COLLECTS")\nvalue = tlm_with_units("INST HEALTH_STATUS COLLECTS")\n# Equivalent to tlm_raw\nraw_value = tlm("INST HEALTH_STATUS COLLECTS", type: :RAW)\n')),(0,r.kt)("p",null,"Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'value = tlm("INST HEALTH_STATUS COLLECTS")\nvalue = tlm_raw("INST HEALTH_STATUS COLLECTS")\nvalue = tlm_formatted("INST HEALTH_STATUS COLLECTS")\nvalue = tlm_with_units("INST HEALTH_STATUS COLLECTS")\n# Equivalent to tlm_raw\nraw_value = tlm("INST HEALTH_STATUS COLLECTS", type=\'RAW\')\n')),(0,r.kt)("h3",{id:"get_tlm_buffer"},"get_tlm_buffer"),(0,r.kt)("p",null,"Returns a packet hash (similar to get_telemetry) along with the raw packet buffer."),(0,r.kt)("p",null,"Ruby / Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'buffer = get_tlm_buffer("<Target Name>", "<Packet Name>")[\'buffer\']\n')),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Target Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the target.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Packet Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the packet.")))),(0,r.kt)("p",null,"Ruby / Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'packet = get_tlm_buffer("INST", "HEALTH_STATUS")\npacket[\'buffer\']\n')),(0,r.kt)("h3",{id:"get_tlm_packet"},"get_tlm_packet"),(0,r.kt)("p",null,"Returns the names, values, and limits states of all telemetry items in a specified packet. The value is returned as an array of arrays with each entry containing ","[item_name, item_value, limits_state]","."),(0,r.kt)("p",null,"Ruby / Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'get_tlm_packet("<Target Name>", "<Packet Name>", <type>)\n')),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Target Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the target.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Packet Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the packet.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"type"),(0,r.kt)("td",{parentName:"tr",align:null},"Named parameter specifying the type. RAW, CONVERTED (default), FORMATTED, or WITH_UNITS (Ruby symbol, Python string).")))),(0,r.kt)("p",null,"Ruby Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'names_values_and_limits_states = get_tlm_packet("INST", "HEALTH_STATUS", type: :FORMATTED)\n')),(0,r.kt)("p",null,"Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'names_values_and_limits_states = get_tlm_packet("INST", "HEALTH_STATUS", type=\'FORMATTED\')\n')),(0,r.kt)("h3",{id:"get_tlm_values-modified-in-500"},"get_tlm_values (modified in 5.0.0)"),(0,r.kt)("p",null,"Returns the values and current limits state for a specified set of telemetry items. Items can be in any telemetry packet in the system. They can all be retrieved using the same value type or a specific value type can be specified for each item."),(0,r.kt)("p",null,"Ruby / Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},"values, limits_states, limits_settings, limits_set = get_tlm_values(<Items>)\n")),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Items"),(0,r.kt)("td",{parentName:"tr",align:null},"Array of strings of the form ","['TGT",(0,r.kt)("strong",{parentName:"td"},"PKT"),"ITEM__TYPE', ... ]")))),(0,r.kt)("p",null,"Ruby / Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'values = get_tlm_values(["INST__HEALTH_STATUS__TEMP1__CONVERTED", "INST__HEALTH_STATUS__TEMP2__RAW"])\nprint(values) # [[-100.0, :RED_LOW], [0, :RED_LOW]]\n')),(0,r.kt)("h3",{id:"get_all_telemetry-since-500"},"get_all_telemetry (since 5.0.0)"),(0,r.kt)("p",null,"Returns an array of all target packet hashes."),(0,r.kt)("p",null,"Ruby / Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'get_all_telemetry("<Target Name>")\n')),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Target Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the target.")))),(0,r.kt)("p",null,"Ruby / Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'packets = get_all_telemetry("INST")\nprint(packets)\n#[{"target_name"=>"INST",\n# "packet_name"=>"ADCS",\n# "endianness"=>"BIG_ENDIAN",\n# "description"=>"Position and attitude data",\n# "stale"=>true,\n# "items"=>\n# [{"name"=>"CCSDSVER",\n# "bit_offset"=>0,\n# "bit_size"=>3,\n# ...\n')),(0,r.kt)("h3",{id:"get_all_telemetry_names-since-506"},"get_all_telemetry_names (since 5.0.6)"),(0,r.kt)("p",null,"Returns an array of all target packet names."),(0,r.kt)("p",null,"Ruby / Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'get_all_telemetry_names("<Target Name>")\n')),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Target Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the target")))),(0,r.kt)("p",null,"Ruby / Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'get_all_telemetry_names("INST") #=> ["ADCS", "HEALTH_STATUS", ...]\n')),(0,r.kt)("h3",{id:"get_telemetry-since-500"},"get_telemetry (since 5.0.0)"),(0,r.kt)("p",null,"Returns a packet hash."),(0,r.kt)("p",null,"Ruby / Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'get_telemetry("<Target Name>", "<Packet Name>")\n')),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Target Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the target.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Packet Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the packet.")))),(0,r.kt)("p",null,"Ruby / Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'packet = get_telemetry("INST", "HEALTH_STATUS")\nprint(packet)\n#{"target_name"=>"INST",\n# "packet_name"=>"HEALTH_STATUS",\n# "endianness"=>"BIG_ENDIAN",\n# "description"=>"Health and status from the instrument",\n# "stale"=>true,\n# "processors"=>\n# [{"name"=>"TEMP1STAT",\n# "class"=>"OpenC3::StatisticsProcessor",\n# "params"=>["TEMP1", 100, "CONVERTED"]},\n# {"name"=>"TEMP1WATER",\n# "class"=>"OpenC3::WatermarkProcessor",\n# "params"=>["TEMP1", "CONVERTED"]}],\n# "items"=>\n# [{"name"=>"CCSDSVER",\n# "bit_offset"=>0,\n# "bit_size"=>3,\n# ...\n')),(0,r.kt)("h3",{id:"get_item-since-500"},"get_item (since 5.0.0)"),(0,r.kt)("p",null,"Returns an item hash."),(0,r.kt)("p",null,"Ruby / Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'get_item("<Target Name>", "<Packet Name>", "<Item Name>")\n')),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Target Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the target.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Packet Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the packet.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Item Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the item.")))),(0,r.kt)("p",null,"Ruby / Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'item = get_item("INST", "HEALTH_STATUS", "CCSDSVER")\nprint(item)\n#{"name"=>"CCSDSVER",\n# "bit_offset"=>0,\n# "bit_size"=>3,\n# "data_type"=>"UINT",\n# "description"=>"CCSDS packet version number (See CCSDS 133.0-B-1)",\n# "endianness"=>"BIG_ENDIAN",\n# "required"=>false,\n# "overflow"=>"ERROR"}\n')),(0,r.kt)("h3",{id:"get_tlm_cnt"},"get_tlm_cnt"),(0,r.kt)("p",null,"Returns the number of times a specified telemetry packet has been received."),(0,r.kt)("p",null,"Ruby / Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'get_tlm_cnt("<Target Name>", "<Packet Name>")\n')),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Target Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the target.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Packet Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the telemetry packet.")))),(0,r.kt)("p",null,"Ruby / Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'tlm_cnt = get_tlm_cnt("INST", "HEALTH_STATUS") # Number of times the INST HEALTH_STATUS telemetry packet has been received.\n')),(0,r.kt)("h3",{id:"set_tlm"},"set_tlm"),(0,r.kt)("p",null,"Sets a telemetry item value in the Command and Telemetry Server. This value will be overwritten if a new packet is received from an interface. For that reason this method is most useful if interfaces are disconnected or for testing via the Script Runner disconnect mode. Manually setting telemetry values allows for the execution of many logical paths in scripts."),(0,r.kt)("p",null,"Ruby / Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'set_tlm("<Target> <Packet> <Item> = <Value>", <type>)\n')),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Target"),(0,r.kt)("td",{parentName:"tr",align:null},"Target name")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Packet"),(0,r.kt)("td",{parentName:"tr",align:null},"Packet name")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Item"),(0,r.kt)("td",{parentName:"tr",align:null},"Item name")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Value"),(0,r.kt)("td",{parentName:"tr",align:null},"Value to set")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"type"),(0,r.kt)("td",{parentName:"tr",align:null},"Value type RAW, CONVERTED (default), FORMATTED, WITH_UNITS (Ruby symbol, Python string)")))),(0,r.kt)("p",null,"Ruby Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'set_tlm("INST HEALTH_STATUS COLLECTS = 5") # type is :CONVERTED by default\ncheck("INST HEALTH_STATUS COLLECTS == 5")\nset_tlm("INST HEALTH_STATUS COLLECTS = 10", type: :RAW)\ncheck("INST HEALTH_STATUS COLLECTS == 10", type: :RAW)\n')),(0,r.kt)("p",null,"Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'set_tlm("INST HEALTH_STATUS COLLECTS = 5") # type is CONVERTED by default\ncheck("INST HEALTH_STATUS COLLECTS == 5")\nset_tlm("INST HEALTH_STATUS COLLECTS = 10", type=\'RAW\')\ncheck("INST HEALTH_STATUS COLLECTS == 10", type=\'RAW\')\n')),(0,r.kt)("h3",{id:"inject_tlm"},"inject_tlm"),(0,r.kt)("p",null,"Injects a packet into the system as if it was received from an interface."),(0,r.kt)("p",null,"Ruby / Packet Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'inject_tlm("<target_name>", "<packet_name>", <item_hash>, <type>)\n')),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Target"),(0,r.kt)("td",{parentName:"tr",align:null},"Target name")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Packet"),(0,r.kt)("td",{parentName:"tr",align:null},"Packet name")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Item Hash"),(0,r.kt)("td",{parentName:"tr",align:null},"Hash of item name/value for each item. If an item is not specified in the hash, the current value table value will be used. Optional parameter, defaults to nil.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"type"),(0,r.kt)("td",{parentName:"tr",align:null},"Type of values in the item hash, RAW, CONVERTED (default), FORMATTED, WITH_UNITS (Ruby symbol, Python string)")))),(0,r.kt)("p",null,"Ruby Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},"inject_tlm(\"INST\", \"PARAMS\", {'VALUE1' => 5.0, 'VALUE2' => 7.0})\n")),(0,r.kt)("p",null,"Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},"inject_tlm(\"INST\", \"PARAMS\", {'VALUE1': 5.0, 'VALUE2': 7.0})\n")),(0,r.kt)("h3",{id:"override_tlm"},"override_tlm"),(0,r.kt)("p",null,"Sets the converted value for a telmetry point in the Command and Telemetry Server. This value will be maintained even if a new packet is received on the interface unless the override is canceled with the normalize_tlm method."),(0,r.kt)("p",null,"Ruby / Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'override_tlm("<Target> <Packet> <Item> = <Value>", <type>)\n')),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Target"),(0,r.kt)("td",{parentName:"tr",align:null},"Target name")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Packet"),(0,r.kt)("td",{parentName:"tr",align:null},"Packet name")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Item"),(0,r.kt)("td",{parentName:"tr",align:null},"Item name")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Value"),(0,r.kt)("td",{parentName:"tr",align:null},"Value to set")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"type"),(0,r.kt)("td",{parentName:"tr",align:null},"Type to override, ALL (default), RAW, CONVERTED, FORMATTED, WITH_UNITS (Ruby symbol, Python string)")))),(0,r.kt)("p",null,"Ruby Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'override_tlm("INST HEALTH_STATUS TEMP1 = 5") # All requests for TEMP1 return 5\noverride_tlm("INST HEALTH_STATUS TEMP2 = 0", type: :RAW) # Only RAW tlm set to 0\n')),(0,r.kt)("p",null,"Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'override_tlm("INST HEALTH_STATUS TEMP1 = 5") # All requests for TEMP1 return 5\noverride_tlm("INST HEALTH_STATUS TEMP2 = 0", type=\'RAW\') # Only RAW tlm set to 0\n')),(0,r.kt)("h3",{id:"normalize_tlm"},"normalize_tlm"),(0,r.kt)("p",null,"Clears the override of a telmetry point in the Command and Telemetry Server."),(0,r.kt)("p",null,"Ruby / Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'normalize_tlm("<Target> <Packet> <Item>", <type>)\n')),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Target"),(0,r.kt)("td",{parentName:"tr",align:null},"Target name")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Packet"),(0,r.kt)("td",{parentName:"tr",align:null},"Packet name")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Item"),(0,r.kt)("td",{parentName:"tr",align:null},"Item name")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"type"),(0,r.kt)("td",{parentName:"tr",align:null},"Type to normalize, ALL (default), RAW, CONVERTED, FORMATTED, WITH_UNITS (Ruby symbol, Python string)")))),(0,r.kt)("p",null,"Ruby Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'normalize_tlm("INST HEALTH_STATUS TEMP1") # clear all overrides\nnormalize_tlm("INST HEALTH_STATUS TEMP1", type: :RAW) # clear only the RAW override\n')),(0,r.kt)("p",null,"Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'normalize_tlm("INST HEALTH_STATUS TEMP1") # clear all overrides\nnormalize_tlm("INST HEALTH_STATUS TEMP1", type=\'RAW\') # clear only the RAW override\n')),(0,r.kt)("h3",{id:"get_overrides"},"get_overrides"),(0,r.kt)("p",null,"Returns an array of the the currently overriden values set by override_tlm. NOTE: This returns all the value types that are overriden which by default is all 4 values types when using override_tlm."),(0,r.kt)("p",null,"Ruby / Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},"get_overrides()\n")),(0,r.kt)("p",null,"Ruby Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'override_tlm("INST HEALTH_STATUS TEMP1 = 5")\nputs get_overrides() #=>\n# [ {"target_name"=>"INST", "packet_name"=>"HEALTH_STATUS", "item_name"=>"TEMP1", "value_type"=>"RAW", "value"=>5}\n# {"target_name"=>"INST", "packet_name"=>"HEALTH_STATUS", "item_name"=>"TEMP1", "value_type"=>"CONVERTED", "value"=>5}\n# {"target_name"=>"INST", "packet_name"=>"HEALTH_STATUS", "item_name"=>"TEMP1", "value_type"=>"FORMATTED", "value"=>"5"}\n# {"target_name"=>"INST", "packet_name"=>"HEALTH_STATUS", "item_name"=>"TEMP1", "value_type"=>"WITH_UNITS", "value"=>"5"} ]\n')),(0,r.kt)("p",null,"Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},"override_tlm(\"INST HEALTH_STATUS TEMP1 = 5\")\nprint(get_overrides()) #=>\n# [ {'target_name': 'INST', 'packet_name': 'HEALTH_STATUS', 'item_name': 'TEMP1', 'value_type': 'RAW', 'value': 5},\n# {'target_name': 'INST', 'packet_name': 'HEALTH_STATUS', 'item_name': 'TEMP1', 'value_type': 'CONVERTED', 'value': 5},\n# {'target_name': 'INST', 'packet_name': 'HEALTH_STATUS', 'item_name': 'TEMP1', 'value_type': 'FORMATTED', 'value': '5'},\n# {'target_name': 'INST', 'packet_name': 'HEALTH_STATUS', 'item_name': 'TEMP1', 'value_type': 'WITH_UNITS', 'value': '5'} ]\n")),(0,r.kt)("h2",{id:"packet-data-subscriptions"},"Packet Data Subscriptions"),(0,r.kt)("p",null,"Methods for subscribing to specific packets of data. This provides an interface to ensure that each telemetry packet is received and handled rather than relying on polling where some data may be missed."),(0,r.kt)("h3",{id:"subscribe_packets-since-503"},"subscribe_packets (since 5.0.3)"),(0,r.kt)("p",null,"Allows the user to listen for one or more telemetry packets of data to arrive. A unique id is returned which is used to retrieve the data."),(0,r.kt)("p",null,"Ruby / Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},"subscribe_packets(packets)\n")),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"packets"),(0,r.kt)("td",{parentName:"tr",align:null},"Nested array of target name/packet name pairs that the user wishes to subscribe to.")))),(0,r.kt)("p",null,"Ruby / Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},"id = subscribe_packets([['INST', 'HEALTH_STATUS'], ['INST', 'ADCS']])\n")),(0,r.kt)("h3",{id:"get_packets-since-503"},"get_packets (since 5.0.3)"),(0,r.kt)("p",null,"Streams packet data from a previous subscription."),(0,r.kt)("p",null,"Ruby Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},"get_packets(id, block: nil, count: 1000)\n")),(0,r.kt)("p",null,"Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},"get_packets(id, block=None, count=1000)\n")),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"id"),(0,r.kt)("td",{parentName:"tr",align:null},"Unique id returned by subscribe_packets")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"block"),(0,r.kt)("td",{parentName:"tr",align:null},"Number of milliseconds to block while waiting for packets form ANY stream, default nil / None (do not block)")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"count"),(0,r.kt)("td",{parentName:"tr",align:null},"Maximum number of packets to return from EACH packet stream")))),(0,r.kt)("p",null,"Ruby Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},"id = subscribe_packets([['INST', 'HEALTH_STATUS'], ['INST', 'ADCS']])\nwait 0.1\nid, packets = get_packets(id)\npackets.each do |packet|\n puts \"#{packet['PACKET_TIMESECONDS']}: #{packet['target_name']} #{packet['packet_name']}\"\nend\n# Reuse ID from last call, allow for 1s wait, only get 1 packet\nid, packets = get_packets(id, block: 1000, count: 1)\npackets.each do |packet|\n puts \"#{packet['PACKET_TIMESECONDS']}: #{packet['target_name']} #{packet['packet_name']}\"\nend\n")),(0,r.kt)("p",null,"Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},"id = subscribe_packets([['INST', 'HEALTH_STATUS'], ['INST', 'ADCS']])\nwait(0.1)\nid, packets = get_packets(id)\nfor packet in packets:\n print(f\"{packet['PACKET_TIMESECONDS']}: {packet['target_name']} {packet['packet_name']}\")\n\n# Reuse ID from last call, allow for 1s wait, only get 1 packet\nid, packets = get_packets(id, block=1000, count=1)\nfor packet in packets:\n print(f\"{packet['PACKET_TIMESECONDS']}: {packet['target_name']} {packet['packet_name']}\")\n")),(0,r.kt)("h3",{id:"get_tlm_cnt-1"},"get_tlm_cnt"),(0,r.kt)("p",null,"Get the receive count for a telemetry packet"),(0,r.kt)("p",null,"Ruby / Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'get_tlm_cnt("<Target>", "<Packet>")\n')),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Target"),(0,r.kt)("td",{parentName:"tr",align:null},"Target name")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Packet"),(0,r.kt)("td",{parentName:"tr",align:null},"Packet name")))),(0,r.kt)("p",null,"Ruby / Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'get_tlm_cnt("INST", "HEALTH_STATUS") #=> 10\n')),(0,r.kt)("h3",{id:"get_tlm_cnts"},"get_tlm_cnts"),(0,r.kt)("p",null,"Get the receive counts for an array of telemetry packets"),(0,r.kt)("p",null,"Ruby / Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'get_tlm_cnts([["<Target>", "<Packet>"], ["<Target>", "<Packet>"]])\n')),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Target"),(0,r.kt)("td",{parentName:"tr",align:null},"Target name")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Packet"),(0,r.kt)("td",{parentName:"tr",align:null},"Packet name")))),(0,r.kt)("p",null,"Ruby / Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'get_tlm_cnts([["INST", "ADCS"], ["INST", "HEALTH_STATUS"]]) #=> [100, 10]\n')),(0,r.kt)("h3",{id:"get_packet_derived_items"},"get_packet_derived_items"),(0,r.kt)("p",null,"Get the list of derived telemetry items for a packet"),(0,r.kt)("p",null,"Ruby / Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'get_packet_derived_items("<Target>", "<Packet>")\n')),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Target"),(0,r.kt)("td",{parentName:"tr",align:null},"Target name")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Packet"),(0,r.kt)("td",{parentName:"tr",align:null},"Packet name")))),(0,r.kt)("p",null,"Ruby / Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},"get_packet_derived_items(\"INST\", \"HEALTH_STATUS\") #=> ['PACKET_TIMESECONDS', 'PACKET_TIMEFORMATTED', ...]\n")),(0,r.kt)("h2",{id:"delays"},"Delays"),(0,r.kt)("p",null,"These methods allow the user to pause the script to wait for telemetry to change or for an amount of time to pass."),(0,r.kt)("h3",{id:"wait"},"wait"),(0,r.kt)("p",null,"Pauses the script for a configurable amount of time (minimum 10ms) or until a converted telemetry item meets given criteria. It supports three different syntaxes as shown. If no parameters are given then an infinite wait occurs until the user presses Go. Note that on a timeout, wait does not stop the script, usually wait_check is a better choice."),(0,r.kt)("p",null,"Ruby / Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},"wait()\nwait(<Time>)\n")),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Time"),(0,r.kt)("td",{parentName:"tr",align:null},"Time in Seconds to delay for.")))),(0,r.kt)("p",null,"Ruby / Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'wait("<Target Name> <Packet Name> <Item Name> <Comparison>", <Timeout>, <Polling Rate (optional)>, type, quiet)\n')),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Target Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the target of the telemetry item.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Packet Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the telemetry packet of the telemetry item.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Item Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the telemetry item.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Comparison"),(0,r.kt)("td",{parentName:"tr",align:null},"A comparison to perform against the telemetry item.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Timeout"),(0,r.kt)("td",{parentName:"tr",align:null},"Timeout in seconds. Script will proceed if the wait statement times out waiting for the comparison to be true.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Polling Rate"),(0,r.kt)("td",{parentName:"tr",align:null},"How often the comparison is evaluated in seconds. Defaults to 0.25 if not specified.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"type"),(0,r.kt)("td",{parentName:"tr",align:null},"Named parameter specifying the type. RAW, CONVERTED (default), FORMATTED, WITH_UNITS (Ruby symbol, Python string).")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"quiet"),(0,r.kt)("td",{parentName:"tr",align:null},"Named parameter indicating whether to log the result. Defaults to true.")))),(0,r.kt)("p",null,"Ruby Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'wait\nwait 5\nwait("INST HEALTH_STATUS COLLECTS == 3", 10)\nwait("INST HEALTH_STATUS COLLECTS == 3", 10, type: :RAW, quiet: false)\n')),(0,r.kt)("p",null,"Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'wait()\nwait(5)\nwait("INST HEALTH_STATUS COLLECTS == 3", 10)\nwait("INST HEALTH_STATUS COLLECTS == 3", 10, type=\'RAW\', quiet=False)\n')),(0,r.kt)("h3",{id:"wait_tolerance"},"wait_tolerance"),(0,r.kt)("p",null,"Pauses the script for a configurable amount of time or until a converted telemetry item meets equals an expected value within a tolerance. Note that on a timeout, wait_tolerance does not stop the script, usually wait_check_tolerance is a better choice."),(0,r.kt)("p",null,"Ruby Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'wait_tolerance("<Target Name> <Packet Name> <Item Name>", <Expected Value>, <Tolerance>, <Timeout>, <Polling Rate (optional), type, quiet>)\n')),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Target Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the target of the telemetry item.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Packet Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the telemetry packet of the telemetry item.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Item Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the telemetry item.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Expected Value"),(0,r.kt)("td",{parentName:"tr",align:null},"Expected value of the telemetry item.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Tolerance"),(0,r.kt)("td",{parentName:"tr",align:null},"\xb1 Tolerance on the expected value.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Timeout"),(0,r.kt)("td",{parentName:"tr",align:null},"Timeout in seconds. Script will proceed if the wait statement times out waiting for the comparison to be true.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Polling Rate"),(0,r.kt)("td",{parentName:"tr",align:null},"How often the comparison is evaluated in seconds. Defaults to 0.25 if not specified.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"type"),(0,r.kt)("td",{parentName:"tr",align:null},"Named parameter specifying the type. RAW, CONVERTED (default), FORMATTED, WITH_UNITS (Ruby symbol, Python string).")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"quiet"),(0,r.kt)("td",{parentName:"tr",align:null},"Named parameter indicating whether to log the result. Defaults to true.")))),(0,r.kt)("p",null,"Ruby Examples:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'wait_tolerance("INST HEALTH_STATUS COLLECTS", 10.0, 5.0, 10)\nwait_tolerance("INST HEALTH_STATUS COLLECTS", 10.0, 5.0, 10, type: :RAW, quiet: true)\n')),(0,r.kt)("p",null,"Python Examples:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'wait_tolerance("INST HEALTH_STATUS COLLECTS", 10.0, 5.0, 10)\nwait_tolerance("INST HEALTH_STATUS COLLECTS", 10.0, 5.0, 10, type=\'RAW\', quiet=True)\n')),(0,r.kt)("h3",{id:"wait_expression"},"wait_expression"),(0,r.kt)("p",null,"Pauses the script until an expression is evaluated to be true or a timeout occurs. If a timeout occurs the script will continue. This method can be used to perform more complicated comparisons than using wait as shown in the example. Note that on a timeout, wait_expression does not stop the script, usually ",(0,r.kt)("a",{parentName:"p",href:"#waitcheckexpression"},"wait_check_expression")," is a better choice."),(0,r.kt)("p",null,"Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'wait_expression("<Expression>", <Timeout>, <Polling Rate (optional)>, quiet)\n')),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Expression"),(0,r.kt)("td",{parentName:"tr",align:null},"A ruby expression to evaluate.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Timeout"),(0,r.kt)("td",{parentName:"tr",align:null},"Timeout in seconds. Script will proceed if the wait statement times out waiting for the comparison to be true.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Polling Rate"),(0,r.kt)("td",{parentName:"tr",align:null},"How often the comparison is evaluated in seconds. Defaults to 0.25 if not specified.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"quiet"),(0,r.kt)("td",{parentName:"tr",align:null},"Named parameter indicating whether to log the result. Defaults to true.")))),(0,r.kt)("p",null,"Ruby / Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},"wait_expression(\"tlm('INST HEALTH_STATUS COLLECTS') > 5 and tlm('INST HEALTH_STATUS TEMP1') > 25.0\", 10)\n")),(0,r.kt)("h3",{id:"wait_packet"},"wait_packet"),(0,r.kt)("p",null,"Pauses the script until a certain number of packets have been received. If a timeout occurs the script will continue. Note that on a timeout, wait_packet does not stop the script, usually wait_check_packet is a better choice."),(0,r.kt)("p",null,"Ruby / Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'wait_packet("<Target>", "<Packet>", <Num Packets>, <Timeout>, <Polling Rate (optional)>, quiet)\n')),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Target"),(0,r.kt)("td",{parentName:"tr",align:null},"The target name")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Packet"),(0,r.kt)("td",{parentName:"tr",align:null},"The packet name")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Num Packets"),(0,r.kt)("td",{parentName:"tr",align:null},"The number of packets to receive")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Timeout"),(0,r.kt)("td",{parentName:"tr",align:null},"Timeout in seconds.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Polling Rate"),(0,r.kt)("td",{parentName:"tr",align:null},"How often the comparison is evaluated in seconds. Defaults to 0.25 if not specified.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"quiet"),(0,r.kt)("td",{parentName:"tr",align:null},"Named parameter indicating whether to log the result. Defaults to true.")))),(0,r.kt)("p",null,"Ruby / Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},"wait_packet('INST', 'HEALTH_STATUS', 5, 10) # Wait for 5 INST HEALTH_STATUS packets over 10s\n")),(0,r.kt)("h3",{id:"wait_check"},"wait_check"),(0,r.kt)("p",null,"Combines the wait and check keywords into one. This pauses the script until the converted value of a telemetry item meets given criteria or times out. On a timeout the script stops."),(0,r.kt)("p",null,"Ruby / Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'wait_check("<Target Name> <Packet Name> <Item Name> <Comparison>", <Timeout>, <Polling Rate (optional)>, type)\n')),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Target Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the target of the telemetry item.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Packet Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the telemetry packet of the telemetry item.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Item Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the telemetry item.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Comparison"),(0,r.kt)("td",{parentName:"tr",align:null},"A comparison to perform against the telemetry item.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Timeout"),(0,r.kt)("td",{parentName:"tr",align:null},"Timeout in seconds. Script will stop if the wait statement times out waiting for the comparison to be true.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Polling Rate"),(0,r.kt)("td",{parentName:"tr",align:null},"How often the comparison is evaluated in seconds. Defaults to 0.25 if not specified.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"type"),(0,r.kt)("td",{parentName:"tr",align:null},"Named parameter specifying the type. RAW, CONVERTED (default), FORMATTED, WITH_UNITS (Ruby symbol, Python string).")))),(0,r.kt)("p",null,"Ruby Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'wait_check("INST HEALTH_STATUS COLLECTS > 5", 10)\nwait_check("INST HEALTH_STATUS COLLECTS > 5", 10, type: :RAW)\n')),(0,r.kt)("p",null,"Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'wait_check("INST HEALTH_STATUS COLLECTS > 5", 10)\nwait_check("INST HEALTH_STATUS COLLECTS > 5", 10, type=\'RAW\')\n')),(0,r.kt)("h3",{id:"wait_check_tolerance"},"wait_check_tolerance"),(0,r.kt)("p",null,"Pauses the script for a configurable amount of time or until a converted telemetry item equals an expected value within a tolerance. On a timeout the script stops."),(0,r.kt)("p",null,"Ruby / Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'wait_check_tolerance("<Target Name> <Packet Name> <Item Name>", <Expected Value>, <Tolerance>, <Timeout>, <Polling Rate (optional)>, type)\n')),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Target Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the target of the telemetry item.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Packet Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the telemetry packet of the telemetry item.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Item Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the telemetry item.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Expected Value"),(0,r.kt)("td",{parentName:"tr",align:null},"Expected value of the telemetry item.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Tolerance"),(0,r.kt)("td",{parentName:"tr",align:null},"\xb1 Tolerance on the expected value.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Timeout"),(0,r.kt)("td",{parentName:"tr",align:null},"Timeout in seconds. Script will stop if the wait statement times out waiting for the comparison to be true.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Polling Rate"),(0,r.kt)("td",{parentName:"tr",align:null},"How often the comparison is evaluated in seconds. Defaults to 0.25 if not specified.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"type"),(0,r.kt)("td",{parentName:"tr",align:null},"Named parameter specifying the type. RAW, CONVERTED (default), FORMATTED, WITH_UNITS (Ruby symbol, Python string).")))),(0,r.kt)("p",null,"Ruby Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'wait_check_tolerance("INST HEALTH_STATUS COLLECTS", 10.0, 5.0, 10)\nwait_check_tolerance("INST HEALTH_STATUS COLLECTS", 10.0, 5.0, 10, type: :RAW)\n')),(0,r.kt)("p",null,"Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'wait_check_tolerance("INST HEALTH_STATUS COLLECTS", 10.0, 5.0, 10)\nwait_check_tolerance("INST HEALTH_STATUS COLLECTS", 10.0, 5.0, 10, type=\'RAW\')\n')),(0,r.kt)("h3",{id:"wait_check_expression"},"wait_check_expression"),(0,r.kt)("p",null,"Pauses the script until an expression is evaluated to be true or a timeout occurs. If a timeout occurs the script will stop. This method can be used to perform more complicated comparisons than using wait as shown in the example. Also see the syntax notes for ",(0,r.kt)("a",{parentName:"p",href:"#checkexpression"},"check_expression"),"."),(0,r.kt)("p",null,"Ruby / Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'wait_check_expression("<Expression>", <Timeout>, <Polling Rate (optional)>)\n')),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Expression"),(0,r.kt)("td",{parentName:"tr",align:null},"A ruby expression to evaluate.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Timeout"),(0,r.kt)("td",{parentName:"tr",align:null},"Timeout in seconds. Script will stop if the wait statement times out waiting for the comparison to be true.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Polling Rate"),(0,r.kt)("td",{parentName:"tr",align:null},"How often the comparison is evaluated in seconds. Defaults to 0.25 if not specified.")))),(0,r.kt)("p",null,"Ruby / Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},"wait_check_expression(\"tlm('INST HEALTH_STATUS COLLECTS') > 5 and tlm('INST HEALTH_STATUS TEMP1') > 25.0\", 10)\n")),(0,r.kt)("h3",{id:"wait_check_packet"},"wait_check_packet"),(0,r.kt)("p",null,"Pauses the script until a certain number of packets have been received. If a timeout occurs the script will stop."),(0,r.kt)("p",null,"Ruby / Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'wait_check_packet("<Target>", "<Packet>", <Num Packets>, <Timeout>, <Polling Rate (optional)>, quiet)\n')),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Target"),(0,r.kt)("td",{parentName:"tr",align:null},"The target name")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Packet"),(0,r.kt)("td",{parentName:"tr",align:null},"The packet name")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Num Packets"),(0,r.kt)("td",{parentName:"tr",align:null},"The number of packets to receive")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Timeout"),(0,r.kt)("td",{parentName:"tr",align:null},"Timeout in seconds. Script will stop if the wait statement times out waiting specified number of packets.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Polling Rate"),(0,r.kt)("td",{parentName:"tr",align:null},"How often the comparison is evaluated in seconds. Defaults to 0.25 if not specified.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"quiet"),(0,r.kt)("td",{parentName:"tr",align:null},"Named parameter indicating whether to log the result. Defaults to true.")))),(0,r.kt)("p",null,"Ruby / Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},"wait_check_packet('INST', 'HEALTH_STATUS', 5, 10) # Wait for 5 INST HEALTH_STATUS packets over 10s\n")),(0,r.kt)("h2",{id:"limits"},"Limits"),(0,r.kt)("p",null,"These methods deal with handling telemetry limits."),(0,r.kt)("h3",{id:"limits_enabled-limits_enabled"},"limits_enabled?, limits_enabled"),(0,r.kt)("p",null,"The limits_enabled? method returns true/false depending on whether limits are enabled for a telemetry item."),(0,r.kt)("p",null,"Ruby Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'limits_enabled?("<Target Name> <Packet Name> <Item Name>")\n')),(0,r.kt)("p",null,"Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'limits_enabled("<Target Name> <Packet Name> <Item Name>")\n')),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Target Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the target of the telemetry item.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Packet Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the telemetry packet of the telemetry item.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Item Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the telemetry item.")))),(0,r.kt)("p",null,"Ruby Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'enabled = limits_enabled?("INST HEALTH_STATUS TEMP1") #=> true or false\n')),(0,r.kt)("p",null,"Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'enabled = limits_enabled("INST HEALTH_STATUS TEMP1") #=> True or False\n')),(0,r.kt)("h3",{id:"enable_limits"},"enable_limits"),(0,r.kt)("p",null,"Enables limits monitoring for the specified telemetry item."),(0,r.kt)("p",null,"Ruby / Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'enable_limits("<Target Name> <Packet Name> <Item Name>")\n')),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Target Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the target of the telemetry item.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Packet Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the telemetry packet of the telemetry item.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Item Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the telemetry item.")))),(0,r.kt)("p",null,"Ruby / Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'enable_limits("INST HEALTH_STATUS TEMP1")\n')),(0,r.kt)("h3",{id:"disable_limits"},"disable_limits"),(0,r.kt)("p",null,"Disables limits monitoring for the specified telemetry item."),(0,r.kt)("p",null,"Ruby / Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'disable_limits("<Target Name> <Packet Name> <Item Name>")\n')),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Target Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the target of the telemetry item.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Packet Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the telemetry packet of the telemetry item.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Item Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the telemetry item.")))),(0,r.kt)("p",null,"Ruby / Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'disable_limits("INST HEALTH_STATUS TEMP1")\n')),(0,r.kt)("h3",{id:"enable_limits_group"},"enable_limits_group"),(0,r.kt)("p",null,"Enables limits monitoring on a set of telemetry items specified in a limits group."),(0,r.kt)("p",null,"Ruby / Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'enable_limits_group("<Limits Group Name>")\n')),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Limits Group Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the limits group.")))),(0,r.kt)("p",null,"Ruby / Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'enable_limits_group("SAFE_MODE")\n')),(0,r.kt)("h3",{id:"disable_limits_group"},"disable_limits_group"),(0,r.kt)("p",null,"Disables limits monitoring on a set of telemetry items specified in a limits group."),(0,r.kt)("p",null,"Ruby / Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'disable_limits_group("<Limits Group Name>")\n')),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Limits Group Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the limits group.")))),(0,r.kt)("p",null,"Ruby / Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'disable_limits_group("SAFE_MODE")\n')),(0,r.kt)("h3",{id:"get_limits_groups"},"get_limits_groups"),(0,r.kt)("p",null,"Returns the list of limits groups in the system."),(0,r.kt)("p",null,"Ruby / Python Syntax / Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},"limits_groups = get_limits_groups()\n")),(0,r.kt)("h3",{id:"set_limits_set"},"set_limits_set"),(0,r.kt)("p",null,"Sets the current limits set. The default limits set is DEFAULT."),(0,r.kt)("p",null,"Ruby / Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'set_limits_set("<Limits Set Name>")\n')),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Limits Set Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the limits set.")))),(0,r.kt)("p",null,"Ruby / Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'set_limits_set("DEFAULT")\n')),(0,r.kt)("h3",{id:"get_limits_set"},"get_limits_set"),(0,r.kt)("p",null,"Returns the name of the current limits set. The default limits set is DEFAULT."),(0,r.kt)("p",null,"Ruby / Python Syntax / Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},"limits_set = get_limits_set()\n")),(0,r.kt)("h3",{id:"get_limits_sets"},"get_limits_sets"),(0,r.kt)("p",null,"Returns the list of limits sets in the system."),(0,r.kt)("p",null,"Ruby / Python Syntax / Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},"limits_sets = get_limits_sets()\n")),(0,r.kt)("h3",{id:"get_limits"},"get_limits"),(0,r.kt)("p",null,"Returns limits settings for a telemetry point."),(0,r.kt)("p",null,"Ruby / Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},"get_limits(<Target Name>, <Packet Name>, <Item Name>, <Limits Set (optional)>)\n")),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Target Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the target of the telemetry item.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Packet Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the telemetry packet of the telemetry item.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Item Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the telemetry item.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Limits Set"),(0,r.kt)("td",{parentName:"tr",align:null},"Get the limits for a specific limits set. If not given then it defaults to returning the settings for the current limits set.")))),(0,r.kt)("p",null,"Ruby / Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},"limits_set, persistence_setting, enabled, red_low, yellow_low, yellow_high, red_high, green_low, green_high = get_limits('INST', 'HEALTH_STATUS', 'TEMP1')\n")),(0,r.kt)("h3",{id:"set_limits"},"set_limits"),(0,r.kt)("p",null,"The set_limits_method sets limits settings for a telemetry point. Note: In most cases it would be better to update your config files or use different limits sets rather than changing limits settings in realtime."),(0,r.kt)("p",null,"Ruby / Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},"set_limits(<Target Name>, <Packet Name>, <Item Name>, <Red Low>, <Yellow Low>, <Yellow High>, <Red High>, <Green Low (optional)>, <Green High (optional)>, <Limits Set (optional)>, <Persistence (optional)>, <Enabled (optional)>)\n")),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Target Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the target of the telemetry item.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Packet Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the telemetry packet of the telemetry item.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Item Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the telemetry item.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Red Low"),(0,r.kt)("td",{parentName:"tr",align:null},"Red Low setting for this limits set. Any value below this value will be make the item red.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Yellow Low"),(0,r.kt)("td",{parentName:"tr",align:null},"Yellow Low setting for this limits set. Any value below this value but greater than Red Low will be make the item yellow.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Yellow High"),(0,r.kt)("td",{parentName:"tr",align:null},"Yellow High setting for this limits set. Any value above this value but less than Red High will be make the item yellow.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Red High"),(0,r.kt)("td",{parentName:"tr",align:null},"Red High setting for this limits set. Any value above this value will be make the item red.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Green Low"),(0,r.kt)("td",{parentName:"tr",align:null},"Optional. If given, any value greater than Green Low and less than Green_High will make the item blue indicating a good operational value.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Green High"),(0,r.kt)("td",{parentName:"tr",align:null},"Optional. If given, any value greater than Green Low and less than Green_High will make the item blue indicating a good operational value.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Limits Set"),(0,r.kt)("td",{parentName:"tr",align:null},"Optional. Set the limits for a specific limits set. If not given then it defaults to setting limts for the CUSTOM limits set.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Persistence"),(0,r.kt)("td",{parentName:"tr",align:null},"Optional. Set the number of samples this item must be out of limits before changing limits state. Defaults to no change. Note: This affects all limits settings across limits sets.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Enabled"),(0,r.kt)("td",{parentName:"tr",align:null},"Optional. Whether or not limits are enabled for this item. Defaults to true. Note: This affects all limits settings across limits sets.")))),(0,r.kt)("p",null,"Ruby / Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},"set_limits('INST', 'HEALTH_STATUS', 'TEMP1', -10.0, 0.0, 50.0, 60.0, 30.0, 40.0, 'TVAC', 1, true)\n")),(0,r.kt)("h3",{id:"get_out_of_limits"},"get_out_of_limits"),(0,r.kt)("p",null,"Returns an array with the target_name, packet_name, item_name, and limits_state of all items that are out of their limits ranges."),(0,r.kt)("p",null,"Ruby / Python Syntax / Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},"out_of_limits_items = get_out_of_limits()\n")),(0,r.kt)("h3",{id:"get_overall_limits_state"},"get_overall_limits_state"),(0,r.kt)("p",null,"Returns the overall limits state for the COSMOS system. Returns 'GREEN', 'YELLOW', or 'RED'."),(0,r.kt)("p",null,"Ruby / Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},"get_overall_limits_state(<Ignored Items> (optional))\n")),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Ignored Items"),(0,r.kt)("td",{parentName:"tr",align:null},"Array of arrays with items to ignore when determining the overall limits state. [","['TARGET_NAME', 'PACKET_NAME', 'ITEM_NAME']",", ...]")))),(0,r.kt)("p",null,"Ruby / Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},"overall_limits_state = get_overall_limits_state()\noverall_limits_state = get_overall_limits_state([['INST', 'HEALTH_STATUS', 'TEMP1']])\n")),(0,r.kt)("h3",{id:"get_limits_events"},"get_limits_events"),(0,r.kt)("p",null,"Returns limits events based on an offset returned from the last time it was called."),(0,r.kt)("p",null,"Ruby / Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},"get_limits_event(<Offset>, count)\n")),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Offset"),(0,r.kt)("td",{parentName:"tr",align:null},"Offset returned by the previous call to get_limits_event. Default is nil for the initial call")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"count"),(0,r.kt)("td",{parentName:"tr",align:null},"Named parameter specifying the maximum number of limits events to return. Default is 100")))),(0,r.kt)("p",null,"Ruby / Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'events = get_limits_event()\nprint(events)\n#[["1613077715557-0",\n# {"type"=>"LIMITS_CHANGE",\n# "target_name"=>"TGT",\n# "packet_name"=>"PKT",\n# "item_name"=>"ITEM",\n# "old_limits_state"=>"YELLOW_LOW",\n# "new_limits_state"=>"RED_LOW",\n# "time_nsec"=>"1",\n# "message"=>"message"}],\n# ["1613077715557-1",\n# {"type"=>"LIMITS_CHANGE",\n# "target_name"=>"TGT",\n# "packet_name"=>"PKT",\n# "item_name"=>"ITEM",\n# "old_limits_state"=>"RED_LOW",\n# "new_limits_state"=>"YELLOW_LOW",\n# "time_nsec"=>"2",\n# "message"=>"message"}]]\n# The last offset is the first item ([0]) in the last event ([-1])\nevents = get_limits_event(events[-1][0])\nprint(events)\n#[["1613077715657-0",\n# {"type"=>"LIMITS_CHANGE",\n# ...\n')),(0,r.kt)("h2",{id:"targets"},"Targets"),(0,r.kt)("p",null,"Methods for getting knowledge about targets."),(0,r.kt)("h3",{id:"get_target_names"},"get_target_names"),(0,r.kt)("p",null,"Returns a list of the targets in the system in an array."),(0,r.kt)("p",null,"Ruby Syntax / Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},"targets = get_target_names() #=> ['INST', 'INST2', 'EXAMPLE', 'TEMPLATED']\n")),(0,r.kt)("h3",{id:"get_target"},"get_target"),(0,r.kt)("p",null,"Returns a target hash containing all the information about the target."),(0,r.kt)("p",null,"Ruby Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'get_target("<Target Name>")\n')),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Target Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the target.")))),(0,r.kt)("p",null,"Ruby Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'target = get_target("INST")\nprint(target)\n#{"name"=>"INST",\n# "folder_name"=>"INST",\n# "requires"=>[],\n# "ignored_parameters"=>\n# ["CCSDSVER",\n# "CCSDSTYPE",\n# "CCSDSSHF",\n# "CCSDSAPID",\n# "CCSDSSEQFLAGS",\n# "CCSDSSEQCNT",\n# "CCSDSLENGTH",\n# "PKTID"],\n# "ignored_items"=>\n# ["CCSDSVER",\n# "CCSDSTYPE",\n# "CCSDSSHF",\n# "CCSDSAPID",\n# "CCSDSSEQFLAGS",\n# "CCSDSSEQCNT",\n# "CCSDSLENGTH",\n# "RECEIVED_COUNT",\n# "RECEIVED_TIMESECONDS",\n# "RECEIVED_TIMEFORMATTED"],\n# "limits_groups"=>[],\n# "cmd_tlm_files"=>\n# [".../targets/INST/cmd_tlm/inst_cmds.txt",\n# ".../targets/INST/cmd_tlm/inst_tlm.txt"],\n# "cmd_unique_id_mode"=>false,\n# "tlm_unique_id_mode"=>false,\n# "id"=>nil,\n# "updated_at"=>1613077058266815900,\n# "plugin"=>nil}\n')),(0,r.kt)("h3",{id:"get_target_interfaces"},"get_target_interfaces"),(0,r.kt)("p",null,"Returns the interfaces for all targets. The return value is an array of arrays where each subarray contains the target name, and a String of all the interface names."),(0,r.kt)("p",null,"Syntax / Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'target_ints = get_target_interfaces()\ntarget_ints.each do |target_name, interfaces|\n puts "Target: #{target_name}, Interfaces: #{interfaces}"\nend\n')),(0,r.kt)("h2",{id:"interfaces"},"Interfaces"),(0,r.kt)("p",null,"These methods allow the user to manipulate COSMOS interfaces."),(0,r.kt)("h3",{id:"get_interface-since-500"},"get_interface (since 5.0.0)"),(0,r.kt)("p",null,"Returns an interface status including the as built interface and its current status (cmd/tlm counters, etc)."),(0,r.kt)("p",null,"Ruby / Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},'get_interface("<Interface Name>")\n')),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Interface Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the interface.")))),(0,r.kt)("p",null,"Ruby / Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'interface = get_interface("INST_INT")\nprint(interface)\n#{"name"=>"INST_INT",\n# "config_params"=>["interface.rb"],\n# "target_names"=>["INST"],\n# "connect_on_startup"=>true,\n# "auto_reconnect"=>true,\n# "reconnect_delay"=>5.0,\n# "disable_disconnect"=>false,\n# "options"=>[],\n# "protocols"=>[],\n# "log"=>true,\n# "log_raw"=>false,\n# "plugin"=>nil,\n# "updated_at"=>1613076213535979900,\n# "state"=>"CONNECTED",\n# "clients"=>0,\n# "txsize"=>0,\n# "rxsize"=>0,\n# "txbytes"=>0,\n# "rxbytes"=>0,\n# "txcnt"=>0,\n# "rxcnt"=>0}\n')),(0,r.kt)("h3",{id:"get_interface_names"},"get_interface_names"),(0,r.kt)("p",null,"Returns a list of the interfaces in the system in an array."),(0,r.kt)("p",null,"Ruby / Python Syntax / Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},"interface_names = get_interface_names() #=> ['INST_INT', 'INST2_INT', 'EXAMPLE_INT', 'TEMPLATED_INT']\n")),(0,r.kt)("h3",{id:"connect_interface"},"connect_interface"),(0,r.kt)("p",null,"Connects to targets associated with a COSMOS interface."),(0,r.kt)("p",null,"Ruby / Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'connect_interface("<Interface Name>", <Interface Parameters (optional)>)\n')),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Interface Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the interface.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Interface Parameters"),(0,r.kt)("td",{parentName:"tr",align:null},"Parameters used to initialize the interface. If none are given then the interface will use the parameters that were given in the server configuration file.")))),(0,r.kt)("p",null,"Ruby / Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'connect_interface("INT1")\nconnect_interface("INT1", hostname, port)\n')),(0,r.kt)("h3",{id:"disconnect_interface"},"disconnect_interface"),(0,r.kt)("p",null,"Disconnects from targets associated with a COSMOS interface."),(0,r.kt)("p",null,"Ruby / Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'disconnect_interface("<Interface Name>")\n')),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Interface Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the interface.")))),(0,r.kt)("p",null,"Ruby / Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'disconnect_interface("INT1")\n')),(0,r.kt)("h3",{id:"start_raw_logging_interface"},"start_raw_logging_interface"),(0,r.kt)("p",null,"Starts logging of raw data on one or all interfaces. This is for debugging purposes only."),(0,r.kt)("p",null,"Ruby / Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'start_raw_logging_interface("<Interface Name (optional)>")\n')),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Interface Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the Interface to command to start raw data logging. Defaults to 'ALL' which causes all interfaces that support raw data logging to start logging raw data.")))),(0,r.kt)("p",null,"Ruby / Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'start_raw_logging_interface("int1")\n')),(0,r.kt)("h3",{id:"stop_raw_logging_interface"},"stop_raw_logging_interface"),(0,r.kt)("p",null,"Stops logging of raw data on one or all interfaces. This is for debugging purposes only."),(0,r.kt)("p",null,"Ruby / Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'stop_raw_logging_interface("<Interface Name (optional)>")\n')),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Interface Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the Interface to command to stop raw data logging. Defaults to 'ALL' which causes all interfaces that support raw data logging to stop logging raw data.")))),(0,r.kt)("p",null,"Ruby / Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'stop_raw_logging_interface("int1")\n')),(0,r.kt)("h3",{id:"get_all_interface_info"},"get_all_interface_info"),(0,r.kt)("p",null,"Returns information about all interfaces. The return value is an array of arrays where each subarray contains the interface name, connection state, number of connected clients, transmit queue size, receive queue size, bytes transmitted, bytes received, command count, and telemetry count."),(0,r.kt)("p",null,"Ruby Syntax / Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'interface_info = get_all_interface_info()\ninterface_info.each do |interface_name, connection_state, num_clients, tx_q_size, rx_q_size, tx_bytes, rx_bytes, cmd_count, tlm_count|\n puts "Interface: #{interface_name}, Connection state: #{connection_state}, Num connected clients: #{num_clients}"\n puts "Transmit queue size: #{tx_q_size}, Receive queue size: #{rx_q_size}, Bytes transmitted: #{tx_bytes}, Bytes received: #{rx_bytes}"\n puts "Cmd count: #{cmd_count}, Tlm count: #{tlm_count}"\nend\n')),(0,r.kt)("p",null,"Python Syntax / Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'interface_info = get_all_interface_info()\nfor interface in interface_info():\n # [interface_name, connection_state, num_clients, tx_q_size, rx_q_size, tx_bytes, rx_bytes, cmd_count, tlm_count]\n print(f"Interface: {interface[0]}, Connection state: {interface[1]}, Num connected clients: {interface[2]}")\n print(f"Transmit queue size: {interface[3]}, Receive queue size: {interface[4]}, Bytes transmitted: {interface[5]}, Bytes received: {interface[6]}")\n print(f"Cmd count: {interface[7]}, Tlm count: {interface[8]}")\n')),(0,r.kt)("h3",{id:"map_target_to_interface"},"map_target_to_interface"),(0,r.kt)("p",null,"Map a target to an interface allowing target commands and telemetry to be processed by that interface."),(0,r.kt)("p",null,"Ruby / Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'map_target_to_interface("<Target Name>", "<Interface Name>", cmd_only, tlm_only, unmap_old)\n')),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Target Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the target")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Interface Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the interface")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"cmd_only"),(0,r.kt)("td",{parentName:"tr",align:null},"Named parameter whether to map target commands only to the interface (default: false)")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"tlm_only"),(0,r.kt)("td",{parentName:"tr",align:null},"Named parameter whether to map target telemetry only to the interface (default: false)")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"unmap_old"),(0,r.kt)("td",{parentName:"tr",align:null},"Named parameter whether remove the target from all existing interfaces (default: true)")))),(0,r.kt)("p",null,"Ruby Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'map_target_to_interface("INST", "INST_INT", unmap_old: false)\n')),(0,r.kt)("p",null,"Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'map_target_to_interface("INST", "INST_INT", unmap_old=False)\n')),(0,r.kt)("h3",{id:"interface_cmd"},"interface_cmd"),(0,r.kt)("p",null,"Send a command directly to an interface. This has no effect in the standard COSMOS interfaces but can be implemented by a custom interface to change behavior."),(0,r.kt)("p",null,"Ruby / Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'interface_cmd("<Interface Name>", "<Command Name>", "<Command Parameters>")\n')),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Interface Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the interface")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Command Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the command to send")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Command Parameters"),(0,r.kt)("td",{parentName:"tr",align:null},"Any parameters to send with the command")))),(0,r.kt)("p",null,"Ruby / Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'interface_cmd("INST", "DISABLE_CRC")\n')),(0,r.kt)("h3",{id:"interface_protocol_cmd"},"interface_protocol_cmd"),(0,r.kt)("p",null,"Send a command directly to an interface protocol. This has no effect in the standard COSMOS protocols but can be implemented by a custom protocol to change behavior."),(0,r.kt)("p",null,"Ruby / Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'interface_protocol_cmd("<Interface Name>", "<Command Name>", "<Command Parameters>")\n')),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Interface Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the interface")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Command Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the command to send")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Command Parameters"),(0,r.kt)("td",{parentName:"tr",align:null},"Any parameters to send with the command")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"read_write"),(0,r.kt)("td",{parentName:"tr",align:null},"Whether command gets send to read or write protocols. Must be one of READ, WRITE, or READ_WRITE (Ruby symbols, Python strings). The default is READ_WRITE.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"index"),(0,r.kt)("td",{parentName:"tr",align:null},"Which protocol in the stack the command should apply to. The default is -1 which applies the command to all.")))),(0,r.kt)("p",null,"Ruby Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'interface_protocol_cmd("INST", "DISABLE_CRC", read_write: :READ_WRITE, index: -1)\n')),(0,r.kt)("p",null,"Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'interface_protocol_cmd("INST", "DISABLE_CRC", read_write=\'READ_WRITE\', index=-1)\n')),(0,r.kt)("h2",{id:"routers"},"Routers"),(0,r.kt)("p",null,"These methods allow the user to manipulate COSMOS routers."),(0,r.kt)("h3",{id:"connect_router"},"connect_router"),(0,r.kt)("p",null,"Connects a COSMOS router."),(0,r.kt)("p",null,"Ruby / Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'connect_router("<Router Name>", <Router Parameters (optional)>)\n')),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Router Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the router.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Router Parameters"),(0,r.kt)("td",{parentName:"tr",align:null},"Parameters used to initialize the router. If none are given then the router will use the parameters that were given in the server configuration file.")))),(0,r.kt)("p",null,"Ruby / Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'connect_ROUTER("INST_ROUTER")\nconnect_router("INST_ROUTER", 7779, 7779, nil, 10.0, \'PREIDENTIFIED\')\n')),(0,r.kt)("h3",{id:"disconnect_router"},"disconnect_router"),(0,r.kt)("p",null,"Disconnects a COSMOS router."),(0,r.kt)("p",null,"Ruby / Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'disconnect_router("<Router Name>")\n')),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Router Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the router.")))),(0,r.kt)("p",null,"Ruby / Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'disconnect_router("INT1_ROUTER")\n')),(0,r.kt)("h3",{id:"get_router_names"},"get_router_names"),(0,r.kt)("p",null,"Returns a list of the routers in the system in an array."),(0,r.kt)("p",null,"Ruby / Python Syntax / Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},"router_names = get_router_names() #=> ['ROUTER_INT']\n")),(0,r.kt)("h3",{id:"get_router-since-500"},"get_router (since 5.0.0)"),(0,r.kt)("p",null,"Returns a router status including the as built router and its current status (cmd/tlm counters, etc)."),(0,r.kt)("p",null,"Ruby / Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'get_router("<Router Name>")\n')),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Router Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the router.")))),(0,r.kt)("p",null,"Ruby / Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'router = get_router("ROUTER_INT")\nprint(router)\n#{"name"=>"ROUTER_INT",\n# "config_params"=>["router.rb"],\n# "target_names"=>["INST"],\n# "connect_on_startup"=>true,\n# "auto_reconnect"=>true,\n# "reconnect_delay"=>5.0,\n# "disable_disconnect"=>false,\n# "options"=>[],\n# "protocols"=>[],\n# "log"=>true,\n# "log_raw"=>false,\n# "plugin"=>nil,\n# "updated_at"=>1613076213535979900,\n# "state"=>"CONNECTED",\n# "clients"=>0,\n# "txsize"=>0,\n# "rxsize"=>0,\n# "txbytes"=>0,\n# "rxbytes"=>0,\n# "txcnt"=>0,\n# "rxcnt"=>0}\n')),(0,r.kt)("h3",{id:"get_all_router_info"},"get_all_router_info"),(0,r.kt)("p",null,"Returns information about all routers. The return value is an array of arrays where each subarray contains the router name, connection state, number of connected clients, transmit queue size, receive queue size, bytes transmitted, bytes received, packets received, and packets sent."),(0,r.kt)("p",null,"Ruby Syntax / Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'router_info = get_all_router_info()\nrouter_info.each do |router_name, connection_state, num_clients, tx_q_size, rx_q_size, tx_bytes, rx_bytes, pkts_rcvd, pkts_sent|\n puts "Router: #{router_name}, Connection state: #{connection_state}, Num connected clients: #{num_clients}"\n puts "Transmit queue size: #{tx_q_size}, Receive queue size: #{rx_q_size}, Bytes transmitted: #{tx_bytes}, Bytes received: #{rx_bytes}"\n puts "Packets received: #{pkts_rcvd}, Packets sent: #{pkts_sent}"\nend\n')),(0,r.kt)("p",null,"Python Syntax / Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'router_info = get_all_router_info()\n# router_name, connection_state, num_clients, tx_q_size, rx_q_size, tx_bytes, rx_bytes, pkts_rcvd, pkts_sent\nfor router in router_info:\n print(f"Router: {router[0]}, Connection state: {router[1]}, Num connected clients: {router[2]}")\n print(f"Transmit queue size: {router[3]}, Receive queue size: {router[4]}, Bytes transmitted: {router[5]}, Bytes received: {router[6]}")\n print(f"Packets received: {router[7]}, Packets sent: {router[8]}")\n')),(0,r.kt)("h3",{id:"start_raw_logging_router"},"start_raw_logging_router"),(0,r.kt)("p",null,"Starts logging of raw data on one or all routers. This is for debugging purposes only."),(0,r.kt)("p",null,"Ruby / Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'start_raw_logging_router("<Router Name (optional)>")\n')),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Router Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the Router to command to start raw data logging. Defaults to 'ALL' which causes all routers that support raw data logging to start logging raw data.")))),(0,r.kt)("p",null,"Ruby / Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'start_raw_logging_router("router1")\n')),(0,r.kt)("h3",{id:"stop_raw_logging_router"},"stop_raw_logging_router"),(0,r.kt)("p",null,"Stops logging of raw data on one or all routers. This is for debugging purposes only."),(0,r.kt)("p",null,"Ruby / Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'stop_raw_logging_router("<Router Name (optional)>")\n')),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Router Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the Router to command to stop raw data logging. Defaults to 'ALL' which causes all routers that support raw data logging to stop logging raw data.")))),(0,r.kt)("p",null,"Ruby / Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'stop_raw_logging_router("router1")\n')),(0,r.kt)("h3",{id:"router_cmd"},"router_cmd"),(0,r.kt)("p",null,"Send a command directly to a router. This has no effect in the standard COSMOS routers but can be implemented by a custom router to change behavior."),(0,r.kt)("p",null,"Ruby / Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'router_cmd("<Router Name>", "<Command Name>", "<Command Parameters>")\n')),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Router Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the router")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Command Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the command to send")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Command Parameters"),(0,r.kt)("td",{parentName:"tr",align:null},"Any parameters to send with the command")))),(0,r.kt)("p",null,"Ruby / Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'router_cmd("INST", "DISABLE_CRC")\n')),(0,r.kt)("h3",{id:"router_protocol_cmd"},"router_protocol_cmd"),(0,r.kt)("p",null,"Send a command directly to an router protocol. This has no effect in the standard COSMOS protocols but can be implemented by a custom protocol to change behavior."),(0,r.kt)("p",null,"Ruby / Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'router_protocol_cmd("<Router Name>", "<Command Name>", "<Command Parameters>", read_write, index)\n')),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Router Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the router")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Command Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the command to send")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Command Parameters"),(0,r.kt)("td",{parentName:"tr",align:null},"Any parameters to send with the command")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"read_write"),(0,r.kt)("td",{parentName:"tr",align:null},"Whether command gets send to read or write protocols. Must be one of READ, WRITE, or READ_WRITE (Ruby symbols, Python strings). The default is READ_WRITE.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"index"),(0,r.kt)("td",{parentName:"tr",align:null},"Which protocol in the stack the command should apply to. The default is -1 which applies the command to all.")))),(0,r.kt)("p",null,"Ruby Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'router_protocol_cmd("INST", "DISABLE_CRC", read_write: :READ_WRITE, index: -1)\n')),(0,r.kt)("p",null,"Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'router_protocol_cmd("INST", "DISABLE_CRC", read_write=\'READ_WRITE\', index=-1)\n')),(0,r.kt)("h2",{id:"stashing-data"},"Stashing Data"),(0,r.kt)("p",null,"These methods allow the user to store temporary data into COSMOS and retrieve it. The storage is implemented as a key / value storage (Ruby hash or Python dict). This can be used in scripts to store information that applies across multiple scripts or multiple runs of a single script."),(0,r.kt)("h3",{id:"stash_set"},"stash_set"),(0,r.kt)("p",null,"Sets a stash item."),(0,r.kt)("p",null,"Ruby / Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'stash_set("<Stash Key>", <Stash Value>)\n')),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Stash Key"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the stash key to set")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Stash Value"),(0,r.kt)("td",{parentName:"tr",align:null},"Value to set")))),(0,r.kt)("p",null,"Ruby / Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},"stash_set('run_count', 5)\nstash_set('setpoint', 23.4)\n")),(0,r.kt)("h3",{id:"stash_get"},"stash_get"),(0,r.kt)("p",null,"Returns the specified stash item."),(0,r.kt)("p",null,"Ruby / Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'stash_get("<Stash Key>")\n')),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Stash Key"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the stash key to return")))),(0,r.kt)("p",null,"Ruby / Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},"stash_get('run_count') #=> 5\n")),(0,r.kt)("h3",{id:"stash_all"},"stash_all"),(0,r.kt)("p",null,"Returns all the stash items as a Ruby hash or Python dict."),(0,r.kt)("p",null,"Ruby Syntax / Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},"stash_all() #=> ['run_count' => 5, 'setpoint' => 23.4]\n")),(0,r.kt)("p",null,"Python Syntax / Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},"stash_all() #=> ['run_count': 5, 'setpoint': 23.4]\n")),(0,r.kt)("h3",{id:"stash_keys"},"stash_keys"),(0,r.kt)("p",null,"Returns all the stash keys."),(0,r.kt)("p",null,"Ruby / Python Syntax / Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},"stash_keys() #=> ['run_count', 'setpoint']\n")),(0,r.kt)("h3",{id:"stash_delete"},"stash_delete"),(0,r.kt)("p",null,"Deletes a stash item. Note this actions is permanent!"),(0,r.kt)("p",null,"Ruby / Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'stash_delete("<Stash Key>")\n')),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Stash Key"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the stash key to delete")))),(0,r.kt)("p",null,"Ruby / Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'stash_delete("run_count")\n')),(0,r.kt)("h2",{id:"executing-other-procedures"},"Executing Other Procedures"),(0,r.kt)("p",null,"These methods allow the user to bring in files of subroutines and execute other test procedures."),(0,r.kt)("h3",{id:"start"},"start"),(0,r.kt)("p",null,"Starts execution of another high level test procedure. No parameters can be given to high level test procedures. If parameters are necessary, then consider using a subroutine."),(0,r.kt)("p",null,"Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'start("<Procedure Filename>")\n')),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Procedure Filename"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the test procedure file. These files are normally in the procedures folder but may be anywhere in the Ruby search path. Additionally, absolute paths are supported.")))),(0,r.kt)("p",null,"Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'start("test1.rb")\n')),(0,r.kt)("h3",{id:"load_utility"},"load_utility"),(0,r.kt)("p",null,"Reads in a script file that contains useful subroutines for use in your test procedure. When these subroutines run in ScriptRunner or TestRunner, their lines will be highlighted. If you want to import subroutines but do not want their lines to be highlighted in ScriptRunner or TestRunner, use the standard Ruby 'load' or 'require' statement or Python 'import' statement."),(0,r.kt)("p",null,"Ruby / Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'load_utility("TARGET/lib/<Utility Filename>")\n')),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Utility Filename"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the script file containing subroutines including the .rb or .py extension. You need to include the full target name and path such as TARGET/lib/utility.rb")))),(0,r.kt)("p",null,"Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'load_utility("TARGET/lib/mode_changes.rb") # Ruby\nload_utility("TARGET/lib/mode_changes.py") # Python\n')),(0,r.kt)("h2",{id:"opening-closing--creating-telemetry-screens"},"Opening, Closing & Creating Telemetry Screens"),(0,r.kt)("p",null,"These methods allow the user to open, close or create unique telemetry screens from within a test procedure."),(0,r.kt)("h3",{id:"display_screen"},"display_screen"),(0,r.kt)("p",null,"Opens a telemetry screen at the specified position."),(0,r.kt)("p",null,"Ruby / Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'display_screen("<Target Name>", "<Screen Name>", <X Position (optional)>, <Y Position (optional)>)\n')),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Target Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Telemetry screen target name")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Screen Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Screen name within the specified target")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"X Position"),(0,r.kt)("td",{parentName:"tr",align:null},"X coordinate for the upper left hand corner of the screen")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Y Position"),(0,r.kt)("td",{parentName:"tr",align:null},"Y coordinate for the upper left hand corner of the screen")))),(0,r.kt)("p",null,"Ruby / Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'display_screen("INST", "ADCS", 100, 200)\n')),(0,r.kt)("h3",{id:"clear_screen"},"clear_screen"),(0,r.kt)("p",null,"Closes an open telemetry screen."),(0,r.kt)("p",null,"Ruby / Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'clear_screen("<Target Name>", "<Screen Name>")\n')),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Target Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Telemetry screen target name")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Screen Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Screen name within the specified target")))),(0,r.kt)("p",null,"Ruby / Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'clear_screen("INST", "ADCS")\n')),(0,r.kt)("h3",{id:"clear_all_screens"},"clear_all_screens"),(0,r.kt)("p",null,"Closes all open screens."),(0,r.kt)("p",null,"Ruby / Python Syntax / Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},"clear_all_screens()\n")),(0,r.kt)("h3",{id:"delete_screen"},"delete_screen"),(0,r.kt)("p",null,"Deletes an existing Telemetry Viewer screen."),(0,r.kt)("p",null,"Ruby / Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'delete_screen("<Target Name>", "<Screen Name>")\n')),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Target Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Telemetry screen target name")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Screen Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Screen name within the specified target")))),(0,r.kt)("p",null,"Ruby / Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'delete_screen("INST", "ADCS")\n')),(0,r.kt)("h3",{id:"get_screen_list"},"get_screen_list"),(0,r.kt)("p",null,"The get_screen_list returns a list of available telemetry screens."),(0,r.kt)("p",null,"Ruby / Python Syntax / Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},"get_screen_list() #=> ['INST ADCS', 'INST COMMANDING', ...]\n")),(0,r.kt)("h3",{id:"get_screen_definition"},"get_screen_definition"),(0,r.kt)("p",null,"The get_screen_definition returns the text file contents of a telemetry screen definition."),(0,r.kt)("p",null,"Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'get_screen_definition("<Target Name>", "<Screen Name>")\n')),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Target Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Telemetry screen target name")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Screen Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Screen name within the specified target")))),(0,r.kt)("p",null,"Ruby / Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'screen_definition = get_screen_definition("INST", "HS")\n')),(0,r.kt)("h3",{id:"create_screen"},"create_screen"),(0,r.kt)("p",null,"The create_screen allows you to create a screen directly from a script. This screen is saved to Telemetry Viewer for future use in that application."),(0,r.kt)("p",null,"Python / Ruby Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'create_screen("<Target Name>", "<Screen Name>" "<Definition>")\n')),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Target Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Telemetry screen target name")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Screen Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Screen name within the specified target")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Definition"),(0,r.kt)("td",{parentName:"tr",align:null},"The entire screen definition as a String")))),(0,r.kt)("p",null,"Ruby Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'screen_def = \'\n SCREEN AUTO AUTO 0.1 FIXED\n VERTICAL\n TITLE "New Screen"\n VERTICALBOX\n LABELVALUE INST HEALTH_STATUS TEMP1\n END\n END\n\'\n# Here we pass in the screen definition as a string\ncreate_screen("INST", "LOCAL", screen_def)\n')),(0,r.kt)("p",null,"Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'screen_def = \'\n SCREEN AUTO AUTO 0.1 FIXED\n VERTICAL\n TITLE "New Screen"\n VERTICALBOX\n LABELVALUE INST HEALTH_STATUS TEMP1\n END\n END\n\'\n# Here we pass in the screen definition as a string\ncreate_screen("INST", "LOCAL", screen_def)\n')),(0,r.kt)("h3",{id:"local_screen"},"local_screen"),(0,r.kt)("p",null,"The local_screen allows you to create a local screen directly from a script which is not permanently saved to the Telemetry Viewer screen list. This is useful for one off screens that help users interact with scripts."),(0,r.kt)("p",null,"Python / Ruby Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'local_screen("<Screen Name>" "<Definition>", <X Position (optional)>, <Y Position (optional)>)\n')),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Screen Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Screen name within the specified target")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Definition"),(0,r.kt)("td",{parentName:"tr",align:null},"The entire screen definition as a String")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"X Position"),(0,r.kt)("td",{parentName:"tr",align:null},"X coordinate for the upper left hand corner of the screen")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Y Position"),(0,r.kt)("td",{parentName:"tr",align:null},"Y coordinate for the upper left hand corner of the screen")))),(0,r.kt)("p",null,"NOTE: It is possible to specify a X, Y location off the visible display. If you do so and try to re-create the screen it will not display (because it is already displayed). Try issuing a ",(0,r.kt)("inlineCode",{parentName:"p"},"clear_all_screens()")," first to clear any screens off the visible display space."),(0,r.kt)("p",null,"Ruby Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'screen_def = \'\n SCREEN AUTO AUTO 0.1 FIXED\n VERTICAL\n TITLE "Local Screen"\n VERTICALBOX\n LABELVALUE INST HEALTH_STATUS TEMP1\n END\n END\n\'\n# Here we pass in the screen definition as a string\nlocal_screen("TESTING", screen_def, 600, 75)\n')),(0,r.kt)("p",null,"Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'screen_def = \'\n SCREEN AUTO AUTO 0.1 FIXED\n VERTICAL\n TITLE "Local Screen"\n VERTICALBOX\n LABELVALUE INST HEALTH_STATUS TEMP1\n END\n END\n\'\n# Here we pass in the screen definition as a string\nlocal_screen("TESTING", screen_def, 600, 75)\n')),(0,r.kt)("h2",{id:"script-runner-settings"},"Script Runner Settings"),(0,r.kt)("p",null,"These methods allow the user to control various Script Runner settings."),(0,r.kt)("h3",{id:"set_line_delay"},"set_line_delay"),(0,r.kt)("p",null,"This method sets the line delay in script runner."),(0,r.kt)("p",null,"Ruby / Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},"set_line_delay(<Delay>)\n")),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Delay"),(0,r.kt)("td",{parentName:"tr",align:null},"The amount of time script runner will wait between lines when executing a script, in seconds. Should be \u2265 0.0")))),(0,r.kt)("p",null,"Ruby / Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},"set_line_delay(0.0)\n")),(0,r.kt)("h3",{id:"get_line_delay"},"get_line_delay"),(0,r.kt)("p",null,"The method gets the line delay that script runner is currently using."),(0,r.kt)("p",null,"Ruby / Python Syntax / Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},"curr_line_delay = get_line_delay()\n")),(0,r.kt)("h3",{id:"set_max_output"},"set_max_output"),(0,r.kt)("p",null,"This method sets the maximum number of characters to display in Script Runner output before truncating. Default is 50,000 characters."),(0,r.kt)("p",null,"Ruby / Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},"set_max_output(<Characters>)\n")),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Characters"),(0,r.kt)("td",{parentName:"tr",align:null},"Number of characters to output before truncating")))),(0,r.kt)("p",null,"Ruby / Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},"set_max_output(100)\n")),(0,r.kt)("h3",{id:"get_max_output"},"get_max_output"),(0,r.kt)("p",null,"The method gets the maximum number of characters to display in Script Runner output before truncating. Default is 50,000 characters."),(0,r.kt)("p",null,"Ruby / Python Syntax / Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},"print(get_max_output()) #=> 50000\n")),(0,r.kt)("h3",{id:"disable_instrumentation"},"disable_instrumentation"),(0,r.kt)("p",null,"Disables instrumentation for a block of code (line highlighting and exception catching). This is especially useful for speeding up loops that are very slow if lines are instrumented.\nConsider breaking code like this into a seperate file and using either require/load to read the file for the same effect while still allowing errors to be caught by your script."),(0,r.kt)("admonition",{title:"Use with Caution",type:"caution"},(0,r.kt)("p",{parentName:"admonition"},"Disabling instrumentation will cause any error that occurs while disabled to cause your script to completely stop.")),(0,r.kt)("p",null,"Ruby Syntax / Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},"disable_instrumentation do\n 1000.times do\n # Don't want this to have to highlight 1000 times\n end\nend\n")),(0,r.kt)("p",null,"Python Syntax / Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},"with disable_instrumentation:\n for x in range(0:1000):\n # Don't want this to have to highlight 1000 times\n")),(0,r.kt)("h2",{id:"script-runner-suites"},"Script Runner Suites"),(0,r.kt)("p",null,"Creating Script Runner suites utilizes APIs to add groups to the defined suites. For more information please see ",(0,r.kt)("a",{parentName:"p",href:"/tools/docs/docs/tools/script-runner#running-script-suites"},"running script suites"),"."),(0,r.kt)("h3",{id:"add_group-add_group_setup-add_group_teardown-add_script"},"add_group, add_group_setup, add_group_teardown, add_script"),(0,r.kt)("p",null,"Adds a group's methods to the suite. The add_group method adds all the group methods including setup, teardown, and all the methods starting with 'script","_","' or 'test","_","'. The add_group_setup method adds just the setup method defined in the group class. The add_group_teardown method adds just the teardown method defined in the group class. The add_script method adds an individual method to the suite. NOTE: add_script can add any method including those not named with 'script","_","' or 'test","_","'."),(0,r.kt)("p",null,"Ruby / Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},"add_group(<Group Class>)\nadd_group_setup(<Group Class>)\nadd_group_teardown(<Group Class>)\nadd_script(<Group Class>, <Method>)\n")),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Group Class"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the previously defined class which inherits from the OpenC3 Group class. The Ruby API passes a String with the name of the group. The Python API passes the Group class directly.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Method"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the method in the OpenC3 Group class. The Ruby API passes a String with the name of the method. The Python API passes the Group class directly.")))),(0,r.kt)("p",null,"Ruby Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},"load 'openc3/script/suite.rb'\n\nclass ExampleGroup < OpenC3::Group\n def script_1\n # Insert test code here ...\n end\nend\nclass WrapperGroup < OpenC3::Group\n def setup\n # Insert test code here ...\n end\n def my_method\n # Insert test code here ...\n end\n def teardown\n # Insert test code here ...\n end\nend\n\nclass MySuite < OpenC3::Suite\n def initialize\n super()\n add_group('ExampleGroup')\n add_group_setup('WrapperGroup')\n add_script('WrapperGroup', 'my_method')\n add_group_teardown('WrapperGroup')\n end\nend\n")),(0,r.kt)("p",null,"Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},"from openc3.script import *\nfrom openc3.script.suite import Group, Suite\n\nclass ExampleGroup(Group):\n def script_1(self):\n # Insert test code here ...\n pass\nclass WrapperGroup(Group):\n def setup(self):\n # Insert test code here ...\n pass\n def my_method(self):\n # Insert test code here ...\n pass\n def teardown(self):\n # Insert test code here ...\n pass\nclass MySuite(Suite):\n def __init__(self):\n super().__init__()\n self.add_group(ExampleGroup)\n self.add_group_setup(WrapperGroup)\n self.add_script(WrapperGroup, 'my_method')\n self.add_group_teardown(WrapperGroup)\n")),(0,r.kt)("h2",{id:"script-runner-debugging"},"Script Runner Debugging"),(0,r.kt)("p",null,"These methods allow the user to debug scripts with ScriptRunner."),(0,r.kt)("h3",{id:"step_mode"},"step_mode"),(0,r.kt)("p",null,"Places ScriptRunner into step mode where Go must be hit to proceed to the next line."),(0,r.kt)("p",null,"Ruby / Python Syntax / Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},"step_mode()\n")),(0,r.kt)("h3",{id:"run_mode"},"run_mode"),(0,r.kt)("p",null,"Places ScriptRunner into run mode where the next line is run automatically."),(0,r.kt)("p",null,"Ruby / Python Syntax / Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},"run_mode()\n")),(0,r.kt)("h3",{id:"disconnect_script"},"disconnect_script"),(0,r.kt)("p",null,"Puts scripting into disconnect mode. In disconnect mode, commands are not sent to targets, checks are all successful, and waits expire instantly. Requests for telemetry (tlm()) typically return 0. Disconnect mode is useful for dry-running scripts without having connected targets."),(0,r.kt)("p",null,"Ruby / Python Syntax / Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},"disconnect_script()\n")),(0,r.kt)("h2",{id:"metadata"},"Metadata"),(0,r.kt)("p",null,"Metadata allows you to mark the regular target / packet data logged in COSMOS with your own fields. This metadata can then be searched and used to filter data when using other COSMOS tools."),(0,r.kt)("h3",{id:"metadata_all"},"metadata_all"),(0,r.kt)("p",null,"Returns all the metadata that was previously set"),(0,r.kt)("p",null,"Ruby / Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},"metadata_all()\n")),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"limit"),(0,r.kt)("td",{parentName:"tr",align:null},"Amount of metadata items to return. Default is 100.")))),(0,r.kt)("p",null,"Ruby Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},"metadata_all(limit: 500)\n")),(0,r.kt)("p",null,"Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},"metadata_all(limit='500')\n")),(0,r.kt)("h3",{id:"metadata_get"},"metadata_get"),(0,r.kt)("p",null,"Returns metadata that was previously set"),(0,r.kt)("p",null,"Ruby / Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},"metadata_get(start)\n")),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"start"),(0,r.kt)("td",{parentName:"tr",align:null},"Named parameter, time at which to retrieve metadata as integer seconds from epoch")))),(0,r.kt)("p",null,"Ruby Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},"metadata_get(start: 500)\n")),(0,r.kt)("p",null,"Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},"metadata_get(start='500')\n")),(0,r.kt)("h3",{id:"metadata_set"},"metadata_set"),(0,r.kt)("p",null,"Returns metadata that was previously set"),(0,r.kt)("p",null,"Ruby / Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},"metadata_set(<Metadata>, start, color)\n")),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Metadata"),(0,r.kt)("td",{parentName:"tr",align:null},"Hash or dict of key value pairs to store as metadata.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"start"),(0,r.kt)("td",{parentName:"tr",align:null},"Named parameter, time at which to store metadata. Default is now.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"color"),(0,r.kt)("td",{parentName:"tr",align:null},"Named parameter, color to display metadat in the calendar. Default is #003784.")))),(0,r.kt)("p",null,"Ruby Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},"metadata_set({ 'key' => 'value' })\nmetadata_set({ 'key' => 'value' }, color: '#ff5252')\n")),(0,r.kt)("p",null,"Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},"metadata_set({ 'key': 'value' })\nmetadata_set({ 'key': 'value' }, color='ff5252')\n")),(0,r.kt)("h3",{id:"metadata_update"},"metadata_update"),(0,r.kt)("p",null,"Updates metadata that was previously set"),(0,r.kt)("p",null,"Ruby / Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},"metadata_update(<Metadata>, start, color)\n")),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Metadata"),(0,r.kt)("td",{parentName:"tr",align:null},"Hash or dict of key value pairs to update as metadata.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"start"),(0,r.kt)("td",{parentName:"tr",align:null},"Named parameter, time at which to update metadata. Default is latest metadata.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"color"),(0,r.kt)("td",{parentName:"tr",align:null},"Named parameter, color to display metadat in the calendar. Default is #003784.")))),(0,r.kt)("p",null,"Ruby Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},"metadata_update({ 'key' => 'value' })\n")),(0,r.kt)("p",null,"Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},"metadata_update({ 'key': 'value' })\n")),(0,r.kt)("h3",{id:"metadata_input"},"metadata_input"),(0,r.kt)("p",null,"Prompts the user to set existing metadata values or create new a new one."),(0,r.kt)("p",null,"Ruby / Python Syntax / Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},"metadata_input()\n")),(0,r.kt)("h2",{id:"settings"},"Settings"),(0,r.kt)("p",null,"COSMOS has several settings typically accessed through the Admin Settings tab. These APIs allow programmatic access to those same settings."),(0,r.kt)("h3",{id:"list_settings"},"list_settings"),(0,r.kt)("p",null,"Return all the current COSMOS setting name. These are the names that should be used in the other APIs."),(0,r.kt)("p",null,"Ruby Syntax / Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'puts list_settings() #=> ["pypi_url", "rubygems_url", "source_url", "version"]\n')),(0,r.kt)("p",null,"Python Syntax / Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},"print(list_settings()) #=> ['pypi_url', 'rubygems_url', 'source_url', 'version']\n")),(0,r.kt)("h3",{id:"get_all_settings"},"get_all_settings"),(0,r.kt)("p",null,"Return all the current COSMOS settings along with their values."),(0,r.kt)("p",null,"Ruby Syntax / Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'puts get_all_settings() #=>\n# { "version"=>{"name"=>"version", "data"=>"5.11.4-beta0", "updated_at"=>1698074299509456507},\n# "pypi_url"=>{"name"=>"pypi_url", "data"=>"https://pypi.org/simple", "updated_at"=>1698026776574347007},\n# "rubygems_url"=>{"name"=>"rubygems_url", "data"=>"https://rubygems.org", "updated_at"=>1698026776574105465},\n# "source_url"=>{"name"=>"source_url", "data"=>"https://github.com/OpenC3/cosmos", "updated_at"=>1698026776573904132} }\n')),(0,r.kt)("p",null,"Python Syntax / Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},"print(get_all_settings()) #=>\n# { 'version': {'name': 'version', 'data': '5.11.4-beta0', 'updated_at': 1698074299509456507},\n# 'pypi_url': {'name': 'pypi_url', 'data': 'https://pypi.org/simple', 'updated_at': 1698026776574347007},\n# 'rubygems_url': {'name': 'rubygems_url', 'data': 'https://rubygems.org', 'updated_at': 1698026776574105465},\n# 'source_url': {'name': 'source_url', 'data': 'https://github.com/OpenC3/cosmos', 'updated_at': 1698026776573904132} }\n")),(0,r.kt)("h3",{id:"get_setting-get_settings"},"get_setting, get_settings"),(0,r.kt)("p",null,"Return the data from the given COSMOS setting. Returns nil (Ruby) or None (Python) if the setting does not exist."),(0,r.kt)("p",null,"Ruby / Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},"get_setting(<Setting Name>)\nget_settings(<Setting Name1>, <Setting Name2>, ...)\n")),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Setting Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the setting to return")))),(0,r.kt)("p",null,"Ruby Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},"puts get_setting('version') #=> \"5.11.4-beta0\"\nputs get_settings('version', 'rubygems_url') #=> [\"5.11.4-beta0\", \"https://rubygems.org\"]\n")),(0,r.kt)("p",null,"Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},"print(get_setting('version')) #=> '5.11.4-beta0'\nprint(get_setting('version', 'rubygems_url')) #=> ['5.11.4-beta0', 'https://rubygems.org']\n")),(0,r.kt)("h3",{id:"set_setting"},"set_setting"),(0,r.kt)("p",null,"Sets the given setting value."),(0,r.kt)("admonition",{title:"Admin Passwork Required",type:"note"},(0,r.kt)("p",{parentName:"admonition"},"This API is only accessible externally (not within Script Runner) and requires the admin password.")),(0,r.kt)("p",null,"Ruby / Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},"set_setting(<Setting Name>, <Setting Value>)\n")),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Setting Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the setting to change")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Setting Value"),(0,r.kt)("td",{parentName:"tr",align:null},"Setting value to set")))),(0,r.kt)("p",null,"Ruby Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},"set_setting('rubygems_url', 'https://mygemserver')\nputs get_settings('rubygems_url') #=> \"https://mygemserver\"\n")),(0,r.kt)("p",null,"Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},"set_setting('pypi_url', 'https://mypypiserver')\nprint(get_settings('pypi_url')) #=> 'https://mypypiserver'\n")),(0,r.kt)("h2",{id:"configuration"},"Configuration"),(0,r.kt)("p",null,"Many COSMOS tools have the ability to load and save a configuration. These APIs allow you to programatically load and save the configuration."),(0,r.kt)("h3",{id:"config_tool_names"},"config_tool_names"),(0,r.kt)("p",null,"List all the configuration tool names which are used as the first parameter in the other APIs."),(0,r.kt)("p",null,"Ruby Syntax / Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'names = config_tool_names()\npp names #=> ["telemetry_grapher", "data_viewer"]\n')),(0,r.kt)("p",null,"Python Syntax / Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},"names = config_tool_names()\nprint(names) #=> ['telemetry_grapher', 'data_viewer']\n")),(0,r.kt)("h3",{id:"list_configs"},"list_configs"),(0,r.kt)("p",null,"List all the saved configuration names under the given tool name."),(0,r.kt)("p",null,"Ruby / Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},"list_configs(<Tool Name>)\n")),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Tool Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the tool to retrieve configuration names from")))),(0,r.kt)("p",null,"Ruby Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},"configs = list_configs('telemetry_grapher')\npp configs #=> ['adcs', 'temps']\n")),(0,r.kt)("p",null,"Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},"configs = list_configs('telemetry_grapher')\nprint(configs) #=> ['adcs', 'temps']\n")),(0,r.kt)("h3",{id:"load_config"},"load_config"),(0,r.kt)("p",null,"Load a particular tool configuration."),(0,r.kt)("admonition",{title:"Tool Configuration",type:"note"},(0,r.kt)("p",{parentName:"admonition"},"Tool configurations are not fully documented and subject to change between releases. Only modify values returned by load_config and do not change any keys.")),(0,r.kt)("p",null,"Ruby / Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},"load_config(<Tool Name>, <Configuration Name>)\n")),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Tool Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the tool")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Configuration Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the configuration")))),(0,r.kt)("p",null,"Ruby / Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},'config = load_config(\'telemetry_grapher\', \'adcs\')\nprint(config) #=>\n# [ {\n# "items": [\n# {\n# "targetName": "INST",\n# "packetName": "ADCS",\n# "itemName": "CCSDSVER",\n# ...\n')),(0,r.kt)("h3",{id:"save_config"},"save_config"),(0,r.kt)("p",null,"Save a particular tool configuration."),(0,r.kt)("p",null,"Ruby / Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},"save_config(<Tool Name>, <Configuration Name>, local_mode)\n")),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Tool Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the tool")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Configuration Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the configuration")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"local_mode"),(0,r.kt)("td",{parentName:"tr",align:null},"Whether to save the configuration in local mode")))),(0,r.kt)("p",null,"Ruby / Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},"save_config('telemetry_grapher', 'adcs', config)\n")),(0,r.kt)("h3",{id:"delete_config"},"delete_config"),(0,r.kt)("p",null,"Delete a particular tool configuration."),(0,r.kt)("p",null,"Ruby / Python Syntax:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},"delete_config(<Tool Name>, <Configuration Name>, local_mode)\n")),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Tool Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the tool")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Configuration Name"),(0,r.kt)("td",{parentName:"tr",align:null},"Name of the configuration")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"local_mode"),(0,r.kt)("td",{parentName:"tr",align:null},"Whether to delete the configuration in local mode")))),(0,r.kt)("p",null,"Ruby / Python Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ruby"},"delete_config('telemetry_grapher', 'adcs')\n")))}d.isMDXComponent=!0},876:(e,t,a)=>{a.d(t,{Zo:()=>u,kt:()=>c});var n=a(2784);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function m(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?l(Object(a),!0).forEach((function(t){r(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):l(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}function i(e,t){if(null==e)return{};var a,n,r=function(e,t){if(null==e)return{};var a,n,r={},l=Object.keys(e);for(n=0;n<l.length;n++)a=l[n],t.indexOf(a)>=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)a=l[n],t.indexOf(a)>=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var p=n.createContext({}),o=function(e){var t=n.useContext(p),a=t;return e&&(a="function"==typeof e?e(t):m(m({},t),e)),a},u=function(e){var t=o(e.components);return n.createElement(p.Provider,{value:t},e.children)},s="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},k=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,l=e.originalType,p=e.parentName,u=i(e,["components","mdxType","originalType","parentName"]),s=o(a),k=r,c=s["".concat(p,".").concat(k)]||s[k]||d[k]||l;return a?n.createElement(c,m(m({ref:t},u),{},{components:a})):n.createElement(c,m({ref:t},u))}));function c(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=a.length,m=new Array(l);m[0]=k;var i={};for(var p in t)hasOwnProperty.call(t,p)&&(i[p]=t[p]);i.originalType=e,i[s]="string"==typeof e?e:r,m[1]=i;for(var o=2;o<l;o++)m[o]=a[o];return n.createElement.apply(null,m)}return n.createElement.apply(null,a)}k.displayName="MDXCreateElement"}}]);
|