openc3-cosmos-tool-docs 5.16.2 → 5.17.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (160) hide show
  1. checksums.yaml +4 -4
  2. data/tools/staticdocs/404.html +4 -4
  3. data/tools/staticdocs/assets/js/{019369f3.3a124fd7.js → 019369f3.34291acc.js} +1 -1
  4. data/tools/staticdocs/assets/js/{058ffc22.c85ad785.js → 058ffc22.8d9049f4.js} +1 -1
  5. data/tools/staticdocs/assets/js/{0686a885.4d6b8154.js → 0686a885.dde7b18b.js} +1 -1
  6. data/tools/staticdocs/assets/js/{078dbab0.45ea4593.js → 078dbab0.b275e04c.js} +1 -1
  7. data/tools/staticdocs/assets/js/{0f5d161c.3dbf9f60.js → 0f5d161c.ca02c5b2.js} +1 -1
  8. data/tools/staticdocs/assets/js/{0ff569c9.317b47d0.js → 0ff569c9.ad025a56.js} +1 -1
  9. data/tools/staticdocs/assets/js/103cc3be.6b6cd0fa.js +1 -0
  10. data/tools/staticdocs/assets/js/{13196248.d8f8ef9f.js → 13196248.9e7794e3.js} +1 -1
  11. data/tools/staticdocs/assets/js/13c1b4e4.cec67b9c.js +1 -0
  12. data/tools/staticdocs/assets/js/{767ae34d.4ab04b1e.js → 1e02e6a3.e6ef8665.js} +1 -1
  13. data/tools/staticdocs/assets/js/{2047b354.75fe47dd.js → 2047b354.bdd2586a.js} +1 -1
  14. data/tools/staticdocs/assets/js/{22b3ac48.299bf4d6.js → 22b3ac48.0f4fbe9d.js} +1 -1
  15. data/tools/staticdocs/assets/js/{2bb7bf90.c642620c.js → 2bb7bf90.043455de.js} +1 -1
  16. data/tools/staticdocs/assets/js/{3dd7ef3b.f84c6956.js → 3dd7ef3b.c7c1d93f.js} +1 -1
  17. data/tools/staticdocs/assets/js/{40365d27.c318f801.js → 40365d27.7eb3f7b1.js} +1 -1
  18. data/tools/staticdocs/assets/js/{411898ad.f103f64b.js → 411898ad.d5f62a27.js} +1 -1
  19. data/tools/staticdocs/assets/js/{42170351.24db3d9a.js → 42170351.69a8ed02.js} +1 -1
  20. data/tools/staticdocs/assets/js/{43652efd.4e7d6a97.js → 43652efd.be2c1d02.js} +1 -1
  21. data/tools/staticdocs/assets/js/{54d0d530.769f5473.js → 54d0d530.28ba5be7.js} +1 -1
  22. data/tools/staticdocs/assets/js/5b233ba7.9c621552.js +1 -0
  23. data/tools/staticdocs/assets/js/{5bc719f6.84f6ce9e.js → 5bc719f6.7fa17221.js} +1 -1
  24. data/tools/staticdocs/assets/js/{5c6ce5ec.8667906a.js → 5c6ce5ec.5e6ca46b.js} +1 -1
  25. data/tools/staticdocs/assets/js/{5fe211ef.1d991947.js → 5fe211ef.71dc8326.js} +1 -1
  26. data/tools/staticdocs/assets/js/62df909c.906d9999.js +1 -0
  27. data/tools/staticdocs/assets/js/{d52d6961.1d15c902.js → 630e5448.6fea087c.js} +1 -1
  28. data/tools/staticdocs/assets/js/{6831b732.bbf2813b.js → 6831b732.5714d508.js} +1 -1
  29. data/tools/staticdocs/assets/js/696b4199.0335bd94.js +1 -0
  30. data/tools/staticdocs/assets/js/{6b210247.074332a1.js → 6b210247.2cbd59e6.js} +1 -1
  31. data/tools/staticdocs/assets/js/{6b65133b.109a6bef.js → 6b65133b.87dc7da6.js} +1 -1
  32. data/tools/staticdocs/assets/js/6f92e431.300a9857.js +1 -0
  33. data/tools/staticdocs/assets/js/{72c6d8a8.5fca8d68.js → 72c6d8a8.cfccace6.js} +1 -1
  34. data/tools/staticdocs/assets/js/75e64983.932fbc0e.js +1 -0
  35. data/tools/staticdocs/assets/js/{ca2c0ac4.adbecf86.js → 7f5b2696.60735273.js} +1 -1
  36. data/tools/staticdocs/assets/js/{867640d5.a8f59357.js → 867640d5.ffd4cf4c.js} +1 -1
  37. data/tools/staticdocs/assets/js/89e76475.97389cc5.js +1 -0
  38. data/tools/staticdocs/assets/js/{8f7843ee.0f25fdc3.js → 8f7843ee.d1ffd5ee.js} +1 -1
  39. data/tools/staticdocs/assets/js/9424f0b3.29299bde.js +1 -0
  40. data/tools/staticdocs/assets/js/{97535711.ddc0f5af.js → 97535711.fc45ced1.js} +1 -1
  41. data/tools/staticdocs/assets/js/{99581c43.0767018a.js → 99581c43.8e571df8.js} +1 -1
  42. data/tools/staticdocs/assets/js/{9fb6059a.30085d79.js → 9fb6059a.42881e94.js} +1 -1
  43. data/tools/staticdocs/assets/js/a507c363.04b98d2c.js +1 -0
  44. data/tools/staticdocs/assets/js/{a677c089.48b6c791.js → a677c089.b2928bac.js} +1 -1
  45. data/tools/staticdocs/assets/js/{a9987364.cfb3492e.js → a9987364.8f065f19.js} +1 -1
  46. data/tools/staticdocs/assets/js/{aa6b6c1b.a13cb467.js → aa6b6c1b.d78e5212.js} +1 -1
  47. data/tools/staticdocs/assets/js/{b4596165.b4c6c1b8.js → b4596165.6806d46b.js} +1 -1
  48. data/tools/staticdocs/assets/js/b6d70f94.f5514e8b.js +1 -0
  49. data/tools/staticdocs/assets/js/{b9f60ba6.655a4097.js → b9f60ba6.c3b3046d.js} +1 -1
  50. data/tools/staticdocs/assets/js/{bd0034eb.ff7f6265.js → bd0034eb.b4e3d6c1.js} +1 -1
  51. data/tools/staticdocs/assets/js/{c24eae19.98857ebf.js → c24eae19.6b084c7c.js} +1 -1
  52. data/tools/staticdocs/assets/js/{d394346f.e3f500eb.js → c2598f55.c5a1bac3.js} +1 -1
  53. data/tools/staticdocs/assets/js/{cb8c3f08.f669adda.js → cb8c3f08.a0ef4b5f.js} +1 -1
  54. data/tools/staticdocs/assets/js/{cd879be4.6ee752c7.js → cd879be4.6f19050a.js} +1 -1
  55. data/tools/staticdocs/assets/js/{eb3c311a.1b6ccdde.js → ce89ef36.aa518a52.js} +1 -1
  56. data/tools/staticdocs/assets/js/d1b923aa.3f3e186d.js +1 -0
  57. data/tools/staticdocs/assets/js/{d1bfc316.feddf1f3.js → d1bfc316.2d823a88.js} +1 -1
  58. data/tools/staticdocs/assets/js/{d24bf9b6.31d82456.js → d24bf9b6.53eca5e8.js} +1 -1
  59. data/tools/staticdocs/assets/js/{d57a4b5d.905988ec.js → d57a4b5d.aaa48891.js} +1 -1
  60. data/tools/staticdocs/assets/js/d5d77c37.be6fe7b6.js +1 -0
  61. data/tools/staticdocs/assets/js/{d8ca4191.56c22a69.js → d8ca4191.c6632184.js} +1 -1
  62. data/tools/staticdocs/assets/js/{d9b92eba.16d983a0.js → d9b92eba.c6a2c7e5.js} +1 -1
  63. data/tools/staticdocs/assets/js/{db8fa1d0.c35b153c.js → db8fa1d0.f078bc02.js} +1 -1
  64. data/tools/staticdocs/assets/js/dc5f7beb.a4afe7cd.js +1 -0
  65. data/tools/staticdocs/assets/js/{adf499b4.f7df5738.js → dfbae5fd.d1484e14.js} +1 -1
  66. data/tools/staticdocs/assets/js/{e501b0d1.3aa571ae.js → e501b0d1.d108a8a9.js} +1 -1
  67. data/tools/staticdocs/assets/js/{ebec1ccb.a801549e.js → ebec1ccb.1ded1149.js} +1 -1
  68. data/tools/staticdocs/assets/js/{f15615f1.0a240e68.js → f15615f1.f9b655a6.js} +1 -1
  69. data/tools/staticdocs/assets/js/fd886806.a21dd400.js +1 -0
  70. data/tools/staticdocs/assets/js/main.c2e2b617.js +2 -0
  71. data/tools/staticdocs/assets/js/runtime~main.2bb31799.js +1 -0
  72. data/tools/staticdocs/docs/configuration/command.html +6 -6
  73. data/tools/staticdocs/docs/configuration/format.html +5 -5
  74. data/tools/staticdocs/docs/configuration/interfaces.html +5 -5
  75. data/tools/staticdocs/docs/configuration/plugins.html +5 -5
  76. data/tools/staticdocs/docs/configuration/protocols.html +5 -5
  77. data/tools/staticdocs/docs/configuration/ssl-tls.html +5 -5
  78. data/tools/staticdocs/docs/configuration/table.html +5 -5
  79. data/tools/staticdocs/docs/configuration/target.html +5 -5
  80. data/tools/staticdocs/docs/configuration/telemetry-screens.html +18 -5
  81. data/tools/staticdocs/docs/configuration/telemetry.html +5 -5
  82. data/tools/staticdocs/docs/configuration.html +4 -4
  83. data/tools/staticdocs/docs/development/curl.html +5 -5
  84. data/tools/staticdocs/docs/development/developing.html +5 -5
  85. data/tools/staticdocs/docs/development/host-install.html +5 -5
  86. data/tools/staticdocs/docs/development/json-api.html +5 -5
  87. data/tools/staticdocs/docs/development/log-structure.html +5 -5
  88. data/tools/staticdocs/docs/development/roadmap.html +5 -5
  89. data/tools/staticdocs/docs/development/streaming-api.html +4 -4
  90. data/tools/staticdocs/docs/development/testing.html +5 -5
  91. data/tools/staticdocs/docs/development.html +4 -4
  92. data/tools/staticdocs/docs/getting-started/generators.html +5 -5
  93. data/tools/staticdocs/docs/getting-started/gettingstarted.html +5 -5
  94. data/tools/staticdocs/docs/getting-started/installation.html +6 -6
  95. data/tools/staticdocs/docs/getting-started/key_concepts.html +5 -5
  96. data/tools/staticdocs/docs/getting-started/podman.html +5 -5
  97. data/tools/staticdocs/docs/getting-started/requirements.html +5 -5
  98. data/tools/staticdocs/docs/getting-started/upgrading.html +5 -5
  99. data/tools/staticdocs/docs/getting-started.html +4 -4
  100. data/tools/staticdocs/docs/guides/bridges.html +5 -5
  101. data/tools/staticdocs/docs/guides/cfs.html +5 -5
  102. data/tools/staticdocs/docs/guides/custom-widgets.html +5 -5
  103. data/tools/staticdocs/docs/guides/little-endian-bitfields.html +4 -4
  104. data/tools/staticdocs/docs/guides/local-mode.html +5 -5
  105. data/tools/staticdocs/docs/guides/logging.html +5 -5
  106. data/tools/staticdocs/docs/guides/monitoring.html +5 -5
  107. data/tools/staticdocs/docs/guides/performance.html +5 -5
  108. data/tools/staticdocs/docs/guides/raspberrypi.html +5 -5
  109. data/tools/staticdocs/docs/guides/script-writing.html +5 -5
  110. data/tools/staticdocs/docs/guides/scripting-api.html +5 -5
  111. data/tools/staticdocs/docs/guides.html +4 -4
  112. data/tools/staticdocs/docs/meta/contributing.html +5 -5
  113. data/tools/staticdocs/docs/meta/licenses.html +5 -5
  114. data/tools/staticdocs/docs/meta/philosophy.html +4 -4
  115. data/tools/staticdocs/docs/meta/xtce.html +5 -5
  116. data/tools/staticdocs/docs/meta.html +4 -4
  117. data/tools/staticdocs/docs/privacy.html +5 -5
  118. data/tools/staticdocs/docs/tools/autonomic.html +5 -5
  119. data/tools/staticdocs/docs/tools/bucket-explorer.html +5 -5
  120. data/tools/staticdocs/docs/tools/calendar.html +5 -5
  121. data/tools/staticdocs/docs/tools/cmd-sender.html +5 -5
  122. data/tools/staticdocs/docs/tools/cmd-tlm-server.html +5 -5
  123. data/tools/staticdocs/docs/tools/data-extractor.html +5 -5
  124. data/tools/staticdocs/docs/tools/data-viewer.html +5 -5
  125. data/tools/staticdocs/docs/tools/handbooks.html +5 -5
  126. data/tools/staticdocs/docs/tools/limits-monitor.html +5 -5
  127. data/tools/staticdocs/docs/tools/packet-viewer.html +5 -5
  128. data/tools/staticdocs/docs/tools/script-runner.html +5 -5
  129. data/tools/staticdocs/docs/tools/table-manager.html +5 -5
  130. data/tools/staticdocs/docs/tools/tlm-grapher.html +5 -5
  131. data/tools/staticdocs/docs/tools/tlm-viewer.html +5 -5
  132. data/tools/staticdocs/docs/tools.html +4 -4
  133. data/tools/staticdocs/docs.html +5 -5
  134. data/tools/staticdocs/index.html +4 -4
  135. data/tools/staticdocs/lunr-index-1719505302032.json +1 -0
  136. data/tools/staticdocs/lunr-index.json +1 -1
  137. data/tools/staticdocs/markdown-page.html +4 -4
  138. data/tools/staticdocs/search-doc-1719505302032.json +1 -0
  139. data/tools/staticdocs/search-doc.json +1 -1
  140. metadata +74 -74
  141. data/tools/staticdocs/assets/js/103cc3be.a946540f.js +0 -1
  142. data/tools/staticdocs/assets/js/13c1b4e4.50ee3d02.js +0 -1
  143. data/tools/staticdocs/assets/js/3b6e6f8d.3eef0a1d.js +0 -1
  144. data/tools/staticdocs/assets/js/5b233ba7.0029b2f5.js +0 -1
  145. data/tools/staticdocs/assets/js/696b4199.2700ad91.js +0 -1
  146. data/tools/staticdocs/assets/js/6f92e431.67f5a7a4.js +0 -1
  147. data/tools/staticdocs/assets/js/75e64983.e31793e1.js +0 -1
  148. data/tools/staticdocs/assets/js/89e76475.de702714.js +0 -1
  149. data/tools/staticdocs/assets/js/9424f0b3.b24d0393.js +0 -1
  150. data/tools/staticdocs/assets/js/a507c363.198e9246.js +0 -1
  151. data/tools/staticdocs/assets/js/b6d70f94.20a403bf.js +0 -1
  152. data/tools/staticdocs/assets/js/d1b923aa.dcb1dede.js +0 -1
  153. data/tools/staticdocs/assets/js/d5d77c37.80e1a28b.js +0 -1
  154. data/tools/staticdocs/assets/js/dc5f7beb.291f4b91.js +0 -1
  155. data/tools/staticdocs/assets/js/fd886806.dc7cdf8e.js +0 -1
  156. data/tools/staticdocs/assets/js/main.eec2a1b0.js +0 -2
  157. data/tools/staticdocs/assets/js/runtime~main.14022dc5.js +0 -1
  158. data/tools/staticdocs/lunr-index-1716490741709.json +0 -1
  159. data/tools/staticdocs/search-doc-1716490741709.json +0 -1
  160. /data/tools/staticdocs/assets/js/{main.eec2a1b0.js.LICENSE.txt → main.c2e2b617.js.LICENSE.txt} +0 -0
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([[9280],{5498:e=>{e.exports=JSON.parse('{"version":{"pluginId":"default","version":"current","label":"Next","banner":null,"badge":false,"noIndex":false,"className":"docs-version-current","isLast":true,"docsSidebars":{"defaultSidebar":[{"type":"link","label":"Introduction","href":"/tools/staticdocs/docs/","docId":"introduction","unlisted":false},{"type":"category","label":"Getting Started","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Installation","href":"/tools/staticdocs/docs/getting-started/installation","docId":"getting-started/installation","unlisted":false},{"type":"link","label":"Getting Started","href":"/tools/staticdocs/docs/getting-started/gettingstarted","docId":"getting-started/gettingstarted","unlisted":false},{"type":"link","label":"Code Generators","href":"/tools/staticdocs/docs/getting-started/generators","docId":"getting-started/generators","unlisted":false},{"type":"link","label":"Upgrading","href":"/tools/staticdocs/docs/getting-started/upgrading","docId":"getting-started/upgrading","unlisted":false},{"type":"link","label":"Key Concepts","href":"/tools/staticdocs/docs/getting-started/key_concepts","docId":"getting-started/key_concepts","unlisted":false},{"type":"link","label":"Requirements and Design","href":"/tools/staticdocs/docs/getting-started/requirements","docId":"getting-started/requirements","unlisted":false},{"type":"link","label":"Podman","href":"/tools/staticdocs/docs/getting-started/podman","docId":"getting-started/podman","unlisted":false}],"href":"/tools/staticdocs/docs/getting-started"},{"type":"category","label":"Configuration","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"File Format","href":"/tools/staticdocs/docs/configuration/format","docId":"configuration/format","unlisted":false},{"type":"link","label":"Plugins","href":"/tools/staticdocs/docs/configuration/plugins","docId":"configuration/plugins","unlisted":false},{"type":"link","label":"Targets","href":"/tools/staticdocs/docs/configuration/target","docId":"configuration/target","unlisted":false},{"type":"link","label":"Commands","href":"/tools/staticdocs/docs/configuration/command","docId":"configuration/command","unlisted":false},{"type":"link","label":"Telemetry","href":"/tools/staticdocs/docs/configuration/telemetry","docId":"configuration/telemetry","unlisted":false},{"type":"link","label":"Interfaces","href":"/tools/staticdocs/docs/configuration/interfaces","docId":"configuration/interfaces","unlisted":false},{"type":"link","label":"Protocols","href":"/tools/staticdocs/docs/configuration/protocols","docId":"configuration/protocols","unlisted":false},{"type":"link","label":"Tables","href":"/tools/staticdocs/docs/configuration/table","docId":"configuration/table","unlisted":false},{"type":"link","label":"Screens","href":"/tools/staticdocs/docs/configuration/telemetry-screens","docId":"configuration/telemetry-screens","unlisted":false},{"type":"link","label":"SSL-TLS","href":"/tools/staticdocs/docs/configuration/ssl-tls","docId":"configuration/ssl-tls","unlisted":false}],"href":"/tools/staticdocs/docs/configuration"},{"type":"category","label":"Tools","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Autonomic (Enterprise)","href":"/tools/staticdocs/docs/tools/autonomic","docId":"tools/autonomic","unlisted":false},{"type":"link","label":"Bucket Explorer","href":"/tools/staticdocs/docs/tools/bucket-explorer","docId":"tools/bucket-explorer","unlisted":false},{"type":"link","label":"Calendar (Enterprise)","href":"/tools/staticdocs/docs/tools/calendar","docId":"tools/calendar","unlisted":false},{"type":"link","label":"Command Sender","href":"/tools/staticdocs/docs/tools/cmd-sender","docId":"tools/cmd-sender","unlisted":false},{"type":"link","label":"Command and Telemetry Server","href":"/tools/staticdocs/docs/tools/cmd-tlm-server","docId":"tools/cmd-tlm-server","unlisted":false},{"type":"link","label":"Data Extractor","href":"/tools/staticdocs/docs/tools/data-extractor","docId":"tools/data-extractor","unlisted":false},{"type":"link","label":"Data Viewer","href":"/tools/staticdocs/docs/tools/data-viewer","docId":"tools/data-viewer","unlisted":false},{"type":"link","label":"Handbooks","href":"/tools/staticdocs/docs/tools/handbooks","docId":"tools/handbooks","unlisted":false},{"type":"link","label":"Limits Monitor","href":"/tools/staticdocs/docs/tools/limits-monitor","docId":"tools/limits-monitor","unlisted":false},{"type":"link","label":"Packet Viewer","href":"/tools/staticdocs/docs/tools/packet-viewer","docId":"tools/packet-viewer","unlisted":false},{"type":"link","label":"Script Runner","href":"/tools/staticdocs/docs/tools/script-runner","docId":"tools/script-runner","unlisted":false},{"type":"link","label":"Table Manager","href":"/tools/staticdocs/docs/tools/table-manager","docId":"tools/table-manager","unlisted":false},{"type":"link","label":"Telemetry Grapher","href":"/tools/staticdocs/docs/tools/tlm-grapher","docId":"tools/tlm-grapher","unlisted":false},{"type":"link","label":"Telemetry Viewer","href":"/tools/staticdocs/docs/tools/tlm-viewer","docId":"tools/tlm-viewer","unlisted":false}],"href":"/tools/staticdocs/docs/tools"},{"type":"category","label":"Guides","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Bridges","href":"/tools/staticdocs/docs/guides/bridges","docId":"guides/bridges","unlisted":false},{"type":"link","label":"COSMOS and NASA cFS","href":"/tools/staticdocs/docs/guides/cfs","docId":"guides/cfs","unlisted":false},{"type":"link","label":"Custom Widgets","href":"/tools/staticdocs/docs/guides/custom-widgets","docId":"guides/custom-widgets","unlisted":false},{"type":"link","label":"Little Endian Bitfields","href":"/tools/staticdocs/docs/guides/little-endian-bitfields","docId":"guides/little-endian-bitfields","unlisted":false},{"type":"link","label":"Local Mode","href":"/tools/staticdocs/docs/guides/local-mode","docId":"guides/local-mode","unlisted":false},{"type":"link","label":"Logging","href":"/tools/staticdocs/docs/guides/logging","docId":"guides/logging","unlisted":false},{"type":"link","label":"Monitoring","href":"/tools/staticdocs/docs/guides/monitoring","docId":"guides/monitoring","unlisted":false},{"type":"link","label":"Performance","href":"/tools/staticdocs/docs/guides/performance","docId":"guides/performance","unlisted":false},{"type":"link","label":"Raspberry Pi","href":"/tools/staticdocs/docs/guides/raspberrypi","docId":"guides/raspberrypi","unlisted":false},{"type":"link","label":"Script Writing Guide","href":"/tools/staticdocs/docs/guides/script-writing","docId":"guides/script-writing","unlisted":false},{"type":"link","label":"Scripting API Guide","href":"/tools/staticdocs/docs/guides/scripting-api","docId":"guides/scripting-api","unlisted":false}],"href":"/tools/staticdocs/docs/guides"},{"type":"category","label":"Development","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Testing with Curl","href":"/tools/staticdocs/docs/development/curl","docId":"development/curl","unlisted":false},{"type":"link","label":"Developing COSMOS","href":"/tools/staticdocs/docs/development/developing","docId":"development/developing","unlisted":false},{"type":"link","label":"Host Install","href":"/tools/staticdocs/docs/development/host-install","docId":"development/host-install","unlisted":false},{"type":"link","label":"JSON API","href":"/tools/staticdocs/docs/development/json-api","docId":"development/json-api","unlisted":false},{"type":"link","label":"Log Structure","href":"/tools/staticdocs/docs/development/log-structure","docId":"development/log-structure","unlisted":false},{"type":"link","label":"Roadmap","href":"/tools/staticdocs/docs/development/roadmap","docId":"development/roadmap","unlisted":false},{"type":"link","label":"Streaming API","href":"/tools/staticdocs/docs/development/streaming-api","docId":"development/streaming-api","unlisted":false},{"type":"link","label":"Testing COSMOS","href":"/tools/staticdocs/docs/development/testing","docId":"development/testing","unlisted":false}],"href":"/tools/staticdocs/docs/development"},{"type":"category","label":"Meta","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Contributing","href":"/tools/staticdocs/docs/meta/contributing","docId":"meta/contributing","unlisted":false},{"type":"link","label":"Understanding Licenses","href":"/tools/staticdocs/docs/meta/licenses","docId":"meta/licenses","unlisted":false},{"type":"link","label":"Philosophy","href":"/tools/staticdocs/docs/meta/philosophy","docId":"meta/philosophy","unlisted":false},{"type":"link","label":"XTCE Support","href":"/tools/staticdocs/docs/meta/xtce","docId":"meta/xtce","unlisted":false}],"href":"/tools/staticdocs/docs/meta"},{"type":"link","label":"OpenC3, Inc. Privacy Policy","href":"/tools/staticdocs/docs/privacy","docId":"privacy","unlisted":false}]},"docs":{"configuration/command":{"id":"configuration/command","title":"Commands","description":"Command Definition Files","sidebar":"defaultSidebar"},"configuration/format":{"id":"configuration/format","title":"File Format","description":"COSMOS configuration files are just text files. They can (and should) be checked into your configuration management system and thus can be easily diffed throughout their history. They support ERB syntax, partials, and various line continuations which make them extremely flexible.","sidebar":"defaultSidebar"},"configuration/interfaces":{"id":"configuration/interfaces","title":"Interfaces","description":"Interfaces are the connection to the external embedded systems called targets. Interfaces are defined by the top level INTERFACE keyword in the plugin.txt file.","sidebar":"defaultSidebar"},"configuration/plugins":{"id":"configuration/plugins","title":"Plugins","description":"Introduction","sidebar":"defaultSidebar"},"configuration/protocols":{"id":"configuration/protocols","title":"Protocols","description":"Protocols process data on behalf of an Interface. They can modify the data being written, data being read, or both. Protocols can also mark a packet as stored instead of real-time which means COSMOS will not update the current value table with the packet data. Protocols can be layered and will be processed in order. For example, if you have a low-level encryption layer that must be first removed before processing a higher level buffer length protocol.","sidebar":"defaultSidebar"},"configuration/ssl-tls":{"id":"configuration/ssl-tls","title":"SSL-TLS","description":"COSMOS 5 is a container based service which does not use SSL/TLS out of the box. This guide will help you configure SSL and TLS. Learn more at the Traefik docs.","sidebar":"defaultSidebar"},"configuration/table":{"id":"configuration/table","title":"Tables","description":"Table Definition Files","sidebar":"defaultSidebar"},"configuration/target":{"id":"configuration/target","title":"Targets","description":"Targets are the external embedded systems that COSMOS connects to. Targets are defined by the top level TARGET keyword in the plugin.txt file. Each target is self contained in a target directory named after the target. In the root of the target directory there is a configuration file named target.txt which configures the individual target.","sidebar":"defaultSidebar"},"configuration/telemetry":{"id":"configuration/telemetry","title":"Telemetry","description":"Telemetry Definition Files","sidebar":"defaultSidebar"},"configuration/telemetry-screens":{"id":"configuration/telemetry-screens","title":"Screens","description":"This document provides the information necessary to generate and use COSMOS Telemetry Screens, which are displayed by the COSMOS Telemetry Viewer application.","sidebar":"defaultSidebar"},"development/curl":{"id":"development/curl","title":"Testing with Curl","description":"This information is just generally used behind the scenes in COSMOS tools","sidebar":"defaultSidebar"},"development/developing":{"id":"development/developing","title":"Developing COSMOS","description":"So you want to help develop COSMOS? All of our open source COSMOS code is on Github so the first thing to do is get an account. Next clone the COSMOS repository. We accept contributions from others as Pull Requests.","sidebar":"defaultSidebar"},"development/host-install":{"id":"development/host-install","title":"Host Install","description":"Installing COSMOS Directly onto a Host (No Containers)","sidebar":"defaultSidebar"},"development/json-api":{"id":"development/json-api","title":"JSON API","description":"If you\'re looking for the methods available to write test procedures using the COSMOS scripting API, refer to the Scripting API Guide page. If you\'re trying to interface to a COSMOS Command and Telemetry Server from an external application using any language then this is the right place.","sidebar":"defaultSidebar"},"development/log-structure":{"id":"development/log-structure","title":"Log Structure","description":"Updated: 8-21-2023 to the format as of OpenC3 COSMOS 5.11.0","sidebar":"defaultSidebar"},"development/roadmap":{"id":"development/roadmap","title":"Roadmap","description":"Key Features Still to Come in OpenC3 COSMOS 5.x:","sidebar":"defaultSidebar"},"development/streaming-api":{"id":"development/streaming-api","title":"Streaming API","description":"This information is just generally used behind the scenes in COSMOS tools","sidebar":"defaultSidebar"},"development/testing":{"id":"development/testing","title":"Testing COSMOS","description":"Playwright","sidebar":"defaultSidebar"},"getting-started/generators":{"id":"getting-started/generators","title":"Code Generators","description":"The COSMOS Code Generators are built into the scripts openc3.sh and openc3.bat that are included in the COSMOS project (more about projects).","sidebar":"defaultSidebar"},"getting-started/gettingstarted":{"id":"getting-started/gettingstarted","title":"Getting Started","description":"Welcome to the OpenC3 COSMOS system... Let\'s get started! This guide is a high level overview that will help with setting up your first COSMOS project.","sidebar":"defaultSidebar"},"getting-started/installation":{"id":"getting-started/installation","title":"Installation","description":"Installing OpenC3 COSMOS","sidebar":"defaultSidebar"},"getting-started/key_concepts":{"id":"getting-started/key_concepts","title":"Key Concepts","description":"Projects","sidebar":"defaultSidebar"},"getting-started/podman":{"id":"getting-started/podman","title":"Podman","description":"OpenC3 COSMOS Using Rootless Podman and Docker-Compose","sidebar":"defaultSidebar"},"getting-started/requirements":{"id":"getting-started/requirements","title":"Requirements and Design","description":"OpenC3 COSMOS is a command and control system providing commanding, scripting, and data visualization capabilities for embedded systems and systems of systems. COSMOS is intended for use during all phases of testing (board, box, integrated system) and during operations.","sidebar":"defaultSidebar"},"getting-started/upgrading":{"id":"getting-started/upgrading","title":"Upgrading","description":"COSMOS Upgrades","sidebar":"defaultSidebar"},"guides/bridges":{"id":"guides/bridges","title":"Bridges","description":"COSMOS Bridges provide an easy solution for getting data from devices that don\'t speak Ethernet into COSMOS.","sidebar":"defaultSidebar"},"guides/cfs":{"id":"guides/cfs","title":"COSMOS and NASA cFS","description":"Working configuration","sidebar":"defaultSidebar"},"guides/custom-widgets":{"id":"guides/custom-widgets","title":"Custom Widgets","description":"COSMOS allows you to build custom widgets which can be deployed with your plugin and used in Telemetry Viewer. Building custom widgets can utilitize any javascript frameworks but since COSMOS is written with Vue.js, we will use that framework in this tutorial. Please see the Widget Generator guide for information about generating the scaffolding for a custom widget.","sidebar":"defaultSidebar"},"guides/little-endian-bitfields":{"id":"guides/little-endian-bitfields","title":"Little Endian Bitfields","description":"Defining little endian bitfields is a little weird but is possible in COSMOS. However, note that APPEND does not work with little endian bitfields.","sidebar":"defaultSidebar"},"guides/local-mode":{"id":"guides/local-mode","title":"Local Mode","description":"Local Mode is a new feature in the 5.0.9 COSMOS release. It is intended to capture the configuration of an edited plugin so it can be configuration managed. It allows you to edit portions of a plugin (scripts and screens) locally in the editor of your choice and instantly have those changes appear in the COSMOS plugin. This avoids the plugin build / install cycle which is required when editing command and telemetry or interface definitions.","sidebar":"defaultSidebar"},"guides/logging":{"id":"guides/logging","title":"Logging","description":"The COSMOS Bucket Explorer tool provides a way to browse the COSMOS bucket storage backend whether you are running locally or in a cloud environment. Browse to http2900/tools/bucketexplorer and you should see the list of buckets at the top:","sidebar":"defaultSidebar"},"guides/monitoring":{"id":"guides/monitoring","title":"Monitoring","description":"Monitoring and observability","sidebar":"defaultSidebar"},"guides/performance":{"id":"guides/performance","title":"Performance","description":"The COSMOS architecture was created with scalability in mind. Our goal is to support an unlimited number of connections and use cloud technologies to scale. Only COSMOS Enterprise Edition supports Kubernetes and the various cloud platforms which allow this level of scalability. While true scalability is only achieved in COSMOS Enterprise, both Open Source and Enterprise have various levels of observability and configuration settings which can affect performance.","sidebar":"defaultSidebar"},"guides/raspberrypi":{"id":"guides/raspberrypi","title":"Raspberry Pi","description":"COSMOS Running on Raspberry Pi 4","sidebar":"defaultSidebar"},"guides/script-writing":{"id":"guides/script-writing","title":"Script Writing Guide","description":"Introduction","sidebar":"defaultSidebar"},"guides/scripting-api":{"id":"guides/scripting-api","title":"Scripting API Guide","description":"This document provides the information necessary to write test procedures using the COSMOS scripting API. Scripting in COSMOS is designed to be simple and intuitive. The code completion ability for command and telemetry mnemonics makes Script Runner the ideal place to write your procedures, however any text editor will do. If there is functionality that you don\'t see here or perhaps an easier syntax for doing something, please submit a ticket.","sidebar":"defaultSidebar"},"introduction":{"id":"introduction","title":"Introduction","description":"This site aims to be a comprehensive guide to OpenC3 COSMOS. We\'ll cover topics such","sidebar":"defaultSidebar"},"meta/contributing":{"id":"meta/contributing","title":"Contributing","description":"So you\'ve got an awesome idea to throw into COSMOS. Great! This is the basic process:","sidebar":"defaultSidebar"},"meta/licenses":{"id":"meta/licenses","title":"Understanding Licenses","description":"OpenC3 COSMOS is offered under a tri-licensing model allowing users to choose between the following three options:","sidebar":"defaultSidebar"},"meta/philosophy":{"id":"meta/philosophy","title":"Philosophy","description":"COSMOS is a C3 (Command, Control and Communication) system with the following primary goals:","sidebar":"defaultSidebar"},"meta/xtce":{"id":"meta/xtce","title":"XTCE Support","description":"COSMOS now has support for the XTCE Command and Telemetry Definition Standard. This is an open standard designed to allow command and telemetry definitions to be transferred between different ground systems. COSMOS can run directly using the .xtce files, or can convert them into the COSMOS configuration file format.","sidebar":"defaultSidebar"},"privacy":{"id":"privacy","title":"OpenC3, Inc. Privacy Policy","description":"OpenC3 Inc. is strongly committed to protecting your privacy and complying with your choices. Both personal and non-personal information collected is safeguarded according to the highest privacy and data protection standards adopted worldwide. We have always had a robust and effective data protection program in place which complies with existing law and abides by the data protection principles. However, we recognise our obligations in updating and expanding this program to meet the demands of the GDPR.","sidebar":"defaultSidebar"},"tools/autonomic":{"id":"tools/autonomic","title":"Autonomic (Enterprise)","description":"Introduction","sidebar":"defaultSidebar"},"tools/bucket-explorer":{"id":"tools/bucket-explorer","title":"Bucket Explorer","description":"Introduction","sidebar":"defaultSidebar"},"tools/calendar":{"id":"tools/calendar","title":"Calendar (Enterprise)","description":"Introduction","sidebar":"defaultSidebar"},"tools/cmd-sender":{"id":"tools/cmd-sender","title":"Command Sender","description":"Introduction","sidebar":"defaultSidebar"},"tools/cmd-tlm-server":{"id":"tools/cmd-tlm-server","title":"Command and Telemetry Server","description":"Introduction","sidebar":"defaultSidebar"},"tools/data-extractor":{"id":"tools/data-extractor","title":"Data Extractor","description":"Introduction","sidebar":"defaultSidebar"},"tools/data-viewer":{"id":"tools/data-viewer","title":"Data Viewer","description":"Introduction","sidebar":"defaultSidebar"},"tools/handbooks":{"id":"tools/handbooks","title":"Handbooks","description":"Introduction","sidebar":"defaultSidebar"},"tools/limits-monitor":{"id":"tools/limits-monitor","title":"Limits Monitor","description":"Introduction","sidebar":"defaultSidebar"},"tools/packet-viewer":{"id":"tools/packet-viewer","title":"Packet Viewer","description":"Introduction","sidebar":"defaultSidebar"},"tools/script-runner":{"id":"tools/script-runner","title":"Script Runner","description":"Introduction","sidebar":"defaultSidebar"},"tools/table-manager":{"id":"tools/table-manager","title":"Table Manager","description":"Introduction","sidebar":"defaultSidebar"},"tools/tlm-grapher":{"id":"tools/tlm-grapher","title":"Telemetry Grapher","description":"Introductions","sidebar":"defaultSidebar"},"tools/tlm-viewer":{"id":"tools/tlm-viewer","title":"Telemetry Viewer","description":"Introduction","sidebar":"defaultSidebar"}}}}')}}]);
1
+ "use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([[9638],{7655:e=>{e.exports=JSON.parse('{"version":{"pluginId":"default","version":"current","label":"Next","banner":null,"badge":false,"noIndex":false,"className":"docs-version-current","isLast":true,"docsSidebars":{"defaultSidebar":[{"type":"link","label":"Introduction","href":"/tools/staticdocs/docs/","docId":"introduction","unlisted":false},{"type":"category","label":"Getting Started","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Installation","href":"/tools/staticdocs/docs/getting-started/installation","docId":"getting-started/installation","unlisted":false},{"type":"link","label":"Getting Started","href":"/tools/staticdocs/docs/getting-started/gettingstarted","docId":"getting-started/gettingstarted","unlisted":false},{"type":"link","label":"Code Generators","href":"/tools/staticdocs/docs/getting-started/generators","docId":"getting-started/generators","unlisted":false},{"type":"link","label":"Upgrading","href":"/tools/staticdocs/docs/getting-started/upgrading","docId":"getting-started/upgrading","unlisted":false},{"type":"link","label":"Key Concepts","href":"/tools/staticdocs/docs/getting-started/key_concepts","docId":"getting-started/key_concepts","unlisted":false},{"type":"link","label":"Requirements and Design","href":"/tools/staticdocs/docs/getting-started/requirements","docId":"getting-started/requirements","unlisted":false},{"type":"link","label":"Podman","href":"/tools/staticdocs/docs/getting-started/podman","docId":"getting-started/podman","unlisted":false}],"href":"/tools/staticdocs/docs/getting-started"},{"type":"category","label":"Configuration","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"File Format","href":"/tools/staticdocs/docs/configuration/format","docId":"configuration/format","unlisted":false},{"type":"link","label":"Plugins","href":"/tools/staticdocs/docs/configuration/plugins","docId":"configuration/plugins","unlisted":false},{"type":"link","label":"Targets","href":"/tools/staticdocs/docs/configuration/target","docId":"configuration/target","unlisted":false},{"type":"link","label":"Commands","href":"/tools/staticdocs/docs/configuration/command","docId":"configuration/command","unlisted":false},{"type":"link","label":"Telemetry","href":"/tools/staticdocs/docs/configuration/telemetry","docId":"configuration/telemetry","unlisted":false},{"type":"link","label":"Interfaces","href":"/tools/staticdocs/docs/configuration/interfaces","docId":"configuration/interfaces","unlisted":false},{"type":"link","label":"Protocols","href":"/tools/staticdocs/docs/configuration/protocols","docId":"configuration/protocols","unlisted":false},{"type":"link","label":"Tables","href":"/tools/staticdocs/docs/configuration/table","docId":"configuration/table","unlisted":false},{"type":"link","label":"Screens","href":"/tools/staticdocs/docs/configuration/telemetry-screens","docId":"configuration/telemetry-screens","unlisted":false},{"type":"link","label":"SSL-TLS","href":"/tools/staticdocs/docs/configuration/ssl-tls","docId":"configuration/ssl-tls","unlisted":false}],"href":"/tools/staticdocs/docs/configuration"},{"type":"category","label":"Tools","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Autonomic (Enterprise)","href":"/tools/staticdocs/docs/tools/autonomic","docId":"tools/autonomic","unlisted":false},{"type":"link","label":"Bucket Explorer","href":"/tools/staticdocs/docs/tools/bucket-explorer","docId":"tools/bucket-explorer","unlisted":false},{"type":"link","label":"Calendar (Enterprise)","href":"/tools/staticdocs/docs/tools/calendar","docId":"tools/calendar","unlisted":false},{"type":"link","label":"Command Sender","href":"/tools/staticdocs/docs/tools/cmd-sender","docId":"tools/cmd-sender","unlisted":false},{"type":"link","label":"Command and Telemetry Server","href":"/tools/staticdocs/docs/tools/cmd-tlm-server","docId":"tools/cmd-tlm-server","unlisted":false},{"type":"link","label":"Data Extractor","href":"/tools/staticdocs/docs/tools/data-extractor","docId":"tools/data-extractor","unlisted":false},{"type":"link","label":"Data Viewer","href":"/tools/staticdocs/docs/tools/data-viewer","docId":"tools/data-viewer","unlisted":false},{"type":"link","label":"Handbooks","href":"/tools/staticdocs/docs/tools/handbooks","docId":"tools/handbooks","unlisted":false},{"type":"link","label":"Limits Monitor","href":"/tools/staticdocs/docs/tools/limits-monitor","docId":"tools/limits-monitor","unlisted":false},{"type":"link","label":"Packet Viewer","href":"/tools/staticdocs/docs/tools/packet-viewer","docId":"tools/packet-viewer","unlisted":false},{"type":"link","label":"Script Runner","href":"/tools/staticdocs/docs/tools/script-runner","docId":"tools/script-runner","unlisted":false},{"type":"link","label":"Table Manager","href":"/tools/staticdocs/docs/tools/table-manager","docId":"tools/table-manager","unlisted":false},{"type":"link","label":"Telemetry Grapher","href":"/tools/staticdocs/docs/tools/tlm-grapher","docId":"tools/tlm-grapher","unlisted":false},{"type":"link","label":"Telemetry Viewer","href":"/tools/staticdocs/docs/tools/tlm-viewer","docId":"tools/tlm-viewer","unlisted":false}],"href":"/tools/staticdocs/docs/tools"},{"type":"category","label":"Guides","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Bridges","href":"/tools/staticdocs/docs/guides/bridges","docId":"guides/bridges","unlisted":false},{"type":"link","label":"COSMOS and NASA cFS","href":"/tools/staticdocs/docs/guides/cfs","docId":"guides/cfs","unlisted":false},{"type":"link","label":"Custom Widgets","href":"/tools/staticdocs/docs/guides/custom-widgets","docId":"guides/custom-widgets","unlisted":false},{"type":"link","label":"Little Endian Bitfields","href":"/tools/staticdocs/docs/guides/little-endian-bitfields","docId":"guides/little-endian-bitfields","unlisted":false},{"type":"link","label":"Local Mode","href":"/tools/staticdocs/docs/guides/local-mode","docId":"guides/local-mode","unlisted":false},{"type":"link","label":"Logging","href":"/tools/staticdocs/docs/guides/logging","docId":"guides/logging","unlisted":false},{"type":"link","label":"Monitoring","href":"/tools/staticdocs/docs/guides/monitoring","docId":"guides/monitoring","unlisted":false},{"type":"link","label":"Performance","href":"/tools/staticdocs/docs/guides/performance","docId":"guides/performance","unlisted":false},{"type":"link","label":"Raspberry Pi","href":"/tools/staticdocs/docs/guides/raspberrypi","docId":"guides/raspberrypi","unlisted":false},{"type":"link","label":"Script Writing Guide","href":"/tools/staticdocs/docs/guides/script-writing","docId":"guides/script-writing","unlisted":false},{"type":"link","label":"Scripting API Guide","href":"/tools/staticdocs/docs/guides/scripting-api","docId":"guides/scripting-api","unlisted":false}],"href":"/tools/staticdocs/docs/guides"},{"type":"category","label":"Development","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Testing with Curl","href":"/tools/staticdocs/docs/development/curl","docId":"development/curl","unlisted":false},{"type":"link","label":"Developing COSMOS","href":"/tools/staticdocs/docs/development/developing","docId":"development/developing","unlisted":false},{"type":"link","label":"Host Install","href":"/tools/staticdocs/docs/development/host-install","docId":"development/host-install","unlisted":false},{"type":"link","label":"JSON API","href":"/tools/staticdocs/docs/development/json-api","docId":"development/json-api","unlisted":false},{"type":"link","label":"Log Structure","href":"/tools/staticdocs/docs/development/log-structure","docId":"development/log-structure","unlisted":false},{"type":"link","label":"Roadmap","href":"/tools/staticdocs/docs/development/roadmap","docId":"development/roadmap","unlisted":false},{"type":"link","label":"Streaming API","href":"/tools/staticdocs/docs/development/streaming-api","docId":"development/streaming-api","unlisted":false},{"type":"link","label":"Testing COSMOS","href":"/tools/staticdocs/docs/development/testing","docId":"development/testing","unlisted":false}],"href":"/tools/staticdocs/docs/development"},{"type":"category","label":"Meta","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Contributing","href":"/tools/staticdocs/docs/meta/contributing","docId":"meta/contributing","unlisted":false},{"type":"link","label":"Understanding Licenses","href":"/tools/staticdocs/docs/meta/licenses","docId":"meta/licenses","unlisted":false},{"type":"link","label":"Philosophy","href":"/tools/staticdocs/docs/meta/philosophy","docId":"meta/philosophy","unlisted":false},{"type":"link","label":"XTCE Support","href":"/tools/staticdocs/docs/meta/xtce","docId":"meta/xtce","unlisted":false}],"href":"/tools/staticdocs/docs/meta"},{"type":"link","label":"OpenC3, Inc. Privacy Policy","href":"/tools/staticdocs/docs/privacy","docId":"privacy","unlisted":false}]},"docs":{"configuration/command":{"id":"configuration/command","title":"Commands","description":"Command Definition Files","sidebar":"defaultSidebar"},"configuration/format":{"id":"configuration/format","title":"File Format","description":"COSMOS configuration files are just text files. They can (and should) be checked into your configuration management system and thus can be easily diffed throughout their history. They support ERB syntax, partials, and various line continuations which make them extremely flexible.","sidebar":"defaultSidebar"},"configuration/interfaces":{"id":"configuration/interfaces","title":"Interfaces","description":"Interfaces are the connection to the external embedded systems called targets. Interfaces are defined by the top level INTERFACE keyword in the plugin.txt file.","sidebar":"defaultSidebar"},"configuration/plugins":{"id":"configuration/plugins","title":"Plugins","description":"Introduction","sidebar":"defaultSidebar"},"configuration/protocols":{"id":"configuration/protocols","title":"Protocols","description":"Protocols process data on behalf of an Interface. They can modify the data being written, data being read, or both. Protocols can also mark a packet as stored instead of real-time which means COSMOS will not update the current value table with the packet data. Protocols can be layered and will be processed in order. For example, if you have a low-level encryption layer that must be first removed before processing a higher level buffer length protocol.","sidebar":"defaultSidebar"},"configuration/ssl-tls":{"id":"configuration/ssl-tls","title":"SSL-TLS","description":"COSMOS 5 is a container based service which does not use SSL/TLS out of the box. This guide will help you configure SSL and TLS. Learn more at the Traefik docs.","sidebar":"defaultSidebar"},"configuration/table":{"id":"configuration/table","title":"Tables","description":"Table Definition Files","sidebar":"defaultSidebar"},"configuration/target":{"id":"configuration/target","title":"Targets","description":"Targets are the external embedded systems that COSMOS connects to. Targets are defined by the top level TARGET keyword in the plugin.txt file. Each target is self contained in a target directory named after the target. In the root of the target directory there is a configuration file named target.txt which configures the individual target.","sidebar":"defaultSidebar"},"configuration/telemetry":{"id":"configuration/telemetry","title":"Telemetry","description":"Telemetry Definition Files","sidebar":"defaultSidebar"},"configuration/telemetry-screens":{"id":"configuration/telemetry-screens","title":"Screens","description":"This document provides the information necessary to generate and use COSMOS Telemetry Screens, which are displayed by the COSMOS Telemetry Viewer application.","sidebar":"defaultSidebar"},"development/curl":{"id":"development/curl","title":"Testing with Curl","description":"This information is just generally used behind the scenes in COSMOS tools","sidebar":"defaultSidebar"},"development/developing":{"id":"development/developing","title":"Developing COSMOS","description":"So you want to help develop COSMOS? All of our open source COSMOS code is on Github so the first thing to do is get an account. Next clone the COSMOS repository. We accept contributions from others as Pull Requests.","sidebar":"defaultSidebar"},"development/host-install":{"id":"development/host-install","title":"Host Install","description":"Installing COSMOS Directly onto a Host (No Containers)","sidebar":"defaultSidebar"},"development/json-api":{"id":"development/json-api","title":"JSON API","description":"If you\'re looking for the methods available to write test procedures using the COSMOS scripting API, refer to the Scripting API Guide page. If you\'re trying to interface to a COSMOS Command and Telemetry Server from an external application using any language then this is the right place.","sidebar":"defaultSidebar"},"development/log-structure":{"id":"development/log-structure","title":"Log Structure","description":"Updated: 8-21-2023 to the format as of OpenC3 COSMOS 5.11.0","sidebar":"defaultSidebar"},"development/roadmap":{"id":"development/roadmap","title":"Roadmap","description":"Key Features Still to Come in OpenC3 COSMOS 5.x:","sidebar":"defaultSidebar"},"development/streaming-api":{"id":"development/streaming-api","title":"Streaming API","description":"This information is just generally used behind the scenes in COSMOS tools","sidebar":"defaultSidebar"},"development/testing":{"id":"development/testing","title":"Testing COSMOS","description":"Playwright","sidebar":"defaultSidebar"},"getting-started/generators":{"id":"getting-started/generators","title":"Code Generators","description":"The COSMOS Code Generators are built into the scripts openc3.sh and openc3.bat that are included in the COSMOS project (more about projects).","sidebar":"defaultSidebar"},"getting-started/gettingstarted":{"id":"getting-started/gettingstarted","title":"Getting Started","description":"Welcome to the OpenC3 COSMOS system... Let\'s get started! This guide is a high level overview that will help with setting up your first COSMOS project.","sidebar":"defaultSidebar"},"getting-started/installation":{"id":"getting-started/installation","title":"Installation","description":"Installing OpenC3 COSMOS","sidebar":"defaultSidebar"},"getting-started/key_concepts":{"id":"getting-started/key_concepts","title":"Key Concepts","description":"Projects","sidebar":"defaultSidebar"},"getting-started/podman":{"id":"getting-started/podman","title":"Podman","description":"OpenC3 COSMOS Using Rootless Podman and Docker-Compose","sidebar":"defaultSidebar"},"getting-started/requirements":{"id":"getting-started/requirements","title":"Requirements and Design","description":"OpenC3 COSMOS is a command and control system providing commanding, scripting, and data visualization capabilities for embedded systems and systems of systems. COSMOS is intended for use during all phases of testing (board, box, integrated system) and during operations.","sidebar":"defaultSidebar"},"getting-started/upgrading":{"id":"getting-started/upgrading","title":"Upgrading","description":"COSMOS Upgrades","sidebar":"defaultSidebar"},"guides/bridges":{"id":"guides/bridges","title":"Bridges","description":"COSMOS Bridges provide an easy solution for getting data from devices that don\'t speak Ethernet into COSMOS.","sidebar":"defaultSidebar"},"guides/cfs":{"id":"guides/cfs","title":"COSMOS and NASA cFS","description":"Working configuration","sidebar":"defaultSidebar"},"guides/custom-widgets":{"id":"guides/custom-widgets","title":"Custom Widgets","description":"COSMOS allows you to build custom widgets which can be deployed with your plugin and used in Telemetry Viewer. Building custom widgets can utilitize any javascript frameworks but since COSMOS is written with Vue.js, we will use that framework in this tutorial. Please see the Widget Generator guide for information about generating the scaffolding for a custom widget.","sidebar":"defaultSidebar"},"guides/little-endian-bitfields":{"id":"guides/little-endian-bitfields","title":"Little Endian Bitfields","description":"Defining little endian bitfields is a little weird but is possible in COSMOS. However, note that APPEND does not work with little endian bitfields.","sidebar":"defaultSidebar"},"guides/local-mode":{"id":"guides/local-mode","title":"Local Mode","description":"Local Mode is a new feature in the 5.0.9 COSMOS release. It is intended to capture the configuration of an edited plugin so it can be configuration managed. It allows you to edit portions of a plugin (scripts and screens) locally in the editor of your choice and instantly have those changes appear in the COSMOS plugin. This avoids the plugin build / install cycle which is required when editing command and telemetry or interface definitions.","sidebar":"defaultSidebar"},"guides/logging":{"id":"guides/logging","title":"Logging","description":"The COSMOS Bucket Explorer tool provides a way to browse the COSMOS bucket storage backend whether you are running locally or in a cloud environment. Browse to http2900/tools/bucketexplorer and you should see the list of buckets at the top:","sidebar":"defaultSidebar"},"guides/monitoring":{"id":"guides/monitoring","title":"Monitoring","description":"Monitoring and observability","sidebar":"defaultSidebar"},"guides/performance":{"id":"guides/performance","title":"Performance","description":"The COSMOS architecture was created with scalability in mind. Our goal is to support an unlimited number of connections and use cloud technologies to scale. Only COSMOS Enterprise Edition supports Kubernetes and the various cloud platforms which allow this level of scalability. While true scalability is only achieved in COSMOS Enterprise, both Open Source and Enterprise have various levels of observability and configuration settings which can affect performance.","sidebar":"defaultSidebar"},"guides/raspberrypi":{"id":"guides/raspberrypi","title":"Raspberry Pi","description":"COSMOS Running on Raspberry Pi 4","sidebar":"defaultSidebar"},"guides/script-writing":{"id":"guides/script-writing","title":"Script Writing Guide","description":"Introduction","sidebar":"defaultSidebar"},"guides/scripting-api":{"id":"guides/scripting-api","title":"Scripting API Guide","description":"This document provides the information necessary to write test procedures using the COSMOS scripting API. Scripting in COSMOS is designed to be simple and intuitive. The code completion ability for command and telemetry mnemonics makes Script Runner the ideal place to write your procedures, however any text editor will do. If there is functionality that you don\'t see here or perhaps an easier syntax for doing something, please submit a ticket.","sidebar":"defaultSidebar"},"introduction":{"id":"introduction","title":"Introduction","description":"This site aims to be a comprehensive guide to OpenC3 COSMOS. We\'ll cover topics such","sidebar":"defaultSidebar"},"meta/contributing":{"id":"meta/contributing","title":"Contributing","description":"So you\'ve got an awesome idea to throw into COSMOS. Great! This is the basic process:","sidebar":"defaultSidebar"},"meta/licenses":{"id":"meta/licenses","title":"Understanding Licenses","description":"OpenC3 COSMOS is offered under a tri-licensing model allowing users to choose between the following three options:","sidebar":"defaultSidebar"},"meta/philosophy":{"id":"meta/philosophy","title":"Philosophy","description":"COSMOS is a C3 (Command, Control and Communication) system with the following primary goals:","sidebar":"defaultSidebar"},"meta/xtce":{"id":"meta/xtce","title":"XTCE Support","description":"COSMOS now has support for the XTCE Command and Telemetry Definition Standard. This is an open standard designed to allow command and telemetry definitions to be transferred between different ground systems. COSMOS can run directly using the .xtce files, or can convert them into the COSMOS configuration file format.","sidebar":"defaultSidebar"},"privacy":{"id":"privacy","title":"OpenC3, Inc. Privacy Policy","description":"OpenC3 Inc. is strongly committed to protecting your privacy and complying with your choices. Both personal and non-personal information collected is safeguarded according to the highest privacy and data protection standards adopted worldwide. We have always had a robust and effective data protection program in place which complies with existing law and abides by the data protection principles. However, we recognise our obligations in updating and expanding this program to meet the demands of the GDPR.","sidebar":"defaultSidebar"},"tools/autonomic":{"id":"tools/autonomic","title":"Autonomic (Enterprise)","description":"Introduction","sidebar":"defaultSidebar"},"tools/bucket-explorer":{"id":"tools/bucket-explorer","title":"Bucket Explorer","description":"Introduction","sidebar":"defaultSidebar"},"tools/calendar":{"id":"tools/calendar","title":"Calendar (Enterprise)","description":"Introduction","sidebar":"defaultSidebar"},"tools/cmd-sender":{"id":"tools/cmd-sender","title":"Command Sender","description":"Introduction","sidebar":"defaultSidebar"},"tools/cmd-tlm-server":{"id":"tools/cmd-tlm-server","title":"Command and Telemetry Server","description":"Introduction","sidebar":"defaultSidebar"},"tools/data-extractor":{"id":"tools/data-extractor","title":"Data Extractor","description":"Introduction","sidebar":"defaultSidebar"},"tools/data-viewer":{"id":"tools/data-viewer","title":"Data Viewer","description":"Introduction","sidebar":"defaultSidebar"},"tools/handbooks":{"id":"tools/handbooks","title":"Handbooks","description":"Introduction","sidebar":"defaultSidebar"},"tools/limits-monitor":{"id":"tools/limits-monitor","title":"Limits Monitor","description":"Introduction","sidebar":"defaultSidebar"},"tools/packet-viewer":{"id":"tools/packet-viewer","title":"Packet Viewer","description":"Introduction","sidebar":"defaultSidebar"},"tools/script-runner":{"id":"tools/script-runner","title":"Script Runner","description":"Introduction","sidebar":"defaultSidebar"},"tools/table-manager":{"id":"tools/table-manager","title":"Table Manager","description":"Introduction","sidebar":"defaultSidebar"},"tools/tlm-grapher":{"id":"tools/tlm-grapher","title":"Telemetry Grapher","description":"Introductions","sidebar":"defaultSidebar"},"tools/tlm-viewer":{"id":"tools/tlm-viewer","title":"Telemetry Viewer","description":"Introduction","sidebar":"defaultSidebar"}}}}')}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([[4688],{3193:(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});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 +1 @@
1
- "use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([[8150],{6093:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>c,contentTitle:()=>t,default:()=>p,frontMatter:()=>o,metadata:()=>l,toc:()=>a});var r=s(1085),i=s(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,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h3,{id:"cosmos-running-on-raspberry-pi-4",children:"COSMOS Running on Raspberry Pi 4"}),"\n",(0,r.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,r.jsx)(n.p,{children:"What you'll need:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Raspberry Pi 4 board (tested with 8GB RAM)"}),"\n",(0,r.jsx)(n.li,{children:"A Pi Case but Optional"}),"\n",(0,r.jsx)(n.li,{children:"Raspbeerry Pi Power Supply"}),"\n",(0,r.jsx)(n.li,{children:"32GB or Larger SD Card - Also faster the better"}),"\n",(0,r.jsx)(n.li,{children:"A Laptop with a way to write SD Cards"}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"Let's get started!"}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:"Setup 64-bit Raspian OS Lite on the SD Card"}),"\n",(0,r.jsxs)(n.p,{children:["Make sure you have the Raspberry Pi Imager app from: ",(0,r.jsx)(n.a,{href:"https://www.raspberrypi.com/software/",children:"https://www.raspberrypi.com/software/"})]}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsx)(n.li,{children:"Insert the SD Card into your computer (Note this process will erase all data on the SD card!)"}),"\n",(0,r.jsx)(n.li,{children:"Open the Raspberry Pi Imager App"}),"\n",(0,r.jsx)(n.li,{children:'Click the "Choose Device" Button'}),"\n",(0,r.jsx)(n.li,{children:"Pick Your Raspberry Pi Model"}),"\n",(0,r.jsx)(n.li,{children:'Click the "Choose OS" Button'}),"\n",(0,r.jsx)(n.li,{children:'Select "Raspberry Pi OS (other)"'}),"\n",(0,r.jsx)(n.li,{children:'Select "Raspberry Pi OS Lite (64-bit)"'}),"\n",(0,r.jsx)(n.li,{children:'Click the "Choose Storage" Button'}),"\n",(0,r.jsx)(n.li,{children:"Select Your SD Card"}),"\n",(0,r.jsx)(n.li,{children:"Click Edit Settings"}),"\n",(0,r.jsx)(n.li,{children:"If prompted if you would like to prefill the Wifi information, select OK"}),"\n",(0,r.jsx)(n.li,{children:"Set the hostname to: cosmos.local"}),"\n",(0,r.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,r.jsx)(n.li,{children:"Fill in your Wifi info, and set the country appropriately (ie. US)"}),"\n",(0,r.jsx)(n.li,{children:"Set the correct time zone"}),"\n",(0,r.jsx)(n.li,{children:"Goto the Services Tab and Enable SSH"}),"\n",(0,r.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,r.jsx)(n.li,{children:'Goto the Options tab and make sure "Enable Telemetry" is not checked'}),"\n",(0,r.jsx)(n.li,{children:'Click "Save" when everything is filled out'}),"\n",(0,r.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,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:"Make sure the Raspberry Pi is NOT powered on"}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:"Remove the SD Card from your computer and insert into the Raspberry Pi"}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:"Apply power to the Raspberry Pi and wait approximately 1 minute for it to boot"}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:"SSH to your raspberry Pi"}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:"Open a terminal window and use ssh to connect to your Pi"}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsxs)(n.li,{children:["On Mac / Linux: ssh ",(0,r.jsx)(n.a,{href:"mailto:yourusername@cosmos.local",children:"yourusername@cosmos.local"})]}),"\n",(0,r.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,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:"From SSH, Enter the following commands"}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.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,r.jsxs)(n.ol,{children:["\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["After about 2 minutes, open a web browser on your computer, and goto: ",(0,r.jsx)(n.a,{href:"http://cosmos.local:2900",children:"http://cosmos.local:2900"})]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.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,r.jsx)(n,{...e,children:(0,r.jsx)(d,{...e})}):d(e)}},1184:(e,n,s)=>{s.d(n,{R:()=>t});var r=s(4041);const i={},o=r.createContext(i);function t(e){const n=r.useContext(o);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}}}]);
1
+ "use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([[8150],{5716:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>c,contentTitle:()=>t,default:()=>p,frontMatter:()=>o,metadata:()=>l,toc:()=>a});var r=s(1085),i=s(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,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h3,{id:"cosmos-running-on-raspberry-pi-4",children:"COSMOS Running on Raspberry Pi 4"}),"\n",(0,r.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,r.jsx)(n.p,{children:"What you'll need:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Raspberry Pi 4 board (tested with 8GB RAM)"}),"\n",(0,r.jsx)(n.li,{children:"A Pi Case but Optional"}),"\n",(0,r.jsx)(n.li,{children:"Raspbeerry Pi Power Supply"}),"\n",(0,r.jsx)(n.li,{children:"32GB or Larger SD Card - Also faster the better"}),"\n",(0,r.jsx)(n.li,{children:"A Laptop with a way to write SD Cards"}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"Let's get started!"}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:"Setup 64-bit Raspian OS Lite on the SD Card"}),"\n",(0,r.jsxs)(n.p,{children:["Make sure you have the Raspberry Pi Imager app from: ",(0,r.jsx)(n.a,{href:"https://www.raspberrypi.com/software/",children:"https://www.raspberrypi.com/software/"})]}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsx)(n.li,{children:"Insert the SD Card into your computer (Note this process will erase all data on the SD card!)"}),"\n",(0,r.jsx)(n.li,{children:"Open the Raspberry Pi Imager App"}),"\n",(0,r.jsx)(n.li,{children:'Click the "Choose Device" Button'}),"\n",(0,r.jsx)(n.li,{children:"Pick Your Raspberry Pi Model"}),"\n",(0,r.jsx)(n.li,{children:'Click the "Choose OS" Button'}),"\n",(0,r.jsx)(n.li,{children:'Select "Raspberry Pi OS (other)"'}),"\n",(0,r.jsx)(n.li,{children:'Select "Raspberry Pi OS Lite (64-bit)"'}),"\n",(0,r.jsx)(n.li,{children:'Click the "Choose Storage" Button'}),"\n",(0,r.jsx)(n.li,{children:"Select Your SD Card"}),"\n",(0,r.jsx)(n.li,{children:"Click Edit Settings"}),"\n",(0,r.jsx)(n.li,{children:"If prompted if you would like to prefill the Wifi information, select OK"}),"\n",(0,r.jsx)(n.li,{children:"Set the hostname to: cosmos.local"}),"\n",(0,r.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,r.jsx)(n.li,{children:"Fill in your Wifi info, and set the country appropriately (ie. US)"}),"\n",(0,r.jsx)(n.li,{children:"Set the correct time zone"}),"\n",(0,r.jsx)(n.li,{children:"Goto the Services Tab and Enable SSH"}),"\n",(0,r.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,r.jsx)(n.li,{children:'Goto the Options tab and make sure "Enable Telemetry" is not checked'}),"\n",(0,r.jsx)(n.li,{children:'Click "Save" when everything is filled out'}),"\n",(0,r.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,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:"Make sure the Raspberry Pi is NOT powered on"}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:"Remove the SD Card from your computer and insert into the Raspberry Pi"}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:"Apply power to the Raspberry Pi and wait approximately 1 minute for it to boot"}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:"SSH to your raspberry Pi"}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:"Open a terminal window and use ssh to connect to your Pi"}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsxs)(n.li,{children:["On Mac / Linux: ssh ",(0,r.jsx)(n.a,{href:"mailto:yourusername@cosmos.local",children:"yourusername@cosmos.local"})]}),"\n",(0,r.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,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:"From SSH, Enter the following commands"}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.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,r.jsxs)(n.ol,{children:["\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["After about 2 minutes, open a web browser on your computer, and goto: ",(0,r.jsx)(n.a,{href:"http://cosmos.local:2900",children:"http://cosmos.local:2900"})]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.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,r.jsx)(n,{...e,children:(0,r.jsx)(d,{...e})}):d(e)}},1184:(e,n,s)=>{s.d(n,{R:()=>t});var r=s(4041);const i={},o=r.createContext(i);function t(e){const n=r.useContext(o);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([[7757],{5433:(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});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 +1 @@
1
- "use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([[8619],{5974:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>a,contentTitle:()=>r,default:()=>h,frontMatter:()=>i,metadata:()=>c,toc:()=>l});var s=t(1085),o=t(1184);const i={title:"Contributing"},r=void 0,c={id:"meta/contributing",title:"Contributing",description:"So you've got an awesome idea to throw into COSMOS. Great! This is the basic process:",source:"@site/docs/meta/contributing.md",sourceDirName:"meta",slug:"/meta/contributing",permalink:"/tools/staticdocs/docs/meta/contributing",draft:!1,unlisted:!1,editUrl:"https://github.com/OpenC3/cosmos/tree/main/docs.openc3.com/docs/meta/contributing.md",tags:[],version:"current",frontMatter:{title:"Contributing"},sidebar:"defaultSidebar",previous:{title:"Meta",permalink:"/tools/staticdocs/docs/meta"},next:{title:"Understanding Licenses",permalink:"/tools/staticdocs/docs/meta/licenses"}},a={},l=[{value:"Test Dependencies",id:"test-dependencies",level:2},{value:"Workflow",id:"workflow",level:2}];function d(e){const n={a:"a",admonition:"admonition",code:"code",h2:"h2",li:"li",ol:"ol",p:"p",pre:"pre",ul:"ul",...(0,o.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.p,{children:"So you've got an awesome idea to throw into COSMOS. Great! This is the basic process:"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsx)(n.li,{children:"Fork the project on Github"}),"\n",(0,s.jsx)(n.li,{children:"Create a feature branch"}),"\n",(0,s.jsx)(n.li,{children:"Make your changes"}),"\n",(0,s.jsx)(n.li,{children:"Submit a pull request"}),"\n"]}),"\n",(0,s.jsxs)(n.admonition,{title:"Don't Forget the Contributor License Agreement!",type:"note",children:[(0,s.jsxs)(n.p,{children:["By contributing to this project, you accept our Contributor License Agreement which is found here: ",(0,s.jsx)(n.a,{href:"https://github.com/OpenC3/cosmos/blob/main/CONTRIBUTING.txt",children:"Contributor License Agreement"})]}),(0,s.jsx)(n.p,{children:"This protects both you and us and you retain full rights to any code you write."})]}),"\n",(0,s.jsx)(n.h2,{id:"test-dependencies",children:"Test Dependencies"}),"\n",(0,s.jsxs)(n.p,{children:["To run the test suite and build the gem you'll need to install COSMOS's\ndependencies. COSMOS uses Bundler, so a quick run of the ",(0,s.jsx)(n.code,{children:"bundle"})," command and\nyou're all set!"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"\\$ bundle\n"})}),"\n",(0,s.jsx)(n.p,{children:"Before you start, run the tests and make sure that they pass (to confirm your\nenvironment is configured properly):"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"\\$ bundle exec rake build spec\n"})}),"\n",(0,s.jsx)(n.h2,{id:"workflow",children:"Workflow"}),"\n",(0,s.jsx)(n.p,{children:"Here's the most direct way to get your work merged into the project:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Fork the project."}),"\n",(0,s.jsx)(n.li,{children:"Clone down your fork:"}),"\n"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"git clone git://github.com/<username>/openc3.git\n"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Create a topic branch to contain your change:"}),"\n"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"git checkout -b my_awesome_feature\n"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Hack away, add tests. Not necessarily in that order."}),"\n",(0,s.jsxs)(n.li,{children:["Make sure everything still passes by running ",(0,s.jsx)(n.code,{children:"bundle exec rake"}),"."]}),"\n",(0,s.jsx)(n.li,{children:"If necessary, rebase your commits into logical chunks, without errors."}),"\n",(0,s.jsx)(n.li,{children:"Push the branch up:"}),"\n"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"git push origin my_awesome_feature\n"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Create a pull request against openc3/cosmos",":main"," and describe what your\nchange does and the why you think it should be merged."]}),"\n"]}),"\n",(0,s.jsx)(n.admonition,{title:"Find a problem in the code or documentation?",type:"note",children:(0,s.jsxs)(n.p,{children:["Please ",(0,s.jsx)(n.a,{href:"https://github.com/OpenC3/cosmos/issues/new/choose",children:"create an issue"})," on\nGitHub describing what we can do to make it better."]})})]})}function h(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},1184:(e,n,t)=>{t.d(n,{R:()=>r});var s=t(4041);const o={},i=s.createContext(o);function r(e){const n=s.useContext(i);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}}}]);
1
+ "use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([[8619],{8340:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>a,contentTitle:()=>r,default:()=>h,frontMatter:()=>i,metadata:()=>c,toc:()=>l});var s=t(1085),o=t(1184);const i={title:"Contributing"},r=void 0,c={id:"meta/contributing",title:"Contributing",description:"So you've got an awesome idea to throw into COSMOS. Great! This is the basic process:",source:"@site/docs/meta/contributing.md",sourceDirName:"meta",slug:"/meta/contributing",permalink:"/tools/staticdocs/docs/meta/contributing",draft:!1,unlisted:!1,editUrl:"https://github.com/OpenC3/cosmos/tree/main/docs.openc3.com/docs/meta/contributing.md",tags:[],version:"current",frontMatter:{title:"Contributing"},sidebar:"defaultSidebar",previous:{title:"Meta",permalink:"/tools/staticdocs/docs/meta"},next:{title:"Understanding Licenses",permalink:"/tools/staticdocs/docs/meta/licenses"}},a={},l=[{value:"Test Dependencies",id:"test-dependencies",level:2},{value:"Workflow",id:"workflow",level:2}];function d(e){const n={a:"a",admonition:"admonition",code:"code",h2:"h2",li:"li",ol:"ol",p:"p",pre:"pre",ul:"ul",...(0,o.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.p,{children:"So you've got an awesome idea to throw into COSMOS. Great! This is the basic process:"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsx)(n.li,{children:"Fork the project on Github"}),"\n",(0,s.jsx)(n.li,{children:"Create a feature branch"}),"\n",(0,s.jsx)(n.li,{children:"Make your changes"}),"\n",(0,s.jsx)(n.li,{children:"Submit a pull request"}),"\n"]}),"\n",(0,s.jsxs)(n.admonition,{title:"Don't Forget the Contributor License Agreement!",type:"note",children:[(0,s.jsxs)(n.p,{children:["By contributing to this project, you accept our Contributor License Agreement which is found here: ",(0,s.jsx)(n.a,{href:"https://github.com/OpenC3/cosmos/blob/main/CONTRIBUTING.txt",children:"Contributor License Agreement"})]}),(0,s.jsx)(n.p,{children:"This protects both you and us and you retain full rights to any code you write."})]}),"\n",(0,s.jsx)(n.h2,{id:"test-dependencies",children:"Test Dependencies"}),"\n",(0,s.jsxs)(n.p,{children:["To run the test suite and build the gem you'll need to install COSMOS's\ndependencies. COSMOS uses Bundler, so a quick run of the ",(0,s.jsx)(n.code,{children:"bundle"})," command and\nyou're all set!"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"\\$ bundle\n"})}),"\n",(0,s.jsx)(n.p,{children:"Before you start, run the tests and make sure that they pass (to confirm your\nenvironment is configured properly):"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"\\$ bundle exec rake build spec\n"})}),"\n",(0,s.jsx)(n.h2,{id:"workflow",children:"Workflow"}),"\n",(0,s.jsx)(n.p,{children:"Here's the most direct way to get your work merged into the project:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Fork the project."}),"\n",(0,s.jsx)(n.li,{children:"Clone down your fork:"}),"\n"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"git clone git://github.com/<username>/openc3.git\n"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Create a topic branch to contain your change:"}),"\n"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"git checkout -b my_awesome_feature\n"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Hack away, add tests. Not necessarily in that order."}),"\n",(0,s.jsxs)(n.li,{children:["Make sure everything still passes by running ",(0,s.jsx)(n.code,{children:"bundle exec rake"}),"."]}),"\n",(0,s.jsx)(n.li,{children:"If necessary, rebase your commits into logical chunks, without errors."}),"\n",(0,s.jsx)(n.li,{children:"Push the branch up:"}),"\n"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"git push origin my_awesome_feature\n"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Create a pull request against openc3/cosmos",":main"," and describe what your\nchange does and the why you think it should be merged."]}),"\n"]}),"\n",(0,s.jsx)(n.admonition,{title:"Find a problem in the code or documentation?",type:"note",children:(0,s.jsxs)(n.p,{children:["Please ",(0,s.jsx)(n.a,{href:"https://github.com/OpenC3/cosmos/issues/new/choose",children:"create an issue"})," on\nGitHub describing what we can do to make it better."]})})]})}function h(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},1184:(e,n,t)=>{t.d(n,{R:()=>r});var s=t(4041);const o={},i=s.createContext(o);function r(e){const n=s.useContext(i);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([[9014],{233:(e,t,i)=>{i.r(t),i.d(t,{assets:()=>l,contentTitle:()=>r,default:()=>c,frontMatter:()=>s,metadata:()=>o,toc:()=>h});var a=i(1085),n=i(1184);const s={title:"Telemetry Grapher"},r=void 0,o={id:"tools/tlm-grapher",title:"Telemetry Grapher",description:"Introductions",source:"@site/docs/tools/tlm-grapher.md",sourceDirName:"tools",slug:"/tools/tlm-grapher",permalink:"/tools/staticdocs/docs/tools/tlm-grapher",draft:!1,unlisted:!1,editUrl:"https://github.com/OpenC3/cosmos/tree/main/docs.openc3.com/docs/tools/tlm-grapher.md",tags:[],version:"current",frontMatter:{title:"Telemetry Grapher"},sidebar:"defaultSidebar",previous:{title:"Table Manager",permalink:"/tools/staticdocs/docs/tools/table-manager"},next:{title:"Telemetry Viewer",permalink:"/tools/staticdocs/docs/tools/tlm-viewer"}},l={},h=[{value:"Introductions",id:"introductions",level:2},{value:"Telemetry Grapher Menus",id:"telemetry-grapher-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:"Graph Menu Items",id:"graph-menu-items",level:3},{value:"Selecting Items",id:"selecting-items",level:2},{value:"Graph Window Management",id:"graph-window-management",level:2}];function d(e){const t={h2:"h2",h3:"h3",h4:"h4",img:"img",li:"li",p:"p",ul:"ul",...(0,n.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(t.h2,{id:"introductions",children:"Introductions"}),"\n",(0,a.jsx)(t.p,{children:"Telemetry Grapher is a graphing application that allows for one or more telemetry points per graph. It supports multiple graphs per screen which can be resized and reordered. Multiple configurations can be saved and restored for different situations."}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{alt:"Telemetry Grapher",src:i(146).A+"",width:"1270",height:"927"})}),"\n",(0,a.jsx)(t.h2,{id:"telemetry-grapher-menus",children:"Telemetry Grapher Menus"}),"\n",(0,a.jsx)(t.h3,{id:"file-menu-items",children:"File Menu Items"}),"\n",(0,a.jsx)("img",{src:i(981).A,alt:"File Menu",style:{float:"left","margin-right":"50px",height:"90px"}}),"\n",(0,a.jsxs)(t.ul,{children:["\n",(0,a.jsx)(t.li,{children:"Open a saved configuration (graphs and items)"}),"\n",(0,a.jsx)(t.li,{children:"Save the current configuration"}),"\n",(0,a.jsx)(t.li,{children:"Reset the configuration (default settings)"}),"\n"]}),"\n",(0,a.jsx)(t.h4,{id:"open-configuration",children:"Open Configuration"}),"\n",(0,a.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,a.jsx)(t.h4,{id:"save-configuration",children:"Save Configuration"}),"\n",(0,a.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,a.jsx)(t.h3,{id:"graph-menu-items",children:"Graph Menu Items"}),"\n",(0,a.jsx)("img",{src:i(9799).A,alt:"File Menu",style:{float:"left","margin-right":"50px",height:"150px"}}),"\n",(0,a.jsxs)(t.ul,{children:["\n",(0,a.jsx)(t.li,{children:"Add a new graph"}),"\n",(0,a.jsx)(t.li,{children:"Start / Resume graphing"}),"\n",(0,a.jsx)(t.li,{children:"Pause graph"}),"\n",(0,a.jsx)(t.li,{children:"Stop graph"}),"\n",(0,a.jsx)(t.li,{children:"Edit grapher settings"}),"\n"]}),"\n",(0,a.jsx)(t.p,{children:"Editing the grapher settings brings up a dialog to change settings affecting every graph in the Telemetry Grapher tool. Changing the Seconds Graphed changes the visible windows displaying graph points. The smaller of Seconds Graphed and Points Graphed will be used when calculating the number of points to display. Changing the Points Saved will affect performance of the browser window if set too high. The default of 1,000,000 points can store over 11.5 days of 1Hz data points."}),"\n",(0,a.jsx)(t.p,{children:"Editing an individual graph by clicking the pencil icon in title bar of the graph brings up the edit graph dialog."}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{alt:"Edit Graph",src:i(7234).A+"",width:"592",height:"766"})}),"\n",(0,a.jsx)(t.p,{children:"Editing the Start Date and Start Time will re-query the data to begin at the specified time. This operation can take several seconds depending on how far back data is requested. Similarly, specifying the End Date and End Time will limit the data request to the specified time. Leaving the End Date / End Time fields blank will cause Telemetry Grapher to continue to graph items in real-time as they arrive."}),"\n",(0,a.jsx)(t.p,{children:"Changing the Min Y and Max Y values simply sets the graph scale. Deleting the Min Y and Max Y values allows the graph to scale automatically as values arrive. Compare the following graph with the minimum set to 0 and the maximum set to 100 with the first graph image (auto-scale)."}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{alt:"Min Max",src:i(7469).A+"",width:"1247",height:"718"})}),"\n",(0,a.jsx)(t.h2,{id:"selecting-items",children:"Selecting Items"}),"\n",(0,a.jsx)(t.p,{children:"Selecting a target from the Select Target drop down automatically updates the available packets in the Select Packet drop down which updates the available items in the Select Item drop down. Clicking Add Item adds the item to the graph which immediately begins graphing."}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{alt:"Temp 1",src:i(6425).A+"",width:"1247",height:"829"})}),"\n",(0,a.jsx)(t.p,{children:"As time passes, the main graph fills up and starts scrolling while the overview graph at the bottom shows the entire history."}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{alt:"Temp 1 History",src:i(4733).A+"",width:"1247",height:"829"})}),"\n",(0,a.jsx)(t.p,{children:"Selecting a new item and adding it to the graph automatically fills the graph with history until the beginning of the first item. This allows you to add items to the graph incrementally and maintain full history."}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{alt:"Temp1 Temp2",src:i(9220).A+"",width:"1247",height:"829"})}),"\n",(0,a.jsx)(t.h2,{id:"graph-window-management",children:"Graph Window Management"}),"\n",(0,a.jsx)(t.p,{children:"All graphs can be moved around the browser window by clicking their title bar and moving them. Other graphs will move around intelligently to fill the space. This allows you order the graphs no matter which order they were created in."}),"\n",(0,a.jsx)(t.p,{children:"Each graph has a set of window buttons in the upper right corner. The first shrinks or grows the graph both horizontally and vertically to allow for 4 graphs in the same browser tab. Note that half height graphs no longer show the overview graph."}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{alt:"Four Graphs",src:i(6827).A+"",width:"1247",height:"710"})}),"\n",(0,a.jsx)(t.p,{children:"The second button shrinks or grows the graph horizontally so it will either be half or full width of the browser window. This allows for two full width graphs on top of each other."}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{alt:"Two Full Width",src:i(1520).A+"",width:"1247",height:"833"})}),"\n",(0,a.jsx)(t.p,{children:"The second button shrinks or grows the graph vertically so it will either be half or full height of the browser window. This allows for two full height graphs side by side."}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{alt:"Two Full Height",src:i(3435).A+"",width:"1247",height:"833"})}),"\n",(0,a.jsx)(t.p,{children:"The line button minimizes the graph to effectively hide it. This allows you to focus on a single graph without losing existing graphs."}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{alt:"Minimized",src:i(7247).A+"",width:"1247",height:"833"})}),"\n",(0,a.jsx)(t.p,{children:"The final X button closes the graph."})]})}function c(e={}){const{wrapper:t}={...(0,n.R)(),...e.components};return t?(0,a.jsx)(t,{...e,children:(0,a.jsx)(d,{...e})}):d(e)}},981:(e,t,i)=>{i.d(t,{A:()=>a});const a=i.p+"assets/images/file_menu-1c05cfc08f9d07b3f7122d2fe1ad98ed428dc563d2c5d2edddbed71f46779eb8.png"},9799:(e,t,i)=>{i.d(t,{A:()=>a});const a=i.p+"assets/images/graph_menu-289cbbb168622f661c1c98a7bd2c1b43f888e9c3560ba4e1d435ab62d0aad6de.png"},7234:(e,t,i)=>{i.d(t,{A:()=>a});const a=i.p+"assets/images/edit_graph-9618076f837e0d358ea0bfbf503d43b377805d818370405536f5a1c049209e99.png"},6827:(e,t,i)=>{i.d(t,{A:()=>a});const a=i.p+"assets/images/four_graphs-1aa5a7cb9ce51cec815fc9d8740b40e113bd171c4977711d47ef1e6daf02719e.png"},7469:(e,t,i)=>{i.d(t,{A:()=>a});const a=i.p+"assets/images/graph_min_max-75be4a19a7e13a1b9b7a18a9b898b170c8ded7768b01ce6c6effd566ac8e071a.png"},6425:(e,t,i)=>{i.d(t,{A:()=>a});const a=i.p+"assets/images/graph_temp1-028d8660c779136ff017b0b8a9fadb294e9ff478a65d7bd73032c3c2ed4f03d0.png"},9220:(e,t,i)=>{i.d(t,{A:()=>a});const a=i.p+"assets/images/graph_temp1_temp2-ad650da0ddf1fb5c6e9764b737bfab3027f5abcb935ad86d9716dfdf13032dca.png"},4733:(e,t,i)=>{i.d(t,{A:()=>a});const a=i.p+"assets/images/graph_temp1_time-53c18518755d1d1c816db7f0a67e26c5408aba32b644fda519b5ecf7a7ee9b27.png"},7247:(e,t,i)=>{i.d(t,{A:()=>a});const a=i.p+"assets/images/minimized-47ddb9b9b68b47aae3d0a12cb39ab767adf446acbe213c0b5565c1bfaf8a463f.png"},146:(e,t,i)=>{i.d(t,{A:()=>a});const a=i.p+"assets/images/telemetry_grapher-3a37c074a25b7912a76d96fd46a1431d27202d71374f78c829f273e5cb342233.png"},3435:(e,t,i)=>{i.d(t,{A:()=>a});const a=i.p+"assets/images/two_full_height-ccba2940b80345f3569ea47b7ddd3390c08195de91559f5586f85e36e411afd6.png"},1520:(e,t,i)=>{i.d(t,{A:()=>a});const a=i.p+"assets/images/two_full_width-0116adbf994500a24d4717e002d32098f8d6197bcece510b84b90400f23feade.png"},1184:(e,t,i)=>{i.d(t,{R:()=>r});var a=i(4041);const n={},s=a.createContext(n);function r(e){const t=a.useContext(s);return a.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}}}]);
1
+ "use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([[9014],{163:(e,t,i)=>{i.r(t),i.d(t,{assets:()=>l,contentTitle:()=>r,default:()=>c,frontMatter:()=>s,metadata:()=>o,toc:()=>h});var a=i(1085),n=i(1184);const s={title:"Telemetry Grapher"},r=void 0,o={id:"tools/tlm-grapher",title:"Telemetry Grapher",description:"Introductions",source:"@site/docs/tools/tlm-grapher.md",sourceDirName:"tools",slug:"/tools/tlm-grapher",permalink:"/tools/staticdocs/docs/tools/tlm-grapher",draft:!1,unlisted:!1,editUrl:"https://github.com/OpenC3/cosmos/tree/main/docs.openc3.com/docs/tools/tlm-grapher.md",tags:[],version:"current",frontMatter:{title:"Telemetry Grapher"},sidebar:"defaultSidebar",previous:{title:"Table Manager",permalink:"/tools/staticdocs/docs/tools/table-manager"},next:{title:"Telemetry Viewer",permalink:"/tools/staticdocs/docs/tools/tlm-viewer"}},l={},h=[{value:"Introductions",id:"introductions",level:2},{value:"Telemetry Grapher Menus",id:"telemetry-grapher-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:"Graph Menu Items",id:"graph-menu-items",level:3},{value:"Selecting Items",id:"selecting-items",level:2},{value:"Graph Window Management",id:"graph-window-management",level:2}];function d(e){const t={h2:"h2",h3:"h3",h4:"h4",img:"img",li:"li",p:"p",ul:"ul",...(0,n.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(t.h2,{id:"introductions",children:"Introductions"}),"\n",(0,a.jsx)(t.p,{children:"Telemetry Grapher is a graphing application that allows for one or more telemetry points per graph. It supports multiple graphs per screen which can be resized and reordered. Multiple configurations can be saved and restored for different situations."}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{alt:"Telemetry Grapher",src:i(146).A+"",width:"1270",height:"927"})}),"\n",(0,a.jsx)(t.h2,{id:"telemetry-grapher-menus",children:"Telemetry Grapher Menus"}),"\n",(0,a.jsx)(t.h3,{id:"file-menu-items",children:"File Menu Items"}),"\n",(0,a.jsx)("img",{src:i(981).A,alt:"File Menu",style:{float:"left","margin-right":"50px",height:"90px"}}),"\n",(0,a.jsxs)(t.ul,{children:["\n",(0,a.jsx)(t.li,{children:"Open a saved configuration (graphs and items)"}),"\n",(0,a.jsx)(t.li,{children:"Save the current configuration"}),"\n",(0,a.jsx)(t.li,{children:"Reset the configuration (default settings)"}),"\n"]}),"\n",(0,a.jsx)(t.h4,{id:"open-configuration",children:"Open Configuration"}),"\n",(0,a.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,a.jsx)(t.h4,{id:"save-configuration",children:"Save Configuration"}),"\n",(0,a.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,a.jsx)(t.h3,{id:"graph-menu-items",children:"Graph Menu Items"}),"\n",(0,a.jsx)("img",{src:i(9799).A,alt:"File Menu",style:{float:"left","margin-right":"50px",height:"150px"}}),"\n",(0,a.jsxs)(t.ul,{children:["\n",(0,a.jsx)(t.li,{children:"Add a new graph"}),"\n",(0,a.jsx)(t.li,{children:"Start / Resume graphing"}),"\n",(0,a.jsx)(t.li,{children:"Pause graph"}),"\n",(0,a.jsx)(t.li,{children:"Stop graph"}),"\n",(0,a.jsx)(t.li,{children:"Edit grapher settings"}),"\n"]}),"\n",(0,a.jsx)(t.p,{children:"Editing the grapher settings brings up a dialog to change settings affecting every graph in the Telemetry Grapher tool. Changing the Seconds Graphed changes the visible windows displaying graph points. The smaller of Seconds Graphed and Points Graphed will be used when calculating the number of points to display. Changing the Points Saved will affect performance of the browser window if set too high. The default of 1,000,000 points can store over 11.5 days of 1Hz data points."}),"\n",(0,a.jsx)(t.p,{children:"Editing an individual graph by clicking the pencil icon in title bar of the graph brings up the edit graph dialog."}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{alt:"Edit Graph",src:i(7234).A+"",width:"592",height:"766"})}),"\n",(0,a.jsx)(t.p,{children:"Editing the Start Date and Start Time will re-query the data to begin at the specified time. This operation can take several seconds depending on how far back data is requested. Similarly, specifying the End Date and End Time will limit the data request to the specified time. Leaving the End Date / End Time fields blank will cause Telemetry Grapher to continue to graph items in real-time as they arrive."}),"\n",(0,a.jsx)(t.p,{children:"Changing the Min Y and Max Y values simply sets the graph scale. Deleting the Min Y and Max Y values allows the graph to scale automatically as values arrive. Compare the following graph with the minimum set to 0 and the maximum set to 100 with the first graph image (auto-scale)."}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{alt:"Min Max",src:i(7469).A+"",width:"1247",height:"718"})}),"\n",(0,a.jsx)(t.h2,{id:"selecting-items",children:"Selecting Items"}),"\n",(0,a.jsx)(t.p,{children:"Selecting a target from the Select Target drop down automatically updates the available packets in the Select Packet drop down which updates the available items in the Select Item drop down. Clicking Add Item adds the item to the graph which immediately begins graphing."}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{alt:"Temp 1",src:i(6425).A+"",width:"1247",height:"829"})}),"\n",(0,a.jsx)(t.p,{children:"As time passes, the main graph fills up and starts scrolling while the overview graph at the bottom shows the entire history."}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{alt:"Temp 1 History",src:i(4733).A+"",width:"1247",height:"829"})}),"\n",(0,a.jsx)(t.p,{children:"Selecting a new item and adding it to the graph automatically fills the graph with history until the beginning of the first item. This allows you to add items to the graph incrementally and maintain full history."}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{alt:"Temp1 Temp2",src:i(9220).A+"",width:"1247",height:"829"})}),"\n",(0,a.jsx)(t.h2,{id:"graph-window-management",children:"Graph Window Management"}),"\n",(0,a.jsx)(t.p,{children:"All graphs can be moved around the browser window by clicking their title bar and moving them. Other graphs will move around intelligently to fill the space. This allows you order the graphs no matter which order they were created in."}),"\n",(0,a.jsx)(t.p,{children:"Each graph has a set of window buttons in the upper right corner. The first shrinks or grows the graph both horizontally and vertically to allow for 4 graphs in the same browser tab. Note that half height graphs no longer show the overview graph."}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{alt:"Four Graphs",src:i(6827).A+"",width:"1247",height:"710"})}),"\n",(0,a.jsx)(t.p,{children:"The second button shrinks or grows the graph horizontally so it will either be half or full width of the browser window. This allows for two full width graphs on top of each other."}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{alt:"Two Full Width",src:i(1520).A+"",width:"1247",height:"833"})}),"\n",(0,a.jsx)(t.p,{children:"The second button shrinks or grows the graph vertically so it will either be half or full height of the browser window. This allows for two full height graphs side by side."}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{alt:"Two Full Height",src:i(3435).A+"",width:"1247",height:"833"})}),"\n",(0,a.jsx)(t.p,{children:"The line button minimizes the graph to effectively hide it. This allows you to focus on a single graph without losing existing graphs."}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{alt:"Minimized",src:i(7247).A+"",width:"1247",height:"833"})}),"\n",(0,a.jsx)(t.p,{children:"The final X button closes the graph."})]})}function c(e={}){const{wrapper:t}={...(0,n.R)(),...e.components};return t?(0,a.jsx)(t,{...e,children:(0,a.jsx)(d,{...e})}):d(e)}},981:(e,t,i)=>{i.d(t,{A:()=>a});const a=i.p+"assets/images/file_menu-1c05cfc08f9d07b3f7122d2fe1ad98ed428dc563d2c5d2edddbed71f46779eb8.png"},9799:(e,t,i)=>{i.d(t,{A:()=>a});const a=i.p+"assets/images/graph_menu-289cbbb168622f661c1c98a7bd2c1b43f888e9c3560ba4e1d435ab62d0aad6de.png"},7234:(e,t,i)=>{i.d(t,{A:()=>a});const a=i.p+"assets/images/edit_graph-9618076f837e0d358ea0bfbf503d43b377805d818370405536f5a1c049209e99.png"},6827:(e,t,i)=>{i.d(t,{A:()=>a});const a=i.p+"assets/images/four_graphs-1aa5a7cb9ce51cec815fc9d8740b40e113bd171c4977711d47ef1e6daf02719e.png"},7469:(e,t,i)=>{i.d(t,{A:()=>a});const a=i.p+"assets/images/graph_min_max-75be4a19a7e13a1b9b7a18a9b898b170c8ded7768b01ce6c6effd566ac8e071a.png"},6425:(e,t,i)=>{i.d(t,{A:()=>a});const a=i.p+"assets/images/graph_temp1-028d8660c779136ff017b0b8a9fadb294e9ff478a65d7bd73032c3c2ed4f03d0.png"},9220:(e,t,i)=>{i.d(t,{A:()=>a});const a=i.p+"assets/images/graph_temp1_temp2-ad650da0ddf1fb5c6e9764b737bfab3027f5abcb935ad86d9716dfdf13032dca.png"},4733:(e,t,i)=>{i.d(t,{A:()=>a});const a=i.p+"assets/images/graph_temp1_time-53c18518755d1d1c816db7f0a67e26c5408aba32b644fda519b5ecf7a7ee9b27.png"},7247:(e,t,i)=>{i.d(t,{A:()=>a});const a=i.p+"assets/images/minimized-47ddb9b9b68b47aae3d0a12cb39ab767adf446acbe213c0b5565c1bfaf8a463f.png"},146:(e,t,i)=>{i.d(t,{A:()=>a});const a=i.p+"assets/images/telemetry_grapher-3a37c074a25b7912a76d96fd46a1431d27202d71374f78c829f273e5cb342233.png"},3435:(e,t,i)=>{i.d(t,{A:()=>a});const a=i.p+"assets/images/two_full_height-ccba2940b80345f3569ea47b7ddd3390c08195de91559f5586f85e36e411afd6.png"},1520:(e,t,i)=>{i.d(t,{A:()=>a});const a=i.p+"assets/images/two_full_width-0116adbf994500a24d4717e002d32098f8d6197bcece510b84b90400f23feade.png"},1184:(e,t,i)=>{i.d(t,{R:()=>r});var a=i(4041);const n={},s=a.createContext(n);function r(e){const t=a.useContext(s);return a.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([[7593],{2698:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>l,contentTitle:()=>r,default:()=>d,frontMatter:()=>o,metadata:()=>c,toc:()=>a});var t=i(1085),s=i(1184);const o={title:"Testing with Curl"},r=void 0,c={id:"development/curl",title:"Testing with Curl",description:"This information is just generally used behind the scenes in COSMOS tools",source:"@site/docs/development/curl.md",sourceDirName:"development",slug:"/development/curl",permalink:"/tools/staticdocs/docs/development/curl",draft:!1,unlisted:!1,editUrl:"https://github.com/OpenC3/cosmos/tree/main/docs.openc3.com/docs/development/curl.md",tags:[],version:"current",frontMatter:{title:"Testing with Curl"},sidebar:"defaultSidebar",previous:{title:"Development",permalink:"/tools/staticdocs/docs/development"},next:{title:"Developing COSMOS",permalink:"/tools/staticdocs/docs/development/developing"}},l={},a=[{value:"Curl Example with OpenC3 COSMOS Open Source",id:"curl-example-with-openc3-cosmos-open-source",level:2},{value:"Curl Example with OpenC3 COSMOS Enterprise",id:"curl-example-with-openc3-cosmos-enterprise",level:2},{value:"Suite Runner Example",id:"suite-runner-example",level:2}];function p(e){const n={admonition:"admonition",code:"code",h2:"h2",img:"img",li:"li",ol:"ol",p:"p",pre:"pre",ul:"ul",...(0,s.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.admonition,{title:"This documentation is for COSMOS Developers",type:"note",children:(0,t.jsx)(n.p,{children:"This information is just generally used behind the scenes in COSMOS tools"})}),"\n",(0,t.jsx)(n.p,{children:"The COSMOS APIs are all served over HTTP, which means you can use curl to experiment with them. Curl is a great tool for seeing exactly how the API responds to any given request."}),"\n",(0,t.jsx)(n.h2,{id:"curl-example-with-openc3-cosmos-open-source",children:"Curl Example with OpenC3 COSMOS Open Source"}),"\n",(0,t.jsx)(n.p,{children:"OpenC3 COSMOS Open Source just has a single user account, so all you need to do is pass the single password as the token with your requests like this."}),"\n",(0,t.jsx)(n.p,{children:"Request:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:'curl -i -H "Content-Type: application/json-rpc" -H "Authorization: password" -d \'{"jsonrpc": "2.0", "method": "tlm", "params": ["INST HEALTH_STATUS TEMP1"], "keyword_params": {"scope": "DEFAULT"}, "id": 8}\' -X POST http://127.0.0.1:2900/openc3-api/api\n'})}),"\n",(0,t.jsx)(n.p,{children:"Response:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:'HTTP/1.1 200 OK\nCache-Control: max-age=0, private, must-revalidate\nContent-Length: 51\nContent-Type: application/json-rpc\nEtag: W/"e806aacfdbed0b325e7a5928e3bb5cf4"\nVary: Origin\nX-Request-Id: bbad6c6b-6d22-4374-a86f-b5b0b95e6939\nX-Runtime: 0.059044\nDate: Sat, 04 Nov 2023 21:34:47 GMT\n\n{"jsonrpc":"2.0","id":8,"result":53.26555000000001}\n'})}),"\n",(0,t.jsx)(n.h2,{id:"curl-example-with-openc3-cosmos-enterprise",children:"Curl Example with OpenC3 COSMOS Enterprise"}),"\n",(0,t.jsx)(n.p,{children:"OpenC3 COSMOS Enterprise uses the Keycloak Single Sign-on system, so you must first request a token from Keycloak using a username and password pair, before you make requests. By default this token will expire in 5 minutes, and will need to be refreshed if it expires before your next request."}),"\n",(0,t.jsx)(n.p,{children:"Keycloak Request:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"# Get tokens from Keycloak - You will need to update the username and password with your account\ncurl -i -H \"Content-Type: application/x-www-form-urlencoded\" -d 'username=operator&password=operator&client_id=api&grant_type=password&scope=openid' -X POST http://127.0.0.1:2900/auth/realms/openc3/protocol/openid-connect/token\n"})}),"\n",(0,t.jsx)(n.p,{children:"Keycloak Response:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:'HTTP/1.1 200 OK\nCache-Control: no-store\nContent-Length: 3207\nContent-Type: application/json\nPragma: no-cache\nReferrer-Policy: no-referrer\nSet-Cookie: KEYCLOAK_LOCALE=; Version=1; Comment=Expiring cookie; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Max-Age=0; Path=/auth/realms/openc3/; HttpOnly\nSet-Cookie: KC_RESTART=; Version=1; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Max-Age=0; Path=/auth/realms/openc3/; HttpOnly\nStrict-Transport-Security: max-age=31536000; includeSubDomains\nX-Content-Type-Options: nosniff\nX-Frame-Options: SAMEORIGIN\nX-Xss-Protection: 1; mode=block\nDate: Wed, 10 May 2023 00:40:40 GMT\n\n{"access_token":"eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJ0cDlERmpNZGFXMy16WXptdlBqVTZnNTVqMVNhWGhkZHJqU0szQVNvaDhVIn0.eyJleHAiOjE2ODM2Nzk1NDAsImlhdCI6MTY4MzY3OTI0MCwianRpIjoiZmVlOTQwYWYtZDY3Ny00MWUyLWIzNWYtZDI5ODhiM2RhZGQ2IiwiaXNzIjoiaHR0cDovL2xvY2FsaG9zdDoyOTAwL2F1dGgvcmVhbG1zL29wZW5jMyIsInN1YiI6ImFjZTFlNmExLTkzMTktNDc2ZS1iZjQzLTZmM2NhYjllZTJkZSIsInR5cCI6IkJlYXJlciIsImF6cCI6ImFwaSIsInNlc3Npb25fc3RhdGUiOiJmMzc4NTk2Ny0yYTQ2LTRjMTItYWQwYy1jZmY3ZmM0NzdkZjkiLCJhY3IiOiIxIiwicmVhbG1fYWNjZXNzIjp7InJvbGVzIjpbImRlZmF1bHQtcm9sZXMtb3BlbmMzIiwiQUxMU0NPUEVTX19vcGVyYXRvciIsIm9mZmxpbmVfYWNjZXNzIiwiQUxMU0NPUEVTX192aWV3ZXIiXX0sInNjb3BlIjoib3BlbmlkIHByb2ZpbGUgZW1haWwiLCJzaWQiOiJmMzc4NTk2Ny0yYTQ2LTRjMTItYWQwYy1jZmY3ZmM0NzdkZjkiLCJlbWFpbF92ZXJpZmllZCI6ZmFsc2UsIm5hbWUiOiJUaGUgT3BlcmF0b3IiLCJwcmVmZXJyZWRfdXNlcm5hbWUiOiJvcGVyYXRvciIsImdpdmVuX25hbWUiOiJUaGUiLCJmYW1pbHlfbmFtZSI6Ik9wZXJhdG9yIn0.eSqSeZrmCTahwltz5jsu5r3w6W15T5h0BvIdqKWQBDcnxAcxKuT-Nwziw_ewySSgHeC172CIWJUpHVp8ACDQG-dfW4KkvA6AcGfSF_f8TBH_rZrVQwlvwwzdA_egGKzhZWcnAC8TDjXRxuaWmnOgWT0aaHZAoW8EvwmKp-1IVz2l0B-hqzfC7dkjMrCI1udLfDvDBza9OtuR-FnKGt8h4nYnRzr8pO2jwebPFyZlR00gVsyK-b411XqprpT-qpRObYZwH5womA-8xIiwRZj9dsfQ1TaHGFkp1LNzxcj_r6pfwVO263bohbeU7ImezQdbvGLJ9NHaglzVNroTui4BXA","expires_in":300,"refresh_expires_in":1800,"refresh_token":"eyJhbGciOiJIUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICI5NjNlMjJiMS0wZmYwLTRmZjktYTg0Zi1hOGI4MzcxOWFiMDEifQ.eyJleHAiOjE2ODM2ODEwNDAsImlhdCI6MTY4MzY3OTI0MCwianRpIjoiMmQyYjIyNmItNjJkOS00YjRjLWI3YTYtMGEwYjk4MGQyMjMwIiwiaXNzIjoiaHR0cDovL2xvY2FsaG9zdDoyOTAwL2F1dGgvcmVhbG1zL29wZW5jMyIsImF1ZCI6Imh0dHA6Ly9sb2NhbGhvc3Q6MjkwMC9hdXRoL3JlYWxtcy9vcGVuYzMiLCJzdWIiOiJhY2UxZTZhMS05MzE5LTQ3NmUtYmY0My02ZjNjYWI5ZWUyZGUiLCJ0eXAiOiJSZWZyZXNoIiwiYXpwIjoiYXBpIiwic2Vzc2lvbl9zdGF0ZSI6ImYzNzg1OTY3LTJhNDYtNGMxMi1hZDBjLWNmZjdmYzQ3N2RmOSIsInNjb3BlIjoib3BlbmlkIHByb2ZpbGUgZW1haWwiLCJzaWQiOiJmMzc4NTk2Ny0yYTQ2LTRjMTItYWQwYy1jZmY3ZmM0NzdkZjkifQ.1HlKdxQkaL5tYuHTXsOceLZFmNNLl9BjoA4oUl70x9M","token_type":"Bearer","id_token":"eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJ0cDlERmpNZGFXMy16WXptdlBqVTZnNTVqMVNhWGhkZHJqU0szQVNvaDhVIn0.eyJleHAiOjE2ODM2Nzk1NDAsImlhdCI6MTY4MzY3OTI0MCwiYXV0aF90aW1lIjowLCJqdGkiOiJhNDJkOTY1ZS1lMzU0LTRiM2QtOTIyYS1hOWE0ZDgwZWYxMTkiLCJpc3MiOiJodHRwOi8vbG9jYWxob3N0OjI5MDAvYXV0aC9yZWFsbXMvb3BlbmMzIiwiYXVkIjoiYXBpIiwic3ViIjoiYWNlMWU2YTEtOTMxOS00NzZlLWJmNDMtNmYzY2FiOWVlMmRlIiwidHlwIjoiSUQiLCJhenAiOiJhcGkiLCJzZXNzaW9uX3N0YXRlIjoiZjM3ODU5NjctMmE0Ni00YzEyLWFkMGMtY2ZmN2ZjNDc3ZGY5IiwiYXRfaGFzaCI6IjNBWE9ISkFKYzFPVldLd2Y0a0Q4TkEiLCJhY3IiOiIxIiwic2lkIjoiZjM3ODU5NjctMmE0Ni00YzEyLWFkMGMtY2ZmN2ZjNDc3ZGY5IiwiZW1haWxfdmVyaWZpZWQiOmZhbHNlLCJuYW1lIjoiVGhlIE9wZXJhdG9yIiwicHJlZmVycmVkX3VzZXJuYW1lIjoib3BlcmF0b3IiLCJnaXZlbl9uYW1lIjoiVGhlIiwiZmFtaWx5X25hbWUiOiJPcGVyYXRvciJ9.gdLl6KOKIIAdl6jYEuAXQrGCNvuwLQb3RDnwrHJdqyFXshiwofBiLMFreRsIE-33xXWNBU6pnSLQHPVlQU5Vmzlk0IOfk-b4yNq0dNa1TV1kmnxRl8w1ulTQYVZjdsN-oyLNwe0v3aJcYtbvIA3DP8rgO6bVv0ogkjWtlda6MbkyZN-har8x3raUVSlUPRP2Basy1xSMNNA1jvB-nEM-aubrUZE6r0PjI6PE1hbLPmuPbcX3uuIwXu2-UoXepkB8H7omUuMm-S98aHpRarwszC0mmHD5b_wiXusMVw4xYw8eavFue4zfw-T2IKuTVtxbMTygXIah6iqi4gkpL8Mx1w","not-before-policy":0,"session_state":"f3785967-2a46-4c12-ad0c-cff7fc477df9","scope":"openid profile email"}\n'})}),"\n",(0,t.jsx)(n.p,{children:"COSMOS Request:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:'# COSMOS Request now looks like this:\n\ncurl -i -H "Content-Type: application/json-rpc" -H "Authorization: eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJ0cDlERmpNZGFXMy16WXptdlBqVTZnNTVqMVNhWGhkZHJqU0szQVNvaDhVIn0.eyJleHAiOjE2ODM2Nzk1NDAsImlhdCI6MTY4MzY3OTI0MCwianRpIjoiZmVlOTQwYWYtZDY3Ny00MWUyLWIzNWYtZDI5ODhiM2RhZGQ2IiwiaXNzIjoiaHR0cDovL2xvY2FsaG9zdDoyOTAwL2F1dGgvcmVhbG1zL29wZW5jMyIsInN1YiI6ImFjZTFlNmExLTkzMTktNDc2ZS1iZjQzLTZmM2NhYjllZTJkZSIsInR5cCI6IkJlYXJlciIsImF6cCI6ImFwaSIsInNlc3Npb25fc3RhdGUiOiJmMzc4NTk2Ny0yYTQ2LTRjMTItYWQwYy1jZmY3ZmM0NzdkZjkiLCJhY3IiOiIxIiwicmVhbG1fYWNjZXNzIjp7InJvbGVzIjpbImRlZmF1bHQtcm9sZXMtb3BlbmMzIiwiQUxMU0NPUEVTX19vcGVyYXRvciIsIm9mZmxpbmVfYWNjZXNzIiwiQUxMU0NPUEVTX192aWV3ZXIiXX0sInNjb3BlIjoib3BlbmlkIHByb2ZpbGUgZW1haWwiLCJzaWQiOiJmMzc4NTk2Ny0yYTQ2LTRjMTItYWQwYy1jZmY3ZmM0NzdkZjkiLCJlbWFpbF92ZXJpZmllZCI6ZmFsc2UsIm5hbWUiOiJUaGUgT3BlcmF0b3IiLCJwcmVmZXJyZWRfdXNlcm5hbWUiOiJvcGVyYXRvciIsImdpdmVuX25hbWUiOiJUaGUiLCJmYW1pbHlfbmFtZSI6Ik9wZXJhdG9yIn0.eSqSeZrmCTahwltz5jsu5r3w6W15T5h0BvIdqKWQBDcnxAcxKuT-Nwziw_ewySSgHeC172CIWJUpHVp8ACDQG-dfW4KkvA6AcGfSF_f8TBH_rZrVQwlvwwzdA_egGKzhZWcnAC8TDjXRxuaWmnOgWT0aaHZAoW8EvwmKp-1IVz2l0B-hqzfC7dkjMrCI1udLfDvDBza9OtuR-FnKGt8h4nYnRzr8pO2jwebPFyZlR00gVsyK-b411XqprpT-qpRObYZwH5womA-8xIiwRZj9dsfQ1TaHGFkp1LNzxcj_r6pfwVO263bohbeU7ImezQdbvGLJ9NHaglzVNroTui4BXA" -d \'{"jsonrpc": "2.0", "method": "tlm", "params": ["INST HEALTH_STATUS TEMP1"], "keyword_params": {"scope": "DEFAULT"}, "id": 8}\' -X POST http://127.0.0.1:2900/openc3-api/api\n'})}),"\n",(0,t.jsx)(n.p,{children:"COSMOS Response:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:'HTTP/1.1 200 OK\nCache-Control: max-age=0, private, must-revalidate\nContent-Type: application/json-rpc\nEtag: W/"1e44c0878528687014e1e60a1cbebdae"\nVary: Origin\nX-Request-Id: 47a8dd26-1348-4693-8df1-5375f60abc6c\nX-Runtime: 0.046477\nDate: Wed, 10 May 2023 00:41:33 GMT\nTransfer-Encoding: chunked\n\n{"jsonrpc":"2.0","id":8,"result":29.204100000000007}\n'})}),"\n",(0,t.jsx)(n.h2,{id:"suite-runner-example",children:"Suite Runner Example"}),"\n",(0,t.jsxs)(n.p,{children:["It can be very useful to run the a suite or script remotely from a continuous testing server. COSMOS' REST API allows for this. To figure out what is required to run a certain task on the web GUI you can open up your browser's developer tools to monitor the network traffic. You will see all the requests and responses required to run a command and you can reformat them yourself to suit your own purposes. Below is an example of running a test script from a Chromium-based browser:\n",(0,t.jsx)(n.img,{src:"https://github.com/OpenC3/cosmos/assets/55999897/df642d42-43e0-47f9-9b52-d42746d9746b",alt:"Network Traffic in browser developer tools"})]}),"\n",(0,t.jsxs)(n.p,{children:['You can see that there are 5 transactions total. To investigate just right-click on the network transaction and click "copy as ',(0,t.jsx)(n.code,{children:"curl"}),'" (depends on the browser). Here is an example of the second one:']}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"curl 'http://localhost:2900/script-api/scripts/TARGET/procedures/cmd_tlm_test.rb/lock?scope=DEFAULT' \\\n -X 'POST' \\\n -H 'Accept: application/json' \\\n -H 'Accept-Language: en-US,en;q=0.9' \\\n -H 'Authorization: pass' \\\n -H 'Connection: keep-alive' \\\n -H 'Content-Length: 0' \\\n -H 'Origin: http://ascportal:2900' \\\n -H 'Referer: http://localhost:2900/tools/scriptrunner/?file=TARGET%2Fprocedures%2Fcmd_tlm_test.rb' \\\n -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36 Edg/124.0.0.0' \\\n --insecure\n"})}),"\n",(0,t.jsxs)(n.p,{children:["Many of the browser-specific headers are not required. The important thing to notice here is the URL and the request (in this case ",(0,t.jsx)(n.code,{children:"POST"}),"). If we inspect all of these we'll find out what each one does:"]}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["Set the script contents","\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"this updates any local changes)"}),"\n",(0,t.jsxs)(n.li,{children:["Note that this is a different request to ",(0,t.jsx)(n.code,{children:"GET"})," the script contents. This is done on the page load."]}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(n.li,{children:"Lock the script (so other users can't edit it during execution)"}),"\n",(0,t.jsx)(n.li,{children:"Run script (this takes a JSON with options)"}),"\n",(0,t.jsx)(n.li,{children:"Open Websocket for logs"}),"\n",(0,t.jsx)(n.li,{children:"Request Result (this URL is a little different because the results are saved in redis)"}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:["Below is a bash script which does all the above given some options. It requires ",(0,t.jsx)(n.code,{children:"curl"})," for the web requests and ",(0,t.jsx)(n.code,{children:"jq"})," for JSON parsing and formatting. It locks and runs the script, continually checks its status, then requests the result."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:'#!/bin/bash\nset -e\nTARGET=${1:-\'TARGET\'}\nSCRIPT=${2:-\'procedures/cmd_tlm_test.rb\'}\nSUITE=${3:-\'TestSuite\'}\nCOSMOS_HOST=\'http://localhost:2900\'\nSCRIPT_API="$COSMOS_HOST/script-api"\nSCRIPT_PATH="scripts/$TARGET/$SCRIPT"\nCURL_ARGS=( \n\t-H \'Accept: application/json\' \n\t-H \'Authorization: password\' \n\t-H \'Accept-Language: en-US,en;q=0.9\' \n\t-H \'Connection: keep-alive\' \n\t-H \'Content-Type: application/json\' \n\t--insecure \n\t--silent )\n\n# Lock script #\ncurl "$SCRIPT_API/$SCRIPT_PATH/lock?scope=DEFAULT" -X "POST" "${CURL_ARGS[@]}"\n\n# Run script #\nRUN_OPTS=$(cat <<-json\n{\n "environment": [],\n "suiteRunner": {\n "method": "start",\n "suite": "$SUITE",\n "options": [\n "continueAfterError"\n ]\n }\n}\njson\n)\nRUN_OPTS=$(<<<"$RUN_OPTS" jq -rc .)\nID=$(curl "$SCRIPT_API/$SCRIPT_PATH/run?scope=DEFAULT" --data-raw "$RUN_OPTS" "${CURL_ARGS[@]}")\n\necho "Starting Script \'$SCRIPT_PATH\' at $(date) (may take up to 15 minutes)" > /dev/stderr\necho "You can monitor it in Script Runner here: $COSMOS_HOST/tools/scriptrunner/$ID" > /dev/stderr\n# Loop while Script ID is still running #\nwhile true; do\n\tSCRIPT_STATUS="$(curl "$SCRIPT_API/running-script?scope=DEFAULT" "${CURL_ARGS[@]}" | jq ".[]|select(.id==$ID)")"\n\tif [[ -z $SCRIPT_STATUS ]]; then\n\t\tbreak;\n\tfi\n\tsleep 2\ndone\n\n# Request results #\nBUCKET_FILE_URI="$(curl "$SCRIPT_API/completed-scripts?scope=DEFAULT" "${CURL_ARGS[@]}" |\\\n\tjq \'[.[]|select(.name | test("\'"${SCRIPT_PATH#scripts/}"\' "))][0] | .log | @uri\' -r)"\n\nURL="$(curl "$COSMOS_HOST/openc3-api/storage/download/$BUCKET_FILE_URI?bucket=OPENC3_LOGS_BUCKET&scope=DEFAULT" "${CURL_ARGS[@]}" |jq .url -r)"\n\ncurl "$COSMOS_HOST$URL" "${CURL_ARGS[@]}"\n'})})]})}function d(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(p,{...e})}):p(e)}},1184:(e,n,i)=>{i.d(n,{R:()=>r});var t=i(4041);const s={},o=t.createContext(s);function r(e){const n=t.useContext(o);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}}}]);
1
+ "use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([[7593],{2748:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>l,contentTitle:()=>r,default:()=>d,frontMatter:()=>o,metadata:()=>c,toc:()=>a});var t=i(1085),s=i(1184);const o={title:"Testing with Curl"},r=void 0,c={id:"development/curl",title:"Testing with Curl",description:"This information is just generally used behind the scenes in COSMOS tools",source:"@site/docs/development/curl.md",sourceDirName:"development",slug:"/development/curl",permalink:"/tools/staticdocs/docs/development/curl",draft:!1,unlisted:!1,editUrl:"https://github.com/OpenC3/cosmos/tree/main/docs.openc3.com/docs/development/curl.md",tags:[],version:"current",frontMatter:{title:"Testing with Curl"},sidebar:"defaultSidebar",previous:{title:"Development",permalink:"/tools/staticdocs/docs/development"},next:{title:"Developing COSMOS",permalink:"/tools/staticdocs/docs/development/developing"}},l={},a=[{value:"Curl Example with OpenC3 COSMOS Open Source",id:"curl-example-with-openc3-cosmos-open-source",level:2},{value:"Curl Example with OpenC3 COSMOS Enterprise",id:"curl-example-with-openc3-cosmos-enterprise",level:2},{value:"Suite Runner Example",id:"suite-runner-example",level:2}];function p(e){const n={admonition:"admonition",code:"code",h2:"h2",img:"img",li:"li",ol:"ol",p:"p",pre:"pre",ul:"ul",...(0,s.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.admonition,{title:"This documentation is for COSMOS Developers",type:"note",children:(0,t.jsx)(n.p,{children:"This information is just generally used behind the scenes in COSMOS tools"})}),"\n",(0,t.jsx)(n.p,{children:"The COSMOS APIs are all served over HTTP, which means you can use curl to experiment with them. Curl is a great tool for seeing exactly how the API responds to any given request."}),"\n",(0,t.jsx)(n.h2,{id:"curl-example-with-openc3-cosmos-open-source",children:"Curl Example with OpenC3 COSMOS Open Source"}),"\n",(0,t.jsx)(n.p,{children:"OpenC3 COSMOS Open Source just has a single user account, so all you need to do is pass the single password as the token with your requests like this."}),"\n",(0,t.jsx)(n.p,{children:"Request:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:'curl -i -H "Content-Type: application/json-rpc" -H "Authorization: password" -d \'{"jsonrpc": "2.0", "method": "tlm", "params": ["INST HEALTH_STATUS TEMP1"], "keyword_params": {"scope": "DEFAULT"}, "id": 8}\' -X POST http://127.0.0.1:2900/openc3-api/api\n'})}),"\n",(0,t.jsx)(n.p,{children:"Response:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:'HTTP/1.1 200 OK\nCache-Control: max-age=0, private, must-revalidate\nContent-Length: 51\nContent-Type: application/json-rpc\nEtag: W/"e806aacfdbed0b325e7a5928e3bb5cf4"\nVary: Origin\nX-Request-Id: bbad6c6b-6d22-4374-a86f-b5b0b95e6939\nX-Runtime: 0.059044\nDate: Sat, 04 Nov 2023 21:34:47 GMT\n\n{"jsonrpc":"2.0","id":8,"result":53.26555000000001}\n'})}),"\n",(0,t.jsx)(n.h2,{id:"curl-example-with-openc3-cosmos-enterprise",children:"Curl Example with OpenC3 COSMOS Enterprise"}),"\n",(0,t.jsx)(n.p,{children:"OpenC3 COSMOS Enterprise uses the Keycloak Single Sign-on system, so you must first request a token from Keycloak using a username and password pair, before you make requests. By default this token will expire in 5 minutes, and will need to be refreshed if it expires before your next request."}),"\n",(0,t.jsx)(n.p,{children:"Keycloak Request:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"# Get tokens from Keycloak - You will need to update the username and password with your account\ncurl -i -H \"Content-Type: application/x-www-form-urlencoded\" -d 'username=operator&password=operator&client_id=api&grant_type=password&scope=openid' -X POST http://127.0.0.1:2900/auth/realms/openc3/protocol/openid-connect/token\n"})}),"\n",(0,t.jsx)(n.p,{children:"Keycloak Response:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:'HTTP/1.1 200 OK\nCache-Control: no-store\nContent-Length: 3207\nContent-Type: application/json\nPragma: no-cache\nReferrer-Policy: no-referrer\nSet-Cookie: KEYCLOAK_LOCALE=; Version=1; Comment=Expiring cookie; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Max-Age=0; Path=/auth/realms/openc3/; HttpOnly\nSet-Cookie: KC_RESTART=; Version=1; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Max-Age=0; Path=/auth/realms/openc3/; HttpOnly\nStrict-Transport-Security: max-age=31536000; includeSubDomains\nX-Content-Type-Options: nosniff\nX-Frame-Options: SAMEORIGIN\nX-Xss-Protection: 1; mode=block\nDate: Wed, 10 May 2023 00:40:40 GMT\n\n{"access_token":"eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJ0cDlERmpNZGFXMy16WXptdlBqVTZnNTVqMVNhWGhkZHJqU0szQVNvaDhVIn0.eyJleHAiOjE2ODM2Nzk1NDAsImlhdCI6MTY4MzY3OTI0MCwianRpIjoiZmVlOTQwYWYtZDY3Ny00MWUyLWIzNWYtZDI5ODhiM2RhZGQ2IiwiaXNzIjoiaHR0cDovL2xvY2FsaG9zdDoyOTAwL2F1dGgvcmVhbG1zL29wZW5jMyIsInN1YiI6ImFjZTFlNmExLTkzMTktNDc2ZS1iZjQzLTZmM2NhYjllZTJkZSIsInR5cCI6IkJlYXJlciIsImF6cCI6ImFwaSIsInNlc3Npb25fc3RhdGUiOiJmMzc4NTk2Ny0yYTQ2LTRjMTItYWQwYy1jZmY3ZmM0NzdkZjkiLCJhY3IiOiIxIiwicmVhbG1fYWNjZXNzIjp7InJvbGVzIjpbImRlZmF1bHQtcm9sZXMtb3BlbmMzIiwiQUxMU0NPUEVTX19vcGVyYXRvciIsIm9mZmxpbmVfYWNjZXNzIiwiQUxMU0NPUEVTX192aWV3ZXIiXX0sInNjb3BlIjoib3BlbmlkIHByb2ZpbGUgZW1haWwiLCJzaWQiOiJmMzc4NTk2Ny0yYTQ2LTRjMTItYWQwYy1jZmY3ZmM0NzdkZjkiLCJlbWFpbF92ZXJpZmllZCI6ZmFsc2UsIm5hbWUiOiJUaGUgT3BlcmF0b3IiLCJwcmVmZXJyZWRfdXNlcm5hbWUiOiJvcGVyYXRvciIsImdpdmVuX25hbWUiOiJUaGUiLCJmYW1pbHlfbmFtZSI6Ik9wZXJhdG9yIn0.eSqSeZrmCTahwltz5jsu5r3w6W15T5h0BvIdqKWQBDcnxAcxKuT-Nwziw_ewySSgHeC172CIWJUpHVp8ACDQG-dfW4KkvA6AcGfSF_f8TBH_rZrVQwlvwwzdA_egGKzhZWcnAC8TDjXRxuaWmnOgWT0aaHZAoW8EvwmKp-1IVz2l0B-hqzfC7dkjMrCI1udLfDvDBza9OtuR-FnKGt8h4nYnRzr8pO2jwebPFyZlR00gVsyK-b411XqprpT-qpRObYZwH5womA-8xIiwRZj9dsfQ1TaHGFkp1LNzxcj_r6pfwVO263bohbeU7ImezQdbvGLJ9NHaglzVNroTui4BXA","expires_in":300,"refresh_expires_in":1800,"refresh_token":"eyJhbGciOiJIUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICI5NjNlMjJiMS0wZmYwLTRmZjktYTg0Zi1hOGI4MzcxOWFiMDEifQ.eyJleHAiOjE2ODM2ODEwNDAsImlhdCI6MTY4MzY3OTI0MCwianRpIjoiMmQyYjIyNmItNjJkOS00YjRjLWI3YTYtMGEwYjk4MGQyMjMwIiwiaXNzIjoiaHR0cDovL2xvY2FsaG9zdDoyOTAwL2F1dGgvcmVhbG1zL29wZW5jMyIsImF1ZCI6Imh0dHA6Ly9sb2NhbGhvc3Q6MjkwMC9hdXRoL3JlYWxtcy9vcGVuYzMiLCJzdWIiOiJhY2UxZTZhMS05MzE5LTQ3NmUtYmY0My02ZjNjYWI5ZWUyZGUiLCJ0eXAiOiJSZWZyZXNoIiwiYXpwIjoiYXBpIiwic2Vzc2lvbl9zdGF0ZSI6ImYzNzg1OTY3LTJhNDYtNGMxMi1hZDBjLWNmZjdmYzQ3N2RmOSIsInNjb3BlIjoib3BlbmlkIHByb2ZpbGUgZW1haWwiLCJzaWQiOiJmMzc4NTk2Ny0yYTQ2LTRjMTItYWQwYy1jZmY3ZmM0NzdkZjkifQ.1HlKdxQkaL5tYuHTXsOceLZFmNNLl9BjoA4oUl70x9M","token_type":"Bearer","id_token":"eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJ0cDlERmpNZGFXMy16WXptdlBqVTZnNTVqMVNhWGhkZHJqU0szQVNvaDhVIn0.eyJleHAiOjE2ODM2Nzk1NDAsImlhdCI6MTY4MzY3OTI0MCwiYXV0aF90aW1lIjowLCJqdGkiOiJhNDJkOTY1ZS1lMzU0LTRiM2QtOTIyYS1hOWE0ZDgwZWYxMTkiLCJpc3MiOiJodHRwOi8vbG9jYWxob3N0OjI5MDAvYXV0aC9yZWFsbXMvb3BlbmMzIiwiYXVkIjoiYXBpIiwic3ViIjoiYWNlMWU2YTEtOTMxOS00NzZlLWJmNDMtNmYzY2FiOWVlMmRlIiwidHlwIjoiSUQiLCJhenAiOiJhcGkiLCJzZXNzaW9uX3N0YXRlIjoiZjM3ODU5NjctMmE0Ni00YzEyLWFkMGMtY2ZmN2ZjNDc3ZGY5IiwiYXRfaGFzaCI6IjNBWE9ISkFKYzFPVldLd2Y0a0Q4TkEiLCJhY3IiOiIxIiwic2lkIjoiZjM3ODU5NjctMmE0Ni00YzEyLWFkMGMtY2ZmN2ZjNDc3ZGY5IiwiZW1haWxfdmVyaWZpZWQiOmZhbHNlLCJuYW1lIjoiVGhlIE9wZXJhdG9yIiwicHJlZmVycmVkX3VzZXJuYW1lIjoib3BlcmF0b3IiLCJnaXZlbl9uYW1lIjoiVGhlIiwiZmFtaWx5X25hbWUiOiJPcGVyYXRvciJ9.gdLl6KOKIIAdl6jYEuAXQrGCNvuwLQb3RDnwrHJdqyFXshiwofBiLMFreRsIE-33xXWNBU6pnSLQHPVlQU5Vmzlk0IOfk-b4yNq0dNa1TV1kmnxRl8w1ulTQYVZjdsN-oyLNwe0v3aJcYtbvIA3DP8rgO6bVv0ogkjWtlda6MbkyZN-har8x3raUVSlUPRP2Basy1xSMNNA1jvB-nEM-aubrUZE6r0PjI6PE1hbLPmuPbcX3uuIwXu2-UoXepkB8H7omUuMm-S98aHpRarwszC0mmHD5b_wiXusMVw4xYw8eavFue4zfw-T2IKuTVtxbMTygXIah6iqi4gkpL8Mx1w","not-before-policy":0,"session_state":"f3785967-2a46-4c12-ad0c-cff7fc477df9","scope":"openid profile email"}\n'})}),"\n",(0,t.jsx)(n.p,{children:"COSMOS Request:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:'# COSMOS Request now looks like this:\n\ncurl -i -H "Content-Type: application/json-rpc" -H "Authorization: eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJ0cDlERmpNZGFXMy16WXptdlBqVTZnNTVqMVNhWGhkZHJqU0szQVNvaDhVIn0.eyJleHAiOjE2ODM2Nzk1NDAsImlhdCI6MTY4MzY3OTI0MCwianRpIjoiZmVlOTQwYWYtZDY3Ny00MWUyLWIzNWYtZDI5ODhiM2RhZGQ2IiwiaXNzIjoiaHR0cDovL2xvY2FsaG9zdDoyOTAwL2F1dGgvcmVhbG1zL29wZW5jMyIsInN1YiI6ImFjZTFlNmExLTkzMTktNDc2ZS1iZjQzLTZmM2NhYjllZTJkZSIsInR5cCI6IkJlYXJlciIsImF6cCI6ImFwaSIsInNlc3Npb25fc3RhdGUiOiJmMzc4NTk2Ny0yYTQ2LTRjMTItYWQwYy1jZmY3ZmM0NzdkZjkiLCJhY3IiOiIxIiwicmVhbG1fYWNjZXNzIjp7InJvbGVzIjpbImRlZmF1bHQtcm9sZXMtb3BlbmMzIiwiQUxMU0NPUEVTX19vcGVyYXRvciIsIm9mZmxpbmVfYWNjZXNzIiwiQUxMU0NPUEVTX192aWV3ZXIiXX0sInNjb3BlIjoib3BlbmlkIHByb2ZpbGUgZW1haWwiLCJzaWQiOiJmMzc4NTk2Ny0yYTQ2LTRjMTItYWQwYy1jZmY3ZmM0NzdkZjkiLCJlbWFpbF92ZXJpZmllZCI6ZmFsc2UsIm5hbWUiOiJUaGUgT3BlcmF0b3IiLCJwcmVmZXJyZWRfdXNlcm5hbWUiOiJvcGVyYXRvciIsImdpdmVuX25hbWUiOiJUaGUiLCJmYW1pbHlfbmFtZSI6Ik9wZXJhdG9yIn0.eSqSeZrmCTahwltz5jsu5r3w6W15T5h0BvIdqKWQBDcnxAcxKuT-Nwziw_ewySSgHeC172CIWJUpHVp8ACDQG-dfW4KkvA6AcGfSF_f8TBH_rZrVQwlvwwzdA_egGKzhZWcnAC8TDjXRxuaWmnOgWT0aaHZAoW8EvwmKp-1IVz2l0B-hqzfC7dkjMrCI1udLfDvDBza9OtuR-FnKGt8h4nYnRzr8pO2jwebPFyZlR00gVsyK-b411XqprpT-qpRObYZwH5womA-8xIiwRZj9dsfQ1TaHGFkp1LNzxcj_r6pfwVO263bohbeU7ImezQdbvGLJ9NHaglzVNroTui4BXA" -d \'{"jsonrpc": "2.0", "method": "tlm", "params": ["INST HEALTH_STATUS TEMP1"], "keyword_params": {"scope": "DEFAULT"}, "id": 8}\' -X POST http://127.0.0.1:2900/openc3-api/api\n'})}),"\n",(0,t.jsx)(n.p,{children:"COSMOS Response:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:'HTTP/1.1 200 OK\nCache-Control: max-age=0, private, must-revalidate\nContent-Type: application/json-rpc\nEtag: W/"1e44c0878528687014e1e60a1cbebdae"\nVary: Origin\nX-Request-Id: 47a8dd26-1348-4693-8df1-5375f60abc6c\nX-Runtime: 0.046477\nDate: Wed, 10 May 2023 00:41:33 GMT\nTransfer-Encoding: chunked\n\n{"jsonrpc":"2.0","id":8,"result":29.204100000000007}\n'})}),"\n",(0,t.jsx)(n.h2,{id:"suite-runner-example",children:"Suite Runner Example"}),"\n",(0,t.jsxs)(n.p,{children:["It can be very useful to run the a suite or script remotely from a continuous testing server. COSMOS' REST API allows for this. To figure out what is required to run a certain task on the web GUI you can open up your browser's developer tools to monitor the network traffic. You will see all the requests and responses required to run a command and you can reformat them yourself to suit your own purposes. Below is an example of running a test script from a Chromium-based browser:\n",(0,t.jsx)(n.img,{src:"https://github.com/OpenC3/cosmos/assets/55999897/df642d42-43e0-47f9-9b52-d42746d9746b",alt:"Network Traffic in browser developer tools"})]}),"\n",(0,t.jsxs)(n.p,{children:['You can see that there are 5 transactions total. To investigate just right-click on the network transaction and click "copy as ',(0,t.jsx)(n.code,{children:"curl"}),'" (depends on the browser). Here is an example of the second one:']}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"curl 'http://localhost:2900/script-api/scripts/TARGET/procedures/cmd_tlm_test.rb/lock?scope=DEFAULT' \\\n -X 'POST' \\\n -H 'Accept: application/json' \\\n -H 'Accept-Language: en-US,en;q=0.9' \\\n -H 'Authorization: pass' \\\n -H 'Connection: keep-alive' \\\n -H 'Content-Length: 0' \\\n -H 'Origin: http://ascportal:2900' \\\n -H 'Referer: http://localhost:2900/tools/scriptrunner/?file=TARGET%2Fprocedures%2Fcmd_tlm_test.rb' \\\n -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36 Edg/124.0.0.0' \\\n --insecure\n"})}),"\n",(0,t.jsxs)(n.p,{children:["Many of the browser-specific headers are not required. The important thing to notice here is the URL and the request (in this case ",(0,t.jsx)(n.code,{children:"POST"}),"). If we inspect all of these we'll find out what each one does:"]}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["Set the script contents","\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"this updates any local changes)"}),"\n",(0,t.jsxs)(n.li,{children:["Note that this is a different request to ",(0,t.jsx)(n.code,{children:"GET"})," the script contents. This is done on the page load."]}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(n.li,{children:"Lock the script (so other users can't edit it during execution)"}),"\n",(0,t.jsx)(n.li,{children:"Run script (this takes a JSON with options)"}),"\n",(0,t.jsx)(n.li,{children:"Open Websocket for logs"}),"\n",(0,t.jsx)(n.li,{children:"Request Result (this URL is a little different because the results are saved in redis)"}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:["Below is a bash script which does all the above given some options. It requires ",(0,t.jsx)(n.code,{children:"curl"})," for the web requests and ",(0,t.jsx)(n.code,{children:"jq"})," for JSON parsing and formatting. It locks and runs the script, continually checks its status, then requests the result."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:'#!/bin/bash\nset -e\nTARGET=${1:-\'TARGET\'}\nSCRIPT=${2:-\'procedures/cmd_tlm_test.rb\'}\nSUITE=${3:-\'TestSuite\'}\nCOSMOS_HOST=\'http://localhost:2900\'\nSCRIPT_API="$COSMOS_HOST/script-api"\nSCRIPT_PATH="scripts/$TARGET/$SCRIPT"\nCURL_ARGS=( \n\t-H \'Accept: application/json\' \n\t-H \'Authorization: password\' \n\t-H \'Accept-Language: en-US,en;q=0.9\' \n\t-H \'Connection: keep-alive\' \n\t-H \'Content-Type: application/json\' \n\t--insecure \n\t--silent )\n\n# Lock script #\ncurl "$SCRIPT_API/$SCRIPT_PATH/lock?scope=DEFAULT" -X "POST" "${CURL_ARGS[@]}"\n\n# Run script #\nRUN_OPTS=$(cat <<-json\n{\n "environment": [],\n "suiteRunner": {\n "method": "start",\n "suite": "$SUITE",\n "options": [\n "continueAfterError"\n ]\n }\n}\njson\n)\nRUN_OPTS=$(<<<"$RUN_OPTS" jq -rc .)\nID=$(curl "$SCRIPT_API/$SCRIPT_PATH/run?scope=DEFAULT" --data-raw "$RUN_OPTS" "${CURL_ARGS[@]}")\n\necho "Starting Script \'$SCRIPT_PATH\' at $(date) (may take up to 15 minutes)" > /dev/stderr\necho "You can monitor it in Script Runner here: $COSMOS_HOST/tools/scriptrunner/$ID" > /dev/stderr\n# Loop while Script ID is still running #\nwhile true; do\n\tSCRIPT_STATUS="$(curl "$SCRIPT_API/running-script?scope=DEFAULT" "${CURL_ARGS[@]}" | jq ".[]|select(.id==$ID)")"\n\tif [[ -z $SCRIPT_STATUS ]]; then\n\t\tbreak;\n\tfi\n\tsleep 2\ndone\n\n# Request results #\nBUCKET_FILE_URI="$(curl "$SCRIPT_API/completed-scripts?scope=DEFAULT" "${CURL_ARGS[@]}" |\\\n\tjq \'[.[]|select(.name | test("\'"${SCRIPT_PATH#scripts/}"\' "))][0] | .log | @uri\' -r)"\n\nURL="$(curl "$COSMOS_HOST/openc3-api/storage/download/$BUCKET_FILE_URI?bucket=OPENC3_LOGS_BUCKET&scope=DEFAULT" "${CURL_ARGS[@]}" |jq .url -r)"\n\ncurl "$COSMOS_HOST$URL" "${CURL_ARGS[@]}"\n'})})]})}function d(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(p,{...e})}):p(e)}},1184:(e,n,i)=>{i.d(n,{R:()=>r});var t=i(4041);const s={},o=t.createContext(s);function r(e){const n=t.useContext(o);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}}}]);