openc3-cosmos-tool-docs 5.17.1 → 5.18.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 +4 -4
- data/tools/staticdocs/assets/css/{styles.8a0f1b26.css → styles.80ddca08.css} +1 -1
- data/tools/staticdocs/assets/js/{019369f3.34291acc.js → 019369f3.727d87f1.js} +1 -1
- data/tools/staticdocs/assets/js/{058ffc22.8d9049f4.js → 058ffc22.f2d69d72.js} +1 -1
- data/tools/staticdocs/assets/js/{0686a885.dde7b18b.js → 0686a885.83641127.js} +1 -1
- data/tools/staticdocs/assets/js/078dbab0.945c9f59.js +1 -0
- data/tools/staticdocs/assets/js/{0f5d161c.ca02c5b2.js → 0f5d161c.e26d88b8.js} +1 -1
- data/tools/staticdocs/assets/js/{0ff569c9.ad025a56.js → 0ff569c9.aa4daee5.js} +1 -1
- data/tools/staticdocs/assets/js/{103cc3be.6b6cd0fa.js → 103cc3be.78f97eb1.js} +1 -1
- data/tools/staticdocs/assets/js/{13196248.9e7794e3.js → 13196248.ca2e8950.js} +1 -1
- data/tools/staticdocs/assets/js/{13c1b4e4.cec67b9c.js → 13c1b4e4.22a0b1d4.js} +1 -1
- data/tools/staticdocs/assets/js/{2047b354.bdd2586a.js → 2047b354.25d11993.js} +1 -1
- data/tools/staticdocs/assets/js/22b3ac48.7a5ea984.js +1 -0
- data/tools/staticdocs/assets/js/{2bb7bf90.043455de.js → 2bb7bf90.fa05d998.js} +1 -1
- data/tools/staticdocs/assets/js/3917.1ec7d126.js +1 -0
- data/tools/staticdocs/assets/js/{3dd7ef3b.c7c1d93f.js → 3dd7ef3b.d55880a8.js} +1 -1
- data/tools/staticdocs/assets/js/{40365d27.7eb3f7b1.js → 40365d27.4b4b2ccd.js} +1 -1
- data/tools/staticdocs/assets/js/{411898ad.d5f62a27.js → 411898ad.1d6a609d.js} +1 -1
- data/tools/staticdocs/assets/js/{42170351.69a8ed02.js → 42170351.c68b85e1.js} +1 -1
- data/tools/staticdocs/assets/js/43652efd.d1e1add3.js +1 -0
- data/tools/staticdocs/assets/js/53ca7c5b.c3111020.js +1 -0
- data/tools/staticdocs/assets/js/{54d0d530.28ba5be7.js → 54d0d530.d3f9a4ac.js} +1 -1
- data/tools/staticdocs/assets/js/{5b233ba7.9c621552.js → 5b233ba7.6fdd6b6c.js} +1 -1
- data/tools/staticdocs/assets/js/{5bc719f6.7fa17221.js → 5bc719f6.daa2a049.js} +1 -1
- data/tools/staticdocs/assets/js/{5c6ce5ec.5e6ca46b.js → 5c6ce5ec.61a9cae2.js} +1 -1
- data/tools/staticdocs/assets/js/5e3ed378.2bee863a.js +1 -0
- data/tools/staticdocs/assets/js/5fe211ef.a9f21277.js +1 -0
- data/tools/staticdocs/assets/js/6831b732.185eb427.js +1 -0
- data/tools/staticdocs/assets/js/{696b4199.0335bd94.js → 696b4199.a5ae3d65.js} +1 -1
- data/tools/staticdocs/assets/js/{6b210247.2cbd59e6.js → 6b210247.e96f3982.js} +1 -1
- data/tools/staticdocs/assets/js/{6b65133b.87dc7da6.js → 6b65133b.4e84b1c2.js} +1 -1
- data/tools/staticdocs/assets/js/6f92e431.65aa0240.js +1 -0
- data/tools/staticdocs/assets/js/72c6d8a8.98daa27a.js +1 -0
- data/tools/staticdocs/assets/js/{75e64983.932fbc0e.js → 75e64983.6ef0928b.js} +1 -1
- data/tools/staticdocs/assets/js/{867640d5.ffd4cf4c.js → 867640d5.48133ad5.js} +1 -1
- data/tools/staticdocs/assets/js/{89e76475.97389cc5.js → 89e76475.13ce283b.js} +1 -1
- data/tools/staticdocs/assets/js/{8f7843ee.d1ffd5ee.js → 8f7843ee.7a68246a.js} +1 -1
- data/tools/staticdocs/assets/js/9424f0b3.61c6bd97.js +1 -0
- data/tools/staticdocs/assets/js/{97535711.fc45ced1.js → 97535711.5311ddd9.js} +1 -1
- data/tools/staticdocs/assets/js/{99581c43.8e571df8.js → 99581c43.527aab44.js} +1 -1
- data/tools/staticdocs/assets/js/{9fb6059a.42881e94.js → 9fb6059a.a5107afb.js} +1 -1
- data/tools/staticdocs/assets/js/{a507c363.04b98d2c.js → a507c363.d2cc5d72.js} +1 -1
- data/tools/staticdocs/assets/js/{a677c089.b2928bac.js → a677c089.abc52ace.js} +1 -1
- data/tools/staticdocs/assets/js/{a9987364.8f065f19.js → a9987364.5ef1644f.js} +1 -1
- data/tools/staticdocs/assets/js/{aa6b6c1b.d78e5212.js → aa6b6c1b.c51c044d.js} +1 -1
- data/tools/staticdocs/assets/js/{b4596165.6806d46b.js → b4596165.daa24b72.js} +1 -1
- data/tools/staticdocs/assets/js/b6d70f94.4923c793.js +1 -0
- data/tools/staticdocs/assets/js/b9f60ba6.e55cd937.js +1 -0
- data/tools/staticdocs/assets/js/{bd0034eb.b4e3d6c1.js → bd0034eb.6691ccc4.js} +1 -1
- data/tools/staticdocs/assets/js/c24eae19.251e0038.js +1 -0
- data/tools/staticdocs/assets/js/{cb8c3f08.a0ef4b5f.js → cb8c3f08.b82ad06f.js} +1 -1
- data/tools/staticdocs/assets/js/cd879be4.f956406f.js +1 -0
- data/tools/staticdocs/assets/js/d1b923aa.d6bafb72.js +1 -0
- data/tools/staticdocs/assets/js/{d1bfc316.2d823a88.js → d1bfc316.0a5ff560.js} +1 -1
- data/tools/staticdocs/assets/js/{d24bf9b6.53eca5e8.js → d24bf9b6.6c422113.js} +1 -1
- data/tools/staticdocs/assets/js/{d57a4b5d.aaa48891.js → d57a4b5d.8f23a506.js} +1 -1
- data/tools/staticdocs/assets/js/{d5d77c37.be6fe7b6.js → d5d77c37.70fdbbc6.js} +1 -1
- data/tools/staticdocs/assets/js/{d8ca4191.c6632184.js → d8ca4191.2349d796.js} +1 -1
- data/tools/staticdocs/assets/js/{d9b92eba.c6a2c7e5.js → d9b92eba.8f82360d.js} +1 -1
- data/tools/staticdocs/assets/js/{db8fa1d0.f078bc02.js → db8fa1d0.8f1b2c9f.js} +1 -1
- data/tools/staticdocs/assets/js/{dc5f7beb.a4afe7cd.js → dc5f7beb.e3a82d1e.js} +1 -1
- data/tools/staticdocs/assets/js/{e501b0d1.d108a8a9.js → e501b0d1.0b407477.js} +1 -1
- data/tools/staticdocs/assets/js/ebec1ccb.9bea92b0.js +1 -0
- data/tools/staticdocs/assets/js/f15615f1.5c433923.js +1 -0
- data/tools/staticdocs/assets/js/{fd886806.a21dd400.js → fd886806.4a41fa80.js} +1 -1
- data/tools/staticdocs/assets/js/main.b5390098.js +2 -0
- data/tools/staticdocs/assets/js/runtime~main.12d1e41d.js +1 -0
- data/tools/staticdocs/docs/configuration/command.html +96 -180
- data/tools/staticdocs/docs/configuration/format.html +25 -54
- data/tools/staticdocs/docs/configuration/interfaces.html +25 -80
- data/tools/staticdocs/docs/configuration/plugins.html +138 -178
- data/tools/staticdocs/docs/configuration/protocols.html +91 -110
- data/tools/staticdocs/docs/configuration/ssl-tls.html +33 -104
- data/tools/staticdocs/docs/configuration/table.html +67 -125
- data/tools/staticdocs/docs/configuration/target.html +23 -31
- data/tools/staticdocs/docs/configuration/telemetry-screens.html +194 -455
- data/tools/staticdocs/docs/configuration/telemetry.html +104 -187
- data/tools/staticdocs/docs/configuration.html +4 -4
- data/tools/staticdocs/docs/development/curl.html +17 -126
- data/tools/staticdocs/docs/development/developing.html +29 -80
- data/tools/staticdocs/docs/development/host-install.html +10 -23
- data/tools/staticdocs/docs/development/json-api.html +20 -32
- data/tools/staticdocs/docs/development/log-structure.html +14 -14
- data/tools/staticdocs/docs/development/roadmap.html +15 -15
- data/tools/staticdocs/docs/development/streaming-api.html +11 -83
- data/tools/staticdocs/docs/development/testing.html +17 -26
- data/tools/staticdocs/docs/development.html +4 -4
- data/tools/staticdocs/docs/getting-started/generators.html +35 -109
- data/tools/staticdocs/docs/getting-started/gettingstarted.html +26 -74
- data/tools/staticdocs/docs/getting-started/installation.html +24 -35
- data/tools/staticdocs/docs/getting-started/key_concepts.html +35 -35
- data/tools/staticdocs/docs/getting-started/podman.html +26 -57
- data/tools/staticdocs/docs/getting-started/requirements.html +21 -21
- data/tools/staticdocs/docs/getting-started/upgrading.html +12 -17
- data/tools/staticdocs/docs/getting-started.html +4 -4
- data/tools/staticdocs/docs/guides/bridges.html +19 -63
- data/tools/staticdocs/docs/guides/cfs.html +44 -184
- data/tools/staticdocs/docs/guides/custom-widgets.html +20 -47
- data/tools/staticdocs/docs/guides/little-endian-bitfields.html +5 -14
- data/tools/staticdocs/docs/guides/local-mode.html +16 -21
- data/tools/staticdocs/docs/guides/logging.html +12 -12
- data/tools/staticdocs/docs/guides/monitoring.html +22 -137
- data/tools/staticdocs/docs/guides/performance.html +18 -27
- data/tools/staticdocs/docs/guides/raspberrypi.html +10 -23
- data/tools/staticdocs/docs/guides/script-writing.html +85 -391
- data/tools/staticdocs/docs/guides/scripting-api.html +482 -1353
- data/tools/staticdocs/docs/guides.html +4 -4
- data/tools/staticdocs/docs/meta/contributing.html +14 -19
- data/tools/staticdocs/docs/meta/licenses.html +13 -31
- data/tools/staticdocs/docs/meta/philosophy.html +4 -4
- data/tools/staticdocs/docs/meta/xtce.html +15 -17
- data/tools/staticdocs/docs/meta.html +4 -4
- data/tools/staticdocs/docs/privacy.html +20 -20
- data/tools/staticdocs/docs/tools/autonomic.html +22 -22
- data/tools/staticdocs/docs/tools/bucket-explorer.html +13 -13
- data/tools/staticdocs/docs/tools/calendar.html +21 -21
- data/tools/staticdocs/docs/tools/cmd-sender.html +16 -16
- data/tools/staticdocs/docs/tools/cmd-tlm-server.html +23 -23
- data/tools/staticdocs/docs/tools/data-extractor.html +27 -27
- data/tools/staticdocs/docs/tools/data-viewer.html +13 -13
- data/tools/staticdocs/docs/tools/handbooks.html +7 -7
- data/tools/staticdocs/docs/tools/limits-monitor.html +19 -19
- data/tools/staticdocs/docs/tools/packet-viewer.html +16 -16
- data/tools/staticdocs/docs/tools/script-runner.html +36 -75
- data/tools/staticdocs/docs/tools/table-manager.html +13 -48
- data/tools/staticdocs/docs/tools/tlm-grapher.html +23 -23
- data/tools/staticdocs/docs/tools/tlm-viewer.html +18 -18
- data/tools/staticdocs/docs/tools.html +4 -4
- data/tools/staticdocs/docs.html +14 -14
- data/tools/staticdocs/index.html +4 -4
- data/tools/staticdocs/lunr-index-1724101625047.json +1 -0
- data/tools/staticdocs/lunr-index.json +1 -1
- data/tools/staticdocs/markdown-page.html +5 -5
- data/tools/staticdocs/search-doc-1724101625047.json +1 -0
- data/tools/staticdocs/search-doc.json +1 -1
- metadata +71 -71
- data/tools/staticdocs/assets/js/078dbab0.b275e04c.js +0 -1
- data/tools/staticdocs/assets/js/22b3ac48.0f4fbe9d.js +0 -1
- data/tools/staticdocs/assets/js/43652efd.be2c1d02.js +0 -1
- data/tools/staticdocs/assets/js/4650.292aca67.js +0 -1
- data/tools/staticdocs/assets/js/53ca7c5b.3f1245d5.js +0 -1
- data/tools/staticdocs/assets/js/5e3ed378.77db7b87.js +0 -1
- data/tools/staticdocs/assets/js/5fe211ef.71dc8326.js +0 -1
- data/tools/staticdocs/assets/js/6831b732.5714d508.js +0 -1
- data/tools/staticdocs/assets/js/6f92e431.300a9857.js +0 -1
- data/tools/staticdocs/assets/js/72c6d8a8.cfccace6.js +0 -1
- data/tools/staticdocs/assets/js/9424f0b3.29299bde.js +0 -1
- data/tools/staticdocs/assets/js/b6d70f94.f5514e8b.js +0 -1
- data/tools/staticdocs/assets/js/b9f60ba6.c3b3046d.js +0 -1
- data/tools/staticdocs/assets/js/c24eae19.6b084c7c.js +0 -1
- data/tools/staticdocs/assets/js/cd879be4.6f19050a.js +0 -1
- data/tools/staticdocs/assets/js/d1b923aa.3f3e186d.js +0 -1
- data/tools/staticdocs/assets/js/ebec1ccb.1ded1149.js +0 -1
- data/tools/staticdocs/assets/js/f15615f1.f9b655a6.js +0 -1
- data/tools/staticdocs/assets/js/main.c2e2b617.js +0 -2
- data/tools/staticdocs/assets/js/runtime~main.2bb31799.js +0 -1
- data/tools/staticdocs/lunr-index-1719505302032.json +0 -1
- data/tools/staticdocs/search-doc-1719505302032.json +0 -1
- /data/tools/staticdocs/assets/js/{main.c2e2b617.js.LICENSE.txt → main.b5390098.js.LICENSE.txt} +0 -0
@@ -1 +1 @@
|
|
1
|
-
"use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([[9433],{2338:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>s,default:()=>o,frontMatter:()=>d,metadata:()=>a,toc:()=>l});var r=n(1085),i=n(1184);const d={title:"Log Structure"},s=void 0,a={id:"development/log-structure",title:"Log Structure",description:"Updated: 8-21-2023 to the format as of OpenC3 COSMOS 5.11.0",source:"@site/docs/development/log-structure.md",sourceDirName:"development",slug:"/development/log-structure",permalink:"/tools/staticdocs/docs/development/log-structure",draft:!1,unlisted:!1,editUrl:"https://github.com/OpenC3/cosmos/tree/main/docs.openc3.com/docs/development/log-structure.md",tags:[],version:"current",frontMatter:{title:"Log Structure"},sidebar:"defaultSidebar",previous:{title:"JSON API",permalink:"/tools/staticdocs/docs/development/json-api"},next:{title:"Roadmap",permalink:"/tools/staticdocs/docs/development/roadmap"}},c={},l=[{value:"Packet Log File Format",id:"packet-log-file-format",level:2},{value:"File Header",id:"file-header",level:3},{value:"Entry Types",id:"entry-types",level:3},{value:"Common Entry Format",id:"common-entry-format",level:4},{value:"Target Declaration Entry",id:"target-declaration-entry",level:4},{value:"Packet Declaration Entry",id:"packet-declaration-entry",level:4},{value:"Raw Packet and JSON Packet Entries",id:"raw-packet-and-json-packet-entries",level:4},{value:"Offset Marker Entry",id:"offset-marker-entry",level:4},{value:"Key Map Entry",id:"key-map-entry",level:4}];function h(e){const t={h2:"h2",h3:"h3",h4:"h4",p:"p",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,i.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.p,{children:"Updated: 8-21-2023 to the format as of OpenC3 COSMOS 5.11.0"}),"\n",(0,r.jsx)(t.h2,{id:"packet-log-file-format",children:"Packet Log File Format"}),"\n",(0,r.jsx)(t.p,{children:"Packet logs in OpenC3 COSMOS 5 are used to store raw binary packets as received from various targets, as\nwell as decommutated packets stored as JSON structures."}),"\n",(0,r.jsx)(t.h3,{id:"file-header",children:"File Header"}),"\n",(0,r.jsx)(t.p,{children:'COSMOS 5 Packet log files start with the 8-character sequence "COSMOS5_". This can be used to identify the type of file independent of filename and differentiate them from newer and older versions.'}),"\n",(0,r.jsx)(t.h3,{id:"entry-types",children:"Entry Types"}),"\n",(0,r.jsx)(t.p,{children:"Packet log files have 6 different entry types with room for future expansion. All entry headers are big endian binary data."}),"\n",(0,r.jsx)(t.h4,{id:"common-entry-format",children:"Common Entry Format"}),"\n",(0,r.jsx)(t.p,{children:"This common format is used for all packet log entries:"}),"\n",(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Field"}),(0,r.jsx)(t.th,{children:"Data Type"}),(0,r.jsx)(t.th,{children:"Description"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Length"}),(0,r.jsx)(t.td,{children:"32-bit Unsigned Integer"}),(0,r.jsx)(t.td,{children:"Total length of the entry in bytes not including the length field. Max entry size is therefore 4GiB."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Entry Type"}),(0,r.jsx)(t.td,{children:"4-bit Unsigned Integer"}),(0,r.jsxs)(t.td,{children:["Entry Type:",(0,r.jsx)("br",{}),"1 = Target Declaration",(0,r.jsx)("br",{}),"2 = Packet Declaraction",(0,r.jsx)("br",{}),"3 = Raw Packet",(0,r.jsx)("br",{}),"4 = JSON/CBOR Packet",(0,r.jsx)("br",{}),"5 = Offset Marker",(0,r.jsx)("br",{}),"6 = Key Map"]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Cmd/Tlm Flag"}),(0,r.jsx)(t.td,{children:"1-bit Unsigned Integer"}),(0,r.jsxs)(t.td,{children:["1 = Command",(0,r.jsx)("br",{}),"0 = Telemetry"]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Stored Flag"}),(0,r.jsx)(t.td,{children:"1-bit Unsigned Integer"}),(0,r.jsxs)(t.td,{children:["1 = Stored Data",(0,r.jsx)("br",{}),"0 = Realtime Data"]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Id Flag"}),(0,r.jsx)(t.td,{children:"1-bit Unsigned Integer"}),(0,r.jsxs)(t.td,{children:["1 = ID present",(0,r.jsx)("br",{}),"0 = ID not present"]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"CBOR Flag"}),(0,r.jsx)(t.td,{children:"1-bit Unsigned Integer"}),(0,r.jsxs)(t.td,{children:['Only Valid for "JSON/CBOR Packets"',(0,r.jsx)("br",{}),"1 = CBOR Data",(0,r.jsx)("br",{}),"0 = JSON Data"]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Extra Flag"}),(0,r.jsx)(t.td,{children:"1-bit Unsigned Integer"}),(0,r.jsxs)(t.td,{children:["1 = Extra present",(0,r.jsx)("br",{}),"0 = Extra Not Present (Added COSMOS 5.11)"]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Received Time Flag"}),(0,r.jsx)(t.td,{children:"1-bit Unsigned Integer"}),(0,r.jsxs)(t.td,{children:["1 = Received Time Present",(0,r.jsx)("br",{}),"0 = No Received Time (Added COSMOS 5.11.0)"]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Reserved"}),(0,r.jsx)(t.td,{children:"6-bit Unsigned Integer"}),(0,r.jsx)(t.td,{children:"Reserved for Future expansion. Should be set to 0 if unused."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Entry Data"}),(0,r.jsx)(t.td,{children:"Variable"}),(0,r.jsx)(t.td,{children:"Unique data based on entry type. See Entry Types Below"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Id (Optional)"}),(0,r.jsx)(t.td,{children:"32-byte Binary Hash"}),(0,r.jsx)(t.td,{children:"If the ID field is set, this is a binary 256-bit SHA-256 hash uniquely identifying a target configuration or packet configuration"})]})]})]}),"\n",(0,r.jsx)(t.h4,{id:"target-declaration-entry",children:"Target Declaration Entry"}),"\n",(0,r.jsx)(t.p,{children:"Declares the name of a target the first time it is seen when writing the log file."}),"\n",(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Field"}),(0,r.jsx)(t.th,{children:"Data Type"}),(0,r.jsx)(t.th,{children:"Description"})]})}),(0,r.jsx)(t.tbody,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Target Name"}),(0,r.jsx)(t.td,{children:"Variable-Length ASCII String"}),(0,r.jsx)(t.td,{children:"Target Name"})]})})]}),"\n",(0,r.jsx)(t.h4,{id:"packet-declaration-entry",children:"Packet Declaration Entry"}),"\n",(0,r.jsx)(t.p,{children:"Declares the name of a packet the first time it is seen when writing the log file. References the associated target name by index."}),"\n",(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Field"}),(0,r.jsx)(t.th,{children:"Data Type"}),(0,r.jsx)(t.th,{children:"Description"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Target Index"}),(0,r.jsx)(t.td,{children:"16-bit Unsigned Integer"}),(0,r.jsx)(t.td,{children:"Index into a dynamically built table of target names, generated from the order of the target declarations in the file. The first target declaration gets index 0, the second target declaration gets index 1, etc."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Packet Name"}),(0,r.jsx)(t.td,{children:"Variable-Length ASCII String"}),(0,r.jsx)(t.td,{children:"Packet Name"})]})]})]}),"\n",(0,r.jsx)(t.h4,{id:"raw-packet-and-json-packet-entries",children:"Raw Packet and JSON Packet Entries"}),"\n",(0,r.jsx)(t.p,{children:'Holds the main data for a packet. Raw packets are the data before the COSMOS decommutation phase. "JSON" packets are the data after decommutation. Note that "JSON" packets are now generally stored as CBOR rather than JSON to reduce storage size.'}),"\n",(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Field"}),(0,r.jsx)(t.th,{children:"Data Type"}),(0,r.jsx)(t.th,{children:"Description"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Packet Index"}),(0,r.jsx)(t.td,{children:"16-bit Unsigned Integer"}),(0,r.jsx)(t.td,{children:"Index into a dynamically built table of cmd_or_tlm/target name/packet name tuples, generated from the order of the packet declarations in the file. The first packet declaration gets index 0, the second packet declaration gets index 1, etc. This limits the max number of unique packet types in a single file to 65536."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Packet Timestamp"}),(0,r.jsx)(t.td,{children:"64-bit Unsigned Integer"}),(0,r.jsx)(t.td,{children:"Packet timestamp in nanoseconds from the unix epoch (Jan 1st, 1970, midnight). This field contains the \u201cpacket time\u201d for both Raw and JSON packet entries (which are used to store decommutated date). For JSON packet entries, the packet received time can also be extracted from the JSON data if needed."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Received Timestamp (Optional)"}),(0,r.jsx)(t.td,{children:"64-bit Unsigned Integer"}),(0,r.jsx)(t.td,{children:"Only present if Received Time Flag is Set (Only currently in Raw log files). Received timestamp in nanoseconds from the unix epoch (Jan 1st, 1970, midnight). This field contains the received time\u201d for both Raw packet entries (which are used to store decommutated date). For JSON packet entries, the packet received time can be extracted from the JSON data if needed."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Extra Length (Optional)"}),(0,r.jsx)(t.td,{children:"32-bit Unsigned Integer"}),(0,r.jsx)(t.td,{children:"Only Present if Extra Flag is Set. Length of extra data in bytes not including itself."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Extra Data (Optional)"}),(0,r.jsx)(t.td,{children:"Variable-Length Block Data"}),(0,r.jsx)(t.td,{children:"Only Present if Extra Flag is Set. CBOR or JSON encoded object of extra data."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Packet Data"}),(0,r.jsx)(t.td,{children:"Variable-Length Block Data"}),(0,r.jsx)(t.td,{children:"The Raw binary packet data for Raw Packet entries, and ASCII JSON data (or CBOR if flag set) for JSON packet entries. Note the Common Entry Format Id field is not supported with either type of packet entry."})]})]})]}),"\n",(0,r.jsx)(t.h4,{id:"offset-marker-entry",children:"Offset Marker Entry"}),"\n",(0,r.jsx)(t.p,{children:"This contains the Redis stream offset for the last packet stored in this log file. This entry allows for a seamless transition from log files to Redis streams holding the most recent data received by COSMOS."}),"\n",(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Field"}),(0,r.jsx)(t.th,{children:"Data Type"}),(0,r.jsx)(t.th,{children:"Description"})]})}),(0,r.jsx)(t.tbody,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Offset Marker"}),(0,r.jsx)(t.td,{children:"Variable-Length ASCII String"}),(0,r.jsx)(t.td,{children:"Redis Offset Marker"})]})})]}),"\n",(0,r.jsx)(t.h4,{id:"key-map-entry",children:"Key Map Entry"}),"\n",(0,r.jsx)(t.p,{children:"The key map entry is used to further reduce log file sizes by reducing the size of the names of the decommutated values. Each value is given a numeric name counting up from 0 which drastically reduces decommutated data size. Note: This could be further enhanced in the future by changing to a denser encoding similar to base64. The key map is generated on the first reception of a packet. If future packets have different keys, then the names are used as-is and no reduction is gained. Typically packet keys don't change within a file."}),"\n",(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Field"}),(0,r.jsx)(t.th,{children:"Data Type"}),(0,r.jsx)(t.th,{children:"Description"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Packet Index"}),(0,r.jsx)(t.td,{children:"16-bit Unsigned Integer"}),(0,r.jsx)(t.td,{children:"Index into a dynamically built table of packet names, generated from the order of the packet declarations in the file. The first packet declaration gets index 0, the second packet declaration gets index 1, etc."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Key Map"}),(0,r.jsx)(t.td,{children:"Variable-Length ASCII String"}),(0,r.jsx)(t.td,{children:"Key Map Data with Mapping from numeric key to actual packet item name"})]})]})]})]})}function o(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(h,{...e})}):h(e)}},1184:(e,t,n)=>{n.d(t,{R:()=>s});var r=n(4041);const i={},d=r.createContext(i);function s(e){const t=r.useContext(d);return r.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}}}]);
|
1
|
+
"use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([[9433],{2338:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>s,default:()=>o,frontMatter:()=>d,metadata:()=>a,toc:()=>l});var r=n(1085),i=n(1184);const d={title:"Log Structure"},s=void 0,a={id:"development/log-structure",title:"Log Structure",description:"Updated: 8-21-2023 to the format as of OpenC3 COSMOS 5.11.0",source:"@site/docs/development/log-structure.md",sourceDirName:"development",slug:"/development/log-structure",permalink:"/tools/staticdocs/docs/development/log-structure",draft:!1,unlisted:!1,editUrl:"https://github.com/OpenC3/cosmos/tree/main/docs.openc3.com/docs/development/log-structure.md",tags:[],version:"current",frontMatter:{title:"Log Structure"},sidebar:"defaultSidebar",previous:{title:"JSON API",permalink:"/tools/staticdocs/docs/development/json-api"},next:{title:"Roadmap",permalink:"/tools/staticdocs/docs/development/roadmap"}},c={},l=[{value:"Packet Log File Format",id:"packet-log-file-format",level:2},{value:"File Header",id:"file-header",level:3},{value:"Entry Types",id:"entry-types",level:3},{value:"Common Entry Format",id:"common-entry-format",level:4},{value:"Target Declaration Entry",id:"target-declaration-entry",level:4},{value:"Packet Declaration Entry",id:"packet-declaration-entry",level:4},{value:"Raw Packet and JSON Packet Entries",id:"raw-packet-and-json-packet-entries",level:4},{value:"Offset Marker Entry",id:"offset-marker-entry",level:4},{value:"Key Map Entry",id:"key-map-entry",level:4}];function h(e){const t={h2:"h2",h3:"h3",h4:"h4",p:"p",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,i.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.p,{children:"Updated: 8-21-2023 to the format as of OpenC3 COSMOS 5.11.0"}),"\n",(0,r.jsx)(t.h2,{id:"packet-log-file-format",children:"Packet Log File Format"}),"\n",(0,r.jsx)(t.p,{children:"Packet logs in OpenC3 COSMOS 5 are used to store raw binary packets as received from various targets, as\nwell as decommutated packets stored as JSON structures."}),"\n",(0,r.jsx)(t.h3,{id:"file-header",children:"File Header"}),"\n",(0,r.jsx)(t.p,{children:'COSMOS 5 Packet log files start with the 8-character sequence "COSMOS5_". This can be used to identify the type of file independent of filename and differentiate them from newer and older versions.'}),"\n",(0,r.jsx)(t.h3,{id:"entry-types",children:"Entry Types"}),"\n",(0,r.jsx)(t.p,{children:"Packet log files have 6 different entry types with room for future expansion. All entry headers are big endian binary data."}),"\n",(0,r.jsx)(t.h4,{id:"common-entry-format",children:"Common Entry Format"}),"\n",(0,r.jsx)(t.p,{children:"This common format is used for all packet log entries:"}),"\n",(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Field"}),(0,r.jsx)(t.th,{children:"Data Type"}),(0,r.jsx)(t.th,{children:"Description"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Length"}),(0,r.jsx)(t.td,{children:"32-bit Unsigned Integer"}),(0,r.jsx)(t.td,{children:"Total length of the entry in bytes not including the length field. Max entry size is therefore 4GiB."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Entry Type"}),(0,r.jsx)(t.td,{children:"4-bit Unsigned Integer"}),(0,r.jsxs)(t.td,{children:["Entry Type:",(0,r.jsx)("br",{}),"1 = Target Declaration",(0,r.jsx)("br",{}),"2 = Packet Declaraction",(0,r.jsx)("br",{}),"3 = Raw Packet",(0,r.jsx)("br",{}),"4 = JSON/CBOR Packet",(0,r.jsx)("br",{}),"5 = Offset Marker",(0,r.jsx)("br",{}),"6 = Key Map"]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Cmd/Tlm Flag"}),(0,r.jsx)(t.td,{children:"1-bit Unsigned Integer"}),(0,r.jsxs)(t.td,{children:["1 = Command",(0,r.jsx)("br",{}),"0 = Telemetry"]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Stored Flag"}),(0,r.jsx)(t.td,{children:"1-bit Unsigned Integer"}),(0,r.jsxs)(t.td,{children:["1 = Stored Data",(0,r.jsx)("br",{}),"0 = Realtime Data"]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Id Flag"}),(0,r.jsx)(t.td,{children:"1-bit Unsigned Integer"}),(0,r.jsxs)(t.td,{children:["1 = ID present",(0,r.jsx)("br",{}),"0 = ID not present"]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"CBOR Flag"}),(0,r.jsx)(t.td,{children:"1-bit Unsigned Integer"}),(0,r.jsxs)(t.td,{children:['Only Valid for "JSON/CBOR Packets"',(0,r.jsx)("br",{}),"1 = CBOR Data",(0,r.jsx)("br",{}),"0 = JSON Data"]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Extra Flag"}),(0,r.jsx)(t.td,{children:"1-bit Unsigned Integer"}),(0,r.jsxs)(t.td,{children:["1 = Extra present",(0,r.jsx)("br",{}),"0 = Extra Not Present (Added COSMOS 5.11)"]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Received Time Flag"}),(0,r.jsx)(t.td,{children:"1-bit Unsigned Integer"}),(0,r.jsxs)(t.td,{children:["1 = Received Time Present",(0,r.jsx)("br",{}),"0 = No Received Time (Added COSMOS 5.11.0)"]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Reserved"}),(0,r.jsx)(t.td,{children:"6-bit Unsigned Integer"}),(0,r.jsx)(t.td,{children:"Reserved for Future expansion. Should be set to 0 if unused."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Entry Data"}),(0,r.jsx)(t.td,{children:"Variable"}),(0,r.jsx)(t.td,{children:"Unique data based on entry type. See Entry Types Below"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Id (Optional)"}),(0,r.jsx)(t.td,{children:"32-byte Binary Hash"}),(0,r.jsx)(t.td,{children:"If the ID field is set, this is a binary 256-bit SHA-256 hash uniquely identifying a target configuration or packet configuration"})]})]})]}),"\n",(0,r.jsx)(t.h4,{id:"target-declaration-entry",children:"Target Declaration Entry"}),"\n",(0,r.jsx)(t.p,{children:"Declares the name of a target the first time it is seen when writing the log file."}),"\n",(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Field"}),(0,r.jsx)(t.th,{children:"Data Type"}),(0,r.jsx)(t.th,{children:"Description"})]})}),(0,r.jsx)(t.tbody,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Target Name"}),(0,r.jsx)(t.td,{children:"Variable-Length ASCII String"}),(0,r.jsx)(t.td,{children:"Target Name"})]})})]}),"\n",(0,r.jsx)(t.h4,{id:"packet-declaration-entry",children:"Packet Declaration Entry"}),"\n",(0,r.jsx)(t.p,{children:"Declares the name of a packet the first time it is seen when writing the log file. References the associated target name by index."}),"\n",(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Field"}),(0,r.jsx)(t.th,{children:"Data Type"}),(0,r.jsx)(t.th,{children:"Description"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Target Index"}),(0,r.jsx)(t.td,{children:"16-bit Unsigned Integer"}),(0,r.jsx)(t.td,{children:"Index into a dynamically built table of target names, generated from the order of the target declarations in the file. The first target declaration gets index 0, the second target declaration gets index 1, etc."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Packet Name"}),(0,r.jsx)(t.td,{children:"Variable-Length ASCII String"}),(0,r.jsx)(t.td,{children:"Packet Name"})]})]})]}),"\n",(0,r.jsx)(t.h4,{id:"raw-packet-and-json-packet-entries",children:"Raw Packet and JSON Packet Entries"}),"\n",(0,r.jsx)(t.p,{children:'Holds the main data for a packet. Raw packets are the data before the COSMOS decommutation phase. "JSON" packets are the data after decommutation. Note that "JSON" packets are now generally stored as CBOR rather than JSON to reduce storage size.'}),"\n",(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Field"}),(0,r.jsx)(t.th,{children:"Data Type"}),(0,r.jsx)(t.th,{children:"Description"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Packet Index"}),(0,r.jsx)(t.td,{children:"16-bit Unsigned Integer"}),(0,r.jsx)(t.td,{children:"Index into a dynamically built table of cmd_or_tlm/target name/packet name tuples, generated from the order of the packet declarations in the file. The first packet declaration gets index 0, the second packet declaration gets index 1, etc. This limits the max number of unique packet types in a single file to 65536."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Packet Timestamp"}),(0,r.jsx)(t.td,{children:"64-bit Unsigned Integer"}),(0,r.jsx)(t.td,{children:"Packet timestamp in nanoseconds from the unix epoch (Jan 1st, 1970, midnight). This field contains the \u201cpacket time\u201d for both Raw and JSON packet entries (which are used to store decommutated date). For JSON packet entries, the packet received time can also be extracted from the JSON data if needed."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Received Timestamp (Optional)"}),(0,r.jsx)(t.td,{children:"64-bit Unsigned Integer"}),(0,r.jsx)(t.td,{children:"Only present if Received Time Flag is Set (Only currently in Raw log files). Received timestamp in nanoseconds from the unix epoch (Jan 1st, 1970, midnight). This field contains the received time\u201d for both Raw packet entries (which are used to store decommutated date). For JSON packet entries, the packet received time can be extracted from the JSON data if needed."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Extra Length (Optional)"}),(0,r.jsx)(t.td,{children:"32-bit Unsigned Integer"}),(0,r.jsx)(t.td,{children:"Only Present if Extra Flag is Set. Length of extra data in bytes not including itself."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Extra Data (Optional)"}),(0,r.jsx)(t.td,{children:"Variable-Length Block Data"}),(0,r.jsx)(t.td,{children:"Only Present if Extra Flag is Set. CBOR or JSON encoded object of extra data."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Packet Data"}),(0,r.jsx)(t.td,{children:"Variable-Length Block Data"}),(0,r.jsx)(t.td,{children:"The Raw binary packet data for Raw Packet entries, and ASCII JSON data (or CBOR if flag set) for JSON packet entries. Note the Common Entry Format Id field is not supported with either type of packet entry."})]})]})]}),"\n",(0,r.jsx)(t.h4,{id:"offset-marker-entry",children:"Offset Marker Entry"}),"\n",(0,r.jsx)(t.p,{children:"This contains the Redis stream offset for the last packet stored in this log file. This entry allows for a seamless transition from log files to Redis streams holding the most recent data received by COSMOS."}),"\n",(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Field"}),(0,r.jsx)(t.th,{children:"Data Type"}),(0,r.jsx)(t.th,{children:"Description"})]})}),(0,r.jsx)(t.tbody,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Offset Marker"}),(0,r.jsx)(t.td,{children:"Variable-Length ASCII String"}),(0,r.jsx)(t.td,{children:"Redis Offset Marker"})]})})]}),"\n",(0,r.jsx)(t.h4,{id:"key-map-entry",children:"Key Map Entry"}),"\n",(0,r.jsx)(t.p,{children:"The key map entry is used to further reduce log file sizes by reducing the size of the names of the decommutated values. Each value is given a numeric name counting up from 0 which drastically reduces decommutated data size. Note: This could be further enhanced in the future by changing to a denser encoding similar to base64. The key map is generated on the first reception of a packet. If future packets have different keys, then the names are used as-is and no reduction is gained. Typically packet keys don't change within a file."}),"\n",(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Field"}),(0,r.jsx)(t.th,{children:"Data Type"}),(0,r.jsx)(t.th,{children:"Description"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Packet Index"}),(0,r.jsx)(t.td,{children:"16-bit Unsigned Integer"}),(0,r.jsx)(t.td,{children:"Index into a dynamically built table of packet names, generated from the order of the packet declarations in the file. The first packet declaration gets index 0, the second packet declaration gets index 1, etc."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Key Map"}),(0,r.jsx)(t.td,{children:"Variable-Length ASCII String"}),(0,r.jsx)(t.td,{children:"Key Map Data with Mapping from numeric key to actual packet item name"})]})]})]})]})}function o(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(h,{...e})}):h(e)}},1184:(e,t,n)=>{n.d(t,{R:()=>s,x:()=>a});var r=n(4041);const i={},d=r.createContext(i);function s(e){const t=r.useContext(d);return r.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(i):e.components||i:s(e.components),r.createElement(d.Provider,{value:t},e.children)}}}]);
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([[5425],{8154:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>p,contentTitle:()=>s,default:()=>l,frontMatter:()=>r,metadata:()=>c,toc:()=>d});var o=t(1085),a=t(1184);const r={title:"Markdown page example"},s="Markdown page example",c={type:"mdx",permalink:"/tools/staticdocs/markdown-page",source:"@site/src/pages/markdown-page.md",title:"Markdown page example",description:"You don't need React to write simple standalone pages.",frontMatter:{title:"Markdown page example"},unlisted:!1},p={},d=[];function i(e){const n={h1:"h1",header:"header",p:"p",...(0,a.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.header,{children:(0,o.jsx)(n.h1,{id:"markdown-page-example",children:"Markdown page example"})}),"\n",(0,o.jsx)(n.p,{children:"You don't need React to write simple standalone pages."})]})}function l(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(i,{...e})}):i(e)}},1184:(e,n,t)=>{t.d(n,{R:()=>s,x:()=>c});var o=t(4041);const a={},r=o.createContext(a);function s(e){const n=o.useContext(r);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:s(e.components),o.createElement(r.Provider,{value:n},e.children)}}}]);
|
@@ -1 +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:()=>c,contentTitle:()=>o,default:()=>p,frontMatter:()=>s,metadata:()=>a,toc:()=>l});var i=n(1085),r=n(1184);const s={title:"Script Runner"},o=void 0,a={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"}},c={},l=[{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:"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 overriden 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 sccript 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.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 Test 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"},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});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])}}}]);
|
1
|
+
"use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([[2327],{6114:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>o,default:()=>p,frontMatter:()=>s,metadata:()=>a,toc:()=>l});var i=n(1085),r=n(1184);const s={title:"Script Runner"},o=void 0,a={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"}},c={},l=[{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:"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 overriden 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 sccript 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.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 Test 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"},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:()=>a});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 a(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)}}}]);
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([[5961],{9560:(e,t,
|
1
|
+
"use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([[5961],{9560:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>a,default:()=>h,frontMatter:()=>o,metadata:()=>r,toc:()=>d});var s=n(1085),i=n(1184);const o={title:"Introduction",sidebar_position:0,slug:"/"},a=void 0,r={id:"introduction",title:"Introduction",description:"This site aims to be a comprehensive guide to OpenC3 COSMOS. We'll cover topics such",source:"@site/docs/introduction.md",sourceDirName:".",slug:"/",permalink:"/tools/staticdocs/docs/",draft:!1,unlisted:!1,editUrl:"https://github.com/OpenC3/cosmos/tree/main/docs.openc3.com/docs/introduction.md",tags:[],version:"current",sidebarPosition:0,frontMatter:{title:"Introduction",sidebar_position:0,slug:"/"},sidebar:"defaultSidebar",next:{title:"Getting Started",permalink:"/tools/staticdocs/docs/getting-started"}},c={},d=[{value:"So what is COSMOS, exactly?",id:"so-what-is-cosmos-exactly",level:2},{value:"COSMOS Architecture",id:"cosmos-architecture",level:3},{value:"Helpful Hints",id:"helpful-hints",level:2}];function l(e){const t={a:"a",admonition:"admonition",h2:"h2",h3:"h3",img:"img",p:"p",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.p,{children:"This site aims to be a comprehensive guide to OpenC3 COSMOS. We'll cover topics such\nas getting your configuration up and running, developing test and operations scripts,\nbuilding custom telemetry screens, and give you some advice on participating in the future\ndevelopment of COSMOS itself."}),"\n",(0,s.jsx)(t.h2,{id:"so-what-is-cosmos-exactly",children:"So what is COSMOS, exactly?"}),"\n",(0,s.jsx)(t.p,{children:"COSMOS is a suite of applications that can be used to control a set of embedded systems. These systems can be\nanything from test equipment (power supplies, oscilloscopes, switched power strips, UPS devices, etc), to\ndevelopment boards (Arduinos, Raspberry Pi, Beaglebone, etc), to satellites."}),"\n",(0,s.jsx)(t.h3,{id:"cosmos-architecture",children:"COSMOS Architecture"}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{alt:"COSMOS Architecture",src:n(126).A+"",width:"1155",height:"538"})}),"\n",(0,s.jsx)(t.p,{children:"COSMOS 5 is a cloud native, containerized, microservice oriented command and control system. All the COSMOS microservices are docker containers which is why Docker is shown containing the entire COSMOS system. The green boxes on the left represent external embedded systems (Targets) which COSMOS connects to. The Redis data store contains the configuration for all the microservices, the current value table, as well as data streams containing decommutated data. The Minio data store contains plugins, targets, configuration data, text logs as well as binary logs of all the raw, decommutated, and reduced data. Users interact with COSMOS from a web browser which routes through the internal Traefik load balancer."}),"\n",(0,s.jsx)(t.p,{children:"Keep reading for an in-depth discussion of each of the COSMOS Tools."}),"\n",(0,s.jsx)(t.h2,{id:"helpful-hints",children:"Helpful Hints"}),"\n",(0,s.jsx)(t.p,{children:"Throughout this guide there are a number of small-but-handy pieces of\ninformation that can make using COSMOS easier, more interesting, and less\nhazardous. Here's what to look out for."}),"\n",(0,s.jsx)(t.admonition,{title:"ProTips\u2122 help you get more from COSMOS",type:"note",children:(0,s.jsx)(t.p,{children:"These are tips and tricks that will help you be a COSMOS wizard!"})}),"\n",(0,s.jsx)(t.admonition,{title:"Notes are handy pieces of information",type:"info",children:(0,s.jsx)(t.p,{children:"These are for the extra tidbits sometimes necessary to understand COSMOS."})}),"\n",(0,s.jsx)(t.admonition,{title:"Warnings help you not blow things up",type:"warning",children:(0,s.jsx)(t.p,{children:"Be aware of these messages if you wish to avoid certain death."})}),"\n",(0,s.jsx)(t.admonition,{title:"Find a problem in the documentation or in COSMOS itself?",type:"note",children:(0,s.jsxs)(t.p,{children:["Both using and hacking on COSMOS should be fun, simple, and easy, so if for\nsome reason you find it's a pain, please ",(0,s.jsx)(t.a,{href:"https://github.com/OpenC3/cosmos/issues/new/choose",children:"create an issue"})," on\nGitHub describing your experience so we can make it better."]})})]})}function h(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},126:(e,t,n)=>{n.d(t,{A:()=>s});const s=n.p+"assets/images/architecture-b78f12eba076a0c07af7abdd9dd4187c59aa6b4f5c51b47ad03f73e9f98a6ed6.png"},1184:(e,t,n)=>{n.d(t,{R:()=>a,x:()=>r});var s=n(4041);const i={},o=s.createContext(i);function a(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(i):e.components||i:a(e.components),s.createElement(o.Provider,{value:t},e.children)}}}]);
|
@@ -1 +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 simulataneously 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});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])}}}]);
|
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 simulataneously 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)}}}]);
|
@@ -1 +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:()=>
|
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 activies 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 activites 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 manger thread contains a thread pool that hosts more than one thread to run the activity. The scheduler manger 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", ect... 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([[9698],{6135:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>d,contentTitle:()=>s,default:()=>u,frontMatter:()=>a,metadata:()=>c,toc:()=>l});var i=n(1085),o=n(1184);const a={title:"Data Viewer"},s=void 0,c={id:"tools/data-viewer",title:"Data Viewer",description:"Introduction",source:"@site/docs/tools/data-viewer.md",sourceDirName:"tools",slug:"/tools/data-viewer",permalink:"/tools/staticdocs/docs/tools/data-viewer",draft:!1,unlisted:!1,editUrl:"https://github.com/OpenC3/cosmos/tree/main/docs.openc3.com/docs/tools/data-viewer.md",tags:[],version:"current",frontMatter:{title:"Data Viewer"},sidebar:"defaultSidebar",previous:{title:"Data Extractor",permalink:"/tools/staticdocs/docs/tools/data-extractor"},next:{title:"Handbooks",permalink:"/tools/staticdocs/docs/tools/handbooks"}},d={},l=[{value:"Introduction",id:"introduction",level:2},{value:"Data Viewer Menus",id:"data-viewer-menus",level:2},{value:"File Menu Items",id:"file-menu-items",level:3},{value:"Open Configuration",id:"open-configuration",level:4},{value:"Save Configuration",id:"save-configuration",level:4},{value:"Adding Components",id:"adding-components",level:3}];function r(e){const t={h2:"h2",h3:"h3",h4:"h4",img:"img",li:"li",p:"p",ul:"ul",...(0,o.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:"Data Viewer allows you to view packet data in both the past and in real time."}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{alt:"Data Viewer",src:n(7122).A+"",width:"1273",height:"732"})}),"\n",(0,i.jsx)(t.h2,{id:"data-viewer-menus",children:"Data Viewer Menus"}),"\n",(0,i.jsx)(t.h3,{id:"file-menu-items",children:"File Menu Items"}),"\n",(0,i.jsx)("img",{src:n(6869).A,alt:"File Menu",style:{float:"left","margin-right":"50px",height:"6em"}}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsx)(t.li,{children:"Opens a saved configuration"}),"\n",(0,i.jsx)(t.li,{children:"Save the current configuration"}),"\n",(0,i.jsx)(t.li,{children:"Reset the configuration (default settings)"}),"\n"]}),"\n",(0,i.jsx)(t.h4,{id:"open-configuration",children:"Open Configuration"}),"\n",(0,i.jsx)(t.p,{children:"The Open Configuration dialog displays a list of all saved configurations. You select a configuration and then click Ok to load it. You can delete existing configurations by clicking the Trash icon next to a configuration name."}),"\n",(0,i.jsx)(t.h4,{id:"save-configuration",children:"Save Configuration"}),"\n",(0,i.jsx)(t.p,{children:"The Save Configuration dialog also displays a list of all saved configurations. You click the Configuration Name text field, enter the name of your new configuration, and click Ok to save. You can delete existing configurations by clicking the Trash icon next to a configuration name."}),"\n",(0,i.jsx)(t.h3,{id:"adding-components",children:"Adding Components"}),"\n",(0,i.jsx)(t.p,{children:"DataViewer displays data in a component. To add a new component to the interface click the plus icon. This brings up the Add Component dialog. First you select the component you want to use to visual the data. Next you add packets which will populate the component. Finally click Create to see the DataViewer component visualization."}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{alt:"Add Component",src:n(8102).A+"",width:"798",height:"591"})}),"\n",(0,i.jsx)(t.p,{children:"To adjust the settings of the COSMOS Raw/Decom component click the gear icon to bring up the Display Settings dialog. You can turn on and off various visualizations, increase the number of packets displayed and the history."}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{alt:"Add a packet",src:n(5557).A+"",width:"1270",height:"931"})})]})}function u(e={}){const{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(r,{...e})}):r(e)}},6869:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/file_menu-368e6f03ad620e01bf83fb991aace23312d45629bfcef2d3fbccd4dd9e4dbdbd.png"},8102:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/add_component-883814db1de410921a1d46247be60a87a51f1c51eb98d4a7f499875c83225294.png"},7122:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/data_viewer-9eb6ce20988554325e15a6e404da9fef35b06c23548d5d136b4420f444ef94f7.png"},5557:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/display_settings-726614b4eda5f74fc563e4d3b1798eb3893e152a15b9420a6053f6a2e0980944.png"},1184:(e,t,n)=>{n.d(t,{R:()=>s});var i=n(4041);const o={},a=i.createContext(o);function s(e){const t=i.useContext(a);return i.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}}}]);
|
1
|
+
"use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([[9698],{6135:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>d,contentTitle:()=>s,default:()=>u,frontMatter:()=>a,metadata:()=>c,toc:()=>l});var i=n(1085),o=n(1184);const a={title:"Data Viewer"},s=void 0,c={id:"tools/data-viewer",title:"Data Viewer",description:"Introduction",source:"@site/docs/tools/data-viewer.md",sourceDirName:"tools",slug:"/tools/data-viewer",permalink:"/tools/staticdocs/docs/tools/data-viewer",draft:!1,unlisted:!1,editUrl:"https://github.com/OpenC3/cosmos/tree/main/docs.openc3.com/docs/tools/data-viewer.md",tags:[],version:"current",frontMatter:{title:"Data Viewer"},sidebar:"defaultSidebar",previous:{title:"Data Extractor",permalink:"/tools/staticdocs/docs/tools/data-extractor"},next:{title:"Handbooks",permalink:"/tools/staticdocs/docs/tools/handbooks"}},d={},l=[{value:"Introduction",id:"introduction",level:2},{value:"Data Viewer Menus",id:"data-viewer-menus",level:2},{value:"File Menu Items",id:"file-menu-items",level:3},{value:"Open Configuration",id:"open-configuration",level:4},{value:"Save Configuration",id:"save-configuration",level:4},{value:"Adding Components",id:"adding-components",level:3}];function r(e){const t={h2:"h2",h3:"h3",h4:"h4",img:"img",li:"li",p:"p",ul:"ul",...(0,o.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:"Data Viewer allows you to view packet data in both the past and in real time."}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{alt:"Data Viewer",src:n(7122).A+"",width:"1273",height:"732"})}),"\n",(0,i.jsx)(t.h2,{id:"data-viewer-menus",children:"Data Viewer Menus"}),"\n",(0,i.jsx)(t.h3,{id:"file-menu-items",children:"File Menu Items"}),"\n",(0,i.jsx)("img",{src:n(6869).A,alt:"File Menu",style:{float:"left","margin-right":"50px",height:"6em"}}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsx)(t.li,{children:"Opens a saved configuration"}),"\n",(0,i.jsx)(t.li,{children:"Save the current configuration"}),"\n",(0,i.jsx)(t.li,{children:"Reset the configuration (default settings)"}),"\n"]}),"\n",(0,i.jsx)(t.h4,{id:"open-configuration",children:"Open Configuration"}),"\n",(0,i.jsx)(t.p,{children:"The Open Configuration dialog displays a list of all saved configurations. You select a configuration and then click Ok to load it. You can delete existing configurations by clicking the Trash icon next to a configuration name."}),"\n",(0,i.jsx)(t.h4,{id:"save-configuration",children:"Save Configuration"}),"\n",(0,i.jsx)(t.p,{children:"The Save Configuration dialog also displays a list of all saved configurations. You click the Configuration Name text field, enter the name of your new configuration, and click Ok to save. You can delete existing configurations by clicking the Trash icon next to a configuration name."}),"\n",(0,i.jsx)(t.h3,{id:"adding-components",children:"Adding Components"}),"\n",(0,i.jsx)(t.p,{children:"DataViewer displays data in a component. To add a new component to the interface click the plus icon. This brings up the Add Component dialog. First you select the component you want to use to visual the data. Next you add packets which will populate the component. Finally click Create to see the DataViewer component visualization."}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{alt:"Add Component",src:n(8102).A+"",width:"798",height:"591"})}),"\n",(0,i.jsx)(t.p,{children:"To adjust the settings of the COSMOS Raw/Decom component click the gear icon to bring up the Display Settings dialog. You can turn on and off various visualizations, increase the number of packets displayed and the history."}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{alt:"Add a packet",src:n(5557).A+"",width:"1270",height:"931"})})]})}function u(e={}){const{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(r,{...e})}):r(e)}},6869:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/file_menu-368e6f03ad620e01bf83fb991aace23312d45629bfcef2d3fbccd4dd9e4dbdbd.png"},8102:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/add_component-883814db1de410921a1d46247be60a87a51f1c51eb98d4a7f499875c83225294.png"},7122:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/data_viewer-9eb6ce20988554325e15a6e404da9fef35b06c23548d5d136b4420f444ef94f7.png"},5557:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/display_settings-726614b4eda5f74fc563e4d3b1798eb3893e152a15b9420a6053f6a2e0980944.png"},1184:(e,t,n)=>{n.d(t,{R:()=>s,x:()=>c});var i=n(4041);const o={},a=i.createContext(o);function s(e){const t=i.useContext(a);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(o):e.components||o:s(e.components),i.createElement(a.Provider,{value:t},e.children)}}}]);
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([[4688],{2203:(e,t,i)=>{i.r(t),i.d(t,{assets:()=>a,contentTitle:()=>l,default:()=>h,frontMatter:()=>c,metadata:()=>r,toc:()=>o});var n=i(1085),s=i(1184);const c={title:"Packet Viewer"},l=void 0,r={id:"tools/packet-viewer",title:"Packet Viewer",description:"Introduction",source:"@site/docs/tools/packet-viewer.md",sourceDirName:"tools",slug:"/tools/packet-viewer",permalink:"/tools/staticdocs/docs/tools/packet-viewer",draft:!1,unlisted:!1,editUrl:"https://github.com/OpenC3/cosmos/tree/main/docs.openc3.com/docs/tools/packet-viewer.md",tags:[],version:"current",frontMatter:{title:"Packet Viewer"},sidebar:"defaultSidebar",previous:{title:"Limits Monitor",permalink:"/tools/staticdocs/docs/tools/limits-monitor"},next:{title:"Script Runner",permalink:"/tools/staticdocs/docs/tools/script-runner"}},a={},o=[{value:"Introduction",id:"introduction",level:2},{value:"Packet Viewer Menus",id:"packet-viewer-menus",level:2},{value:"File Menu Items",id:"file-menu-items",level:3},{value:"View Menu Items",id:"view-menu-items",level:3},{value:"Selecting Packets",id:"selecting-packets",level:2},{value:"Details",id:"details",level:3}];function d(e){const t={a:"a",h2:"h2",h3:"h3",img:"img",li:"li",p:"p",ul:"ul",...(0,s.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.h2,{id:"introduction",children:"Introduction"}),"\n",(0,n.jsx)(t.p,{children:"Packet Viewer is a live telemetry viewer which requires no configuration to display the current values for all defined target, packet, items. Items with limits are displayed colored (blue, green, yellow, or red) according to their current state. Items can be right clicked to get detailed information."}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"Packet Viewer",src:i(5858).A+"",width:"1274",height:"837"})}),"\n",(0,n.jsx)(t.h2,{id:"packet-viewer-menus",children:"Packet Viewer Menus"}),"\n",(0,n.jsx)(t.h3,{id:"file-menu-items",children:"File Menu Items"}),"\n",(0,n.jsx)("img",{src:i(4141).A,alt:"File Menu",style:{float:"left","margin-right":"50px",height:"120px"}}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsx)(t.li,{children:"Change the refresh and stale interval"}),"\n",(0,n.jsx)(t.li,{children:"Opens a saved configuration"}),"\n",(0,n.jsx)(t.li,{children:"Save the current configuration (view settings)"}),"\n",(0,n.jsx)(t.li,{children:"Reset the configuration (default settings)"}),"\n"]}),"\n",(0,n.jsx)(t.h3,{id:"view-menu-items",children:"View Menu Items"}),"\n",(0,n.jsx)("img",{src:i(9270).A,alt:"View Menu",style:{float:"left","margin-right":"50px",height:"180px"}}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsxs)(t.li,{children:["Shows ",(0,n.jsx)(t.a,{href:"/tools/staticdocs/docs/configuration/target#ignore_item",children:"ignored items"})]}),"\n",(0,n.jsxs)(t.li,{children:["Display ",(0,n.jsx)(t.a,{href:"/tools/staticdocs/docs/configuration/telemetry#derived-items",children:"derived"})," items last"]}),"\n",(0,n.jsxs)(t.li,{children:["Display formatted items with ",(0,n.jsx)(t.a,{href:"../configuration/telemetry#units",children:"units"})]}),"\n",(0,n.jsxs)(t.li,{children:["Display ",(0,n.jsx)(t.a,{href:"../configuration/telemetry#format_string",children:"formatted"})," items"]}),"\n",(0,n.jsxs)(t.li,{children:["Display ",(0,n.jsx)(t.a,{href:"../configuration/telemetry#read_conversion",children:"converted"})," items"]}),"\n",(0,n.jsx)(t.li,{children:"Display raw items"}),"\n"]}),"\n",(0,n.jsx)(t.h2,{id:"selecting-packets",children:"Selecting Packets"}),"\n",(0,n.jsx)(t.p,{children:"Initially opening Packet Viewer will open the first alphabetical Target and Packet. Click the drop down menus to update the Items table to a new packet. To filter the list of items you can type in the search box."}),"\n",(0,n.jsx)(t.h3,{id:"details",children:"Details"}),"\n",(0,n.jsx)(t.p,{children:"Right-clicking an item and selecting Details will open the details dialog."}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"Details",src:i(8547).A+"",width:"591",height:"697"})}),"\n",(0,n.jsx)(t.p,{children:"This dialog lists everything defined on the telemetry item."})]})}function h(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(d,{...e})}):d(e)}},4141:(e,t,i)=>{i.d(t,{A:()=>n});const n=i.p+"assets/images/file_menu-d9ac5efbe78e58f024666452b9f28af72c6d09a3460fc7c0737c2bb74e4ea409.png"},9270:(e,t,i)=>{i.d(t,{A:()=>n});const n=i.p+"assets/images/view_menu-a02cfbd5e6fafa5d3b4f1ae76bfbd63f49388939b4732bf91709f48e44498d19.png"},5858:(e,t,i)=>{i.d(t,{A:()=>n});const n=i.p+"assets/images/packet_viewer-505c517c9a838a41d6fe668ff7ca2efb1b89ced4b75df638cd11a45484bc6533.png"},8547:(e,t,i)=>{i.d(t,{A:()=>n});const n=i.p+"assets/images/temp1_details-4c4bbe7c2d60e636f0304ee8ac7237af8db2bdba8666c9ae2dc0a105eca248f2.png"},1184:(e,t,i)=>{i.d(t,{R:()=>l});var n=i(4041);const s={},c=n.createContext(s);function l(e){const t=n.useContext(c);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}}}]);
|
1
|
+
"use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([[4688],{2203:(e,t,i)=>{i.r(t),i.d(t,{assets:()=>a,contentTitle:()=>l,default:()=>h,frontMatter:()=>c,metadata:()=>r,toc:()=>o});var n=i(1085),s=i(1184);const c={title:"Packet Viewer"},l=void 0,r={id:"tools/packet-viewer",title:"Packet Viewer",description:"Introduction",source:"@site/docs/tools/packet-viewer.md",sourceDirName:"tools",slug:"/tools/packet-viewer",permalink:"/tools/staticdocs/docs/tools/packet-viewer",draft:!1,unlisted:!1,editUrl:"https://github.com/OpenC3/cosmos/tree/main/docs.openc3.com/docs/tools/packet-viewer.md",tags:[],version:"current",frontMatter:{title:"Packet Viewer"},sidebar:"defaultSidebar",previous:{title:"Limits Monitor",permalink:"/tools/staticdocs/docs/tools/limits-monitor"},next:{title:"Script Runner",permalink:"/tools/staticdocs/docs/tools/script-runner"}},a={},o=[{value:"Introduction",id:"introduction",level:2},{value:"Packet Viewer Menus",id:"packet-viewer-menus",level:2},{value:"File Menu Items",id:"file-menu-items",level:3},{value:"View Menu Items",id:"view-menu-items",level:3},{value:"Selecting Packets",id:"selecting-packets",level:2},{value:"Details",id:"details",level:3}];function d(e){const t={a:"a",h2:"h2",h3:"h3",img:"img",li:"li",p:"p",ul:"ul",...(0,s.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.h2,{id:"introduction",children:"Introduction"}),"\n",(0,n.jsx)(t.p,{children:"Packet Viewer is a live telemetry viewer which requires no configuration to display the current values for all defined target, packet, items. Items with limits are displayed colored (blue, green, yellow, or red) according to their current state. Items can be right clicked to get detailed information."}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"Packet Viewer",src:i(5858).A+"",width:"1274",height:"837"})}),"\n",(0,n.jsx)(t.h2,{id:"packet-viewer-menus",children:"Packet Viewer Menus"}),"\n",(0,n.jsx)(t.h3,{id:"file-menu-items",children:"File Menu Items"}),"\n",(0,n.jsx)("img",{src:i(4141).A,alt:"File Menu",style:{float:"left","margin-right":"50px",height:"120px"}}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsx)(t.li,{children:"Change the refresh and stale interval"}),"\n",(0,n.jsx)(t.li,{children:"Opens a saved configuration"}),"\n",(0,n.jsx)(t.li,{children:"Save the current configuration (view settings)"}),"\n",(0,n.jsx)(t.li,{children:"Reset the configuration (default settings)"}),"\n"]}),"\n",(0,n.jsx)(t.h3,{id:"view-menu-items",children:"View Menu Items"}),"\n",(0,n.jsx)("img",{src:i(9270).A,alt:"View Menu",style:{float:"left","margin-right":"50px",height:"180px"}}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsxs)(t.li,{children:["Shows ",(0,n.jsx)(t.a,{href:"/tools/staticdocs/docs/configuration/target#ignore_item",children:"ignored items"})]}),"\n",(0,n.jsxs)(t.li,{children:["Display ",(0,n.jsx)(t.a,{href:"/tools/staticdocs/docs/configuration/telemetry#derived-items",children:"derived"})," items last"]}),"\n",(0,n.jsxs)(t.li,{children:["Display formatted items with ",(0,n.jsx)(t.a,{href:"../configuration/telemetry#units",children:"units"})]}),"\n",(0,n.jsxs)(t.li,{children:["Display ",(0,n.jsx)(t.a,{href:"../configuration/telemetry#format_string",children:"formatted"})," items"]}),"\n",(0,n.jsxs)(t.li,{children:["Display ",(0,n.jsx)(t.a,{href:"../configuration/telemetry#read_conversion",children:"converted"})," items"]}),"\n",(0,n.jsx)(t.li,{children:"Display raw items"}),"\n"]}),"\n",(0,n.jsx)(t.h2,{id:"selecting-packets",children:"Selecting Packets"}),"\n",(0,n.jsx)(t.p,{children:"Initially opening Packet Viewer will open the first alphabetical Target and Packet. Click the drop down menus to update the Items table to a new packet. To filter the list of items you can type in the search box."}),"\n",(0,n.jsx)(t.h3,{id:"details",children:"Details"}),"\n",(0,n.jsx)(t.p,{children:"Right-clicking an item and selecting Details will open the details dialog."}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"Details",src:i(8547).A+"",width:"591",height:"697"})}),"\n",(0,n.jsx)(t.p,{children:"This dialog lists everything defined on the telemetry item."})]})}function h(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(d,{...e})}):d(e)}},4141:(e,t,i)=>{i.d(t,{A:()=>n});const n=i.p+"assets/images/file_menu-d9ac5efbe78e58f024666452b9f28af72c6d09a3460fc7c0737c2bb74e4ea409.png"},9270:(e,t,i)=>{i.d(t,{A:()=>n});const n=i.p+"assets/images/view_menu-a02cfbd5e6fafa5d3b4f1ae76bfbd63f49388939b4732bf91709f48e44498d19.png"},5858:(e,t,i)=>{i.d(t,{A:()=>n});const n=i.p+"assets/images/packet_viewer-505c517c9a838a41d6fe668ff7ca2efb1b89ced4b75df638cd11a45484bc6533.png"},8547:(e,t,i)=>{i.d(t,{A:()=>n});const n=i.p+"assets/images/temp1_details-4c4bbe7c2d60e636f0304ee8ac7237af8db2bdba8666c9ae2dc0a105eca248f2.png"},1184:(e,t,i)=>{i.d(t,{R:()=>l,x:()=>r});var n=i(4041);const s={},c=n.createContext(s);function l(e){const t=n.useContext(c);return n.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(s):e.components||s:l(e.components),n.createElement(c.Provider,{value:t},e.children)}}}]);
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([[8150],{5716:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>c,contentTitle:()=>t,default:()=>p,frontMatter:()=>o,metadata:()=>l,toc:()=>a});var s=r(1085),i=r(1184);const o={title:"Raspberry Pi"},t=void 0,l={id:"guides/raspberrypi",title:"Raspberry Pi",description:"COSMOS Running on Raspberry Pi 4",source:"@site/docs/guides/raspberrypi.md",sourceDirName:"guides",slug:"/guides/raspberrypi",permalink:"/tools/staticdocs/docs/guides/raspberrypi",draft:!1,unlisted:!1,editUrl:"https://github.com/OpenC3/cosmos/tree/main/docs.openc3.com/docs/guides/raspberrypi.md",tags:[],version:"current",frontMatter:{title:"Raspberry Pi"},sidebar:"defaultSidebar",previous:{title:"Performance",permalink:"/tools/staticdocs/docs/guides/performance"},next:{title:"Script Writing Guide",permalink:"/tools/staticdocs/docs/guides/script-writing"}},c={},a=[{value:"COSMOS Running on Raspberry Pi 4",id:"cosmos-running-on-raspberry-pi-4",level:3}];function d(e){const n={a:"a",code:"code",h3:"h3",li:"li",ol:"ol",p:"p",pre:"pre",ul:"ul",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h3,{id:"cosmos-running-on-raspberry-pi-4",children:"COSMOS Running on Raspberry Pi 4"}),"\n",(0,s.jsx)(n.p,{children:"The Raspberry Pi 4 is a low-cost powerful ARM-based minicomputer that runs linux. And because it runs modern linux, it can also run COSMOS! These directions will get you up and running."}),"\n",(0,s.jsx)(n.p,{children:"What you'll need:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Raspberry Pi 4 board (tested with 8GB RAM)"}),"\n",(0,s.jsx)(n.li,{children:"A Pi Case but Optional"}),"\n",(0,s.jsx)(n.li,{children:"Raspbeerry Pi Power Supply"}),"\n",(0,s.jsx)(n.li,{children:"32GB or Larger SD Card - Also faster the better"}),"\n",(0,s.jsx)(n.li,{children:"A Laptop with a way to write SD Cards"}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"Let's get started!"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"Setup 64-bit Raspian OS Lite on the SD Card"}),"\n",(0,s.jsxs)(n.p,{children:["Make sure you have the Raspberry Pi Imager app from: ",(0,s.jsx)(n.a,{href:"https://www.raspberrypi.com/software/",children:"https://www.raspberrypi.com/software/"})]}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsx)(n.li,{children:"Insert the SD Card into your computer (Note this process will erase all data on the SD card!)"}),"\n",(0,s.jsx)(n.li,{children:"Open the Raspberry Pi Imager App"}),"\n",(0,s.jsx)(n.li,{children:'Click the "Choose Device" Button'}),"\n",(0,s.jsx)(n.li,{children:"Pick Your Raspberry Pi Model"}),"\n",(0,s.jsx)(n.li,{children:'Click the "Choose OS" Button'}),"\n",(0,s.jsx)(n.li,{children:'Select "Raspberry Pi OS (other)"'}),"\n",(0,s.jsx)(n.li,{children:'Select "Raspberry Pi OS Lite (64-bit)"'}),"\n",(0,s.jsx)(n.li,{children:'Click the "Choose Storage" Button'}),"\n",(0,s.jsx)(n.li,{children:"Select Your SD Card"}),"\n",(0,s.jsx)(n.li,{children:"Click Edit Settings"}),"\n",(0,s.jsx)(n.li,{children:"If prompted if you would like to prefill the Wifi information, select OK"}),"\n",(0,s.jsx)(n.li,{children:"Set the hostname to: cosmos.local"}),"\n",(0,s.jsx)(n.li,{children:"Set the username and password. The default username is your username, you should also set a password to make the system secure"}),"\n",(0,s.jsx)(n.li,{children:"Fill in your Wifi info, and set the country appropriately (ie. US)"}),"\n",(0,s.jsx)(n.li,{children:"Set the correct time zone"}),"\n",(0,s.jsx)(n.li,{children:"Goto the Services Tab and Enable SSH"}),"\n",(0,s.jsx)(n.li,{children:"You can either use Password auth, or public-key only if your computer is already setup for passwordless SSH"}),"\n",(0,s.jsx)(n.li,{children:'Goto the Options tab and make sure "Enable Telemetry" is not checked'}),"\n",(0,s.jsx)(n.li,{children:'Click "Save" when everything is filled out'}),"\n",(0,s.jsx)(n.li,{children:'Click "Yes" to apply OS Customization Settings, Yes to Are You Sure, and Wait for it to complete'}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"Make sure the Raspberry Pi is NOT powered on"}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"Remove the SD Card from your computer and insert into the Raspberry Pi"}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"Apply power to the Raspberry Pi and wait approximately 1 minute for it to boot"}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"SSH to your raspberry Pi"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"Open a terminal window and use ssh to connect to your Pi"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["On Mac / Linux: ssh ",(0,s.jsx)(n.a,{href:"mailto:yourusername@cosmos.local",children:"yourusername@cosmos.local"})]}),"\n",(0,s.jsx)(n.li,{children:"On Windows, use Putty to connect. You will probably have to install Bonjour for Windows for .local addresses to work as well."}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"From SSH, Enter the following commands"}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:" sudo sysctl -w vm.max_map_count=262144\n sudo sysctl -w vm.overcommit_memory=1\n sudo apt update\n sudo apt upgrade\n sudo apt install git -y\n curl -fsSL https://get.docker.com -o get-docker.sh\n sudo sh get-docker.sh\n sudo usermod -aG docker $USER\n newgrp docker\n git clone https://github.com/OpenC3/cosmos-project.git cosmos\n cd cosmos\n # Edit compose.yaml and remove 127.0.0.1: from the ports section of the openc3-traefik service\n ./openc3.sh run\n"})}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["After about 2 minutes, open a web browser on your computer, and goto: ",(0,s.jsx)(n.a,{href:"http://cosmos.local:2900",children:"http://cosmos.local:2900"})]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"Congratulations! You now have COSMOS running on a Raspberry Pi!"}),"\n"]}),"\n"]})]})}function p(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},1184:(e,n,r)=>{r.d(n,{R:()=>t,x:()=>l});var s=r(4041);const i={},o=s.createContext(i);function t(e){const n=s.useContext(o);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:t(e.components),s.createElement(o.Provider,{value:n},e.children)}}}]);
|
@@ -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});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])}}}]);
|
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)}}}]);
|