"use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([[6885],{1140:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>d,contentTitle:()=>i,default:()=>o,frontMatter:()=>a,metadata:()=>l,toc:()=>c});var r=n(1085),s=n(1184);const a={title:"Scripting API Guide"},i=void 0,l={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/staticdocs/docs/guides/scripting-api",draft:!1,unlisted:!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/staticdocs/docs/guides/script-writing"},next:{title:"Development",permalink:"/tools/staticdocs/docs/development"}},d={},c=[{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_cmd (since 5.13.0, since 5.8.0 as build_command)",id:"build_cmd-since-5130-since-580-as-build_command",level:3},{value:"send_raw",id:"send_raw",level:3},{value:"get_all_cmds (since 5.13.0, since 5.0.0 as get_all_commands)",id:"get_all_cmds-since-5130-since-500-as-get_all_commands",level:3},{value:"get_all_cmd_names (since 5.13.0, since 5.0.6 as get_all_command_names)",id:"get_all_cmd_names-since-5130-since-506-as-get_all_command_names",level:3},{value:"get_cmd (since 5.13.0, since 5.0.0 as get_command)",id:"get_cmd-since-5130-since-500-as-get_command",level:3},{value:"get_param (since 5.13.0, since 5.0.0 as get_parameter)",id:"get_param-since-5130-since-500-as-get_parameter",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_tlm (since 5.13.0, since 5.0.0 as get_all_telemetry)",id:"get_all_tlm-since-5130-since-500-as-get_all_telemetry",level:3},{value:"get_all_tlm_names (since 5.13.0, since 5.0.6 as get_all_telemetry_names)",id:"get_all_tlm_names-since-5130-since-506-as-get_all_telemetry_names",level:3},{value:"get_tlm (since 5.13.0, since 5.0.0 as get_telemetry)",id:"get_tlm-since-5130-since-500-as-get_telemetry",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}];function h(e){const t={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,s.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.p,{children:"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."}),"\n",(0,r.jsx)(t.h2,{id:"concepts",children:"Concepts"}),"\n",(0,r.jsx)(t.h3,{id:"programming-languages",children:"Programming Languages"}),"\n",(0,r.jsxs)(t.p,{children:["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.jsx)(t.a,{href:"/tools/staticdocs/docs/guides/script-writing",children:"Script Writing Guide"}),"."]}),"\n",(0,r.jsx)(t.h3,{id:"using-script-runner",children:"Using Script Runner"}),"\n",(0,r.jsx)(t.p,{children:"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."}),"\n",(0,r.jsx)(t.p,{children:'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.'}),"\n",(0,r.jsx)(t.p,{children:"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."}),"\n",(0,r.jsx)(t.p,{children:"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."}),"\n",(0,r.jsx)(t.h3,{id:"telemetry-types",children:"Telemetry Types"}),"\n",(0,r.jsx)(t.p,{children:"There are four different ways that telemetry values can be retrieved in COSMOS. The following chart explains their differences."}),"\n",(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Telemetry Type"}),(0,r.jsx)(t.th,{children:"Description"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Raw"}),(0,r.jsx)(t.td,{children:"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.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Converted"}),(0,r.jsx)(t.td,{children:"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.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Formatted"}),(0,r.jsx)(t.td,{children:"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.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Formatted with Units"}),(0,r.jsx)(t.td,{children:"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."})]})]})]}),"\n",(0,r.jsx)(t.h2,{id:"script-runner-api",children:"Script Runner API"}),"\n",(0,r.jsx)(t.p,{children:"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."}),"\n",(0,r.jsx)(t.h3,{id:"migration-from-cosmos-v4",children:"Migration from COSMOS v4"}),"\n",(0,r.jsx)(t.p,{children:"The following API methods are either deprecated (will not be ported to COSMOS 5) or currently unimplemented (eventually will be ported to COSMOS 5):"}),"\n",(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Method"}),(0,r.jsx)(t.th,{children:"Tool"}),(0,r.jsx)(t.th,{children:"Status"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"clear"}),(0,r.jsx)(t.td,{children:"Telemetry Viewer"}),(0,r.jsx)(t.td,{children:"Deprecated, use clear_screen"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"clear_all"}),(0,r.jsx)(t.td,{children:"Telemetry Viewer"}),(0,r.jsx)(t.td,{children:"Deprecated, use clear_all_screens"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"close_local_screens"}),(0,r.jsx)(t.td,{children:"Telemetry Viewer"}),(0,r.jsx)(t.td,{children:"Deprecated, use clear_screen"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"clear_disconnected_targets"}),(0,r.jsx)(t.td,{children:"Script Runner"}),(0,r.jsx)(t.td,{children:"Deprecated"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"cmd_tlm_clear_counters"}),(0,r.jsx)(t.td,{children:"Command and Telemetry Server"}),(0,r.jsx)(t.td,{children:"Deprecated"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"cmd_tlm_reload"}),(0,r.jsx)(t.td,{children:"Command and Telemetry Server"}),(0,r.jsx)(t.td,{children:"Deprecated"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"display"}),(0,r.jsx)(t.td,{children:"Telemetry Viewer"}),(0,r.jsx)(t.td,{children:"Deprecated, use display_screen"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"get_all_packet_logger_info"}),(0,r.jsx)(t.td,{children:"Command and Telemetry Server"}),(0,r.jsx)(t.td,{children:"Deprecated"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"get_all_target_info"}),(0,r.jsx)(t.td,{children:"Command and Telemetry Server"}),(0,r.jsx)(t.td,{children:"Deprecated, use get_target_interfaces"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"get_background_tasks"}),(0,r.jsx)(t.td,{children:"Command and Telemetry Server"}),(0,r.jsx)(t.td,{children:"Deprecated"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"get_all_cmd_info"}),(0,r.jsx)(t.td,{children:"Command and Telemetry Server"}),(0,r.jsx)(t.td,{children:"Deprecated, use get_all_cmds"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"get_all_tlm_info"}),(0,r.jsx)(t.td,{children:"Command and Telemetry Server"}),(0,r.jsx)(t.td,{children:"Deprecated, use get_all_tlm"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"get_cmd_list"}),(0,r.jsx)(t.td,{children:"Command and Telemetry Server"}),(0,r.jsx)(t.td,{children:"Deprecated, use get_all_cmds"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"get_cmd_log_filename"}),(0,r.jsx)(t.td,{children:"Command and Telemetry Server"}),(0,r.jsx)(t.td,{children:"Deprecated"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"get_cmd_param_list"}),(0,r.jsx)(t.td,{children:"Command and Telemetry Server"}),(0,r.jsx)(t.td,{children:"Deprecated, use get_cmd"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"get_cmd_tlm_disconnect"}),(0,r.jsx)(t.td,{children:"Script Runner"}),(0,r.jsx)(t.td,{children:"Deprecated, use $disconnect"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"get_disconnected_targets"}),(0,r.jsx)(t.td,{children:"Script Runner"}),(0,r.jsx)(t.td,{children:"Unimplemented"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"get_interface_info"}),(0,r.jsx)(t.td,{children:"Command and Telemetry Server"}),(0,r.jsx)(t.td,{children:"Deprecated, use get_interface"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"get_interface_targets"}),(0,r.jsx)(t.td,{children:"Command and Telemetry Server"}),(0,r.jsx)(t.td,{children:"Deprecated"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"get_output_logs_filenames"}),(0,r.jsx)(t.td,{children:"Command and Telemetry Server"}),(0,r.jsx)(t.td,{children:"Deprecated"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"get_packet"}),(0,r.jsx)(t.td,{children:"Command and Telemetry Server"}),(0,r.jsx)(t.td,{children:"Deprecated, use get_packets"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"get_packet_data"}),(0,r.jsx)(t.td,{children:"Command and Telemetry Server"}),(0,r.jsx)(t.td,{children:"Deprecated, use get_packets"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"get_packet_logger_info"}),(0,r.jsx)(t.td,{children:"Command and Telemetry Server"}),(0,r.jsx)(t.td,{children:"Deprecated"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"get_packet_loggers"}),(0,r.jsx)(t.td,{children:"Command and Telemetry Server"}),(0,r.jsx)(t.td,{children:"Deprecated"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"get_replay_mode"}),(0,r.jsx)(t.td,{children:"Replay"}),(0,r.jsx)(t.td,{children:"Deprecated"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"get_router_info"}),(0,r.jsx)(t.td,{children:"Command and Telemetry Server"}),(0,r.jsx)(t.td,{children:"Deprecated, use get_router"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"get_scriptrunner_message_log_filename"}),(0,r.jsx)(t.td,{children:"Command and Telemetry Server"}),(0,r.jsx)(t.td,{children:"Deprecated"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"get_server_message"}),(0,r.jsx)(t.td,{children:"Command and Telemetry Server"}),(0,r.jsx)(t.td,{children:"Deprecated"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"get_server_message_log_filename"}),(0,r.jsx)(t.td,{children:"Command and Telemetry Server"}),(0,r.jsx)(t.td,{children:"Deprecated"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"get_server_status"}),(0,r.jsx)(t.td,{children:"Command and Telemetry Server"}),(0,r.jsx)(t.td,{children:"Deprecated"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"get_stale"}),(0,r.jsx)(t.td,{children:"Command and Telemetry Server"}),(0,r.jsx)(t.td,{children:"Deprecated"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"get_target_ignored_items"}),(0,r.jsx)(t.td,{children:"Command and Telemetry Server"}),(0,r.jsx)(t.td,{children:"Deprecated, use get_target"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"get_target_ignored_parameters"}),(0,r.jsx)(t.td,{children:"Command and Telemetry Server"}),(0,r.jsx)(t.td,{children:"Deprecated, use get_target"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"get_target_info"}),(0,r.jsx)(t.td,{children:"Command and Telemetry Server"}),(0,r.jsx)(t.td,{children:"Deprecated, use get_target"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"get_target_list"}),(0,r.jsx)(t.td,{children:"Command and Telemetry Server"}),(0,r.jsx)(t.td,{children:"Deprecated, use get_target_names"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"get_tlm_details"}),(0,r.jsx)(t.td,{children:"Command and Telemetry Server"}),(0,r.jsx)(t.td,{children:"Deprecated"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"get_tlm_item_list"}),(0,r.jsx)(t.td,{children:"Command and Telemetry Server"}),(0,r.jsx)(t.td,{children:"Deprecated"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"get_tlm_list"}),(0,r.jsx)(t.td,{children:"Command and Telemetry Server"}),(0,r.jsx)(t.td,{children:"Deprecated"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"get_tlm_log_filename"}),(0,r.jsx)(t.td,{children:"Command and Telemetry Server"}),(0,r.jsx)(t.td,{children:"Deprecated"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"interface_state"}),(0,r.jsx)(t.td,{children:"Command and Telemetry Server"}),(0,r.jsx)(t.td,{children:"Deprecated, use get_interface"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"override_tlm_raw"}),(0,r.jsx)(t.td,{children:"Command and Telemetry Server"}),(0,r.jsx)(t.td,{children:"Deprecated, use override_tlm"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"open_directory_dialog"}),(0,r.jsx)(t.td,{children:"Script Runner"}),(0,r.jsx)(t.td,{children:"Deprecated"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"replay_move_end"}),(0,r.jsx)(t.td,{children:"Replay"}),(0,r.jsx)(t.td,{children:"Deprecated"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"replay_move_index"}),(0,r.jsx)(t.td,{children:"Replay"}),(0,r.jsx)(t.td,{children:"Deprecated"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"replay_move_start"}),(0,r.jsx)(t.td,{children:"Replay"}),(0,r.jsx)(t.td,{children:"Deprecated"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"replay_play"}),(0,r.jsx)(t.td,{children:"Replay"}),(0,r.jsx)(t.td,{children:"Deprecated"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"replay_reverse_play"}),(0,r.jsx)(t.td,{children:"Replay"}),(0,r.jsx)(t.td,{children:"Deprecated"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"replay_select_file"}),(0,r.jsx)(t.td,{children:"Replay"}),(0,r.jsx)(t.td,{children:"Deprecated"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"replay_set_playback_delay"}),(0,r.jsx)(t.td,{children:"Replay"}),(0,r.jsx)(t.td,{children:"Deprecated"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"replay_status"}),(0,r.jsx)(t.td,{children:"Replay"}),(0,r.jsx)(t.td,{children:"Deprecated"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"replay_step_back"}),(0,r.jsx)(t.td,{children:"Replay"}),(0,r.jsx)(t.td,{children:"Deprecated"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"replay_step_forward"}),(0,r.jsx)(t.td,{children:"Replay"}),(0,r.jsx)(t.td,{children:"Deprecated"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"replay_stop"}),(0,r.jsx)(t.td,{children:"Replay"}),(0,r.jsx)(t.td,{children:"Deprecated"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"require_utility"}),(0,r.jsx)(t.td,{children:"Script Runner"}),(0,r.jsx)(t.td,{children:"Deprecated but exists for backwards compatibility, use load_utility"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"router_state"}),(0,r.jsx)(t.td,{children:"Command and Telemetry Server"}),(0,r.jsx)(t.td,{children:"Deprecated, use get_router"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"save_file_dialog"}),(0,r.jsx)(t.td,{children:"Script Runner"}),(0,r.jsx)(t.td,{children:"Deprecated"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"save_setting"}),(0,r.jsx)(t.td,{children:"Command and Telemetry Server"}),(0,r.jsx)(t.td,{children:"Deprecated but exists for backwards compatibility, use set_setting"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"set_cmd_tlm_disconnect"}),(0,r.jsx)(t.td,{children:"Script Runner"}),(0,r.jsx)(t.td,{children:"Deprecated, use disconnect_script"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"set_disconnected_targets"}),(0,r.jsx)(t.td,{children:"Script Runner"}),(0,r.jsx)(t.td,{children:"Unimplemented"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"set_replay_mode"}),(0,r.jsx)(t.td,{children:"Replay"}),(0,r.jsx)(t.td,{children:"Deprecated"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"set_stdout_max_lines"}),(0,r.jsx)(t.td,{children:"Script Runner"}),(0,r.jsx)(t.td,{children:"Deprecated"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"set_tlm_raw"}),(0,r.jsx)(t.td,{children:"Script Runner"}),(0,r.jsx)(t.td,{children:"Deprecated, use set_tlm"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"show_backtrace"}),(0,r.jsx)(t.td,{children:"Script Runner"}),(0,r.jsx)(t.td,{children:"Deprecated, backtrace always shown"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"shutdown_cmd_tlm"}),(0,r.jsx)(t.td,{children:"Command and Telemetry Server"}),(0,r.jsx)(t.td,{children:"Deprecated"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"start_cmd_log"}),(0,r.jsx)(t.td,{children:"Command and Telemetry Server"}),(0,r.jsx)(t.td,{children:"Deprecated"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"start_logging"}),(0,r.jsx)(t.td,{children:"Command and Telemetry Server"}),(0,r.jsx)(t.td,{children:"Deprecated"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"start_new_scriptrunner_message_log"}),(0,r.jsx)(t.td,{children:"Command and Telemetry Server"}),(0,r.jsx)(t.td,{children:"Deprecated"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"start_new_server_message_log"}),(0,r.jsx)(t.td,{children:"Command and Telemetry Server"}),(0,r.jsx)(t.td,{children:"Deprecated"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"start_tlm_log"}),(0,r.jsx)(t.td,{children:"Command and Telemetry Server"}),(0,r.jsx)(t.td,{children:"Deprecated"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"stop_background_task"}),(0,r.jsx)(t.td,{children:"Command and Telemetry Server"}),(0,r.jsx)(t.td,{children:"Deprecated"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"stop_cmd_log"}),(0,r.jsx)(t.td,{children:"Command and Telemetry Server"}),(0,r.jsx)(t.td,{children:"Deprecated"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"stop_logging"}),(0,r.jsx)(t.td,{children:"Command and Telemetry Server"}),(0,r.jsx)(t.td,{children:"Deprecated"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"stop_tlm_log"}),(0,r.jsx)(t.td,{children:"Command and Telemetry Server"}),(0,r.jsx)(t.td,{children:"Deprecated"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"subscribe_limits_events"}),(0,r.jsx)(t.td,{children:"Command and Telemetry Server"}),(0,r.jsx)(t.td,{children:"Deprecated"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"subscribe_packet_data"}),(0,r.jsx)(t.td,{children:"Command and Telemetry Server"}),(0,r.jsx)(t.td,{children:"Deprecated, use subscribe_packets"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"subscribe_server_messages"}),(0,r.jsx)(t.td,{children:"Command and Telemetry Server"}),(0,r.jsx)(t.td,{children:"Unimplemented"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"tlm_variable"}),(0,r.jsx)(t.td,{children:"Script Runner"}),(0,r.jsx)(t.td,{children:"Deprecated, use tlm() and pass type"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"unsubscribe_limits_events"}),(0,r.jsx)(t.td,{children:"Command and Telemetry Server"}),(0,r.jsx)(t.td,{children:"Deprecated"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"unsubscribe_packet_data"}),(0,r.jsx)(t.td,{children:"Command and Telemetry Server"}),(0,r.jsx)(t.td,{children:"Deprecated"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"unsubscribe_server_messages"}),(0,r.jsx)(t.td,{children:"Command and Telemetry Server"}),(0,r.jsx)(t.td,{children:"Deprecated"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"wait_raw"}),(0,r.jsx)(t.td,{children:"Script Runner"}),(0,r.jsxs)(t.td,{children:["Deprecated, use wait(..., type: ",":RAW",")"]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"wait_check_raw"}),(0,r.jsx)(t.td,{children:"Script Runner"}),(0,r.jsxs)(t.td,{children:["Deprecated, use wait_check(..., type: ",":RAW",")"]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"wait_tolerance_raw"}),(0,r.jsx)(t.td,{children:"Script Runner"}),(0,r.jsxs)(t.td,{children:["Deprecated, use wait_tolerance(..., type: ",":RAW",")"]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"wait_check_tolerance_raw"}),(0,r.jsx)(t.td,{children:"Script Runner"}),(0,r.jsxs)(t.td,{children:["Deprecated, use wait_check_tolerance(..., type: ",":RAW",")"]})]})]})]}),"\n",(0,r.jsx)(t.h2,{id:"retrieving-user-input",children:"Retrieving User Input"}),"\n",(0,r.jsx)(t.p,{children:"These methods allow the user to enter values that are needed by the script."}),"\n",(0,r.jsx)(t.h3,{id:"ask",children:"ask"}),"\n",(0,r.jsx)(t.p,{children:'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.'}),"\n",(0,r.jsx)(t.p,{children:"Ruby / Python Syntax:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:'ask("", , )\n'})}),"\n",(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Parameter"}),(0,r.jsx)(t.th,{children:"Description"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"question"}),(0,r.jsx)(t.td,{children:"Question to prompt the user with."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"blank_or_default"}),(0,r.jsx)(t.td,{children:"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.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"password"}),(0,r.jsx)(t.td,{children:"Whether to treat the entry as a password which is displayed with dots and not logged. Default is false."})]})]})]}),"\n",(0,r.jsx)(t.p,{children:"Ruby Example:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:'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'})}),"\n",(0,r.jsx)(t.p,{children:"Python Example:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-python",children:'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'})}),"\n",(0,r.jsx)(t.h3,{id:"ask_string",children:"ask_string"}),"\n",(0,r.jsx)(t.p,{children:'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.'}),"\n",(0,r.jsx)(t.p,{children:"Ruby / Python Syntax:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:'ask_string("", , )\n'})}),"\n",(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Parameter"}),(0,r.jsx)(t.th,{children:"Description"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"question"}),(0,r.jsx)(t.td,{children:"Question to prompt the user with."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"blank_or_default"}),(0,r.jsx)(t.td,{children:"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.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"password"}),(0,r.jsx)(t.td,{children:"Whether to treat the entry as a password which is displayed with dots and not logged. Default is false."})]})]})]}),"\n",(0,r.jsx)(t.p,{children:"Ruby Example:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:'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'})}),"\n",(0,r.jsx)(t.p,{children:"Python Example:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-python",children:'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'})}),"\n",(0,r.jsx)(t.h3,{id:"message_box",children:"message_box"}),"\n",(0,r.jsx)(t.h3,{id:"vertical_message_box",children:"vertical_message_box"}),"\n",(0,r.jsx)(t.h3,{id:"combo_box",children:"combo_box"}),"\n",(0,r.jsx)(t.p,{children:"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."}),"\n",(0,r.jsx)(t.p,{children:"Ruby / Python Syntax:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:'message_box("", "