openc3-cosmos-tool-docs 5.18.0 → 5.20.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/tools/staticdocs/404.html +2 -2
- data/tools/staticdocs/assets/images/cmd_authority-51594401bfa6d8cc5849aae05b4d2af838360f8a3329f9746aa1307fe3091402.png +0 -0
- data/tools/staticdocs/assets/images/right_click-371e3683026c0bb2b27187277b4e99727c6b52965e0190a5f81335248f40ef9b.png +0 -0
- data/tools/staticdocs/assets/images/targets-6b17daf175185b13bea9eddafd4773e5f41d1ef4e953134f30bee0799c1e5c31.png +0 -0
- data/tools/staticdocs/assets/js/0f5d161c.017a0733.js +1 -0
- data/tools/staticdocs/assets/js/103cc3be.537144c5.js +1 -0
- data/tools/staticdocs/assets/js/13196248.6b49e93d.js +1 -0
- data/tools/staticdocs/assets/js/{1e02e6a3.e6ef8665.js → 1e02e6a3.0445f325.js} +1 -1
- data/tools/staticdocs/assets/js/{2bb7bf90.fa05d998.js → 2bb7bf90.633f7a6c.js} +1 -1
- data/tools/staticdocs/assets/js/3917.a6366d59.js +1 -0
- data/tools/staticdocs/assets/js/42170351.d7f6034b.js +1 -0
- data/tools/staticdocs/assets/js/54d0d530.fa34b0b0.js +1 -0
- data/tools/staticdocs/assets/js/5fe211ef.0b54b37a.js +1 -0
- data/tools/staticdocs/assets/js/{6831b732.185eb427.js → 6831b732.60c3c6d5.js} +1 -1
- data/tools/staticdocs/assets/js/{6b210247.e96f3982.js → 6b210247.aaa91da1.js} +1 -1
- data/tools/staticdocs/assets/js/{6b65133b.4e84b1c2.js → 6b65133b.76b83e83.js} +1 -1
- data/tools/staticdocs/assets/js/6f92e431.d02304f0.js +1 -0
- data/tools/staticdocs/assets/js/72c6d8a8.98821dd1.js +1 -0
- data/tools/staticdocs/assets/js/9424f0b3.b6a7e150.js +1 -0
- data/tools/staticdocs/assets/js/99581c43.64e9c551.js +1 -0
- data/tools/staticdocs/assets/js/{a677c089.abc52ace.js → a677c089.7877e85d.js} +1 -1
- data/tools/staticdocs/assets/js/a9987364.0358fb0b.js +1 -0
- data/tools/staticdocs/assets/js/aa6b6c1b.9f3252e1.js +1 -0
- data/tools/staticdocs/assets/js/{b6d70f94.4923c793.js → b6d70f94.19c327f0.js} +1 -1
- data/tools/staticdocs/assets/js/{c24eae19.251e0038.js → c24eae19.503774e8.js} +1 -1
- data/tools/staticdocs/assets/js/d1bfc316.28d99aa4.js +1 -0
- data/tools/staticdocs/assets/js/d5d77c37.fb296e02.js +1 -0
- data/tools/staticdocs/assets/js/db8fa1d0.b0500934.js +1 -0
- data/tools/staticdocs/assets/js/{ebec1ccb.9bea92b0.js → ebec1ccb.a1b5fc97.js} +1 -1
- data/tools/staticdocs/assets/js/{f15615f1.5c433923.js → f15615f1.ee14b7d6.js} +1 -1
- data/tools/staticdocs/assets/js/main.03e795fe.js +2 -0
- data/tools/staticdocs/assets/js/{runtime~main.12d1e41d.js → runtime~main.cb8e940d.js} +1 -1
- data/tools/staticdocs/docs/configuration/command.html +18 -7
- data/tools/staticdocs/docs/configuration/format.html +2 -2
- data/tools/staticdocs/docs/configuration/interfaces.html +3 -3
- data/tools/staticdocs/docs/configuration/plugins.html +6 -6
- data/tools/staticdocs/docs/configuration/protocols.html +4 -4
- data/tools/staticdocs/docs/configuration/ssl-tls.html +2 -2
- data/tools/staticdocs/docs/configuration/table.html +6 -6
- data/tools/staticdocs/docs/configuration/target.html +2 -2
- data/tools/staticdocs/docs/configuration/telemetry-screens.html +19 -6
- data/tools/staticdocs/docs/configuration/telemetry.html +5 -5
- data/tools/staticdocs/docs/configuration.html +2 -2
- data/tools/staticdocs/docs/development/curl.html +2 -2
- data/tools/staticdocs/docs/development/developing.html +4 -4
- data/tools/staticdocs/docs/development/host-install.html +2 -2
- data/tools/staticdocs/docs/development/json-api.html +2 -2
- data/tools/staticdocs/docs/development/log-structure.html +2 -2
- data/tools/staticdocs/docs/development/roadmap.html +15 -9
- data/tools/staticdocs/docs/development/streaming-api.html +2 -2
- data/tools/staticdocs/docs/development/testing.html +2 -2
- data/tools/staticdocs/docs/development.html +2 -2
- data/tools/staticdocs/docs/getting-started/generators.html +4 -4
- data/tools/staticdocs/docs/getting-started/gettingstarted.html +6 -6
- data/tools/staticdocs/docs/getting-started/installation.html +3 -3
- data/tools/staticdocs/docs/getting-started/key_concepts.html +5 -5
- data/tools/staticdocs/docs/getting-started/podman.html +2 -2
- data/tools/staticdocs/docs/getting-started/requirements.html +4 -4
- data/tools/staticdocs/docs/getting-started/upgrading.html +2 -2
- data/tools/staticdocs/docs/getting-started.html +2 -2
- data/tools/staticdocs/docs/guides/bridges.html +2 -2
- data/tools/staticdocs/docs/guides/cfs.html +2 -2
- data/tools/staticdocs/docs/guides/custom-widgets.html +4 -4
- data/tools/staticdocs/docs/guides/little-endian-bitfields.html +2 -2
- data/tools/staticdocs/docs/guides/local-mode.html +2 -2
- data/tools/staticdocs/docs/guides/logging.html +2 -2
- data/tools/staticdocs/docs/guides/monitoring.html +2 -2
- data/tools/staticdocs/docs/guides/performance.html +2 -2
- data/tools/staticdocs/docs/guides/raspberrypi.html +2 -2
- data/tools/staticdocs/docs/guides/script-writing.html +10 -10
- data/tools/staticdocs/docs/guides/scripting-api.html +19 -17
- data/tools/staticdocs/docs/guides.html +3 -3
- data/tools/staticdocs/docs/meta/contributing.html +2 -2
- data/tools/staticdocs/docs/meta/licenses.html +2 -2
- data/tools/staticdocs/docs/meta/philosophy.html +2 -2
- data/tools/staticdocs/docs/meta/xtce.html +2 -2
- data/tools/staticdocs/docs/meta.html +2 -2
- data/tools/staticdocs/docs/privacy.html +2 -2
- data/tools/staticdocs/docs/tools/autonomic.html +3 -3
- data/tools/staticdocs/docs/tools/bucket-explorer.html +2 -2
- data/tools/staticdocs/docs/tools/calendar.html +6 -6
- data/tools/staticdocs/docs/tools/cmd-sender.html +2 -2
- data/tools/staticdocs/docs/tools/cmd-tlm-server.html +7 -5
- data/tools/staticdocs/docs/tools/data-extractor.html +2 -2
- data/tools/staticdocs/docs/tools/data-viewer.html +2 -2
- data/tools/staticdocs/docs/tools/handbooks.html +2 -2
- data/tools/staticdocs/docs/tools/limits-monitor.html +3 -3
- data/tools/staticdocs/docs/tools/packet-viewer.html +2 -2
- data/tools/staticdocs/docs/tools/script-runner.html +12 -6
- data/tools/staticdocs/docs/tools/table-manager.html +2 -2
- data/tools/staticdocs/docs/tools/tlm-grapher.html +2 -2
- data/tools/staticdocs/docs/tools/tlm-viewer.html +3 -3
- data/tools/staticdocs/docs/tools.html +2 -2
- data/tools/staticdocs/docs.html +2 -2
- data/tools/staticdocs/img/cmd_tlm_server/cmd_authority.png +0 -0
- data/tools/staticdocs/img/cmd_tlm_server/targets.png +0 -0
- data/tools/staticdocs/img/script_runner/right_click.png +0 -0
- data/tools/staticdocs/index.html +2 -2
- data/tools/staticdocs/lunr-index-1730331075297.json +1 -0
- data/tools/staticdocs/lunr-index.json +1 -1
- data/tools/staticdocs/markdown-page.html +2 -2
- data/tools/staticdocs/search-doc-1730331075297.json +1 -0
- data/tools/staticdocs/search-doc.json +1 -1
- metadata +38 -34
- data/tools/staticdocs/assets/images/targets-77cde238fd55b2ed0a180ac2b906f6c1fe4677b22da718c455d61ac17c8a888f.png +0 -0
- data/tools/staticdocs/assets/js/0f5d161c.e26d88b8.js +0 -1
- data/tools/staticdocs/assets/js/103cc3be.78f97eb1.js +0 -1
- data/tools/staticdocs/assets/js/13196248.ca2e8950.js +0 -1
- data/tools/staticdocs/assets/js/3917.1ec7d126.js +0 -1
- data/tools/staticdocs/assets/js/42170351.c68b85e1.js +0 -1
- data/tools/staticdocs/assets/js/54d0d530.d3f9a4ac.js +0 -1
- data/tools/staticdocs/assets/js/5fe211ef.a9f21277.js +0 -1
- data/tools/staticdocs/assets/js/6f92e431.65aa0240.js +0 -1
- data/tools/staticdocs/assets/js/72c6d8a8.98daa27a.js +0 -1
- data/tools/staticdocs/assets/js/9424f0b3.61c6bd97.js +0 -1
- data/tools/staticdocs/assets/js/99581c43.527aab44.js +0 -1
- data/tools/staticdocs/assets/js/a9987364.5ef1644f.js +0 -1
- data/tools/staticdocs/assets/js/aa6b6c1b.c51c044d.js +0 -1
- data/tools/staticdocs/assets/js/d1bfc316.0a5ff560.js +0 -1
- data/tools/staticdocs/assets/js/d5d77c37.70fdbbc6.js +0 -1
- data/tools/staticdocs/assets/js/db8fa1d0.8f1b2c9f.js +0 -1
- data/tools/staticdocs/assets/js/main.b5390098.js +0 -2
- data/tools/staticdocs/lunr-index-1724101625047.json +0 -1
- data/tools/staticdocs/search-doc-1724101625047.json +0 -1
- /data/tools/staticdocs/assets/js/{main.b5390098.js.LICENSE.txt → main.03e795fe.js.LICENSE.txt} +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bfdf0d4ce1d93746f08c969af09802c882789f015d3ddb321dcbd6c680da3d38
|
4
|
+
data.tar.gz: 73c84498ff250b0b0d5a36f12414d6d6e136a36fff622f574c09b147a181d062
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f21287111476440e021e88b62f25b3b6d554fb4dd96875ee604e475824ce4e7d99b32e3415fdbd4b5a122f2301dd499479e61e7d2de00c1edd7ed920f5a2e75f
|
7
|
+
data.tar.gz: ea05275ea738235e1e6a2dd59985ea79c260c85d147912ce35ac252a9c55f92271a54e9b481e92271b8e24cafbdb5a2dc33ab511235518e408deda7436032d24
|
data/tools/staticdocs/404.html
CHANGED
@@ -4,8 +4,8 @@
|
|
4
4
|
<meta charset="UTF-8">
|
5
5
|
<meta name="generator" content="Docusaurus v3.5.2">
|
6
6
|
<title data-rh="true">Page Not Found | OpenC3 Docs</title><meta data-rh="true" name="viewport" content="width=device-width,initial-scale=1"><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:url" content="https://docs.openc3.com/tools/staticdocs/404.html"><meta data-rh="true" property="og:locale" content="en"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docusaurus_tag" content="default"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" name="docsearch:docusaurus_tag" content="default"><meta data-rh="true" property="og:title" content="Page Not Found | OpenC3 Docs"><link data-rh="true" rel="icon" href="/tools/staticdocs/img/favicon.png"><link data-rh="true" rel="canonical" href="https://docs.openc3.com/tools/staticdocs/404.html"><link data-rh="true" rel="alternate" href="https://docs.openc3.com/tools/staticdocs/404.html" hreflang="en"><link data-rh="true" rel="alternate" href="https://docs.openc3.com/tools/staticdocs/404.html" hreflang="x-default"><link rel="stylesheet" href="/tools/staticdocs/assets/css/styles.80ddca08.css">
|
7
|
-
<script src="/tools/staticdocs/assets/js/runtime~main.
|
8
|
-
<script src="/tools/staticdocs/assets/js/main.
|
7
|
+
<script src="/tools/staticdocs/assets/js/runtime~main.cb8e940d.js" defer="defer"></script>
|
8
|
+
<script src="/tools/staticdocs/assets/js/main.03e795fe.js" defer="defer"></script>
|
9
9
|
</head>
|
10
10
|
<body class="navigation-with-keyboard">
|
11
11
|
<script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){try{return new URLSearchParams(window.location.search).get("docusaurus-theme")}catch(t){}}()||function(){try{return window.localStorage.getItem("theme")}catch(t){}}();t(null!==e?e:"dark")}(),function(){try{const n=new URLSearchParams(window.location.search).entries();for(var[t,e]of n)if(t.startsWith("docusaurus-data-")){var a=t.replace("docusaurus-data-","data-");document.documentElement.setAttribute(a,e)}}catch(t){}}()</script><div id="__docusaurus"><div role="region" aria-label="Skip to main content"><a class="skipToContent_G6ar" href="#__docusaurus_skipToContent_fallback">Skip to main content</a></div><nav aria-label="Main" class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Toggle navigation bar" aria-expanded="false" class="navbar__toggle clean-btn" type="button"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/tools/staticdocs/"><div class="navbar__logo"><img src="/tools/staticdocs/img/logo.svg" alt="OpenC3 Logo" class="themedComponent_DHUr themedComponent--light_DIHH"><img src="/tools/staticdocs/img/logo.svg" alt="OpenC3 Logo" class="themedComponent_DHUr themedComponent--dark_Bv2M"></div><b class="navbar__title text--truncate">OpenC3 Docs</b></a><a class="navbar__item navbar__link" href="/tools/staticdocs/docs">Documentation</a><a href="https://openc3.com/enterprise/" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Enterprise</a></div><div class="navbar__items navbar__items--right"><div class="navbarSearchContainer_bmvg"><div class="navbar__search"><span aria-label="expand searchbar" role="button" class="search-icon" tabindex="0"></span><input id="search_input_react" type="search" placeholder="Loading..." aria-label="Search" class="navbar__search-input search-bar" disabled=""></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div id="__docusaurus_skipToContent_fallback" class="main-wrapper mainWrapper_UyTV"><main class="container margin-vert--xl"><div class="row"><div class="col col--6 col--offset-3"><h1 class="hero__title">Page Not Found</h1><p>We could not find what you were looking for.</p><p>Please contact the owner of the site that linked you to the original URL and let them know their link is broken.</p></div></div></main></div><footer class="footer footer--dark"><div class="container container-fluid"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Homepage</div><ul class="footer__items clean-list"><li class="footer__item"><a href="https://openc3.com" target="_blank" rel="noopener noreferrer" class="footer__link-item">Home</a></li></ul></div><div class="col footer__col"><div class="footer__title">Docs</div><ul class="footer__items clean-list"><li class="footer__item"><a class="footer__link-item" href="/tools/staticdocs/docs">Documentation</a></li></ul></div><div class="col footer__col"><div class="footer__title">Community</div><ul class="footer__items clean-list"><li class="footer__item"><a href="https://www.linkedin.com/company/openc3" target="_blank" rel="noopener noreferrer" class="footer__link-item">LinkedIn<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_awgD"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li></ul></div><div class="col footer__col"><div class="footer__title">More</div><ul class="footer__items clean-list"><li class="footer__item"><a href="https://github.com/OpenC3/cosmos" target="_blank" rel="noopener noreferrer" class="footer__link-item">GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_awgD"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a class="footer__link-item" href="/tools/staticdocs/docs/privacy">Privacy</a></li></ul></div></div><div class="footer__bottom text--center"><div class="footer__copyright">Copyright © 2024 OpenC3, Inc.</div></div></div></footer></div>
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([[2327],{6114:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>p,frontMatter:()=>s,metadata:()=>c,toc:()=>a});var i=n(1085),r=n(1184);const s={title:"Script Runner"},o=void 0,c={id:"tools/script-runner",title:"Script Runner",description:"Introduction",source:"@site/docs/tools/script-runner.md",sourceDirName:"tools",slug:"/tools/script-runner",permalink:"/tools/staticdocs/docs/tools/script-runner",draft:!1,unlisted:!1,editUrl:"https://github.com/OpenC3/cosmos/tree/main/docs.openc3.com/docs/tools/script-runner.md",tags:[],version:"current",frontMatter:{title:"Script Runner"},sidebar:"defaultSidebar",previous:{title:"Packet Viewer",permalink:"/tools/staticdocs/docs/tools/packet-viewer"},next:{title:"Table Manager",permalink:"/tools/staticdocs/docs/tools/table-manager"}},l={},a=[{value:"Introduction",id:"introduction",level:2},{value:"Script Runner Menus",id:"script-runner-menus",level:2},{value:"File Menu Items",id:"file-menu-items",level:3},{value:"File Open",id:"file-open",level:4},{value:"File Save As",id:"file-save-as",level:4},{value:"Script Menu Items",id:"script-menu-items",level:3},{value:"Running Scripts",id:"running-scripts",level:2},{value:"Right Click Script",id:"right-click-script",level:3},{value:"Running Script Suites",id:"running-script-suites",level:2},{value:"Group",id:"group",level:3},{value:"Suite",id:"suite",level:3},{value:"Script Suite Options",id:"script-suite-options",level:3},{value:"Pause on Error",id:"pause-on-error",level:4},{value:"Continue after Error",id:"continue-after-error",level:4},{value:"Abort after Error",id:"abort-after-error",level:4},{value:"Manual",id:"manual",level:4},{value:"Loop",id:"loop",level:4},{value:"Break Loop on Error",id:"break-loop-on-error",level:4},{value:"Debugging Scripts",id:"debugging-scripts",level:2}];function d(e){const t={a:"a",code:"code",h2:"h2",h3:"h3",h4:"h4",img:"img",li:"li",p:"p",pre:"pre",ul:"ul",...(0,r.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.h2,{id:"introduction",children:"Introduction"}),"\n",(0,i.jsx)(t.p,{children:"Script Runner is both an editor of COSMOS scripts as well as executes scripts. Script files are stored within a COSMOS target and Script Runner provides the ability to open, save, download and delete these files. When a suite of scripts is opened, Script Runner provides additional options to run individual scripts, groups of scripts, or entire suites."}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{alt:"Script Runner",src:n(5354).A+"",width:"1273",height:"929"})}),"\n",(0,i.jsx)(t.h2,{id:"script-runner-menus",children:"Script Runner Menus"}),"\n",(0,i.jsx)(t.h3,{id:"file-menu-items",children:"File Menu Items"}),"\n",(0,i.jsx)("img",{src:n(5398).A,alt:"File Menu",style:{float:"left","margin-right":"50px",height:"250px"}}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsx)(t.li,{children:"Clears the editor and filename"}),"\n",(0,i.jsx)(t.li,{children:"Creates a new test suite in Ruby or Python"}),"\n",(0,i.jsx)(t.li,{children:"Opens a dialog to select a file to open"}),"\n",(0,i.jsx)(t.li,{children:"Opens a recently used file"}),"\n",(0,i.jsx)(t.li,{children:"Saves the currently opened file to disk"}),"\n",(0,i.jsx)(t.li,{children:"Rename the current file"}),"\n",(0,i.jsx)(t.li,{children:"Downloads the current file to the browser"}),"\n",(0,i.jsxs)(t.li,{children:["Deletes the current file (Permanently!)","\n",(0,i.jsx)("br",{}),"\n",(0,i.jsx)("br",{}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(t.h4,{id:"file-open",children:"File Open"}),"\n",(0,i.jsx)(t.p,{children:"The File Open Dialog displays a tree view of the installed targets. You can manually open the folders and browse for the file you want. You can also use the search box at the top and start typing part of the filename to filter the results."}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{alt:"File Open",src:n(9117).A+"",width:"597",height:"599"})}),"\n",(0,i.jsx)(t.h4,{id:"file-save-as",children:"File Save As"}),"\n",(0,i.jsx)(t.p,{children:"When saving a file for the first time, or using File Save As, the File Save As Dialog appears. It works similar to the File Open Dialog displaying the tree view of the installed targets. You must select a folder by clicking the folder name and then filling out the Filename field with a filename before clicking Ok. You will be prompted before over-writing an existing file."}),"\n",(0,i.jsx)(t.h3,{id:"script-menu-items",children:"Script Menu Items"}),"\n",(0,i.jsx)("img",{src:n(5079).A,alt:"Script Menu",style:{float:"left","margin-right":"50px",height:"330px"}}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsx)(t.li,{children:"Display started and finished scripts"}),"\n",(0,i.jsx)(t.li,{children:"Show environment variables"}),"\n",(0,i.jsx)(t.li,{children:"Show defined metadata"}),"\n",(0,i.jsx)(t.li,{children:"Show overridden telemetry values"}),"\n",(0,i.jsx)(t.li,{children:"Perform a syntax check"}),"\n",(0,i.jsx)(t.li,{children:"Perform a script mnemonic check"}),"\n",(0,i.jsx)(t.li,{children:"View the instrumented script"}),"\n",(0,i.jsx)(t.li,{children:"Shows the script call stack"}),"\n",(0,i.jsxs)(t.li,{children:["Display the ",(0,i.jsx)(t.a,{href:"/tools/staticdocs/docs/tools/script-runner#debugging-scripts",children:"debug"})," prompt"]}),"\n",(0,i.jsx)(t.li,{children:"Disconnect from real interfaces"}),"\n",(0,i.jsx)(t.li,{children:"Delete all script breakpoints"}),"\n"]}),"\n",(0,i.jsx)(t.p,{children:"The Execution Status popup lists the currently running scripts. This allows other users to connect to running scripts and follow along with the currently executing script. It also lists previously executed scripts so you can download the script log."}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{alt:"Running Scripts",src:n(8484).A+"",width:"1508",height:"505"})}),"\n",(0,i.jsx)(t.h2,{id:"running-scripts",children:"Running Scripts"}),"\n",(0,i.jsx)(t.p,{children:"Running a regular script is simply a matter of opening it and clicking the Start button. By default when you open a script the Filename is updated and the editor loads the script."}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{alt:"checks.rb",src:n(2970).A+"",width:"1273",height:"533"})}),"\n",(0,i.jsx)(t.p,{children:"Once you click Start the script is spawned in the Server and the Script State becomes Connecting."}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{alt:"connecting",src:n(7644).A+"",width:"1273",height:"68"})}),"\n",(0,i.jsx)(t.p,{children:"At that point the currently executing line is marked with green. If an error is encountered the line turns red and and the Pause button changes to Retry to allow the line to be re-tried."}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{alt:"error",src:n(4240).A+"",width:"1273",height:"527"})}),"\n",(0,i.jsx)(t.p,{children:"This allows checks that depend on telemetry changing to potentially be retried as telemetry is being updated live in the background. You can also click Go to continue pass the error or Stop to end the script execution."}),"\n",(0,i.jsx)(t.h3,{id:"right-click-script",children:"Right Click Script"}),"\n",(0,i.jsx)(t.p,{children:"Right clicking a script brings up several options:"}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{alt:"right-click",src:n(895).A+"",width:"2152",height:"1188"})}),"\n",(0,i.jsx)(t.p,{children:"'Execute selection' causes the selected piece of code to be copied to a fresh Script Runner tab and executed independently of the current script. This is useful to run a selected section of code but be careful of references to other variables that are not selected. COSMOS will not be able to reference undefined variables!"}),"\n",(0,i.jsx)(t.p,{children:"'Run from here' causes everything from the current location of the cursor to be copied to a fresh Script Runner tab and executed independently of the current script. This is useful to avoid executing earlier pieces of code but be careful of references to other variables that are not selected. COSMOS will not be able to reference undefined variables!"}),"\n",(0,i.jsx)(t.p,{children:"'Clear all breakpoints' allows you to quickly clear breakpoints set by clicking on the editor line number."}),"\n",(0,i.jsx)(t.h2,{id:"running-script-suites",children:"Running Script Suites"}),"\n",(0,i.jsx)(t.p,{children:"If a script is structured as a Suite it automatically causes Script Runner to parse the file to populate the Suite, Group, and Script drop down menus."}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{alt:"Suite Script",src:n(4430).A+"",width:"1273",height:"624"})}),"\n",(0,i.jsx)(t.p,{children:"To generate a new Suite use the File -> New Suite and then choose either Ruby or Python to create a Suite in that language."}),"\n",(0,i.jsx)(t.h3,{id:"group",children:"Group"}),"\n",(0,i.jsx)(t.p,{children:"The Group class contains the methods used to run the test or operations. Any methods starting with 'script', 'op', or 'test' which are implemented inside a Group class are automatically included as scripts to run. For example, in the above image, you'll notice the 'script_power_on' is in the Script drop down menu. Here's another simple Ruby example:"}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-ruby",children:'require \'openc3/script/suite.rb\'\nclass ExampleGroup < OpenC3::Group\n def setup\n puts "setup"\n end\n def script_1\n puts "script 1"\n end\n def teardown\n puts "teardown"\n end\nend\n'})}),"\n",(0,i.jsx)(t.p,{children:"Equivalent Python example:"}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-python",children:'from openc3.script.suite import Suite, Group\nclass ExampleGroup(Group):\n def setup(self):\n print("setup")\n def script_1(self):\n print("script 1")\n def teardown(self)\n print("teardown")\n'})}),"\n",(0,i.jsx)(t.p,{children:"The setup and teardown methods are special methods which enable the Setup and Teardown buttons next to the Group drop down menu. Clicking these buttons runs the associated method."}),"\n",(0,i.jsx)(t.h3,{id:"suite",children:"Suite"}),"\n",(0,i.jsx)(t.p,{children:"Groups are added to Suites by creating a class inheriting from Suite and then calling the add_group method. For example in Ruby:"}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-ruby",children:'class MySuite < OpenC3::Suite\n def initialize\n add_group(\'ExampleGroup\')\n end\n def setup\n puts "Suite setup"\n end\n def teardown\n puts "Suite teardown"\n end\nend\n'})}),"\n",(0,i.jsx)(t.p,{children:"In Python:"}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-python",children:'from openc3.script.suite import Suite, Group\nclass MySuite(Suite):\n def __init__(self):\n self.add_group(\'ExampleGroup\')\n def setup(self):\n print("Suite setup")\n def teardown(self):\n print("Suite teardown")\n'})}),"\n",(0,i.jsx)(t.p,{children:"Again there are setup and teardown methods which enable the Setup and Teardown buttons next to the Suite drop down menu."}),"\n",(0,i.jsx)(t.p,{children:"Multiple Suites and Groups can be created in the same file and will be parsed and added to the drop down menus. Clicking Start at the Suite level will run ALL Groups and ALL Scripts within each Group. Similarly, clicking Start at the Group level will run all Scripts in the Group. Clicking Start next to the Script will run just the single Script."}),"\n",(0,i.jsx)(t.h3,{id:"script-suite-options",children:"Script Suite Options"}),"\n",(0,i.jsx)(t.p,{children:"Opening a Script Suite creates six checkboxes which provide options to the running script."}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{alt:"Suite Checkboxes",src:n(8702).A+"",width:"464",height:"145"})}),"\n",(0,i.jsx)(t.h4,{id:"pause-on-error",children:"Pause on Error"}),"\n",(0,i.jsx)(t.p,{children:"Pauses the script if an error is encountered. This is the default and identical to how normal scripts are executed. Unchecking this box allows the script to continue past errors without user intervention. Similar to the User clicking Go upon encountering an error."}),"\n",(0,i.jsx)(t.h4,{id:"continue-after-error",children:"Continue after Error"}),"\n",(0,i.jsx)(t.p,{children:"Continue the script if an error is encountered. This is the default and identical to how normal scripts are executed. Unchecking this box means that the script will end after the first encountered error and execution will continue with any other scripts in the Suite/Group."}),"\n",(0,i.jsx)(t.h4,{id:"abort-after-error",children:"Abort after Error"}),"\n",(0,i.jsx)(t.p,{children:"Abort the entire execution upon encountering an error. If the first Script in a Suite's Group encounters an error the entire Suite will stop execution. Note, if Continue after Error is set, the current script is allowed to continue and complete."}),"\n",(0,i.jsx)(t.h4,{id:"manual",children:"Manual"}),"\n",(0,i.jsxs)(t.p,{children:["In Ruby, sets the global variable called ",(0,i.jsx)(t.code,{children:"$manual"})," to true. In Python, sets ",(0,i.jsx)(t.code,{children:"RunningScript.manual"})," to True. Setting this box only allows the script author to determine if the operator wants to execute manual steps or not. It is up the script author to use the variable in their scripts."]}),"\n",(0,i.jsx)(t.h4,{id:"loop",children:"Loop"}),"\n",(0,i.jsx)(t.p,{children:"Loop whatever the user started continuously. If the user clicks Start next to the Group then the entire Group will be looped. This is useful to catch and debug those tricky timing errors that only sometimes happen."}),"\n",(0,i.jsx)(t.h4,{id:"break-loop-on-error",children:"Break Loop on Error"}),"\n",(0,i.jsx)(t.p,{children:"Break the loop if an Error occurs. Only available if the Loop option is set."}),"\n",(0,i.jsx)(t.h2,{id:"debugging-scripts",children:"Debugging Scripts"}),"\n",(0,i.jsxs)(t.p,{children:["When you enable the Debug prompt an additional line appears between the script and the Log Messages. You can type local variables to cause them to be output in the Log Messages. You can also set local variables by typing ",(0,i.jsx)(t.code,{children:"var = 10"}),"."]}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{alt:"Debug",src:n(241).A+"",width:"1273",height:"748"})}),"\n",(0,i.jsx)(t.p,{children:"The Step button allows you to step line by line through the script. Clicking Go continues regular execution."})]})}function p(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(d,{...e})}):d(e)}},5398:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/file_menu-470589e527d9e82ce40e0c7d4a865e33d19b42350c2429dba97186d168137b6d.png"},5079:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/script_menu-5a10df89d9806a59b41ef990fc1181c46c7ffa00496021efceb22c0f31dcc9cc.png"},2970:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/checks_rb-89f400098ff47774008ea420860c665c15ebf06819c3ee7050bed301ea0a9f46.png"},7644:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/connecting-0f804651a891ef6112a51ba8b2e4d8dcb46e3462dcbc94e7b3c75bff20fc04e7.png"},241:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/debug-3103972d64395b50fff5808661fb846ae2de7d5934548ca5b88032f1ae12c541.png"},9117:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/file_open-a5bc9e5ef73c12913ea4882498ceb52f93c73afaf5bb0c1083c4c1ee402f571d.png"},895:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/right_click-371e3683026c0bb2b27187277b4e99727c6b52965e0190a5f81335248f40ef9b.png"},8484:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/running_scripts-694a1b310d42791acf64cf76ea370bb273084954107d5e6e2caf15f4fb50e634.png"},4240:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/script_error-2061222e00f5e5190a4407be1f8999200badca9b3137659de007e27cf1708dc0.png"},5354:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/script_runner-31f6bfcb631b788ff0bf792ac21da30aaa503ca926b10a22d4337114effc28f0.png"},4430:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/script_suite-16647c3b3de01a8749f1b5c4ab2f8b452630df8c0470e5be38652acacfc98b5d.png"},8702:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/suite_checkboxes-af8452153dbc2143718fefcfc7d441e05f42c241b3c10d4f41200ae576f68063.png"},1184:(e,t,n)=>{n.d(t,{R:()=>o,x:()=>c});var i=n(4041);const r={},s=i.createContext(r);function o(e){const 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(r):e.components||r:o(e.components),i.createElement(s.Provider,{value:t},e.children)}}}]);
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([[3467],{105:(e,t,i)=>{i.r(t),i.d(t,{assets:()=>c,contentTitle:()=>a,default:()=>l,frontMatter:()=>s,metadata:()=>o,toc:()=>d});var n=i(1085),r=i(1184);const s={title:"Autonomic (Enterprise)"},a=void 0,o={id:"tools/autonomic",title:"Autonomic (Enterprise)",description:"Introduction",source:"@site/docs/tools/autonomic.md",sourceDirName:"tools",slug:"/tools/autonomic",permalink:"/tools/staticdocs/docs/tools/autonomic",draft:!1,unlisted:!1,editUrl:"https://github.com/OpenC3/cosmos/tree/main/docs.openc3.com/docs/tools/autonomic.md",tags:[],version:"current",frontMatter:{title:"Autonomic (Enterprise)"},sidebar:"defaultSidebar",previous:{title:"Tools",permalink:"/tools/staticdocs/docs/tools"},next:{title:"Bucket Explorer",permalink:"/tools/staticdocs/docs/tools/bucket-explorer"}},c={},d=[{value:"Introduction",id:"introduction",level:2},{value:"Overview",id:"overview",level:3},{value:"TriggerGroups",id:"triggergroups",level:3},{value:"Triggers",id:"triggers",level:3},{value:"Reactions",id:"reactions",level:3}];function g(e){const t={admonition:"admonition",h2:"h2",h3:"h3",img:"img",p:"p",...(0,r.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:"Autonomic allows for the automated execution of commands and scripts based on user-defined rules."}),"\n",(0,n.jsx)(t.h3,{id:"overview",children:"Overview"}),"\n",(0,n.jsx)(t.p,{children:"Autonomic operates with some basic building blocks: Trigger Groups, Triggers, and Reactions. Triggers are simply logical blocks which evaluate true or false. Reactions can be linked to one or many Triggers and specify an action to perform. Together they allow for an action to be taken based on anything going on in your system."}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"Autonomic",src:i(6370).A+"",width:"1266",height:"599"})}),"\n",(0,n.jsx)(t.h3,{id:"triggergroups",children:"TriggerGroups"}),"\n",(0,n.jsx)(t.p,{children:"Triggers are organized into groups, these groups are both for organization and to ensure that we can scale. It also allows triggers to be evaluated independently and simultaneously and can be useful for overlapping or high priority triggers. However, each trigger group spawns system resources so they should only be created as needed."}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"TriggerGroups",src:i(1884).A+"",width:"349",height:"99"})}),"\n",(0,n.jsx)(t.h3,{id:"triggers",children:"Triggers"}),"\n",(0,n.jsx)(t.p,{children:'Triggers are logical components that are evaluated to true or false. Creating a trigger is like specifying an equation to evaluate. The trigger creation dialog specifies the Trigger Group which owns the trigger and the "left operand". This can be a telemetry item or an existing trigger.'}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"CreateTrigger1",src:i(529).A+"",width:"648",height:"779"})}),"\n",(0,n.jsx)(t.p,{children:'Once you\'ve chosen the "left operand" you need to choose the operator.'}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"CreateTrigger2",src:i(3098).A+"",width:"648",height:"653"})}),"\n",(0,n.jsx)(t.p,{children:'Finally you choose the "right operand" which in this case is a simple value.'}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"CreateTrigger3",src:i(5011).A+"",width:"648",height:"715"})}),"\n",(0,n.jsx)(t.p,{children:"After the trigger is created it is displayed in Autonomic and waits to be activated by the given logic. Active triggers are highlighted in the list."}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"CreateTrigger3",src:i(9961).A+"",width:"1268",height:"607"})}),"\n",(0,n.jsx)(t.p,{children:"Triggers can also be manually disabled and enabled by clicking the plug icon."}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"CreateTrigger3",src:i(3482).A+"",width:"1268",height:"715"})}),"\n",(0,n.jsx)(t.p,{children:"Note in the above screenshot the Events which track everything about the trigger."}),"\n",(0,n.jsx)(t.h3,{id:"reactions",children:"Reactions"}),"\n",(0,n.jsx)(t.p,{children:"Reactions wait for triggers to be evaluated to true and perform actions such as sending a command or running a script. Reactions can not exist without a corresponding trigger. The reaction creation dialog specifies whether to treat the trigger as an Edge or Level. It then allows you to select which trigger(s) the reaction will react to. Selecting multiple triggers allows any of the triggers to trigger the reaction (Note: Creating a reaction which responds to Trigger A AND Trigger B is done by creating additional triggers)."}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"CreateReaction1",src:i(4776).A+"",width:"602",height:"574"})}),"\n",(0,n.jsx)(t.p,{children:"After the triggers are specified, the dialog prompts for the actions to take. You can either send a command, run a script, or simply push a notification. Commands and scripts can also optionally push a notification. In this example a script is specified with a notification at the WARN level."}),"\n",(0,n.jsx)(t.admonition,{title:"Spawning Scripts",type:"warning",children:(0,n.jsx)(t.p,{children:"Be aware of how and when you spawn scripts and whether they are running to completion. Spawning a faulty script can lead to many unfinished scripts consuming resources."})}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"CreateReaction2",src:i(6755).A+"",width:"602",height:"634"})}),"\n",(0,n.jsx)(t.p,{children:"Finally the snooze setting is specified. Snooze is the number of seconds after the reaction runs before the reaction will be allowed to run again. This is especially important in Level triggers where if the trigger remains active the reaction can run continuously."}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"CreateReaction3",src:i(6922).A+"",width:"602",height:"391"})}),"\n",(0,n.jsx)(t.p,{children:"Once the reaction is created it is listed in the interface."}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"InitialReaction",src:i(8341).A+"",width:"1271",height:"617"})}),"\n",(0,n.jsx)(t.p,{children:'When the reaction runs the "State" changes to the snooze icon and the "Snooze Until" is updated to indicate the reaction is waiting before being allowed to run again.'}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"SnoozedReaction",src:i(7747).A+"",width:"1271",height:"742"})})]})}function l(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(g,{...e})}):g(e)}},6370:(e,t,i)=>{i.d(t,{A:()=>n});const n=i.p+"assets/images/autonomic-a2118149a079f587f8f373d61f65d4d6d5e4b3df41ec5446362a449a3b51a1b3.png"},4776:(e,t,i)=>{i.d(t,{A:()=>n});const n=i.p+"assets/images/create_reaction1-a07e04677c269cb3eb5edd13bc7504ed6ba4c94f6a60d2b14a33680470d376fe.png"},6755:(e,t,i)=>{i.d(t,{A:()=>n});const n=i.p+"assets/images/create_reaction2-63e4e9ddf06a2e8bc9911395162b5a05772f0756e8b0998bcecae64cf86c398e.png"},6922:(e,t,i)=>{i.d(t,{A:()=>n});const n=i.p+"assets/images/create_reaction3-bae25e33640193d3dbbfbbfce6691479ccde16f73dbb3f0dc3023b7006259baa.png"},529:(e,t,i)=>{i.d(t,{A:()=>n});const n=i.p+"assets/images/create_trigger1-5e2f7ecf9ec2b7590aaa65503f48cd73549fea64f52e6c103370a408528538f6.png"},3098:(e,t,i)=>{i.d(t,{A:()=>n});const n=i.p+"assets/images/create_trigger2-edf2c2e6aa78a2e317e07e1cdec560dfcbbd147934630459507695c71d539f3b.png"},5011:(e,t,i)=>{i.d(t,{A:()=>n});const n=i.p+"assets/images/create_trigger3-e63629173ae73bbfd78b53062061336db8ea92ba4542b9a93412d8ac6ed19e7a.png"},3482:(e,t,i)=>{i.d(t,{A:()=>n});const n=i.p+"assets/images/disable_trigger-f5bb46fbc488bd4afcb27b21888de16816485d3e4fdbd4106b874ff06042f85b.png"},9961:(e,t,i)=>{i.d(t,{A:()=>n});const n=i.p+"assets/images/enabled_trigger-86ce16c7294d4b954ec8b68ff344694093ed5f451fc5974f855f438557148518.png"},8341:(e,t,i)=>{i.d(t,{A:()=>n});const n=i.p+"assets/images/initial_reaction-ce5d498a90cdd5a11e24471d277ed7fcb4eecc5dcaaf05220102a3178db0805e.png"},7747:(e,t,i)=>{i.d(t,{A:()=>n});const n=i.p+"assets/images/snoozed_reaction-75ef2acab11a71f5827fbc0a1be95cf0fd6bd5b24b76f9ae6ebaf43fb293ba81.png"},1884:(e,t,i)=>{i.d(t,{A:()=>n});const n=i.p+"assets/images/trigger_groups-6d9ccc6962029baa456f2d12de0fd3d03e1dbafdbf069cea65886296d2b2bde0.png"},1184:(e,t,i)=>{i.d(t,{R:()=>a,x:()=>o});var n=i(4041);const r={},s=n.createContext(r);function a(e){const 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(r):e.components||r:a(e.components),n.createElement(s.Provider,{value:t},e.children)}}}]);
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([[6677],{5854:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>d,contentTitle:()=>c,default:()=>h,frontMatter:()=>s,metadata:()=>r,toc:()=>o});var i=a(1085),n=a(1184);const s={title:"Calendar (Enterprise)"},c=void 0,r={id:"tools/calendar",title:"Calendar (Enterprise)",description:"Introduction",source:"@site/docs/tools/calendar.md",sourceDirName:"tools",slug:"/tools/calendar",permalink:"/tools/staticdocs/docs/tools/calendar",draft:!1,unlisted:!1,editUrl:"https://github.com/OpenC3/cosmos/tree/main/docs.openc3.com/docs/tools/calendar.md",tags:[],version:"current",frontMatter:{title:"Calendar (Enterprise)"},sidebar:"defaultSidebar",previous:{title:"Bucket Explorer",permalink:"/tools/staticdocs/docs/tools/bucket-explorer"},next:{title:"Command Sender",permalink:"/tools/staticdocs/docs/tools/cmd-sender"}},d={},o=[{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:"Timeline Implementation Details",id:"timeline-implementation-details",level:2}];function l(e){const t={h2:"h2",h3:"h3",img:"img",p:"p",...(0,n.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.h2,{id:"introduction",children:"Introduction"}),"\n",(0,i.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,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{alt:"Calendar",src:a(4274).A+"",width:"1271",height:"707"})}),"\n",(0,i.jsx)(t.h3,{id:"adding-timelines",children:"Adding Timelines"}),"\n",(0,i.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,i.jsx)(t.h2,{id:"types-of-events",children:"Types of Events"}),"\n",(0,i.jsx)(t.h3,{id:"metadata",children:"Metadata"}),"\n",(0,i.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,i.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,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{alt:"CreateMetadata1",src:a(5767).A+"",width:"594",height:"440"})}),"\n",(0,i.jsx)(t.p,{children:"You then add key / value pairs for all the metadata items you want to create."}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{alt:"CreateMetadata2",src:a(8732).A+"",width:"594",height:"443"})}),"\n",(0,i.jsx)(t.h3,{id:"note",children:"Note"}),"\n",(0,i.jsx)(t.p,{children:"Notes require both a start and end time."}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{alt:"CreateNote1",src:a(4878).A+"",width:"594",height:"431"})}),"\n",(0,i.jsx)(t.p,{children:"You then record the note to create the note event on the calendar."}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{alt:"CreateNote2",src:a(5237).A+"",width:"594",height:"405"})}),"\n",(0,i.jsx)(t.h3,{id:"activity",children:"Activity"}),"\n",(0,i.jsx)(t.p,{children:"Scheduled on a timeline, activities take both a start and end time."}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{alt:"CreateActivity1",src:a(3919).A+"",width:"596",height:"476"})}),"\n",(0,i.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,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{alt:"CreateActivity2",src:a(9428).A+"",width:"596",height:"340"})}),"\n",(0,i.jsx)(t.p,{children:"When calendar activities are scheduled they appear with a green circle containing a plus (+). Once they complete successfully the icon changes to a green circle containing a checkbox (\u2713). Reserve activities simply have a blank green circle."}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{alt:"Calendar",src:a(4900).A+"",width:"1274",height:"755"})}),"\n",(0,i.jsx)(t.p,{children:"Calendar events can also be viewed in a list format via File->Show Table Display which supports pagination for listing both past and future events."}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{alt:"List View",src:a(4120).A+"",width:"1231",height:"684"})}),"\n",(0,i.jsx)(t.h2,{id:"timeline-implementation-details",children:"Timeline Implementation Details"}),"\n",(0,i.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,i.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,i.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,i.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,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{alt:"Timeline Lifecycle",src:a(9450).A+"",width:"1065",height:"514"})})]})}function h(e={}){const{wrapper:t}={...(0,n.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(l,{...e})}):l(e)}},4274:(e,t,a)=>{a.d(t,{A:()=>i});const i=a.p+"assets/images/blank_calendar-70e605942120937b862bd7039348229bab9af1f9c93d356ddbf401a3e8543c74.png"},4900:(e,t,a)=>{a.d(t,{A:()=>i});const i=a.p+"assets/images/calendar-dacbcbb05175c76f3406b4aaade0465444c20b72e93366c79fed1f6eec018c42.png"},3919:(e,t,a)=>{a.d(t,{A:()=>i});const i=a.p+"assets/images/create_activity1-c05ffc03af2df852aeb3ad246f53f259af504e0e6c64cdac21f9126947c49f95.png"},9428:(e,t,a)=>{a.d(t,{A:()=>i});const i=a.p+"assets/images/create_activity2-58c7da6f79dd510701148c0c54fae02c830b9ca4af662a7b132987ed3410a8f7.png"},5767:(e,t,a)=>{a.d(t,{A:()=>i});const i=a.p+"assets/images/create_metadata1-a331ba8f0bd19bf5f8d7f2e083c3c7164e9b7b9936f5a7f83c4141c62a6c46f6.png"},8732:(e,t,a)=>{a.d(t,{A:()=>i});const i=a.p+"assets/images/create_metadata2-c57b5420d5469b48289030ed7c64758539c2319dc742159caa0d4c8fe35050a8.png"},4878:(e,t,a)=>{a.d(t,{A:()=>i});const i=a.p+"assets/images/create_note1-472b93e8e0e3e66a2e6198e0d4573cdc38cc356df87be66163f990f18137f6c0.png"},5237:(e,t,a)=>{a.d(t,{A:()=>i});const i=a.p+"assets/images/create_note2-770501a149ef4aabae24d0b636f46ed61fbdcfda9537c61637c07c60257e9228.png"},4120:(e,t,a)=>{a.d(t,{A:()=>i});const i=a.p+"assets/images/list_view-2f36ce06962e67d5a4f1f060956e5089b3f13c8ab57f33103c3781687611e7a9.png"},9450:(e,t,a)=>{a.d(t,{A:()=>i});const i=a.p+"assets/images/timeline_lifecycle-0bd916dee06bf67936b043abfdbc4d5fdec7cc5a32a889ee6c05e9faf74f4c6a.png"},1184:(e,t,a)=>{a.d(t,{R:()=>c,x:()=>r});var i=a(4041);const n={},s=i.createContext(n);function c(e){const t=i.useContext(s);return i.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function r(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:c(e.components),i.createElement(s.Provider,{value:t},e.children)}}}]);
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([[9638],{7655:e=>{e.exports=JSON.parse('{"version":{"pluginId":"default","version":"current","label":"Next","banner":null,"badge":false,"noIndex":false,"className":"docs-version-current","isLast":true,"docsSidebars":{"defaultSidebar":[{"type":"link","label":"Introduction","href":"/tools/staticdocs/docs/","docId":"introduction","unlisted":false},{"type":"category","label":"Getting Started","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Installation","href":"/tools/staticdocs/docs/getting-started/installation","docId":"getting-started/installation","unlisted":false},{"type":"link","label":"Getting Started","href":"/tools/staticdocs/docs/getting-started/gettingstarted","docId":"getting-started/gettingstarted","unlisted":false},{"type":"link","label":"Code Generators","href":"/tools/staticdocs/docs/getting-started/generators","docId":"getting-started/generators","unlisted":false},{"type":"link","label":"Upgrading","href":"/tools/staticdocs/docs/getting-started/upgrading","docId":"getting-started/upgrading","unlisted":false},{"type":"link","label":"Key Concepts","href":"/tools/staticdocs/docs/getting-started/key_concepts","docId":"getting-started/key_concepts","unlisted":false},{"type":"link","label":"Requirements and Design","href":"/tools/staticdocs/docs/getting-started/requirements","docId":"getting-started/requirements","unlisted":false},{"type":"link","label":"Podman","href":"/tools/staticdocs/docs/getting-started/podman","docId":"getting-started/podman","unlisted":false}],"href":"/tools/staticdocs/docs/getting-started"},{"type":"category","label":"Configuration","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"File Format","href":"/tools/staticdocs/docs/configuration/format","docId":"configuration/format","unlisted":false},{"type":"link","label":"Plugins","href":"/tools/staticdocs/docs/configuration/plugins","docId":"configuration/plugins","unlisted":false},{"type":"link","label":"Targets","href":"/tools/staticdocs/docs/configuration/target","docId":"configuration/target","unlisted":false},{"type":"link","label":"Commands","href":"/tools/staticdocs/docs/configuration/command","docId":"configuration/command","unlisted":false},{"type":"link","label":"Telemetry","href":"/tools/staticdocs/docs/configuration/telemetry","docId":"configuration/telemetry","unlisted":false},{"type":"link","label":"Interfaces","href":"/tools/staticdocs/docs/configuration/interfaces","docId":"configuration/interfaces","unlisted":false},{"type":"link","label":"Protocols","href":"/tools/staticdocs/docs/configuration/protocols","docId":"configuration/protocols","unlisted":false},{"type":"link","label":"Tables","href":"/tools/staticdocs/docs/configuration/table","docId":"configuration/table","unlisted":false},{"type":"link","label":"Screens","href":"/tools/staticdocs/docs/configuration/telemetry-screens","docId":"configuration/telemetry-screens","unlisted":false},{"type":"link","label":"SSL-TLS","href":"/tools/staticdocs/docs/configuration/ssl-tls","docId":"configuration/ssl-tls","unlisted":false}],"href":"/tools/staticdocs/docs/configuration"},{"type":"category","label":"Tools","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Autonomic (Enterprise)","href":"/tools/staticdocs/docs/tools/autonomic","docId":"tools/autonomic","unlisted":false},{"type":"link","label":"Bucket Explorer","href":"/tools/staticdocs/docs/tools/bucket-explorer","docId":"tools/bucket-explorer","unlisted":false},{"type":"link","label":"Calendar (Enterprise)","href":"/tools/staticdocs/docs/tools/calendar","docId":"tools/calendar","unlisted":false},{"type":"link","label":"Command Sender","href":"/tools/staticdocs/docs/tools/cmd-sender","docId":"tools/cmd-sender","unlisted":false},{"type":"link","label":"Command and Telemetry Server","href":"/tools/staticdocs/docs/tools/cmd-tlm-server","docId":"tools/cmd-tlm-server","unlisted":false},{"type":"link","label":"Data Extractor","href":"/tools/staticdocs/docs/tools/data-extractor","docId":"tools/data-extractor","unlisted":false},{"type":"link","label":"Data Viewer","href":"/tools/staticdocs/docs/tools/data-viewer","docId":"tools/data-viewer","unlisted":false},{"type":"link","label":"Handbooks","href":"/tools/staticdocs/docs/tools/handbooks","docId":"tools/handbooks","unlisted":false},{"type":"link","label":"Limits Monitor","href":"/tools/staticdocs/docs/tools/limits-monitor","docId":"tools/limits-monitor","unlisted":false},{"type":"link","label":"Packet Viewer","href":"/tools/staticdocs/docs/tools/packet-viewer","docId":"tools/packet-viewer","unlisted":false},{"type":"link","label":"Script Runner","href":"/tools/staticdocs/docs/tools/script-runner","docId":"tools/script-runner","unlisted":false},{"type":"link","label":"Table Manager","href":"/tools/staticdocs/docs/tools/table-manager","docId":"tools/table-manager","unlisted":false},{"type":"link","label":"Telemetry Grapher","href":"/tools/staticdocs/docs/tools/tlm-grapher","docId":"tools/tlm-grapher","unlisted":false},{"type":"link","label":"Telemetry Viewer","href":"/tools/staticdocs/docs/tools/tlm-viewer","docId":"tools/tlm-viewer","unlisted":false}],"href":"/tools/staticdocs/docs/tools"},{"type":"category","label":"Guides","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Bridges","href":"/tools/staticdocs/docs/guides/bridges","docId":"guides/bridges","unlisted":false},{"type":"link","label":"COSMOS and NASA cFS","href":"/tools/staticdocs/docs/guides/cfs","docId":"guides/cfs","unlisted":false},{"type":"link","label":"Custom Widgets","href":"/tools/staticdocs/docs/guides/custom-widgets","docId":"guides/custom-widgets","unlisted":false},{"type":"link","label":"Little Endian Bitfields","href":"/tools/staticdocs/docs/guides/little-endian-bitfields","docId":"guides/little-endian-bitfields","unlisted":false},{"type":"link","label":"Local Mode","href":"/tools/staticdocs/docs/guides/local-mode","docId":"guides/local-mode","unlisted":false},{"type":"link","label":"Logging","href":"/tools/staticdocs/docs/guides/logging","docId":"guides/logging","unlisted":false},{"type":"link","label":"Monitoring","href":"/tools/staticdocs/docs/guides/monitoring","docId":"guides/monitoring","unlisted":false},{"type":"link","label":"Performance","href":"/tools/staticdocs/docs/guides/performance","docId":"guides/performance","unlisted":false},{"type":"link","label":"Raspberry Pi","href":"/tools/staticdocs/docs/guides/raspberrypi","docId":"guides/raspberrypi","unlisted":false},{"type":"link","label":"Script Writing Guide","href":"/tools/staticdocs/docs/guides/script-writing","docId":"guides/script-writing","unlisted":false},{"type":"link","label":"Scripting API Guide","href":"/tools/staticdocs/docs/guides/scripting-api","docId":"guides/scripting-api","unlisted":false}],"href":"/tools/staticdocs/docs/guides"},{"type":"category","label":"Development","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Testing with Curl","href":"/tools/staticdocs/docs/development/curl","docId":"development/curl","unlisted":false},{"type":"link","label":"Developing COSMOS","href":"/tools/staticdocs/docs/development/developing","docId":"development/developing","unlisted":false},{"type":"link","label":"Host Install","href":"/tools/staticdocs/docs/development/host-install","docId":"development/host-install","unlisted":false},{"type":"link","label":"JSON API","href":"/tools/staticdocs/docs/development/json-api","docId":"development/json-api","unlisted":false},{"type":"link","label":"Log Structure","href":"/tools/staticdocs/docs/development/log-structure","docId":"development/log-structure","unlisted":false},{"type":"link","label":"Roadmap","href":"/tools/staticdocs/docs/development/roadmap","docId":"development/roadmap","unlisted":false},{"type":"link","label":"Streaming API","href":"/tools/staticdocs/docs/development/streaming-api","docId":"development/streaming-api","unlisted":false},{"type":"link","label":"Testing COSMOS","href":"/tools/staticdocs/docs/development/testing","docId":"development/testing","unlisted":false}],"href":"/tools/staticdocs/docs/development"},{"type":"category","label":"Meta","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Contributing","href":"/tools/staticdocs/docs/meta/contributing","docId":"meta/contributing","unlisted":false},{"type":"link","label":"Understanding Licenses","href":"/tools/staticdocs/docs/meta/licenses","docId":"meta/licenses","unlisted":false},{"type":"link","label":"Philosophy","href":"/tools/staticdocs/docs/meta/philosophy","docId":"meta/philosophy","unlisted":false},{"type":"link","label":"XTCE Support","href":"/tools/staticdocs/docs/meta/xtce","docId":"meta/xtce","unlisted":false}],"href":"/tools/staticdocs/docs/meta"},{"type":"link","label":"OpenC3, Inc. Privacy Policy","href":"/tools/staticdocs/docs/privacy","docId":"privacy","unlisted":false}]},"docs":{"configuration/command":{"id":"configuration/command","title":"Commands","description":"Command Definition Files","sidebar":"defaultSidebar"},"configuration/format":{"id":"configuration/format","title":"File Format","description":"COSMOS configuration files are just text files. They can (and should) be checked into your configuration management system and thus can be easily diffed throughout their history. They support ERB syntax, partials, and various line continuations which make them extremely flexible.","sidebar":"defaultSidebar"},"configuration/interfaces":{"id":"configuration/interfaces","title":"Interfaces","description":"Interfaces are the connection to the external embedded systems called targets. Interfaces are defined by the top level INTERFACE keyword in the plugin.txt file.","sidebar":"defaultSidebar"},"configuration/plugins":{"id":"configuration/plugins","title":"Plugins","description":"Introduction","sidebar":"defaultSidebar"},"configuration/protocols":{"id":"configuration/protocols","title":"Protocols","description":"Protocols process data on behalf of an Interface. They can modify the data being written, data being read, or both. Protocols can also mark a packet as stored instead of real-time which means COSMOS will not update the current value table with the packet data. Protocols can be layered and will be processed in order. For example, if you have a low-level encryption layer that must be first removed before processing a higher level buffer length protocol.","sidebar":"defaultSidebar"},"configuration/ssl-tls":{"id":"configuration/ssl-tls","title":"SSL-TLS","description":"COSMOS 5 is a container based service which does not use SSL/TLS out of the box. This guide will help you configure SSL and TLS. Learn more at the Traefik docs.","sidebar":"defaultSidebar"},"configuration/table":{"id":"configuration/table","title":"Tables","description":"Table Definition Files","sidebar":"defaultSidebar"},"configuration/target":{"id":"configuration/target","title":"Targets","description":"Targets are the external embedded systems that COSMOS connects to. Targets are defined by the top level TARGET keyword in the plugin.txt file. Each target is self contained in a target directory named after the target. In the root of the target directory there is a configuration file named target.txt which configures the individual target.","sidebar":"defaultSidebar"},"configuration/telemetry":{"id":"configuration/telemetry","title":"Telemetry","description":"Telemetry Definition Files","sidebar":"defaultSidebar"},"configuration/telemetry-screens":{"id":"configuration/telemetry-screens","title":"Screens","description":"This document provides the information necessary to generate and use COSMOS Telemetry Screens, which are displayed by the COSMOS Telemetry Viewer application.","sidebar":"defaultSidebar"},"development/curl":{"id":"development/curl","title":"Testing with Curl","description":"This information is just generally used behind the scenes in COSMOS tools","sidebar":"defaultSidebar"},"development/developing":{"id":"development/developing","title":"Developing COSMOS","description":"So you want to help develop COSMOS? All of our open source COSMOS code is on Github so the first thing to do is get an account. Next clone the COSMOS repository. We accept contributions from others as Pull Requests.","sidebar":"defaultSidebar"},"development/host-install":{"id":"development/host-install","title":"Host Install","description":"Installing COSMOS Directly onto a Host (No Containers)","sidebar":"defaultSidebar"},"development/json-api":{"id":"development/json-api","title":"JSON API","description":"If you\'re looking for the methods available to write test procedures using the COSMOS scripting API, refer to the Scripting API Guide page. If you\'re trying to interface to a COSMOS Command and Telemetry Server from an external application using any language then this is the right place.","sidebar":"defaultSidebar"},"development/log-structure":{"id":"development/log-structure","title":"Log Structure","description":"Updated: 8-21-2023 to the format as of OpenC3 COSMOS 5.11.0","sidebar":"defaultSidebar"},"development/roadmap":{"id":"development/roadmap","title":"Roadmap","description":"Key Features Still to Come in OpenC3 COSMOS 5.x:","sidebar":"defaultSidebar"},"development/streaming-api":{"id":"development/streaming-api","title":"Streaming API","description":"This information is just generally used behind the scenes in COSMOS tools","sidebar":"defaultSidebar"},"development/testing":{"id":"development/testing","title":"Testing COSMOS","description":"Playwright","sidebar":"defaultSidebar"},"getting-started/generators":{"id":"getting-started/generators","title":"Code Generators","description":"The COSMOS Code Generators are built into the scripts openc3.sh and openc3.bat that are included in the COSMOS project (more about projects).","sidebar":"defaultSidebar"},"getting-started/gettingstarted":{"id":"getting-started/gettingstarted","title":"Getting Started","description":"Welcome to the OpenC3 COSMOS system... Let\'s get started! This guide is a high level overview that will help with setting up your first COSMOS project.","sidebar":"defaultSidebar"},"getting-started/installation":{"id":"getting-started/installation","title":"Installation","description":"Installing OpenC3 COSMOS","sidebar":"defaultSidebar"},"getting-started/key_concepts":{"id":"getting-started/key_concepts","title":"Key Concepts","description":"Projects","sidebar":"defaultSidebar"},"getting-started/podman":{"id":"getting-started/podman","title":"Podman","description":"OpenC3 COSMOS Using Rootless Podman and Docker-Compose","sidebar":"defaultSidebar"},"getting-started/requirements":{"id":"getting-started/requirements","title":"Requirements and Design","description":"OpenC3 COSMOS is a command and control system providing commanding, scripting, and data visualization capabilities for embedded systems and systems of systems. COSMOS is intended for use during all phases of testing (board, box, integrated system) and during operations.","sidebar":"defaultSidebar"},"getting-started/upgrading":{"id":"getting-started/upgrading","title":"Upgrading","description":"COSMOS Upgrades","sidebar":"defaultSidebar"},"guides/bridges":{"id":"guides/bridges","title":"Bridges","description":"COSMOS Bridges provide an easy solution for getting data from devices that don\'t speak Ethernet into COSMOS.","sidebar":"defaultSidebar"},"guides/cfs":{"id":"guides/cfs","title":"COSMOS and NASA cFS","description":"Working configuration","sidebar":"defaultSidebar"},"guides/custom-widgets":{"id":"guides/custom-widgets","title":"Custom Widgets","description":"COSMOS allows you to build custom widgets which can be deployed with your plugin and used in Telemetry Viewer. Building custom widgets can utilitize any javascript frameworks but since COSMOS is written with Vue.js, we will use that framework in this tutorial. Please see the Widget Generator guide for information about generating the scaffolding for a custom widget.","sidebar":"defaultSidebar"},"guides/little-endian-bitfields":{"id":"guides/little-endian-bitfields","title":"Little Endian Bitfields","description":"Defining little endian bitfields is a little weird but is possible in COSMOS. However, note that APPEND does not work with little endian bitfields.","sidebar":"defaultSidebar"},"guides/local-mode":{"id":"guides/local-mode","title":"Local Mode","description":"Local Mode is a new feature in the 5.0.9 COSMOS release. It is intended to capture the configuration of an edited plugin so it can be configuration managed. It allows you to edit portions of a plugin (scripts and screens) locally in the editor of your choice and instantly have those changes appear in the COSMOS plugin. This avoids the plugin build / install cycle which is required when editing command and telemetry or interface definitions.","sidebar":"defaultSidebar"},"guides/logging":{"id":"guides/logging","title":"Logging","description":"The COSMOS Bucket Explorer tool provides a way to browse the COSMOS bucket storage backend whether you are running locally or in a cloud environment. Browse to http2900/tools/bucketexplorer and you should see the list of buckets at the top:","sidebar":"defaultSidebar"},"guides/monitoring":{"id":"guides/monitoring","title":"Monitoring","description":"Monitoring and observability","sidebar":"defaultSidebar"},"guides/performance":{"id":"guides/performance","title":"Performance","description":"The COSMOS architecture was created with scalability in mind. Our goal is to support an unlimited number of connections and use cloud technologies to scale. Only COSMOS Enterprise Edition supports Kubernetes and the various cloud platforms which allow this level of scalability. While true scalability is only achieved in COSMOS Enterprise, both Open Source and Enterprise have various levels of observability and configuration settings which can affect performance.","sidebar":"defaultSidebar"},"guides/raspberrypi":{"id":"guides/raspberrypi","title":"Raspberry Pi","description":"COSMOS Running on Raspberry Pi 4","sidebar":"defaultSidebar"},"guides/script-writing":{"id":"guides/script-writing","title":"Script Writing Guide","description":"Introduction","sidebar":"defaultSidebar"},"guides/scripting-api":{"id":"guides/scripting-api","title":"Scripting API Guide","description":"This document provides the information necessary to write test procedures using the COSMOS scripting API. Scripting in COSMOS is designed to be simple and intuitive. The code completion ability for command and telemetry mnemonics makes Script Runner the ideal place to write your procedures, however any text editor will do. If there is functionality that you don\'t see here or perhaps an easier syntax for doing something, please submit a ticket.","sidebar":"defaultSidebar"},"introduction":{"id":"introduction","title":"Introduction","description":"This site aims to be a comprehensive guide to OpenC3 COSMOS. We\'ll cover topics such","sidebar":"defaultSidebar"},"meta/contributing":{"id":"meta/contributing","title":"Contributing","description":"So you\'ve got an awesome idea to throw into COSMOS. Great! This is the basic process:","sidebar":"defaultSidebar"},"meta/licenses":{"id":"meta/licenses","title":"Understanding Licenses","description":"OpenC3 COSMOS is offered under a tri-licensing model allowing users to choose between the following three options:","sidebar":"defaultSidebar"},"meta/philosophy":{"id":"meta/philosophy","title":"Philosophy","description":"COSMOS is a C3 (Command, Control and Communication) system with the following primary goals:","sidebar":"defaultSidebar"},"meta/xtce":{"id":"meta/xtce","title":"XTCE Support","description":"COSMOS now has support for the XTCE Command and Telemetry Definition Standard. This is an open standard designed to allow command and telemetry definitions to be transferred between different ground systems. COSMOS can run directly using the .xtce files, or can convert them into the COSMOS configuration file format.","sidebar":"defaultSidebar"},"privacy":{"id":"privacy","title":"OpenC3, Inc. Privacy Policy","description":"OpenC3 Inc. is strongly committed to protecting your privacy and complying with your choices. Both personal and non-personal information collected is safeguarded according to the highest privacy and data protection standards adopted worldwide. We have always had a robust and effective data protection program in place which complies with existing law and abides by the data protection principles. However, we recognise our obligations in updating and expanding this program to meet the demands of the GDPR.","sidebar":"defaultSidebar"},"tools/autonomic":{"id":"tools/autonomic","title":"Autonomic (Enterprise)","description":"Introduction","sidebar":"defaultSidebar"},"tools/bucket-explorer":{"id":"tools/bucket-explorer","title":"Bucket Explorer","description":"Introduction","sidebar":"defaultSidebar"},"tools/calendar":{"id":"tools/calendar","title":"Calendar (Enterprise)","description":"Introduction","sidebar":"defaultSidebar"},"tools/cmd-sender":{"id":"tools/cmd-sender","title":"Command Sender","description":"Introduction","sidebar":"defaultSidebar"},"tools/cmd-tlm-server":{"id":"tools/cmd-tlm-server","title":"Command and Telemetry Server","description":"Introduction","sidebar":"defaultSidebar"},"tools/data-extractor":{"id":"tools/data-extractor","title":"Data Extractor","description":"Introduction","sidebar":"defaultSidebar"},"tools/data-viewer":{"id":"tools/data-viewer","title":"Data Viewer","description":"Introduction","sidebar":"defaultSidebar"},"tools/handbooks":{"id":"tools/handbooks","title":"Handbooks","description":"Introduction","sidebar":"defaultSidebar"},"tools/limits-monitor":{"id":"tools/limits-monitor","title":"Limits Monitor","description":"Introduction","sidebar":"defaultSidebar"},"tools/packet-viewer":{"id":"tools/packet-viewer","title":"Packet Viewer","description":"Introduction","sidebar":"defaultSidebar"},"tools/script-runner":{"id":"tools/script-runner","title":"Script Runner","description":"Introduction","sidebar":"defaultSidebar"},"tools/table-manager":{"id":"tools/table-manager","title":"Table Manager","description":"Introduction","sidebar":"defaultSidebar"},"tools/tlm-grapher":{"id":"tools/tlm-grapher","title":"Telemetry Grapher","description":"Introductions","sidebar":"defaultSidebar"},"tools/tlm-viewer":{"id":"tools/tlm-viewer","title":"Telemetry Viewer","description":"Introduction","sidebar":"defaultSidebar"}}}}')}}]);
|
1
|
+
"use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([[9638],{7655:e=>{e.exports=JSON.parse('{"version":{"pluginId":"default","version":"current","label":"Next","banner":null,"badge":false,"noIndex":false,"className":"docs-version-current","isLast":true,"docsSidebars":{"defaultSidebar":[{"type":"link","label":"Introduction","href":"/tools/staticdocs/docs/","docId":"introduction","unlisted":false},{"type":"category","label":"Getting Started","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Installation","href":"/tools/staticdocs/docs/getting-started/installation","docId":"getting-started/installation","unlisted":false},{"type":"link","label":"Getting Started","href":"/tools/staticdocs/docs/getting-started/gettingstarted","docId":"getting-started/gettingstarted","unlisted":false},{"type":"link","label":"Code Generators","href":"/tools/staticdocs/docs/getting-started/generators","docId":"getting-started/generators","unlisted":false},{"type":"link","label":"Upgrading","href":"/tools/staticdocs/docs/getting-started/upgrading","docId":"getting-started/upgrading","unlisted":false},{"type":"link","label":"Key Concepts","href":"/tools/staticdocs/docs/getting-started/key_concepts","docId":"getting-started/key_concepts","unlisted":false},{"type":"link","label":"Requirements and Design","href":"/tools/staticdocs/docs/getting-started/requirements","docId":"getting-started/requirements","unlisted":false},{"type":"link","label":"Podman","href":"/tools/staticdocs/docs/getting-started/podman","docId":"getting-started/podman","unlisted":false}],"href":"/tools/staticdocs/docs/getting-started"},{"type":"category","label":"Configuration","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"File Format","href":"/tools/staticdocs/docs/configuration/format","docId":"configuration/format","unlisted":false},{"type":"link","label":"Plugins","href":"/tools/staticdocs/docs/configuration/plugins","docId":"configuration/plugins","unlisted":false},{"type":"link","label":"Targets","href":"/tools/staticdocs/docs/configuration/target","docId":"configuration/target","unlisted":false},{"type":"link","label":"Commands","href":"/tools/staticdocs/docs/configuration/command","docId":"configuration/command","unlisted":false},{"type":"link","label":"Telemetry","href":"/tools/staticdocs/docs/configuration/telemetry","docId":"configuration/telemetry","unlisted":false},{"type":"link","label":"Interfaces","href":"/tools/staticdocs/docs/configuration/interfaces","docId":"configuration/interfaces","unlisted":false},{"type":"link","label":"Protocols","href":"/tools/staticdocs/docs/configuration/protocols","docId":"configuration/protocols","unlisted":false},{"type":"link","label":"Tables","href":"/tools/staticdocs/docs/configuration/table","docId":"configuration/table","unlisted":false},{"type":"link","label":"Screens","href":"/tools/staticdocs/docs/configuration/telemetry-screens","docId":"configuration/telemetry-screens","unlisted":false},{"type":"link","label":"SSL-TLS","href":"/tools/staticdocs/docs/configuration/ssl-tls","docId":"configuration/ssl-tls","unlisted":false}],"href":"/tools/staticdocs/docs/configuration"},{"type":"category","label":"Tools","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Autonomic (Enterprise)","href":"/tools/staticdocs/docs/tools/autonomic","docId":"tools/autonomic","unlisted":false},{"type":"link","label":"Bucket Explorer","href":"/tools/staticdocs/docs/tools/bucket-explorer","docId":"tools/bucket-explorer","unlisted":false},{"type":"link","label":"Calendar (Enterprise)","href":"/tools/staticdocs/docs/tools/calendar","docId":"tools/calendar","unlisted":false},{"type":"link","label":"Command Sender","href":"/tools/staticdocs/docs/tools/cmd-sender","docId":"tools/cmd-sender","unlisted":false},{"type":"link","label":"Command and Telemetry Server","href":"/tools/staticdocs/docs/tools/cmd-tlm-server","docId":"tools/cmd-tlm-server","unlisted":false},{"type":"link","label":"Data Extractor","href":"/tools/staticdocs/docs/tools/data-extractor","docId":"tools/data-extractor","unlisted":false},{"type":"link","label":"Data Viewer","href":"/tools/staticdocs/docs/tools/data-viewer","docId":"tools/data-viewer","unlisted":false},{"type":"link","label":"Handbooks","href":"/tools/staticdocs/docs/tools/handbooks","docId":"tools/handbooks","unlisted":false},{"type":"link","label":"Limits Monitor","href":"/tools/staticdocs/docs/tools/limits-monitor","docId":"tools/limits-monitor","unlisted":false},{"type":"link","label":"Packet Viewer","href":"/tools/staticdocs/docs/tools/packet-viewer","docId":"tools/packet-viewer","unlisted":false},{"type":"link","label":"Script Runner","href":"/tools/staticdocs/docs/tools/script-runner","docId":"tools/script-runner","unlisted":false},{"type":"link","label":"Table Manager","href":"/tools/staticdocs/docs/tools/table-manager","docId":"tools/table-manager","unlisted":false},{"type":"link","label":"Telemetry Grapher","href":"/tools/staticdocs/docs/tools/tlm-grapher","docId":"tools/tlm-grapher","unlisted":false},{"type":"link","label":"Telemetry Viewer","href":"/tools/staticdocs/docs/tools/tlm-viewer","docId":"tools/tlm-viewer","unlisted":false}],"href":"/tools/staticdocs/docs/tools"},{"type":"category","label":"Guides","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Bridges","href":"/tools/staticdocs/docs/guides/bridges","docId":"guides/bridges","unlisted":false},{"type":"link","label":"COSMOS and NASA cFS","href":"/tools/staticdocs/docs/guides/cfs","docId":"guides/cfs","unlisted":false},{"type":"link","label":"Custom Widgets","href":"/tools/staticdocs/docs/guides/custom-widgets","docId":"guides/custom-widgets","unlisted":false},{"type":"link","label":"Little Endian Bitfields","href":"/tools/staticdocs/docs/guides/little-endian-bitfields","docId":"guides/little-endian-bitfields","unlisted":false},{"type":"link","label":"Local Mode","href":"/tools/staticdocs/docs/guides/local-mode","docId":"guides/local-mode","unlisted":false},{"type":"link","label":"Logging","href":"/tools/staticdocs/docs/guides/logging","docId":"guides/logging","unlisted":false},{"type":"link","label":"Monitoring","href":"/tools/staticdocs/docs/guides/monitoring","docId":"guides/monitoring","unlisted":false},{"type":"link","label":"Performance","href":"/tools/staticdocs/docs/guides/performance","docId":"guides/performance","unlisted":false},{"type":"link","label":"Raspberry Pi","href":"/tools/staticdocs/docs/guides/raspberrypi","docId":"guides/raspberrypi","unlisted":false},{"type":"link","label":"Script Writing Guide","href":"/tools/staticdocs/docs/guides/script-writing","docId":"guides/script-writing","unlisted":false},{"type":"link","label":"Scripting API Guide","href":"/tools/staticdocs/docs/guides/scripting-api","docId":"guides/scripting-api","unlisted":false}],"href":"/tools/staticdocs/docs/guides"},{"type":"category","label":"Development","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Testing with Curl","href":"/tools/staticdocs/docs/development/curl","docId":"development/curl","unlisted":false},{"type":"link","label":"Developing COSMOS","href":"/tools/staticdocs/docs/development/developing","docId":"development/developing","unlisted":false},{"type":"link","label":"Host Install","href":"/tools/staticdocs/docs/development/host-install","docId":"development/host-install","unlisted":false},{"type":"link","label":"JSON API","href":"/tools/staticdocs/docs/development/json-api","docId":"development/json-api","unlisted":false},{"type":"link","label":"Log Structure","href":"/tools/staticdocs/docs/development/log-structure","docId":"development/log-structure","unlisted":false},{"type":"link","label":"Roadmap","href":"/tools/staticdocs/docs/development/roadmap","docId":"development/roadmap","unlisted":false},{"type":"link","label":"Streaming API","href":"/tools/staticdocs/docs/development/streaming-api","docId":"development/streaming-api","unlisted":false},{"type":"link","label":"Testing COSMOS","href":"/tools/staticdocs/docs/development/testing","docId":"development/testing","unlisted":false}],"href":"/tools/staticdocs/docs/development"},{"type":"category","label":"Meta","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Contributing","href":"/tools/staticdocs/docs/meta/contributing","docId":"meta/contributing","unlisted":false},{"type":"link","label":"Understanding Licenses","href":"/tools/staticdocs/docs/meta/licenses","docId":"meta/licenses","unlisted":false},{"type":"link","label":"Philosophy","href":"/tools/staticdocs/docs/meta/philosophy","docId":"meta/philosophy","unlisted":false},{"type":"link","label":"XTCE Support","href":"/tools/staticdocs/docs/meta/xtce","docId":"meta/xtce","unlisted":false}],"href":"/tools/staticdocs/docs/meta"},{"type":"link","label":"OpenC3, Inc. Privacy Policy","href":"/tools/staticdocs/docs/privacy","docId":"privacy","unlisted":false}]},"docs":{"configuration/command":{"id":"configuration/command","title":"Commands","description":"Command Definition Files","sidebar":"defaultSidebar"},"configuration/format":{"id":"configuration/format","title":"File Format","description":"COSMOS configuration files are just text files. They can (and should) be checked into your configuration management system and thus can be easily diffed throughout their history. They support ERB syntax, partials, and various line continuations which make them extremely flexible.","sidebar":"defaultSidebar"},"configuration/interfaces":{"id":"configuration/interfaces","title":"Interfaces","description":"Interfaces are the connection to the external embedded systems called targets. Interfaces are defined by the top level INTERFACE keyword in the plugin.txt file.","sidebar":"defaultSidebar"},"configuration/plugins":{"id":"configuration/plugins","title":"Plugins","description":"Introduction","sidebar":"defaultSidebar"},"configuration/protocols":{"id":"configuration/protocols","title":"Protocols","description":"Protocols process data on behalf of an Interface. They can modify the data being written, data being read, or both. Protocols can also mark a packet as stored instead of real-time which means COSMOS will not update the current value table with the packet data. Protocols can be layered and will be processed in order. For example, if you have a low-level encryption layer that must be first removed before processing a higher level buffer length protocol.","sidebar":"defaultSidebar"},"configuration/ssl-tls":{"id":"configuration/ssl-tls","title":"SSL-TLS","description":"COSMOS 5 is a container based service which does not use SSL/TLS out of the box. This guide will help you configure SSL and TLS. Learn more at the Traefik docs.","sidebar":"defaultSidebar"},"configuration/table":{"id":"configuration/table","title":"Tables","description":"Table Definition Files","sidebar":"defaultSidebar"},"configuration/target":{"id":"configuration/target","title":"Targets","description":"Targets are the external embedded systems that COSMOS connects to. Targets are defined by the top level TARGET keyword in the plugin.txt file. Each target is self contained in a target directory named after the target. In the root of the target directory there is a configuration file named target.txt which configures the individual target.","sidebar":"defaultSidebar"},"configuration/telemetry":{"id":"configuration/telemetry","title":"Telemetry","description":"Telemetry Definition Files","sidebar":"defaultSidebar"},"configuration/telemetry-screens":{"id":"configuration/telemetry-screens","title":"Screens","description":"This document provides the information necessary to generate and use COSMOS Telemetry Screens, which are displayed by the COSMOS Telemetry Viewer application.","sidebar":"defaultSidebar"},"development/curl":{"id":"development/curl","title":"Testing with Curl","description":"This information is just generally used behind the scenes in COSMOS tools","sidebar":"defaultSidebar"},"development/developing":{"id":"development/developing","title":"Developing COSMOS","description":"So you want to help develop COSMOS? All of our open source COSMOS code is on Github so the first thing to do is get an account. Next clone the COSMOS repository. We accept contributions from others as Pull Requests.","sidebar":"defaultSidebar"},"development/host-install":{"id":"development/host-install","title":"Host Install","description":"Installing COSMOS Directly onto a Host (No Containers)","sidebar":"defaultSidebar"},"development/json-api":{"id":"development/json-api","title":"JSON API","description":"If you\'re looking for the methods available to write test procedures using the COSMOS scripting API, refer to the Scripting API Guide page. If you\'re trying to interface to a COSMOS Command and Telemetry Server from an external application using any language then this is the right place.","sidebar":"defaultSidebar"},"development/log-structure":{"id":"development/log-structure","title":"Log Structure","description":"Updated: 8-21-2023 to the format as of OpenC3 COSMOS 5.11.0","sidebar":"defaultSidebar"},"development/roadmap":{"id":"development/roadmap","title":"Roadmap","description":"Key Features Still to Come in OpenC3 COSMOS 5.x:","sidebar":"defaultSidebar"},"development/streaming-api":{"id":"development/streaming-api","title":"Streaming API","description":"This information is just generally used behind the scenes in COSMOS tools","sidebar":"defaultSidebar"},"development/testing":{"id":"development/testing","title":"Testing COSMOS","description":"Playwright","sidebar":"defaultSidebar"},"getting-started/generators":{"id":"getting-started/generators","title":"Code Generators","description":"The COSMOS Code Generators are built into the scripts openc3.sh and openc3.bat that are included in the COSMOS project (more about projects).","sidebar":"defaultSidebar"},"getting-started/gettingstarted":{"id":"getting-started/gettingstarted","title":"Getting Started","description":"Welcome to the OpenC3 COSMOS system... Let\'s get started! This guide is a high level overview that will help with setting up your first COSMOS project.","sidebar":"defaultSidebar"},"getting-started/installation":{"id":"getting-started/installation","title":"Installation","description":"Installing OpenC3 COSMOS","sidebar":"defaultSidebar"},"getting-started/key_concepts":{"id":"getting-started/key_concepts","title":"Key Concepts","description":"Projects","sidebar":"defaultSidebar"},"getting-started/podman":{"id":"getting-started/podman","title":"Podman","description":"OpenC3 COSMOS Using Rootless Podman and Docker-Compose","sidebar":"defaultSidebar"},"getting-started/requirements":{"id":"getting-started/requirements","title":"Requirements and Design","description":"OpenC3 COSMOS is a command and control system providing commanding, scripting, and data visualization capabilities for embedded systems and systems of systems. COSMOS is intended for use during all phases of testing (board, box, integrated system) and during operations.","sidebar":"defaultSidebar"},"getting-started/upgrading":{"id":"getting-started/upgrading","title":"Upgrading","description":"COSMOS Upgrades","sidebar":"defaultSidebar"},"guides/bridges":{"id":"guides/bridges","title":"Bridges","description":"COSMOS Bridges provide an easy solution for getting data from devices that don\'t speak Ethernet into COSMOS.","sidebar":"defaultSidebar"},"guides/cfs":{"id":"guides/cfs","title":"COSMOS and NASA cFS","description":"Working configuration","sidebar":"defaultSidebar"},"guides/custom-widgets":{"id":"guides/custom-widgets","title":"Custom Widgets","description":"COSMOS allows you to build custom widgets which can be deployed with your plugin and used in Telemetry Viewer. Building custom widgets can utilize any javascript frameworks but since COSMOS is written with Vue.js, we will use that framework in this tutorial. Please see the Widget Generator guide for information about generating the scaffolding for a custom widget.","sidebar":"defaultSidebar"},"guides/little-endian-bitfields":{"id":"guides/little-endian-bitfields","title":"Little Endian Bitfields","description":"Defining little endian bitfields is a little weird but is possible in COSMOS. However, note that APPEND does not work with little endian bitfields.","sidebar":"defaultSidebar"},"guides/local-mode":{"id":"guides/local-mode","title":"Local Mode","description":"Local Mode is a new feature in the 5.0.9 COSMOS release. It is intended to capture the configuration of an edited plugin so it can be configuration managed. It allows you to edit portions of a plugin (scripts and screens) locally in the editor of your choice and instantly have those changes appear in the COSMOS plugin. This avoids the plugin build / install cycle which is required when editing command and telemetry or interface definitions.","sidebar":"defaultSidebar"},"guides/logging":{"id":"guides/logging","title":"Logging","description":"The COSMOS Bucket Explorer tool provides a way to browse the COSMOS bucket storage backend whether you are running locally or in a cloud environment. Browse to http2900/tools/bucketexplorer and you should see the list of buckets at the top:","sidebar":"defaultSidebar"},"guides/monitoring":{"id":"guides/monitoring","title":"Monitoring","description":"Monitoring and observability","sidebar":"defaultSidebar"},"guides/performance":{"id":"guides/performance","title":"Performance","description":"The COSMOS architecture was created with scalability in mind. Our goal is to support an unlimited number of connections and use cloud technologies to scale. Only COSMOS Enterprise Edition supports Kubernetes and the various cloud platforms which allow this level of scalability. While true scalability is only achieved in COSMOS Enterprise, both Open Source and Enterprise have various levels of observability and configuration settings which can affect performance.","sidebar":"defaultSidebar"},"guides/raspberrypi":{"id":"guides/raspberrypi","title":"Raspberry Pi","description":"COSMOS Running on Raspberry Pi 4","sidebar":"defaultSidebar"},"guides/script-writing":{"id":"guides/script-writing","title":"Script Writing Guide","description":"Introduction","sidebar":"defaultSidebar"},"guides/scripting-api":{"id":"guides/scripting-api","title":"Scripting API Guide","description":"This document provides the information necessary to write test procedures using the COSMOS scripting API. Scripting in COSMOS is designed to be simple and intuitive. The code completion ability for command and telemetry mnemonics makes Script Runner the ideal place to write your procedures, however any text editor will do. If there is functionality that you don\'t see here or perhaps an easier syntax for doing something, please submit a ticket.","sidebar":"defaultSidebar"},"introduction":{"id":"introduction","title":"Introduction","description":"This site aims to be a comprehensive guide to OpenC3 COSMOS. We\'ll cover topics such","sidebar":"defaultSidebar"},"meta/contributing":{"id":"meta/contributing","title":"Contributing","description":"So you\'ve got an awesome idea to throw into COSMOS. Great! This is the basic process:","sidebar":"defaultSidebar"},"meta/licenses":{"id":"meta/licenses","title":"Understanding Licenses","description":"OpenC3 COSMOS is offered under a tri-licensing model allowing users to choose between the following three options:","sidebar":"defaultSidebar"},"meta/philosophy":{"id":"meta/philosophy","title":"Philosophy","description":"COSMOS is a C3 (Command, Control and Communication) system with the following primary goals:","sidebar":"defaultSidebar"},"meta/xtce":{"id":"meta/xtce","title":"XTCE Support","description":"COSMOS now has support for the XTCE Command and Telemetry Definition Standard. This is an open standard designed to allow command and telemetry definitions to be transferred between different ground systems. COSMOS can run directly using the .xtce files, or can convert them into the COSMOS configuration file format.","sidebar":"defaultSidebar"},"privacy":{"id":"privacy","title":"OpenC3, Inc. Privacy Policy","description":"OpenC3 Inc. is strongly committed to protecting your privacy and complying with your choices. Both personal and non-personal information collected is safeguarded according to the highest privacy and data protection standards adopted worldwide. We have always had a robust and effective data protection program in place which complies with existing law and abides by the data protection principles. However, we recognise our obligations in updating and expanding this program to meet the demands of the GDPR.","sidebar":"defaultSidebar"},"tools/autonomic":{"id":"tools/autonomic","title":"Autonomic (Enterprise)","description":"Introduction","sidebar":"defaultSidebar"},"tools/bucket-explorer":{"id":"tools/bucket-explorer","title":"Bucket Explorer","description":"Introduction","sidebar":"defaultSidebar"},"tools/calendar":{"id":"tools/calendar","title":"Calendar (Enterprise)","description":"Introduction","sidebar":"defaultSidebar"},"tools/cmd-sender":{"id":"tools/cmd-sender","title":"Command Sender","description":"Introduction","sidebar":"defaultSidebar"},"tools/cmd-tlm-server":{"id":"tools/cmd-tlm-server","title":"Command and Telemetry Server","description":"Introduction","sidebar":"defaultSidebar"},"tools/data-extractor":{"id":"tools/data-extractor","title":"Data Extractor","description":"Introduction","sidebar":"defaultSidebar"},"tools/data-viewer":{"id":"tools/data-viewer","title":"Data Viewer","description":"Introduction","sidebar":"defaultSidebar"},"tools/handbooks":{"id":"tools/handbooks","title":"Handbooks","description":"Introduction","sidebar":"defaultSidebar"},"tools/limits-monitor":{"id":"tools/limits-monitor","title":"Limits Monitor","description":"Introduction","sidebar":"defaultSidebar"},"tools/packet-viewer":{"id":"tools/packet-viewer","title":"Packet Viewer","description":"Introduction","sidebar":"defaultSidebar"},"tools/script-runner":{"id":"tools/script-runner","title":"Script Runner","description":"Introduction","sidebar":"defaultSidebar"},"tools/table-manager":{"id":"tools/table-manager","title":"Table Manager","description":"Introduction","sidebar":"defaultSidebar"},"tools/tlm-grapher":{"id":"tools/tlm-grapher","title":"Telemetry Grapher","description":"Introductions","sidebar":"defaultSidebar"},"tools/tlm-viewer":{"id":"tools/tlm-viewer","title":"Telemetry Viewer","description":"Introduction","sidebar":"defaultSidebar"}}}}')}}]);
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([[7757],{1995:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>h,frontMatter:()=>i,metadata:()=>a,toc:()=>c});var s=n(1085),r=n(1184);const i={sidebar_position:3,title:"Code Generators"},o=void 0,a={id:"getting-started/generators",title:"Code Generators",description:"The COSMOS Code Generators are built into the scripts openc3.sh and openc3.bat that are included in the COSMOS project (more about projects).",source:"@site/docs/getting-started/generators.md",sourceDirName:"getting-started",slug:"/getting-started/generators",permalink:"/tools/staticdocs/docs/getting-started/generators",draft:!1,unlisted:!1,editUrl:"https://github.com/OpenC3/cosmos/tree/main/docs.openc3.com/docs/getting-started/generators.md",tags:[],version:"current",sidebarPosition:3,frontMatter:{sidebar_position:3,title:"Code Generators"},sidebar:"defaultSidebar",previous:{title:"Getting Started",permalink:"/tools/staticdocs/docs/getting-started/gettingstarted"},next:{title:"Upgrading",permalink:"/tools/staticdocs/docs/getting-started/upgrading"}},l={},c=[{value:"Plugin Generator",id:"plugin-generator",level:2},{value:"Target Generator",id:"target-generator",level:2},{value:"Microservice Generator",id:"microservice-generator",level:2},{value:"Conversion Generator",id:"conversion-generator",level:2},{value:"Limits Response Generator",id:"limits-response-generator",level:2},{value:"Widget Generator",id:"widget-generator",level:2},{value:"Tool Generator",id:"tool-generator",level:2}];function d(e){const t={a:"a",admonition:"admonition",code:"code",h2:"h2",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(t.p,{children:["The COSMOS Code Generators are built into the scripts ",(0,s.jsx)(t.code,{children:"openc3.sh"})," and ",(0,s.jsx)(t.code,{children:"openc3.bat"})," that are included in the COSMOS ",(0,s.jsx)(t.a,{href:"https://github.com/OpenC3/cosmos-project",children:"project"})," (more about ",(0,s.jsx)(t.a,{href:"key_concepts#projects",children:"projects"}),")."]}),"\n",(0,s.jsxs)(t.p,{children:["If you followed the ",(0,s.jsx)(t.a,{href:"/tools/staticdocs/docs/getting-started/installation",children:"Installation Guide"})," you should already be inside a cloned ",(0,s.jsx)(t.a,{href:"https://github.com/OpenC3/cosmos-project",children:"openc3-project"})," which is in your PATH (necessary for openc3.bat / openc3.sh to be resolved). To see all the available code generators type the following:"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-bash",children:"% openc3.sh cli generate\nUnknown generator ''. Valid generators: plugin, target, microservice, widget, conversion,\nlimits_response, tool, tool_vue, tool_angular, tool_react, tool_svelte\n"})}),"\n",(0,s.jsx)(t.admonition,{title:"Training Available",type:"note",children:(0,s.jsxs)(t.p,{children:["If any of this gets confusing, contact us at ",(0,s.jsx)("a",{href:"mailto:support@openc3.com",children:(0,s.jsx)(t.a,{href:"mailto:support@openc3.com",children:"support@openc3.com"})}),". We have training classes available!"]})}),"\n",(0,s.jsx)(t.h2,{id:"plugin-generator",children:"Plugin Generator"}),"\n",(0,s.jsxs)(t.p,{children:["The plugin generator creates the scaffolding for a new COSMOS Plugin. It requires a plugin name and will create a new directory called ",(0,s.jsx)(t.code,{children:"openc3-cosmos-<name>"}),". For example:"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-bash",children:"% openc3.sh cli generate plugin\nUsage: cli generate plugin <NAME>\n\n% openc3.sh cli generate plugin GSE\nPlugin openc3-cosmos-gse successfully generated!\n"})}),"\n",(0,s.jsx)(t.p,{children:"This creates the following files:"}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{children:"Name"}),(0,s.jsx)(t.th,{children:"Description"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:".gitignore"}),(0,s.jsx)(t.td,{children:"Tells git to ignore any node_modules directory (for tool development)"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"LICENSE.txt"}),(0,s.jsx)(t.td,{children:"License for the plugin. COSMOS Plugins should be licensed in a manner compatible with the AGPLv3, unless they are designed only for use with COSMOS Enterprise Edition."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"openc3-cosmos-gse.gemspec"}),(0,s.jsxs)(t.td,{children:["Gemspec file which should be edited to add user specific information like description, authors, emails, homepage, etc. The name of this file is used in compiling the plugin contents into the final corresponding gem file: e.g. openc3-cosmos-gse-1.0.0.gem. COSMOS plugins should always begin with the openc3-cosmos prefix to make them easily identifiable in the Rubygems repository. The file is formatted as documented at: ",(0,s.jsx)(t.a,{href:"https://guides.rubygems.org/specification-reference/",children:"https://guides.rubygems.org/specification-reference/"})]})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"plugin.txt"}),(0,s.jsxs)(t.td,{children:["COSMOS specific file for Plugin creation. Learn more ",(0,s.jsx)(t.a,{href:"../configuration/plugins",children:"here"}),"."]})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Rakefile"}),(0,s.jsx)(t.td,{children:'Ruby Rakefile configured to support building the plugin by running "openc3.sh cli rake build VERSION=X.X.X" where X.X.X is the plugin version number'})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"README.md"}),(0,s.jsx)(t.td,{children:"Markdown file used to document the plugin"})]})]})]}),"\n",(0,s.jsx)(t.p,{children:"While this structure is required, it is not very useful by itself. The plugin generator just creates the framework for other generators to use."}),"\n",(0,s.jsx)(t.h2,{id:"target-generator",children:"Target Generator"}),"\n",(0,s.jsx)(t.p,{children:"The target generator creates the scaffolding for a new COSMOS Target. It must operate inside an existing COSMOS plugin and requires a target name. For example:"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-bash",children:"openc3-cosmos-gse % openc3.sh cli generate target\nUsage: cli generate target <NAME> (--ruby or --python)\n\nopenc3-cosmos-gse % openc3.sh cli generate target GSE\nTarget GSE successfully generated!\n"})}),"\n",(0,s.jsx)(t.p,{children:"This creates the following files and directories:"}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{children:"Name"}),(0,s.jsx)(t.th,{children:"Description"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"targets/GSE"}),(0,s.jsx)(t.td,{children:"Contains the configuration for the GSE target. The target name is always defined in all caps. This is typically the default name of the target, but well-designed targets will allow themselves to be renamed at installation."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"targets/GSE/cmd_tlm"}),(0,s.jsx)(t.td,{children:"Contains the command and telemetry definition files for the GSE target. These files capture the format of the commands that can be sent to the target, and the telemetry packets that are expected to be received by COSMOS from the target. Note that the files in this folder are processed in alphabetical order by default. That can matter if you reference a packet in another file (it must already have been defined)."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"targets/GSE/cmd_tlm/cmd.txt"}),(0,s.jsxs)(t.td,{children:["Example ",(0,s.jsx)(t.a,{href:"../configuration/command",children:"command"})," configuration. Will need to be edited for the target specific commands."]})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"targets/GSE/cmd_tlm/tlm.txt"}),(0,s.jsxs)(t.td,{children:["Example ",(0,s.jsx)(t.a,{href:"../configuration/telemetry",children:"telemetry"})," configuration. Will need to be edited for the target specific telemetry."]})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"targets/GSE/lib"}),(0,s.jsxs)(t.td,{children:["Contains any custom code required by the target. Good examples of custom code are library files, custom ",(0,s.jsx)(t.a,{href:"../configuration/interfaces",children:"interface"})," classes and ",(0,s.jsx)(t.a,{href:"../configuration/protocols",children:"protocols"}),"."]})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"targets/GSE/lib/gse.rb"}),(0,s.jsx)(t.td,{children:"Example library file which can be expanded as the target is developed. COSMOS recommends building up library methods to avoid code duplication and ease reuse."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"targets/GSE/procedures"}),(0,s.jsxs)(t.td,{children:["This folder contains target specific procedures and helper methods which exercise functionality of the target. These procedures should be kept simple and only use the command and telemetry definitions associated with this target. See the ",(0,s.jsx)(t.a,{href:"../guides/script-writing#script-organization",children:"Scripting Guide"})," for more information."]})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"targets/GSE/procedures/procedure.rb"}),(0,s.jsx)(t.td,{children:"Procedure with an example of sending a command and checking telemetry"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"targets/GSE/public"}),(0,s.jsxs)(t.td,{children:["Put image files here for use in Telemetry Viewer Canvas Image widgets such as ",(0,s.jsx)(t.a,{href:"/tools/staticdocs/docs/configuration/telemetry-screens#canvasimage",children:"CANVASIMAGE"})," and ",(0,s.jsx)(t.a,{href:"/tools/staticdocs/docs/configuration/telemetry-screens#canvasimagevalue",children:"CANVASIMAGEVALUE"})]})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"targets/GSE/screens"}),(0,s.jsxs)(t.td,{children:["Contains telemetry ",(0,s.jsx)(t.a,{href:"/tools/staticdocs/docs/configuration/telemetry-screens",children:"screens"})," for the target"]})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"targets/GSE/screens/status.txt"}),(0,s.jsxs)(t.td,{children:["Example ",(0,s.jsx)(t.a,{href:"/tools/staticdocs/docs/configuration/telemetry-screens",children:"screen"})," to display telemetry values"]})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"targets/GSE/target.txt"}),(0,s.jsxs)(t.td,{children:[(0,s.jsx)(t.a,{href:"../configuration/target",children:"Target"})," configuration such as ignoring command and telemetry items and how to process the cmd/tlm files"]})]})]})]}),"\n",(0,s.jsx)(t.p,{children:"It also updates the plugin.txt file to add the new target:"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-ruby",children:"VARIABLE gse_target_name GSE\n\nTARGET GSE <%= gse_target_name %>\nINTERFACE <%= gse_target_name %>_INT tcpip_client_interface.rb host.docker.internal 8080 8081 10.0 nil BURST\n MAP_TARGET <%= gse_target_name %>\n"})}),"\n",(0,s.jsx)(t.h2,{id:"microservice-generator",children:"Microservice Generator"}),"\n",(0,s.jsx)(t.p,{children:"The microservice generator creates the scaffolding for a new COSMOS Microservice. It must operate inside an existing COSMOS plugin and requires a target name. For example:"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-bash",children:"openc3-cosmos-gse % openc3.sh cli generate microservice\nUsage: cli generate microservice <NAME> (--ruby or --python)\n\nopenc3-cosmos-gse % openc3.sh cli generate microservice background\nMicroservice BACKGROUND successfully generated!\n"})}),"\n",(0,s.jsx)(t.p,{children:"This creates the following files and directories:"}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{children:"Name"}),(0,s.jsx)(t.th,{children:"Description"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"microservices/BACKGROUND"}),(0,s.jsx)(t.td,{children:"Contains the code and any necessary configuration for the BACKGROUND microservice. The name is always defined in all caps. This is typically the default name of the microservice, but well-designed microservices will allow themselves to be renamed at installation."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"microservices/BACKGROUND/background.rb"}),(0,s.jsx)(t.td,{children:"Fully functional microservice which will run every minute and log a message. Edit to implement any custom logic that you want to run in the background. Potential uses are safety microservices which can check and autonomously respond to complex events and take action (NOTE: Simple actions might just require a Limits Response)."})]})]})]}),"\n",(0,s.jsx)(t.p,{children:"It also updates the plugin.txt file to add the new microservice:"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-ruby",children:"MICROSERVICE BACKGROUND background-microservice\n CMD ruby background.rb\n"})}),"\n",(0,s.jsx)(t.h2,{id:"conversion-generator",children:"Conversion Generator"}),"\n",(0,s.jsxs)(t.p,{children:["The conversion generator creates the scaffolding for a new COSMOS ",(0,s.jsx)(t.a,{href:"../configuration/telemetry#read_conversion",children:"Conversion"}),". It must operate inside an existing COSMOS plugin and requires both a target name and conversion name. For example:"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-bash",children:"openc3-cosmos-gse % openc3.sh cli generate conversion\nUsage: cli generate conversion <TARGET> <NAME> (--ruby or --python)\n\nopenc3-cosmos-gse % openc3.sh cli generate limits_response GSE double\nConversion targets/GSE/lib/double_conversion.rb successfully generated!\nTo use the conversion add the following to a telemetry item:\n READ_CONVERSION double_conversion.rb\n"})}),"\n",(0,s.jsx)(t.p,{children:"This creates the following files and directories:"}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{children:"Name"}),(0,s.jsx)(t.th,{children:"Description"})]})}),(0,s.jsx)(t.tbody,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"targets/GSE/lib/double_conversion.rb"}),(0,s.jsx)(t.td,{children:"Fully functional Conversion which has an example implementation of the call() method to convert any existing COSMOS values."})]})})]}),"\n",(0,s.jsx)(t.p,{children:"As the generator states, to use this conversion code you must add it to a telemetry item. For example:"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-ruby",children:'TELEMETRY GSE STATUS BIG_ENDIAN "Telemetry description"\n # Keyword Name BitSize Type ID Description\n APPEND_ID_ITEM ID 16 INT 1 "Identifier"\n APPEND_ITEM VALUE 32 FLOAT "Value"\n READ_CONVERSION double_conversion.rb\n APPEND_ITEM BOOL 8 UINT "Boolean"\n STATE FALSE 0\n STATE TRUE 1\n APPEND_ITEM LABEL 0 STRING "The label to apply"\n'})}),"\n",(0,s.jsx)(t.h2,{id:"limits-response-generator",children:"Limits Response Generator"}),"\n",(0,s.jsxs)(t.p,{children:["The limits_response generator creates the scaffolding for a new COSMOS ",(0,s.jsx)(t.a,{href:"../configuration/telemetry#limits_response",children:"Limits Response"}),". It must operate inside an existing COSMOS plugin and requires both a target name and limits response name. For example:"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-bash",children:"openc3-cosmos-gse % openc3.sh cli generate limits_response\nUsage: cli generate limits_response <TARGET> <NAME> (--ruby or --python)\n\nopenc3-cosmos-gse % openc3.sh cli generate limits_response GSE safe\nLimits response targets/GSE/lib/safe_limits_response.rb successfully generated!\nTo use the limits response add the following to a telemetry item:\n LIMITS_RESPONSE safe_limits_response.rb\n"})}),"\n",(0,s.jsx)(t.p,{children:"This creates the following files and directories:"}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{children:"Name"}),(0,s.jsx)(t.th,{children:"Description"})]})}),(0,s.jsx)(t.tbody,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"targets/GSE/lib/safe_limits_response.rb"}),(0,s.jsx)(t.td,{children:"Fully functional Limits Response which has an example implementation of the call() method and taking action based on the current limits state of the particular item"})]})})]}),"\n",(0,s.jsx)(t.p,{children:"As the generator states, to use this limits code you must add it to a telemetry item which has limits defined. In the generated GSE target, none of the items have limits defined so you first need to add limits and then add the response."}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-ruby",children:'TELEMETRY GSE STATUS BIG_ENDIAN "Telemetry description"\n # Keyword Name BitSize Type ID Description\n APPEND_ID_ITEM ID 16 INT 1 "Identifier"\n APPEND_ITEM VALUE 32 FLOAT "Value"\n LIMITS DEFAULT 1 ENABLED -80.0 -70.0 60.0 80.0 -20.0 20.0\n LIMITS_RESPONSE safe_limits_response.rb\n APPEND_ITEM BOOL 8 UINT "Boolean"\n STATE FALSE 0\n STATE TRUE 1\n APPEND_ITEM LABEL 0 STRING "The label to apply"\n'})}),"\n",(0,s.jsx)(t.h2,{id:"widget-generator",children:"Widget Generator"}),"\n",(0,s.jsxs)(t.p,{children:["The conversion generator creates the scaffolding for a new COSMOS Widget for use in ",(0,s.jsx)(t.a,{href:"../configuration/telemetry-screens",children:"Telemetry Viewer Screens"}),". For more information see the ",(0,s.jsx)(t.a,{href:"../guides/custom-widgets",children:"Custom Widget"})," guide. It must operate inside an existing COSMOS plugin and requires a widget name. For example:"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-bash",children:"openc3-cosmos-gse % openc3.sh cli generate widget\nUsage: cli generate widget <SuperdataWidget>\n\nopenc3-cosmos-gse % openc3.sh cli generate widget HelloworldWidget\nWidget HelloworldWidget successfully generated!\nPlease be sure HelloworldWidget does not overlap an existing widget: https://docs.openc3.com/docs/configuration/telemetry-screens\n"})}),"\n",(0,s.jsx)(t.p,{children:"This creates the following files and directories:"}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{children:"Name"}),(0,s.jsx)(t.th,{children:"Description"})]})}),(0,s.jsx)(t.tbody,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"src/HelloworldWidget.vue"}),(0,s.jsx)(t.td,{children:"Fully functional widget which displays a simple value. This can be expanded using existing COSMOS Vue.js code to create any data visualization imaginable."})]})})]}),"\n",(0,s.jsx)(t.p,{children:"It also updates the plugin.txt file to add the new widget:"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-ruby",children:"WIDGET Helloworld\n"})}),"\n",(0,s.jsx)(t.h2,{id:"tool-generator",children:"Tool Generator"}),"\n",(0,s.jsxs)(t.p,{children:["The tool generator creates the scaffolding for a new COSMOS Tool. It's It must operate inside an existing COSMOS plugin and requires a tool name. Developing a custom tool requires intensive knowledge of a Javascript framework such as Vue.js, Angular, React, or Svelt. Since all the COSMOS tools are built in Vue.js, that is the recommended framework for new tool development. For additional help on frontend development, see ",(0,s.jsx)(t.a,{href:"../development/developing#running-a-frontend-application",children:"Running a Frontend Application"}),"."]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-bash",children:"openc3-cosmos-gse % openc3.sh cli generate tool\nUsage: cli generate tool 'Tool Name'\n\nopenc3-cosmos-gse % openc3.sh cli generate widget DataVis\nTool datavis successfully generated!\nPlease be sure datavis does not conflict with any other tools\n"})}),"\n",(0,s.jsx)(t.p,{children:"This creates the following files and directories:"}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{children:"Name"}),(0,s.jsx)(t.th,{children:"Description"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"src/App.vue"}),(0,s.jsx)(t.td,{children:"Basic Vue template to render the application."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"src/main.js"}),(0,s.jsx)(t.td,{children:"Entry point for the new tool which loads Vue, Vuetify, and other libraries."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"src/router.js"}),(0,s.jsx)(t.td,{children:"Vue component router."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"src/tools/datavis"}),(0,s.jsx)(t.td,{children:"Contains all the files necessary to serve a web-based tool named datavis. The name is always defined in all lowercase. Due to technical limitations, the toolname must be unique and cannot be renamed at installation."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"src/tools/datavis/datavis.vue"}),(0,s.jsx)(t.td,{children:"Fully functional tool which displays a simple button. This can be expanded using existing COSMOS Vue.js code to create any tool imaginable."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"package.json"}),(0,s.jsx)(t.td,{children:"Build and dependency definition file. Used by npm or yarn to build the tool."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"vue.config.js"}),(0,s.jsx)(t.td,{children:"Vue configuration file used to serve the application in development and build the application."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"<dotfiles>"}),(0,s.jsx)(t.td,{children:"Various dotfiles which help configure formatters and tools for Javascript frontend developemnt"})]})]})]}),"\n",(0,s.jsxs)(t.p,{children:["It also updates the plugin.txt file to add the new tool. The icon can be changed to any of the material design icons found ",(0,s.jsx)(t.a,{href:"https://pictogrammers.com/library/mdi/",children:"here"}),"."]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-ruby",children:'TOOL datavis "DataVis"\n INLINE_URL js/app.js\n ICON mdi-file-cad-box\n'})})]})}function h(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},1184:(e,t,n)=>{n.d(t,{R:()=>o,x:()=>a});var s=n(4041);const r={},i=s.createContext(r);function o(e){const t=s.useContext(i);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:o(e.components),s.createElement(i.Provider,{value:t},e.children)}}}]);
|
1
|
+
"use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([[7757],{1995:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>h,frontMatter:()=>i,metadata:()=>a,toc:()=>c});var s=n(1085),r=n(1184);const i={sidebar_position:3,title:"Code Generators"},o=void 0,a={id:"getting-started/generators",title:"Code Generators",description:"The COSMOS Code Generators are built into the scripts openc3.sh and openc3.bat that are included in the COSMOS project (more about projects).",source:"@site/docs/getting-started/generators.md",sourceDirName:"getting-started",slug:"/getting-started/generators",permalink:"/tools/staticdocs/docs/getting-started/generators",draft:!1,unlisted:!1,editUrl:"https://github.com/OpenC3/cosmos/tree/main/docs.openc3.com/docs/getting-started/generators.md",tags:[],version:"current",sidebarPosition:3,frontMatter:{sidebar_position:3,title:"Code Generators"},sidebar:"defaultSidebar",previous:{title:"Getting Started",permalink:"/tools/staticdocs/docs/getting-started/gettingstarted"},next:{title:"Upgrading",permalink:"/tools/staticdocs/docs/getting-started/upgrading"}},l={},c=[{value:"Plugin Generator",id:"plugin-generator",level:2},{value:"Target Generator",id:"target-generator",level:2},{value:"Microservice Generator",id:"microservice-generator",level:2},{value:"Conversion Generator",id:"conversion-generator",level:2},{value:"Limits Response Generator",id:"limits-response-generator",level:2},{value:"Widget Generator",id:"widget-generator",level:2},{value:"Tool Generator",id:"tool-generator",level:2}];function d(e){const t={a:"a",admonition:"admonition",code:"code",h2:"h2",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(t.p,{children:["The COSMOS Code Generators are built into the scripts ",(0,s.jsx)(t.code,{children:"openc3.sh"})," and ",(0,s.jsx)(t.code,{children:"openc3.bat"})," that are included in the COSMOS ",(0,s.jsx)(t.a,{href:"https://github.com/OpenC3/cosmos-project",children:"project"})," (more about ",(0,s.jsx)(t.a,{href:"key_concepts#projects",children:"projects"}),")."]}),"\n",(0,s.jsxs)(t.p,{children:["If you followed the ",(0,s.jsx)(t.a,{href:"/tools/staticdocs/docs/getting-started/installation",children:"Installation Guide"})," you should already be inside a cloned ",(0,s.jsx)(t.a,{href:"https://github.com/OpenC3/cosmos-project",children:"openc3-project"})," which is in your PATH (necessary for openc3.bat / openc3.sh to be resolved). To see all the available code generators type the following:"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-bash",children:"% openc3.sh cli generate\nUnknown generator ''. Valid generators: plugin, target, microservice, widget, conversion,\nlimits_response, tool, tool_vue, tool_angular, tool_react, tool_svelte\n"})}),"\n",(0,s.jsx)(t.admonition,{title:"Training Available",type:"note",children:(0,s.jsxs)(t.p,{children:["If any of this gets confusing, contact us at ",(0,s.jsx)("a",{href:"mailto:support@openc3.com",children:(0,s.jsx)(t.a,{href:"mailto:support@openc3.com",children:"support@openc3.com"})}),". We have training classes available!"]})}),"\n",(0,s.jsx)(t.h2,{id:"plugin-generator",children:"Plugin Generator"}),"\n",(0,s.jsxs)(t.p,{children:["The plugin generator creates the scaffolding for a new COSMOS Plugin. It requires a plugin name and will create a new directory called ",(0,s.jsx)(t.code,{children:"openc3-cosmos-<name>"}),". For example:"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-bash",children:"% openc3.sh cli generate plugin\nUsage: cli generate plugin <NAME>\n\n% openc3.sh cli generate plugin GSE\nPlugin openc3-cosmos-gse successfully generated!\n"})}),"\n",(0,s.jsx)(t.p,{children:"This creates the following files:"}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{children:"Name"}),(0,s.jsx)(t.th,{children:"Description"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:".gitignore"}),(0,s.jsx)(t.td,{children:"Tells git to ignore any node_modules directory (for tool development)"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"LICENSE.txt"}),(0,s.jsx)(t.td,{children:"License for the plugin. COSMOS Plugins should be licensed in a manner compatible with the AGPLv3, unless they are designed only for use with COSMOS Enterprise Edition."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"openc3-cosmos-gse.gemspec"}),(0,s.jsxs)(t.td,{children:["Gemspec file which should be edited to add user specific information like description, authors, emails, homepage, etc. The name of this file is used in compiling the plugin contents into the final corresponding gem file: e.g. openc3-cosmos-gse-1.0.0.gem. COSMOS plugins should always begin with the openc3-cosmos prefix to make them easily identifiable in the Rubygems repository. The file is formatted as documented at: ",(0,s.jsx)(t.a,{href:"https://guides.rubygems.org/specification-reference/",children:"https://guides.rubygems.org/specification-reference/"})]})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"plugin.txt"}),(0,s.jsxs)(t.td,{children:["COSMOS specific file for Plugin creation. Learn more ",(0,s.jsx)(t.a,{href:"../configuration/plugins",children:"here"}),"."]})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Rakefile"}),(0,s.jsx)(t.td,{children:'Ruby Rakefile configured to support building the plugin by running "openc3.sh cli rake build VERSION=X.X.X" where X.X.X is the plugin version number'})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"README.md"}),(0,s.jsx)(t.td,{children:"Markdown file used to document the plugin"})]})]})]}),"\n",(0,s.jsx)(t.p,{children:"While this structure is required, it is not very useful by itself. The plugin generator just creates the framework for other generators to use."}),"\n",(0,s.jsx)(t.h2,{id:"target-generator",children:"Target Generator"}),"\n",(0,s.jsx)(t.p,{children:"The target generator creates the scaffolding for a new COSMOS Target. It must operate inside an existing COSMOS plugin and requires a target name. For example:"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-bash",children:"openc3-cosmos-gse % openc3.sh cli generate target\nUsage: cli generate target <NAME> (--ruby or --python)\n\nopenc3-cosmos-gse % openc3.sh cli generate target GSE\nTarget GSE successfully generated!\n"})}),"\n",(0,s.jsx)(t.p,{children:"This creates the following files and directories:"}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{children:"Name"}),(0,s.jsx)(t.th,{children:"Description"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"targets/GSE"}),(0,s.jsx)(t.td,{children:"Contains the configuration for the GSE target. The target name is always defined in all caps. This is typically the default name of the target, but well-designed targets will allow themselves to be renamed at installation."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"targets/GSE/cmd_tlm"}),(0,s.jsx)(t.td,{children:"Contains the command and telemetry definition files for the GSE target. These files capture the format of the commands that can be sent to the target, and the telemetry packets that are expected to be received by COSMOS from the target. Note that the files in this folder are processed in alphabetical order by default. That can matter if you reference a packet in another file (it must already have been defined)."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"targets/GSE/cmd_tlm/cmd.txt"}),(0,s.jsxs)(t.td,{children:["Example ",(0,s.jsx)(t.a,{href:"../configuration/command",children:"command"})," configuration. Will need to be edited for the target specific commands."]})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"targets/GSE/cmd_tlm/tlm.txt"}),(0,s.jsxs)(t.td,{children:["Example ",(0,s.jsx)(t.a,{href:"../configuration/telemetry",children:"telemetry"})," configuration. Will need to be edited for the target specific telemetry."]})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"targets/GSE/lib"}),(0,s.jsxs)(t.td,{children:["Contains any custom code required by the target. Good examples of custom code are library files, custom ",(0,s.jsx)(t.a,{href:"../configuration/interfaces",children:"interface"})," classes and ",(0,s.jsx)(t.a,{href:"../configuration/protocols",children:"protocols"}),"."]})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"targets/GSE/lib/gse.rb"}),(0,s.jsx)(t.td,{children:"Example library file which can be expanded as the target is developed. COSMOS recommends building up library methods to avoid code duplication and ease reuse."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"targets/GSE/procedures"}),(0,s.jsxs)(t.td,{children:["This folder contains target specific procedures and helper methods which exercise functionality of the target. These procedures should be kept simple and only use the command and telemetry definitions associated with this target. See the ",(0,s.jsx)(t.a,{href:"../guides/script-writing#script-organization",children:"Scripting Guide"})," for more information."]})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"targets/GSE/procedures/procedure.rb"}),(0,s.jsx)(t.td,{children:"Procedure with an example of sending a command and checking telemetry"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"targets/GSE/public"}),(0,s.jsxs)(t.td,{children:["Put image files here for use in Telemetry Viewer Canvas Image widgets such as ",(0,s.jsx)(t.a,{href:"/tools/staticdocs/docs/configuration/telemetry-screens#canvasimage",children:"CANVASIMAGE"})," and ",(0,s.jsx)(t.a,{href:"/tools/staticdocs/docs/configuration/telemetry-screens#canvasimagevalue",children:"CANVASIMAGEVALUE"})]})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"targets/GSE/screens"}),(0,s.jsxs)(t.td,{children:["Contains telemetry ",(0,s.jsx)(t.a,{href:"/tools/staticdocs/docs/configuration/telemetry-screens",children:"screens"})," for the target"]})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"targets/GSE/screens/status.txt"}),(0,s.jsxs)(t.td,{children:["Example ",(0,s.jsx)(t.a,{href:"/tools/staticdocs/docs/configuration/telemetry-screens",children:"screen"})," to display telemetry values"]})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"targets/GSE/target.txt"}),(0,s.jsxs)(t.td,{children:[(0,s.jsx)(t.a,{href:"../configuration/target",children:"Target"})," configuration such as ignoring command and telemetry items and how to process the cmd/tlm files"]})]})]})]}),"\n",(0,s.jsx)(t.p,{children:"It also updates the plugin.txt file to add the new target:"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-ruby",children:"VARIABLE gse_target_name GSE\n\nTARGET GSE <%= gse_target_name %>\nINTERFACE <%= gse_target_name %>_INT tcpip_client_interface.rb host.docker.internal 8080 8081 10.0 nil BURST\n MAP_TARGET <%= gse_target_name %>\n"})}),"\n",(0,s.jsx)(t.h2,{id:"microservice-generator",children:"Microservice Generator"}),"\n",(0,s.jsx)(t.p,{children:"The microservice generator creates the scaffolding for a new COSMOS Microservice. It must operate inside an existing COSMOS plugin and requires a target name. For example:"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-bash",children:"openc3-cosmos-gse % openc3.sh cli generate microservice\nUsage: cli generate microservice <NAME> (--ruby or --python)\n\nopenc3-cosmos-gse % openc3.sh cli generate microservice background\nMicroservice BACKGROUND successfully generated!\n"})}),"\n",(0,s.jsx)(t.p,{children:"This creates the following files and directories:"}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{children:"Name"}),(0,s.jsx)(t.th,{children:"Description"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"microservices/BACKGROUND"}),(0,s.jsx)(t.td,{children:"Contains the code and any necessary configuration for the BACKGROUND microservice. The name is always defined in all caps. This is typically the default name of the microservice, but well-designed microservices will allow themselves to be renamed at installation."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"microservices/BACKGROUND/background.rb"}),(0,s.jsx)(t.td,{children:"Fully functional microservice which will run every minute and log a message. Edit to implement any custom logic that you want to run in the background. Potential uses are safety microservices which can check and autonomously respond to complex events and take action (NOTE: Simple actions might just require a Limits Response)."})]})]})]}),"\n",(0,s.jsx)(t.p,{children:"It also updates the plugin.txt file to add the new microservice:"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-ruby",children:"MICROSERVICE BACKGROUND background-microservice\n CMD ruby background.rb\n"})}),"\n",(0,s.jsx)(t.h2,{id:"conversion-generator",children:"Conversion Generator"}),"\n",(0,s.jsxs)(t.p,{children:["The conversion generator creates the scaffolding for a new COSMOS ",(0,s.jsx)(t.a,{href:"../configuration/telemetry#read_conversion",children:"Conversion"}),". It must operate inside an existing COSMOS plugin and requires both a target name and conversion name. For example:"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-bash",children:"openc3-cosmos-gse % openc3.sh cli generate conversion\nUsage: cli generate conversion <TARGET> <NAME> (--ruby or --python)\n\nopenc3-cosmos-gse % openc3.sh cli generate limits_response GSE double\nConversion targets/GSE/lib/double_conversion.rb successfully generated!\nTo use the conversion add the following to a telemetry item:\n READ_CONVERSION double_conversion.rb\n"})}),"\n",(0,s.jsx)(t.p,{children:"This creates the following files and directories:"}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{children:"Name"}),(0,s.jsx)(t.th,{children:"Description"})]})}),(0,s.jsx)(t.tbody,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"targets/GSE/lib/double_conversion.rb"}),(0,s.jsx)(t.td,{children:"Fully functional Conversion which has an example implementation of the call() method to convert any existing COSMOS values."})]})})]}),"\n",(0,s.jsx)(t.p,{children:"As the generator states, to use this conversion code you must add it to a telemetry item. For example:"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-ruby",children:'TELEMETRY GSE STATUS BIG_ENDIAN "Telemetry description"\n # Keyword Name BitSize Type ID Description\n APPEND_ID_ITEM ID 16 INT 1 "Identifier"\n APPEND_ITEM VALUE 32 FLOAT "Value"\n READ_CONVERSION double_conversion.rb\n APPEND_ITEM BOOL 8 UINT "Boolean"\n STATE FALSE 0\n STATE TRUE 1\n APPEND_ITEM LABEL 0 STRING "The label to apply"\n'})}),"\n",(0,s.jsx)(t.h2,{id:"limits-response-generator",children:"Limits Response Generator"}),"\n",(0,s.jsxs)(t.p,{children:["The limits_response generator creates the scaffolding for a new COSMOS ",(0,s.jsx)(t.a,{href:"../configuration/telemetry#limits_response",children:"Limits Response"}),". It must operate inside an existing COSMOS plugin and requires both a target name and limits response name. For example:"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-bash",children:"openc3-cosmos-gse % openc3.sh cli generate limits_response\nUsage: cli generate limits_response <TARGET> <NAME> (--ruby or --python)\n\nopenc3-cosmos-gse % openc3.sh cli generate limits_response GSE safe\nLimits response targets/GSE/lib/safe_limits_response.rb successfully generated!\nTo use the limits response add the following to a telemetry item:\n LIMITS_RESPONSE safe_limits_response.rb\n"})}),"\n",(0,s.jsx)(t.p,{children:"This creates the following files and directories:"}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{children:"Name"}),(0,s.jsx)(t.th,{children:"Description"})]})}),(0,s.jsx)(t.tbody,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"targets/GSE/lib/safe_limits_response.rb"}),(0,s.jsx)(t.td,{children:"Fully functional Limits Response which has an example implementation of the call() method and taking action based on the current limits state of the particular item"})]})})]}),"\n",(0,s.jsx)(t.p,{children:"As the generator states, to use this limits code you must add it to a telemetry item which has limits defined. In the generated GSE target, none of the items have limits defined so you first need to add limits and then add the response."}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-ruby",children:'TELEMETRY GSE STATUS BIG_ENDIAN "Telemetry description"\n # Keyword Name BitSize Type ID Description\n APPEND_ID_ITEM ID 16 INT 1 "Identifier"\n APPEND_ITEM VALUE 32 FLOAT "Value"\n LIMITS DEFAULT 1 ENABLED -80.0 -70.0 60.0 80.0 -20.0 20.0\n LIMITS_RESPONSE safe_limits_response.rb\n APPEND_ITEM BOOL 8 UINT "Boolean"\n STATE FALSE 0\n STATE TRUE 1\n APPEND_ITEM LABEL 0 STRING "The label to apply"\n'})}),"\n",(0,s.jsx)(t.h2,{id:"widget-generator",children:"Widget Generator"}),"\n",(0,s.jsxs)(t.p,{children:["The conversion generator creates the scaffolding for a new COSMOS Widget for use in ",(0,s.jsx)(t.a,{href:"../configuration/telemetry-screens",children:"Telemetry Viewer Screens"}),". For more information see the ",(0,s.jsx)(t.a,{href:"../guides/custom-widgets",children:"Custom Widget"})," guide. It must operate inside an existing COSMOS plugin and requires a widget name. For example:"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-bash",children:"openc3-cosmos-gse % openc3.sh cli generate widget\nUsage: cli generate widget <SuperdataWidget>\n\nopenc3-cosmos-gse % openc3.sh cli generate widget HelloworldWidget\nWidget HelloworldWidget successfully generated!\nPlease be sure HelloworldWidget does not overlap an existing widget: https://docs.openc3.com/docs/configuration/telemetry-screens\n"})}),"\n",(0,s.jsx)(t.p,{children:"This creates the following files and directories:"}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{children:"Name"}),(0,s.jsx)(t.th,{children:"Description"})]})}),(0,s.jsx)(t.tbody,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"src/HelloworldWidget.vue"}),(0,s.jsx)(t.td,{children:"Fully functional widget which displays a simple value. This can be expanded using existing COSMOS Vue.js code to create any data visualization imaginable."})]})})]}),"\n",(0,s.jsx)(t.p,{children:"It also updates the plugin.txt file to add the new widget:"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-ruby",children:"WIDGET Helloworld\n"})}),"\n",(0,s.jsx)(t.h2,{id:"tool-generator",children:"Tool Generator"}),"\n",(0,s.jsxs)(t.p,{children:["The tool generator creates the scaffolding for a new COSMOS Tool. It's It must operate inside an existing COSMOS plugin and requires a tool name. Developing a custom tool requires intensive knowledge of a Javascript framework such as Vue.js, Angular, React, or Svelte. Since all the COSMOS tools are built in Vue.js, that is the recommended framework for new tool development. For additional help on frontend development, see ",(0,s.jsx)(t.a,{href:"../development/developing#running-a-frontend-application",children:"Running a Frontend Application"}),"."]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-bash",children:"openc3-cosmos-gse % openc3.sh cli generate tool\nUsage: cli generate tool 'Tool Name'\n\nopenc3-cosmos-gse % openc3.sh cli generate widget DataVis\nTool datavis successfully generated!\nPlease be sure datavis does not conflict with any other tools\n"})}),"\n",(0,s.jsx)(t.p,{children:"This creates the following files and directories:"}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{children:"Name"}),(0,s.jsx)(t.th,{children:"Description"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"src/App.vue"}),(0,s.jsx)(t.td,{children:"Basic Vue template to render the application."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"src/main.js"}),(0,s.jsx)(t.td,{children:"Entry point for the new tool which loads Vue, Vuetify, and other libraries."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"src/router.js"}),(0,s.jsx)(t.td,{children:"Vue component router."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"src/tools/datavis"}),(0,s.jsx)(t.td,{children:"Contains all the files necessary to serve a web-based tool named datavis. The name is always defined in all lowercase. Due to technical limitations, the toolname must be unique and cannot be renamed at installation."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"src/tools/datavis/datavis.vue"}),(0,s.jsx)(t.td,{children:"Fully functional tool which displays a simple button. This can be expanded using existing COSMOS Vue.js code to create any tool imaginable."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"package.json"}),(0,s.jsx)(t.td,{children:"Build and dependency definition file. Used by npm or yarn to build the tool."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"vue.config.js"}),(0,s.jsx)(t.td,{children:"Vue configuration file used to serve the application in development and build the application."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"<dotfiles>"}),(0,s.jsx)(t.td,{children:"Various dotfiles which help configure formatters and tools for Javascript frontend development"})]})]})]}),"\n",(0,s.jsxs)(t.p,{children:["It also updates the plugin.txt file to add the new tool. The icon can be changed to any of the material design icons found ",(0,s.jsx)(t.a,{href:"https://pictogrammers.com/library/mdi/",children:"here"}),"."]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-ruby",children:'TOOL datavis "DataVis"\n INLINE_URL js/app.js\n ICON mdi-file-cad-box\n'})})]})}function h(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},1184:(e,t,n)=>{n.d(t,{R:()=>o,x:()=>a});var s=n(4041);const r={},i=s.createContext(r);function o(e){const t=s.useContext(i);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:o(e.components),s.createElement(i.Provider,{value:t},e.children)}}}]);
|
@@ -0,0 +1 @@
|
|
1
|
+
(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([[3917],{1167:(e,t,n)=>{"use strict";n.d(t,{A:()=>H});var s=n(4041),a=n(1085);function o(e){const{mdxAdmonitionTitle:t,rest:n}=function(e){const t=s.Children.toArray(e),n=t.find((e=>s.isValidElement(e)&&"mdxAdmonitionTitle"===e.type)),o=t.filter((e=>e!==n)),c=n?.props.children;return{mdxAdmonitionTitle:c,rest:o.length>0?(0,a.jsx)(a.Fragment,{children:o}):null}}(e.children),o=e.title??t;return{...e,...o&&{title:o},children:n}}var c=n(4357),r=n(9082),i=n(7473);const l="admonition_IZjC",d="admonitionHeading_uVvU",u="admonitionIcon_HiR3",m="admonitionContent_bl22";function h(e){let{type:t,className:n,children:s}=e;return(0,a.jsx)("div",{className:(0,c.A)(i.G.common.admonition,i.G.common.admonitionType(t),l,n),children:s})}function f(e){let{icon:t,title:n}=e;return(0,a.jsxs)("div",{className:d,children:[(0,a.jsx)("span",{className:u,children:t}),n]})}function p(e){let{children:t}=e;return t?(0,a.jsx)("div",{className:m,children:t}):null}function x(e){const{type:t,icon:n,title:s,children:o,className:c}=e;return(0,a.jsxs)(h,{type:t,className:c,children:[s||n?(0,a.jsx)(f,{title:s,icon:n}):null,(0,a.jsx)(p,{children:o})]})}function g(e){return(0,a.jsx)("svg",{viewBox:"0 0 14 16",...e,children:(0,a.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"})})}const j={icon:(0,a.jsx)(g,{}),title:(0,a.jsx)(r.A,{id:"theme.admonition.note",description:"The default label used for the Note admonition (:::note)",children:"note"})};function v(e){return(0,a.jsx)(x,{...j,...e,className:(0,c.A)("alert alert--secondary",e.className),children:e.children})}function b(e){return(0,a.jsx)("svg",{viewBox:"0 0 12 16",...e,children:(0,a.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"})})}const N={icon:(0,a.jsx)(b,{}),title:(0,a.jsx)(r.A,{id:"theme.admonition.tip",description:"The default label used for the Tip admonition (:::tip)",children:"tip"})};function y(e){return(0,a.jsx)(x,{...N,...e,className:(0,c.A)("alert alert--success",e.className),children:e.children})}function A(e){return(0,a.jsx)("svg",{viewBox:"0 0 14 16",...e,children:(0,a.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"})})}const C={icon:(0,a.jsx)(A,{}),title:(0,a.jsx)(r.A,{id:"theme.admonition.info",description:"The default label used for the Info admonition (:::info)",children:"info"})};function k(e){return(0,a.jsx)(x,{...C,...e,className:(0,c.A)("alert alert--info",e.className),children:e.children})}function B(e){return(0,a.jsx)("svg",{viewBox:"0 0 16 16",...e,children:(0,a.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"})})}const w={icon:(0,a.jsx)(B,{}),title:(0,a.jsx)(r.A,{id:"theme.admonition.warning",description:"The default label used for the Warning admonition (:::warning)",children:"warning"})};function L(e){return(0,a.jsx)("svg",{viewBox:"0 0 12 16",...e,children:(0,a.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"})})}const E={icon:(0,a.jsx)(L,{}),title:(0,a.jsx)(r.A,{id:"theme.admonition.danger",description:"The default label used for the Danger admonition (:::danger)",children:"danger"})};const T={icon:(0,a.jsx)(B,{}),title:(0,a.jsx)(r.A,{id:"theme.admonition.caution",description:"The default label used for the Caution admonition (:::caution)",children:"caution"})};const _={...{note:v,tip:y,info:k,warning:function(e){return(0,a.jsx)(x,{...w,...e,className:(0,c.A)("alert alert--warning",e.className),children:e.children})},danger:function(e){return(0,a.jsx)(x,{...E,...e,className:(0,c.A)("alert alert--danger",e.className),children:e.children})}},...{secondary:e=>(0,a.jsx)(v,{title:"secondary",...e}),important:e=>(0,a.jsx)(k,{title:"important",...e}),success:e=>(0,a.jsx)(y,{title:"success",...e}),caution:function(e){return(0,a.jsx)(x,{...T,...e,className:(0,c.A)("alert alert--warning",e.className),children:e.children})}}};function H(e){const t=o(e),n=(s=t.type,_[s]||(console.warn(`No admonition component found for admonition type "${s}". Using Info as fallback.`),_.info));var s;return(0,a.jsx)(n,{...t})}},1650:(e,t,n)=>{"use strict";n.d(t,{A:()=>g});n(4041);var s=n(4357),a=n(9082),o=n(9058),c=n(1085);function r(){return(0,c.jsx)(a.A,{id:"theme.contentVisibility.unlistedBanner.title",description:"The unlisted content banner title",children:"Unlisted page"})}function i(){return(0,c.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 l(){return(0,c.jsx)(o.A,{children:(0,c.jsx)("meta",{name:"robots",content:"noindex, nofollow"})})}function d(){return(0,c.jsx)(a.A,{id:"theme.contentVisibility.draftBanner.title",description:"The draft content banner title",children:"Draft page"})}function u(){return(0,c.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(7473),h=n(1167);function f(e){let{className:t}=e;return(0,c.jsx)(h.A,{type:"caution",title:(0,c.jsx)(d,{}),className:(0,s.A)(t,m.G.common.draftBanner),children:(0,c.jsx)(u,{})})}function p(e){let{className:t}=e;return(0,c.jsx)(h.A,{type:"caution",title:(0,c.jsx)(r,{}),className:(0,s.A)(t,m.G.common.unlistedBanner),children:(0,c.jsx)(i,{})})}function x(e){return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(l,{}),(0,c.jsx)(p,{...e})]})}function g(e){let{metadata:t}=e;const{unlisted:n,frontMatter:s}=t;return(0,c.jsxs)(c.Fragment,{children:[(n||s.unlisted)&&(0,c.jsx)(x,{}),s.draft&&(0,c.jsx)(f,{})]})}},3412:(e,t,n)=>{"use strict";n.d(t,{A:()=>g});n(4041);var s=n(4357),a=n(9082),o=n(7473),c=n(2436);const r={iconEdit:"iconEdit_UohW"};var i=n(1085);function l(e){let{className:t,...n}=e;return(0,i.jsx)("svg",{fill:"currentColor",height:"20",width:"20",viewBox:"0 0 40 40",className:(0,s.A)(r.iconEdit,t),"aria-hidden":"true",...n,children:(0,i.jsx)("g",{children:(0,i.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 d(e){let{editUrl:t}=e;return(0,i.jsxs)(c.A,{to:t,className:o.G.common.editThisPage,children:[(0,i.jsx)(l,{}),(0,i.jsx)(a.A,{id:"theme.common.editThisPage",description:"The link label to edit the current page",children:"Edit this page"})]})}var u=n(396);function m(e){void 0===e&&(e={});const{i18n:{currentLocale:t}}=(0,u.A)(),n=function(){const{i18n:{currentLocale:e,localeConfigs:t}}=(0,u.A)();return t[e].calendar}();return new Intl.DateTimeFormat(t,{calendar:n,...e})}function h(e){let{lastUpdatedAt:t}=e;const n=new Date(t),s=m({day:"numeric",month:"short",year:"numeric",timeZone:"UTC"}).format(n);return(0,i.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,i.jsx)("b",{children:(0,i.jsx)("time",{dateTime:n.toISOString(),itemProp:"dateModified",children:s})})},children:" on {date}"})}function f(e){let{lastUpdatedBy:t}=e;return(0,i.jsx)(a.A,{id:"theme.lastUpdated.byUser",description:"The words used to describe by who the page has been last updated",values:{user:(0,i.jsx)("b",{children:t})},children:" by {user}"})}function p(e){let{lastUpdatedAt:t,lastUpdatedBy:n}=e;return(0,i.jsxs)("span",{className:o.G.common.lastUpdated,children:[(0,i.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:t?(0,i.jsx)(h,{lastUpdatedAt:t}):"",byUser:n?(0,i.jsx)(f,{lastUpdatedBy:n}):""},children:"Last updated{atDate}{byUser}"}),!1]})}const x={lastUpdated:"lastUpdated_g62E"};function g(e){let{className:t,editUrl:n,lastUpdatedAt:a,lastUpdatedBy:o}=e;return(0,i.jsxs)("div",{className:(0,s.A)("row",t),children:[(0,i.jsx)("div",{className:"col",children:n&&(0,i.jsx)(d,{editUrl:n})}),(0,i.jsx)("div",{className:(0,s.A)("col",x.lastUpdated),children:(a||o)&&(0,i.jsx)(p,{lastUpdatedAt:a,lastUpdatedBy:o})})]})}},9729:(e,t,n)=>{"use strict";n.d(t,{A:()=>ue});var s=n(4041),a=n(1184),o=n(9058),c=n(213),r=n(4357),i=n(2727),l=n(2520);function d(){const{prism:e}=(0,l.p)(),{colorMode:t}=(0,i.G)(),n=e.theme,s=e.darkTheme||n;return"dark"===t?s:n}var u=n(7473),m=n(1431),h=n.n(m);const f=/title=(?<quote>["'])(?<title>.*?)\1/,p=/\{(?<range>[\d,-]+)\}/,x={js:{start:"\\/\\/",end:""},jsBlock:{start:"\\/\\*",end:"\\*\\/"},jsx:{start:"\\{\\s*\\/\\*",end:"\\*\\/\\s*\\}"},bash:{start:"#",end:""},html:{start:"\x3c!--",end:"--\x3e"}},g={...x,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:""}},j=Object.keys(x);function v(e,t){const n=e.map((e=>{const{start:n,end:s}=g[e];return`(?:${n}\\s*(${t.flatMap((e=>[e.line,e.block?.start,e.block?.end].filter(Boolean))).join("|")})\\s*${s})`})).join("|");return new RegExp(`^\\s*(?:${n})\\s*$`)}function b(e,t){let n=e.replace(/\n$/,"");const{language:s,magicComments:a,metastring:o}=t;if(o&&p.test(o)){const e=o.match(p).groups.range;if(0===a.length)throw new Error(`A highlight range has been given in code block's metastring (\`\`\` ${o}), but no magic comment config is available. Docusaurus applies the first magic comment entry's className for metastring ranges.`);const t=a[0].className,s=h()(e).filter((e=>e>0)).map((e=>[e-1,[t]]));return{lineClassNames:Object.fromEntries(s),code:n}}if(void 0===s)return{lineClassNames:{},code:n};const c=function(e,t){switch(e){case"js":case"javascript":case"ts":case"typescript":return v(["js","jsBlock"],t);case"jsx":case"tsx":return v(["js","jsBlock","jsx"],t);case"html":return v(["js","jsBlock","html"],t);case"python":case"py":case"bash":return v(["bash"],t);case"markdown":case"md":return v(["html","jsx","bash"],t);case"tex":case"latex":case"matlab":return v(["tex"],t);case"lua":case"haskell":case"sql":return v(["lua"],t);case"wasm":return v(["wasm"],t);case"vb":case"vba":case"visual-basic":return v(["vb","rem"],t);case"vbnet":return v(["vbnet","rem"],t);case"batch":return v(["rem"],t);case"basic":return v(["rem","f90"],t);case"fsharp":return v(["js","ml"],t);case"ocaml":case"sml":return v(["ml"],t);case"fortran":return v(["f90"],t);case"cobol":return v(["cobol"],t);default:return v(j,t)}}(s,a),r=n.split("\n"),i=Object.fromEntries(a.map((e=>[e.className,{start:0,range:""}]))),l=Object.fromEntries(a.filter((e=>e.line)).map((e=>{let{className:t,line:n}=e;return[n,t]}))),d=Object.fromEntries(a.filter((e=>e.block)).map((e=>{let{className:t,block:n}=e;return[n.start,t]}))),u=Object.fromEntries(a.filter((e=>e.block)).map((e=>{let{className:t,block:n}=e;return[n.end,t]})));for(let h=0;h<r.length;){const e=r[h].match(c);if(!e){h+=1;continue}const t=e.slice(1).find((e=>void 0!==e));l[t]?i[l[t]].range+=`${h},`:d[t]?i[d[t]].start=h:u[t]&&(i[u[t]].range+=`${i[u[t]].start}-${h-1},`),r.splice(h,1)}n=r.join("\n");const m={};return Object.entries(i).forEach((e=>{let[t,{range:n}]=e;h()(n).forEach((e=>{m[e]??=[],m[e].push(t)}))})),{lineClassNames:m,code:n}}const N="codeBlockContainer_ZGJx";var y=n(1085);function A(e){let{as:t,...n}=e;const s=function(e){const t={color:"--prism-color",backgroundColor:"--prism-background-color"},n={};return Object.entries(e.plain).forEach((e=>{let[s,a]=e;const o=t[s];o&&"string"==typeof a&&(n[o]=a)})),n}(d());return(0,y.jsx)(t,{...n,style:s,className:(0,r.A)(n.className,N,u.G.common.codeBlock)})}const C={codeBlockContent:"codeBlockContent_qZBB",codeBlockTitle:"codeBlockTitle_zAEH",codeBlock:"codeBlock_TAPP",codeBlockStandalone:"codeBlockStandalone_K9VJ",codeBlockLines:"codeBlockLines_AdAo",codeBlockLinesWithNumbering:"codeBlockLinesWithNumbering_p5De",buttonGroup:"buttonGroup_TNwR"};function k(e){let{children:t,className:n}=e;return(0,y.jsx)(A,{as:"pre",tabIndex:0,className:(0,r.A)(C.codeBlockStandalone,"thin-scrollbar",n),children:(0,y.jsx)("code",{className:C.codeBlockLines,children:t})})}var B=n(1786);const w={attributes:!0,characterData:!0,childList:!0,subtree:!0};function L(e,t){const[n,a]=(0,s.useState)(),o=(0,s.useCallback)((()=>{a(e.current?.closest("[role=tabpanel][hidden]"))}),[e,a]);(0,s.useEffect)((()=>{o()}),[o]),function(e,t,n){void 0===n&&(n=w);const a=(0,B._q)(t),o=(0,B.Be)(n);(0,s.useEffect)((()=>{const t=new MutationObserver(a);return e&&t.observe(e,o),()=>t.disconnect()}),[e,a,o])}(n,(e=>{e.forEach((e=>{"attributes"===e.type&&"hidden"===e.attributeName&&(t(),o())}))}),{attributes:!0,characterData:!1,childList:!1,subtree:!1})}var E=n(4370);const T="codeLine_DPDv",_="codeLineNumber_YxQB",H="codeLineContent_SOIp";function S(e){let{line:t,classNames:n,showLineNumbers:s,getLineProps:a,getTokenProps:o}=e;1===t.length&&"\n"===t[0].content&&(t[0].content="");const c=a({line:t,className:(0,r.A)(n,s&&T)}),i=t.map(((e,t)=>(0,y.jsx)("span",{...o({token:e})},t)));return(0,y.jsxs)("span",{...c,children:[s?(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)("span",{className:_}),(0,y.jsx)("span",{className:H,children:i})]}):i,(0,y.jsx)("br",{})]})}var M=n(9082);function I(e){return(0,y.jsx)("svg",{viewBox:"0 0 24 24",...e,children:(0,y.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 U(e){return(0,y.jsx)("svg",{viewBox:"0 0 24 24",...e,children:(0,y.jsx)("path",{fill:"currentColor",d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"})})}const z={copyButtonCopied:"copyButtonCopied_Mzdr",copyButtonIcons:"copyButtonIcons_MVhB",copyButtonIcon:"copyButtonIcon_yxgH",copyButtonSuccessIcon:"copyButtonSuccessIcon_QJLJ"};function R(e){let{code:t,className:n}=e;const[a,o]=(0,s.useState)(!1),c=(0,s.useRef)(void 0),i=(0,s.useCallback)((()=>{!function(e,t){let{target:n=document.body}=void 0===t?{}:t;if("string"!=typeof e)throw new TypeError(`Expected parameter \`text\` to be a \`string\`, got \`${typeof e}\`.`);const s=document.createElement("textarea"),a=document.activeElement;s.value=e,s.setAttribute("readonly",""),s.style.contain="strict",s.style.position="absolute",s.style.left="-9999px",s.style.fontSize="12pt";const o=document.getSelection(),c=o.rangeCount>0&&o.getRangeAt(0);n.append(s),s.select(),s.selectionStart=0,s.selectionEnd=e.length;let r=!1;try{r=document.execCommand("copy")}catch{}s.remove(),c&&(o.removeAllRanges(),o.addRange(c)),a&&a.focus()}(t),o(!0),c.current=window.setTimeout((()=>{o(!1)}),1e3)}),[t]);return(0,s.useEffect)((()=>()=>window.clearTimeout(c.current)),[]),(0,y.jsx)("button",{type:"button","aria-label":a?(0,M.T)({id:"theme.CodeBlock.copied",message:"Copied",description:"The copied button label on code blocks"}):(0,M.T)({id:"theme.CodeBlock.copyButtonAriaLabel",message:"Copy code to clipboard",description:"The ARIA label for copy code blocks button"}),title:(0,M.T)({id:"theme.CodeBlock.copy",message:"Copy",description:"The copy button label on code blocks"}),className:(0,r.A)("clean-btn",n,z.copyButton,a&&z.copyButtonCopied),onClick:i,children:(0,y.jsxs)("span",{className:z.copyButtonIcons,"aria-hidden":"true",children:[(0,y.jsx)(I,{className:z.copyButtonIcon}),(0,y.jsx)(U,{className:z.copyButtonSuccessIcon})]})})}function V(e){return(0,y.jsx)("svg",{viewBox:"0 0 24 24",...e,children:(0,y.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"})})}const O="wordWrapButtonIcon_SMj9",D="wordWrapButtonEnabled_vR9E";function $(e){let{className:t,onClick:n,isEnabled:s}=e;const a=(0,M.T)({id:"theme.CodeBlock.wordWrapToggle",message:"Toggle word wrap",description:"The title attribute for toggle word wrapping button of code block lines"});return(0,y.jsx)("button",{type:"button",onClick:n,className:(0,r.A)("clean-btn",t,s&&D),"aria-label":a,title:a,children:(0,y.jsx)(V,{className:O,"aria-hidden":"true"})})}function P(e){let{children:t,className:n="",metastring:a,title:o,showLineNumbers:c,language:i}=e;const{prism:{defaultLanguage:u,magicComments:m}}=(0,l.p)(),h=function(e){return e?.toLowerCase()}(i??function(e){const t=e.split(" ").find((e=>e.startsWith("language-")));return t?.replace(/language-/,"")}(n)??u),p=d(),x=function(){const[e,t]=(0,s.useState)(!1),[n,a]=(0,s.useState)(!1),o=(0,s.useRef)(null),c=(0,s.useCallback)((()=>{const n=o.current.querySelector("code");e?n.removeAttribute("style"):(n.style.whiteSpace="pre-wrap",n.style.overflowWrap="anywhere"),t((e=>!e))}),[o,e]),r=(0,s.useCallback)((()=>{const{scrollWidth:e,clientWidth:t}=o.current,n=e>t||o.current.querySelector("code").hasAttribute("style");a(n)}),[o]);return L(o,r),(0,s.useEffect)((()=>{r()}),[e,r]),(0,s.useEffect)((()=>(window.addEventListener("resize",r,{passive:!0}),()=>{window.removeEventListener("resize",r)})),[r]),{codeBlockRef:o,isEnabled:e,isCodeScrollable:n,toggle:c}}(),g=function(e){return e?.match(f)?.groups.title??""}(a)||o,{lineClassNames:j,code:v}=b(t,{metastring:a,language:h,magicComments:m}),N=c??function(e){return Boolean(e?.includes("showLineNumbers"))}(a);return(0,y.jsxs)(A,{as:"div",className:(0,r.A)(n,h&&!n.includes(`language-${h}`)&&`language-${h}`),children:[g&&(0,y.jsx)("div",{className:C.codeBlockTitle,children:g}),(0,y.jsxs)("div",{className:C.codeBlockContent,children:[(0,y.jsx)(E.f4,{theme:p,code:v,language:h??"text",children:e=>{let{className:t,style:n,tokens:s,getLineProps:a,getTokenProps:o}=e;return(0,y.jsx)("pre",{tabIndex:0,ref:x.codeBlockRef,className:(0,r.A)(t,C.codeBlock,"thin-scrollbar"),style:n,children:(0,y.jsx)("code",{className:(0,r.A)(C.codeBlockLines,N&&C.codeBlockLinesWithNumbering),children:s.map(((e,t)=>(0,y.jsx)(S,{line:e,getLineProps:a,getTokenProps:o,classNames:j[t],showLineNumbers:N},t)))})})}}),(0,y.jsxs)("div",{className:C.buttonGroup,children:[(x.isEnabled||x.isCodeScrollable)&&(0,y.jsx)($,{className:C.codeButton,onClick:()=>x.toggle(),isEnabled:x.isEnabled}),(0,y.jsx)(R,{className:C.codeButton,code:v})]})]})]})}function W(e){let{children:t,...n}=e;const a=(0,c.A)(),o=function(e){return s.Children.toArray(e).some((e=>(0,s.isValidElement)(e)))?e:Array.isArray(e)?e.join(""):e}(t),r="string"==typeof o?P:k;return(0,y.jsx)(r,{...n,children:o},String(a))}function G(e){return(0,y.jsx)("code",{...e})}var q=n(2436);var F=n(6357),J=n(6476);const Z="details_B4FW",Y="isBrowser_Cof9",Q="collapsibleContent_VYua";function K(e){return!!e&&("SUMMARY"===e.tagName||K(e.parentElement))}function X(e,t){return!!e&&(e===t||X(e.parentElement,t))}function ee(e){let{summary:t,children:n,...a}=e;(0,F.A)().collectAnchor(a.id);const o=(0,c.A)(),i=(0,s.useRef)(null),{collapsed:l,setCollapsed:d}=(0,J.u)({initialState:!a.open}),[u,m]=(0,s.useState)(a.open),h=s.isValidElement(t)?t:(0,y.jsx)("summary",{children:t??"Details"});return(0,y.jsxs)("details",{...a,ref:i,open:u,"data-collapsed":l,className:(0,r.A)(Z,o&&Y,a.className),onMouseDown:e=>{K(e.target)&&e.detail>1&&e.preventDefault()},onClick:e=>{e.stopPropagation();const t=e.target;K(t)&&X(t,i.current)&&(e.preventDefault(),l?(d(!1),m(!0)):d(!0))},children:[h,(0,y.jsx)(J.N,{lazy:!1,collapsed:l,disableSSRStyle:!0,onCollapseTransitionEnd:e=>{d(e),m(!e)},children:(0,y.jsx)("div",{className:Q,children:n})})]})}const te="details_SZgV";function ne(e){let{...t}=e;return(0,y.jsx)(ee,{...t,className:(0,r.A)("alert alert--info",te,t.className)})}function se(e){const t=s.Children.toArray(e.children),n=t.find((e=>s.isValidElement(e)&&"summary"===e.type)),a=(0,y.jsx)(y.Fragment,{children:t.filter((e=>e!==n))});return(0,y.jsx)(ne,{...e,summary:n,children:a})}var ae=n(4775);function oe(e){return(0,y.jsx)(ae.A,{...e})}const ce="containsTaskList__YnT";function re(e){if(void 0!==e)return(0,r.A)(e,e?.includes("contains-task-list")&&ce)}const ie="img__Ss2";var le=n(1167);const de={Head:o.A,details:se,Details:se,code:function(e){return function(e){return void 0!==e.children&&s.Children.toArray(e.children).every((e=>"string"==typeof e&&!e.includes("\n")))}(e)?(0,y.jsx)(G,{...e}):(0,y.jsx)(W,{...e})},a:function(e){return(0,y.jsx)(q.A,{...e})},pre:function(e){return(0,y.jsx)(y.Fragment,{children:e.children})},ul:function(e){return(0,y.jsx)("ul",{...e,className:re(e.className)})},li:function(e){return(0,F.A)().collectAnchor(e.id),(0,y.jsx)("li",{...e})},img:function(e){return(0,y.jsx)("img",{decoding:"async",loading:"lazy",...e,className:(t=e.className,(0,r.A)(t,ie))});var t},h1:e=>(0,y.jsx)(oe,{as:"h1",...e}),h2:e=>(0,y.jsx)(oe,{as:"h2",...e}),h3:e=>(0,y.jsx)(oe,{as:"h3",...e}),h4:e=>(0,y.jsx)(oe,{as:"h4",...e}),h5:e=>(0,y.jsx)(oe,{as:"h5",...e}),h6:e=>(0,y.jsx)(oe,{as:"h6",...e}),admonition:le.A,mermaid:()=>null};function ue(e){let{children:t}=e;return(0,y.jsx)(a.x,{components:de,children:t})}},7703:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});n(4041);var s=n(4357),a=n(9969);const o={tableOfContents:"tableOfContents_TN1Q",docItemContainer:"docItemContainer_JtJJ"};var c=n(1085);const r="table-of-contents__link toc-highlight",i="table-of-contents__link--active";function l(e){let{className:t,...n}=e;return(0,c.jsx)("div",{className:(0,s.A)(o.tableOfContents,"thin-scrollbar",t),children:(0,c.jsx)(a.A,{...n,linkClassName:r,linkActiveClassName:i})})}},9969:(e,t,n)=>{"use strict";n.d(t,{A:()=>p});var s=n(4041),a=n(2520);function o(e){const t=e.map((e=>({...e,parentIndex:-1,children:[]}))),n=Array(7).fill(-1);t.forEach(((e,t)=>{const s=n.slice(2,e.level);e.parentIndex=Math.max(...s),n[e.level]=t}));const s=[];return t.forEach((e=>{const{parentIndex:n,...a}=e;n>=0?t[n].children.push(a):s.push(a)})),s}function c(e){let{toc:t,minHeadingLevel:n,maxHeadingLevel:s}=e;return t.flatMap((e=>{const t=c({toc:e.children,minHeadingLevel:n,maxHeadingLevel:s});return function(e){return e.level>=n&&e.level<=s}(e)?[{...e,children:t}]:t}))}function r(e){const t=e.getBoundingClientRect();return t.top===t.bottom?r(e.parentNode):t}function i(e,t){let{anchorTopOffset:n}=t;const s=e.find((e=>r(e).top>=n));if(s){return function(e){return e.top>0&&e.bottom<window.innerHeight/2}(r(s))?s:e[e.indexOf(s)-1]??null}return e[e.length-1]??null}function l(){const 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}function d(e){const t=(0,s.useRef)(void 0),n=l();(0,s.useEffect)((()=>{if(!e)return()=>{};const{linkClassName:s,linkActiveClassName:a,minHeadingLevel:o,maxHeadingLevel:c}=e;function r(){const e=function(e){return Array.from(document.getElementsByClassName(e))}(s),r=function(e){let{minHeadingLevel:t,maxHeadingLevel:n}=e;const s=[];for(let a=t;a<=n;a+=1)s.push(`h${a}.anchor`);return Array.from(document.querySelectorAll(s.join()))}({minHeadingLevel:o,maxHeadingLevel:c}),l=i(r,{anchorTopOffset:n.current}),d=e.find((e=>l&&l.id===function(e){return decodeURIComponent(e.href.substring(e.href.indexOf("#")+1))}(e)));e.forEach((e=>{!function(e,n){n?(t.current&&t.current!==e&&t.current.classList.remove(a),e.classList.add(a),t.current=e):e.classList.remove(a)}(e,e===d)}))}return document.addEventListener("scroll",r),document.addEventListener("resize",r),r(),()=>{document.removeEventListener("scroll",r),document.removeEventListener("resize",r)}}),[e,n])}var u=n(2436),m=n(1085);function h(e){let{toc:t,className:n,linkClassName:s,isChild:a}=e;return t.length?(0,m.jsx)("ul",{className:a?void 0:n,children:t.map((e=>(0,m.jsxs)("li",{children:[(0,m.jsx)(u.A,{to:`#${e.id}`,className:s??void 0,dangerouslySetInnerHTML:{__html:e.value}}),(0,m.jsx)(h,{isChild:!0,toc:e.children,className:n,linkClassName:s})]},e.id)))}):null}const f=s.memo(h);function p(e){let{toc:t,className:n="table-of-contents table-of-contents__left-border",linkClassName:r="table-of-contents__link",linkActiveClassName:i,minHeadingLevel:l,maxHeadingLevel:u,...h}=e;const p=(0,a.p)(),x=l??p.tableOfContents.minHeadingLevel,g=u??p.tableOfContents.maxHeadingLevel,j=function(e){let{toc:t,minHeadingLevel:n,maxHeadingLevel:a}=e;return(0,s.useMemo)((()=>c({toc:o(t),minHeadingLevel:n,maxHeadingLevel:a})),[t,n,a])}({toc:t,minHeadingLevel:x,maxHeadingLevel:g});return d((0,s.useMemo)((()=>{if(r&&i)return{linkClassName:r,linkActiveClassName:i,minHeadingLevel:x,maxHeadingLevel:g}}),[r,i,x,g])),(0,m.jsx)(f,{toc:j,className:n,linkClassName:r,...h})}},1431:(e,t)=>{function n(e){let t,n=[];for(let s of e.split(",").map((e=>e.trim())))if(/^-?\d+$/.test(s))n.push(parseInt(s,10));else if(t=s.match(/^(-?\d+)(-|\.\.\.?|\u2025|\u2026|\u22EF)(-?\d+)$/)){let[e,s,a,o]=t;if(s&&o){s=parseInt(s),o=parseInt(o);const e=s<o?1:-1;"-"!==a&&".."!==a&&"\u2025"!==a||(o+=e);for(let t=s;t!==o;t+=e)n.push(t)}}return n}t.default=n,e.exports=n},1184:(e,t,n)=>{"use strict";n.d(t,{R:()=>c,x:()=>r});var s=n(4041);const a={},o=s.createContext(a);function c(e){const t=s.useContext(o);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function r(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:c(e.components),s.createElement(o.Provider,{value:t},e.children)}}}]);
|