OpenC3/cosmos

View on GitHub
docs/assets/js/aa6b6c1b.2b04ddf8.js

Summary

Maintainability
A
0 mins
Test Coverage
"use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([[6885],{7939:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>d,contentTitle:()=>i,default:()=>o,frontMatter:()=>a,metadata:()=>l,toc:()=>c});var r=n(4848),s=n(8453);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:"/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:"/docs/guides/script-writing"},next:{title:"Development",permalink:"/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 &amp; 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:"/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("<question>", <blank_or_default>, <password>)\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 example 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("<question>", <blank_or_default>, <password>)\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("<message>", "<button text 1>", ...)\nvertical_message_box("<message>", "<button text 1>", ...)\ncombo_box("<message>", "<selection text 1>", ...)\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:"message"}),(0,r.jsx)(t.td,{children:"Message to prompt the user with."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"button/selection text"}),(0,r.jsx)(t.td,{children:"Text for a button or selection"})]})]})]}),"\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 = 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"})}),"\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 = 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"})}),"\n",(0,r.jsx)(t.h3,{id:"get_target_file",children:"get_target_file"}),"\n",(0,r.jsx)(t.p,{children:"Return a file handle to a file in the target directory"}),"\n",(0,r.jsx)(t.p,{children:"Ruby Syntax:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:'get_target_file("<File Path>", original: false)\n'})}),"\n",(0,r.jsx)(t.p,{children:"Python Syntax:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:'get_target_file("<File Path>", original=False)\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:"path"}),(0,r.jsx)(t.td,{children:"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.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"original"}),(0,r.jsx)(t.td,{children:"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."})]})]})]}),"\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:'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'})}),"\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:'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'})}),"\n",(0,r.jsx)(t.h3,{id:"put_target_file",children:"put_target_file"}),"\n",(0,r.jsx)(t.p,{children:"Writes a file to the target directory"}),"\n",(0,r.jsx)(t.p,{children:"Ruby or Python Syntax:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:'put_target_file("<File Path>", "IO or 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:"path"}),(0,r.jsx)(t.td,{children:"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.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"data"}),(0,r.jsx)(t.td,{children:"The data can be an IO object or String"})]})]})]}),"\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:'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'})}),"\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:'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'})}),"\n",(0,r.jsx)(t.h3,{id:"delete_target_file",children:"delete_target_file"}),"\n",(0,r.jsx)(t.p,{children:"Delete a file in the target directory"}),"\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:'delete_target_file("<File Path>")\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.jsx)(t.tbody,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"path"}),(0,r.jsx)(t.td,{children:"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."})]})})]}),"\n",(0,r.jsx)(t.p,{children:"Ruby / Python Example:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:'put_target_file("INST/delete_me.txt", "to be deleted")\ndelete_target_file("INST/delete_me.txt")\n'})}),"\n",(0,r.jsx)(t.h3,{id:"open_file_dialog",children:"open_file_dialog"}),"\n",(0,r.jsx)(t.h3,{id:"open_files_dialog",children:"open_files_dialog"}),"\n",(0,r.jsx)(t.p,{children:"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."}),"\n",(0,r.jsx)(t.p,{children:"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."}),"\n",(0,r.jsx)(t.p,{children:"Ruby Syntax:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:'open_file_dialog("<title>", "<message>", filter: "<filter>")\nopen_files_dialog("<title>", "<message>", filter: "<filter>")\n'})}),"\n",(0,r.jsx)(t.p,{children:"Python Syntax:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-python",children:'open_file_dialog("<title>", "<message>", filter="<filter>")\nopen_files_dialog("<title>", "<message>", filter="<filter>")\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:"Title"}),(0,r.jsx)(t.td,{children:"The title to put on the dialog. Required."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Message"}),(0,r.jsx)(t.td,{children:"The message to display in the dialog box. Optional parameter."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"filter"}),(0,r.jsxs)(t.td,{children:['Named parameter to filter allowed file types. Optional parameter, specified as comma delimited file types, e.g. ".txt,.doc". See ',(0,r.jsx)(t.a,{href:"https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#accept",children:"https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#accept"})," for more information."]})]})]})]}),"\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:'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'})}),"\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:'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'})}),"\n",(0,r.jsx)(t.h2,{id:"providing-information-to-the-user",children:"Providing information to the user"}),"\n",(0,r.jsx)(t.p,{children:"These methods notify the user that something has occurred."}),"\n",(0,r.jsx)(t.h3,{id:"prompt",children:"prompt"}),"\n",(0,r.jsx)(t.p,{children:"Displays a message to the user and waits for them to press an ok button."}),"\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:'prompt("<message>")\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.jsx)(t.tbody,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"message"}),(0,r.jsx)(t.td,{children:"Message to prompt the user with."})]})})]}),"\n",(0,r.jsx)(t.p,{children:"Ruby / Python Example:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:'prompt("Press OK to continue")\n'})}),"\n",(0,r.jsx)(t.h2,{id:"commands",children:"Commands"}),"\n",(0,r.jsx)(t.p,{children:"These methods provide capability to send commands to a target and receive information about commands in the system."}),"\n",(0,r.jsx)(t.h3,{id:"cmd",children:"cmd"}),"\n",(0,r.jsx)(t.p,{children:"Sends a specified command."}),"\n",(0,r.jsx)(t.p,{children:"Ruby Syntax:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:'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'})}),"\n",(0,r.jsx)(t.p,{children:"Python Syntax:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-python",children:'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'})}),"\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:"Target Name"}),(0,r.jsx)(t.td,{children:"Name of the target this command is associated with."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Command Name"}),(0,r.jsx)(t.td,{children:"Name of this command. Also referred to as its mnemonic."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Param #x Name"}),(0,r.jsx)(t.td,{children:"Name of a command parameter. If there are no parameters then the 'with' keyword should not be given."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Param #x Value"}),(0,r.jsx)(t.td,{children:"Value of the command parameter. Values are automatically converted to the appropriate type."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"timeout"}),(0,r.jsx)(t.td,{children:"Optional named parameter to change the default timeout value of 5 seconds"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"log_message"}),(0,r.jsx)(t.td,{children:"Optional named parameter to prevent logging of the command"})]})]})]}),"\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:'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" })\ncmd("INST ABORT", timeout: 10, log_message: false)\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:'cmd("INST COLLECT with DURATION 10, TYPE NORMAL")\ncmd("INST", "COLLECT", { "DURATION": 10, "TYPE": "NORMAL" })\ncmd("INST ABORT", timeout=10, log_message=False)\n'})}),"\n",(0,r.jsx)(t.h3,{id:"cmd_no_range_check",children:"cmd_no_range_check"}),"\n",(0,r.jsx)(t.p,{children:"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."}),"\n",(0,r.jsx)(t.p,{children:"Ruby Syntax:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:'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'})}),"\n",(0,r.jsx)(t.p,{children:"Python Syntax:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-python",children:'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'})}),"\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:"Target Name"}),(0,r.jsx)(t.td,{children:"Name of the target this command is associated with."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Command Name"}),(0,r.jsx)(t.td,{children:"Name of this command. Also referred to as its mnemonic."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Param #x Name"}),(0,r.jsx)(t.td,{children:"Name of a command parameter. If there are no parameters then the 'with' keyword should not be given."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Param #x Value"}),(0,r.jsx)(t.td,{children:"Value of the command parameter. Values are automatically converted to the appropriate type."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"timeout"}),(0,r.jsx)(t.td,{children:"Optional named parameter to change the default timeout value of 5 seconds"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"log_message"}),(0,r.jsx)(t.td,{children:"Optional named parameter to prevent logging of the command"})]})]})]}),"\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:'cmd_no_range_check("INST COLLECT with DURATION 11, TYPE NORMAL")\ncmd_no_range_check("INST", "COLLECT", "DURATION" => 11, "TYPE" => "NORMAL")\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:'cmd_no_range_check("INST COLLECT with DURATION 11, TYPE NORMAL")\ncmd_no_range_check("INST", "COLLECT", {"DURATION": 11, "TYPE": "NORMAL"})\n'})}),"\n",(0,r.jsx)(t.h3,{id:"cmd_no_hazardous_check",children:"cmd_no_hazardous_check"}),"\n",(0,r.jsx)(t.p,{children:"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."}),"\n",(0,r.jsx)(t.p,{children:"Ruby Syntax:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:'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'})}),"\n",(0,r.jsx)(t.p,{children:"Python Syntax:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-python",children:'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'})}),"\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:"Target Name"}),(0,r.jsx)(t.td,{children:"Name of the target this command is associated with."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Command Name"}),(0,r.jsx)(t.td,{children:"Name of this command. Also referred to as its mnemonic."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Param #x Name"}),(0,r.jsx)(t.td,{children:"Name of a command parameter. If there are no parameters then the 'with' keyword should not be given."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Param #x Value"}),(0,r.jsx)(t.td,{children:"Value of the command parameter. Values are automatically converted to the appropriate type."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"timeout"}),(0,r.jsx)(t.td,{children:"Optional named parameter to change the default timeout value of 5 seconds"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"log_message"}),(0,r.jsx)(t.td,{children:"Optional named parameter to prevent logging of the command"})]})]})]}),"\n",(0,r.jsx)(t.p,{children:"Ruby / Python Example:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:'cmd_no_hazardous_check("INST CLEAR")\ncmd_no_hazardous_check("INST", "CLEAR")\n'})}),"\n",(0,r.jsx)(t.h3,{id:"cmd_no_checks",children:"cmd_no_checks"}),"\n",(0,r.jsx)(t.p,{children:"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 intentionally have invalid parameters."}),"\n",(0,r.jsx)(t.p,{children:"Ruby Syntax:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:'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'})}),"\n",(0,r.jsx)(t.p,{children:"Python Syntax:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-python",children:'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'})}),"\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:"Target Name"}),(0,r.jsx)(t.td,{children:"Name of the target this command is associated with."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Command Name"}),(0,r.jsx)(t.td,{children:"Name of this command. Also referred to as its mnemonic."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Param #x Name"}),(0,r.jsx)(t.td,{children:"Name of a command parameter. If there are no parameters then the 'with' keyword should not be given."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Param #x Value"}),(0,r.jsx)(t.td,{children:"Value of the command parameter. Values are automatically converted to the appropriate type."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"timeout"}),(0,r.jsx)(t.td,{children:"Optional named parameter to change the default timeout value of 5 seconds"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"log_message"}),(0,r.jsx)(t.td,{children:"Optional named parameter to prevent logging of the command"})]})]})]}),"\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:'cmd_no_checks("INST COLLECT with DURATION 11, TYPE SPECIAL")\ncmd_no_checks("INST", "COLLECT", "DURATION" => 11, "TYPE" => "SPECIAL")\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:'cmd_no_checks("INST COLLECT with DURATION 11, TYPE SPECIAL")\ncmd_no_checks("INST", "COLLECT", {"DURATION": 11, "TYPE": "SPECIAL"})\n'})}),"\n",(0,r.jsx)(t.h3,{id:"cmd_raw",children:"cmd_raw"}),"\n",(0,r.jsx)(t.p,{children:"Sends a specified command without running conversions."}),"\n",(0,r.jsx)(t.p,{children:"Ruby Syntax:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:'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'})}),"\n",(0,r.jsx)(t.p,{children:"Python Syntax:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-python",children:'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'})}),"\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:"Target Name"}),(0,r.jsx)(t.td,{children:"Name of the target this command is associated with."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Command Name"}),(0,r.jsx)(t.td,{children:"Name of this command. Also referred to as its mnemonic."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Param #x Name"}),(0,r.jsx)(t.td,{children:"Name of a command parameter. If there are no parameters then the 'with' keyword should not be given."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Param #x Value"}),(0,r.jsx)(t.td,{children:"Value of the command parameter. Values are automatically converted to the appropriate type."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"timeout"}),(0,r.jsx)(t.td,{children:"Optional named parameter to change the default timeout value of 5 seconds"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"log_message"}),(0,r.jsx)(t.td,{children:"Optional named parameter to prevent logging of the command"})]})]})]}),"\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:'cmd_raw("INST COLLECT with DURATION 10, TYPE 0")\ncmd_raw("INST", "COLLECT", "DURATION" => 10, "TYPE" => 0)\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:'cmd_raw("INST COLLECT with DURATION 10, TYPE 0")\ncmd_raw("INST", "COLLECT", {"DURATION": 10, "TYPE": 0})\n'})}),"\n",(0,r.jsx)(t.h3,{id:"cmd_raw_no_range_check",children:"cmd_raw_no_range_check"}),"\n",(0,r.jsx)(t.p,{children:"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."}),"\n",(0,r.jsx)(t.p,{children:"Ruby Syntax:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:'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'})}),"\n",(0,r.jsx)(t.p,{children:"Python Syntax:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-python",children:'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'})}),"\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:"Target Name"}),(0,r.jsx)(t.td,{children:"Name of the target this command is associated with."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Command Name"}),(0,r.jsx)(t.td,{children:"Name of this command. Also referred to as its mnemonic."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Param #x Name"}),(0,r.jsx)(t.td,{children:"Name of a command parameter. If there are no parameters then the 'with' keyword should not be given."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Param #x Value"}),(0,r.jsx)(t.td,{children:"Value of the command parameter. Values are automatically converted to the appropriate type."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"timeout"}),(0,r.jsx)(t.td,{children:"Optional named parameter to change the default timeout value of 5 seconds"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"log_message"}),(0,r.jsx)(t.td,{children:"Optional named parameter to prevent logging of the command"})]})]})]}),"\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:'cmd_raw_no_range_check("INST COLLECT with DURATION 11, TYPE 0")\ncmd_raw_no_range_check("INST", "COLLECT", "DURATION" => 11, "TYPE" => 0)\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:'cmd_raw_no_range_check("INST COLLECT with DURATION 11, TYPE 0")\ncmd_raw_no_range_check("INST", "COLLECT", {"DURATION": 11, "TYPE": 0})\n'})}),"\n",(0,r.jsx)(t.h3,{id:"cmd_raw_no_hazardous_check",children:"cmd_raw_no_hazardous_check"}),"\n",(0,r.jsx)(t.p,{children:"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."}),"\n",(0,r.jsx)(t.p,{children:"Ruby Syntax:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:'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'})}),"\n",(0,r.jsx)(t.p,{children:"Python Syntax:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-python",children:'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'})}),"\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:"Target Name"}),(0,r.jsx)(t.td,{children:"Name of the target this command is associated with."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Command Name"}),(0,r.jsx)(t.td,{children:"Name of this command. Also referred to as its mnemonic."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Param #x Name"}),(0,r.jsx)(t.td,{children:"Name of a command parameter. If there are no parameters then the 'with' keyword should not be given."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Param #x Value"}),(0,r.jsx)(t.td,{children:"Value of the command parameter. Values are automatically converted to the appropriate type."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"timeout"}),(0,r.jsx)(t.td,{children:"Optional named parameter to change the default timeout value of 5 seconds"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"log_message"}),(0,r.jsx)(t.td,{children:"Optional named parameter to prevent logging of the command"})]})]})]}),"\n",(0,r.jsx)(t.p,{children:"Ruby / Python Example:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:'cmd_raw_no_hazardous_check("INST CLEAR")\ncmd_raw_no_hazardous_check("INST", "CLEAR")\n'})}),"\n",(0,r.jsx)(t.h3,{id:"cmd_raw_no_checks",children:"cmd_raw_no_checks"}),"\n",(0,r.jsx)(t.p,{children:"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 intentionally have invalid parameters."}),"\n",(0,r.jsx)(t.p,{children:"Ruby Syntax:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:'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'})}),"\n",(0,r.jsx)(t.p,{children:"Python Syntax:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-python",children:'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'})}),"\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:"Target Name"}),(0,r.jsx)(t.td,{children:"Name of the target this command is associated with."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Command Name"}),(0,r.jsx)(t.td,{children:"Name of this command. Also referred to as its mnemonic."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Param #x Name"}),(0,r.jsx)(t.td,{children:"Name of a command parameter. If there are no parameters then the 'with' keyword should not be given."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Param #x Value"}),(0,r.jsx)(t.td,{children:"Value of the command parameter. Values are automatically converted to the appropriate type."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"timeout"}),(0,r.jsx)(t.td,{children:"Optional named parameter to change the default timeout value of 5 seconds"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"log_message"}),(0,r.jsx)(t.td,{children:"Optional named parameter to prevent logging of the command"})]})]})]}),"\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:'cmd_raw_no_checks("INST COLLECT with DURATION 11, TYPE 1")\ncmd_raw_no_checks("INST", "COLLECT", "DURATION" => 11, "TYPE" => 1)\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:'cmd_raw_no_checks("INST COLLECT with DURATION 11, TYPE 1")\ncmd_raw_no_checks("INST", "COLLECT", {"DURATION": 11, "TYPE": 1})\n'})}),"\n",(0,r.jsx)(t.h3,{id:"build_cmd-since-5130-since-580-as-build_command",children:"build_cmd (since 5.13.0, since 5.8.0 as build_command)"}),"\n",(0,r.jsx)(t.p,{children:"Builds a command binary string"}),"\n",(0,r.jsx)(t.p,{children:"Ruby Syntax:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:"build_cmd(<ARGS>, range_check: true, raw: false)\n"})}),"\n",(0,r.jsx)(t.p,{children:"Python Syntax:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-python",children:"build_cmd(<ARGS>, range_check=True, raw=False)\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:"ARGS"}),(0,r.jsx)(t.td,{children:"Command parameters (see cmd)"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"range_check"}),(0,r.jsx)(t.td,{children:"Whether to perform range checking on the command. Default is true."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"raw"}),(0,r.jsx)(t.td,{children:"Whether to write the command arguments as RAW or CONVERTED value. Default is CONVERTED."})]})]})]}),"\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:'x = build_cmd("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'})}),"\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:"x = build_cmd(\"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"})}),"\n",(0,r.jsx)(t.h3,{id:"send_raw",children:"send_raw"}),"\n",(0,r.jsx)(t.p,{children:"Sends raw data on an interface."}),"\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:"send_raw(<Interface Name>, <Data>)\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:"Interface Name"}),(0,r.jsx)(t.td,{children:"Name of the interface to send the raw data on."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Data"}),(0,r.jsx)(t.td,{children:"Raw ruby string of data to send."})]})]})]}),"\n",(0,r.jsx)(t.p,{children:"Ruby / Python Example:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:'send_raw("INST_INT", data)\n'})}),"\n",(0,r.jsx)(t.h3,{id:"get_all_cmds-since-5130-since-500-as-get_all_commands",children:"get_all_cmds (since 5.13.0, since 5.0.0 as get_all_commands)"}),"\n",(0,r.jsx)(t.p,{children:"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."}),"\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:'get_all_cmds("<Target Name>")\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.jsx)(t.tbody,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Target Name"}),(0,r.jsx)(t.td,{children:"Name of the target."})]})})]}),"\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:'cmd_list = get_all_cmds("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'})}),"\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:"cmd_list = get_all_cmds(\"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"})}),"\n",(0,r.jsx)(t.h3,{id:"get_all_cmd_names-since-5130-since-506-as-get_all_command_names",children:"get_all_cmd_names (since 5.13.0, since 5.0.6 as get_all_command_names)"}),"\n",(0,r.jsx)(t.p,{children:"Returns an array of the command names for a particular target."}),"\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:'get_all_cmd_names("<Target Name>")\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.jsx)(t.tbody,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Target Name"}),(0,r.jsx)(t.td,{children:"Name of the target"})]})})]}),"\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:"cmd_list = get_all_cmd_names(\"INST\")\nputs cmd_list  #=> ['ABORT', 'ARYCMD', 'ASCIICMD', ...]\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:"cmd_list = get_all_cmd_names(\"INST\")\nprint(cmd_list)  #=> ['ABORT', 'ARYCMD', 'ASCIICMD', ...]\n"})}),"\n",(0,r.jsx)(t.h3,{id:"get_cmd-since-5130-since-500-as-get_command",children:"get_cmd (since 5.13.0, since 5.0.0 as get_command)"}),"\n",(0,r.jsx)(t.p,{children:"Returns a command hash which fully describes the command packet."}),"\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:'get_cmd("<Target Name> <Packet Name>")\nget_cmd("<Target Name>", "<Packet Name>")\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:"Target Name"}),(0,r.jsx)(t.td,{children:"Name of the target."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Packet Name"}),(0,r.jsx)(t.td,{children:"Name of the packet."})]})]})]}),"\n",(0,r.jsx)(t.p,{children:"Ruby / Python Example:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:'abort_cmd = get_cmd("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'})}),"\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:"abort_cmd = get_cmd(\"INST ABORT\")\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"})}),"\n",(0,r.jsx)(t.h3,{id:"get_param-since-5130-since-500-as-get_parameter",children:"get_param (since 5.13.0, since 5.0.0 as get_parameter)"}),"\n",(0,r.jsx)(t.p,{children:"Returns a hash of the given command parameter"}),"\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:'get_param("<Target Name> <Command Name> <Parameter Name>")\nget_param("<Target Name>", "<Command Name>", "<Parameter Name>")\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:"Target Name"}),(0,r.jsx)(t.td,{children:"Name of the target."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Command Name"}),(0,r.jsx)(t.td,{children:"Name of the command."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Parameter Name"}),(0,r.jsx)(t.td,{children:"Name of the parameter."})]})]})]}),"\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:'param = get_param("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'})}),"\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:"param = get_param(\"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"})}),"\n",(0,r.jsx)(t.h3,{id:"get_cmd_buffer",children:"get_cmd_buffer"}),"\n",(0,r.jsx)(t.p,{children:"Returns a packet hash (similar to get_cmd) along with the raw packet buffer as a Ruby string."}),"\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:'buffer = get_cmd_buffer("<Target Name> <Packet Name>")[\'buffer\']\nbuffer = get_cmd_buffer("<Target Name>", "<Packet Name>")[\'buffer\']\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:"Target Name"}),(0,r.jsx)(t.td,{children:"Name of the target."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Packet Name"}),(0,r.jsx)(t.td,{children:"Name of the packet."})]})]})]}),"\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:'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'})}),"\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:"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"})}),"\n",(0,r.jsx)(t.h3,{id:"get_cmd_hazardous",children:"get_cmd_hazardous"}),"\n",(0,r.jsx)(t.p,{children:"Returns true/false indicating whether a particular command is flagged as hazardous."}),"\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:'get_cmd_hazardous("<Target Name>", "<Command Name>", <Command Params - optional>)\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:"Target Name"}),(0,r.jsx)(t.td,{children:"Name of the target."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Command Name"}),(0,r.jsx)(t.td,{children:"Name of the command."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Command Params"}),(0,r.jsx)(t.td,{children:"Hash of the parameters given to the command (optional). Note that some commands are only hazardous based on parameter states."})]})]})]}),"\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:"hazardous = get_cmd_hazardous(\"INST\", \"COLLECT\", {'TYPE' => 'SPECIAL'})\nputs hazardous  #=> 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:"hazardous = get_cmd_hazardous(\"INST\", \"COLLECT\", {'TYPE': 'SPECIAL'})\nprint(hazardous) #=> True\n"})}),"\n",(0,r.jsx)(t.h3,{id:"get_cmd_value",children:"get_cmd_value"}),"\n",(0,r.jsx)(t.p,{children:"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."}),"\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:'get_cmd_value("<Target Name>", "<Command Name>", "<Parameter Name>", <Value Type - optional>)\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:"Target Name"}),(0,r.jsx)(t.td,{children:"Name of the target."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Command Name"}),(0,r.jsx)(t.td,{children:"Name of the command."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Parameter Name"}),(0,r.jsx)(t.td,{children:"Name of the command parameter."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Value Type"}),(0,r.jsx)(t.td,{children:"Value Type to read. RAW, CONVERTED, FORMATTED, or WITH_UNITS. NOTE: Symbol in Ruby and str in Python"})]})]})]}),"\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 = get_cmd_value("INST", "COLLECT", "TEMP", :RAW)\nputs value  #=> 0.0\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 = get_cmd_value("INST", "COLLECT", "TEMP", "RAW")\nprint(value)  #=> 0.0\n'})}),"\n",(0,r.jsx)(t.h3,{id:"get_cmd_time",children:"get_cmd_time"}),"\n",(0,r.jsx)(t.p,{children:"Returns the time of the most recent command sent."}),"\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:'get_cmd_time("<Target Name - optional>", "<Command Name - optional>")\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:"Target Name"}),(0,r.jsx)(t.td,{children:"Name of the target. If not given, then the most recent command time to any target will be returned"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Command Name"}),(0,r.jsx)(t.td,{children:"Name of the command. If not given, then the most recent command time to the given target will be returned"})]})]})]}),"\n",(0,r.jsx)(t.p,{children:"Ruby / Python Example:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:'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'})}),"\n",(0,r.jsx)(t.h3,{id:"get_cmd_cnt",children:"get_cmd_cnt"}),"\n",(0,r.jsx)(t.p,{children:"Returns the number of times a specified command has been sent."}),"\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:'get_cmd_cnt("<Target Name> <Command Name>")\nget_cmd_cnt("<Target Name>", "<Command Name>")\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:"Target Name"}),(0,r.jsx)(t.td,{children:"Name of the target."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Command Name"}),(0,r.jsx)(t.td,{children:"Name of the command."})]})]})]}),"\n",(0,r.jsx)(t.p,{children:"Ruby / Python Example:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:'cmd_cnt = get_cmd_cnt("INST COLLECT") # Number of times the INST COLLECT command has been sent\n'})}),"\n",(0,r.jsx)(t.h2,{id:"handling-telemetry",children:"Handling Telemetry"}),"\n",(0,r.jsx)(t.p,{children:"These methods allow the user to interact with telemetry items."}),"\n",(0,r.jsx)(t.h3,{id:"check-check_raw-check_formatted-check_with_units",children:"check, check_raw, check_formatted, check_with_units"}),"\n",(0,r.jsx)(t.p,{children:"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 comparison 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."}),"\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:'check("<Target Name> <Packet Name> <Item Name> <Comparison - optional>")\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:"Target Name"}),(0,r.jsx)(t.td,{children:"Name of the target of the telemetry item."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Packet Name"}),(0,r.jsx)(t.td,{children:"Name of the telemetry packet of the telemetry item."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Item Name"}),(0,r.jsx)(t.td,{children:"Name of the telemetry item."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Comparison"}),(0,r.jsx)(t.td,{children:"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."})]})]})]}),"\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:'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'})}),"\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:'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'})}),"\n",(0,r.jsx)(t.h3,{id:"check_tolerance",children:"check_tolerance"}),"\n",(0,r.jsx)(t.p,{children:"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."}),"\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:'check_tolerance("<Target Name> <Packet Name> <Item Name>", <Expected Value>, <Tolerance>)\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:"Target Name"}),(0,r.jsx)(t.td,{children:"Name of the target of the telemetry item."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Packet Name"}),(0,r.jsx)(t.td,{children:"Name of the telemetry packet of the telemetry item."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Item Name"}),(0,r.jsx)(t.td,{children:"Name of the telemetry item."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Expected Value"}),(0,r.jsx)(t.td,{children:"Expected value of the telemetry item."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Tolerance"}),(0,r.jsx)(t.td,{children:"\xb1 Tolerance on the expected value."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"type"}),(0,r.jsx)(t.td,{children:"CONVERTED (default) or RAW (Ruby symbol, Python string)"})]})]})]}),"\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:'check_tolerance("INST HEALTH_STATUS COLLECTS", 10.0, 5.0)\ncheck_tolerance("INST HEALTH_STATUS TEMP1", 50000, 20000, type: :RAW)\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:'check_tolerance("INST HEALTH_STATUS COLLECTS", 10.0, 5.0)\ncheck_tolerance("INST HEALTH_STATUS TEMP1", 50000, 20000, type=\'RAW\')\n'})}),"\n",(0,r.jsx)(t.h3,{id:"check_expression",children:"check_expression"}),"\n",(0,r.jsxs)(t.p,{children:["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.jsx)(t.a,{href:"#wait_check_expression",children:"wait_check_expression"})," is a better choice than using check_expression."]}),"\n",(0,r.jsx)(t.p,{children:"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):"}),"\n",(0,r.jsx)(t.p,{children:(0,r.jsx)(t.code,{children:"check_expression(\"#{answer} == 'yes'\") # where answer contains 'yes'"})}),"\n",(0,r.jsxs)(t.p,{children:["This evaluates to ",(0,r.jsx)(t.code,{children:"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:"]}),"\n",(0,r.jsx)(t.p,{children:(0,r.jsx)(t.code,{children:"check_expression(\"'#{answer}' == 'yes'\") # where answer contains 'yes'"})}),"\n",(0,r.jsxs)(t.p,{children:["Now this evaluates to ",(0,r.jsx)(t.code,{children:"'yes' == 'yes'"})," which is true so the check passes."]}),"\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:'check_expression("<Expression>")\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.jsx)(t.tbody,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Expression"}),(0,r.jsx)(t.td,{children:"An expression to evaluate."})]})})]}),"\n",(0,r.jsx)(t.p,{children:"Ruby / Python Example:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:"check_expression(\"tlm('INST HEALTH_STATUS COLLECTS') > 5 and tlm('INST HEALTH_STATUS TEMP1') > 25.0\")\n"})}),"\n",(0,r.jsx)(t.h3,{id:"check_exception",children:"check_exception"}),"\n",(0,r.jsx)(t.p,{children:"Executes a method and expects an exception to be raised. If the method does not raise an exception, a CheckError is raised."}),"\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:'check_exception("<Method Name>", "<Method Params - optional>")\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:"Method Name"}),(0,r.jsx)(t.td,{children:"The COSMOS scripting method to execute, e.g. 'cmd', etc."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Method Params"}),(0,r.jsx)(t.td,{children:"Parameters for the method"})]})]})]}),"\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:'check_exception("cmd", "INST", "COLLECT", "TYPE" => "NORMAL")\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:'check_exception("cmd", "INST", "COLLECT", {"TYPE": "NORMAL"})\n'})}),"\n",(0,r.jsx)(t.h3,{id:"tlm-tlm_raw-tlm_formatted-tlm_with_units",children:"tlm, tlm_raw, tlm_formatted, tlm_with_units"}),"\n",(0,r.jsx)(t.p,{children:"Reads the specified form of a telemetry item."}),"\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:'tlm("<Target Name> <Packet Name> <Item Name>")\ntlm("<Target Name>", "<Packet Name>", "<Item Name>")\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:"Target Name"}),(0,r.jsx)(t.td,{children:"Name of the target of the telemetry item."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Packet Name"}),(0,r.jsx)(t.td,{children:"Name of the telemetry packet of the telemetry item."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Item Name"}),(0,r.jsx)(t.td,{children:"Name of the telemetry item."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"type"}),(0,r.jsx)(t.td,{children:"Named parameter specifying the type. RAW, CONVERTED (default), FORMATTED, WITH_UNITS (Ruby symbol, Python string)."})]})]})]}),"\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 = tlm("INST HEALTH_STATUS COLLECTS")\nvalue = 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'})}),"\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 = tlm("INST HEALTH_STATUS COLLECTS")\nvalue = 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'})}),"\n",(0,r.jsx)(t.h3,{id:"get_tlm_buffer",children:"get_tlm_buffer"}),"\n",(0,r.jsx)(t.p,{children:"Returns a packet hash (similar to get_tlm) along with the raw packet buffer."}),"\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:'buffer = get_tlm_buffer("<Target Name> <Packet Name>")[\'buffer\']\nbuffer = get_tlm_buffer("<Target Name>", "<Packet Name>")[\'buffer\']\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:"Target Name"}),(0,r.jsx)(t.td,{children:"Name of the target."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Packet Name"}),(0,r.jsx)(t.td,{children:"Name of the packet."})]})]})]}),"\n",(0,r.jsx)(t.p,{children:"Ruby / Python Example:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:"packet = get_tlm_buffer(\"INST HEALTH_STATUS\")\npacket['buffer']\n"})}),"\n",(0,r.jsx)(t.h3,{id:"get_tlm_packet",children:"get_tlm_packet"}),"\n",(0,r.jsx)(t.p,{children:"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]."}),"\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:'get_tlm_packet("<Target Name> <Packet Name>", <type>)\nget_tlm_packet("<Target Name>", "<Packet Name>", <type>)\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:"Target Name"}),(0,r.jsx)(t.td,{children:"Name of the target."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Packet Name"}),(0,r.jsx)(t.td,{children:"Name of the packet."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"type"}),(0,r.jsx)(t.td,{children:"Named parameter specifying the type. RAW, CONVERTED (default), FORMATTED, or WITH_UNITS (Ruby symbol, Python string)."})]})]})]}),"\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:'names_values_and_limits_states = get_tlm_packet("INST HEALTH_STATUS", type: :FORMATTED)\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:"names_values_and_limits_states = get_tlm_packet(\"INST HEALTH_STATUS\", type='FORMATTED')\n"})}),"\n",(0,r.jsx)(t.h3,{id:"get_tlm_values-modified-in-500",children:"get_tlm_values (modified in 5.0.0)"}),"\n",(0,r.jsx)(t.p,{children:"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."}),"\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:"values, limits_states, limits_settings, limits_set = get_tlm_values(<Items>)\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.jsx)(t.tbody,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Items"}),(0,r.jsx)(t.td,{children:"Array of strings of the form ['TGT__PKT__ITEM__TYPE', ... ]"})]})})]}),"\n",(0,r.jsx)(t.p,{children:"Ruby / Python Example:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:'values = get_tlm_values(["INST__HEALTH_STATUS__TEMP1__CONVERTED", "INST__HEALTH_STATUS__TEMP2__RAW"])\nprint(values) # [[-100.0, :RED_LOW], [0, :RED_LOW]]\n'})}),"\n",(0,r.jsx)(t.h3,{id:"get_all_tlm-since-5130-since-500-as-get_all_telemetry",children:"get_all_tlm (since 5.13.0, since 5.0.0 as get_all_telemetry)"}),"\n",(0,r.jsx)(t.p,{children:"Returns an array of all target packet hashes."}),"\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:'get_all_tlm("<Target Name>")\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.jsx)(t.tbody,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Target Name"}),(0,r.jsx)(t.td,{children:"Name of the target."})]})})]}),"\n",(0,r.jsx)(t.p,{children:"Ruby / Python Example:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:'packets = get_all_tlm("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'})}),"\n",(0,r.jsx)(t.h3,{id:"get_all_tlm_names-since-5130-since-506-as-get_all_telemetry_names",children:"get_all_tlm_names (since 5.13.0, since 5.0.6 as get_all_telemetry_names)"}),"\n",(0,r.jsx)(t.p,{children:"Returns an array of all target packet names."}),"\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:'get_all_tlm_names("<Target Name>")\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.jsx)(t.tbody,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Target Name"}),(0,r.jsx)(t.td,{children:"Name of the target"})]})})]}),"\n",(0,r.jsx)(t.p,{children:"Ruby / Python Example:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:'get_all_tlm_names("INST")  #=> ["ADCS", "HEALTH_STATUS", ...]\n'})}),"\n",(0,r.jsx)(t.h3,{id:"get_tlm-since-5130-since-500-as-get_telemetry",children:"get_tlm (since 5.13.0, since 5.0.0 as get_telemetry)"}),"\n",(0,r.jsx)(t.p,{children:"Returns a packet hash."}),"\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:'get_tlm("<Target Name> <Packet Name>")\nget_tlm("<Target Name>", "<Packet Name>")\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:"Target Name"}),(0,r.jsx)(t.td,{children:"Name of the target."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Packet Name"}),(0,r.jsx)(t.td,{children:"Name of the packet."})]})]})]}),"\n",(0,r.jsx)(t.p,{children:"Ruby / Python Example:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:'packet = get_tlm("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'})}),"\n",(0,r.jsx)(t.h3,{id:"get_item-since-500",children:"get_item (since 5.0.0)"}),"\n",(0,r.jsx)(t.p,{children:"Returns an item hash."}),"\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:'get_item("<Target Name> <Packet Name> <Item Name>")\nget_item("<Target Name>", "<Packet Name>", "<Item Name>")\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:"Target Name"}),(0,r.jsx)(t.td,{children:"Name of the target."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Packet Name"}),(0,r.jsx)(t.td,{children:"Name of the packet."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Item Name"}),(0,r.jsx)(t.td,{children:"Name of the item."})]})]})]}),"\n",(0,r.jsx)(t.p,{children:"Ruby / Python Example:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:'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'})}),"\n",(0,r.jsx)(t.h3,{id:"get_tlm_cnt",children:"get_tlm_cnt"}),"\n",(0,r.jsx)(t.p,{children:"Returns the number of times a specified telemetry packet has been received."}),"\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:'get_tlm_cnt("<Target Name> <Packet Name>")\nget_tlm_cnt("<Target Name>", "<Packet Name>")\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:"Target Name"}),(0,r.jsx)(t.td,{children:"Name of the target."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Packet Name"}),(0,r.jsx)(t.td,{children:"Name of the telemetry packet."})]})]})]}),"\n",(0,r.jsx)(t.p,{children:"Ruby / Python Example:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:'tlm_cnt = get_tlm_cnt("INST HEALTH_STATUS") # Number of times the INST HEALTH_STATUS telemetry packet has been received.\n'})}),"\n",(0,r.jsx)(t.h3,{id:"set_tlm",children:"set_tlm"}),"\n",(0,r.jsx)(t.p,{children:"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."}),"\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:'set_tlm("<Target> <Packet> <Item> = <Value>", <type>)\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:"Target"}),(0,r.jsx)(t.td,{children:"Target name"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Packet"}),(0,r.jsx)(t.td,{children:"Packet name"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Item"}),(0,r.jsx)(t.td,{children:"Item name"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Value"}),(0,r.jsx)(t.td,{children:"Value to set"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"type"}),(0,r.jsx)(t.td,{children:"Value type RAW, CONVERTED (default), FORMATTED, WITH_UNITS (Ruby symbol, Python string)"})]})]})]}),"\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:'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'})}),"\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:'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'})}),"\n",(0,r.jsx)(t.h3,{id:"inject_tlm",children:"inject_tlm"}),"\n",(0,r.jsx)(t.p,{children:"Injects a packet into the system as if it was received from an interface."}),"\n",(0,r.jsx)(t.p,{children:"Ruby / Packet Syntax:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:'inject_tlm("<target_name>", "<packet_name>", <item_hash>, <type>)\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:"Target"}),(0,r.jsx)(t.td,{children:"Target name"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Packet"}),(0,r.jsx)(t.td,{children:"Packet name"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Item Hash"}),(0,r.jsx)(t.td,{children:"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.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"type"}),(0,r.jsx)(t.td,{children:"Type of values in the item hash, RAW, CONVERTED (default), FORMATTED, WITH_UNITS (Ruby symbol, Python string)"})]})]})]}),"\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:"inject_tlm(\"INST\", \"PARAMS\", {'VALUE1' => 5.0, 'VALUE2' => 7.0})\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:"inject_tlm(\"INST\", \"PARAMS\", {'VALUE1': 5.0, 'VALUE2': 7.0})\n"})}),"\n",(0,r.jsx)(t.h3,{id:"override_tlm",children:"override_tlm"}),"\n",(0,r.jsx)(t.p,{children:"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."}),"\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:'override_tlm("<Target> <Packet> <Item> = <Value>", <type>)\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:"Target"}),(0,r.jsx)(t.td,{children:"Target name"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Packet"}),(0,r.jsx)(t.td,{children:"Packet name"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Item"}),(0,r.jsx)(t.td,{children:"Item name"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Value"}),(0,r.jsx)(t.td,{children:"Value to set"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"type"}),(0,r.jsx)(t.td,{children:"Type to override, ALL (default), RAW, CONVERTED, FORMATTED, WITH_UNITS (Ruby symbol, Python string)"})]})]})]}),"\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:'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'})}),"\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:'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'})}),"\n",(0,r.jsx)(t.h3,{id:"normalize_tlm",children:"normalize_tlm"}),"\n",(0,r.jsx)(t.p,{children:"Clears the override of a telmetry point in the Command and Telemetry Server."}),"\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:'normalize_tlm("<Target> <Packet> <Item>", <type>)\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:"Target"}),(0,r.jsx)(t.td,{children:"Target name"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Packet"}),(0,r.jsx)(t.td,{children:"Packet name"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Item"}),(0,r.jsx)(t.td,{children:"Item name"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"type"}),(0,r.jsx)(t.td,{children:"Type to normalize, ALL (default), RAW, CONVERTED, FORMATTED, WITH_UNITS (Ruby symbol, Python string)"})]})]})]}),"\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:'normalize_tlm("INST HEALTH_STATUS TEMP1") # clear all overrides\nnormalize_tlm("INST HEALTH_STATUS TEMP1", type: :RAW) # clear only the RAW override\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:'normalize_tlm("INST HEALTH_STATUS TEMP1") # clear all overrides\nnormalize_tlm("INST HEALTH_STATUS TEMP1", type=\'RAW\') # clear only the RAW override\n'})}),"\n",(0,r.jsx)(t.h3,{id:"get_overrides",children:"get_overrides"}),"\n",(0,r.jsx)(t.p,{children:"Returns an array of the the currently overridden values set by override_tlm. NOTE: This returns all the value types that are overridden which by default is all 4 values types when using override_tlm."}),"\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:"get_overrides()\n"})}),"\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:'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'})}),"\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:"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"})}),"\n",(0,r.jsx)(t.h2,{id:"packet-data-subscriptions",children:"Packet Data Subscriptions"}),"\n",(0,r.jsx)(t.p,{children:"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."}),"\n",(0,r.jsx)(t.h3,{id:"subscribe_packets-since-503",children:"subscribe_packets (since 5.0.3)"}),"\n",(0,r.jsx)(t.p,{children:"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."}),"\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:"subscribe_packets(packets)\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.jsx)(t.tbody,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"packets"}),(0,r.jsx)(t.td,{children:"Nested array of target name/packet name pairs that the user wishes to subscribe to."})]})})]}),"\n",(0,r.jsx)(t.p,{children:"Ruby / Python Example:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:"id = subscribe_packets([['INST', 'HEALTH_STATUS'], ['INST', 'ADCS']])\n"})}),"\n",(0,r.jsx)(t.h3,{id:"get_packets-since-503",children:"get_packets (since 5.0.3)"}),"\n",(0,r.jsx)(t.p,{children:"Streams packet data from a previous subscription."}),"\n",(0,r.jsx)(t.p,{children:"Ruby Syntax:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:"get_packets(id, block: nil, count: 1000)\n"})}),"\n",(0,r.jsx)(t.p,{children:"Python Syntax:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-python",children:"get_packets(id, block=None, count=1000)\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:"id"}),(0,r.jsx)(t.td,{children:"Unique id returned by subscribe_packets"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"block"}),(0,r.jsx)(t.td,{children:"Number of milliseconds to block while waiting for packets form ANY stream, default nil / None (do not block)"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"count"}),(0,r.jsx)(t.td,{children:"Maximum number of packets to return from EACH packet stream"})]})]})]}),"\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:"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"})}),"\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:"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"})}),"\n",(0,r.jsx)(t.h3,{id:"get_tlm_cnt-1",children:"get_tlm_cnt"}),"\n",(0,r.jsx)(t.p,{children:"Get the receive count for a telemetry packet"}),"\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:'get_tlm_cnt("<Target> <Packet>")\nget_tlm_cnt("<Target>", "<Packet>")\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:"Target"}),(0,r.jsx)(t.td,{children:"Target name"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Packet"}),(0,r.jsx)(t.td,{children:"Packet name"})]})]})]}),"\n",(0,r.jsx)(t.p,{children:"Ruby / Python Example:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:'get_tlm_cnt("INST HEALTH_STATUS")  #=> 10\n'})}),"\n",(0,r.jsx)(t.h3,{id:"get_tlm_cnts",children:"get_tlm_cnts"}),"\n",(0,r.jsx)(t.p,{children:"Get the receive counts for an array of telemetry packets"}),"\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:'get_tlm_cnts([["<Target>", "<Packet>"], ["<Target>", "<Packet>"]])\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:"Target"}),(0,r.jsx)(t.td,{children:"Target name"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Packet"}),(0,r.jsx)(t.td,{children:"Packet name"})]})]})]}),"\n",(0,r.jsx)(t.p,{children:"Ruby / Python Example:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:'get_tlm_cnts([["INST", "ADCS"], ["INST", "HEALTH_STATUS"]])  #=> [100, 10]\n'})}),"\n",(0,r.jsx)(t.h3,{id:"get_packet_derived_items",children:"get_packet_derived_items"}),"\n",(0,r.jsx)(t.p,{children:"Get the list of derived telemetry items for a packet"}),"\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:'get_packet_derived_items("<Target> <Packet>")\nget_packet_derived_items("<Target>", "<Packet>")\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:"Target"}),(0,r.jsx)(t.td,{children:"Target name"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Packet"}),(0,r.jsx)(t.td,{children:"Packet name"})]})]})]}),"\n",(0,r.jsx)(t.p,{children:"Ruby / Python Example:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:"get_packet_derived_items(\"INST HEALTH_STATUS\")  #=> ['PACKET_TIMESECONDS', 'PACKET_TIMEFORMATTED', ...]\n"})}),"\n",(0,r.jsx)(t.h2,{id:"delays",children:"Delays"}),"\n",(0,r.jsx)(t.p,{children:"These methods allow the user to pause the script to wait for telemetry to change or for an amount of time to pass."}),"\n",(0,r.jsx)(t.h3,{id:"wait",children:"wait"}),"\n",(0,r.jsx)(t.p,{children:"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."}),"\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:"elapsed = wait() #=> Returns the actual time waited\nelapsed = wait(<Time>) #=> Returns the actual time waited\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.jsx)(t.tbody,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Time"}),(0,r.jsx)(t.td,{children:"Time in Seconds to delay for."})]})})]}),"\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:'# Returns true or false based on the whether the expression is true or false\nsuccess = wait("<Target Name> <Packet Name> <Item Name> <Comparison>", <Timeout>, <Polling Rate (optional)>, type, quiet)\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:"Target Name"}),(0,r.jsx)(t.td,{children:"Name of the target of the telemetry item."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Packet Name"}),(0,r.jsx)(t.td,{children:"Name of the telemetry packet of the telemetry item."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Item Name"}),(0,r.jsx)(t.td,{children:"Name of the telemetry item."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Comparison"}),(0,r.jsx)(t.td,{children:"A comparison to perform against the telemetry item."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Timeout"}),(0,r.jsx)(t.td,{children:"Timeout in seconds. Script will proceed if the wait statement times out waiting for the comparison to be true."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Polling Rate"}),(0,r.jsx)(t.td,{children:"How often the comparison is evaluated in seconds. Defaults to 0.25 if not specified."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"type"}),(0,r.jsx)(t.td,{children:"Named parameter specifying the type. RAW, CONVERTED (default), FORMATTED, WITH_UNITS (Ruby symbol, Python string)."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"quiet"}),(0,r.jsx)(t.td,{children:"Named parameter indicating whether to log the result. Defaults to true."})]})]})]}),"\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:'elapsed = wait\nelapsed = wait 5\nsuccess = wait("INST HEALTH_STATUS COLLECTS == 3", 10)\nsuccess = wait("INST HEALTH_STATUS COLLECTS == 3", 10, type: :RAW, quiet: false)\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:'elapsed = wait()\nelapsed = wait(5)\nsuccess = wait("INST HEALTH_STATUS COLLECTS == 3", 10)\nsuccess = wait("INST HEALTH_STATUS COLLECTS == 3", 10, type=\'RAW\', quiet=False)\n'})}),"\n",(0,r.jsx)(t.h3,{id:"wait_tolerance",children:"wait_tolerance"}),"\n",(0,r.jsx)(t.p,{children:"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."}),"\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:'# Returns true or false based on the whether the expression is true or false\nsuccess = wait_tolerance("<Target Name> <Packet Name> <Item Name>", <Expected Value>, <Tolerance>, <Timeout>, <Polling Rate (optional), type, quiet>)\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:"Target Name"}),(0,r.jsx)(t.td,{children:"Name of the target of the telemetry item."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Packet Name"}),(0,r.jsx)(t.td,{children:"Name of the telemetry packet of the telemetry item."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Item Name"}),(0,r.jsx)(t.td,{children:"Name of the telemetry item."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Expected Value"}),(0,r.jsx)(t.td,{children:"Expected value of the telemetry item."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Tolerance"}),(0,r.jsx)(t.td,{children:"\xb1 Tolerance on the expected value."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Timeout"}),(0,r.jsx)(t.td,{children:"Timeout in seconds. Script will proceed if the wait statement times out waiting for the comparison to be true."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Polling Rate"}),(0,r.jsx)(t.td,{children:"How often the comparison is evaluated in seconds. Defaults to 0.25 if not specified."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"type"}),(0,r.jsx)(t.td,{children:"Named parameter specifying the type. RAW, CONVERTED (default), FORMATTED, WITH_UNITS (Ruby symbol, Python string)."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"quiet"}),(0,r.jsx)(t.td,{children:"Named parameter indicating whether to log the result. Defaults to true."})]})]})]}),"\n",(0,r.jsx)(t.p,{children:"Ruby Examples:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:'success = wait_tolerance("INST HEALTH_STATUS COLLECTS", 10.0, 5.0, 10)\nsuccess = wait_tolerance("INST HEALTH_STATUS COLLECTS", 10.0, 5.0, 10, type: :RAW, quiet: true)\n'})}),"\n",(0,r.jsx)(t.p,{children:"Python Examples:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-python",children:'success = wait_tolerance("INST HEALTH_STATUS COLLECTS", 10.0, 5.0, 10)\nsuccess = wait_tolerance("INST HEALTH_STATUS COLLECTS", 10.0, 5.0, 10, type=\'RAW\', quiet=True)\n'})}),"\n",(0,r.jsx)(t.h3,{id:"wait_expression",children:"wait_expression"}),"\n",(0,r.jsxs)(t.p,{children:["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.jsx)(t.a,{href:"#wait_check_expression",children:"wait_check_expression"})," is a better choice."]}),"\n",(0,r.jsx)(t.p,{children:"Syntax:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:'# Returns true or false based on the whether the expression is true or false\nsuccess = wait_expression("<Expression>", <Timeout>, <Polling Rate (optional)>, quiet)\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:"Expression"}),(0,r.jsx)(t.td,{children:"A ruby expression to evaluate."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Timeout"}),(0,r.jsx)(t.td,{children:"Timeout in seconds. Script will proceed if the wait statement times out waiting for the comparison to be true."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Polling Rate"}),(0,r.jsx)(t.td,{children:"How often the comparison is evaluated in seconds. Defaults to 0.25 if not specified."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"quiet"}),(0,r.jsx)(t.td,{children:"Named parameter indicating whether to log the result. Defaults to true."})]})]})]}),"\n",(0,r.jsx)(t.p,{children:"Ruby / Python Example:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:"success = wait_expression(\"tlm('INST HEALTH_STATUS COLLECTS') > 5 and tlm('INST HEALTH_STATUS TEMP1') > 25.0\", 10)\n"})}),"\n",(0,r.jsx)(t.h3,{id:"wait_packet",children:"wait_packet"}),"\n",(0,r.jsx)(t.p,{children:"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."}),"\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:'# Returns true or false based on the whether the packet was received\nsuccess = wait_packet("<Target>", "<Packet>", <Num Packets>, <Timeout>, <Polling Rate (optional)>, quiet)\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:"Target"}),(0,r.jsx)(t.td,{children:"The target name"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Packet"}),(0,r.jsx)(t.td,{children:"The packet name"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Num Packets"}),(0,r.jsx)(t.td,{children:"The number of packets to receive"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Timeout"}),(0,r.jsx)(t.td,{children:"Timeout in seconds."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Polling Rate"}),(0,r.jsx)(t.td,{children:"How often the comparison is evaluated in seconds. Defaults to 0.25 if not specified."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"quiet"}),(0,r.jsx)(t.td,{children:"Named parameter indicating whether to log the result. Defaults to true."})]})]})]}),"\n",(0,r.jsx)(t.p,{children:"Ruby / Python Example:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:"success = wait_packet('INST', 'HEALTH_STATUS', 5, 10) # Wait for 5 INST HEALTH_STATUS packets over 10s\n"})}),"\n",(0,r.jsx)(t.h3,{id:"wait_check",children:"wait_check"}),"\n",(0,r.jsx)(t.p,{children:"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."}),"\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:'# Returns the amount of time elapsed waiting for the expression\nelapsed = wait_check("<Target Name> <Packet Name> <Item Name> <Comparison>", <Timeout>, <Polling Rate (optional)>, type)\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:"Target Name"}),(0,r.jsx)(t.td,{children:"Name of the target of the telemetry item."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Packet Name"}),(0,r.jsx)(t.td,{children:"Name of the telemetry packet of the telemetry item."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Item Name"}),(0,r.jsx)(t.td,{children:"Name of the telemetry item."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Comparison"}),(0,r.jsx)(t.td,{children:"A comparison to perform against the telemetry item."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Timeout"}),(0,r.jsx)(t.td,{children:"Timeout in seconds. Script will stop if the wait statement times out waiting for the comparison to be true."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Polling Rate"}),(0,r.jsx)(t.td,{children:"How often the comparison is evaluated in seconds. Defaults to 0.25 if not specified."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"type"}),(0,r.jsx)(t.td,{children:"Named parameter specifying the type. RAW, CONVERTED (default), FORMATTED, WITH_UNITS (Ruby symbol, Python string)."})]})]})]}),"\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:'elapsed = wait_check("INST HEALTH_STATUS COLLECTS > 5", 10)\nelapsed = wait_check("INST HEALTH_STATUS COLLECTS > 5", 10, type: :RAW)\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:'elapsed = wait_check("INST HEALTH_STATUS COLLECTS > 5", 10)\nelapsed = wait_check("INST HEALTH_STATUS COLLECTS > 5", 10, type=\'RAW\')\n'})}),"\n",(0,r.jsx)(t.h3,{id:"wait_check_tolerance",children:"wait_check_tolerance"}),"\n",(0,r.jsx)(t.p,{children:"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."}),"\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:'# Returns the amount of time elapsed waiting for the expression\nelapsed = wait_check_tolerance("<Target Name> <Packet Name> <Item Name>", <Expected Value>, <Tolerance>, <Timeout>, <Polling Rate (optional)>, type)\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:"Target Name"}),(0,r.jsx)(t.td,{children:"Name of the target of the telemetry item."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Packet Name"}),(0,r.jsx)(t.td,{children:"Name of the telemetry packet of the telemetry item."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Item Name"}),(0,r.jsx)(t.td,{children:"Name of the telemetry item."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Expected Value"}),(0,r.jsx)(t.td,{children:"Expected value of the telemetry item."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Tolerance"}),(0,r.jsx)(t.td,{children:"\xb1 Tolerance on the expected value."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Timeout"}),(0,r.jsx)(t.td,{children:"Timeout in seconds. Script will stop if the wait statement times out waiting for the comparison to be true."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Polling Rate"}),(0,r.jsx)(t.td,{children:"How often the comparison is evaluated in seconds. Defaults to 0.25 if not specified."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"type"}),(0,r.jsx)(t.td,{children:"Named parameter specifying the type. RAW, CONVERTED (default), FORMATTED, WITH_UNITS (Ruby symbol, Python string)."})]})]})]}),"\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:'elapsed = wait_check_tolerance("INST HEALTH_STATUS COLLECTS", 10.0, 5.0, 10)\nelapsed = wait_check_tolerance("INST HEALTH_STATUS COLLECTS", 10.0, 5.0, 10, type: :RAW)\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:'elapsed = wait_check_tolerance("INST HEALTH_STATUS COLLECTS", 10.0, 5.0, 10)\nelapsed = wait_check_tolerance("INST HEALTH_STATUS COLLECTS", 10.0, 5.0, 10, type=\'RAW\')\n'})}),"\n",(0,r.jsx)(t.h3,{id:"wait_check_expression",children:"wait_check_expression"}),"\n",(0,r.jsxs)(t.p,{children:["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.jsx)(t.a,{href:"#check_expression",children:"check_expression"}),"."]}),"\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:'# Returns the amount of time elapsed waiting for the expression\nelapsed = wait_check_expression("<Expression>", <Timeout>, <Polling Rate (optional)>)\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:"Expression"}),(0,r.jsx)(t.td,{children:"A ruby expression to evaluate."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Timeout"}),(0,r.jsx)(t.td,{children:"Timeout in seconds. Script will stop if the wait statement times out waiting for the comparison to be true."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Polling Rate"}),(0,r.jsx)(t.td,{children:"How often the comparison is evaluated in seconds. Defaults to 0.25 if not specified."})]})]})]}),"\n",(0,r.jsx)(t.p,{children:"Ruby / Python Example:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:"elapsed = wait_check_expression(\"tlm('INST HEALTH_STATUS COLLECTS') > 5 and tlm('INST HEALTH_STATUS TEMP1') > 25.0\", 10)\n"})}),"\n",(0,r.jsx)(t.h3,{id:"wait_check_packet",children:"wait_check_packet"}),"\n",(0,r.jsx)(t.p,{children:"Pauses the script until a certain number of packets have been received. If a timeout occurs the script will stop."}),"\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:'# Returns the amount of time elapsed waiting for the packets\nelapsed = wait_check_packet("<Target>", "<Packet>", <Num Packets>, <Timeout>, <Polling Rate (optional)>, quiet)\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:"Target"}),(0,r.jsx)(t.td,{children:"The target name"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Packet"}),(0,r.jsx)(t.td,{children:"The packet name"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Num Packets"}),(0,r.jsx)(t.td,{children:"The number of packets to receive"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Timeout"}),(0,r.jsx)(t.td,{children:"Timeout in seconds. Script will stop if the wait statement times out waiting specified number of packets."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Polling Rate"}),(0,r.jsx)(t.td,{children:"How often the comparison is evaluated in seconds. Defaults to 0.25 if not specified."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"quiet"}),(0,r.jsx)(t.td,{children:"Named parameter indicating whether to log the result. Defaults to true."})]})]})]}),"\n",(0,r.jsx)(t.p,{children:"Ruby / Python Example:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:"elapsed = wait_check_packet('INST', 'HEALTH_STATUS', 5, 10) # Wait for 5 INST HEALTH_STATUS packets over 10s\n"})}),"\n",(0,r.jsx)(t.h2,{id:"limits",children:"Limits"}),"\n",(0,r.jsx)(t.p,{children:"These methods deal with handling telemetry limits."}),"\n",(0,r.jsx)(t.h3,{id:"limits_enabled-limits_enabled",children:"limits_enabled?, limits_enabled"}),"\n",(0,r.jsx)(t.p,{children:"The limits_enabled? method returns true/false depending on whether limits are enabled for a telemetry item."}),"\n",(0,r.jsx)(t.p,{children:"Ruby Syntax:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:'limits_enabled?("<Target Name> <Packet Name> <Item Name>")\n'})}),"\n",(0,r.jsx)(t.p,{children:"Python Syntax:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-python",children:'limits_enabled("<Target Name> <Packet Name> <Item Name>")\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:"Target Name"}),(0,r.jsx)(t.td,{children:"Name of the target of the telemetry item."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Packet Name"}),(0,r.jsx)(t.td,{children:"Name of the telemetry packet of the telemetry item."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Item Name"}),(0,r.jsx)(t.td,{children:"Name of the telemetry item."})]})]})]}),"\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:'enabled = limits_enabled?("INST HEALTH_STATUS TEMP1") #=> true or false\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:'enabled = limits_enabled("INST HEALTH_STATUS TEMP1") #=> True or False\n'})}),"\n",(0,r.jsx)(t.h3,{id:"enable_limits",children:"enable_limits"}),"\n",(0,r.jsx)(t.p,{children:"Enables limits monitoring for the specified telemetry item."}),"\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:'enable_limits("<Target Name> <Packet Name> <Item Name>")\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:"Target Name"}),(0,r.jsx)(t.td,{children:"Name of the target of the telemetry item."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Packet Name"}),(0,r.jsx)(t.td,{children:"Name of the telemetry packet of the telemetry item."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Item Name"}),(0,r.jsx)(t.td,{children:"Name of the telemetry item."})]})]})]}),"\n",(0,r.jsx)(t.p,{children:"Ruby / Python Example:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:'enable_limits("INST HEALTH_STATUS TEMP1")\n'})}),"\n",(0,r.jsx)(t.h3,{id:"disable_limits",children:"disable_limits"}),"\n",(0,r.jsx)(t.p,{children:"Disables limits monitoring for the specified telemetry item."}),"\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:'disable_limits("<Target Name> <Packet Name> <Item Name>")\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:"Target Name"}),(0,r.jsx)(t.td,{children:"Name of the target of the telemetry item."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Packet Name"}),(0,r.jsx)(t.td,{children:"Name of the telemetry packet of the telemetry item."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Item Name"}),(0,r.jsx)(t.td,{children:"Name of the telemetry item."})]})]})]}),"\n",(0,r.jsx)(t.p,{children:"Ruby / Python Example:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:'disable_limits("INST HEALTH_STATUS TEMP1")\n'})}),"\n",(0,r.jsx)(t.h3,{id:"enable_limits_group",children:"enable_limits_group"}),"\n",(0,r.jsx)(t.p,{children:"Enables limits monitoring on a set of telemetry items specified in a limits group."}),"\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:'enable_limits_group("<Limits Group Name>")\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.jsx)(t.tbody,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Limits Group Name"}),(0,r.jsx)(t.td,{children:"Name of the limits group."})]})})]}),"\n",(0,r.jsx)(t.p,{children:"Ruby / Python Example:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:'enable_limits_group("SAFE_MODE")\n'})}),"\n",(0,r.jsx)(t.h3,{id:"disable_limits_group",children:"disable_limits_group"}),"\n",(0,r.jsx)(t.p,{children:"Disables limits monitoring on a set of telemetry items specified in a limits group."}),"\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:'disable_limits_group("<Limits Group Name>")\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.jsx)(t.tbody,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Limits Group Name"}),(0,r.jsx)(t.td,{children:"Name of the limits group."})]})})]}),"\n",(0,r.jsx)(t.p,{children:"Ruby / Python Example:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:'disable_limits_group("SAFE_MODE")\n'})}),"\n",(0,r.jsx)(t.h3,{id:"get_limits_groups",children:"get_limits_groups"}),"\n",(0,r.jsx)(t.p,{children:"Returns the list of limits groups in the system."}),"\n",(0,r.jsx)(t.p,{children:"Ruby / Python Syntax / Example:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:"limits_groups = get_limits_groups()\n"})}),"\n",(0,r.jsx)(t.h3,{id:"set_limits_set",children:"set_limits_set"}),"\n",(0,r.jsx)(t.p,{children:"Sets the current limits set. The default limits set is DEFAULT."}),"\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:'set_limits_set("<Limits Set Name>")\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.jsx)(t.tbody,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Limits Set Name"}),(0,r.jsx)(t.td,{children:"Name of the limits set."})]})})]}),"\n",(0,r.jsx)(t.p,{children:"Ruby / Python Example:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:'set_limits_set("DEFAULT")\n'})}),"\n",(0,r.jsx)(t.h3,{id:"get_limits_set",children:"get_limits_set"}),"\n",(0,r.jsx)(t.p,{children:"Returns the name of the current limits set. The default limits set is DEFAULT."}),"\n",(0,r.jsx)(t.p,{children:"Ruby / Python Syntax / Example:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:"limits_set = get_limits_set()\n"})}),"\n",(0,r.jsx)(t.h3,{id:"get_limits_sets",children:"get_limits_sets"}),"\n",(0,r.jsx)(t.p,{children:"Returns the list of limits sets in the system."}),"\n",(0,r.jsx)(t.p,{children:"Ruby / Python Syntax / Example:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:"limits_sets = get_limits_sets()\n"})}),"\n",(0,r.jsx)(t.h3,{id:"get_limits",children:"get_limits"}),"\n",(0,r.jsx)(t.p,{children:"Returns hash / dict of all the limits settings for a telemetry point."}),"\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:"get_limits(<Target Name>, <Packet Name>, <Item Name>)\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:"Target Name"}),(0,r.jsx)(t.td,{children:"Name of the target of the telemetry item"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Packet Name"}),(0,r.jsx)(t.td,{children:"Name of the telemetry packet of the telemetry item"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Item Name"}),(0,r.jsx)(t.td,{children:"Name of the telemetry item"})]})]})]}),"\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:"result = get_limits('INST', 'HEALTH_STATUS', 'TEMP1')\nputs result #=> {\"DEFAULT\"=>[-80.0, -70.0, 60.0, 80.0, -20.0, 20.0], \"TVAC\"=>[-80.0, -30.0, 30.0, 80.0]}\nputs result.keys #=> ['DEFAULT', 'TVAC']\nputs result['DEFAULT'] #=> [-80.0, -70.0, 60.0, 80.0, -20.0, 20.0]\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:"result = get_limits('INST', 'HEALTH_STATUS', 'TEMP1')\nprint(result) #=> {'DEFAULT'=>[-80.0, -70.0, 60.0, 80.0, -20.0, 20.0], 'TVAC'=>[-80.0, -30.0, 30.0, 80.0]}\nprint(result.keys()) #=> dict_keys(['DEFAULT', 'TVAC'])\nprint(result['DEFAULT']) #=> [-80.0, -70.0, 60.0, 80.0, -20.0, 20.0]\n"})}),"\n",(0,r.jsx)(t.h3,{id:"set_limits",children:"set_limits"}),"\n",(0,r.jsx)(t.p,{children:"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."}),"\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:"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"})}),"\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:"Target Name"}),(0,r.jsx)(t.td,{children:"Name of the target of the telemetry item."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Packet Name"}),(0,r.jsx)(t.td,{children:"Name of the telemetry packet of the telemetry item."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Item Name"}),(0,r.jsx)(t.td,{children:"Name of the telemetry item."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Red Low"}),(0,r.jsx)(t.td,{children:"Red Low setting for this limits set. Any value below this value will be make the item red."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Yellow Low"}),(0,r.jsx)(t.td,{children:"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.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Yellow High"}),(0,r.jsx)(t.td,{children:"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.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Red High"}),(0,r.jsx)(t.td,{children:"Red High setting for this limits set. Any value above this value will be make the item red."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Green Low"}),(0,r.jsx)(t.td,{children:"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.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Green High"}),(0,r.jsx)(t.td,{children:"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.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Limits Set"}),(0,r.jsx)(t.td,{children:"Optional. Set the limits for a specific limits set. If not given then it defaults to setting limits for the CUSTOM limits set."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Persistence"}),(0,r.jsx)(t.td,{children:"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.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Enabled"}),(0,r.jsx)(t.td,{children:"Optional. Whether or not limits are enabled for this item. Defaults to true. Note: This affects all limits settings across limits sets."})]})]})]}),"\n",(0,r.jsx)(t.p,{children:"Ruby / Python Example:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:"set_limits('INST', 'HEALTH_STATUS', 'TEMP1', -10.0, 0.0, 50.0, 60.0, 30.0, 40.0, 'TVAC', 1, true)\n"})}),"\n",(0,r.jsx)(t.h3,{id:"get_out_of_limits",children:"get_out_of_limits"}),"\n",(0,r.jsx)(t.p,{children:"Returns an array with the target_name, packet_name, item_name, and limits_state of all items that are out of their limits ranges."}),"\n",(0,r.jsx)(t.p,{children:"Ruby / Python Syntax / Example:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:"out_of_limits_items = get_out_of_limits()\n"})}),"\n",(0,r.jsx)(t.h3,{id:"get_overall_limits_state",children:"get_overall_limits_state"}),"\n",(0,r.jsx)(t.p,{children:"Returns the overall limits state for the COSMOS system. Returns 'GREEN', 'YELLOW', or 'RED'."}),"\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:"get_overall_limits_state(<Ignored Items> (optional))\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.jsx)(t.tbody,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Ignored Items"}),(0,r.jsx)(t.td,{children:"Array of arrays with items to ignore when determining the overall limits state. [['TARGET_NAME', 'PACKET_NAME', 'ITEM_NAME'], ...]"})]})})]}),"\n",(0,r.jsx)(t.p,{children:"Ruby / Python Example:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:"overall_limits_state = get_overall_limits_state()\noverall_limits_state = get_overall_limits_state([['INST', 'HEALTH_STATUS', 'TEMP1']])\n"})}),"\n",(0,r.jsx)(t.h3,{id:"get_limits_events",children:"get_limits_events"}),"\n",(0,r.jsx)(t.p,{children:"Returns limits events based on an offset returned from the last time it was called."}),"\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:"get_limits_event(<Offset>, count)\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:"Offset"}),(0,r.jsx)(t.td,{children:"Offset returned by the previous call to get_limits_event. Default is nil for the initial call"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"count"}),(0,r.jsx)(t.td,{children:"Named parameter specifying the maximum number of limits events to return. Default is 100"})]})]})]}),"\n",(0,r.jsx)(t.p,{children:"Ruby / Python Example:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:'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'})}),"\n",(0,r.jsx)(t.h2,{id:"targets",children:"Targets"}),"\n",(0,r.jsx)(t.p,{children:"Methods for getting knowledge about targets."}),"\n",(0,r.jsx)(t.h3,{id:"get_target_names",children:"get_target_names"}),"\n",(0,r.jsx)(t.p,{children:"Returns a list of the targets in the system in an array."}),"\n",(0,r.jsx)(t.p,{children:"Ruby Syntax / Example:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:"targets = get_target_names() #=> ['INST', 'INST2', 'EXAMPLE', 'TEMPLATED']\n"})}),"\n",(0,r.jsx)(t.h3,{id:"get_target",children:"get_target"}),"\n",(0,r.jsx)(t.p,{children:"Returns a target hash containing all the information about the target."}),"\n",(0,r.jsx)(t.p,{children:"Ruby Syntax:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:'get_target("<Target Name>")\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.jsx)(t.tbody,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Target Name"}),(0,r.jsx)(t.td,{children:"Name of the target."})]})})]}),"\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:'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'})}),"\n",(0,r.jsx)(t.h3,{id:"get_target_interfaces",children:"get_target_interfaces"}),"\n",(0,r.jsx)(t.p,{children:"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."}),"\n",(0,r.jsx)(t.p,{children:"Syntax / Example:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:'target_ints = get_target_interfaces()\ntarget_ints.each do |target_name, interfaces|\n  puts "Target: #{target_name}, Interfaces: #{interfaces}"\nend\n'})}),"\n",(0,r.jsx)(t.h2,{id:"interfaces",children:"Interfaces"}),"\n",(0,r.jsx)(t.p,{children:"These methods allow the user to manipulate COSMOS interfaces."}),"\n",(0,r.jsx)(t.h3,{id:"get_interface-since-500",children:"get_interface (since 5.0.0)"}),"\n",(0,r.jsx)(t.p,{children:"Returns an interface status including the as built interface and its current status (cmd/tlm counters, etc)."}),"\n",(0,r.jsx)(t.p,{children:"Ruby / Python Syntax:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{children:'get_interface("<Interface Name>")\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.jsx)(t.tbody,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Interface Name"}),(0,r.jsx)(t.td,{children:"Name of the interface."})]})})]}),"\n",(0,r.jsx)(t.p,{children:"Ruby / Python Example:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:'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'})}),"\n",(0,r.jsx)(t.h3,{id:"get_interface_names",children:"get_interface_names"}),"\n",(0,r.jsx)(t.p,{children:"Returns a list of the interfaces in the system in an array."}),"\n",(0,r.jsx)(t.p,{children:"Ruby / Python Syntax / Example:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:"interface_names = get_interface_names() #=> ['INST_INT', 'INST2_INT', 'EXAMPLE_INT', 'TEMPLATED_INT']\n"})}),"\n",(0,r.jsx)(t.h3,{id:"connect_interface",children:"connect_interface"}),"\n",(0,r.jsx)(t.p,{children:"Connects to targets associated with a COSMOS interface."}),"\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:'connect_interface("<Interface Name>", <Interface Parameters (optional)>)\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:"Interface Name"}),(0,r.jsx)(t.td,{children:"Name of the interface."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Interface Parameters"}),(0,r.jsx)(t.td,{children:"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."})]})]})]}),"\n",(0,r.jsx)(t.p,{children:"Ruby / Python Example:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:'connect_interface("INT1")\nconnect_interface("INT1", hostname, port)\n'})}),"\n",(0,r.jsx)(t.h3,{id:"disconnect_interface",children:"disconnect_interface"}),"\n",(0,r.jsx)(t.p,{children:"Disconnects from targets associated with a COSMOS interface."}),"\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:'disconnect_interface("<Interface Name>")\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.jsx)(t.tbody,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Interface Name"}),(0,r.jsx)(t.td,{children:"Name of the interface."})]})})]}),"\n",(0,r.jsx)(t.p,{children:"Ruby / Python Example:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:'disconnect_interface("INT1")\n'})}),"\n",(0,r.jsx)(t.h3,{id:"start_raw_logging_interface",children:"start_raw_logging_interface"}),"\n",(0,r.jsx)(t.p,{children:"Starts logging of raw data on one or all interfaces. This is for debugging purposes only."}),"\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:'start_raw_logging_interface("<Interface Name (optional)>")\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.jsx)(t.tbody,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Interface Name"}),(0,r.jsx)(t.td,{children:"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."})]})})]}),"\n",(0,r.jsx)(t.p,{children:"Ruby / Python Example:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:'start_raw_logging_interface("int1")\n'})}),"\n",(0,r.jsx)(t.h3,{id:"stop_raw_logging_interface",children:"stop_raw_logging_interface"}),"\n",(0,r.jsx)(t.p,{children:"Stops logging of raw data on one or all interfaces. This is for debugging purposes only."}),"\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:'stop_raw_logging_interface("<Interface Name (optional)>")\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.jsx)(t.tbody,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Interface Name"}),(0,r.jsx)(t.td,{children:"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."})]})})]}),"\n",(0,r.jsx)(t.p,{children:"Ruby / Python Example:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:'stop_raw_logging_interface("int1")\n'})}),"\n",(0,r.jsx)(t.h3,{id:"get_all_interface_info",children:"get_all_interface_info"}),"\n",(0,r.jsx)(t.p,{children:"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."}),"\n",(0,r.jsx)(t.p,{children:"Ruby Syntax / Example:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:'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'})}),"\n",(0,r.jsx)(t.p,{children:"Python Syntax / Example:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-python",children:'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'})}),"\n",(0,r.jsx)(t.h3,{id:"map_target_to_interface",children:"map_target_to_interface"}),"\n",(0,r.jsx)(t.p,{children:"Map a target to an interface allowing target commands and telemetry to be processed by that interface."}),"\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:'map_target_to_interface("<Target Name>", "<Interface Name>", cmd_only, tlm_only, unmap_old)\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:"Target Name"}),(0,r.jsx)(t.td,{children:"Name of the target"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Interface Name"}),(0,r.jsx)(t.td,{children:"Name of the interface"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"cmd_only"}),(0,r.jsx)(t.td,{children:"Named parameter whether to map target commands only to the interface (default: false)"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"tlm_only"}),(0,r.jsx)(t.td,{children:"Named parameter whether to map target telemetry only to the interface (default: false)"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"unmap_old"}),(0,r.jsx)(t.td,{children:"Named parameter whether remove the target from all existing interfaces (default: true)"})]})]})]}),"\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:'map_target_to_interface("INST", "INST_INT", unmap_old: false)\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:'map_target_to_interface("INST", "INST_INT", unmap_old=False)\n'})}),"\n",(0,r.jsx)(t.h3,{id:"interface_cmd",children:"interface_cmd"}),"\n",(0,r.jsx)(t.p,{children:"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."}),"\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:'interface_cmd("<Interface Name>", "<Command Name>", "<Command Parameters>")\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:"Interface Name"}),(0,r.jsx)(t.td,{children:"Name of the interface"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Command Name"}),(0,r.jsx)(t.td,{children:"Name of the command to send"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Command Parameters"}),(0,r.jsx)(t.td,{children:"Any parameters to send with the command"})]})]})]}),"\n",(0,r.jsx)(t.p,{children:"Ruby / Python Example:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:'interface_cmd("INST", "DISABLE_CRC")\n'})}),"\n",(0,r.jsx)(t.h3,{id:"interface_protocol_cmd",children:"interface_protocol_cmd"}),"\n",(0,r.jsx)(t.p,{children:"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."}),"\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:'interface_protocol_cmd("<Interface Name>", "<Command Name>", "<Command Parameters>")\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:"Interface Name"}),(0,r.jsx)(t.td,{children:"Name of the interface"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Command Name"}),(0,r.jsx)(t.td,{children:"Name of the command to send"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Command Parameters"}),(0,r.jsx)(t.td,{children:"Any parameters to send with the command"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"read_write"}),(0,r.jsx)(t.td,{children:"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.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"index"}),(0,r.jsx)(t.td,{children:"Which protocol in the stack the command should apply to. The default is -1 which applies the command to all."})]})]})]}),"\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:'interface_protocol_cmd("INST", "DISABLE_CRC", read_write: :READ_WRITE, index: -1)\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:'interface_protocol_cmd("INST", "DISABLE_CRC", read_write=\'READ_WRITE\', index=-1)\n'})}),"\n",(0,r.jsx)(t.h2,{id:"routers",children:"Routers"}),"\n",(0,r.jsx)(t.p,{children:"These methods allow the user to manipulate COSMOS routers."}),"\n",(0,r.jsx)(t.h3,{id:"connect_router",children:"connect_router"}),"\n",(0,r.jsx)(t.p,{children:"Connects a COSMOS router."}),"\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:'connect_router("<Router Name>", <Router Parameters (optional)>)\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:"Router Name"}),(0,r.jsx)(t.td,{children:"Name of the router."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Router Parameters"}),(0,r.jsx)(t.td,{children:"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."})]})]})]}),"\n",(0,r.jsx)(t.p,{children:"Ruby / Python Example:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:'connect_ROUTER("INST_ROUTER")\nconnect_router("INST_ROUTER", 7779, 7779, nil, 10.0, \'PREIDENTIFIED\')\n'})}),"\n",(0,r.jsx)(t.h3,{id:"disconnect_router",children:"disconnect_router"}),"\n",(0,r.jsx)(t.p,{children:"Disconnects a COSMOS router."}),"\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:'disconnect_router("<Router Name>")\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.jsx)(t.tbody,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Router Name"}),(0,r.jsx)(t.td,{children:"Name of the router."})]})})]}),"\n",(0,r.jsx)(t.p,{children:"Ruby / Python Example:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:'disconnect_router("INT1_ROUTER")\n'})}),"\n",(0,r.jsx)(t.h3,{id:"get_router_names",children:"get_router_names"}),"\n",(0,r.jsx)(t.p,{children:"Returns a list of the routers in the system in an array."}),"\n",(0,r.jsx)(t.p,{children:"Ruby / Python Syntax / Example:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:"router_names = get_router_names() #=> ['ROUTER_INT']\n"})}),"\n",(0,r.jsx)(t.h3,{id:"get_router-since-500",children:"get_router (since 5.0.0)"}),"\n",(0,r.jsx)(t.p,{children:"Returns a router status including the as built router and its current status (cmd/tlm counters, etc)."}),"\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:'get_router("<Router Name>")\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.jsx)(t.tbody,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Router Name"}),(0,r.jsx)(t.td,{children:"Name of the router."})]})})]}),"\n",(0,r.jsx)(t.p,{children:"Ruby / Python Example:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:'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'})}),"\n",(0,r.jsx)(t.h3,{id:"get_all_router_info",children:"get_all_router_info"}),"\n",(0,r.jsx)(t.p,{children:"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."}),"\n",(0,r.jsx)(t.p,{children:"Ruby Syntax / Example:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:'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'})}),"\n",(0,r.jsx)(t.p,{children:"Python Syntax / Example:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-python",children:'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'})}),"\n",(0,r.jsx)(t.h3,{id:"start_raw_logging_router",children:"start_raw_logging_router"}),"\n",(0,r.jsx)(t.p,{children:"Starts logging of raw data on one or all routers. This is for debugging purposes only."}),"\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:'start_raw_logging_router("<Router Name (optional)>")\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.jsx)(t.tbody,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Router Name"}),(0,r.jsx)(t.td,{children:"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."})]})})]}),"\n",(0,r.jsx)(t.p,{children:"Ruby / Python Example:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:'start_raw_logging_router("router1")\n'})}),"\n",(0,r.jsx)(t.h3,{id:"stop_raw_logging_router",children:"stop_raw_logging_router"}),"\n",(0,r.jsx)(t.p,{children:"Stops logging of raw data on one or all routers. This is for debugging purposes only."}),"\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:'stop_raw_logging_router("<Router Name (optional)>")\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.jsx)(t.tbody,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Router Name"}),(0,r.jsx)(t.td,{children:"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."})]})})]}),"\n",(0,r.jsx)(t.p,{children:"Ruby / Python Example:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:'stop_raw_logging_router("router1")\n'})}),"\n",(0,r.jsx)(t.h3,{id:"router_cmd",children:"router_cmd"}),"\n",(0,r.jsx)(t.p,{children:"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."}),"\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:'router_cmd("<Router Name>", "<Command Name>", "<Command Parameters>")\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:"Router Name"}),(0,r.jsx)(t.td,{children:"Name of the router"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Command Name"}),(0,r.jsx)(t.td,{children:"Name of the command to send"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Command Parameters"}),(0,r.jsx)(t.td,{children:"Any parameters to send with the command"})]})]})]}),"\n",(0,r.jsx)(t.p,{children:"Ruby / Python Example:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:'router_cmd("INST", "DISABLE_CRC")\n'})}),"\n",(0,r.jsx)(t.h3,{id:"router_protocol_cmd",children:"router_protocol_cmd"}),"\n",(0,r.jsx)(t.p,{children:"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."}),"\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:'router_protocol_cmd("<Router Name>", "<Command Name>", "<Command Parameters>", read_write, index)\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:"Router Name"}),(0,r.jsx)(t.td,{children:"Name of the router"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Command Name"}),(0,r.jsx)(t.td,{children:"Name of the command to send"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Command Parameters"}),(0,r.jsx)(t.td,{children:"Any parameters to send with the command"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"read_write"}),(0,r.jsx)(t.td,{children:"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.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"index"}),(0,r.jsx)(t.td,{children:"Which protocol in the stack the command should apply to. The default is -1 which applies the command to all."})]})]})]}),"\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:'router_protocol_cmd("INST", "DISABLE_CRC", read_write: :READ_WRITE, index: -1)\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:'router_protocol_cmd("INST", "DISABLE_CRC", read_write=\'READ_WRITE\', index=-1)\n'})}),"\n",(0,r.jsx)(t.h2,{id:"stashing-data",children:"Stashing Data"}),"\n",(0,r.jsx)(t.p,{children:"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."}),"\n",(0,r.jsx)(t.h3,{id:"stash_set",children:"stash_set"}),"\n",(0,r.jsx)(t.p,{children:"Sets a stash item."}),"\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:'stash_set("<Stash Key>", <Stash Value>)\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:"Stash Key"}),(0,r.jsx)(t.td,{children:"Name of the stash key to set"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Stash Value"}),(0,r.jsx)(t.td,{children:"Value to set"})]})]})]}),"\n",(0,r.jsx)(t.p,{children:"Ruby / Python Example:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:"stash_set('run_count', 5)\nstash_set('setpoint', 23.4)\n"})}),"\n",(0,r.jsx)(t.h3,{id:"stash_get",children:"stash_get"}),"\n",(0,r.jsx)(t.p,{children:"Returns the specified stash item."}),"\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:'stash_get("<Stash Key>")\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.jsx)(t.tbody,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Stash Key"}),(0,r.jsx)(t.td,{children:"Name of the stash key to return"})]})})]}),"\n",(0,r.jsx)(t.p,{children:"Ruby / Python Example:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:"stash_get('run_count')  #=> 5\n"})}),"\n",(0,r.jsx)(t.h3,{id:"stash_all",children:"stash_all"}),"\n",(0,r.jsx)(t.p,{children:"Returns all the stash items as a Ruby hash or Python dict."}),"\n",(0,r.jsx)(t.p,{children:"Ruby Syntax / Example:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:"stash_all()  #=> ['run_count' => 5, 'setpoint' => 23.4]\n"})}),"\n",(0,r.jsx)(t.p,{children:"Python Syntax / Example:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:"stash_all()  #=> ['run_count': 5, 'setpoint': 23.4]\n"})}),"\n",(0,r.jsx)(t.h3,{id:"stash_keys",children:"stash_keys"}),"\n",(0,r.jsx)(t.p,{children:"Returns all the stash keys."}),"\n",(0,r.jsx)(t.p,{children:"Ruby / Python Syntax / Example:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:"stash_keys()  #=> ['run_count', 'setpoint']\n"})}),"\n",(0,r.jsx)(t.h3,{id:"stash_delete",children:"stash_delete"}),"\n",(0,r.jsx)(t.p,{children:"Deletes a stash item. Note this actions is permanent!"}),"\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:'stash_delete("<Stash Key>")\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.jsx)(t.tbody,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Stash Key"}),(0,r.jsx)(t.td,{children:"Name of the stash key to delete"})]})})]}),"\n",(0,r.jsx)(t.p,{children:"Ruby / Python Example:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:'stash_delete("run_count")\n'})}),"\n",(0,r.jsx)(t.h2,{id:"executing-other-procedures",children:"Executing Other Procedures"}),"\n",(0,r.jsx)(t.p,{children:"These methods allow the user to bring in files of subroutines and execute other test procedures."}),"\n",(0,r.jsx)(t.h3,{id:"start",children:"start"}),"\n",(0,r.jsx)(t.p,{children:"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."}),"\n",(0,r.jsx)(t.p,{children:"Syntax:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:'start("<Procedure Filename>")\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.jsx)(t.tbody,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Procedure Filename"}),(0,r.jsx)(t.td,{children:"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."})]})})]}),"\n",(0,r.jsx)(t.p,{children:"Example:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:'start("test1.rb")\n'})}),"\n",(0,r.jsx)(t.h3,{id:"load_utility",children:"load_utility"}),"\n",(0,r.jsx)(t.p,{children:"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."}),"\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:'load_utility("TARGET/lib/<Utility Filename>")\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.jsx)(t.tbody,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Utility Filename"}),(0,r.jsx)(t.td,{children:"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"})]})})]}),"\n",(0,r.jsx)(t.p,{children:"Example:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:'load_utility("TARGET/lib/mode_changes.rb") # Ruby\nload_utility("TARGET/lib/mode_changes.py") # Python\n'})}),"\n",(0,r.jsx)(t.h2,{id:"opening-closing--creating-telemetry-screens",children:"Opening, Closing & Creating Telemetry Screens"}),"\n",(0,r.jsx)(t.p,{children:"These methods allow the user to open, close or create unique telemetry screens from within a test procedure."}),"\n",(0,r.jsx)(t.h3,{id:"display_screen",children:"display_screen"}),"\n",(0,r.jsx)(t.p,{children:"Opens a telemetry screen at the specified position."}),"\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:'display_screen("<Target Name>", "<Screen Name>", <X Position (optional)>, <Y Position (optional)>)\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:"Target Name"}),(0,r.jsx)(t.td,{children:"Telemetry screen target name"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Screen Name"}),(0,r.jsx)(t.td,{children:"Screen name within the specified target"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"X Position"}),(0,r.jsx)(t.td,{children:"X coordinate for the upper left hand corner of the screen"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Y Position"}),(0,r.jsx)(t.td,{children:"Y coordinate for the upper left hand corner of the screen"})]})]})]}),"\n",(0,r.jsx)(t.p,{children:"Ruby / Python Example:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:'display_screen("INST", "ADCS", 100, 200)\n'})}),"\n",(0,r.jsx)(t.h3,{id:"clear_screen",children:"clear_screen"}),"\n",(0,r.jsx)(t.p,{children:"Closes an open telemetry screen."}),"\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:'clear_screen("<Target Name>", "<Screen Name>")\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:"Target Name"}),(0,r.jsx)(t.td,{children:"Telemetry screen target name"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Screen Name"}),(0,r.jsx)(t.td,{children:"Screen name within the specified target"})]})]})]}),"\n",(0,r.jsx)(t.p,{children:"Ruby / Python Example:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:'clear_screen("INST", "ADCS")\n'})}),"\n",(0,r.jsx)(t.h3,{id:"clear_all_screens",children:"clear_all_screens"}),"\n",(0,r.jsx)(t.p,{children:"Closes all open screens."}),"\n",(0,r.jsx)(t.p,{children:"Ruby / Python Syntax / Example:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:"clear_all_screens()\n"})}),"\n",(0,r.jsx)(t.h3,{id:"delete_screen",children:"delete_screen"}),"\n",(0,r.jsx)(t.p,{children:"Deletes an existing Telemetry Viewer screen."}),"\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:'delete_screen("<Target Name>", "<Screen Name>")\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:"Target Name"}),(0,r.jsx)(t.td,{children:"Telemetry screen target name"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Screen Name"}),(0,r.jsx)(t.td,{children:"Screen name within the specified target"})]})]})]}),"\n",(0,r.jsx)(t.p,{children:"Ruby / Python Example:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:'delete_screen("INST", "ADCS")\n'})}),"\n",(0,r.jsx)(t.h3,{id:"get_screen_list",children:"get_screen_list"}),"\n",(0,r.jsx)(t.p,{children:"The get_screen_list returns a list of available telemetry screens."}),"\n",(0,r.jsx)(t.p,{children:"Ruby / Python Syntax / Example:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:"get_screen_list() #=> ['INST ADCS', 'INST COMMANDING', ...]\n"})}),"\n",(0,r.jsx)(t.h3,{id:"get_screen_definition",children:"get_screen_definition"}),"\n",(0,r.jsx)(t.p,{children:"The get_screen_definition returns the text file contents of a telemetry screen definition."}),"\n",(0,r.jsx)(t.p,{children:"Syntax:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:'get_screen_definition("<Target Name>", "<Screen Name>")\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:"Target Name"}),(0,r.jsx)(t.td,{children:"Telemetry screen target name"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Screen Name"}),(0,r.jsx)(t.td,{children:"Screen name within the specified target"})]})]})]}),"\n",(0,r.jsx)(t.p,{children:"Ruby / Python Example:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:'screen_definition = get_screen_definition("INST", "HS")\n'})}),"\n",(0,r.jsx)(t.h3,{id:"create_screen",children:"create_screen"}),"\n",(0,r.jsx)(t.p,{children:"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."}),"\n",(0,r.jsx)(t.p,{children:"Python / Ruby Syntax:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:'create_screen("<Target Name>", "<Screen Name>" "<Definition>")\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:"Target Name"}),(0,r.jsx)(t.td,{children:"Telemetry screen target name"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Screen Name"}),(0,r.jsx)(t.td,{children:"Screen name within the specified target"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Definition"}),(0,r.jsx)(t.td,{children:"The entire screen definition as a String"})]})]})]}),"\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:'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'})}),"\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:'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'})}),"\n",(0,r.jsx)(t.h3,{id:"local_screen",children:"local_screen"}),"\n",(0,r.jsx)(t.p,{children:"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."}),"\n",(0,r.jsx)(t.p,{children:"Python / Ruby Syntax:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:'local_screen("<Screen Name>" "<Definition>", <X Position (optional)>, <Y Position (optional)>)\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:"Screen Name"}),(0,r.jsx)(t.td,{children:"Screen name within the specified target"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Definition"}),(0,r.jsx)(t.td,{children:"The entire screen definition as a String"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"X Position"}),(0,r.jsx)(t.td,{children:"X coordinate for the upper left hand corner of the screen"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Y Position"}),(0,r.jsx)(t.td,{children:"Y coordinate for the upper left hand corner of the screen"})]})]})]}),"\n",(0,r.jsxs)(t.p,{children:["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.jsx)(t.code,{children:"clear_all_screens()"})," first to clear any screens off the visible display space."]}),"\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:'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'})}),"\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:'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'})}),"\n",(0,r.jsx)(t.h2,{id:"script-runner-settings",children:"Script Runner Settings"}),"\n",(0,r.jsx)(t.p,{children:"These methods allow the user to control various Script Runner settings."}),"\n",(0,r.jsx)(t.h3,{id:"set_line_delay",children:"set_line_delay"}),"\n",(0,r.jsx)(t.p,{children:"This method sets the line delay in script runner."}),"\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:"set_line_delay(<Delay>)\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.jsx)(t.tbody,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Delay"}),(0,r.jsx)(t.td,{children:"The amount of time script runner will wait between lines when executing a script, in seconds. Should be \u2265 0.0"})]})})]}),"\n",(0,r.jsx)(t.p,{children:"Ruby / Python Example:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:"set_line_delay(0.0)\n"})}),"\n",(0,r.jsx)(t.h3,{id:"get_line_delay",children:"get_line_delay"}),"\n",(0,r.jsx)(t.p,{children:"The method gets the line delay that script runner is currently using."}),"\n",(0,r.jsx)(t.p,{children:"Ruby / Python Syntax / Example:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:"curr_line_delay = get_line_delay()\n"})}),"\n",(0,r.jsx)(t.h3,{id:"set_max_output",children:"set_max_output"}),"\n",(0,r.jsx)(t.p,{children:"This method sets the maximum number of characters to display in Script Runner output before truncating. Default is 50,000 characters."}),"\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:"set_max_output(<Characters>)\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.jsx)(t.tbody,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Characters"}),(0,r.jsx)(t.td,{children:"Number of characters to output before truncating"})]})})]}),"\n",(0,r.jsx)(t.p,{children:"Ruby / Python Example:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:"set_max_output(100)\n"})}),"\n",(0,r.jsx)(t.h3,{id:"get_max_output",children:"get_max_output"}),"\n",(0,r.jsx)(t.p,{children:"The method gets the maximum number of characters to display in Script Runner output before truncating. Default is 50,000 characters."}),"\n",(0,r.jsx)(t.p,{children:"Ruby / Python Syntax / Example:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:"print(get_max_output()) #=> 50000\n"})}),"\n",(0,r.jsx)(t.h3,{id:"disable_instrumentation",children:"disable_instrumentation"}),"\n",(0,r.jsx)(t.p,{children:"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 separate file and using either require/load to read the file for the same effect while still allowing errors to be caught by your script."}),"\n",(0,r.jsx)(t.admonition,{title:"Use with Caution",type:"warning",children:(0,r.jsx)(t.p,{children:"Disabling instrumentation will cause any error that occurs while disabled to cause your script to completely stop."})}),"\n",(0,r.jsx)(t.p,{children:"Ruby Syntax / Example:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:"disable_instrumentation do\n  1000.times do\n    # Don't want this to have to highlight 1000 times\n  end\nend\n"})}),"\n",(0,r.jsx)(t.p,{children:"Python Syntax / Example:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-python",children:"with disable_instrumentation():\n    for x in range(1000):\n        # Don't want this to have to highlight 1000 times\n"})}),"\n",(0,r.jsx)(t.h2,{id:"script-runner-suites",children:"Script Runner Suites"}),"\n",(0,r.jsxs)(t.p,{children:["Creating Script Runner suites utilizes APIs to add groups to the defined suites. For more information please see ",(0,r.jsx)(t.a,{href:"/docs/tools/script-runner#running-script-suites",children:"running script suites"}),"."]}),"\n",(0,r.jsx)(t.h3,{id:"add_group-add_group_setup-add_group_teardown-add_script",children:"add_group, add_group_setup, add_group_teardown, add_script"}),"\n",(0,r.jsx)(t.p,{children:"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_'."}),"\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:"add_group(<Group Class>)\nadd_group_setup(<Group Class>)\nadd_group_teardown(<Group Class>)\nadd_script(<Group Class>, <Method>)\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:"Group Class"}),(0,r.jsx)(t.td,{children:"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.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Method"}),(0,r.jsx)(t.td,{children:"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."})]})]})]}),"\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:"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"})}),"\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:"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"})}),"\n",(0,r.jsx)(t.h2,{id:"script-runner-debugging",children:"Script Runner Debugging"}),"\n",(0,r.jsx)(t.p,{children:"These methods allow the user to debug scripts with ScriptRunner."}),"\n",(0,r.jsx)(t.h3,{id:"step_mode",children:"step_mode"}),"\n",(0,r.jsx)(t.p,{children:"Places ScriptRunner into step mode where Go must be hit to proceed to the next line."}),"\n",(0,r.jsx)(t.p,{children:"Ruby / Python Syntax / Example:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:"step_mode()\n"})}),"\n",(0,r.jsx)(t.h3,{id:"run_mode",children:"run_mode"}),"\n",(0,r.jsx)(t.p,{children:"Places ScriptRunner into run mode where the next line is run automatically."}),"\n",(0,r.jsx)(t.p,{children:"Ruby / Python Syntax / Example:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:"run_mode()\n"})}),"\n",(0,r.jsx)(t.h3,{id:"disconnect_script",children:"disconnect_script"}),"\n",(0,r.jsx)(t.p,{children:"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."}),"\n",(0,r.jsx)(t.p,{children:"Ruby / Python Syntax / Example:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:"disconnect_script()\n"})}),"\n",(0,r.jsx)(t.h2,{id:"metadata",children:"Metadata"}),"\n",(0,r.jsx)(t.p,{children:"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."}),"\n",(0,r.jsx)(t.h3,{id:"metadata_all",children:"metadata_all"}),"\n",(0,r.jsx)(t.p,{children:"Returns all the metadata that was previously set"}),"\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:"metadata_all()\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.jsx)(t.tbody,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"limit"}),(0,r.jsx)(t.td,{children:"Amount of metadata items to return. Default is 100."})]})})]}),"\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:"metadata_all(limit: 500)\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:"metadata_all(limit='500')\n"})}),"\n",(0,r.jsx)(t.h3,{id:"metadata_get",children:"metadata_get"}),"\n",(0,r.jsx)(t.p,{children:"Returns metadata that was previously set"}),"\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:"metadata_get(start)\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.jsx)(t.tbody,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"start"}),(0,r.jsx)(t.td,{children:"Named parameter, time at which to retrieve metadata as integer seconds from epoch"})]})})]}),"\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:"metadata_get(start: 500)\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:"metadata_get(start='500')\n"})}),"\n",(0,r.jsx)(t.h3,{id:"metadata_set",children:"metadata_set"}),"\n",(0,r.jsx)(t.p,{children:"Returns metadata that was previously set"}),"\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:"metadata_set(<Metadata>, start, color)\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:"Metadata"}),(0,r.jsx)(t.td,{children:"Hash or dict of key value pairs to store as metadata."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"start"}),(0,r.jsx)(t.td,{children:"Named parameter, time at which to store metadata. Default is now."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"color"}),(0,r.jsx)(t.td,{children:"Named parameter, color to display metadata in the calendar. Default is #003784."})]})]})]}),"\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:"metadata_set({ 'key' => 'value' })\nmetadata_set({ 'key' => 'value' }, color: '#ff5252')\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:"metadata_set({ 'key': 'value' })\nmetadata_set({ 'key': 'value' }, color='ff5252')\n"})}),"\n",(0,r.jsx)(t.h3,{id:"metadata_update",children:"metadata_update"}),"\n",(0,r.jsx)(t.p,{children:"Updates metadata that was previously set"}),"\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:"metadata_update(<Metadata>, start, color)\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:"Metadata"}),(0,r.jsx)(t.td,{children:"Hash or dict of key value pairs to update as metadata."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"start"}),(0,r.jsx)(t.td,{children:"Named parameter, time at which to update metadata. Default is latest metadata."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"color"}),(0,r.jsx)(t.td,{children:"Named parameter, color to display metadata in the calendar. Default is #003784."})]})]})]}),"\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:"metadata_update({ 'key' => 'value' })\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:"metadata_update({ 'key': 'value' })\n"})}),"\n",(0,r.jsx)(t.h3,{id:"metadata_input",children:"metadata_input"}),"\n",(0,r.jsx)(t.p,{children:"Prompts the user to set existing metadata values or create new a new one."}),"\n",(0,r.jsx)(t.p,{children:"Ruby / Python Syntax / Example:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:"metadata_input()\n"})}),"\n",(0,r.jsx)(t.h2,{id:"settings",children:"Settings"}),"\n",(0,r.jsx)(t.p,{children:"COSMOS has several settings typically accessed through the Admin Settings tab. These APIs allow programmatic access to those same settings."}),"\n",(0,r.jsx)(t.h3,{id:"list_settings",children:"list_settings"}),"\n",(0,r.jsx)(t.p,{children:"Return all the current COSMOS setting name. These are the names that should be used in the other APIs."}),"\n",(0,r.jsx)(t.p,{children:"Ruby Syntax / Example:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:'puts list_settings() #=> ["pypi_url", "rubygems_url", "source_url", "version"]\n'})}),"\n",(0,r.jsx)(t.p,{children:"Python Syntax / Example:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-python",children:"print(list_settings()) #=> ['pypi_url', 'rubygems_url', 'source_url', 'version']\n"})}),"\n",(0,r.jsx)(t.h3,{id:"get_all_settings",children:"get_all_settings"}),"\n",(0,r.jsx)(t.p,{children:"Return all the current COSMOS settings along with their values."}),"\n",(0,r.jsx)(t.p,{children:"Ruby Syntax / Example:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:'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'})}),"\n",(0,r.jsx)(t.p,{children:"Python Syntax / Example:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-python",children:"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"})}),"\n",(0,r.jsx)(t.h3,{id:"get_setting-get_settings",children:"get_setting, get_settings"}),"\n",(0,r.jsx)(t.p,{children:"Return the data from the given COSMOS setting. Returns nil (Ruby) or None (Python) if the setting does not exist."}),"\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:"get_setting(<Setting Name>)\nget_settings(<Setting Name1>, <Setting Name2>, ...)\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.jsx)(t.tbody,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Setting Name"}),(0,r.jsx)(t.td,{children:"Name of the setting to return"})]})})]}),"\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:"puts get_setting('version') #=> \"5.11.4-beta0\"\nputs get_settings('version', 'rubygems_url') #=> [\"5.11.4-beta0\", \"https://rubygems.org\"]\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:"print(get_setting('version')) #=> '5.11.4-beta0'\nprint(get_setting('version', 'rubygems_url')) #=> ['5.11.4-beta0', 'https://rubygems.org']\n"})}),"\n",(0,r.jsx)(t.h3,{id:"set_setting",children:"set_setting"}),"\n",(0,r.jsx)(t.p,{children:"Sets the given setting value."}),"\n",(0,r.jsx)(t.admonition,{title:"Admin Passwork Required",type:"note",children:(0,r.jsx)(t.p,{children:"This API is only accessible externally (not within Script Runner) and requires the admin password."})}),"\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:"set_setting(<Setting Name>, <Setting Value>)\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:"Setting Name"}),(0,r.jsx)(t.td,{children:"Name of the setting to change"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Setting Value"}),(0,r.jsx)(t.td,{children:"Setting value to set"})]})]})]}),"\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:"set_setting('rubygems_url', 'https://mygemserver')\nputs get_settings('rubygems_url') #=> \"https://mygemserver\"\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:"set_setting('pypi_url', 'https://mypypiserver')\nprint(get_settings('pypi_url')) #=> 'https://mypypiserver'\n"})}),"\n",(0,r.jsx)(t.h2,{id:"configuration",children:"Configuration"}),"\n",(0,r.jsx)(t.p,{children:"Many COSMOS tools have the ability to load and save a configuration. These APIs allow you to programmatically load and save the configuration."}),"\n",(0,r.jsx)(t.h3,{id:"config_tool_names",children:"config_tool_names"}),"\n",(0,r.jsx)(t.p,{children:"List all the configuration tool names which are used as the first parameter in the other APIs."}),"\n",(0,r.jsx)(t.p,{children:"Ruby Syntax / Example:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:'names = config_tool_names()\npp names #=> ["telemetry_grapher", "data_viewer"]\n'})}),"\n",(0,r.jsx)(t.p,{children:"Python Syntax / Example:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-python",children:"names = config_tool_names()\nprint(names) #=> ['telemetry_grapher', 'data_viewer']\n"})}),"\n",(0,r.jsx)(t.h3,{id:"list_configs",children:"list_configs"}),"\n",(0,r.jsx)(t.p,{children:"List all the saved configuration names under the given tool name."}),"\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:"list_configs(<Tool Name>)\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.jsx)(t.tbody,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Tool Name"}),(0,r.jsx)(t.td,{children:"Name of the tool to retrieve configuration names from"})]})})]}),"\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:"configs = list_configs('telemetry_grapher')\npp configs #=> ['adcs', 'temps']\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:"configs = list_configs('telemetry_grapher')\nprint(configs) #=> ['adcs', 'temps']\n"})}),"\n",(0,r.jsx)(t.h3,{id:"load_config",children:"load_config"}),"\n",(0,r.jsx)(t.p,{children:"Load a particular tool configuration."}),"\n",(0,r.jsx)(t.admonition,{title:"Tool Configuration",type:"note",children:(0,r.jsx)(t.p,{children:"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."})}),"\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:"load_config(<Tool Name>, <Configuration Name>)\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:"Tool Name"}),(0,r.jsx)(t.td,{children:"Name of the tool"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Configuration Name"}),(0,r.jsx)(t.td,{children:"Name of the configuration"})]})]})]}),"\n",(0,r.jsx)(t.p,{children:"Ruby / Python Example:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:'config = load_config(\'telemetry_grapher\', \'adcs\')\nprint(config) #=>\n# [ {\n#   "items": [\n#     {\n#       "targetName": "INST",\n#       "packetName": "ADCS",\n#       "itemName": "CCSDSVER",\n# ...\n'})}),"\n",(0,r.jsx)(t.h3,{id:"save_config",children:"save_config"}),"\n",(0,r.jsx)(t.p,{children:"Save a particular tool configuration."}),"\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:"save_config(<Tool Name>, <Configuration Name>, local_mode)\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:"Tool Name"}),(0,r.jsx)(t.td,{children:"Name of the tool"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Configuration Name"}),(0,r.jsx)(t.td,{children:"Name of the configuration"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"local_mode"}),(0,r.jsx)(t.td,{children:"Whether to save the configuration in local mode"})]})]})]}),"\n",(0,r.jsx)(t.p,{children:"Ruby / Python Example:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:"save_config('telemetry_grapher', 'adcs', config)\n"})}),"\n",(0,r.jsx)(t.h3,{id:"delete_config",children:"delete_config"}),"\n",(0,r.jsx)(t.p,{children:"Delete a particular tool configuration."}),"\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:"delete_config(<Tool Name>, <Configuration Name>, local_mode)\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:"Tool Name"}),(0,r.jsx)(t.td,{children:"Name of the tool"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Configuration Name"}),(0,r.jsx)(t.td,{children:"Name of the configuration"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"local_mode"}),(0,r.jsx)(t.td,{children:"Whether to delete the configuration in local mode"})]})]})]}),"\n",(0,r.jsx)(t.p,{children:"Ruby / Python Example:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:"delete_config('telemetry_grapher', 'adcs')\n"})})]})}function o(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(h,{...e})}):h(e)}},8453:(e,t,n)=>{n.d(t,{R:()=>i,x:()=>l});var r=n(6540);const s={},a=r.createContext(s);function i(e){const t=r.useContext(a);return r.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function l(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),r.createElement(a.Provider,{value:t},e.children)}}}]);