openc3-cosmos-tool-docs 6.10.1 → 6.10.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/tools/staticdocs/404.html +2 -2
- data/tools/staticdocs/assets/css/{styles.9a220ac7.css → styles.6a21a146.css} +1 -1
- data/tools/staticdocs/assets/js/{019369f3.d7bbc5e1.js → 019369f3.622250b4.js} +1 -1
- data/tools/staticdocs/assets/js/{058ffc22.e446ff0d.js → 058ffc22.8edfaac4.js} +1 -1
- data/tools/staticdocs/assets/js/{0686a885.5b4c4b4d.js → 0686a885.9151d3f9.js} +1 -1
- data/tools/staticdocs/assets/js/{078dbab0.656de457.js → 078dbab0.09694602.js} +1 -1
- data/tools/staticdocs/assets/js/{0f5d161c.7e54cdcf.js → 0f5d161c.4c365bfd.js} +1 -1
- data/tools/staticdocs/assets/js/0ff569c9.7a4faa61.js +1 -0
- data/tools/staticdocs/assets/js/{10209fc9.b137dbd6.js → 10209fc9.dc70ea3f.js} +1 -1
- data/tools/staticdocs/assets/js/{103cc3be.ee6acb84.js → 103cc3be.c15dbb1d.js} +1 -1
- data/tools/staticdocs/assets/js/13196248.c70e8c44.js +1 -0
- data/tools/staticdocs/assets/js/{13c1b4e4.4c262e75.js → 13c1b4e4.c29d1c64.js} +1 -1
- data/tools/staticdocs/assets/js/1731.371fb57d.js +1 -0
- data/tools/staticdocs/assets/js/{1c0a0c05.ddb465d3.js → 1c0a0c05.35a848fc.js} +1 -1
- data/tools/staticdocs/assets/js/{2047b354.6cacf929.js → 2047b354.1fd954bf.js} +1 -1
- data/tools/staticdocs/assets/js/{22b3ac48.7b94bcf3.js → 22b3ac48.9afe5dd8.js} +1 -1
- data/tools/staticdocs/assets/js/26b8abb2.980a3452.js +1 -0
- data/tools/staticdocs/assets/js/{2bb7bf90.3bde2607.js → 2bb7bf90.aa9deeb1.js} +1 -1
- data/tools/staticdocs/assets/js/{2c15ad40.4b4b971e.js → 2c15ad40.5b907671.js} +1 -1
- data/tools/staticdocs/assets/js/3064.05d05a26.js +1 -0
- data/tools/staticdocs/assets/js/35398c5c.17c941ac.js +1 -0
- data/tools/staticdocs/assets/js/{3dd7ef3b.0221eef2.js → 3dd7ef3b.60465ff4.js} +1 -1
- data/tools/staticdocs/assets/js/{40365d27.41de4945.js → 40365d27.a658985c.js} +1 -1
- data/tools/staticdocs/assets/js/{411898ad.6f36be2d.js → 411898ad.9843564e.js} +1 -1
- data/tools/staticdocs/assets/js/42170351.0865881a.js +1 -0
- data/tools/staticdocs/assets/js/{43652efd.e2fc7748.js → 43652efd.6c00e2f7.js} +1 -1
- data/tools/staticdocs/assets/js/5191.15b90810.js +1 -0
- data/tools/staticdocs/assets/js/{53ca7c5b.eccd9100.js → 53ca7c5b.576d6c45.js} +1 -1
- data/tools/staticdocs/assets/js/{54d0d530.cec50ece.js → 54d0d530.2278fc39.js} +1 -1
- data/tools/staticdocs/assets/js/{567dad64.50613669.js → 567dad64.89733625.js} +1 -1
- data/tools/staticdocs/assets/js/{5738ba7a.cede7d7a.js → 5738ba7a.c1945cad.js} +1 -1
- data/tools/staticdocs/assets/js/{59ed27a4.1b2efe08.js → 59ed27a4.53f184ee.js} +1 -1
- data/tools/staticdocs/assets/js/{5b233ba7.9faed769.js → 5b233ba7.e3319d37.js} +1 -1
- data/tools/staticdocs/assets/js/{5bc719f6.789ebf64.js → 5bc719f6.2fc3c8f6.js} +1 -1
- data/tools/staticdocs/assets/js/{5c6ce5ec.16226a4e.js → 5c6ce5ec.87929366.js} +1 -1
- data/tools/staticdocs/assets/js/5e3ed378.dcffdeae.js +1 -0
- data/tools/staticdocs/assets/js/{5fe211ef.bfe87c27.js → 5fe211ef.e2df613c.js} +1 -1
- data/tools/staticdocs/assets/js/6317.78aef81b.js +4 -0
- data/tools/staticdocs/assets/js/6321.2b2e50c9.js +101 -0
- data/tools/staticdocs/assets/js/6831b732.5cffcb1b.js +1 -0
- data/tools/staticdocs/assets/js/{696b4199.7520348a.js → 696b4199.e21ac90d.js} +1 -1
- data/tools/staticdocs/assets/js/{6b210247.fc77f080.js → 6b210247.6948ce0a.js} +1 -1
- data/tools/staticdocs/assets/js/{6b65133b.f2b11b07.js → 6b65133b.9a650bf4.js} +1 -1
- data/tools/staticdocs/assets/js/{6f92e431.26f4227b.js → 6f92e431.42d18623.js} +1 -1
- data/tools/staticdocs/assets/js/{72c6d8a8.0b8c5d2f.js → 72c6d8a8.f72ab546.js} +1 -1
- data/tools/staticdocs/assets/js/{75e64983.8112c73c.js → 75e64983.e1b9bc7d.js} +1 -1
- data/tools/staticdocs/assets/js/8330.134a0142.js +1 -0
- data/tools/staticdocs/assets/js/{867640d5.6bc9ed72.js → 867640d5.a8e8538f.js} +1 -1
- data/tools/staticdocs/assets/js/{89e76475.6411e788.js → 89e76475.32c89b40.js} +1 -1
- data/tools/staticdocs/assets/js/{8b939c74.5e039b7a.js → 8b939c74.99379b35.js} +1 -1
- data/tools/staticdocs/assets/js/{8f7843ee.fb130406.js → 8f7843ee.e62c6e1f.js} +1 -1
- data/tools/staticdocs/assets/js/{9424f0b3.90296433.js → 9424f0b3.bf3ec778.js} +1 -1
- data/tools/staticdocs/assets/js/{964eb012.94a1dac1.js → 964eb012.4e5410df.js} +1 -1
- data/tools/staticdocs/assets/js/{97535711.3e76daa6.js → 97535711.b76a8c8c.js} +1 -1
- data/tools/staticdocs/assets/js/{99581c43.48391a19.js → 99581c43.c34f316a.js} +1 -1
- data/tools/staticdocs/assets/js/{9d6e81d0.c9e12517.js → 9d6e81d0.09ec34de.js} +1 -1
- data/tools/staticdocs/assets/js/{9fb6059a.2473a196.js → 9fb6059a.88b86038.js} +1 -1
- data/tools/staticdocs/assets/js/{a677c089.4e7df83d.js → a677c089.08bdd6d4.js} +1 -1
- data/tools/staticdocs/assets/js/{a9987364.5ca31d27.js → a9987364.f143fcf5.js} +1 -1
- data/tools/staticdocs/assets/js/a9b2dc27.307c7457.js +1 -0
- data/tools/staticdocs/assets/js/aa6b6c1b.daef5095.js +1 -0
- data/tools/staticdocs/assets/js/b062d239.09ce80e1.js +1 -0
- data/tools/staticdocs/assets/js/{b38a6d74.b0b07b64.js → b38a6d74.00258c8b.js} +1 -1
- data/tools/staticdocs/assets/js/{b4596165.8792340f.js → b4596165.fa18ea16.js} +1 -1
- data/tools/staticdocs/assets/js/b6d70f94.22bbfe27.js +1 -0
- data/tools/staticdocs/assets/js/{b9f60ba6.f2b60175.js → b9f60ba6.f6e2591d.js} +1 -1
- data/tools/staticdocs/assets/js/{bd0034eb.f33ae892.js → bd0034eb.b3071da1.js} +1 -1
- data/tools/staticdocs/assets/js/{c24eae19.4d25de93.js → c24eae19.4d680f8b.js} +1 -1
- data/tools/staticdocs/assets/js/{c956ad1e.38882e03.js → c956ad1e.fa55a414.js} +1 -1
- data/tools/staticdocs/assets/js/{cb8c3f08.7ca03d18.js → cb8c3f08.9d7767a0.js} +1 -1
- data/tools/staticdocs/assets/js/{cd879be4.f77d4fff.js → cd879be4.207fcb79.js} +1 -1
- data/tools/staticdocs/assets/js/cf1c01b8.85934be0.js +1 -0
- data/tools/staticdocs/assets/js/{d1b923aa.a5b3429d.js → d1b923aa.b31315e3.js} +1 -1
- data/tools/staticdocs/assets/js/d1bfc316.16fb4147.js +1 -0
- data/tools/staticdocs/assets/js/{d24bf9b6.f380debf.js → d24bf9b6.c8d15feb.js} +1 -1
- data/tools/staticdocs/assets/js/{d57a4b5d.7ce9d24e.js → d57a4b5d.90256479.js} +1 -1
- data/tools/staticdocs/assets/js/{d59d8a14.41f22286.js → d59d8a14.2ecf6a7b.js} +1 -1
- data/tools/staticdocs/assets/js/d5d77c37.1de06b83.js +1 -0
- data/tools/staticdocs/assets/js/{d66bf9c0.c87e9dc0.js → d66bf9c0.be6ef286.js} +1 -1
- data/tools/staticdocs/assets/js/{d8ca4191.b24de36d.js → d8ca4191.4cf3e03b.js} +1 -1
- data/tools/staticdocs/assets/js/d9b92eba.13b9d3a8.js +1 -0
- data/tools/staticdocs/assets/js/db8fa1d0.0714f6fa.js +1 -0
- data/tools/staticdocs/assets/js/{dbe31111.4f18bf2b.js → dbe31111.ae534424.js} +1 -1
- data/tools/staticdocs/assets/js/{dc5f7beb.d439e98e.js → dc5f7beb.28bc7f0f.js} +1 -1
- data/tools/staticdocs/assets/js/{e501b0d1.e7e284e5.js → e501b0d1.9b902145.js} +1 -1
- data/tools/staticdocs/assets/js/{f15615f1.7dcf0c73.js → f15615f1.7835e26e.js} +1 -1
- data/tools/staticdocs/assets/js/{f75a5f33.a7c7ff1d.js → f75a5f33.8fcf0643.js} +1 -1
- data/tools/staticdocs/assets/js/fd886806.efd66dbe.js +1 -0
- data/tools/staticdocs/assets/js/{main.81fa15db.js → main.355b79aa.js} +6 -6
- data/tools/staticdocs/assets/js/{runtime~main.e35f5fea.js → runtime~main.4a381777.js} +1 -1
- data/tools/staticdocs/docs/configuration/accessors.html +46 -46
- data/tools/staticdocs/docs/configuration/command.html +87 -87
- data/tools/staticdocs/docs/configuration/conversions.html +47 -47
- data/tools/staticdocs/docs/configuration/format.html +21 -21
- data/tools/staticdocs/docs/configuration/interfaces.html +55 -55
- data/tools/staticdocs/docs/configuration/limits-response.html +10 -10
- data/tools/staticdocs/docs/configuration/plugins.html +129 -124
- data/tools/staticdocs/docs/configuration/processors.html +15 -15
- data/tools/staticdocs/docs/configuration/protocols.html +66 -66
- data/tools/staticdocs/docs/configuration/ssl-tls.html +15 -15
- data/tools/staticdocs/docs/configuration/table.html +44 -44
- data/tools/staticdocs/docs/configuration/target.html +21 -21
- data/tools/staticdocs/docs/configuration/telemetry-screens.html +253 -253
- data/tools/staticdocs/docs/configuration/telemetry.html +83 -83
- data/tools/staticdocs/docs/configuration.html +2 -2
- data/tools/staticdocs/docs/development/curl.html +14 -14
- data/tools/staticdocs/docs/development/developing.html +16 -16
- data/tools/staticdocs/docs/development/json-api.html +15 -15
- data/tools/staticdocs/docs/development/log-structure.html +11 -11
- data/tools/staticdocs/docs/development/roadmap.html +4 -4
- data/tools/staticdocs/docs/development/streaming-api.html +24 -24
- data/tools/staticdocs/docs/development/testing.html +17 -17
- data/tools/staticdocs/docs/development.html +2 -2
- data/tools/staticdocs/docs/getting-started/cli.html +42 -42
- data/tools/staticdocs/docs/getting-started/generators.html +24 -24
- data/tools/staticdocs/docs/getting-started/gettingstarted.html +19 -19
- data/tools/staticdocs/docs/getting-started/installation.html +49 -19
- data/tools/staticdocs/docs/getting-started/key-concepts.html +20 -20
- data/tools/staticdocs/docs/getting-started/podman.html +23 -23
- data/tools/staticdocs/docs/getting-started/requirements.html +19 -19
- data/tools/staticdocs/docs/getting-started/upgrading.html +44 -44
- data/tools/staticdocs/docs/getting-started/util.html +25 -25
- data/tools/staticdocs/docs/getting-started.html +2 -2
- data/tools/staticdocs/docs/guides/bridges.html +14 -14
- data/tools/staticdocs/docs/guides/cfs.html +32 -32
- data/tools/staticdocs/docs/guides/custom-widgets.html +33 -33
- data/tools/staticdocs/docs/guides/dynamic-packets.html +7 -6
- data/tools/staticdocs/docs/guides/exposing-microservices.html +11 -11
- data/tools/staticdocs/docs/guides/little-endian-bitfields.html +4 -4
- data/tools/staticdocs/docs/guides/local-mode.html +13 -13
- data/tools/staticdocs/docs/guides/logging.html +9 -9
- data/tools/staticdocs/docs/guides/monitoring.html +18 -18
- data/tools/staticdocs/docs/guides/performance.html +10 -10
- data/tools/staticdocs/docs/guides/raspberrypi.html +4 -4
- data/tools/staticdocs/docs/guides/reference-architectures.html +6 -6
- data/tools/staticdocs/docs/guides/roles-permissions.html +29 -29
- data/tools/staticdocs/docs/guides/script-writing.html +75 -68
- data/tools/staticdocs/docs/guides/scripting-api.html +672 -667
- data/tools/staticdocs/docs/guides/troubleshooting.html +7 -7
- data/tools/staticdocs/docs/guides.html +2 -2
- data/tools/staticdocs/docs/meta/contributing.html +12 -12
- data/tools/staticdocs/docs/meta/licenses.html +9 -9
- data/tools/staticdocs/docs/meta/philosophy.html +3 -3
- data/tools/staticdocs/docs/meta/vulnerabilities.html +5 -5
- data/tools/staticdocs/docs/meta/xtce.html +12 -12
- data/tools/staticdocs/docs/meta.html +2 -2
- data/tools/staticdocs/docs/privacy.html +17 -17
- data/tools/staticdocs/docs/tools/admin.html +28 -28
- data/tools/staticdocs/docs/tools/autonomic.html +19 -19
- data/tools/staticdocs/docs/tools/bucket-explorer.html +11 -11
- data/tools/staticdocs/docs/tools/calendar.html +24 -24
- data/tools/staticdocs/docs/tools/cmd-sender.html +13 -13
- data/tools/staticdocs/docs/tools/cmd-tlm-server.html +24 -24
- data/tools/staticdocs/docs/tools/command-history.html +6 -6
- data/tools/staticdocs/docs/tools/command-queue.html +8 -8
- data/tools/staticdocs/docs/tools/data-extractor.html +23 -23
- data/tools/staticdocs/docs/tools/data-viewer.html +10 -10
- data/tools/staticdocs/docs/tools/handbooks.html +4 -4
- data/tools/staticdocs/docs/tools/limits-monitor.html +15 -15
- data/tools/staticdocs/docs/tools/log-explorer.html +9 -9
- data/tools/staticdocs/docs/tools/packet-viewer.html +10 -10
- data/tools/staticdocs/docs/tools/script-runner.html +36 -36
- data/tools/staticdocs/docs/tools/systemhealth.html +21 -21
- data/tools/staticdocs/docs/tools/table-manager.html +10 -10
- data/tools/staticdocs/docs/tools/tlm-grapher.html +20 -20
- data/tools/staticdocs/docs/tools/tlm-viewer.html +15 -15
- data/tools/staticdocs/docs/tools.html +2 -2
- data/tools/staticdocs/docs.html +11 -11
- data/tools/staticdocs/index.html +2 -2
- data/tools/staticdocs/lunr-index-1765917283926.json +1 -0
- data/tools/staticdocs/lunr-index.json +1 -1
- data/tools/staticdocs/markdown-page.html +3 -3
- data/tools/staticdocs/search-doc-1765917283926.json +1 -0
- data/tools/staticdocs/search-doc.json +1 -1
- metadata +92 -92
- data/tools/staticdocs/assets/js/0ff569c9.9566d390.js +0 -1
- data/tools/staticdocs/assets/js/1202.d22d6899.js +0 -101
- data/tools/staticdocs/assets/js/13196248.8bbc13cd.js +0 -1
- data/tools/staticdocs/assets/js/1596.e0bc0cb8.js +0 -1
- data/tools/staticdocs/assets/js/26b8abb2.237c47e9.js +0 -1
- data/tools/staticdocs/assets/js/3140.8b312c79.js +0 -1
- data/tools/staticdocs/assets/js/35398c5c.0f3180d9.js +0 -1
- data/tools/staticdocs/assets/js/42170351.3618f599.js +0 -1
- data/tools/staticdocs/assets/js/4581.bbe04eae.js +0 -4
- data/tools/staticdocs/assets/js/5e3ed378.9ad2dcd2.js +0 -1
- data/tools/staticdocs/assets/js/6831b732.1790429a.js +0 -1
- data/tools/staticdocs/assets/js/7399.857e78fe.js +0 -1
- data/tools/staticdocs/assets/js/9601.e8389133.js +0 -1
- data/tools/staticdocs/assets/js/a9b2dc27.1f8d5c81.js +0 -1
- data/tools/staticdocs/assets/js/aa6b6c1b.750dc927.js +0 -1
- data/tools/staticdocs/assets/js/b062d239.cd8e5784.js +0 -1
- data/tools/staticdocs/assets/js/b6d70f94.43a5cd5a.js +0 -1
- data/tools/staticdocs/assets/js/cf1c01b8.f5a9a237.js +0 -1
- data/tools/staticdocs/assets/js/d1bfc316.7c605bc5.js +0 -1
- data/tools/staticdocs/assets/js/d5d77c37.ae6fba94.js +0 -1
- data/tools/staticdocs/assets/js/d9b92eba.b08eeda4.js +0 -1
- data/tools/staticdocs/assets/js/db8fa1d0.a05e2bae.js +0 -1
- data/tools/staticdocs/assets/js/fd886806.4b383c00.js +0 -1
- data/tools/staticdocs/lunr-index-1765340262146.json +0 -1
- data/tools/staticdocs/search-doc-1765340262146.json +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([["2102"],{1981:function(e,t,a){a.r(t),a.d(t,{metadata:()=>i,default:()=>h,frontMatter:()=>d,contentTitle:()=>c,toc:()=>r,assets:()=>l});var i=JSON.parse('{"id":"tools/calendar","title":"Calendar (Enterprise)","description":"Calendar visualization of metadata, notes, and timelines","source":"@site/docs/tools/calendar.md","sourceDirName":"tools","slug":"/tools/calendar","permalink":"/tools/staticdocs/docs/tools/calendar","draft":false,"unlisted":false,"editUrl":"https://github.com/OpenC3/cosmos/tree/main/docs.openc3.com/docs/tools/calendar.md","tags":[],"version":"current","frontMatter":{"title":"Calendar (Enterprise)","description":"Calendar visualization of metadata, notes, and timelines","sidebar_custom_props":{"myEmoji":"\u{1F5D3}\uFE0F"}},"sidebar":"defaultSidebar","previous":{"title":"Bucket Explorer","permalink":"/tools/staticdocs/docs/tools/bucket-explorer"},"next":{"title":"Command Sender","permalink":"/tools/staticdocs/docs/tools/cmd-sender"}}'),n=a(7259),s=a(9796);let d={title:"Calendar (Enterprise)",description:"Calendar visualization of metadata, notes, and timelines",sidebar_custom_props:{myEmoji:"\u{1F5D3}\uFE0F"}},c,l={},r=[{value:"Introduction",id:"introduction",level:2},{value:"Adding Timelines",id:"adding-timelines",level:3},{value:"Types of Events",id:"types-of-events",level:2},{value:"Metadata",id:"metadata",level:3},{value:"Note",id:"note",level:3},{value:"Activity",id:"activity",level:3},{value:"Gantt View",id:"gantt-view",level:3},{value:"List View",id:"list-view",level:3},{value:"Settings",id:"settings",level:3},{value:"Timeline Implementation Details",id:"timeline-implementation-details",level:2}];function o(e){let t={h2:"h2",h3:"h3",img:"img",li:"li",p:"p",ul:"ul",...(0,s.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.h2,{id:"introduction",children:"Introduction"}),"\n",(0,n.jsx)(t.p,{children:"Calendar visualizes metadata, notes, and timeline information in one easy to understand place. Timelines allow for the simple execution of commands and scripts based on future dates and times."}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"Calendar",src:a(8033).A+"",width:"2562",height:"1640"})}),"\n",(0,n.jsx)(t.h3,{id:"adding-timelines",children:"Adding Timelines"}),"\n",(0,n.jsx)(t.p,{children:"Adding a Timeline to COSMOS is as simple as clicking Create -> Timeline and giving it a unique name. Timelines can be created for organizational purposes or for overlapping activities as no activities can overlap on a given timeline. However, each additional timeline consists of several threads so only create timelines as necessary."}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"Timeline",src:a(6547).A+"",width:"2056",height:"1362"})}),"\n",(0,n.jsx)(t.h2,{id:"types-of-events",children:"Types of Events"}),"\n",(0,n.jsx)(t.h3,{id:"metadata",children:"Metadata"}),"\n",(0,n.jsx)(t.p,{children:"Metadata allows you to record arbitrary data into the COSMOS system. For example, you could ask the user for inputs which fall outside the available target telemetry including operators, environmental factors, procedural steps, etc. This allows for searching metadata based on these fields and correlating the related telemetry data."}),"\n",(0,n.jsx)(t.p,{children:"You can create a new metadata item from either the Create menu or by right-clicking on the calendar in the given time slot you want the metadata item to appear. Note that metadata entries only have a start time, they do not have an end time."}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"CreateMetadata1",src:a(4339).A+"",width:"1254",height:"954"})}),"\n",(0,n.jsx)(t.p,{children:"You then add key / value pairs for all the metadata items you want to create."}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"CreateMetadata2",src:a(9848).A+"",width:"1704",height:"1190"})}),"\n",(0,n.jsx)(t.h3,{id:"note",children:"Note"}),"\n",(0,n.jsx)(t.p,{children:"Notes require both a start and end time."}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"CreateNote1",src:a(8274).A+"",width:"1642",height:"1238"})}),"\n",(0,n.jsx)(t.p,{children:"You then record the note to create the note event on the calendar."}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"CreateNote2",src:a(2809).A+"",width:"1534",height:"1286"})}),"\n",(0,n.jsx)(t.h3,{id:"activity",children:"Activity"}),"\n",(0,n.jsx)(t.p,{children:"Scheduled on a timeline, activities take both a start and end time. A custom title and notes can also be specified. If a custom title is specified, that title will appear on the calendar instead of the default title that is generated."}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"CreateActivity1",src:a(3211).A+"",width:"1440",height:"1420"})}),"\n",(0,n.jsx)(t.p,{children:'Activities can run single commands, run a script, or simply "Reserve" space on the calendar for reference or other bookkeeping.'}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"CreateActivity2",src:a(7808).A+"",width:"1930",height:"1290"})}),"\n",(0,n.jsx)(t.p,{children:"When calendar activities are scheduled they appear with a status icon, compliant with the AstroUX standards. As calendar activities are executed, there are lifecycle hooks set to track and display the latest status update from the executed script or command. Green circle will signify nominal (created, started, completed states), yellow square signifies warnings (script stopped, paused, hit breakpoint, completed with errors, disabled), and red triangle signifies error states (error, failed, crashed). Clicking into a Calendar Activity will show the details of the status updates."}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"Activity",src:a(2885).A+"",width:"1590",height:"1346"})}),"\n",(0,n.jsx)(t.h3,{id:"gantt-view",children:"Gantt View"}),"\n",(0,n.jsx)(t.p,{children:"Calendar events can be viewed as a Gantt chart view via the \"Gantt\" button. Gantt view shows a day's worth of activity, and users can click the next day / previous day buttons to view other day's events."}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"Gantt View",src:a(2028).A+"",width:"2570",height:"1488"})}),"\n",(0,n.jsx)(t.h3,{id:"list-view",children:"List View"}),"\n",(0,n.jsx)(t.p,{children:"Calendar events can be viewed as a List view via the \"List\" button. List view shows a day's worth of activity, and users can click the next day / previous day buttons to view other day's events."}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"List View",src:a(308).A+"",width:"2566",height:"1290"})}),"\n",(0,n.jsx)(t.h3,{id:"settings",children:"Settings"}),"\n",(0,n.jsx)(t.p,{children:"By clicking File -> Options, the options can be modified. The configurations include:"}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsx)(t.li,{children:"Calendar view can be modified to be Sunday - Saturday view or Monday - Sunday"}),"\n",(0,n.jsx)(t.li,{children:"The default view modified to Calendar, Gantt, or List"}),"\n",(0,n.jsx)(t.li,{children:"The progress icon indicating the script is currently running can be modified"}),"\n"]}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"Options",src:a(3982).A+"",width:"1270",height:"1296"})}),"\n",(0,n.jsx)(t.h2,{id:"timeline-implementation-details",children:"Timeline Implementation Details"}),"\n",(0,n.jsx)(t.p,{children:"When a user creates a timeline, a new timeline microservice starts. The timeline microservice is the main thread of execution for the timeline. This starts a scheduler manager thread. The scheduler manager thread contains a thread pool that hosts more than one thread to run the activity. The scheduler manager will evaluate the schedule and based on the start time of the activity it will add the activity to the queue."}),"\n",(0,n.jsx)(t.p,{children:'The main thread will block on the web socket to listen to request changes to the timeline, these could be adding, removing, or updating activities. The main thread will make the changes to the in memory schedule if these changes are within the hour of the current time. When the web socket gets an update it has an action lookup table. These actions are "created", "updated", "deleted", etc... Some actions require updating the schedule from the database to ensure the schedule and the database are always in sync.'}),"\n",(0,n.jsx)(t.p,{children:"The schedule thread checks every second to make sure if a task can be run. If the start time is equal or less then the last 15 seconds it will then check the previously queued jobs list in the schedule. If the activity has not been queued and is not fulfilled the activity will be queued, this adds an event to the activity but is not saved to the database."}),"\n",(0,n.jsx)(t.p,{children:"The workers block on the queue until an activity is placed on the queue. Once a job is pulled from the queue they check the type and run the activity. The thread will mark the activity fulfillment true and update the database record with the complete. If the worker gets an error while trying to run the task the activity will NOT be fulfilled and record the error in the database."}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"Timeline Lifecycle",src:a(4494).A+"",width:"1065",height:"514"})})]})}function h(e={}){let{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(o,{...e})}):o(e)}},2885:function(e,t,a){a.d(t,{A:()=>i});let i=a.p+"assets/images/activity-35dc5e3ab907ff79a599ab728b7a4ace155d86835a09f0c6fa8ceebf184b7984.png"},8033:function(e,t,a){a.d(t,{A:()=>i});let i=a.p+"assets/images/blank_calendar-e02977fafde5379efc62fbaf82686898bfc4745dd081d62e52e3ee94c46bff69.png"},3211:function(e,t,a){a.d(t,{A:()=>i});let i=a.p+"assets/images/create_activity1-5e5a8cee97e818c21e3447d96797b950fe25eb5d0e153ffc899183d28b7fd1be.png"},7808:function(e,t,a){a.d(t,{A:()=>i});let i=a.p+"assets/images/create_activity2-12024f05a06874c9e7b544bac4bec1a263de1715dcb9fa2dc1aea054682e8269.png"},4339:function(e,t,a){a.d(t,{A:()=>i});let i=a.p+"assets/images/create_metadata1-70387fe6ea1aafaee24b4192e76000b31ed60d3a54f957d761cefb5d21498814.png"},9848:function(e,t,a){a.d(t,{A:()=>i});let i=a.p+"assets/images/create_metadata2-ebb8f148142b387c81df70f8a565b27942ff5f6cd5bc098a6d58a27a9b36c09e.png"},8274:function(e,t,a){a.d(t,{A:()=>i});let i=a.p+"assets/images/create_note1-28feb5cf0ad0899db78059dc4ea2567dc9cb03c8c776f1c65dd959f2910481f4.png"},2809:function(e,t,a){a.d(t,{A:()=>i});let i=a.p+"assets/images/create_note2-c0929ea9194606f256465cd6a6c97c60c175cf2ecbf56e6597d4886b4249fe1f.png"},2028:function(e,t,a){a.d(t,{A:()=>i});let i=a.p+"assets/images/gantt_view-3fe75622572f4a5bab2f73311127b71db5bf5aed475b90a2938c9ae61810ea54.png"},308:function(e,t,a){a.d(t,{A:()=>i});let i=a.p+"assets/images/list_view-edfc7b6fa90e43b85dd862f06c3662dee33b3c79be923a955706001d2f07eca4.png"},3982:function(e,t,a){a.d(t,{A:()=>i});let i=a.p+"assets/images/options-4cb5e315138437db9f25c87feb4be2c61738c03bc3344d46977f44a94b0af738.png"},6547:function(e,t,a){a.d(t,{A:()=>i});let i=a.p+"assets/images/timeline-78e3ab74af1b600eb6640831133f0240a9c20047956b18b729263988a66b8e00.png"},4494:function(e,t,a){a.d(t,{A:()=>i});let i=a.p+"assets/images/timeline_lifecycle-0bd916dee06bf67936b043abfdbc4d5fdec7cc5a32a889ee6c05e9faf74f4c6a.png"},9796:function(e,t,a){a.d(t,{R:()=>d,x:()=>c});var i=a(6363);let n={},s=i.createContext(n);function d(e){let t=i.useContext(s);return i.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function c(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:d(e.components),i.createElement(s.Provider,{value:t},e.children)}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([["1596"],{6848:function(e,n,s){s.d(n,{A:()=>p});var t=s(7259);s(6363);var a=s(3526),i=s(4800),l=s(9399),r=s(8146),o=s(2322),c=s(7226),d=s(2029);function u(e){return(0,t.jsx)("svg",{viewBox:"0 0 24 24",...e,children:(0,t.jsx)("path",{d:"M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z",fill:"currentColor"})})}function h(){let e=(0,d.Ay)("/");return(0,t.jsx)("li",{className:"breadcrumbs__item",children:(0,t.jsx)(o.A,{"aria-label":(0,c.T)({id:"theme.docs.breadcrumbs.home",message:"Home page",description:"The ARIA label for the home page in the breadcrumbs"}),className:"breadcrumbs__link",href:e,children:(0,t.jsx)(u,{className:"breadcrumbHomeIcon_K3oZ"})})})}var m=s(5400),x=s(6822);function b(e){let n=function({breadcrumbs:e}){let{siteConfig:n}=(0,x.A)();return{"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:e.filter(e=>e.href).map((e,s)=>({"@type":"ListItem",position:s+1,name:e.label,item:`${n.url}${e.href}`}))}}({breadcrumbs:e.breadcrumbs});return(0,t.jsx)(m.A,{children:(0,t.jsx)("script",{type:"application/ld+json",children:JSON.stringify(n)})})}function v({children:e,href:n,isLast:s}){let a="breadcrumbs__link";return s?(0,t.jsx)("span",{className:a,children:e}):n?(0,t.jsx)(o.A,{className:a,href:n,children:(0,t.jsx)("span",{children:e})}):(0,t.jsx)("span",{className:a,children:e})}function j({children:e,active:n}){return(0,t.jsx)("li",{className:(0,a.A)("breadcrumbs__item",{"breadcrumbs__item--active":n}),children:e})}function p(){let e=(0,l.OF)(),n=(0,r.Dt)();return e?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(b,{breadcrumbs:e}),(0,t.jsx)("nav",{className:(0,a.A)(i.G.docs.docBreadcrumbs,"breadcrumbsContainer_xF7v"),"aria-label":(0,c.T)({id:"theme.docs.breadcrumbs.navAriaLabel",message:"Breadcrumbs",description:"The ARIA label for the breadcrumbs"}),children:(0,t.jsxs)("ul",{className:"breadcrumbs",children:[n&&(0,t.jsx)(h,{}),e.map((n,s)=>{let a=s===e.length-1,i="category"===n.type&&n.linkUnlisted?void 0:n.href;return(0,t.jsx)(j,{active:a,children:(0,t.jsx)(v,{href:i,isLast:a,children:n.label})},s)})]})})]}):null}},6743:function(e,n,s){s.r(n),s.d(n,{default:()=>R});var t=s(7259),a=s(6363),i=s(3283),l=s(9125);let r=a.createContext(null);function o({children:e,content:n}){let s=(0,a.useMemo)(()=>({metadata:n.metadata,frontMatter:n.frontMatter,assets:n.assets,contentTitle:n.contentTitle,toc:n.toc}),[n]);return(0,t.jsx)(r.Provider,{value:s,children:e})}function c(){let e=(0,a.useContext)(r);if(null===e)throw new l.dV("DocProvider");return e}function d(){let{metadata:e,frontMatter:n,assets:s}=c();return(0,t.jsx)(i.be,{title:e.title,description:e.description,keywords:n.keywords,image:s.image??n.image})}var u=s(3526),h=s(9862),m=s(9587);function x(){let{metadata:e}=c();return(0,t.jsx)(m.A,{className:"docusaurus-mt-lg",previous:e.previous,next:e.next})}var b=s(9351),v=s(2116),j=s(4800),p=s(7226),g=s(2322);function f({permalink:e,label:n,count:s,description:a}){return(0,t.jsxs)(g.A,{rel:"tag",href:e,title:a,className:(0,u.A)("tag_qAx8",s?"tagWithCount_lMog":"tagRegular_VHzT"),children:[n,s&&(0,t.jsx)("span",{children:s})]})}function A({tags:e}){return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("b",{children:(0,t.jsx)(p.A,{id:"theme.tags.tagsListLabel",description:"The label alongside a tag list",children:"Tags:"})}),(0,t.jsx)("ul",{className:(0,u.A)("tags_XYyG","padding--none","margin-left--sm"),children:e.map(e=>(0,t.jsx)("li",{className:"tag_Uyx6",children:(0,t.jsx)(f,{...e})},e.permalink))})]})}var _=s(6270);function N(){let{metadata:e}=c(),{editUrl:n,lastUpdatedAt:s,lastUpdatedBy:a,tags:i}=e,l=i.length>0,r=!!(n||s||a);return l||r?(0,t.jsxs)("footer",{className:(0,u.A)(j.G.docs.docFooter,"docusaurus-mt-lg"),children:[l&&(0,t.jsx)("div",{className:(0,u.A)("row margin-top--sm",j.G.docs.docFooterTagsRow),children:(0,t.jsx)("div",{className:"col",children:(0,t.jsx)(A,{tags:i})})}),r&&(0,t.jsx)(_.A,{className:(0,u.A)("margin-top--sm",j.G.docs.docFooterEditMetaRow),editUrl:n,lastUpdatedAt:s,lastUpdatedBy:a})]}):null}var L=s(3155),T=s(6620);function k({collapsed:e,...n}){return(0,t.jsx)("button",{type:"button",...n,className:(0,u.A)("clean-btn","tocCollapsibleButton_HWoo",!e&&"tocCollapsibleButtonExpanded_bqFE",n.className),children:(0,t.jsx)(p.A,{id:"theme.TOCCollapsible.toggleButtonLabel",description:"The label used by the button on the collapsible TOC component",children:"On this page"})})}function C({toc:e,className:n,minHeadingLevel:s,maxHeadingLevel:a}){let{collapsed:i,toggleCollapsed:l}=(0,L.u)({initialState:!0});return(0,t.jsxs)("div",{className:(0,u.A)("tocCollapsible_R7Xp",!i&&"tocCollapsibleExpanded_SXnI",n),children:[(0,t.jsx)(k,{collapsed:i,onClick:l}),(0,t.jsx)(L.N,{lazy:!0,className:"tocCollapsibleContent_H58p",collapsed:i,children:(0,t.jsx)(T.A,{toc:e,minHeadingLevel:s,maxHeadingLevel:a})})]})}function y(){let{toc:e,frontMatter:n}=c();return(0,t.jsx)(C,{toc:e,minHeadingLevel:n.toc_min_heading_level,maxHeadingLevel:n.toc_max_heading_level,className:(0,u.A)(j.G.docs.docTocMobile,"tocMobile_efly")})}var w=s(3125);function H(){let{toc:e,frontMatter:n}=c();return(0,t.jsx)(w.A,{toc:e,minHeadingLevel:n.toc_min_heading_level,maxHeadingLevel:n.toc_max_heading_level,className:j.G.docs.docTocDesktop})}var M=s(4123),B=s(9491);function V({children:e}){let n=function(){let{metadata:e,frontMatter:n,contentTitle:s}=c();return n.hide_title||void 0!==s?null:e.title}();return(0,t.jsxs)("div",{className:(0,u.A)(j.G.docs.docMarkdown,"markdown"),children:[n&&(0,t.jsx)("header",{children:(0,t.jsx)(M.A,{as:"h1",children:n})}),(0,t.jsx)(B.A,{children:e})]})}var G=s(6848),F=s(6473);function I({children:e}){let n=function(){let{frontMatter:e,toc:n}=c(),s=(0,h.l)(),a=e.hide_table_of_contents,i=!a&&n.length>0;return{hidden:a,mobile:i?(0,t.jsx)(y,{}):void 0,desktop:i&&("desktop"===s||"ssr"===s)?(0,t.jsx)(H,{}):void 0}}(),{metadata:s}=c();return(0,t.jsxs)("div",{className:"row",children:[(0,t.jsxs)("div",{className:(0,u.A)("col",!n.hidden&&"docItemCol_r8QP"),children:[(0,t.jsx)(F.A,{metadata:s}),(0,t.jsx)(b.A,{}),(0,t.jsxs)("div",{className:"docItemContainer_rPX_",children:[(0,t.jsxs)("article",{children:[(0,t.jsx)(G.A,{}),(0,t.jsx)(v.A,{}),n.mobile,(0,t.jsx)(V,{children:e}),(0,t.jsx)(N,{})]}),(0,t.jsx)(x,{})]})]}),n.desktop&&(0,t.jsx)("div",{className:"col col--3",children:n.desktop})]})}function R(e){let n=`docs-doc-id-${e.content.metadata.id}`,s=e.content;return(0,t.jsx)(o,{content:e.content,children:(0,t.jsxs)(i.e3,{className:n,children:[(0,t.jsx)(d,{}),(0,t.jsx)(I,{children:(0,t.jsx)(s,{})})]})})}},9587:function(e,n,s){s.d(n,{A:()=>o});var t=s(7259);s(6363);var a=s(3526),i=s(7226),l=s(2322);function r(e){let{permalink:n,title:s,subLabel:i,isNext:r}=e;return(0,t.jsxs)(l.A,{className:(0,a.A)("pagination-nav__link",r?"pagination-nav__link--next":"pagination-nav__link--prev"),to:n,children:[i&&(0,t.jsx)("div",{className:"pagination-nav__sublabel",children:i}),(0,t.jsx)("div",{className:"pagination-nav__label",children:s})]})}function o(e){let{className:n,previous:s,next:l}=e;return(0,t.jsxs)("nav",{className:(0,a.A)(n,"pagination-nav"),"aria-label":(0,i.T)({id:"theme.docs.paginator.navAriaLabel",message:"Docs pages",description:"The ARIA label for the docs pagination"}),children:[s&&(0,t.jsx)(r,{...s,subLabel:(0,t.jsx)(i.A,{id:"theme.docs.paginator.previous",description:"The label used to navigate to the previous doc",children:"Previous"})}),l&&(0,t.jsx)(r,{...l,subLabel:(0,t.jsx)(i.A,{id:"theme.docs.paginator.next",description:"The label used to navigate to the next doc",children:"Next"}),isNext:!0})]})}},2116:function(e,n,s){s.d(n,{A:()=>o});var t=s(7259);s(6363);var a=s(3526),i=s(7226),l=s(4800),r=s(9138);function o({className:e}){let n=(0,r.r)();return n.badge?(0,t.jsx)("span",{className:(0,a.A)(e,l.G.docs.docVersionBadge,"badge badge--secondary"),children:(0,t.jsx)(i.A,{id:"theme.docs.versionBadge.label",values:{versionLabel:n.label},children:"Version: {versionLabel}"})}):null}},9351:function(e,n,s){s.d(n,{A:()=>v});var t=s(7259);s(6363);var a=s(3526),i=s(6822),l=s(2322),r=s(7226),o=s(778),c=s(4800),d=s(7183),u=s(9138);let h={unreleased:function({siteTitle:e,versionMetadata:n}){return(0,t.jsx)(r.A,{id:"theme.docs.versions.unreleasedVersionLabel",description:"The label used to tell the user that he's browsing an unreleased doc version",values:{siteTitle:e,versionLabel:(0,t.jsx)("b",{children:n.label})},children:"This is unreleased documentation for {siteTitle} {versionLabel} version."})},unmaintained:function({siteTitle:e,versionMetadata:n}){return(0,t.jsx)(r.A,{id:"theme.docs.versions.unmaintainedVersionLabel",description:"The label used to tell the user that he's browsing an unmaintained doc version",values:{siteTitle:e,versionLabel:(0,t.jsx)("b",{children:n.label})},children:"This is documentation for {siteTitle} {versionLabel}, which is no longer actively maintained."})}};function m(e){let n=h[e.versionMetadata.banner];return(0,t.jsx)(n,{...e})}function x({versionLabel:e,to:n,onClick:s}){return(0,t.jsx)(r.A,{id:"theme.docs.versions.latestVersionSuggestionLabel",description:"The label used to tell the user to check the latest version",values:{versionLabel:e,latestVersionLink:(0,t.jsx)("b",{children:(0,t.jsx)(l.A,{to:n,onClick:s,children:(0,t.jsx)(r.A,{id:"theme.docs.versions.latestVersionLinkLabel",description:"The label used for the latest version suggestion link label",children:"latest version"})})})},children:"For up-to-date documentation, see the {latestVersionLink} ({versionLabel})."})}function b({className:e,versionMetadata:n}){let{siteConfig:{title:s}}=(0,i.A)(),{pluginId:l}=(0,o.vT)({failfast:!0}),{savePreferredVersionName:r}=(0,d.g1)(l),{latestDocSuggestion:u,latestVersionSuggestion:h}=(0,o.HW)(l),b=u??h.docs.find(e=>e.id===h.mainDocId);return(0,t.jsxs)("div",{className:(0,a.A)(e,c.G.docs.docVersionBanner,"alert alert--warning margin-bottom--md"),role:"alert",children:[(0,t.jsx)("div",{children:(0,t.jsx)(m,{siteTitle:s,versionMetadata:n})}),(0,t.jsx)("div",{className:"margin-top--md",children:(0,t.jsx)(x,{versionLabel:h.label,to:b.path,onClick:()=>r(h.name)})})]})}function v({className:e}){let n=(0,u.r)();return n.banner?(0,t.jsx)(b,{className:e,versionMetadata:n}):null}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([["2009"],{4204:function(e,c,s){s.r(c),s.d(c,{default:()=>d});var r=s(7259);s(6363);var n=s(3526),o=s(3283),u=s(4800),a=s(2073),t=s(8345);function d(e){return(0,r.jsx)(o.e3,{className:(0,n.A)(u.G.wrapper.docsPages),children:(0,r.jsx)(t.A,{children:(0,a.v)(e.route.routes)})})}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([["3140"],{7023:function(c,e,o){o.r(e)}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([["7397"],{2522:function(e,t,a){a.r(t),a.d(t,{metadata:()=>n,default:()=>p,frontMatter:()=>c,contentTitle:()=>o,toc:()=>d,assets:()=>r});var n=JSON.parse('{"id":"guides/dynamic-packets","title":"Dynamic Packets","description":"How COSMOS dynamically builds packets","source":"@site/docs/guides/dynamic-packets.md","sourceDirName":"guides","slug":"/guides/dynamic-packets","permalink":"/tools/staticdocs/docs/guides/dynamic-packets","draft":false,"unlisted":false,"editUrl":"https://github.com/OpenC3/cosmos/tree/main/docs.openc3.com/docs/guides/dynamic-packets.md","tags":[],"version":"current","frontMatter":{"title":"Dynamic Packets","description":"How COSMOS dynamically builds packets","sidebar_custom_props":{"myEmoji":"\u{1F9F1}"}},"sidebar":"defaultSidebar","previous":{"title":"Custom Widgets","permalink":"/tools/staticdocs/docs/guides/custom-widgets"},"next":{"title":"Exposing Microservices","permalink":"/tools/staticdocs/docs/guides/exposing-microservices"}}'),i=a(7259),s=a(9796);let c={title:"Dynamic Packets",description:"How COSMOS dynamically builds packets",sidebar_custom_props:{myEmoji:"\u{1F9F1}"}},o,r={},d=[{value:"Using Dynamic Update",id:"using-dynamic-update",level:2}];function l(e){let t={a:"a",code:"code",h2:"h2",li:"li",ol:"ol",p:"p",pre:"pre",...(0,s.R)(),...e.components},{TabItem:a,Tabs:n}=t;return a||m("TabItem",!0),n||m("Tabs",!0),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(t.p,{children:["COSMOS has the ability to dynamically build packets rather than have them statically defined by our ",(0,i.jsx)(t.a,{href:"/docs/configuration/command",children:"COMMAND"})," and ",(0,i.jsx)(t.a,{href:"/docs/configuration/telemetry",children:"TELEMETRY"})," configuration files. This is useful when your telemetry items are dynamic like when generating ",(0,i.jsx)(t.a,{href:"https://prometheus.io/",children:"prometheus"})," metrics."]}),"\n",(0,i.jsxs)(t.p,{children:["The best way to illustrate this capability is with an example. If you're an Enterprise customer, please see the ",(0,i.jsx)(t.a,{href:"https://github.com/OpenC3/cosmos-enterprise-plugins/tree/main/openc3-cosmos-prometheus-metrics",children:"prometheus-metrics"})," plugin."]}),"\n",(0,i.jsx)(t.h2,{id:"using-dynamic-update",children:"Using Dynamic Update"}),"\n",(0,i.jsxs)(t.p,{children:["To use the dynamic update capability in your own code you need to call the ",(0,i.jsx)(t.code,{children:"TargetModel"})," ",(0,i.jsx)(t.code,{children:"dynamic_update"})," method. This method takes an array / list of packets, whether the packets are commands or telemetry, and the filename to create in the config bucket."]}),"\n",(0,i.jsx)(t.p,{children:"Here is the method signature:"}),"\n",(0,i.jsxs)(n,{groupId:"script-language",children:[(0,i.jsx)(a,{value:"ruby",label:"Ruby Method",children:(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-ruby",children:'def dynamic_update(packets, cmd_or_tlm = :TELEMETRY, filename = "dynamic_tlm.txt")\n'})})}),(0,i.jsx)(a,{value:"python",label:"Python Method",children:(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-python",children:'def dynamic_update(self, packets, cmd_or_tlm="TELEMETRY", filename="dynamic_tlm.txt"):\n'})})})]}),"\n",(0,i.jsx)(t.p,{children:"Here is an example of using this method:"}),"\n",(0,i.jsxs)(n,{groupId:"script-language",children:[(0,i.jsx)(a,{value:"ruby",label:"Ruby Example",children:(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-ruby",children:"# Create a new packet\npacket = Packet.new('INST', 'NEW_PACKET')\n# or get an existing packet\npacket = System.telemetry.packet('INST', 'METRICS')\n# Modify the packet by appending new items to it\npacket.append_item('NEW_ITEM', 32, :FLOAT)\n# Grab the TargetModel associated with the packet's target\ntarget_model = TargetModel.get_model(name: 'INST', scope: 'DEFAULT')\n# Update the target model with the new packet\ntarget_model.dynamic_update([packet])\n"})})}),(0,i.jsx)(a,{value:"python",label:"Python Example",children:(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-python",children:"# Create a new packet\npacket = Packet('INST', 'NEW_PACKET')\n# or get an existing packet\npacket = System.telemetry.packet('INST', 'METRICS')\n# Modify the packet by appending new items to it\npacket.append_item('NEW_ITEM', 32, 'FLOAT')\n# Grab the TargetModel associated with the packet's target\ntarget_model = TargetModel.get_model(name='INST', scope='DEFAULT')\n# Update the target model with the new packet\ntarget_model.dynamic_update([packet])\n"})})})]}),"\n",(0,i.jsx)(t.p,{children:"When this method is called several things happen:"}),"\n",(0,i.jsxs)(t.ol,{children:["\n",(0,i.jsx)(t.li,{children:"The COSMOS Redis database is updated with the new packets and the current value table is initialized"}),"\n",(0,i.jsxs)(t.li,{children:["A configuration file for the packets is created and stored at <SCOPE>/targets_modified/<TARGET>/cmd_tlm/dynamic_tlm.txt. Note that if you call ",(0,i.jsx)(t.code,{children:"dynamic_update"})," multiple times you should update the filename so it is not written over."]}),"\n",(0,i.jsx)(t.li,{children:"The COSMOS microservices are informed of the new streaming topics which will contain the raw and decommuted packet data. Part of this action is to restart the microservices so they pickup these changes. For COMMANDS the following are restarted: <SCOPE>__COMMANDLOG__<TARGET> and <SCOPE>__DECOMCMDLOG__<TARGET>. For TELEMETRY the following are restarted: <SCOPE>__PACKET_LOG__<TARGET>, <SCOPE>__DECOMLOG__<TARGET>, and <SCOPE>__DECOM__<TARGET>."}),"\n"]}),"\n",(0,i.jsxs)(t.p,{children:["Since ",(0,i.jsx)(t.code,{children:"dynamic_update"})," restarts the LOG microservices there is a potential for a loss of packets during the restart. Thus you should not call ",(0,i.jsx)(t.code,{children:"dynamic_update"})," during critical telemetry processing periods."]})]})}function p(e={}){let{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(l,{...e})}):l(e)}function m(e,t){throw Error("Expected "+(t?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}},9796:function(e,t,a){a.d(t,{R:()=>c,x:()=>o});var n=a(6363);let i={},s=n.createContext(i);function c(e){let t=n.useContext(s);return n.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function o(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:c(e.components),n.createElement(s.Provider,{value:t},e.children)}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([["7785"],{522:function(e,n,t){t.r(n),t.d(n,{metadata:()=>i,default:()=>h,frontMatter:()=>a,contentTitle:()=>o,toc:()=>c,assets:()=>l});var i=JSON.parse('{"id":"guides/script-writing","title":"Script Writing Guide","description":"Key concepts and best practices for script writing","source":"@site/docs/guides/script-writing.md","sourceDirName":"guides","slug":"/guides/script-writing","permalink":"/tools/staticdocs/docs/guides/script-writing","draft":false,"unlisted":false,"editUrl":"https://github.com/OpenC3/cosmos/tree/main/docs.openc3.com/docs/guides/script-writing.md","tags":[],"version":"current","frontMatter":{"title":"Script Writing Guide","description":"Key concepts and best practices for script writing","sidebar_custom_props":{"myEmoji":"\u{1F3C3}\u200D\u27A1\uFE0F"}},"sidebar":"defaultSidebar","previous":{"title":"Roles and Permissions","permalink":"/tools/staticdocs/docs/guides/roles-permissions"},"next":{"title":"Scripting API Guide","permalink":"/tools/staticdocs/docs/guides/scripting-api"}}'),s=t(7259),r=t(9796);let a={title:"Script Writing Guide",description:"Key concepts and best practices for script writing",sidebar_custom_props:{myEmoji:"\u{1F3C3}\u200D\u27A1\uFE0F"}},o,l={},c=[{value:"Introduction",id:"introduction",level:2},{value:"Concepts",id:"concepts",level:2},{value:"Ruby vs Python in COSMOS",id:"ruby-vs-python-in-cosmos",level:3},{value:"Scripting Philosophy",id:"scripting-philosophy",level:2},{value:"A Super Basic Script Example",id:"a-super-basic-script-example",level:3},{value:"KISS (Keep It Simple Stupid)",id:"kiss-keep-it-simple-stupid",level:3},{value:"Keep things DRY (Don't Repeat Yourself)",id:"keep-things-dry-dont-repeat-yourself",level:3},{value:"Use Comments Appropriately",id:"use-comments-appropriately",level:3},{value:"Script Runner",id:"script-runner",level:3},{value:"Looping vs Unrolled Loops",id:"looping-vs-unrolled-loops",level:3},{value:"Script Organization",id:"script-organization",level:2},{value:"Organizing Your Scripts into a Plugin",id:"organizing-your-scripts-into-a-plugin",level:3},{value:"Organize Scripts into Methods",id:"organize-scripts-into-methods",level:3},{value:"Using Classes vs Unscoped Methods",id:"using-classes-vs-unscoped-methods",level:3},{value:"Instrumented vs Uninstrumented Lines (require vs load)",id:"instrumented-vs-uninstrumented-lines-require-vs-load",level:3},{value:"Debugging and Auditing",id:"debugging-and-auditing",level:2},{value:"Built-In Debugging Capabilities",id:"built-in-debugging-capabilities",level:3},{value:"Breakpoints",id:"breakpoints",level:3},{value:"Using Disconnect Mode",id:"using-disconnect-mode",level:3},{value:"Auditing your Scripts",id:"auditing-your-scripts",level:3},{value:"Ruby Syntax Check",id:"ruby-syntax-check",level:4},{value:"Common Scenarios",id:"common-scenarios",level:2},{value:"User Input Best Practices",id:"user-input-best-practices",level:3},{value:"Conditionally Require Manual User Input Steps",id:"conditionally-require-manual-user-input-steps",level:3},{value:"Outputting Extra Information to a Report",id:"outputting-extra-information-to-a-report",level:3},{value:"Getting the Most Recent Value of a Telemetry Point from Multiple Packets",id:"getting-the-most-recent-value-of-a-telemetry-point-from-multiple-packets",level:3},{value:"Checking Every Single Sample of a Telemetry Point",id:"checking-every-single-sample-of-a-telemetry-point",level:3},{value:"Using Variables in Mnemonics",id:"using-variables-in-mnemonics",level:3},{value:"Using Custom wait_check_expression",id:"using-custom-wait_check_expression",level:3},{value:"COSMOS Scripting Differences from Regular Ruby Scripting",id:"cosmos-scripting-differences-from-regular-ruby-scripting",level:3},{value:"Do not use single line if statements",id:"do-not-use-single-line-if-statements",level:4},{value:"When Things Go Wrong",id:"when-things-go-wrong",level:2},{value:"Common Reasons Checks Fail",id:"common-reasons-checks-fail",level:3},{value:"How to Recover from Anomalies",id:"how-to-recover-from-anomalies",level:3},{value:"Advanced Topics",id:"advanced-topics",level:2},{value:"Advanced Script Configuration with CSV or Excel",id:"advanced-script-configuration-with-csv-or-excel",level:3},{value:"When to use Ruby Modules",id:"when-to-use-ruby-modules",level:3}];function d(e){let n={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",h4:"h4",li:"li",ol:"ol",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,r.R)(),...e.components},{TabItem:t,Tabs:i}=n;return t||u("TabItem",!0),i||u("Tabs",!0),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h2,{id:"introduction",children:"Introduction"}),"\n",(0,s.jsx)(n.p,{children:"This guide aims to provide the best practices for using the scripting capabilities provided by COSMOS. Scripts are used to automate a series of activities for operations or testing. The goal of this document is to ensure scripts are written that are simple, easy to understand, maintainable, and correct. Guidance on some of the key details of using the COSMOS Script Runner is also provided."}),"\n",(0,s.jsx)(n.h2,{id:"concepts",children:"Concepts"}),"\n",(0,s.jsx)(n.p,{children:"COSMOS supports both Ruby and Python for writing scripts. Ruby and Python are very similar scripting languages and most of this guide applies directly to both. Where examples are used, both a Ruby and Python example are given."}),"\n",(0,s.jsx)(n.h3,{id:"ruby-vs-python-in-cosmos",children:"Ruby vs Python in COSMOS"}),"\n",(0,s.jsx)(n.p,{children:"There are many similarities and a few key differences between Ruby and Python when it comes to writing COSMOS scripts."}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsx)(n.li,{children:"There is no 80 character limit on line length. Lines can be as long as you like, but be careful to not make them too long as it makes printed reviews of scripts more difficult."}),"\n",(0,s.jsxs)(n.li,{children:["Indentation white space:","\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["Ruby: Not significant. Ruby uses the ",(0,s.jsx)(n.code,{children:"end"})," keyword to determine indented code blocks with a standard of 2 spaces."]}),"\n",(0,s.jsx)(n.li,{children:"Python: Significant. Python uses indentation to determine code blocks with a standard of 4 spaces."}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.li,{children:"Variables do not have to be declared ahead of time and can be reassigned later, i.e. Ruby and Python are dynamically typed."}),"\n",(0,s.jsxs)(n.li,{children:["Variable interpolation:","\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["Ruby: Variable values can be placed into strings using the ",(0,s.jsx)(n.code,{children:'"#{variable}"'})," syntax."]}),"\n",(0,s.jsxs)(n.li,{children:["Python: Variable values can be placed into f-strings using the ",(0,s.jsx)(n.code,{children:'f"{variable}"'})," syntax."]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.li,{children:"A variable declared inside of a block or loop will not exist outside of that block unless it was already declared."}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"Both languages provides a script writer a lot of power. But with great power comes great responsibility. Remember when writing your scripts that you or someone else will come along later and need to understand them. Therefore use the following style guidelines:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Use consistent spacing for indentation and do NOT use tabs"}),"\n",(0,s.jsxs)(n.li,{children:["Constants should be all caps with underscores","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"SPEED_OF_LIGHT = 299792458 # meters per s"})}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["Variable names and method names should be in lowercase with underscores","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:'last_name = "Smith"'})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"perform_setup_operation()"})}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["Class names (when used) should be camel case and the files which contain them should match but be lowercase with underscores","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"class DataUploader # in 'data_uploader.rb'"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:"class CcsdsUtility: # in 'ccsds_utility.py'"})}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.li,{children:"Don't add useless comments but instead describe intent"}),"\n"]}),"\n",(0,s.jsx)("div",{style:{clear:"both"}}),"\n",(0,s.jsx)(n.p,{children:"The following is an example of good Ruby style:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ruby",children:"load 'TARGET/lib/upload_utility.rb' # library we do NOT want to show executing\nload_utility 'TARGET/lib/helper_utility.rb' # library we do want to show executing\n\n# Declare constants\nOUR_TARGETS = ['INST','INST2']\n\n# Clear the collect counter of the passed in target name\ndef clear_collects(target)\n cmd(\"#{target} CLEAR\")\n wait_check(\"#{target} HEALTH_STATUS COLLECTS == 0\", 5)\nend\n\n######################################\n# START\n######################################\nhelper = HelperUtility.new\nhelper.setup\n\n# Perform collects on all the targets\nOUR_TARGETS.each do |target|\n collects = tlm(\"#{target} HEALTH_STATUS COLLECTS\")\n cmd(\"#{target} COLLECT with TYPE SPECIAL\")\n wait_check(\"#{target} HEALTH_STATUS COLLECTS == #{collects + 1}\", 5)\nend\n\nclear_collects('INST')\nclear_collects('INST2')\n"})}),"\n",(0,s.jsx)(n.p,{children:"The following is an example of good Python style:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"from openc3.script import *\n\nimport TARGET.lib.upload_utility # library we do NOT want to show executing\nload_utility('TARGET/lib/helper_utility.rb') # library we do want to show executing\n\n# Declare constants\nOUR_TARGETS = ['INST','INST2']\n\n# Clear the collect counter of the passed in target name\ndef clear_collects(target):\n cmd(f\"{target} CLEAR\")\n wait_check(f\"{target} HEALTH_STATUS COLLECTS == 0\", 5)\n\n######################################\n# START\n######################################\nhelper = HelperUtility()\nhelper.setup()\n\n# Perform collects on all the targets\nfor target in OUR_TARGETS:\n collects = tlm(f\"{target} HEALTH_STATUS COLLECTS\")\n cmd(f\"{target} COLLECT with TYPE SPECIAL\")\n wait_check(f\"{target} HEALTH_STATUS COLLECTS == {collects + 1}\", 5)\n\nclear_collects('INST')\nclear_collects('INST2')\n"})}),"\n",(0,s.jsx)(n.p,{children:"Both examples shows several features of COSMOS scripting in action. Notice the difference between 'load' or 'import' and 'load_utility'. The first is to load additional scripts which will NOT be shown in Script Runner when executing. This is a good place to put code which takes a long time to run such as image analysis or other looping code where you just want the output. 'load_utility' will visually execute the code line by line to show the user what is happening."}),"\n",(0,s.jsx)(n.p,{children:"Next we declare our constants and create an array of strings which we store in OUR_TARGETS. Notice the constant is all uppercase with underscores."}),"\n",(0,s.jsx)(n.p,{children:"Then we declare our local methods of which we have one called clear_collects. Please provide a comment at the beginning of each method describing what it does and the parameters that it takes."}),"\n",(0,s.jsx)(n.p,{children:"The 'helper_utility' is then created. Note the similarity in the class name and the file name we loaded."}),"\n",(0,s.jsxs)(n.p,{children:["The collect example shows how you can iterate over the array of strings we previously created and use variables when commanding and checking telemetry. The Ruby pound bracket #",' notation and python f-string f"'," notation puts whatever the variable holds into the string. You can even execute additional code inside the brackets like we do when checking for the collect count to increment."]}),"\n",(0,s.jsx)(n.p,{children:"Finally we call our 'clear_collects' method on each target by passing the target name."}),"\n",(0,s.jsx)(n.h2,{id:"scripting-philosophy",children:"Scripting Philosophy"}),"\n",(0,s.jsx)(n.h3,{id:"a-super-basic-script-example",children:"A Super Basic Script Example"}),"\n",(0,s.jsx)(n.p,{children:"Most COSMOS scripts can be broken down into the simple pattern of sending a command to a system/subsystem and then verifying that the command worked as expected. This pattern is most commonly implemented with cmd() followed by wait_check(), like the following:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ruby",children:'cmd("INST COLLECT with TYPE NORMAL, TEMP 10.0")\nwait_check("INST HEALTH_STATUS TYPE == \'NORMAL\'", 5)\n'})}),"\n",(0,s.jsx)(n.p,{children:"or similarly with a counter that is sampled before the command."}),"\n",(0,s.jsxs)(i,{groupId:"script-language",children:[(0,s.jsx)(t,{value:"ruby",label:"Ruby",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ruby",children:'count = tlm("INST HEALTH_STATUS COLLECTS")\ncmd("INST COLLECT with TYPE NORMAL, TEMP 10.0")\nwait_check("INST HEALTH_STATUS COLLECTS >= #{count + 1}", 5)\n'})})}),(0,s.jsx)(t,{value:"python",label:"Python",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:'count = tlm("INST HEALTH_STATUS COLLECTS")\ncmd("INST COLLECT with TYPE NORMAL, TEMP 10.0")\nwait_check(f"INST HEALTH_STATUS COLLECTS >= {count + 1}", 5)\n'})})})]}),"\n",(0,s.jsx)(n.p,{children:"90% of the COSMOS scripts you write should be the simple patterns shown above except that you may need to check more than one item after each command to make sure the command worked as expected."}),"\n",(0,s.jsx)(n.h3,{id:"kiss-keep-it-simple-stupid",children:"KISS (Keep It Simple Stupid)"}),"\n",(0,s.jsx)(n.p,{children:"Ruby and Python are very powerful languages with many ways to accomplish the same thing. Given that, always choose the method that is easiest to understand for yourself and others. While it is possible to create complex one liners or obtuse regular expressions, you'll thank yourself later by expanding complex one liners and breaking up and documenting regular expressions."}),"\n",(0,s.jsx)(n.h3,{id:"keep-things-dry-dont-repeat-yourself",children:"Keep things DRY (Don't Repeat Yourself)"}),"\n",(0,s.jsx)(n.p,{children:"A widespread problem in scripts written for any command and control system is large blocks of code that are repeated multiple times. In extreme cases, this has led to 100,000+ line scripts that are impossible to maintain and review."}),"\n",(0,s.jsx)(n.p,{children:"There are two common ways repetition presents itself: exact blocks of code to perform a common action such as powering on a subsystem, and blocks of code that only differ in the name of the mnemonic being checked or the values checked against. Both are solved by removing the repetition using methods (or functions)."}),"\n",(0,s.jsx)(n.p,{children:"For example, a script that powers on a subsystem and ensures correct telemetry would become:"}),"\n",(0,s.jsxs)(i,{groupId:"script-language",children:[(0,s.jsx)(t,{value:"ruby",label:"Ruby",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ruby",children:"def power_on_subsystem\n # 100 lines of cmd(), wait_check(), etc\nend\n"})})}),(0,s.jsx)(t,{value:"python",label:"Python",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"def power_on_subsystem():\n # 100 lines of cmd(), wait_check(), etc\n"})})})]}),"\n",(0,s.jsx)(n.p,{children:"Ideally, the above methods would be stored in another file where it could be used by other scripts. If it is truly only useful in the one script, then it could be at the top of the file. The updated script would then look like:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ruby",children:"power_on_subsystem()\n# 150 lines operating the subsystem (e.g.)\n# cmd(...)\n# wait_check(...)\n#...\npower_off_subystem()\n# Unrelated activities\npower_on_subsystem()\n# etc.\n"})}),"\n",(0,s.jsx)(n.p,{children:"Blocks of code where only the only variation is the mnemonics or values checked can be replaced by methods with arguments."}),"\n",(0,s.jsxs)(i,{groupId:"script-language",children:[(0,s.jsx)(t,{value:"ruby",label:"Ruby",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ruby",children:'def test_minimum_temp(enable_cmd_name, enable_tlm, temp_tlm, expected_temp)\n cmd("TARGET #{enable_cmd_name} with ENABLE TRUE")\n wait_check("TARGET #{enable_tlm} == \'TRUE\'", 5)\n wait_check("TARGET #{temp_tlm} >= #{expected_temp}", 50)\nend\n'})})}),(0,s.jsx)(t,{value:"python",label:"Python",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:'def test_minimum_temp(enable_cmd_name, enable_tlm, temp_tlm, expected_temp):\n cmd(f"TARGET {enable_cmd_name} with ENABLE TRUE")\n wait_check(f"TARGET {enable_tlm} == \'TRUE\'", 5)\n wait_check(f"TARGET {temp_tlm} >= {expected_temp}", 50)\n'})})})]}),"\n",(0,s.jsx)(n.h3,{id:"use-comments-appropriately",children:"Use Comments Appropriately"}),"\n",(0,s.jsx)(n.p,{children:"Use comments when what you are doing is unclear or there is a higher-level purpose to a set of lines. Try to avoid putting numbers or other details in a comment as they can become out of sync with the underlying code. Ruby and Python comments start with a # pound symbol and can be anywhere on a line."}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ruby",children:'# This line sends an abort command - BAD COMMENT, UNNECESSARY\ncmd("INST ABORT")\n# Rotate the gimbal to look at the calibration target - GOOD COMMENT\ncmd("INST ROTATE with ANGLE 180.0") # Rotate 180 degrees - BAD COMMENT\n'})}),"\n",(0,s.jsx)(n.h3,{id:"script-runner",children:"Script Runner"}),"\n",(0,s.jsx)(n.p,{children:"COSMOS provides two unique ways to run scripts (also known as procedures). Script Runner provides both a script execution environment and a script editor. The script editor includes code completion for both COSMOS methods and command/telemetry item names. It is also a great environment to develop and test scripts. Script Runner provides a framework for users that are familiar with a traditional scripting model with longer style procedures, and for users that want to be able to edit their scripts in place."}),"\n",(0,s.jsx)(n.p,{children:"When opening a suite file (named with 'suite') Script Runner provides a more formal, but also more powerful, environment for running scripts. Suite files breaks scripts down into suites, groups, and scripts (individual methods). Suites are the highest-level concept and would typically cover a large procedure such as a thermal vacuum test, or a large operations scenario such as performing on orbit checkout. Groups capture a related set of scripts such as all the scripts regarding a specific mechanism. A Group might be a collection of scripts all related to a subsystem, or a specific series of tests such as an RF checkout. Scripts capture individual activities that can either pass or fail. Script Runner allows for running an entire suite, one or more groups, or one or more scripts easily. It also automatically produces reports containing timing, pass / fail counts, etc."}),"\n",(0,s.jsx)(n.p,{children:"The correct environment for the job is up to individual users, and many programs will use both script formats to complete their goals."}),"\n",(0,s.jsx)(n.h3,{id:"looping-vs-unrolled-loops",children:"Looping vs Unrolled Loops"}),"\n",(0,s.jsx)(n.p,{children:"Loops are powerful constructs that allow you to perform the same operations multiple times without having to rewrite the same code over and over (See the DRY Concept). However, they can make restarting a COSMOS script at the point of a failure difficult or impossible. If there is a low probability of something failing, then loops are an excellent choice. If a script is running a loop over a list of telemetry points, it may be a better choice to \u201Cunroll\u201D the loop by making the loop body into a method, and then calling that method directly for each iteration of a loop that would have occurred."}),"\n",(0,s.jsxs)(i,{groupId:"script-language",children:[(0,s.jsx)(t,{value:"ruby",label:"Ruby",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ruby",children:"10.times do |temperature_number|\n check_temperature(temperature_number + 1)\nend\n"})})}),(0,s.jsx)(t,{value:"python",label:"Python",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"for temperature_number in range(1, 11):\n check_temperature(temperature_number)\n"})})})]}),"\n",(0,s.jsx)(n.p,{children:"If the above script was stopped after temperature number 3, there would be no way to restart the loop at temperature number 4. A better solution for small loop counts is to unroll the loop."}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ruby",children:"check_temperature(1)\ncheck_temperature(2)\ncheck_temperature(3)\ncheck_temperature(4)\ncheck_temperature(5)\ncheck_temperature(6)\ncheck_temperature(7)\ncheck_temperature(8)\ncheck_temperature(9)\ncheck_temperature(10)\n"})}),"\n",(0,s.jsx)(n.p,{children:"In the unrolled version above, the COSMOS \u201CStart script at selected line\u201D feature can be used to resume the script at any point."}),"\n",(0,s.jsx)(n.h2,{id:"script-organization",children:"Script Organization"}),"\n",(0,s.jsxs)(n.p,{children:["All scripts must be part of a ",(0,s.jsx)(n.a,{href:"/tools/staticdocs/docs/configuration/plugins",children:"Plugin"}),". You can create a simple plugin called SCRIPTS or PROCEDURES that only contains lib and procedures directories to store scripts. If COSMOS detects a plugin without defined cmd/tlm it will not spawn microservices for telemetry processing."]}),"\n",(0,s.jsx)(n.h3,{id:"organizing-your-scripts-into-a-plugin",children:"Organizing Your Scripts into a Plugin"}),"\n",(0,s.jsx)(n.p,{children:"As your scripts become large with many methods, it makes sense to break them up into multiple files within a plugin. Here is a recommended organization for your plugin's scripts/procedures."}),"\n",(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{children:"Folder"}),(0,s.jsx)(n.th,{children:"Description"})]})}),(0,s.jsxs)(n.tbody,{children:[(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"targets/TARGET_NAME/lib"}),(0,s.jsx)(n.td,{children:"Place script files containing reusable target specific methods here"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"targets/TARGET_NAME/procedures"}),(0,s.jsx)(n.td,{children:"Place simple procedures that are centered around one specific target here"})]})]})]}),"\n",(0,s.jsx)(n.p,{children:"In your main procedure you will usually bring in the other files with instrumentation using load_utility."}),"\n",(0,s.jsxs)(i,{groupId:"script-language",children:[(0,s.jsx)(t,{value:"ruby",label:"Ruby",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ruby",children:"load_utility('TARGET/lib/my_other_script.rb')\n"})})}),(0,s.jsx)(t,{value:"python",label:"Python",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"load_utility('TARGET/procedures/my_other_script.py')\n"})})})]}),"\n",(0,s.jsx)(n.h3,{id:"organize-scripts-into-methods",children:"Organize Scripts into Methods"}),"\n",(0,s.jsx)(n.p,{children:"Put each activity into a distinct method. Putting your scripts into methods makes organization easy and gives a great high-level overview of what the overall script does (assuming you name the methods well). There are no bonus points for vague, short method names. Make your method names long and clear."}),"\n",(0,s.jsxs)(i,{groupId:"script-language",children:[(0,s.jsx)(t,{value:"ruby",label:"Ruby",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ruby",children:'def test_1_heater_zone_control\n puts "Verifies requirements 304, 306, and 310"\n # Test code here\nend\n\ndef script_1_heater_zone_control\n puts "Verifies requirements 304, 306, and 310"\n # Test code here\nend\n'})})}),(0,s.jsx)(t,{value:"python",label:"Python",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:'def test_1_heater_zone_control():\n print("Verifies requirements 304, 306, and 310")\n # Test code here\n\ndef script_1_heater_zone_control():\n print("Verifies requirements 304, 306, and 310")\n # Test code here\n'})})})]}),"\n",(0,s.jsx)(n.h3,{id:"using-classes-vs-unscoped-methods",children:"Using Classes vs Unscoped Methods"}),"\n",(0,s.jsx)(n.p,{children:"Classes in object-oriented programming allow you to organize a set of related methods and some associated state. The most important aspect is that the methods work on some shared state. For example, if you have code that moves a gimbal around, and need to keep track of the number of moves, or steps, performed across methods, then that is a wonderful place to use a class. If you just need a helper method to do something that happens multiple times in a script without copy and pasting, it probably does not need to be in a class."}),"\n",(0,s.jsx)(n.p,{children:"NOTE: The convention in COSMOS is to have a TARGET/lib/target.[rb/py] file which is named after the TARGET name and contains a class called Target. This discussion refers to scripts in the TARGET/procedures directory."}),"\n",(0,s.jsxs)(i,{groupId:"script-language",children:[(0,s.jsx)(t,{value:"ruby",label:"Ruby",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ruby",children:'class Gimbal\n attr_accessor :gimbal_steps\n def initialize()\n @gimbal_steps = 0\n end\n def move(steps_to_move)\n # Move the gimbal\n @gimbal_steps += steps_to_move\n end\n def home_gimbal\n # Home the gimbal\n @gimbal_steps = 0\n end\nend\n\ndef perform_common_math(x, y)\n x + y\nend\n\ngimbal = Gimbal.new\ngimbal.home_gimbal\ngimbal.move(100)\ngimbal.move(200)\nputs "Moved gimbal #{gimbal.gimbal_steps}"\nresult = perform_common_math(gimbal.gimbal_steps, 10)\nputs "Math:#{result}"\n'})})}),(0,s.jsx)(t,{value:"python",label:"Python",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:'class Gimbal:\n def __init__(self):\n self.gimbal_steps = 0\n\n def move(self, steps_to_move):\n # Move the gimbal\n self.gimbal_steps += steps_to_move\n\n def home_gimbal(self):\n # Home the gimbal\n self.gimbal_steps = 0\n\ndef perform_common_math(x, y):\n return x + y\n\ngimbal = Gimbal()\ngimbal.home_gimbal()\ngimbal.move(100)\ngimbal.move(200)\nprint(f"Moved gimbal {gimbal.gimbal_steps}")\nresult = perform_common_math(gimbal.gimbal_steps, 10)\nprint(f"Math:{result}")\n'})})})]}),"\n",(0,s.jsx)(n.h3,{id:"instrumented-vs-uninstrumented-lines-require-vs-load",children:"Instrumented vs Uninstrumented Lines (require vs load)"}),"\n",(0,s.jsx)(n.p,{children:"COSMOS scripts are normally \u201Cinstrumented\u201D. This means that each line has some extra code added behind the scenes that primarily highlights the current executing line and catches exceptions if things fail such as a wait_check. If your script needs to use code in other files, there are a few ways to bring in that code. Some techniques bring in instrumented code and others bring in uninstrumented code. There are reasons to use both."}),"\n",(0,s.jsx)(n.p,{children:"load_utility (and the deprecated require_utility), bring in instrumented code from other files. When COSMOS runs the code in the other file, Script Runner will dive into the other file and show each line highlighted as it executes. This should be the default way to bring in other files, as it allows continuing if something fails, and provides better visibility to operators."}),"\n",(0,s.jsx)(n.p,{children:"However, sometimes you don't want to display code executing from other files. Externally developed libraries generally do not like to be instrumented, and code that contains large loops or that just takes a long time to execute when highlighting lines, will be much faster if included in a method that does not instrument lines. Ruby provides two ways to bring in uninstrumented code. The first is the \u201Cload\u201D keyword. Load will bring in the code from another file and will bring in any changes to the file if it is updated on the next call to load. \u201Crequire\u201D is like load but is optimized to only bring in the code from another file once. Therefore, if you use require and then change the file it requires, you must restart Script Runner to re-require the file and bring in the changes. In general, load is recommended over require for COSMOS scripting. One gotcha with load is that it requires the full filename including extension, while the require keyword does not."}),"\n",(0,s.jsx)(n.p,{children:"In Python, libraries are included using the import syntax. Any code imported using import is not instrumented. Only the code imported using load_utility is instrumented."}),"\n",(0,s.jsx)(n.p,{children:"Finally, COSMOS scripting has a special syntax for disabling instrumentation in the middle of an instrumented script, with the disable_instrumentation method. This allows you to disable instrumentation for large loops and other activities that are too slow when running instrumented."}),"\n",(0,s.jsxs)(i,{groupId:"script-language",children:[(0,s.jsx)(t,{value:"ruby",label:"Ruby",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ruby",children:"temp = 0\ndisable_instrumentation do\n # Make sure nothing in here will raise exceptions!\n 5000000.times do\n temp += 1\n end\nend\nputs temp\n"})})}),(0,s.jsx)(t,{value:"python",label:"Python",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"temp = 0\nwith disable_instrumentation():\n # Make sure nothing in here will raise exceptions!\n for x in range(0,5000000):\n temp += 1\nprint(temp)\n"})})})]}),"\n",(0,s.jsx)(n.admonition,{title:"When Running Uninstrumented Code",type:"warning",children:(0,s.jsx)(n.p,{children:"Make sure that the code will not raise any exceptions or have any check failures. If an exception is raised from uninstrumented code, then your entire script will stop."})}),"\n",(0,s.jsx)(n.h2,{id:"debugging-and-auditing",children:"Debugging and Auditing"}),"\n",(0,s.jsx)(n.h3,{id:"built-in-debugging-capabilities",children:"Built-In Debugging Capabilities"}),"\n",(0,s.jsx)(n.p,{children:"Script Runner has built in debugging capabilities that can be useful in determining why your script is behaving in a certain way. Of primary importance is the ability to inspect and set script variables."}),"\n",(0,s.jsx)(n.p,{children:"To use the debugging functionality, first select the \u201CToggle Debug\u201D option from the Script Menu. This will add a small Debug: prompt to the bottom of the tool. Any code entered in this prompt will be executed when Enter is pressed. To inspect variables in a running script, pause the script and then type the variable name to print out the value of the variable in the debug prompt."}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ruby",children:"variable_name\n"})}),"\n",(0,s.jsx)(n.p,{children:"Variables can also be set simply by using equals."}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ruby",children:"variable_name = 5\n"})}),"\n",(0,s.jsx)(n.p,{children:"If necessary, you can also inject commands from the debug prompt using the normal commanding methods. These commands will be logged to the Script Runner message log, which may be advantageous over using a different COSMOS tool like CmdSender (where the command would only be logged in the CmdTlmServer message log)."}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ruby",children:'cmd("INST COLLECT with TYPE NORMAL")\n'})}),"\n",(0,s.jsx)(n.p,{children:"Note that the debug prompt keeps the command history and you can scroll through the history by using the up and down arrows."}),"\n",(0,s.jsx)(n.h3,{id:"breakpoints",children:"Breakpoints"}),"\n",(0,s.jsx)(n.p,{children:"You can click the line number (left side gutter) in Script Runner to add a breakpoint. The script will automatically pause when it hits the breakpoint. Once stopped at the breakpoint, you can evaluate variables using the Debug line."}),"\n",(0,s.jsx)(n.h3,{id:"using-disconnect-mode",children:"Using Disconnect Mode"}),"\n",(0,s.jsx)(n.p,{children:"Disconnect mode is a feature of Script Runner that allows testing scripts in an environment without real hardware in the loop. Disconnect mode is started by selecting Script -> Toggle Disconnect. Once selected, the user is prompted to select which targets to disconnect. By default, all targets are disconnected, which allows for testing scripts without any real hardware. Optionally, only a subset of targets can be selected which can be useful for trying out scripts in partially integrated environments."}),"\n",(0,s.jsx)(n.p,{children:"While in disconnect mode, commands to the disconnected targets always succeed. Additionally, all checks of disconnected targets' telemetry are immediately successful. This allows for a quick run-through of procedures for logic errors and other script specific errors without having to worry about the behavior and proper functioning of hardware."}),"\n",(0,s.jsx)(n.h3,{id:"auditing-your-scripts",children:"Auditing your Scripts"}),"\n",(0,s.jsx)(n.p,{children:"Script Runner includes several tools to help audit your scripts both before and after execution."}),"\n",(0,s.jsx)(n.h4,{id:"ruby-syntax-check",children:"Ruby Syntax Check"}),"\n",(0,s.jsx)(n.p,{children:"The Ruby Syntax Check tool is found under the Script Menu. This tool uses the ruby executable with the -c flag to run a syntax check on your script. If any syntax errors are found the exact message presented by the Ruby interpreter is shown to the user. These can be cryptic, but the most common faults are not closing a quoted string, forgetting an \u201Cend\u201D keyword, or using a block but forgetting the proceeding \u201Cdo\u201D keyword."}),"\n",(0,s.jsx)(n.h2,{id:"common-scenarios",children:"Common Scenarios"}),"\n",(0,s.jsx)(n.h3,{id:"user-input-best-practices",children:"User Input Best Practices"}),"\n",(0,s.jsx)(n.p,{children:"COSMOS provides several different methods to gather manual user input in scripts. When using user input methods that allow for arbitrary values (like ask() and ask_string()), it is very important to validate the value given in your script before moving on. When asking for text input, it is extra important to handle different casing possibilities and to ensure that invalid input will either re-prompt the user or take a safe path."}),"\n",(0,s.jsxs)(i,{groupId:"script-language",children:[(0,s.jsx)(t,{value:"ruby",label:"Ruby",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ruby",children:'answer = ask_string("Do you want to continue (y/n)?")\nif answer != \'y\' and answer != \'Y\'\n raise "User entered: #{answer}"\nend\n\ntemp = 0.0\nwhile temp < 10.0 or temp > 50.0\n temp = ask("Enter the desired temperature between 10.0 and 50.0")\nend\n'})})}),(0,s.jsx)(t,{value:"python",label:"Python",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:'answer = ask_string("Do you want to continue (y/n)?")\nif answer != \'y\' and answer != \'Y\':\n raise RuntimeError(f"User entered: {answer}")\n\ntemp = 0.0\nwhile temp < 10.0 or temp > 50.0:\n temp = ask("Enter the desired temperature between 10.0 and 50.0")\n'})})})]}),"\n",(0,s.jsx)(n.p,{children:"When possible, always use one of the other user input methods that has a constrained list of choices for your users (message_box, vertical_message_box, combo_box)."}),"\n",(0,s.jsx)(n.p,{children:"Note that all these user input methods provide the user the option to \u201CCancel\u201D. When cancel is clicked, the script is paused but remains at the user input line. When hitting \u201CGo\u201D to the continue, the user will be re-prompted to enter the value."}),"\n",(0,s.jsx)(n.h3,{id:"conditionally-require-manual-user-input-steps",children:"Conditionally Require Manual User Input Steps"}),"\n",(0,s.jsx)(n.p,{children:"When possible, a useful design pattern is to write your scripts such that they can run without prompting for any user input. This allows the scripts to be more easily tested and provides a documented default value for any user input choices or values. To implement this pattern, all manual steps such as ask(), prompt(), and infinite wait() statements need to be wrapped with an if statement that checks the value of $manual in Ruby or RunningScript.manual in Python. If the variable is set, then the manual steps should be executed. If not, then a default value should be used."}),"\n",(0,s.jsxs)(i,{groupId:"script-language",children:[(0,s.jsx)(t,{value:"ruby",label:"Ruby",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ruby",children:'if $manual\n temp = ask("Please enter the temperature")\nelse\n temp = 20.0\nend\nif !$manual\n puts "Skipping infinite wait in auto mode"\nelse\n wait\nend\n'})})}),(0,s.jsx)(t,{value:"python",label:"Python",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:'if RunningScript.manual:\n temp = ask("Please enter the temperature")\nelse:\n temp = 20.0\nif not RunningScript.manual:\n print("Skipping infinite wait in auto mode")\nelse:\n wait()\n'})})})]}),"\n",(0,s.jsx)(n.p,{children:"When running suites, there is a checkbox at the top of the tool called \u201CManual\u201D that affects this $manual variable directly."}),"\n",(0,s.jsx)(n.h3,{id:"outputting-extra-information-to-a-report",children:"Outputting Extra Information to a Report"}),"\n",(0,s.jsx)(n.p,{children:"COSMOS Script Runner operating on a script suite automatically generates a report that shows the PASS/FAILED/SKIPPED state for each script. You can also inject arbitrary text into this report using the example as follows. Alternatively, you can simply use print text into the Script Runner message log."}),"\n",(0,s.jsxs)(i,{groupId:"script-language",children:[(0,s.jsx)(t,{value:"ruby",label:"Ruby",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ruby",children:'class MyGroup < OpenC3::Group\n def script_1\n # The following text will be placed in the report\n OpenC3::Group.puts "Verifies requirements 304, 306, 310"\n # This puts line will show up in the sr_messages log file\n puts "script_1 complete"\n end\nend\n'})})}),(0,s.jsx)(t,{value:"python",label:"Python",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:'from openc3.script.suite import Group\nclass MyGroup(Group):\n def script_1():\n # The following text will be placed in the report\n Group.print("Verifies requirements 304, 306, 310")\n # This puts line will show up in the sr_messages log file\n print("script_1 complete")\n'})})})]}),"\n",(0,s.jsx)(n.h3,{id:"getting-the-most-recent-value-of-a-telemetry-point-from-multiple-packets",children:"Getting the Most Recent Value of a Telemetry Point from Multiple Packets"}),"\n",(0,s.jsx)(n.p,{children:"Some systems include high rate data points with the same name in every packet. COSMOS supports getting the most recent value of a telemetry point that is in multiple packets using a special packet name of LATEST. Assume the target INST has two packets, PACKET1 and PACKET2. Both packets have a telemetry point called TEMP."}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ruby",children:'# Get the value of TEMP from the most recently received PACKET1\nvalue = tlm("INST PACKET1 TEMP")\n# Get the value of TEMP from the most recently received PACKET2\nvalue = tlm("INST PACKET2 TEMP")\n# Get the value of TEMP from the most recently received PACKET1 or PACKET2\nvalue = tlm("INST LATEST TEMP")\n'})}),"\n",(0,s.jsx)(n.h3,{id:"checking-every-single-sample-of-a-telemetry-point",children:"Checking Every Single Sample of a Telemetry Point"}),"\n",(0,s.jsx)(n.p,{children:"When writing COSMOS scripts, checking the most recent value of a telemetry point normally gets the job done. The tlm(), tlm_raw(), etc methods all retrieve the most recent value of a telemetry point. Sometimes you need to perform analysis on every single sample of a telemetry point. This can be done using the COSMOS packet subscription system. The packet subscription system lets you choose one or more packets and receive them all from a queue. You can then pick out the specific telemetry points you care about from each packet."}),"\n",(0,s.jsxs)(i,{groupId:"script-language",children:[(0,s.jsx)(t,{value:"ruby",label:"Ruby",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ruby",children:"id = subscribe_packets([['INST', 'HEALTH_STATUS'], ['INST', 'ADCS']])\nwait 1.5\nid, packets = get_packets(id)\npackets.each do |packet|\n puts \"#{packet['PACKET_TIMESECONDS']}: #{packet['target_name']} #{packet['packet_name']}\"\nend\n# Wait for some time later and reuse the last returned ID\nid, packets = get_packets(id)\n"})})}),(0,s.jsx)(t,{value:"python",label:"Python",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"id = subscribe_packets([['INST', 'HEALTH_STATUS'], ['INST', 'ADCS']])\nwait(1.5)\nid, packets = get_packets(id)\nfor packet in packets:\n print(f\"{packet['PACKET_TIMESECONDS']}: {packet['target_name']} {packet['packet_name']}\")\n# Wait for some time later and reuse the last returned ID\nid, packets = get_packets(id)\n"})})})]}),"\n",(0,s.jsx)(n.h3,{id:"using-variables-in-mnemonics",children:"Using Variables in Mnemonics"}),"\n",(0,s.jsx)(n.p,{children:"Because command and telemetry mnemonics are just strings in COSMOS scripts, you can make use of variables in some contexts to make reusable code. For example, a method can take a target name as an input to support multiple instances of a target. You could also pass in the value for a set of numbered telemetry points."}),"\n",(0,s.jsxs)(i,{groupId:"script-language",children:[(0,s.jsx)(t,{value:"ruby",label:"Ruby",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ruby",children:'def example(target_name, temp_number)\n cmd("#{target_name} COLLECT with TYPE NORMAL")\n wait_check("#{target_name} TEMP#{temp_number} > 50.0")\nend\n'})})}),(0,s.jsx)(t,{value:"python",label:"Python",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:'def example(target_name, temp_number):\n cmd(f"{target_name} COLLECT with TYPE NORMAL")\n wait_check(f"{target_name} TEMP{temp_number} > 50.0")\n'})})})]}),"\n",(0,s.jsxs)(n.p,{children:["This can also be useful when looping through a numbered set of telemetry points but be considerate of the downsides of looping as discussed in the ",(0,s.jsx)(n.a,{href:"#looping-vs-unrolled-loops",children:"Looping vs Unrolled Loops"})," section."]}),"\n",(0,s.jsx)(n.h3,{id:"using-custom-wait_check_expression",children:"Using Custom wait_check_expression"}),"\n",(0,s.jsx)(n.p,{children:"The COSMOS wait_check_expression (and check_expression) allow you to perform more complicated checks and still stop the script with a CHECK error message if something goes wrong. For example, you can check variables against each other or check a telemetry point against a range. The exact string of text passed to wait_check_expression is repeatedly evaluated until it passes, or a timeout occurs. It is important to not use string interpolation within the actual expression or the values inside of the string interpolation syntax will only be evaluated once when it is converted into a string."}),"\n",(0,s.jsxs)(i,{groupId:"script-language",children:[(0,s.jsx)(t,{value:"ruby",label:"Ruby",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ruby",children:'one = 1\ntwo = 2\n\nwait_check_expression("one == two", 1)\n# ERROR: CHECK: one == two is FALSE after waiting 1.017035 seconds\n\n# Checking an integer range\nwait_check_expression("one > 0 and one < 10 # init value one = #{one}", 1)\n'})})}),(0,s.jsx)(t,{value:"python",label:"Python",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:'one = 1\ntwo = 2\n\nwait_check_expression("one == two", 1, 0.25, locals())\n# ERROR: CHECK: one == two is FALSE after waiting 1.017035 seconds\n\n# Checking an integer range\nwait_check_expression("one > 0 and one < 10", 1, 0.25, locals())\n'})})})]}),"\n",(0,s.jsx)(n.h3,{id:"cosmos-scripting-differences-from-regular-ruby-scripting",children:"COSMOS Scripting Differences from Regular Ruby Scripting"}),"\n",(0,s.jsx)(n.h4,{id:"do-not-use-single-line-if-statements",children:"Do not use single line if statements"}),"\n",(0,s.jsx)(n.p,{children:"COSMOS scripting instruments each line to catch exceptions if things go wrong. With single line if statements the exception handling doesn't know which part of the statement failed and cannot properly continue. If an exception is raised in a single line if statement, then the entire script will stop and not be able to continue. Do not use single line if statements in COSMOS scripts. (However, they are fine to use in interfaces and other Ruby code, just not COSMOS scripts)."}),"\n",(0,s.jsx)(n.p,{children:"Don't do this:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ruby",children:'run_method() if tlm("INST HEALTH_STATUS TEMP1") > 10.0\n'})}),"\n",(0,s.jsx)(n.p,{children:"Do this instead:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ruby",children:'# It is best not to execute any code that could fail in an if statement, ie\n# tlm() could fail if the CmdTlmServer was not running or a mnemonic\n# was misspelled\ntemp1 = tlm("INST HEALTH_STATUS TEMP1")\nif temp1 > 10.0\n run_method()\nend\n'})}),"\n",(0,s.jsx)(n.h2,{id:"when-things-go-wrong",children:"When Things Go Wrong"}),"\n",(0,s.jsx)(n.h3,{id:"common-reasons-checks-fail",children:"Common Reasons Checks Fail"}),"\n",(0,s.jsx)(n.p,{children:"There are three common reasons that checks fail in COSMOS scripts:"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"The delay given was too short"}),"\n",(0,s.jsx)(n.p,{children:"The wait_check() method takes a timeout that indicates how long to wait for the referenced telemetry point to pass the check. The timeout needs to be large enough for the system under test to finish its action and for updated telemetry to be received. Note that the script will continue as soon as the check completes successfully. Thus, the only penalty for a longer timeout is the additional wait time in a failure condition."}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"The range or value checked against was incorrect or too stringent"}),"\n",(0,s.jsx)(n.p,{children:"Often the actual telemetry value is ok, but the expected value checked against was too tight. Loosen the ranges on checks when it makes sense. Ensure your script is using the wait_check_tolerance() routine when checking floating point numbers and verify you're using an appropriate tolerance value."}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"The check really failed"}),"\n",(0,s.jsx)(n.p,{children:"Of course, sometimes there are real failures. See the next section for how to handle them and recover."}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.h3,{id:"how-to-recover-from-anomalies",children:"How to Recover from Anomalies"}),"\n",(0,s.jsx)(n.p,{children:"Once something has failed, and your script has stopped with a pink highlighted line, how can you recover? Fortunately, COSMOS provides several mechanisms that can be used to recover after something in your script fails."}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"Retry"}),"\n",(0,s.jsx)(n.p,{children:"After a failure, the Script Runner \u201CPause\u201D button changes to \u201CRetry\u201D. Clicking on the Retry button will re-execute the line the failed. For failures due to timing issues, this will often resolve the issue and allow the script to continue. Make note of the failure and be sure to update your script prior to the next run."}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"Use the Debug Prompt"}),"\n",(0,s.jsx)(n.p,{children:"By selecting Script -> Toggle Debug, you can perform arbitrary actions that may be needed to correct the situation without stopping the running script. You can also inspect variables to help determine why something failed."}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"Execute Selection"}),"\n",(0,s.jsx)(n.p,{children:'If only a small section of a script needs to be run, then \u201CExecute Selection" can be used to execute only a small portion of the script. This can also be used when a script is paused or stopped in error.'}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"Run from here"}),"\n",(0,s.jsx)(n.p,{children:'By clicking into a script, and right clicking to select "Run from here", users can restart a script at an arbitrary point. This works well if no required variable definitions exist earlier in the script.'}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"advanced-topics",children:"Advanced Topics"}),"\n",(0,s.jsx)(n.h3,{id:"advanced-script-configuration-with-csv-or-excel",children:"Advanced Script Configuration with CSV or Excel"}),"\n",(0,s.jsx)(n.p,{children:"Using a spreadsheet to store the values for use by a script can be a great option if you have a CM-controlled script but need to be able to tweak some values for a test or if you need to use different values for different serial numbers."}),"\n",(0,s.jsx)(n.p,{children:"The Ruby CSV class be used to easily read data from CSV files (recommended for cross platform projects)."}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ruby",children:"require 'csv'\nvalues = CSV.read('test.csv')\nputs values[0][0]\n"})}),"\n",(0,s.jsx)(n.p,{children:"If you are only using Windows, COSMOS also contains a library for reading Excel files."}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ruby",children:"require 'openc3/win32/excel'\nss = ExcelSpreadsheet.new('C:/git/cosmos/test.xlsx')\nputs ss[0][0][0]\n"})}),"\n",(0,s.jsx)(n.h3,{id:"when-to-use-ruby-modules",children:"When to use Ruby Modules"}),"\n",(0,s.jsx)(n.p,{children:"Modules in Ruby have two purposes: namespacing and mixins. Namespacing allows having classes and methods with the same name, but with different meanings. For example, if they are namespaced, COSMOS can have a Packet class and another Ruby library can have a Packet class. This isn't typically useful for COSMOS scripting though."}),"\n",(0,s.jsx)(n.p,{children:"Mixins allow adding common methods to classes without using inheritance. Mixins can be useful to add common functionality to some classes but not others, or to break up classes into multiple files."}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ruby",children:"module MyModule\n def module_method\n end\nend\nclass MyTest < OpenC3::Group\n include MyModule\n def test_1\n module_method()\n end\nend\n"})})]})}function h(e={}){let{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}function u(e,n){throw Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}},9796:function(e,n,t){t.d(n,{R:()=>a,x:()=>o});var i=t(6363);let s={},r=i.createContext(s);function a(e){let n=i.useContext(r);return i.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:a(e.components),i.createElement(r.Provider,{value:n},e.children)}}}]);
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([["4581"],{6848:function(e,n,s){s.d(n,{A:()=>j});var r=s(7259);s(6363);var t=s(3526),a=s(4800),i=s(9399),l=s(8146),o=s(2322),c=s(7226),d=s(2029);function u(e){return(0,r.jsx)("svg",{viewBox:"0 0 24 24",...e,children:(0,r.jsx)("path",{d:"M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z",fill:"currentColor"})})}function h(){let e=(0,d.Ay)("/");return(0,r.jsx)("li",{className:"breadcrumbs__item",children:(0,r.jsx)(o.A,{"aria-label":(0,c.T)({id:"theme.docs.breadcrumbs.home",message:"Home page",description:"The ARIA label for the home page in the breadcrumbs"}),className:"breadcrumbs__link",href:e,children:(0,r.jsx)(u,{className:"breadcrumbHomeIcon_K3oZ"})})})}var m=s(5400),b=s(6822);function x(e){let n=function({breadcrumbs:e}){let{siteConfig:n}=(0,b.A)();return{"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:e.filter(e=>e.href).map((e,s)=>({"@type":"ListItem",position:s+1,name:e.label,item:`${n.url}${e.href}`}))}}({breadcrumbs:e.breadcrumbs});return(0,r.jsx)(m.A,{children:(0,r.jsx)("script",{type:"application/ld+json",children:JSON.stringify(n)})})}function v({children:e,href:n,isLast:s}){let t="breadcrumbs__link";return s?(0,r.jsx)("span",{className:t,children:e}):n?(0,r.jsx)(o.A,{className:t,href:n,children:(0,r.jsx)("span",{children:e})}):(0,r.jsx)("span",{className:t,children:e})}function p({children:e,active:n}){return(0,r.jsx)("li",{className:(0,t.A)("breadcrumbs__item",{"breadcrumbs__item--active":n}),children:e})}function j(){let e=(0,i.OF)(),n=(0,l.Dt)();return e?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(x,{breadcrumbs:e}),(0,r.jsx)("nav",{className:(0,t.A)(a.G.docs.docBreadcrumbs,"breadcrumbsContainer_xF7v"),"aria-label":(0,c.T)({id:"theme.docs.breadcrumbs.navAriaLabel",message:"Breadcrumbs",description:"The ARIA label for the breadcrumbs"}),children:(0,r.jsxs)("ul",{className:"breadcrumbs",children:[n&&(0,r.jsx)(h,{}),e.map((n,s)=>{let t=s===e.length-1,a="category"===n.type&&n.linkUnlisted?void 0:n.href;return(0,r.jsx)(p,{active:t,children:(0,r.jsx)(v,{href:a,isLast:t,children:n.label})},s)})]})})]}):null}},2651:function(e,n,s){s.r(n),s.d(n,{default:()=>f});var r=s(7259);s(6363);var t=s(3283),a=s(9399),i=s(2029),l=s(3526),o=s(1849);function c({className:e}){let n=(0,a.a4)();return(0,r.jsx)(u,{items:n,className:e})}function d({item:e}){return(0,r.jsx)("article",{className:(0,l.A)("docCardListItem_SFV0","col col--6"),children:(0,r.jsx)(o.A,{item:e})})}function u(e){let{items:n,className:s}=e;if(!n)return(0,r.jsx)(c,{...e});let t=(0,a.d1)(n);return(0,r.jsx)("section",{className:(0,l.A)("row",s),children:t.map((e,n)=>(0,r.jsx)(d,{item:e},n))})}var h=s(9587),m=s(9351),b=s(2116),x=s(6848),v=s(4123);let p={generatedIndexPage:"generatedIndexPage_ySGC",title:"title_u9iF"};function j({categoryGeneratedIndex:e}){return(0,r.jsx)(t.be,{title:e.title,description:e.description,keywords:e.keywords,image:(0,i.Ay)(e.image)})}function g({categoryGeneratedIndex:e}){let n=(0,a.$S)();return(0,r.jsxs)("div",{className:p.generatedIndexPage,children:[(0,r.jsx)(m.A,{}),(0,r.jsx)(x.A,{}),(0,r.jsx)(b.A,{}),(0,r.jsxs)("header",{children:[(0,r.jsx)(v.A,{as:"h1",className:p.title,children:e.title}),e.description&&(0,r.jsx)("p",{children:e.description})]}),(0,r.jsx)("article",{className:"margin-top--lg",children:(0,r.jsx)(u,{items:n.items,className:p.list})}),(0,r.jsx)("footer",{className:"margin-top--md",children:(0,r.jsx)(h.A,{previous:e.navigation.previous,next:e.navigation.next})})]})}function f(e){return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(j,{...e}),(0,r.jsx)(g,{...e})]})}},9587:function(e,n,s){s.d(n,{A:()=>o});var r=s(7259);s(6363);var t=s(3526),a=s(7226),i=s(2322);function l(e){let{permalink:n,title:s,subLabel:a,isNext:l}=e;return(0,r.jsxs)(i.A,{className:(0,t.A)("pagination-nav__link",l?"pagination-nav__link--next":"pagination-nav__link--prev"),to:n,children:[a&&(0,r.jsx)("div",{className:"pagination-nav__sublabel",children:a}),(0,r.jsx)("div",{className:"pagination-nav__label",children:s})]})}function o(e){let{className:n,previous:s,next:i}=e;return(0,r.jsxs)("nav",{className:(0,t.A)(n,"pagination-nav"),"aria-label":(0,a.T)({id:"theme.docs.paginator.navAriaLabel",message:"Docs pages",description:"The ARIA label for the docs pagination"}),children:[s&&(0,r.jsx)(l,{...s,subLabel:(0,r.jsx)(a.A,{id:"theme.docs.paginator.previous",description:"The label used to navigate to the previous doc",children:"Previous"})}),i&&(0,r.jsx)(l,{...i,subLabel:(0,r.jsx)(a.A,{id:"theme.docs.paginator.next",description:"The label used to navigate to the next doc",children:"Next"}),isNext:!0})]})}},2116:function(e,n,s){s.d(n,{A:()=>o});var r=s(7259);s(6363);var t=s(3526),a=s(7226),i=s(4800),l=s(9138);function o({className:e}){let n=(0,l.r)();return n.badge?(0,r.jsx)("span",{className:(0,t.A)(e,i.G.docs.docVersionBadge,"badge badge--secondary"),children:(0,r.jsx)(a.A,{id:"theme.docs.versionBadge.label",values:{versionLabel:n.label},children:"Version: {versionLabel}"})}):null}},9351:function(e,n,s){s.d(n,{A:()=>v});var r=s(7259);s(6363);var t=s(3526),a=s(6822),i=s(2322),l=s(7226),o=s(778),c=s(4800),d=s(7183),u=s(9138);let h={unreleased:function({siteTitle:e,versionMetadata:n}){return(0,r.jsx)(l.A,{id:"theme.docs.versions.unreleasedVersionLabel",description:"The label used to tell the user that he's browsing an unreleased doc version",values:{siteTitle:e,versionLabel:(0,r.jsx)("b",{children:n.label})},children:"This is unreleased documentation for {siteTitle} {versionLabel} version."})},unmaintained:function({siteTitle:e,versionMetadata:n}){return(0,r.jsx)(l.A,{id:"theme.docs.versions.unmaintainedVersionLabel",description:"The label used to tell the user that he's browsing an unmaintained doc version",values:{siteTitle:e,versionLabel:(0,r.jsx)("b",{children:n.label})},children:"This is documentation for {siteTitle} {versionLabel}, which is no longer actively maintained."})}};function m(e){let n=h[e.versionMetadata.banner];return(0,r.jsx)(n,{...e})}function b({versionLabel:e,to:n,onClick:s}){return(0,r.jsx)(l.A,{id:"theme.docs.versions.latestVersionSuggestionLabel",description:"The label used to tell the user to check the latest version",values:{versionLabel:e,latestVersionLink:(0,r.jsx)("b",{children:(0,r.jsx)(i.A,{to:n,onClick:s,children:(0,r.jsx)(l.A,{id:"theme.docs.versions.latestVersionLinkLabel",description:"The label used for the latest version suggestion link label",children:"latest version"})})})},children:"For up-to-date documentation, see the {latestVersionLink} ({versionLabel})."})}function x({className:e,versionMetadata:n}){let{siteConfig:{title:s}}=(0,a.A)(),{pluginId:i}=(0,o.vT)({failfast:!0}),{savePreferredVersionName:l}=(0,d.g1)(i),{latestDocSuggestion:u,latestVersionSuggestion:h}=(0,o.HW)(i),x=u??h.docs.find(e=>e.id===h.mainDocId);return(0,r.jsxs)("div",{className:(0,t.A)(e,c.G.docs.docVersionBanner,"alert alert--warning margin-bottom--md"),role:"alert",children:[(0,r.jsx)("div",{children:(0,r.jsx)(m,{siteTitle:s,versionMetadata:n})}),(0,r.jsx)("div",{className:"margin-top--md",children:(0,r.jsx)(b,{versionLabel:h.label,to:x.path,onClick:()=>l(h.name)})})]})}function v({className:e}){let n=(0,u.r)();return n.banner?(0,r.jsx)(x,{className:e,versionMetadata:n}):null}},6061:function(e,n,s){s.d(n,{W:()=>o});var r=s(6363),t=s(6822);let a=["zero","one","two","few","many","other"];function i(e){return a.filter(n=>e.includes(n))}let l={locale:"en",pluralForms:i(["one","other"]),select:e=>1===e?"one":"other"};function o(){let e=function(){let{i18n:{currentLocale:e}}=(0,t.A)();return(0,r.useMemo)(()=>{try{let n;return n=new Intl.PluralRules(e),{locale:e,pluralForms:i(n.resolvedOptions().pluralCategories),select:e=>n.select(e)}}catch(n){return console.error(`Failed to use Intl.PluralRules for locale "${e}".
|
|
2
|
-
Docusaurus will fallback to the default (English) implementation.
|
|
3
|
-
Error: ${n.message}
|
|
4
|
-
`),l}},[e])}();return{selectMessage:(n,s)=>(function(e,n,s){let r=e.split("|");if(1===r.length)return r[0];r.length>s.pluralForms.length&&console.error(`For locale=${s.locale}, a maximum of ${s.pluralForms.length} plural forms are expected (${s.pluralForms.join(",")}), but the message contains ${r.length}: ${e}`);let t=s.select(n);return r[Math.min(s.pluralForms.indexOf(t),r.length-1)]})(s,n,e)}}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([["2452"],{7022:function(e,a,s){s.r(a),s.d(a,{default:()=>x});var c=s(7259);s(6363);var t=s(3526),n=s(3283),l=s(4800),i=s(8345),d=s(9491),o=s(3125),r=s(6473),m=s(6270);function x(e){let{content:a}=e,{metadata:s,assets:x}=a,{title:g,editUrl:p,description:h,frontMatter:A,lastUpdatedBy:_,lastUpdatedAt:j}=s,{keywords:v,wrapperClassName:u,hide_table_of_contents:f}=A,b=x.image??A.image,w=!!(p||j||_);return(0,c.jsx)(n.e3,{className:(0,t.A)(u??l.G.wrapper.mdxPages,l.G.page.mdxPage),children:(0,c.jsxs)(i.A,{children:[(0,c.jsx)(n.be,{title:g,description:h,keywords:v,image:b}),(0,c.jsx)("main",{className:"container container--fluid margin-vert--lg",children:(0,c.jsxs)("div",{className:(0,t.A)("row","mdxPageWrapper_nydZ"),children:[(0,c.jsxs)("div",{className:(0,t.A)("col",!f&&"col--8"),children:[(0,c.jsx)(r.A,{metadata:s}),(0,c.jsx)("article",{children:(0,c.jsx)(d.A,{children:(0,c.jsx)(a,{})})}),w&&(0,c.jsx)(m.A,{className:(0,t.A)("margin-top--sm",l.G.pages.pageFooterEditMetaRow),editUrl:p,lastUpdatedAt:j,lastUpdatedBy:_})]}),!f&&a.toc.length>0&&(0,c.jsx)("div",{className:"col col--2",children:(0,c.jsx)(o.A,{toc:a.toc,minHeadingLevel:A.toc_min_heading_level,maxHeadingLevel:A.toc_max_heading_level})})]})})]})})}},4578:function(e,a,s){s.d(a,{A:()=>l});var c=s(9283),t=s(6214),n=s(9614);let l={...c.A,Tabs:t.A,TabItem:n.A}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([["3852"],{8442:function(e,r,n){n.r(r),n.d(r,{metadata:()=>i,default:()=>o,frontMatter:()=>l,contentTitle:()=>d,toc:()=>h,assets:()=>c});var i=JSON.parse('{"id":"configuration/plugins","title":"Plugins","description":"Plugin definition file format and keywords","source":"@site/docs/configuration/plugins.md","sourceDirName":"configuration","slug":"/configuration/plugins","permalink":"/tools/staticdocs/docs/configuration/plugins","draft":false,"unlisted":false,"editUrl":"https://github.com/OpenC3/cosmos/tree/main/docs.openc3.com/docs/configuration/plugins.md","tags":[],"version":"current","sidebarPosition":2,"frontMatter":{"sidebar_position":2,"title":"Plugins","description":"Plugin definition file format and keywords","sidebar_custom_props":{"myEmoji":"\u{1F50C}"}},"sidebar":"defaultSidebar","previous":{"title":"File Format","permalink":"/tools/staticdocs/docs/configuration/format"},"next":{"title":"Targets","permalink":"/tools/staticdocs/docs/configuration/target"}}'),s=n(7259),t=n(9796);let l={sidebar_position:2,title:"Plugins",description:"Plugin definition file format and keywords",sidebar_custom_props:{myEmoji:"\u{1F50C}"}},d,c={},h=[{value:"Introduction",id:"introduction",level:2},{value:"Concepts",id:"concepts",level:2},{value:"Target",id:"target",level:3},{value:"Interface",id:"interface",level:3},{value:"Router",id:"router",level:3},{value:"Tool",id:"tool",level:3},{value:"Microservice",id:"microservice",level:3},{value:"Plugin Directory Structure",id:"plugin-directory-structure",level:2},{value:"plugin.txt Configuration File",id:"plugintxt-configuration-file",level:2},{value:"VARIABLE",id:"variable",level:2},{value:"NEEDS_DEPENDENCIES",id:"needs_dependencies",level:2},{value:"INTERFACE",id:"interface-1",level:2},{value:"INTERFACE Modifiers",id:"interface-modifiers",level:2},{value:"MAP_TARGET",id:"map_target",level:3},{value:"MAP_CMD_TARGET",id:"map_cmd_target",level:3},{value:"MAP_TLM_TARGET",id:"map_tlm_target",level:3},{value:"DONT_CONNECT",id:"dont_connect",level:3},{value:"DONT_RECONNECT",id:"dont_reconnect",level:3},{value:"RECONNECT_DELAY",id:"reconnect_delay",level:3},{value:"DISABLE_DISCONNECT",id:"disable_disconnect",level:3},{value:"LOG_RAW",id:"log_raw",level:3},{value:"LOG_STREAM",id:"log_stream",level:3},{value:"PROTOCOL",id:"protocol",level:3},{value:"OPTION",id:"option",level:3},{value:"SECRET",id:"secret",level:3},{value:"ENV",id:"env",level:3},{value:"WORK_DIR",id:"work_dir",level:3},{value:"PORT",id:"port",level:3},{value:"CMD",id:"cmd",level:3},{value:"CONTAINER",id:"container",level:3},{value:"ROUTE_PREFIX",id:"route_prefix",level:3},{value:"SHARD",id:"shard",level:3},{value:"ROUTER",id:"router-1",level:2},{value:"TARGET",id:"target-1",level:2},{value:"TARGET Modifiers",id:"target-modifiers",level:2},{value:"CMD_BUFFER_DEPTH",id:"cmd_buffer_depth",level:3},{value:"CMD_LOG_CYCLE_TIME",id:"cmd_log_cycle_time",level:3},{value:"CMD_LOG_CYCLE_SIZE",id:"cmd_log_cycle_size",level:3},{value:"CMD_LOG_RETAIN_TIME",id:"cmd_log_retain_time",level:3},{value:"CMD_DECOM_LOG_CYCLE_TIME",id:"cmd_decom_log_cycle_time",level:3},{value:"CMD_DECOM_LOG_CYCLE_SIZE",id:"cmd_decom_log_cycle_size",level:3},{value:"CMD_DECOM_LOG_RETAIN_TIME",id:"cmd_decom_log_retain_time",level:3},{value:"TLM_BUFFER_DEPTH",id:"tlm_buffer_depth",level:3},{value:"TLM_LOG_CYCLE_TIME",id:"tlm_log_cycle_time",level:3},{value:"TLM_LOG_CYCLE_SIZE",id:"tlm_log_cycle_size",level:3},{value:"TLM_LOG_RETAIN_TIME",id:"tlm_log_retain_time",level:3},{value:"TLM_DECOM_LOG_CYCLE_TIME",id:"tlm_decom_log_cycle_time",level:3},{value:"TLM_DECOM_LOG_CYCLE_SIZE",id:"tlm_decom_log_cycle_size",level:3},{value:"TLM_DECOM_LOG_RETAIN_TIME",id:"tlm_decom_log_retain_time",level:3},{value:"REDUCED_MINUTE_LOG_RETAIN_TIME",id:"reduced_minute_log_retain_time",level:3},{value:"REDUCED_HOUR_LOG_RETAIN_TIME",id:"reduced_hour_log_retain_time",level:3},{value:"REDUCED_DAY_LOG_RETAIN_TIME",id:"reduced_day_log_retain_time",level:3},{value:"LOG_RETAIN_TIME",id:"log_retain_time",level:3},{value:"REDUCED_LOG_RETAIN_TIME",id:"reduced_log_retain_time",level:3},{value:"CLEANUP_POLL_TIME",id:"cleanup_poll_time",level:3},{value:"REDUCER_DISABLE",id:"reducer_disable",level:3},{value:"REDUCER_MAX_CPU_UTILIZATION",id:"reducer_max_cpu_utilization",level:3},{value:"TARGET_MICROSERVICE",id:"target_microservice",level:3},{value:"PACKET",id:"packet",level:3},{value:"DISABLE_ERB",id:"disable_erb",level:3},{value:"SHARD",id:"shard-1",level:3},{value:"MICROSERVICE",id:"microservice-1",level:2},{value:"MICROSERVICE Modifiers",id:"microservice-modifiers",level:2},{value:"ENV",id:"env-1",level:3},{value:"WORK_DIR",id:"work_dir-1",level:3},{value:"PORT",id:"port-1",level:3},{value:"TOPIC",id:"topic",level:3},{value:"TARGET_NAME",id:"target_name",level:3},{value:"CMD",id:"cmd-1",level:3},{value:"OPTION",id:"option-1",level:3},{value:"CONTAINER",id:"container-1",level:3},{value:"SECRET",id:"secret-1",level:3},{value:"ROUTE_PREFIX",id:"route_prefix-1",level:3},{value:"DISABLE_ERB",id:"disable_erb-1",level:3},{value:"SHARD",id:"shard-2",level:3},{value:"STOPPED",id:"stopped",level:3},{value:"TOOL",id:"tool-1",level:2},{value:"TOOL Modifiers",id:"tool-modifiers",level:2},{value:"URL",id:"url",level:3},{value:"INLINE_URL",id:"inline_url",level:3},{value:"WINDOW",id:"window",level:3},{value:"ICON",id:"icon",level:3},{value:"CATEGORY",id:"category",level:3},{value:"SHOWN",id:"shown",level:3},{value:"POSITION",id:"position",level:3},{value:"DISABLE_ERB",id:"disable_erb-2",level:3},{value:"IMPORT_MAP_ITEM",id:"import_map_item",level:3},{value:"WIDGET",id:"widget",level:2},{value:"WIDGET Modifiers",id:"widget-modifiers",level:2},{value:"DISABLE_ERB",id:"disable_erb-3",level:3},{value:"SCRIPT_ENGINE",id:"script_engine",level:2}];function a(e){let r={a:"a",code:"code",h2:"h2",h3:"h3",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,t.R)(),...e.components},{TabItem:n,Tabs:i}=r;return n||x("TabItem",!0),i||x("Tabs",!0),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(r.h2,{id:"introduction",children:"Introduction"}),"\n",(0,s.jsx)(r.p,{children:"This document provides the information necessary to configure a COSMOS plugin. Plugins are how you configure and extend COSMOS."}),"\n",(0,s.jsx)(r.p,{children:"Plugins are where you define targets (and their corresponding command and telemetry packet definitions), where you configure the interfaces needed to talk to targets, where you can define routers to stream raw data out of COSMOS, how you can add new tools to the COSMOS user interface, and how you can run additional microservices to provide new functionality."}),"\n",(0,s.jsx)(r.p,{children:"Each plugin is built as a Ruby gem and thus has a plugin.gemspec file which builds it. Plugins have a plugin.txt file which declares all the variables used by the plugin and how to interface to the target(s) it contains."}),"\n",(0,s.jsx)(r.h2,{id:"concepts",children:"Concepts"}),"\n",(0,s.jsx)(r.h3,{id:"target",children:"Target"}),"\n",(0,s.jsx)(r.p,{children:"Targets are the external pieces of hardware and/or software that COSMOS communicates with. These are things like Front End Processors (FEPs), ground support equipment (GSE), custom software tools, and pieces of hardware like satellites themselves. A target is anything that COSMOS can send commands to and receive telemetry from."}),"\n",(0,s.jsx)(r.h3,{id:"interface",children:"Interface"}),"\n",(0,s.jsx)(r.p,{children:"Interfaces implement the physical connection to one or more targets. They are typically ethernet connections implemented using TCP or UDP but can be other connections like serial ports. Interfaces send commands to targets and receive telemetry from targets."}),"\n",(0,s.jsx)(r.h3,{id:"router",children:"Router"}),"\n",(0,s.jsx)(r.p,{children:"Routers flow streams of telemetry packets out of COSMOS and receive streams of commands into COSMOS. The commands are forwarded by COSMOS to associated interfaces. Telemetry comes from associated interfaces."}),"\n",(0,s.jsx)(r.h3,{id:"tool",children:"Tool"}),"\n",(0,s.jsx)(r.p,{children:"COSMOS Tools are web-based applications the communicate with the COSMOS APIs to perform takes like displaying telemetry, sending commands, and running scripts."}),"\n",(0,s.jsx)(r.h3,{id:"microservice",children:"Microservice"}),"\n",(0,s.jsx)(r.p,{children:"Microservices are persistent running backend code that runs within the COSMOS environment. They can process data and perform other useful tasks."}),"\n",(0,s.jsx)(r.h2,{id:"plugin-directory-structure",children:"Plugin Directory Structure"}),"\n",(0,s.jsxs)(r.p,{children:["COSMOS plugins have a well-defined directory structure described in detail in the ",(0,s.jsx)(r.a,{href:"/docs/getting-started/generators",children:"Code Generator"})," documentation."]}),"\n",(0,s.jsx)(r.h2,{id:"plugintxt-configuration-file",children:"plugin.txt Configuration File"}),"\n",(0,s.jsx)(r.p,{children:"A plugin.txt configuration file is required for any COSMOS plugin. It declares the contents of the plugin and provides variables that allow the plugin to be configured at the time it is initially installed or upgraded.\nThis file follows the standard COSMOS configuration file format of keywords followed by zero or more space separated parameters. The following keywords are supported by the plugin.txt config file:"}),"\n",(0,s.jsx)(r.h2,{id:"variable",children:"VARIABLE"}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"Define a configurable variable for the plugin"})}),"\n",(0,s.jsx)(r.p,{children:"The VARIABLE keyword defines a variable that will be requested for the user to enter during plugin installation. Variables can be used to handle details of targets that are user defined such as specific IP addresses and ports. Variables should also be used to allow users to rename targets to whatever name they want and support multiple installations of the same target with different names. Variables can be used later in plugin.txt or in any other configuration file included in a plugin using Ruby ERB syntax. The variables are assigned to accessible local variables in the file. At a high level, ERB allows you to run Ruby code in configuration files."}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Variable Name"}),(0,s.jsx)(r.td,{children:"The name of the variable"}),(0,s.jsx)(r.td,{children:"True"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Default Value"}),(0,s.jsx)(r.td,{children:"Default value of the variable"}),(0,s.jsx)(r.td,{children:"True"})]})]})]}),"\n",(0,s.jsx)(r.h2,{id:"needs_dependencies",children:"NEEDS_DEPENDENCIES"}),"\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)("div",{class:"right",children:"(Since 5.5.0)"}),(0,s.jsx)(r.strong,{children:"Indicates the plugin needs dependencies and sets the GEM_HOME environment variable"})]}),"\n",(0,s.jsx)(r.p,{children:"If the plugin has a top level lib folder or lists runtime dependencies in the gemspec, NEEDS_DEPENDENCIES is effectively already set. Note that in Enterprise, having NEEDS_DEPENDENCIES adds the NFS volume mount to the Kubernetes pod."}),"\n",(0,s.jsx)(r.h2,{id:"interface-1",children:"INTERFACE"}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"Defines a connection to a physical target"})}),"\n",(0,s.jsx)(r.p,{children:"Interfaces are what OpenC3 uses to talk to a particular piece of hardware. Interfaces require a Ruby or Python file which implements all the interface methods necessary to talk to the hardware. OpenC3 defines many built in interfaces or you can define your own as long as it implements the interface protocol."}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Interface Name"}),(0,s.jsx)(r.td,{children:"Name of the interface. This name will appear in the Interfaces tab of the Server and is also referenced by other keywords. The OpenC3 convention is to name interfaces after their targets with '_INT' appended to the name, e.g. INST_INT for the INST target."}),(0,s.jsx)(r.td,{children:"True"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Filename"}),(0,s.jsxs)(r.td,{children:["Ruby or Python file to use when instantiating the interface.",(0,s.jsx)("br",{}),(0,s.jsx)("br",{}),"Valid Values: ",(0,s.jsx)("span",{class:"values",children:"tcpip_client_interface, tcpip_server_interface, udp_interface, serial_interface"})]}),(0,s.jsx)(r.td,{children:"True"})]})]})]}),"\n",(0,s.jsxs)(r.p,{children:["Additional parameters are required. Please see the ",(0,s.jsx)(r.a,{href:"/tools/staticdocs/docs/configuration/interfaces",children:"Interfaces"})," documentation for more details."]}),"\n",(0,s.jsx)(r.h2,{id:"interface-modifiers",children:"INTERFACE Modifiers"}),"\n",(0,s.jsx)(r.p,{children:"The following keywords must follow a INTERFACE keyword."}),"\n",(0,s.jsx)(r.h3,{id:"map_target",children:"MAP_TARGET"}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"Maps a target name to an interface"})}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsx)(r.tbody,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Target Name"}),(0,s.jsx)(r.td,{children:"Target name to map to this interface"}),(0,s.jsx)(r.td,{children:"True"})]})})]}),"\n",(0,s.jsxs)(i,{groupId:"script-language",children:[(0,s.jsx)(n,{value:"python",label:"Python",children:(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-python",children:"INTERFACE DATA_INT openc3/interfaces/tcpip_client_interface.py host.docker.internal 8080 8081 10.0 nil BURST\n MAP_TARGET DATA\n"})})}),(0,s.jsx)(n,{value:"ruby",label:"Ruby",children:(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-ruby",children:"INTERFACE DATA_INT tcpip_client_interface.rb host.docker.internal 8080 8081 10.0 nil BURST\n MAP_TARGET DATA\n"})})})]}),"\n",(0,s.jsx)(r.h3,{id:"map_cmd_target",children:"MAP_CMD_TARGET"}),"\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)("div",{class:"right",children:"(Since 5.2.0)"}),(0,s.jsx)(r.strong,{children:"Maps a target name to an interface for commands only"})]}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsx)(r.tbody,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Target Name"}),(0,s.jsx)(r.td,{children:"Command target name to map to this interface"}),(0,s.jsx)(r.td,{children:"True"})]})})]}),"\n",(0,s.jsxs)(i,{groupId:"script-language",children:[(0,s.jsx)(n,{value:"python",label:"Python",children:(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-python",children:"INTERFACE CMD_INT openc3/interfaces/tcpip_client_interface.py host.docker.internal 8080 8081 10.0 nil BURST\n MAP_CMD_TARGET DATA # Only DATA commands go on the CMD_INT interface\n"})})}),(0,s.jsx)(n,{value:"ruby",label:"Ruby",children:(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-ruby",children:"INTERFACE CMD_INT tcpip_client_interface.rb host.docker.internal 8080 8081 10.0 nil BURST\n MAP_CMD_TARGET DATA # Only DATA commands go on the CMD_INT interface\n"})})})]}),"\n",(0,s.jsx)(r.h3,{id:"map_tlm_target",children:"MAP_TLM_TARGET"}),"\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)("div",{class:"right",children:"(Since 5.2.0)"}),(0,s.jsx)(r.strong,{children:"Maps a target name to an interface for telemetry only"})]}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsx)(r.tbody,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Target Name"}),(0,s.jsx)(r.td,{children:"Telemetry target name to map to this interface"}),(0,s.jsx)(r.td,{children:"True"})]})})]}),"\n",(0,s.jsxs)(i,{groupId:"script-language",children:[(0,s.jsx)(n,{value:"python",label:"Python",children:(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-python",children:"INTERFACE TLM_INT openc3/interfaces/tcpip_client_interface.py host.docker.internal 8080 8081 10.0 nil BURST\n MAP_TLM_TARGET DATA # Only DATA telemetry received on TLM_INT interface\n"})})}),(0,s.jsx)(n,{value:"ruby",label:"Ruby",children:(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-ruby",children:"INTERFACE TLM_INT tcpip_client_interface.rb host.docker.internal 8080 8081 10.0 nil BURST\n MAP_TLM_TARGET DATA # Only DATA telemetry received on TLM_INT interface\n"})})})]}),"\n",(0,s.jsx)(r.h3,{id:"dont_connect",children:"DONT_CONNECT"}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"Server will not automatically try to connect to the interface at startup"})}),"\n",(0,s.jsx)(r.h3,{id:"dont_reconnect",children:"DONT_RECONNECT"}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"Server will not try to reconnect to the interface if the connection is lost"})}),"\n",(0,s.jsx)(r.h3,{id:"reconnect_delay",children:"RECONNECT_DELAY"}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"Reconnect delay in seconds"})}),"\n",(0,s.jsx)(r.p,{children:"If DONT_RECONNECT is not present the Server will try to reconnect to an interface if the connection is lost. Reconnect delay sets the interval in seconds between reconnect tries."}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsx)(r.tbody,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Delay"}),(0,s.jsx)(r.td,{children:"Delay in seconds between reconnect attempts. The default is 15 seconds."}),(0,s.jsx)(r.td,{children:"True"})]})})]}),"\n",(0,s.jsx)(r.h3,{id:"disable_disconnect",children:"DISABLE_DISCONNECT"}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"Disable the Disconnect button on the Interfaces tab in the Server"})}),"\n",(0,s.jsx)(r.p,{children:"Use this keyword to prevent the user from disconnecting from the interface. This is typically used in a 'production' environment where you would not want the user to inadvertently disconnect from a target."}),"\n",(0,s.jsx)(r.h3,{id:"log_raw",children:"LOG_RAW"}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"Deprecated, use LOG_STREAM"})}),"\n",(0,s.jsx)(r.h3,{id:"log_stream",children:"LOG_STREAM"}),"\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)("div",{class:"right",children:"(Since 5.5.2)"}),(0,s.jsx)(r.strong,{children:"Log all data on the interface exactly as it is sent and received"})]}),"\n",(0,s.jsx)(r.p,{children:"LOG_STREAM does not add any OpenC3 headers and thus can not be read by OpenC3 tools. It is primarily useful for low level debugging of an interface. You will have to manually parse these logs yourself using a hex editor or other application."}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Cycle Time"}),(0,s.jsx)(r.td,{children:"Amount of time to wait before cycling the log file. Default is 10 min. If nil refer to Cycle Hour and Cycle Minute."}),(0,s.jsx)(r.td,{children:"False"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Cycle Size"}),(0,s.jsx)(r.td,{children:"Amount of data to write before cycling the log file. Default is 50MB."}),(0,s.jsx)(r.td,{children:"False"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Cycle Hour"}),(0,s.jsx)(r.td,{children:"The time at which to cycle the log. Combined with Cycle Minute to cycle the log daily at the specified time. If nil, the log will be cycled hourly at the specified Cycle Minute. Only applies if Cycle Time is nil."}),(0,s.jsx)(r.td,{children:"False"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Cycle Minute"}),(0,s.jsx)(r.td,{children:"See Cycle Hour."}),(0,s.jsx)(r.td,{children:"False"})]})]})]}),"\n",(0,s.jsx)(r.p,{children:"Example Usage:"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-ruby",children:"INTERFACE EXAMPLE example_interface.rb\n # Override the default log time of 600\n LOG_STREAM 60\n"})}),"\n",(0,s.jsx)(r.h3,{id:"protocol",children:"PROTOCOL"}),"\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)("div",{class:"right",children:"(Since 4.0.0)"}),(0,s.jsx)(r.strong,{children:"Protocols modify the interface by processing the data"})]}),"\n",(0,s.jsxs)(r.p,{children:["Protocols can be either READ, WRITE, or READ_WRITE. READ protocols act on the data received by the interface while write acts on the data before it is sent out. READ_WRITE applies the protocol to both reading and writing.",(0,s.jsx)("br",{}),(0,s.jsx)("br",{})," For information on creating your own custom protocol please see ",(0,s.jsx)(r.a,{href:"/tools/staticdocs/docs/configuration/protocols",children:"Protocols"})]}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Type"}),(0,s.jsxs)(r.td,{children:["Whether to apply the protocol on incoming data, outgoing data, or both",(0,s.jsx)("br",{}),(0,s.jsx)("br",{}),"Valid Values: ",(0,s.jsx)("span",{class:"values",children:"READ, WRITE, READ_WRITE"})]}),(0,s.jsx)(r.td,{children:"True"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Protocol Filename or Classname"}),(0,s.jsx)(r.td,{children:"Ruby or Python filename or class name which implements the protocol"}),(0,s.jsx)(r.td,{children:"True"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Protocol specific parameters"}),(0,s.jsx)(r.td,{children:"Additional parameters used by the protocol"}),(0,s.jsx)(r.td,{children:"False"})]})]})]}),"\n",(0,s.jsxs)(i,{groupId:"script-language",children:[(0,s.jsx)(n,{value:"python",label:"Python",children:(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-python",children:"INTERFACE DATA_INT openc3/interfaces/tcpip_client_interface.py host.docker.internal 8080 8081 10.0 nil BURST\n MAP_TARGET DATA\n PROTOCOL READ openc3/interfaces/protocols/ignore_packet_protocol.py INST IMAGE # Drop all INST IMAGE packets\n"})})}),(0,s.jsx)(n,{value:"ruby",label:"Ruby",children:(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-ruby",children:"INTERFACE DATA_INT tcpip_client_interface.rb host.docker.internal 8080 8081 10.0 nil nil\n MAP_TARGET DATA\n # Rather than defining the LENGTH protocol on the INTERFACE line we define it here\n PROTOCOL READ LengthProtocol 0 16 0 1 BIG_ENDIAN 4 0xBA5EBA11\n"})})})]}),"\n",(0,s.jsx)(r.h3,{id:"option",children:"OPTION"}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"Set a parameter on an interface"})}),"\n",(0,s.jsx)(r.p,{children:"When an option is set the interface class calls the set_option method. Custom interfaces can override set_option to handle any additional options they want."}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Name"}),(0,s.jsx)(r.td,{children:"The option to set. OpenC3 defines several options on the core provided interfaces. The SerialInterface defines FLOW_CONTROL which can be NONE (default) or RTSCTS and DATA_BITS which changes the data bits of the serial interface. The TcpipServerInterface and HttpServerInterface define LISTEN_ADDRESS which is the IP address to accept connections on (default 0.0.0.0)."}),(0,s.jsx)(r.td,{children:"True"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Parameters"}),(0,s.jsx)(r.td,{children:"Parameters to pass to the option"}),(0,s.jsx)(r.td,{children:"False"})]})]})]}),"\n",(0,s.jsx)(r.p,{children:"Example Usage:"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-ruby",children:"INTERFACE SERIAL_INT serial_interface.rb COM1 COM1 115200 NONE 1 10.0 nil\n OPTION FLOW_CONTROL RTSCTS\n OPTION DATA_BITS 8\nROUTER SERIAL_ROUTER tcpip_server_interface.rb 2950 2950 10.0 nil BURST\n ROUTE SERIAL_INT\n OPTION LISTEN_ADDRESS 127.0.0.1\n"})}),"\n",(0,s.jsx)(r.h3,{id:"secret",children:"SECRET"}),"\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)("div",{class:"right",children:"(Since 5.3.0)"}),(0,s.jsx)(r.strong,{children:"Define a secret needed by this interface"})]}),"\n",(0,s.jsxs)(r.p,{children:["Defines a secret for this interface and optionally assigns its value to an option. For more information see ",(0,s.jsx)(r.a,{href:"/docs/tools/admin#secrets",children:"Admin Secrets"}),"."]}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Type"}),(0,s.jsx)(r.td,{children:"ENV or FILE. ENV will mount the secret into an environment variable. FILE mounts the secret into a file."}),(0,s.jsx)(r.td,{children:"True"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Secret Name"}),(0,s.jsxs)(r.td,{children:["The name of the secret to retrieve from the Admin / Secrets tab. For more information see ",(0,s.jsx)(r.a,{href:"/docs/tools/admin#secrets",children:"Admin Secrets"}),"."]}),(0,s.jsx)(r.td,{children:"True"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Environment Variable or File Path"}),(0,s.jsx)(r.td,{children:"Environment variable name or file path to store secret. Note that if you use the Option Name to set an option to the secret value, this value doesn't really matter as long as it is unique."}),(0,s.jsx)(r.td,{children:"True"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Option Name"}),(0,s.jsx)(r.td,{children:"Interface option to pass the secret value. This is the primary way to pass secrets to interfaces."}),(0,s.jsx)(r.td,{children:"False"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Secret Store Name"}),(0,s.jsx)(r.td,{children:"Name of the secret store for stores with multipart keys"}),(0,s.jsx)(r.td,{children:"False"})]})]})]}),"\n",(0,s.jsx)(r.p,{children:"Example Usage:"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-ruby",children:'SECRET ENV USERNAME ENV_USERNAME USERNAME\nSECRET FILE KEY "/tmp/DATA/cert" KEY\n'})}),"\n",(0,s.jsx)(r.h3,{id:"env",children:"ENV"}),"\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)("div",{class:"right",children:"(Since 5.7.0)"}),(0,s.jsx)(r.strong,{children:"Sets an environment variable in the microservice."})]}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Key"}),(0,s.jsx)(r.td,{children:"Environment variable name"}),(0,s.jsx)(r.td,{children:"True"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Value"}),(0,s.jsx)(r.td,{children:"Environment variable value"}),(0,s.jsx)(r.td,{children:"True"})]})]})]}),"\n",(0,s.jsx)(r.p,{children:"Example Usage:"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-ruby",children:"ENV COMPANY OpenC3\n"})}),"\n",(0,s.jsx)(r.h3,{id:"work_dir",children:"WORK_DIR"}),"\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)("div",{class:"right",children:"(Since 5.7.0)"}),(0,s.jsx)(r.strong,{children:"Set the working directory"})]}),"\n",(0,s.jsx)(r.p,{children:"Working directory to run the microservice CMD in. Can be a path relative to the microservice folder in the plugin, or an absolute path in the container the microservice runs in."}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsx)(r.tbody,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Directory"}),(0,s.jsx)(r.td,{children:"Working directory to run the microservice CMD in. Can be a path relative to the microservice folder in the plugin, or an absolute path in the container the microservice runs in."}),(0,s.jsx)(r.td,{children:"True"})]})})]}),"\n",(0,s.jsx)(r.p,{children:"Example Usage:"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-ruby",children:"WORK_DIR '/openc3/lib/openc3/microservices'\n"})}),"\n",(0,s.jsx)(r.h3,{id:"port",children:"PORT"}),"\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)("div",{class:"right",children:"(Since 5.7.0)"}),(0,s.jsx)(r.strong,{children:"Open port for the microservice"})]}),"\n",(0,s.jsx)(r.p,{children:"Kubernetes needs a Service to be applied to open a port so this is required for Kubernetes support"}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Number"}),(0,s.jsx)(r.td,{children:"Port number"}),(0,s.jsx)(r.td,{children:"True"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Protocol"}),(0,s.jsx)(r.td,{children:"Port protocol. Default is TCP."}),(0,s.jsx)(r.td,{children:"False"})]})]})]}),"\n",(0,s.jsx)(r.p,{children:"Example Usage:"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-ruby",children:"PORT 7272\n"})}),"\n",(0,s.jsx)(r.h3,{id:"cmd",children:"CMD"}),"\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)("div",{class:"right",children:"(Since 5.7.0)"}),(0,s.jsx)(r.strong,{children:"Command line to execute to run the microservice."})]}),"\n",(0,s.jsx)(r.p,{children:"Command line to execute to run the microservice."}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsx)(r.tbody,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Args"}),(0,s.jsx)(r.td,{children:"One or more arguments to exec to run the microservice."}),(0,s.jsx)(r.td,{children:"True"})]})})]}),"\n",(0,s.jsxs)(i,{groupId:"script-language",children:[(0,s.jsx)(n,{value:"python",label:"Python",children:(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-python",children:"CMD python interface_microservice.py DEFAULT__INTERFACE__INT1\n"})})}),(0,s.jsx)(n,{value:"ruby",label:"Ruby",children:(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-ruby",children:"CMD ruby interface_microservice.rb DEFAULT__INTERFACE__INT1\n"})})})]}),"\n",(0,s.jsx)(r.h3,{id:"container",children:"CONTAINER"}),"\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)("div",{class:"right",children:"(Since 5.7.0)"}),(0,s.jsx)(r.strong,{children:"Docker Container"})]}),"\n",(0,s.jsx)(r.p,{children:"Container to execute and run the microservice in. Only used in COSMOS Enterprise."}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsx)(r.tbody,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Args"}),(0,s.jsx)(r.td,{children:"Name of the container"}),(0,s.jsx)(r.td,{children:"False"})]})})]}),"\n",(0,s.jsx)(r.h3,{id:"route_prefix",children:"ROUTE_PREFIX"}),"\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)("div",{class:"right",children:"(Since 5.7.0)"}),(0,s.jsx)(r.strong,{children:"Prefix of route"})]}),"\n",(0,s.jsx)(r.p,{children:"Prefix of route to the microservice to expose externally with Traefik"}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsx)(r.tbody,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Route Prefix"}),(0,s.jsx)(r.td,{children:"Route prefix. Must be unique across all scopes. Something like /myprefix"}),(0,s.jsx)(r.td,{children:"True"})]})})]}),"\n",(0,s.jsx)(r.p,{children:"Example Usage:"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-ruby",children:"ROUTE_PREFIX /interface\n"})}),"\n",(0,s.jsx)(r.h3,{id:"shard",children:"SHARD"}),"\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)("div",{class:"right",children:"(Since 6.0.0)"}),(0,s.jsx)(r.strong,{children:"Operator shard to run target microservices on"})]}),"\n",(0,s.jsx)(r.p,{children:"Operator Shard. Only used if running multiple operator containers typically in Kubernetes"}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsx)(r.tbody,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Shard"}),(0,s.jsx)(r.td,{children:"Shard number starting from 0"}),(0,s.jsx)(r.td,{children:"False"})]})})]}),"\n",(0,s.jsx)(r.p,{children:"Example Usage:"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-ruby",children:"SHARD 0\n"})}),"\n",(0,s.jsx)(r.h2,{id:"router-1",children:"ROUTER"}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"Create router to receive commands and output telemetry packets from one or more interfaces"})}),"\n",(0,s.jsx)(r.p,{children:"Creates an router which receives command packets from their remote clients and sends them to associated interfaces. They receive telemetry packets from their interfaces and send them to their remote clients. This allows routers to be intermediaries between an external client and an actual device."}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Name"}),(0,s.jsx)(r.td,{children:"Name of the router"}),(0,s.jsx)(r.td,{children:"True"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Filename"}),(0,s.jsxs)(r.td,{children:["Ruby or Python file to use when instantiating the interface.",(0,s.jsx)("br",{}),(0,s.jsx)("br",{}),"Valid Values: ",(0,s.jsx)("span",{class:"values",children:"tcpip_client_interface, tcpip_server_interface, udp_interface, serial_interface"})]}),(0,s.jsx)(r.td,{children:"True"})]})]})]}),"\n",(0,s.jsxs)(r.p,{children:["Additional parameters are required. Please see the ",(0,s.jsx)(r.a,{href:"/tools/staticdocs/docs/configuration/interfaces",children:"Interfaces"})," documentation for more details."]}),"\n",(0,s.jsx)(r.h2,{id:"target-1",children:"TARGET"}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"Defines a new target"})}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Folder Name"}),(0,s.jsx)(r.td,{children:"The target folder"}),(0,s.jsx)(r.td,{children:"True"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Name"}),(0,s.jsx)(r.td,{children:"The target name. While this is almost always the same as Folder Name it can be different to create multiple targets based on the same target folder."}),(0,s.jsx)(r.td,{children:"True"})]})]})]}),"\n",(0,s.jsx)(r.p,{children:"Example Usage:"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-ruby",children:"TARGET INST INST\n"})}),"\n",(0,s.jsx)(r.h2,{id:"target-modifiers",children:"TARGET Modifiers"}),"\n",(0,s.jsx)(r.p,{children:"The following keywords must follow a TARGET keyword."}),"\n",(0,s.jsx)(r.h3,{id:"cmd_buffer_depth",children:"CMD_BUFFER_DEPTH"}),"\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)("div",{class:"right",children:"(Since 5.2.0)"}),(0,s.jsx)(r.strong,{children:"Number of commands to buffer to ensure logged in order"})]}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsx)(r.tbody,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Buffer Depth"}),(0,s.jsx)(r.td,{children:"Buffer depth in packets (Default = 5)"}),(0,s.jsx)(r.td,{children:"True"})]})})]}),"\n",(0,s.jsx)(r.h3,{id:"cmd_log_cycle_time",children:"CMD_LOG_CYCLE_TIME"}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"Command binary logs can be cycled on a time interval."})}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsx)(r.tbody,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Time"}),(0,s.jsx)(r.td,{children:"Maximum time between files in seconds (default = 600)"}),(0,s.jsx)(r.td,{children:"True"})]})})]}),"\n",(0,s.jsx)(r.h3,{id:"cmd_log_cycle_size",children:"CMD_LOG_CYCLE_SIZE"}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"Command binary logs can be cycled after a certain log file size is reached."})}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsx)(r.tbody,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Size"}),(0,s.jsx)(r.td,{children:"Maximum file size in bytes (default = 50_000_000)"}),(0,s.jsx)(r.td,{children:"True"})]})})]}),"\n",(0,s.jsx)(r.h3,{id:"cmd_log_retain_time",children:"CMD_LOG_RETAIN_TIME"}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"How long to keep raw command logs in seconds."})}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsx)(r.tbody,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Time"}),(0,s.jsx)(r.td,{children:"Number of seconds to keep raw command logs (default = nil = Forever)"}),(0,s.jsx)(r.td,{children:"True"})]})})]}),"\n",(0,s.jsx)(r.h3,{id:"cmd_decom_log_cycle_time",children:"CMD_DECOM_LOG_CYCLE_TIME"}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"Command decommutation logs can be cycled on a time interval."})}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsx)(r.tbody,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Time"}),(0,s.jsx)(r.td,{children:"Maximum time between files in seconds (default = 600)"}),(0,s.jsx)(r.td,{children:"True"})]})})]}),"\n",(0,s.jsx)(r.h3,{id:"cmd_decom_log_cycle_size",children:"CMD_DECOM_LOG_CYCLE_SIZE"}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"Command decommutation logs can be cycled after a certain log file size is reached."})}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsx)(r.tbody,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Size"}),(0,s.jsx)(r.td,{children:"Maximum file size in bytes (default = 50_000_000)"}),(0,s.jsx)(r.td,{children:"True"})]})})]}),"\n",(0,s.jsx)(r.h3,{id:"cmd_decom_log_retain_time",children:"CMD_DECOM_LOG_RETAIN_TIME"}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"How long to keep decom command logs in seconds."})}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsx)(r.tbody,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Time"}),(0,s.jsx)(r.td,{children:"Number of seconds to keep decom command logs (default = nil = Forever)"}),(0,s.jsx)(r.td,{children:"True"})]})})]}),"\n",(0,s.jsx)(r.h3,{id:"tlm_buffer_depth",children:"TLM_BUFFER_DEPTH"}),"\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)("div",{class:"right",children:"(Since 5.2.0)"}),(0,s.jsx)(r.strong,{children:"Number of telemetry packets to buffer to ensure logged in order"})]}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsx)(r.tbody,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Buffer Depth"}),(0,s.jsx)(r.td,{children:"Buffer depth in packets (Default = 60)"}),(0,s.jsx)(r.td,{children:"True"})]})})]}),"\n",(0,s.jsx)(r.h3,{id:"tlm_log_cycle_time",children:"TLM_LOG_CYCLE_TIME"}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"Telemetry binary logs can be cycled on a time interval."})}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsx)(r.tbody,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Time"}),(0,s.jsx)(r.td,{children:"Maximum time between files in seconds (default = 600)"}),(0,s.jsx)(r.td,{children:"True"})]})})]}),"\n",(0,s.jsx)(r.h3,{id:"tlm_log_cycle_size",children:"TLM_LOG_CYCLE_SIZE"}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"Telemetry binary logs can be cycled after a certain log file size is reached."})}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsx)(r.tbody,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Size"}),(0,s.jsx)(r.td,{children:"Maximum file size in bytes (default = 50_000_000)"}),(0,s.jsx)(r.td,{children:"True"})]})})]}),"\n",(0,s.jsx)(r.h3,{id:"tlm_log_retain_time",children:"TLM_LOG_RETAIN_TIME"}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"How long to keep raw telemetry logs in seconds."})}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsx)(r.tbody,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Time"}),(0,s.jsx)(r.td,{children:"Number of seconds to keep raw telemetry logs (default = nil = Forever)"}),(0,s.jsx)(r.td,{children:"True"})]})})]}),"\n",(0,s.jsx)(r.h3,{id:"tlm_decom_log_cycle_time",children:"TLM_DECOM_LOG_CYCLE_TIME"}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"Telemetry decommutation logs can be cycled on a time interval."})}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsx)(r.tbody,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Time"}),(0,s.jsx)(r.td,{children:"Maximum time between files in seconds (default = 600)"}),(0,s.jsx)(r.td,{children:"True"})]})})]}),"\n",(0,s.jsx)(r.h3,{id:"tlm_decom_log_cycle_size",children:"TLM_DECOM_LOG_CYCLE_SIZE"}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"Telemetry decommutation logs can be cycled after a certain log file size is reached."})}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsx)(r.tbody,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Size"}),(0,s.jsx)(r.td,{children:"Maximum file size in bytes (default = 50_000_000)"}),(0,s.jsx)(r.td,{children:"True"})]})})]}),"\n",(0,s.jsx)(r.h3,{id:"tlm_decom_log_retain_time",children:"TLM_DECOM_LOG_RETAIN_TIME"}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"How long to keep decom telemetry logs in seconds."})}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsx)(r.tbody,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Time"}),(0,s.jsx)(r.td,{children:"Number of seconds to keep decom telemetry logs (default = nil = Forever)"}),(0,s.jsx)(r.td,{children:"True"})]})})]}),"\n",(0,s.jsx)(r.h3,{id:"reduced_minute_log_retain_time",children:"REDUCED_MINUTE_LOG_RETAIN_TIME"}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"How long to keep reduced minute telemetry logs in seconds."})}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsx)(r.tbody,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Time"}),(0,s.jsx)(r.td,{children:"Number of seconds to keep reduced minute telemetry logs (default = nil = Forever)"}),(0,s.jsx)(r.td,{children:"True"})]})})]}),"\n",(0,s.jsx)(r.h3,{id:"reduced_hour_log_retain_time",children:"REDUCED_HOUR_LOG_RETAIN_TIME"}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"How long to keep reduced hour telemetry logs in seconds."})}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsx)(r.tbody,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Time"}),(0,s.jsx)(r.td,{children:"Number of seconds to keep reduced hour telemetry logs (default = nil = Forever)"}),(0,s.jsx)(r.td,{children:"True"})]})})]}),"\n",(0,s.jsx)(r.h3,{id:"reduced_day_log_retain_time",children:"REDUCED_DAY_LOG_RETAIN_TIME"}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"How long to keep reduced day telemetry logs in seconds."})}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsx)(r.tbody,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Time"}),(0,s.jsx)(r.td,{children:"Number of seconds to keep reduced day telemetry logs (default = nil = Forever)"}),(0,s.jsx)(r.td,{children:"True"})]})})]}),"\n",(0,s.jsx)(r.h3,{id:"log_retain_time",children:"LOG_RETAIN_TIME"}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"How long to keep all regular telemetry logs in seconds."})}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsx)(r.tbody,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Time"}),(0,s.jsx)(r.td,{children:"Number of seconds to keep all regular telemetry logs (default = nil = Forever)"}),(0,s.jsx)(r.td,{children:"True"})]})})]}),"\n",(0,s.jsx)(r.h3,{id:"reduced_log_retain_time",children:"REDUCED_LOG_RETAIN_TIME"}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"How long to keep all reduced telemetry logs in seconds."})}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsx)(r.tbody,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Time"}),(0,s.jsx)(r.td,{children:"Number of seconds to keep all reduced telemetry logs (default = nil = Forever)"}),(0,s.jsx)(r.td,{children:"True"})]})})]}),"\n",(0,s.jsx)(r.h3,{id:"cleanup_poll_time",children:"CLEANUP_POLL_TIME"}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"Period at which to run the cleanup process."})}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsx)(r.tbody,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Time"}),(0,s.jsx)(r.td,{children:"Number of seconds between runs of the cleanup process (default = 600 = 10 minutes)"}),(0,s.jsx)(r.td,{children:"True"})]})})]}),"\n",(0,s.jsx)(r.h3,{id:"reducer_disable",children:"REDUCER_DISABLE"}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"Disables the data reduction microservice for the target"})}),"\n",(0,s.jsx)(r.h3,{id:"reducer_max_cpu_utilization",children:"REDUCER_MAX_CPU_UTILIZATION"}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"Maximum amount of CPU utilization to apply to data reduction"})}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsx)(r.tbody,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Percentage"}),(0,s.jsx)(r.td,{children:"0 to 100 percent (default = 30)"}),(0,s.jsx)(r.td,{children:"True"})]})})]}),"\n",(0,s.jsx)(r.h3,{id:"target_microservice",children:"TARGET_MICROSERVICE"}),"\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)("div",{class:"right",children:"(Since 5.2.0)"}),(0,s.jsx)(r.strong,{children:"Breaks a target microservice out into its own process."})]}),"\n",(0,s.jsx)(r.p,{children:"Can be used to give more resources to processing that is falling behind. If defined multiple times for the same type, will create multiple processes. Each process can be given specific packets to process with the PACKET keyword."}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsx)(r.tbody,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Type"}),(0,s.jsx)(r.td,{children:"The target microservice type. Must be one of DECOM, COMMANDLOG, DECOMCMDLOG, PACKETLOG, DECOMLOG, REDUCER, or CLEANUP"}),(0,s.jsx)(r.td,{children:"True"})]})})]}),"\n",(0,s.jsx)(r.h3,{id:"packet",children:"PACKET"}),"\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)("div",{class:"right",children:"(Since 5.2.0)"}),(0,s.jsx)(r.strong,{children:"Packet Name to allocate to the current TARGET_MICROSERVICE."})]}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsx)(r.tbody,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Packet Name"}),(0,s.jsx)(r.td,{children:"The packet name. Does not apply to REDUCER or CLEANUP target microservice types."}),(0,s.jsx)(r.td,{children:"True"})]})})]}),"\n",(0,s.jsx)(r.h3,{id:"disable_erb",children:"DISABLE_ERB"}),"\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)("div",{class:"right",children:"(Since 5.12.0)"}),(0,s.jsx)(r.strong,{children:"Disable ERB processing"})]}),"\n",(0,s.jsx)(r.p,{children:"Disable ERB processing for the entire target or a set of regular expressions over its filenames"}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsx)(r.tbody,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Regex"}),(0,s.jsx)(r.td,{children:"Regex to match against filenames. If match, then no ERB processing"}),(0,s.jsx)(r.td,{children:"False"})]})})]}),"\n",(0,s.jsx)(r.h3,{id:"shard-1",children:"SHARD"}),"\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)("div",{class:"right",children:"(Since 6.0.0)"}),(0,s.jsx)(r.strong,{children:"Operator shard to run target microservices on"})]}),"\n",(0,s.jsx)(r.p,{children:"Operator Shard. Only used if running multiple operator containers typically in Kubernetes"}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsx)(r.tbody,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Shard"}),(0,s.jsx)(r.td,{children:"Shard number starting from 0"}),(0,s.jsx)(r.td,{children:"False"})]})})]}),"\n",(0,s.jsx)(r.p,{children:"Example Usage:"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-ruby",children:"SHARD 0\n"})}),"\n",(0,s.jsx)(r.h2,{id:"microservice-1",children:"MICROSERVICE"}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"Defines a new microservice"})}),"\n",(0,s.jsx)(r.p,{children:"Defines a microservice that the plugin adds to the OpenC3 system. Microservices are background software processes that perform persistent processing."}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Microservice Folder Name"}),(0,s.jsx)(r.td,{children:"The exact name of the microservice folder in the plugin. ie. microservices/MicroserviceFolderName"}),(0,s.jsx)(r.td,{children:"True"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Microservice Name"}),(0,s.jsx)(r.td,{children:"The specific name of this instance of the microservice in the OpenC3 system"}),(0,s.jsx)(r.td,{children:"True"})]})]})]}),"\n",(0,s.jsx)(r.p,{children:"Example Usage:"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-ruby",children:"MICROSERVICE EXAMPLE openc3-example\n"})}),"\n",(0,s.jsx)(r.h2,{id:"microservice-modifiers",children:"MICROSERVICE Modifiers"}),"\n",(0,s.jsx)(r.p,{children:"The following keywords must follow a MICROSERVICE keyword."}),"\n",(0,s.jsx)(r.h3,{id:"env-1",children:"ENV"}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"Sets an environment variable in the microservice."})}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Key"}),(0,s.jsx)(r.td,{children:"Environment variable name"}),(0,s.jsx)(r.td,{children:"True"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Value"}),(0,s.jsx)(r.td,{children:"Environment variable value"}),(0,s.jsx)(r.td,{children:"True"})]})]})]}),"\n",(0,s.jsx)(r.p,{children:"Example Usage:"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-ruby",children:"MICROSERVICE EXAMPLE openc3-example\n ENV COMPANY OpenC3\n"})}),"\n",(0,s.jsx)(r.h3,{id:"work_dir-1",children:"WORK_DIR"}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"Set the working directory"})}),"\n",(0,s.jsx)(r.p,{children:"Working directory to run the microservice CMD in. Can be a path relative to the microservice folder in the plugin, or an absolute path in the container the microservice runs in."}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsx)(r.tbody,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Directory"}),(0,s.jsx)(r.td,{children:"Working directory to run the microservice CMD in. Can be a path relative to the microservice folder in the plugin, or an absolute path in the container the microservice runs in."}),(0,s.jsx)(r.td,{children:"True"})]})})]}),"\n",(0,s.jsx)(r.p,{children:"Example Usage:"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-ruby",children:"MICROSERVICE EXAMPLE openc3-example\n WORK_DIR .\n"})}),"\n",(0,s.jsx)(r.h3,{id:"port-1",children:"PORT"}),"\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)("div",{class:"right",children:"(Since 5.0.10)"}),(0,s.jsx)(r.strong,{children:"Open port for the microservice"})]}),"\n",(0,s.jsx)(r.p,{children:"Kubernetes needs a Service to be applied to open a port so this is required for Kubernetes support"}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Number"}),(0,s.jsx)(r.td,{children:"Port number"}),(0,s.jsx)(r.td,{children:"True"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Protocol"}),(0,s.jsx)(r.td,{children:"Port protocol. Default is TCP."}),(0,s.jsx)(r.td,{children:"False"})]})]})]}),"\n",(0,s.jsx)(r.p,{children:"Example Usage:"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-ruby",children:"MICROSERVICE EXAMPLE openc3-example\n PORT 7272\n"})}),"\n",(0,s.jsx)(r.h3,{id:"topic",children:"TOPIC"}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"Associate a Redis topic"})}),"\n",(0,s.jsx)(r.p,{children:"Redis topic to associate with this microservice. Standard OpenC3 microservices such as decom_microservice use this information to know what packet streams to subscribe to. The TOPIC keyword can be used as many times as necessary to associate all needed topics."}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsx)(r.tbody,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Topic Name"}),(0,s.jsx)(r.td,{children:"Redis Topic to associate with the microservice"}),(0,s.jsx)(r.td,{children:"True"})]})})]}),"\n",(0,s.jsx)(r.p,{children:"Example Usage:"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-ruby",children:"MICROSERVICE EXAMPLE openc3-example\n # Manually assigning topics is an advanced topic and requires\n # intimate knowledge of the internal COSMOS data structures.\n TOPIC DEFAULT__openc3_log_messages\n TOPIC DEFAULT__TELEMETRY__EXAMPLE__STATUS\n"})}),"\n",(0,s.jsx)(r.h3,{id:"target_name",children:"TARGET_NAME"}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"Associate a OpenC3 target"})}),"\n",(0,s.jsx)(r.p,{children:"OpenC3 target to associate with the microservice. For standard OpenC3 microservices such as decom_microservice this causes the target configuration to get loaded into the container for the microservice."}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsx)(r.tbody,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Target Name"}),(0,s.jsx)(r.td,{children:"OpenC3 target to associate with the microservice"}),(0,s.jsx)(r.td,{children:"True"})]})})]}),"\n",(0,s.jsx)(r.p,{children:"Example Usage:"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-ruby",children:"MICROSERVICE EXAMPLE openc3-example\n TARGET_NAME EXAMPLE\n"})}),"\n",(0,s.jsx)(r.h3,{id:"cmd-1",children:"CMD"}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"Command line to execute to run the microservice."})}),"\n",(0,s.jsx)(r.p,{children:"Command line to execute to run the microservice."}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsx)(r.tbody,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Args"}),(0,s.jsx)(r.td,{children:"One or more arguments to exec to run the microservice."}),(0,s.jsx)(r.td,{children:"True"})]})})]}),"\n",(0,s.jsxs)(i,{groupId:"script-language",children:[(0,s.jsx)(n,{value:"python",label:"Python",children:(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-python",children:"MICROSERVICE EXAMPLE openc3-example\n CMD python example_target.py\n"})})}),(0,s.jsx)(n,{value:"ruby",label:"Ruby",children:(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-ruby",children:"MICROSERVICE EXAMPLE openc3-example\n CMD ruby example_target.rb\n"})})})]}),"\n",(0,s.jsx)(r.h3,{id:"option-1",children:"OPTION"}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"Pass an option to the microservice"})}),"\n",(0,s.jsx)(r.p,{children:"Generic key/value(s) options to pass to the microservice. These take the form of KEYWORD/PARAMS like a line in a OpenC3 configuration file. Multiple OPTION keywords can be used to pass multiple options to the microservice."}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Option Name"}),(0,s.jsx)(r.td,{children:"Name of the option"}),(0,s.jsx)(r.td,{children:"True"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Option Value(s)"}),(0,s.jsx)(r.td,{children:"One or more values to associate with the option"}),(0,s.jsx)(r.td,{children:"True"})]})]})]}),"\n",(0,s.jsx)(r.h3,{id:"container-1",children:"CONTAINER"}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"Docker Container"})}),"\n",(0,s.jsx)(r.p,{children:"Container to execute and run the microservice in. Only used in COSMOS Enterprise."}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsx)(r.tbody,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Args"}),(0,s.jsx)(r.td,{children:"Name of the container"}),(0,s.jsx)(r.td,{children:"False"})]})})]}),"\n",(0,s.jsx)(r.h3,{id:"secret-1",children:"SECRET"}),"\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)("div",{class:"right",children:"(Since 5.3.0)"}),(0,s.jsx)(r.strong,{children:"Define a secret needed by this microservice"})]}),"\n",(0,s.jsxs)(r.p,{children:["Defines a secret for this microservice. For more information see ",(0,s.jsx)(r.a,{href:"/docs/tools/admin#secrets",children:"Admin Secrets"}),"."]}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Type"}),(0,s.jsx)(r.td,{children:"ENV or FILE. ENV will mount the secret into an environment variable. FILE mounts the secret into a file."}),(0,s.jsx)(r.td,{children:"True"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Secret Name"}),(0,s.jsxs)(r.td,{children:["The name of the secret to retrieve from the Admin / Secrets tab. For more information see ",(0,s.jsx)(r.a,{href:"/docs/tools/admin#secrets",children:"Admin Secrets"}),"."]}),(0,s.jsx)(r.td,{children:"True"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Environment Variable or File Path"}),(0,s.jsx)(r.td,{children:"Environment variable name or file path to store secret"}),(0,s.jsx)(r.td,{children:"True"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Secret Store Name"}),(0,s.jsx)(r.td,{children:"Name of the secret store for stores with multipart keys"}),(0,s.jsx)(r.td,{children:"False"})]})]})]}),"\n",(0,s.jsx)(r.p,{children:"Example Usage:"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-ruby",children:'SECRET ENV USERNAME ENV_USERNAME\nSECRET FILE KEY "/tmp/DATA/cert"\n'})}),"\n",(0,s.jsx)(r.h3,{id:"route_prefix-1",children:"ROUTE_PREFIX"}),"\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)("div",{class:"right",children:"(Since 5.5.0)"}),(0,s.jsx)(r.strong,{children:"Prefix of route"})]}),"\n",(0,s.jsx)(r.p,{children:"Prefix of route to the microservice to expose externally with Traefik"}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsx)(r.tbody,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Route Prefix"}),(0,s.jsx)(r.td,{children:"Route prefix. Must be unique across all scopes. Something like /myprefix"}),(0,s.jsx)(r.td,{children:"True"})]})})]}),"\n",(0,s.jsx)(r.p,{children:"Example Usage:"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-ruby",children:"MICROSERVICE CFDP CFDP\n ROUTE_PREFIX /cfdp\n"})}),"\n",(0,s.jsx)(r.h3,{id:"disable_erb-1",children:"DISABLE_ERB"}),"\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)("div",{class:"right",children:"(Since 5.12.0)"}),(0,s.jsx)(r.strong,{children:"Disable ERB processing"})]}),"\n",(0,s.jsx)(r.p,{children:"Disable ERB processing for the entire microservice or a set of regular expressions over its filenames"}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsx)(r.tbody,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Regex"}),(0,s.jsx)(r.td,{children:"Regex to match against filenames. If match, then no ERB processing"}),(0,s.jsx)(r.td,{children:"False"})]})})]}),"\n",(0,s.jsx)(r.h3,{id:"shard-2",children:"SHARD"}),"\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)("div",{class:"right",children:"(Since 6.0.0)"}),(0,s.jsx)(r.strong,{children:"Operator shard to run target microservices on"})]}),"\n",(0,s.jsx)(r.p,{children:"Operator Shard. Only used if running multiple operator containers typically in Kubernetes"}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsx)(r.tbody,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Shard"}),(0,s.jsx)(r.td,{children:"Shard number starting from 0"}),(0,s.jsx)(r.td,{children:"False"})]})})]}),"\n",(0,s.jsx)(r.p,{children:"Example Usage:"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-ruby",children:"SHARD 0\n"})}),"\n",(0,s.jsx)(r.h3,{id:"stopped",children:"STOPPED"}),"\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)("div",{class:"right",children:"(Since 6.2.0)"}),(0,s.jsx)(r.strong,{children:"Initially creates the microservice in a stopped state (not enabled)"})]}),"\n",(0,s.jsx)(r.p,{children:"Example Usage:"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-ruby",children:"STOPPED\n"})}),"\n",(0,s.jsx)(r.h2,{id:"tool-1",children:"TOOL"}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"Define a tool"})}),"\n",(0,s.jsx)(r.p,{children:"Defines a tool that the plugin adds to the OpenC3 system. Tools are web based applications that make use of the Single-SPA javascript library that allows them to by dynamically added to the running system as independent frontend microservices."}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Tool Folder Name"}),(0,s.jsx)(r.td,{children:"The exact name of the tool folder in the plugin. ie. tools/ToolFolderName"}),(0,s.jsx)(r.td,{children:"True"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Tool Name"}),(0,s.jsx)(r.td,{children:"Name of the tool that is displayed in the OpenC3 Navigation menu"}),(0,s.jsx)(r.td,{children:"True"})]})]})]}),"\n",(0,s.jsx)(r.p,{children:"Example Usage:"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-ruby",children:"TOOL DEMO Demo\n"})}),"\n",(0,s.jsx)(r.h2,{id:"tool-modifiers",children:"TOOL Modifiers"}),"\n",(0,s.jsx)(r.p,{children:"The following keywords must follow a TOOL keyword."}),"\n",(0,s.jsx)(r.h3,{id:"url",children:"URL"}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"Url used to access the tool"})}),"\n",(0,s.jsx)(r.p,{children:'The relative url used to access the tool. Defaults to "/tools/ToolFolderName".'}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsx)(r.tbody,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Url"}),(0,s.jsx)(r.td,{children:"The url. If not given defaults to tools/ToolFolderName. Generally should not be given unless linking to external tools."}),(0,s.jsx)(r.td,{children:"True"})]})})]}),"\n",(0,s.jsx)(r.h3,{id:"inline_url",children:"INLINE_URL"}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"Internal url to load a tool"})}),"\n",(0,s.jsx)(r.p,{children:'The url of the javascript file used to load the tool into single-SPA. Defaults to "main.js".'}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsx)(r.tbody,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Url"}),(0,s.jsx)(r.td,{children:"The inline url. If not given defaults to main.js. Generally should not be given unless using a non-standard filename."}),(0,s.jsx)(r.td,{children:"True"})]})})]}),"\n",(0,s.jsx)(r.h3,{id:"window",children:"WINDOW"}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"How to display the tool when navigated to"})}),"\n",(0,s.jsx)(r.p,{children:"The window mode used to display the tool. INLINE opens the tool internally without refreshing the page using the Single-SPA framework. IFRAME opens external tools in an Iframe within OpenC3. NEW opens the tool in a new TAB."}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsx)(r.tbody,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Window Mode"}),(0,s.jsxs)(r.td,{children:["Tool display mode",(0,s.jsx)("br",{}),(0,s.jsx)("br",{}),"Valid Values: ",(0,s.jsx)("span",{class:"values",children:"INLINE, IFRAME, NEW"})]}),(0,s.jsx)(r.td,{children:"True"})]})})]}),"\n",(0,s.jsx)(r.h3,{id:"icon",children:"ICON"}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"Set tool icon"})}),"\n",(0,s.jsx)(r.p,{children:"Icon shown next to the tool name in the OpenC3 navigation menu."}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsx)(r.tbody,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Icon Name"}),(0,s.jsxs)(r.td,{children:["Icon to display next to the tool name. Icons come from Font Awesome, Material Design (",(0,s.jsx)(r.a,{href:"https://materialdesignicons.com/",children:"https://materialdesignicons.com/"}),"), and Astro."]}),(0,s.jsx)(r.td,{children:"True"})]})})]}),"\n",(0,s.jsx)(r.h3,{id:"category",children:"CATEGORY"}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"Category for the tool"})}),"\n",(0,s.jsx)(r.p,{children:"Associates the tool with a category which becomes a submenu in the Navigation menu."}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsx)(r.tbody,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Category Name"}),(0,s.jsx)(r.td,{children:"Category to associate the tool with"}),(0,s.jsx)(r.td,{children:"True"})]})})]}),"\n",(0,s.jsx)(r.h3,{id:"shown",children:"SHOWN"}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"Show the tool or not"})}),"\n",(0,s.jsx)(r.p,{children:"Whether or not the tool is shown in the Navigation menu. Should generally be true, except for the openc3 base tool."}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsx)(r.tbody,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Shown"}),(0,s.jsxs)(r.td,{children:["Whether or not the tool is shown. TRUE or FALSE",(0,s.jsx)("br",{}),(0,s.jsx)("br",{}),"Valid Values: ",(0,s.jsx)("span",{class:"values",children:"true, false"})]}),(0,s.jsx)(r.td,{children:"True"})]})})]}),"\n",(0,s.jsx)(r.h3,{id:"position",children:"POSITION"}),"\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)("div",{class:"right",children:"(Since 5.0.8)"}),(0,s.jsx)(r.strong,{children:"Position of the tool in the nav bar"})]}),"\n",(0,s.jsx)(r.p,{children:"Position of the tool starting at 2 (1 is reserved for Admin Console). Tools without a position are appended to the end as they are installed. All COSMOS Core tools have consecutive integer values for position."}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsx)(r.tbody,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Position"}),(0,s.jsx)(r.td,{children:"Numerical position"}),(0,s.jsx)(r.td,{children:"True"})]})})]}),"\n",(0,s.jsx)(r.h3,{id:"disable_erb-2",children:"DISABLE_ERB"}),"\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)("div",{class:"right",children:"(Since 5.12.0)"}),(0,s.jsx)(r.strong,{children:"Disable ERB processing"})]}),"\n",(0,s.jsx)(r.p,{children:"Disable ERB processing for the entire tool or a set of regular expressions over its filenames"}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsx)(r.tbody,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Regex"}),(0,s.jsx)(r.td,{children:"Regex to match against filenames. If match, then no ERB processing"}),(0,s.jsx)(r.td,{children:"False"})]})})]}),"\n",(0,s.jsx)(r.h3,{id:"import_map_item",children:"IMPORT_MAP_ITEM"}),"\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)("div",{class:"right",children:"(Since 6.0.0)"}),(0,s.jsx)(r.strong,{children:"Add an item to the import map"})]}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"key"}),(0,s.jsx)(r.td,{children:"Import Map Key"}),(0,s.jsx)(r.td,{children:"True"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"value"}),(0,s.jsx)(r.td,{children:"Import Map Value"}),(0,s.jsx)(r.td,{children:"True"})]})]})]}),"\n",(0,s.jsx)(r.h2,{id:"widget",children:"WIDGET"}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"Define a custom widget"})}),"\n",(0,s.jsx)(r.p,{children:"Defines a custom widget that can be used in Telemetry Viewer screens."}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Widget Name"}),(0,s.jsxs)(r.td,{children:["The name of the widget will be used to build a path to the widget implementation. For example, ",(0,s.jsx)(r.code,{children:"WIDGET HELLOWORLD"})," will find the as-built file tools/widgets/HelloworldWidget/HelloworldWidget.umd.min.js. See the ",(0,s.jsx)(r.a,{href:"/tools/staticdocs/docs/guides/custom-widgets",children:"Custom Widgets"})," guide for more details."]}),(0,s.jsx)(r.td,{children:"True"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Label"}),(0,s.jsx)(r.td,{children:"The label for the widget that will appear in the Data Viewer component drop down"}),(0,s.jsx)(r.td,{children:"False"})]})]})]}),"\n",(0,s.jsx)(r.p,{children:"Example Usage:"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-ruby",children:"WIDGET HELLOWORLD\n"})}),"\n",(0,s.jsx)(r.h2,{id:"widget-modifiers",children:"WIDGET Modifiers"}),"\n",(0,s.jsx)(r.p,{children:"The following keywords must follow a WIDGET keyword."}),"\n",(0,s.jsx)(r.h3,{id:"disable_erb-3",children:"DISABLE_ERB"}),"\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)("div",{class:"right",children:"(Since 5.12.0)"}),(0,s.jsx)(r.strong,{children:"Disable ERB processing"})]}),"\n",(0,s.jsx)(r.p,{children:"Disable ERB processing for the entire widget or a set of regular expressions over its filenames"}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsx)(r.tbody,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Regex"}),(0,s.jsx)(r.td,{children:"Regex to match against filenames. If match, then no ERB processing"}),(0,s.jsx)(r.td,{children:"False"})]})})]}),"\n",(0,s.jsx)(r.h2,{id:"script_engine",children:"SCRIPT_ENGINE"}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"Define a script engine to add language support to Script Runner"})}),"\n",(0,s.jsx)(r.p,{children:"Defines a script engine to add language support to Script Runner"}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Required"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Extension"}),(0,s.jsx)(r.td,{children:"Extension that will use this script engine"}),(0,s.jsx)(r.td,{children:"True"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Script Engine Filename"}),(0,s.jsx)(r.td,{children:"Filename that implements the script engine. Should be in top level lib folder in plugin."}),(0,s.jsx)(r.td,{children:"True"})]})]})]}),"\n",(0,s.jsx)(r.p,{children:"Example Usage:"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-ruby",children:"SCRIPT_ENGINE .print print_script_engine.py\n"})})]})}function o(e={}){let{wrapper:r}={...(0,t.R)(),...e.components};return r?(0,s.jsx)(r,{...e,children:(0,s.jsx)(a,{...e})}):a(e)}function x(e,r){throw Error("Expected "+(r?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}},9796:function(e,r,n){n.d(r,{R:()=>l,x:()=>d});var i=n(6363);let s={},t=i.createContext(s);function l(e){let r=i.useContext(t);return i.useMemo(function(){return"function"==typeof e?e(r):{...r,...e}},[r,e])}function d(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:l(e.components),i.createElement(t.Provider,{value:r},e.children)}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([["7399"],{4809:function(e,t){function n(e){let t,n=[];for(let r of e.split(",").map(e=>e.trim()))if(/^-?\d+$/.test(r))n.push(parseInt(r,10));else if(t=r.match(/^(-?\d+)(-|\.\.\.?|\u2025|\u2026|\u22EF)(-?\d+)$/)){let[e,r,s,a]=t;if(r&&a){let e=(r=parseInt(r))<(a=parseInt(a))?1:-1;("-"===s||".."===s||"\u2025"===s)&&(a+=e);for(let t=r;t!==a;t+=e)n.push(t)}}return n}t.default=n,e.exports=n},1527:function(e,t,n){"use strict";n.d(t,{A:()=>y});var r=n(7259),s=n(6363),a=n(3526),i=n(7226),l=n(4800);function o({type:e,className:t,children:n}){return(0,r.jsx)("div",{className:(0,a.A)(l.G.common.admonition,l.G.common.admonitionType(e),"admonition_Zw5b",t),children:n})}function c({icon:e,title:t}){return(0,r.jsxs)("div",{className:"admonitionHeading_zD5A",children:[(0,r.jsx)("span",{className:"admonitionIcon_JdRO",children:e}),t]})}function u({children:e}){return e?(0,r.jsx)("div",{className:"admonitionContent_FABs",children:e}):null}function d(e){let{type:t,icon:n,title:s,children:a,className:i}=e;return(0,r.jsxs)(o,{type:t,className:i,children:[s||n?(0,r.jsx)(c,{title:s,icon:n}):null,(0,r.jsx)(u,{children:a})]})}let m={icon:(0,r.jsx)(function(e){return(0,r.jsx)("svg",{viewBox:"0 0 14 16",...e,children:(0,r.jsx)("path",{fillRule:"evenodd",d:"M6.3 5.69a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V7.98v.01zM7 2.3c-3.14 0-5.7 2.54-5.7 5.68 0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"})})},{}),title:(0,r.jsx)(i.A,{id:"theme.admonition.note",description:"The default label used for the Note admonition (:::note)",children:"note"})};function h(e){return(0,r.jsx)(d,{...m,...e,className:(0,a.A)("alert alert--secondary",e.className),children:e.children})}let f={icon:(0,r.jsx)(function(e){return(0,r.jsx)("svg",{viewBox:"0 0 12 16",...e,children:(0,r.jsx)("path",{fillRule:"evenodd",d:"M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"})})},{}),title:(0,r.jsx)(i.A,{id:"theme.admonition.tip",description:"The default label used for the Tip admonition (:::tip)",children:"tip"})};function p(e){return(0,r.jsx)(d,{...f,...e,className:(0,a.A)("alert alert--success",e.className),children:e.children})}let x={icon:(0,r.jsx)(function(e){return(0,r.jsx)("svg",{viewBox:"0 0 14 16",...e,children:(0,r.jsx)("path",{fillRule:"evenodd",d:"M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"})})},{}),title:(0,r.jsx)(i.A,{id:"theme.admonition.info",description:"The default label used for the Info admonition (:::info)",children:"info"})};function j(e){return(0,r.jsx)(d,{...x,...e,className:(0,a.A)("alert alert--info",e.className),children:e.children})}function v(e){return(0,r.jsx)("svg",{viewBox:"0 0 16 16",...e,children:(0,r.jsx)("path",{fillRule:"evenodd",d:"M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 0 0 0 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 0 0 .01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z"})})}let b={icon:(0,r.jsx)(v,{}),title:(0,r.jsx)(i.A,{id:"theme.admonition.warning",description:"The default label used for the Warning admonition (:::warning)",children:"warning"})},g={icon:(0,r.jsx)(function(e){return(0,r.jsx)("svg",{viewBox:"0 0 12 16",...e,children:(0,r.jsx)("path",{fillRule:"evenodd",d:"M5.05.31c.81 2.17.41 3.38-.52 4.31C3.55 5.67 1.98 6.45.9 7.98c-1.45 2.05-1.7 6.53 3.53 7.7-2.2-1.16-2.67-4.52-.3-6.61-.61 2.03.53 3.33 1.94 2.86 1.39-.47 2.3.53 2.27 1.67-.02.78-.31 1.44-1.13 1.81 3.42-.59 4.78-3.42 4.78-5.56 0-2.84-2.53-3.22-1.25-5.61-1.52.13-2.03 1.13-1.89 2.75.09 1.08-1.02 1.8-1.86 1.33-.67-.41-.66-1.19-.06-1.78C8.18 5.31 8.68 2.45 5.05.32L5.03.3l.02.01z"})})},{}),title:(0,r.jsx)(i.A,{id:"theme.admonition.danger",description:"The default label used for the Danger admonition (:::danger)",children:"danger"})},A={icon:(0,r.jsx)(v,{}),title:(0,r.jsx)(i.A,{id:"theme.admonition.caution",description:"The default label used for the Caution admonition (:::caution)",children:"caution"})},N={note:h,tip:p,info:j,warning:function(e){return(0,r.jsx)(d,{...b,...e,className:(0,a.A)("alert alert--warning",e.className),children:e.children})},danger:function(e){return(0,r.jsx)(d,{...g,...e,className:(0,a.A)("alert alert--danger",e.className),children:e.children})},secondary:e=>(0,r.jsx)(h,{title:"secondary",...e}),important:e=>(0,r.jsx)(j,{title:"important",...e}),success:e=>(0,r.jsx)(p,{title:"success",...e}),caution:function(e){return(0,r.jsx)(d,{...A,...e,className:(0,a.A)("alert alert--warning",e.className),children:e.children})}};function y(e){var t;let n,a=function(e){var t;let n,a,i,{mdxAdmonitionTitle:l,rest:o}=(t=e.children,a=(n=s.Children.toArray(t)).find(e=>s.isValidElement(e)&&"mdxAdmonitionTitle"===e.type),i=n.filter(e=>e!==a),{mdxAdmonitionTitle:a?.props.children,rest:i.length>0?(0,r.jsx)(r.Fragment,{children:i}):null}),c=e.title??l;return{...e,...c&&{title:c},children:o}}(e),i=(n=N[t=a.type])||(console.warn(`No admonition component found for admonition type "${t}". Using Info as fallback.`),N.info);return(0,r.jsx)(i,{...a})}},6473:function(e,t,n){"use strict";n.d(t,{A:()=>j});var r=n(7259);n(6363);var s=n(3526),a=n(7226),i=n(5400);function l(){return(0,r.jsx)(a.A,{id:"theme.contentVisibility.unlistedBanner.title",description:"The unlisted content banner title",children:"Unlisted page"})}function o(){return(0,r.jsx)(a.A,{id:"theme.contentVisibility.unlistedBanner.message",description:"The unlisted content banner message",children:"This page is unlisted. Search engines will not index it, and only users having a direct link can access it."})}function c(){return(0,r.jsx)(i.A,{children:(0,r.jsx)("meta",{name:"robots",content:"noindex, nofollow"})})}function u(){return(0,r.jsx)(a.A,{id:"theme.contentVisibility.draftBanner.title",description:"The draft content banner title",children:"Draft page"})}function d(){return(0,r.jsx)(a.A,{id:"theme.contentVisibility.draftBanner.message",description:"The draft content banner message",children:"This page is a draft. It will only be visible in dev and be excluded from the production build."})}var m=n(4800),h=n(1527);function f({className:e}){return(0,r.jsx)(h.A,{type:"caution",title:(0,r.jsx)(u,{}),className:(0,s.A)(e,m.G.common.draftBanner),children:(0,r.jsx)(d,{})})}function p({className:e}){return(0,r.jsx)(h.A,{type:"caution",title:(0,r.jsx)(l,{}),className:(0,s.A)(e,m.G.common.unlistedBanner),children:(0,r.jsx)(o,{})})}function x(e){return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(c,{}),(0,r.jsx)(p,{...e})]})}function j({metadata:e}){let{unlisted:t,frontMatter:n}=e;return(0,r.jsxs)(r.Fragment,{children:[(t||n.unlisted)&&(0,r.jsx)(x,{}),n.draft&&(0,r.jsx)(f,{})]})}},6270:function(e,t,n){"use strict";n.d(t,{A:()=>f});var r=n(7259);n(6363);var s=n(3526),a=n(7226),i=n(4800),l=n(2322);function o({className:e,...t}){return(0,r.jsx)("svg",{fill:"currentColor",height:"20",width:"20",viewBox:"0 0 40 40",className:(0,s.A)("iconEdit_jEMW",e),"aria-hidden":"true",...t,children:(0,r.jsx)("g",{children:(0,r.jsx)("path",{d:"m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"})})})}function c({editUrl:e}){return(0,r.jsxs)(l.A,{to:e,className:i.G.common.editThisPage,children:[(0,r.jsx)(o,{}),(0,r.jsx)(a.A,{id:"theme.common.editThisPage",description:"The link label to edit the current page",children:"Edit this page"})]})}var u=n(6822);function d({lastUpdatedAt:e}){let t=new Date(e),n=(function(e={}){let{i18n:{currentLocale:t}}=(0,u.A)(),n=function(){let{i18n:{currentLocale:e,localeConfigs:t}}=(0,u.A)();return t[e].calendar}();return new Intl.DateTimeFormat(t,{calendar:n,...e})})({day:"numeric",month:"short",year:"numeric",timeZone:"UTC"}).format(t);return(0,r.jsx)(a.A,{id:"theme.lastUpdated.atDate",description:"The words used to describe on which date a page has been last updated",values:{date:(0,r.jsx)("b",{children:(0,r.jsx)("time",{dateTime:t.toISOString(),itemProp:"dateModified",children:n})})},children:" on {date}"})}function m({lastUpdatedBy:e}){return(0,r.jsx)(a.A,{id:"theme.lastUpdated.byUser",description:"The words used to describe by who the page has been last updated",values:{user:(0,r.jsx)("b",{children:e})},children:" by {user}"})}function h({lastUpdatedAt:e,lastUpdatedBy:t}){return(0,r.jsxs)("span",{className:i.G.common.lastUpdated,children:[(0,r.jsx)(a.A,{id:"theme.lastUpdated.lastUpdatedAtBy",description:"The sentence used to display when a page has been last updated, and by who",values:{atDate:e?(0,r.jsx)(d,{lastUpdatedAt:e}):"",byUser:t?(0,r.jsx)(m,{lastUpdatedBy:t}):""},children:"Last updated{atDate}{byUser}"}),!1]})}function f({className:e,editUrl:t,lastUpdatedAt:n,lastUpdatedBy:a}){return(0,r.jsxs)("div",{className:(0,s.A)("row",e),children:[(0,r.jsx)("div",{className:(0,s.A)("col","noPrint_Tv9o"),children:t&&(0,r.jsx)(c,{editUrl:t})}),(0,r.jsx)("div",{className:(0,s.A)("col","lastUpdated_sfFo"),children:(n||a)&&(0,r.jsx)(h,{lastUpdatedAt:n,lastUpdatedBy:a})})]})}},9283:function(e,t,n){"use strict";n.d(t,{A:()=>ei});var r=n(7259),s=n(6363),a=n(5400),i=n(9635),l=n(3526),o=n(584),c=n(5383);function u(){let{prism:e}=(0,c.p)(),{colorMode:t}=(0,o.G)(),n=e.theme,r=e.darkTheme||n;return"dark"===t?r:n}var d=n(4800),m=n(4809),h=n.n(m),f=n(9125);let p=/title=(?<quote>["'])(?<title>.*?)\1/,x=/\{(?<range>[\d,-]+)\}/,j={js:{start:"\\/\\/",end:""},jsBlock:{start:"\\/\\*",end:"\\*\\/"},jsx:{start:"\\{\\s*\\/\\*",end:"\\*\\/\\s*\\}"},bash:{start:"#",end:""},html:{start:"\x3c!--",end:"--\x3e"}},v={...j,lua:{start:"--",end:""},wasm:{start:"\\;\\;",end:""},tex:{start:"%",end:""},vb:{start:"['\u2018\u2019]",end:""},vbnet:{start:"(?:_\\s*)?['\u2018\u2019]",end:""},rem:{start:"[Rr][Ee][Mm]\\b",end:""},f90:{start:"!",end:""},ml:{start:"\\(\\*",end:"\\*\\)"},cobol:{start:"\\*>",end:""}},b=Object.keys(j);function g(e,t){let n=e.map(e=>{let{start:n,end:r}=v[e];return`(?:${n}\\s*(${t.flatMap(e=>[e.line,e.block?.start,e.block?.end].filter(Boolean)).join("|")})\\s*${r})`}).join("|");return RegExp(`^\\s*(?:${n})\\s*$`)}let A=(0,s.createContext)(null);function N({metadata:e,wordWrap:t,children:n}){let a=(0,s.useMemo)(()=>({metadata:e,wordWrap:t}),[e,t]);return(0,r.jsx)(A.Provider,{value:a,children:n})}function y(){let e=(0,s.useContext)(A);if(null===e)throw new f.dV("CodeBlockContextProvider");return e}function w({as:e,...t}){let n,s,a=(n={color:"--prism-color",backgroundColor:"--prism-background-color"},s={},Object.entries(u().plain).forEach(([e,t])=>{let r=n[e];r&&"string"==typeof t&&(s[r]=t)}),s);return(0,r.jsx)(e,{...t,style:a,className:(0,l.A)(t.className,"codeBlockContainer_Sxhe",d.G.common.codeBlock)})}let C="codeBlockLines_tu4E";function k({children:e,className:t}){return(0,r.jsx)(w,{as:"pre",tabIndex:0,className:(0,l.A)("codeBlockStandalone_r1rA","thin-scrollbar",t),children:(0,r.jsx)("code",{className:C,children:e})})}let B={attributes:!0,characterData:!0,childList:!0,subtree:!0};function T({children:e}){return e}var E=n(3293);function _({line:e,token:t,...n}){return(0,r.jsx)("span",{...n})}function L({line:e,classNames:t,showLineNumbers:n,getLineProps:s,getTokenProps:a}){let i,o=(i=1===e.length&&"\n"===e[0].content?e[0]:void 0)?[{...i,content:""}]:e,c=s({line:o,className:(0,l.A)(t,n&&"codeLine_H8cC")}),u=o.map((e,t)=>{let n=a({token:e});return(0,r.jsx)(_,{...n,line:o,token:e,children:n.children},t)});return(0,r.jsxs)("span",{...c,children:[n?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{className:"codeLineNumber_IgdE"}),(0,r.jsx)("span",{className:"codeLineContent_KO3t",children:u})]}):u,(0,r.jsx)("br",{})]})}let I=s.forwardRef((e,t)=>(0,r.jsx)("pre",{ref:t,tabIndex:0,...e,className:(0,l.A)(e.className,"codeBlock_cMOg","thin-scrollbar")}));function M(e){let{metadata:t}=y();return(0,r.jsx)("code",{...e,className:(0,l.A)(e.className,C,void 0!==t.lineNumbersStart&&"codeBlockLinesWithNumbering_dcjT"),style:{...e.style,counterReset:void 0===t.lineNumbersStart?void 0:`line-count ${t.lineNumbersStart-1}`}})}function S({className:e}){let{metadata:t,wordWrap:n}=y(),s=u(),{code:a,language:i,lineNumbersStart:o,lineClassNames:c}=t;return(0,r.jsx)(E.f4,{theme:s,code:a,language:i,children:({className:t,style:s,tokens:a,getLineProps:i,getTokenProps:u})=>(0,r.jsx)(I,{ref:n.codeBlockRef,className:(0,l.A)(e,t),style:s,children:(0,r.jsx)(M,{children:a.map((e,t)=>(0,r.jsx)(L,{line:e,getLineProps:i,getTokenProps:u,classNames:c[t],showLineNumbers:void 0!==o},t))})})})}function z({children:e,fallback:t}){return(0,i.A)()?(0,r.jsx)(r.Fragment,{children:e?.()}):t??null}var H=n(7226);function D({className:e,...t}){return(0,r.jsx)("button",{type:"button",...t,className:(0,l.A)("clean-btn",e)})}function O(e){return(0,r.jsx)("svg",{viewBox:"0 0 24 24",...e,children:(0,r.jsx)("path",{fill:"currentColor",d:"M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"})})}function R(e){return(0,r.jsx)("svg",{viewBox:"0 0 24 24",...e,children:(0,r.jsx)("path",{fill:"currentColor",d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"})})}let V={copyButtonCopied:"copyButtonCopied_sFAp",copyButtonIcons:"copyButtonIcons_rFXI",copyButtonIcon:"copyButtonIcon_ekKl",copyButtonSuccessIcon:"copyButtonSuccessIcon_Y_Ah"};function $({className:e}){let{copyCode:t,isCopied:n}=function(){let{metadata:{code:e}}=y(),[t,n]=(0,s.useState)(!1),r=(0,s.useRef)(void 0),a=(0,s.useCallback)(()=>{navigator.clipboard.writeText(e).then(()=>{n(!0),r.current=window.setTimeout(()=>{n(!1)},1e3)})},[e]);return(0,s.useEffect)(()=>()=>window.clearTimeout(r.current),[]),{copyCode:a,isCopied:t}}();return(0,r.jsx)(D,{"aria-label":n?(0,H.T)({id:"theme.CodeBlock.copied",message:"Copied",description:"The copied button label on code blocks"}):(0,H.T)({id:"theme.CodeBlock.copyButtonAriaLabel",message:"Copy code to clipboard",description:"The ARIA label for copy code blocks button"}),title:(0,H.T)({id:"theme.CodeBlock.copy",message:"Copy",description:"The copy button label on code blocks"}),className:(0,l.A)(e,V.copyButton,n&&V.copyButtonCopied),onClick:t,children:(0,r.jsxs)("span",{className:V.copyButtonIcons,"aria-hidden":"true",children:[(0,r.jsx)(O,{className:V.copyButtonIcon}),(0,r.jsx)(R,{className:V.copyButtonSuccessIcon})]})})}function U(e){return(0,r.jsx)("svg",{viewBox:"0 0 24 24",...e,children:(0,r.jsx)("path",{fill:"currentColor",d:"M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"})})}function q({className:e}){let{wordWrap:t}=y();if(!(t.isEnabled||t.isCodeScrollable))return!1;let n=(0,H.T)({id:"theme.CodeBlock.wordWrapToggle",message:"Toggle word wrap",description:"The title attribute for toggle word wrapping button of code block lines"});return(0,r.jsx)(D,{onClick:()=>t.toggle(),className:(0,l.A)(e,t.isEnabled&&"wordWrapButtonEnabled_b8Lr"),"aria-label":n,title:n,children:(0,r.jsx)(U,{className:"wordWrapButtonIcon_JEyO","aria-hidden":"true"})})}function F({className:e}){return(0,r.jsx)(z,{children:()=>(0,r.jsxs)("div",{className:(0,l.A)(e,"buttonGroup_AASF"),children:[(0,r.jsx)(q,{}),(0,r.jsx)($,{})]})})}function P({className:e}){let{metadata:t}=y();return(0,r.jsxs)(w,{as:"div",className:(0,l.A)(e,t.className),children:[t.title&&(0,r.jsx)("div",{className:"codeBlockTitle_iCcY",children:(0,r.jsx)(T,{children:t.title})}),(0,r.jsxs)("div",{className:"codeBlockContent_Jhdg",children:[(0,r.jsx)(S,{}),(0,r.jsx)(F,{})]})]})}function W(e){let t=function(e){let{prism:t}=(0,c.p)();return function(e){var t,n,r,s,a;let i,o=(n=(t={language:e.language,defaultLanguage:e.defaultLanguage,className:e.className}).language??function(e){if(!e)return;let t=e.split(" ").find(e=>e.startsWith("language-"));return t?.replace(/language-/,"")}(t.className)??t.defaultLanguage,n?.toLowerCase()??"text"),{lineClassNames:c,code:u}=(r=e.code,s={metastring:e.metastring,magicComments:e.magicComments,language:o},function(e,{metastring:t,magicComments:n}){if(t&&x.test(t)){let r=t.match(x).groups.range;if(0===n.length)throw Error(`A highlight range has been given in code block's metastring (\`\`\` ${t}), but no magic comment config is available. Docusaurus applies the first magic comment entry's className for metastring ranges.`);let s=n[0].className;return{lineClassNames:Object.fromEntries(h()(r).filter(e=>e>0).map(e=>[e-1,[s]])),code:e}}return null}(i=r.replace(/\r?\n$/,""),{...s})??function(e,t){let{language:n,magicComments:r}=t;if(void 0===n)return{lineClassNames:{},code:e};let s=function(e,t){switch(e){case"js":case"javascript":case"ts":case"typescript":return g(["js","jsBlock"],t);case"jsx":case"tsx":return g(["js","jsBlock","jsx"],t);case"html":return g(["js","jsBlock","html"],t);case"python":case"py":case"bash":return g(["bash"],t);case"markdown":case"md":return g(["html","jsx","bash"],t);case"tex":case"latex":case"matlab":return g(["tex"],t);case"lua":case"haskell":return g(["lua"],t);case"sql":return g(["lua","jsBlock"],t);case"wasm":return g(["wasm"],t);case"vb":case"vba":case"visual-basic":return g(["vb","rem"],t);case"vbnet":return g(["vbnet","rem"],t);case"batch":return g(["rem"],t);case"basic":return g(["rem","f90"],t);case"fsharp":return g(["js","ml"],t);case"ocaml":case"sml":return g(["ml"],t);case"fortran":return g(["f90"],t);case"cobol":return g(["cobol"],t);default:return g(b,t)}}(n,r),a=e.split(/\r?\n/),i=Object.fromEntries(r.map(e=>[e.className,{start:0,range:""}])),l=Object.fromEntries(r.filter(e=>e.line).map(({className:e,line:t})=>[t,e])),o=Object.fromEntries(r.filter(e=>e.block).map(({className:e,block:t})=>[t.start,e])),c=Object.fromEntries(r.filter(e=>e.block).map(({className:e,block:t})=>[t.end,e]));for(let e=0;e<a.length;){let t=a[e].match(s);if(!t){e+=1;continue}let n=t.slice(1).find(e=>void 0!==e);l[n]?i[l[n]].range+=`${e},`:o[n]?i[o[n]].start=e:c[n]&&(i[c[n]].range+=`${i[c[n]].start}-${e-1},`),a.splice(e,1)}let u={};return Object.entries(i).forEach(([e,{range:t}])=>{h()(t).forEach(t=>{u[t]??=[],u[t].push(e)})}),{code:a.join("\n"),lineClassNames:u}}(i,{...s})),d=function({className:e,language:t}){return(0,l.A)(e,t&&!e?.includes(`language-${t}`)&&`language-${t}`)}({className:e.className,language:o}),m=(a=e.metastring,(a?.match(p)?.groups.title??"")||e.title),f=function({showLineNumbers:e,metastring:t}){if("boolean"==typeof e)return e?1:void 0;if("number"==typeof e)return e;let n=t?.split(" ").find(e=>e.startsWith("showLineNumbers"));if(n)return n.startsWith("showLineNumbers=")?parseInt(n.replace("showLineNumbers=",""),10):1}({showLineNumbers:e.showLineNumbers,metastring:e.metastring});return{codeInput:e.code,code:u,className:d,language:o,title:m,lineNumbersStart:f,lineClassNames:c}}({code:e.children,className:e.className,metastring:e.metastring,magicComments:t.magicComments,defaultLanguage:t.defaultLanguage,language:e.language,title:e.title,showLineNumbers:e.showLineNumbers})}(e),n=function(){let[e,t]=(0,s.useState)(!1),[n,r]=(0,s.useState)(!1),a=(0,s.useRef)(null),i=(0,s.useCallback)(()=>{let n=a.current.querySelector("code");e?n.removeAttribute("style"):(n.style.whiteSpace="pre-wrap",n.style.overflowWrap="anywhere"),t(e=>!e)},[a,e]),l=(0,s.useCallback)(()=>{let{scrollWidth:e,clientWidth:t}=a.current;r(e>t||a.current.querySelector("code").hasAttribute("style"))},[a]);return!function(e,t){let[n,r]=(0,s.useState)(),a=(0,s.useCallback)(()=>{r(e.current?.closest("[role=tabpanel][hidden]"))},[e,r]);(0,s.useEffect)(()=>{a()},[a]),function(e,t,n=B){let r=(0,f._q)(t),a=(0,f.Be)(n);(0,s.useEffect)(()=>{let t=new MutationObserver(r);return e&&t.observe(e,a),()=>t.disconnect()},[e,r,a])}(n,e=>{e.forEach(e=>{"attributes"===e.type&&"hidden"===e.attributeName&&(t(),a())})},{attributes:!0,characterData:!1,childList:!1,subtree:!1})}(a,l),(0,s.useEffect)(()=>{l()},[e,l]),(0,s.useEffect)(()=>(window.addEventListener("resize",l,{passive:!0}),()=>{window.removeEventListener("resize",l)}),[l]),{codeBlockRef:a,isEnabled:e,isCodeScrollable:n,toggle:i}}();return(0,r.jsx)(N,{metadata:t,wordWrap:n,children:(0,r.jsx)(P,{})})}function G({children:e,...t}){let n=(0,i.A)(),a=s.Children.toArray(e).some(e=>(0,s.isValidElement)(e))?e:Array.isArray(e)?e.join(""):e;return(0,r.jsx)("string"==typeof a?W:k,{...t,children:a},String(n))}function Z(e){return(0,r.jsx)("code",{...e})}var K=n(2322),Y=n(3282),J=n(1134),X=n(3155);function Q(e){return!!e&&("SUMMARY"===e.tagName||Q(e.parentElement))}function ee({summary:e,children:t,...n}){(0,J.A)().collectAnchor(n.id);let a=(0,i.A)(),o=(0,s.useRef)(null),{collapsed:c,setCollapsed:u}=(0,X.u)({initialState:!n.open}),[d,m]=(0,s.useState)(n.open),h=s.isValidElement(e)?e:(0,r.jsx)("summary",{children:e??"Details"});return(0,r.jsxs)("details",{...n,ref:o,open:d,"data-collapsed":c,className:(0,l.A)("details_Z7pz",a&&"isBrowser_Meiy",n.className),onMouseDown:e=>{Q(e.target)&&e.detail>1&&e.preventDefault()},onClick:e=>{e.stopPropagation();let t=e.target;Q(t)&&function e(t,n){return!!t&&(t===n||e(t.parentElement,n))}(t,o.current)&&(e.preventDefault(),c?(u(!1),m(!0)):u(!0))},children:[h,(0,r.jsx)(X.N,{lazy:!1,collapsed:c,onCollapseTransitionEnd:e=>{u(e),m(!e)},children:(0,r.jsx)("div",{className:"collapsibleContent_orsR",children:t})})]})}function et({...e}){return(0,r.jsx)(ee,{...e,className:(0,l.A)("alert alert--info","details_Kj51",e.className)})}function en(e){let t=s.Children.toArray(e.children),n=t.find(e=>s.isValidElement(e)&&"summary"===e.type),a=(0,r.jsx)(r.Fragment,{children:t.filter(e=>e!==n)});return(0,r.jsx)(et,{...e,summary:n,children:a})}var er=n(4123);function es(e){return(0,r.jsx)(er.A,{...e})}var ea=n(1527);let ei={Head:a.A,details:en,Details:en,code:function(e){return void 0!==e.children&&s.Children.toArray(e.children).every(e=>"string"==typeof e&&!e.includes("\n"))?(0,r.jsx)(Z,{...e}):(0,r.jsx)(G,{...e})},a:function(e){let t=(0,Y.v)(e.id);return(0,r.jsx)(K.A,{...e,className:(0,l.A)(t,e.className)})},pre:function(e){return(0,r.jsx)(r.Fragment,{children:e.children})},ul:function(e){return(0,r.jsx)("ul",{...e,className:function(e){if(void 0!==e)return(0,l.A)(e,e?.includes("contains-task-list")&&"containsTaskList_oHF9")}(e.className)})},li:function(e){(0,J.A)().collectAnchor(e.id);let t=(0,Y.v)(e.id);return(0,r.jsx)("li",{className:(0,l.A)(t,e.className),...e})},img:function(e){var t;return(0,r.jsx)("img",{decoding:"async",loading:"lazy",...e,className:(t=e.className,(0,l.A)(t,"img_hvG1"))})},h1:e=>(0,r.jsx)(es,{as:"h1",...e}),h2:e=>(0,r.jsx)(es,{as:"h2",...e}),h3:e=>(0,r.jsx)(es,{as:"h3",...e}),h4:e=>(0,r.jsx)(es,{as:"h4",...e}),h5:e=>(0,r.jsx)(es,{as:"h5",...e}),h6:e=>(0,r.jsx)(es,{as:"h6",...e}),admonition:ea.A,mermaid:()=>null}},9491:function(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(7259);n(6363);var s=n(9796),a=n(4578);function i({children:e}){return(0,r.jsx)(s.x,{components:a.A,children:e})}},3125:function(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(7259);n(6363);var s=n(3526),a=n(6620);function i({className:e,...t}){return(0,r.jsx)("div",{className:(0,s.A)("tableOfContents_Cvk4","thin-scrollbar",e),children:(0,r.jsx)(a.A,{...t,linkClassName:"table-of-contents__link toc-highlight",linkActiveClassName:"table-of-contents__link--active"})})}},6620:function(e,t,n){"use strict";n.d(t,{A:()=>c});var r=n(7259),s=n(6363),a=n(5383);function i(e){let t=e.getBoundingClientRect();return t.top===t.bottom?i(e.parentNode):t}var l=n(2322);let o=s.memo(function e({toc:t,className:n,linkClassName:s,isChild:a}){return t.length?(0,r.jsx)("ul",{className:a?void 0:n,children:t.map(t=>(0,r.jsxs)("li",{children:[(0,r.jsx)(l.A,{to:`#${t.id}`,className:s??void 0,dangerouslySetInnerHTML:{__html:t.value}}),(0,r.jsx)(e,{isChild:!0,toc:t.children,className:n,linkClassName:s})]},t.id))}):null});function c({toc:e,className:t="table-of-contents table-of-contents__left-border",linkClassName:n="table-of-contents__link",linkActiveClassName:l,minHeadingLevel:c,maxHeadingLevel:u,...d}){var m;let h,f,p=(0,a.p)(),x=c??p.tableOfContents.minHeadingLevel,j=u??p.tableOfContents.maxHeadingLevel,v=function({toc:e,minHeadingLevel:t,maxHeadingLevel:n}){return(0,s.useMemo)(()=>{let r,s,a;return function e({toc:t,minHeadingLevel:n,maxHeadingLevel:r}){return t.flatMap(t=>{let s=e({toc:t.children,minHeadingLevel:n,maxHeadingLevel:r});return t.level>=n&&t.level<=r?[{...t,children:s}]:s})}({toc:(r=e.map(e=>({...e,parentIndex:-1,children:[]})),s=Array(7).fill(-1),r.forEach((e,t)=>{let n=s.slice(2,e.level);e.parentIndex=Math.max(...n),s[e.level]=t}),a=[],r.forEach(e=>{let{parentIndex:t,...n}=e;t>=0?r[t].children.push(n):a.push(n)}),a),minHeadingLevel:t,maxHeadingLevel:n})},[e,t,n])}({toc:e,minHeadingLevel:x,maxHeadingLevel:j});return m=(0,s.useMemo)(()=>{if(n&&l)return{linkClassName:n,linkActiveClassName:l,minHeadingLevel:x,maxHeadingLevel:j}},[n,l,x,j]),h=(0,s.useRef)(void 0),f=function(){let e=(0,s.useRef)(0),{navbar:{hideOnScroll:t}}=(0,a.p)();return(0,s.useEffect)(()=>{e.current=t?0:document.querySelector(".navbar").clientHeight},[t]),e}(),(0,s.useEffect)(()=>{if(!m)return()=>{};let{linkClassName:e,linkActiveClassName:t,minHeadingLevel:n,maxHeadingLevel:r}=m;function s(){let s=Array.from(document.getElementsByClassName(e)),a=function(e,{anchorTopOffset:t}){let n=e.find(e=>i(e).top>=t);if(n){var r;return(r=i(n)).top>0&&r.bottom<window.innerHeight/2?n:e[e.indexOf(n)-1]??null}return e[e.length-1]??null}(function({minHeadingLevel:e,maxHeadingLevel:t}){let n=[];for(let r=e;r<=t;r+=1)n.push(`h${r}.anchor`);return Array.from(document.querySelectorAll(n.join()))}({minHeadingLevel:n,maxHeadingLevel:r}),{anchorTopOffset:f.current}),l=s.find(e=>a&&a.id===decodeURIComponent(e.href.substring(e.href.indexOf("#")+1)));s.forEach(e=>{e===l?(h.current&&h.current!==e&&h.current.classList.remove(t),e.classList.add(t),h.current=e):e.classList.remove(t)})}return document.addEventListener("scroll",s),document.addEventListener("resize",s),s(),()=>{document.removeEventListener("scroll",s),document.removeEventListener("resize",s)}},[m,f]),(0,r.jsx)(o,{toc:v,className:t,linkClassName:n,...d})}},9614:function(e,t,n){"use strict";n.d(t,{A:()=>a});var r=n(7259);n(6363);var s=n(3526);function a({children:e,hidden:t,className:n}){return(0,r.jsx)("div",{role:"tabpanel",className:(0,s.A)("tabItem__0N7",n),hidden:t,children:e})}},6214:function(e,t,n){"use strict";n.d(t,{A:()=>b});var r=n(7259),s=n(6363),a=n(3526),i=n(4800),l=n(4175),o=n(7596),c=n(449),u=n(9552),d=n(6945),m=n(1614);function h(e){return s.Children.toArray(e).filter(e=>"\n"!==e).map(e=>{if(!e||(0,s.isValidElement)(e)&&function(e){let{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw Error(`Docusaurus error: Bad <Tabs> child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the <Tabs> component should be <TabItem>, and every <TabItem> should have a unique "value" prop.`)})?.filter(Boolean)??[]}function f({value:e,tabValues:t}){return t.some(t=>t.value===e)}var p=n(9635);function x({className:e,block:t,selectedValue:n,selectValue:s,tabValues:i}){let o=[],{blockElementScrollPositionUntilNextRender:c}=(0,l.a_)(),u=e=>{let t=e.currentTarget,r=i[o.indexOf(t)].value;r!==n&&(c(t),s(r))},d=e=>{let t=null;switch(e.key){case"Enter":u(e);break;case"ArrowRight":{let n=o.indexOf(e.currentTarget)+1;t=o[n]??o[0];break}case"ArrowLeft":{let n=o.indexOf(e.currentTarget)-1;t=o[n]??o[o.length-1]}}t?.focus()};return(0,r.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,a.A)("tabs",{"tabs--block":t},e),children:i.map(({value:e,label:t,attributes:s})=>(0,r.jsx)("li",{role:"tab",tabIndex:n===e?0:-1,"aria-selected":n===e,ref:e=>{o.push(e)},onKeyDown:d,onClick:u,...s,className:(0,a.A)("tabs__item","tabItem_MQOM",s?.className,{"tabs__item--active":n===e}),children:t??e},e))})}function j({lazy:e,children:t,selectedValue:n}){let i=(Array.isArray(t)?t:[t]).filter(Boolean);if(e){let e=i.find(e=>e.props.value===n);return e?(0,s.cloneElement)(e,{className:(0,a.A)("margin-top--md",e.props.className)}):null}return(0,r.jsx)("div",{className:"margin-top--md",children:i.map((e,t)=>(0,s.cloneElement)(e,{key:t,hidden:e.props.value!==n}))})}function v(e){let t=function(e){let t,{defaultValue:n,queryString:r=!1,groupId:a}=e,i=function(e){let{values:t,children:n}=e;return(0,s.useMemo)(()=>{let e=t??h(n).map(({props:{value:e,label:t,attributes:n,default:r}})=>({value:e,label:t,attributes:n,default:r})),r=(0,d.XI)(e,(e,t)=>e.value===t.value);if(r.length>0)throw Error(`Docusaurus error: Duplicate values "${r.map(e=>e.value).join(", ")}" found in <Tabs>. Every value needs to be unique.`);return e},[t,n])}(e),[l,p]=(0,s.useState)(()=>(function({defaultValue:e,tabValues:t}){if(0===t.length)throw Error("Docusaurus error: the <Tabs> component requires at least one <TabItem> children component");if(e){if(!f({value:e,tabValues:t}))throw Error(`Docusaurus error: The <Tabs> has a defaultValue "${e}" but none of its children has the corresponding value. Available values are: ${t.map(e=>e.value).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return e}let n=t.find(e=>e.default)??t[0];if(!n)throw Error("Unexpected error: 0 tabValues");return n.value})({defaultValue:n,tabValues:i})),[x,j]=function({queryString:e=!1,groupId:t}){let n=(0,o.W6)(),r=function({queryString:e=!1,groupId:t}){if("string"==typeof e)return e;if(!1===e)return null;if(!0===e&&!t)throw Error('Docusaurus error: The <Tabs> component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return t??null}({queryString:e,groupId:t});return[(0,u.aZ)(r),(0,s.useCallback)(e=>{if(!r)return;let t=new URLSearchParams(n.location.search);t.set(r,e),n.replace({...n.location,search:t.toString()})},[r,n])]}({queryString:r,groupId:a}),[v,b]=function({groupId:e}){let t=e?`docusaurus.tab.${e}`:null,[n,r]=(0,m.Dv)(t);return[n,(0,s.useCallback)(e=>{t&&r.set(e)},[t,r])]}({groupId:a}),g=f({value:t=x??v,tabValues:i})?t:null;return(0,c.A)(()=>{g&&p(g)},[g]),{selectedValue:l,selectValue:(0,s.useCallback)(e=>{if(!f({value:e,tabValues:i}))throw Error(`Can't select invalid tab value=${e}`);p(e),j(e),b(e)},[j,b,i]),tabValues:i}}(e);return(0,r.jsxs)("div",{className:(0,a.A)(i.G.tabs.container,"tabs-container","tabList_wsMU"),children:[(0,r.jsx)(x,{...t,...e}),(0,r.jsx)(j,{...t,...e})]})}function b(e){let t=(0,p.A)();return(0,r.jsx)(v,{...e,children:h(e.children)},String(t))}},9796:function(e,t,n){"use strict";n.d(t,{R:()=>i,x:()=>l});var r=n(6363);let s={},a=r.createContext(s);function i(e){let 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)}}}]);
|