openc3-cosmos-tool-docs 6.0.0 → 6.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (177) hide show
  1. checksums.yaml +4 -4
  2. data/tools/staticdocs/404.html +1 -1
  3. data/tools/staticdocs/assets/js/{019369f3.8413befc.js → 019369f3.1a6a0205.js} +1 -1
  4. data/tools/staticdocs/assets/js/{058ffc22.a4ceeb8e.js → 058ffc22.5cfabd67.js} +1 -1
  5. data/tools/staticdocs/assets/js/{0686a885.ae0a89e8.js → 0686a885.0e2ea47d.js} +1 -1
  6. data/tools/staticdocs/assets/js/{078dbab0.90ef4019.js → 078dbab0.5515d5e3.js} +1 -1
  7. data/tools/staticdocs/assets/js/{0f5d161c.1c827de2.js → 0f5d161c.7697df48.js} +1 -1
  8. data/tools/staticdocs/assets/js/{0ff569c9.3b7f9c95.js → 0ff569c9.f81b787b.js} +1 -1
  9. data/tools/staticdocs/assets/js/{103cc3be.76716a45.js → 103cc3be.e7943c80.js} +1 -1
  10. data/tools/staticdocs/assets/js/{13196248.18801ae0.js → 13196248.ea83002e.js} +1 -1
  11. data/tools/staticdocs/assets/js/{13c1b4e4.4457fa9a.js → 13c1b4e4.eb5250f4.js} +1 -1
  12. data/tools/staticdocs/assets/js/1e02e6a3.f477eca7.js +1 -0
  13. data/tools/staticdocs/assets/js/{2047b354.9470f5c9.js → 2047b354.d91f6c3e.js} +1 -1
  14. data/tools/staticdocs/assets/js/{22b3ac48.ac895789.js → 22b3ac48.0df9587b.js} +1 -1
  15. data/tools/staticdocs/assets/js/26b8abb2.a9f9025d.js +1 -0
  16. data/tools/staticdocs/assets/js/{2bb7bf90.471e10a1.js → 2bb7bf90.4051cf46.js} +1 -1
  17. data/tools/staticdocs/assets/js/31436304.a6b2eb4a.js +1 -0
  18. data/tools/staticdocs/assets/js/3969.afdd070b.js +1 -0
  19. data/tools/staticdocs/assets/js/{3dd7ef3b.d8bb37a8.js → 3dd7ef3b.c3455b97.js} +1 -1
  20. data/tools/staticdocs/assets/js/{40365d27.5f8a5da7.js → 40365d27.5ed2e9b5.js} +1 -1
  21. data/tools/staticdocs/assets/js/{411898ad.c8f67fde.js → 411898ad.f7fc4d80.js} +1 -1
  22. data/tools/staticdocs/assets/js/{42170351.86617d4a.js → 42170351.fbc05869.js} +1 -1
  23. data/tools/staticdocs/assets/js/{43652efd.0c473c25.js → 43652efd.60fa883f.js} +1 -1
  24. data/tools/staticdocs/assets/js/{2124.0e1f26f5.js → 5205.07e5caf3.js} +1 -1
  25. data/tools/staticdocs/assets/js/5328.3e2a53eb.js +1 -0
  26. data/tools/staticdocs/assets/js/53ca7c5b.fe331a71.js +1 -0
  27. data/tools/staticdocs/assets/js/{54d0d530.9ace531c.js → 54d0d530.ef91ba12.js} +1 -1
  28. data/tools/staticdocs/assets/js/5761.e7fabbc9.js +4 -0
  29. data/tools/staticdocs/assets/js/{5b233ba7.565c0c28.js → 5b233ba7.2ea0179c.js} +1 -1
  30. data/tools/staticdocs/assets/js/{5bc719f6.80b7b43c.js → 5bc719f6.b84c55e3.js} +1 -1
  31. data/tools/staticdocs/assets/js/{5c6ce5ec.ed839e0d.js → 5c6ce5ec.67d1d92e.js} +1 -1
  32. data/tools/staticdocs/assets/js/5e3ed378.cc5e2748.js +1 -0
  33. data/tools/staticdocs/assets/js/{5fe211ef.96109971.js → 5fe211ef.5a6390e4.js} +1 -1
  34. data/tools/staticdocs/assets/js/651.a043d7b1.js +1 -0
  35. data/tools/staticdocs/assets/js/6831b732.bb38c0d0.js +1 -0
  36. data/tools/staticdocs/assets/js/{696b4199.34aa1d77.js → 696b4199.2a7ff897.js} +1 -1
  37. data/tools/staticdocs/assets/js/6b210247.ef28d4e5.js +1 -0
  38. data/tools/staticdocs/assets/js/{6b65133b.f71c0e94.js → 6b65133b.0376a397.js} +1 -1
  39. data/tools/staticdocs/assets/js/{6f92e431.c98e31e0.js → 6f92e431.d2ce2753.js} +1 -1
  40. data/tools/staticdocs/assets/js/{72c6d8a8.1053fbd7.js → 72c6d8a8.10f0f9ec.js} +1 -1
  41. data/tools/staticdocs/assets/js/75e64983.81988bef.js +1 -0
  42. data/tools/staticdocs/assets/js/{80c97f38.5a408d9c.js → 80c97f38.607160d3.js} +1 -1
  43. data/tools/staticdocs/assets/js/{867640d5.866fe67b.js → 867640d5.2c0fa6d9.js} +1 -1
  44. data/tools/staticdocs/assets/js/89e76475.a76d0072.js +1 -0
  45. data/tools/staticdocs/assets/js/{8f7843ee.59da8025.js → 8f7843ee.abe30983.js} +1 -1
  46. data/tools/staticdocs/assets/js/9357.9a7e89b5.js +101 -0
  47. data/tools/staticdocs/assets/js/{9424f0b3.cc8aa06e.js → 9424f0b3.bc60f3d9.js} +1 -1
  48. data/tools/staticdocs/assets/js/{97535711.94a5b402.js → 97535711.88c7444a.js} +1 -1
  49. data/tools/staticdocs/assets/js/99581c43.5e55992d.js +1 -0
  50. data/tools/staticdocs/assets/js/9d6e81d0.141ccd61.js +1 -0
  51. data/tools/staticdocs/assets/js/9fb6059a.821f7504.js +1 -0
  52. data/tools/staticdocs/assets/js/{a677c089.d8d7a8f5.js → a677c089.7caa32f6.js} +1 -1
  53. data/tools/staticdocs/assets/js/a9987364.81e9c91d.js +1 -0
  54. data/tools/staticdocs/assets/js/{aa6b6c1b.4f484861.js → aa6b6c1b.72eac29d.js} +1 -1
  55. data/tools/staticdocs/assets/js/{b4596165.a5fe2cea.js → b4596165.c648533a.js} +1 -1
  56. data/tools/staticdocs/assets/js/{b6d70f94.5df56282.js → b6d70f94.7813125e.js} +1 -1
  57. data/tools/staticdocs/assets/js/{b9f60ba6.cdb4a698.js → b9f60ba6.4c0bb1dd.js} +1 -1
  58. data/tools/staticdocs/assets/js/{bd0034eb.5fb449fc.js → bd0034eb.8ad39448.js} +1 -1
  59. data/tools/staticdocs/assets/js/{c24eae19.f419c8fb.js → c24eae19.89738127.js} +1 -1
  60. data/tools/staticdocs/assets/js/{c2598f55.85419dc8.js → c2598f55.812cdcd1.js} +1 -1
  61. data/tools/staticdocs/assets/js/{cb8c3f08.9264e5dd.js → cb8c3f08.07d1c9e9.js} +1 -1
  62. data/tools/staticdocs/assets/js/{cd879be4.aa3c877c.js → cd879be4.59af1749.js} +1 -1
  63. data/tools/staticdocs/assets/js/{d1b923aa.de9e8fd6.js → d1b923aa.a73e7e79.js} +1 -1
  64. data/tools/staticdocs/assets/js/d1bfc316.a58b9bbd.js +1 -0
  65. data/tools/staticdocs/assets/js/{d24bf9b6.1cb515f4.js → d24bf9b6.9fef8263.js} +1 -1
  66. data/tools/staticdocs/assets/js/{d57a4b5d.09769a64.js → d57a4b5d.c74b62b1.js} +1 -1
  67. data/tools/staticdocs/assets/js/{d5d77c37.1704d750.js → d5d77c37.e812e6e7.js} +1 -1
  68. data/tools/staticdocs/assets/js/{d66bf9c0.9a597f56.js → d66bf9c0.842d2efa.js} +1 -1
  69. data/tools/staticdocs/assets/js/d8ca4191.f5da7c6d.js +1 -0
  70. data/tools/staticdocs/assets/js/{d9b92eba.5a40eb6d.js → d9b92eba.34e63ba6.js} +1 -1
  71. data/tools/staticdocs/assets/js/{db8fa1d0.f9f65c91.js → db8fa1d0.94b76b52.js} +1 -1
  72. data/tools/staticdocs/assets/js/{dbe31111.dae4b9bd.js → dbe31111.75e9fc53.js} +1 -1
  73. data/tools/staticdocs/assets/js/dc5f7beb.9e4e6681.js +1 -0
  74. data/tools/staticdocs/assets/js/{e501b0d1.cb2ef34f.js → e501b0d1.d3a1e4bc.js} +1 -1
  75. data/tools/staticdocs/assets/js/{ebec1ccb.086b8668.js → ebec1ccb.120a5b80.js} +1 -1
  76. data/tools/staticdocs/assets/js/{f15615f1.afd4ba93.js → f15615f1.49804e96.js} +1 -1
  77. data/tools/staticdocs/assets/js/fd886806.124ffe26.js +1 -0
  78. data/tools/staticdocs/assets/js/main.ed84fc7e.js +36 -0
  79. data/tools/staticdocs/assets/js/runtime~main.91337aca.js +1 -0
  80. data/tools/staticdocs/docs/configuration/accessors.html +2 -2
  81. data/tools/staticdocs/docs/configuration/command.html +2 -2
  82. data/tools/staticdocs/docs/configuration/format.html +2 -2
  83. data/tools/staticdocs/docs/configuration/interfaces.html +2 -2
  84. data/tools/staticdocs/docs/configuration/plugins.html +4 -4
  85. data/tools/staticdocs/docs/configuration/protocols.html +2 -2
  86. data/tools/staticdocs/docs/configuration/ssl-tls.html +2 -2
  87. data/tools/staticdocs/docs/configuration/table.html +2 -2
  88. data/tools/staticdocs/docs/configuration/target.html +2 -2
  89. data/tools/staticdocs/docs/configuration/telemetry-screens.html +2 -2
  90. data/tools/staticdocs/docs/configuration/telemetry.html +2 -2
  91. data/tools/staticdocs/docs/configuration.html +1 -1
  92. data/tools/staticdocs/docs/development/curl.html +2 -2
  93. data/tools/staticdocs/docs/development/developing.html +3 -3
  94. data/tools/staticdocs/docs/development/json-api.html +2 -2
  95. data/tools/staticdocs/docs/development/log-structure.html +2 -2
  96. data/tools/staticdocs/docs/development/roadmap.html +2 -2
  97. data/tools/staticdocs/docs/development/streaming-api.html +2 -2
  98. data/tools/staticdocs/docs/development/testing.html +2 -2
  99. data/tools/staticdocs/docs/development.html +1 -1
  100. data/tools/staticdocs/docs/getting-started/generators.html +2 -2
  101. data/tools/staticdocs/docs/getting-started/gettingstarted.html +2 -2
  102. data/tools/staticdocs/docs/getting-started/installation.html +2 -2
  103. data/tools/staticdocs/docs/getting-started/key_concepts.html +2 -2
  104. data/tools/staticdocs/docs/getting-started/podman.html +2 -2
  105. data/tools/staticdocs/docs/getting-started/requirements.html +2 -2
  106. data/tools/staticdocs/docs/getting-started/upgrading.html +4 -3
  107. data/tools/staticdocs/docs/getting-started.html +1 -1
  108. data/tools/staticdocs/docs/guides/bridges.html +2 -2
  109. data/tools/staticdocs/docs/guides/cfs.html +2 -2
  110. data/tools/staticdocs/docs/guides/custom-widgets.html +2 -2
  111. data/tools/staticdocs/docs/guides/exposing_microservices.html +33 -0
  112. data/tools/staticdocs/docs/guides/little-endian-bitfields.html +2 -2
  113. data/tools/staticdocs/docs/guides/local-mode.html +2 -2
  114. data/tools/staticdocs/docs/guides/logging.html +2 -2
  115. data/tools/staticdocs/docs/guides/monitoring.html +2 -2
  116. data/tools/staticdocs/docs/guides/performance.html +2 -2
  117. data/tools/staticdocs/docs/guides/raspberrypi.html +2 -2
  118. data/tools/staticdocs/docs/guides/script-writing.html +2 -2
  119. data/tools/staticdocs/docs/guides/scripting-api.html +3 -3
  120. data/tools/staticdocs/docs/guides.html +1 -1
  121. data/tools/staticdocs/docs/meta/contributing.html +2 -2
  122. data/tools/staticdocs/docs/meta/licenses.html +2 -2
  123. data/tools/staticdocs/docs/meta/philosophy.html +2 -2
  124. data/tools/staticdocs/docs/meta/xtce.html +2 -2
  125. data/tools/staticdocs/docs/meta.html +1 -1
  126. data/tools/staticdocs/docs/privacy.html +2 -2
  127. data/tools/staticdocs/docs/tools/admin.html +2 -2
  128. data/tools/staticdocs/docs/tools/autonomic.html +2 -2
  129. data/tools/staticdocs/docs/tools/bucket-explorer.html +2 -2
  130. data/tools/staticdocs/docs/tools/calendar.html +2 -2
  131. data/tools/staticdocs/docs/tools/cmd-sender.html +2 -2
  132. data/tools/staticdocs/docs/tools/cmd-tlm-server.html +2 -2
  133. data/tools/staticdocs/docs/tools/command_history.html +2 -2
  134. data/tools/staticdocs/docs/tools/data-extractor.html +2 -2
  135. data/tools/staticdocs/docs/tools/data-viewer.html +2 -2
  136. data/tools/staticdocs/docs/tools/handbooks.html +2 -2
  137. data/tools/staticdocs/docs/tools/limits-monitor.html +2 -2
  138. data/tools/staticdocs/docs/tools/packet-viewer.html +2 -2
  139. data/tools/staticdocs/docs/tools/script-runner.html +2 -2
  140. data/tools/staticdocs/docs/tools/table-manager.html +2 -2
  141. data/tools/staticdocs/docs/tools/tlm-grapher.html +2 -2
  142. data/tools/staticdocs/docs/tools/tlm-viewer.html +2 -2
  143. data/tools/staticdocs/docs/tools.html +1 -1
  144. data/tools/staticdocs/docs.html +2 -2
  145. data/tools/staticdocs/index.html +1 -1
  146. data/tools/staticdocs/lunr-index-1736455916496.json +1 -0
  147. data/tools/staticdocs/lunr-index.json +1 -1
  148. data/tools/staticdocs/markdown-page.html +2 -2
  149. data/tools/staticdocs/search-doc-1736455916496.json +1 -0
  150. data/tools/staticdocs/search-doc.json +1 -1
  151. data/tools/staticdocs/sitemap.xml +1 -1
  152. metadata +82 -80
  153. data/tools/staticdocs/assets/js/1602.1e622848.js +0 -1
  154. data/tools/staticdocs/assets/js/1e02e6a3.8e63f255.js +0 -1
  155. data/tools/staticdocs/assets/js/26b8abb2.45d268b1.js +0 -1
  156. data/tools/staticdocs/assets/js/3040.18a0bb2a.js +0 -4
  157. data/tools/staticdocs/assets/js/3687.6fa52db1.js +0 -101
  158. data/tools/staticdocs/assets/js/4303.a84f454a.js +0 -1
  159. data/tools/staticdocs/assets/js/53ca7c5b.f0e35da3.js +0 -1
  160. data/tools/staticdocs/assets/js/5e3ed378.048e258b.js +0 -1
  161. data/tools/staticdocs/assets/js/6831b732.4008a669.js +0 -1
  162. data/tools/staticdocs/assets/js/6b210247.d37e3087.js +0 -1
  163. data/tools/staticdocs/assets/js/75e64983.6b588c87.js +0 -1
  164. data/tools/staticdocs/assets/js/7690.fc05b8e6.js +0 -1
  165. data/tools/staticdocs/assets/js/89e76475.b4e9da15.js +0 -1
  166. data/tools/staticdocs/assets/js/99581c43.ebea1d08.js +0 -1
  167. data/tools/staticdocs/assets/js/9d6e81d0.4bc52207.js +0 -1
  168. data/tools/staticdocs/assets/js/9fb6059a.57936fbe.js +0 -1
  169. data/tools/staticdocs/assets/js/a9987364.2aa836fd.js +0 -1
  170. data/tools/staticdocs/assets/js/d1bfc316.82dd17ab.js +0 -1
  171. data/tools/staticdocs/assets/js/d8ca4191.1861d710.js +0 -1
  172. data/tools/staticdocs/assets/js/dc5f7beb.15fc7cc8.js +0 -1
  173. data/tools/staticdocs/assets/js/fd886806.fa25adc4.js +0 -1
  174. data/tools/staticdocs/assets/js/main.1a59b278.js +0 -36
  175. data/tools/staticdocs/assets/js/runtime~main.25e99a76.js +0 -1
  176. data/tools/staticdocs/lunr-index-1734474862542.json +0 -1
  177. data/tools/staticdocs/search-doc-1734474862542.json +0 -1
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([["6868"],{4132:function(e,s,t){t.r(s),t.d(s,{default:()=>h,frontMatter:()=>o,metadata:()=>n,assets:()=>c,toc:()=>l,contentTitle:()=>a});var n=JSON.parse('{"id":"configuration/accessors","title":"Accessors","description":"Responsible for reading and writing data to a buffer","source":"@site/docs/configuration/accessors.md","sourceDirName":"configuration","slug":"/configuration/accessors","permalink":"/tools/staticdocs/docs/configuration/accessors","draft":false,"unlisted":false,"editUrl":"https://github.com/OpenC3/cosmos/tree/main/docs.openc3.com/docs/configuration/accessors.md","tags":[],"version":"current","sidebarPosition":8,"frontMatter":{"sidebar_position":8,"title":"Accessors","description":"Responsible for reading and writing data to a buffer","sidebar_custom_props":{"myEmoji":"\u270F\uFE0F"}},"sidebar":"defaultSidebar","previous":{"title":"Protocols","permalink":"/tools/staticdocs/docs/configuration/protocols"},"next":{"title":"Tables","permalink":"/tools/staticdocs/docs/configuration/table"}}'),r=t("2322"),i=t("2840");let o={sidebar_position:8,title:"Accessors",description:"Responsible for reading and writing data to a buffer",sidebar_custom_props:{myEmoji:"\u270F\uFE0F"}},a=void 0,c={},l=[{value:"Binary Accessor",id:"binary-accessor",level:3},{value:"Commands",id:"commands",level:4},{value:"Telemetry",id:"telemetry",level:4},{value:"CBOR Accessor",id:"cbor-accessor",level:3},{value:"Commands",id:"commands-1",level:4},{value:"Telemetry",id:"telemetry-1",level:4},{value:"Form Accessor",id:"form-accessor",level:3},{value:"Commands",id:"commands-2",level:4},{value:"Telemetry",id:"telemetry-2",level:4},{value:"HTML Accessor",id:"html-accessor",level:3},{value:"Commands",id:"commands-3",level:4},{value:"Telemetry",id:"telemetry-3",level:4},{value:"HTTP Accessor",id:"http-accessor",level:3},{value:"Commands",id:"commands-4",level:4},{value:"Telemetry",id:"telemetry-4",level:4},{value:"JSON Accessor",id:"json-accessor",level:3},{value:"Commands",id:"commands-5",level:4},{value:"Telemetry",id:"telemetry-5",level:4},{value:"Template Accessor",id:"template-accessor",level:3},{value:"Commands",id:"commands-6",level:4},{value:"Telemetry",id:"telemetry-6",level:4},{value:"XML Accessor",id:"xml-accessor",level:3},{value:"Commands",id:"commands-7",level:4},{value:"Telemetry",id:"telemetry-7",level:4},{value:"GEMS Ascii (Enterprise)",id:"gems-ascii-enterprise",level:3},{value:"Prometheus (Enterprise)",id:"prometheus-enterprise",level:3},{value:"Protocol Buffer (Enterprise)",id:"protocol-buffer-enterprise",level:3}];function d(e){let s={a:"a",code:"code",h3:"h3",h4:"h4",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,i.a)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.p,{children:"Accessors are the low level code which know how to read and write data into a buffer. The buffer data then gets written out an interface which uses protocols to potentially change the data before it goes to the target. Accessors handle the different serializations formats such as binary (CCSDS), JSON, CBOR, XML, HTML, Protocol Buffers, etc."}),"\n",(0,r.jsxs)(s.p,{children:["For more information about how Accessors fit with Interfaces and Protocols see ",(0,r.jsx)(s.a,{href:"https://www.openc3.com/news/interoperability-without-standards",children:"Interoperability Without Standards"}),"."]}),"\n",(0,r.jsx)(s.p,{children:"COSMOS provides the following built-in accessors: Binary, CBOR, Form, HTML, HTTP, JSON, Template, XML."}),"\n",(0,r.jsx)(s.p,{children:"COSMOS Enterprise provides the following accessors: GEMS Ascii, Prometheus, Protocol Buffer."}),"\n",(0,r.jsx)(s.h3,{id:"binary-accessor",children:"Binary Accessor"}),"\n",(0,r.jsx)(s.p,{children:"The Binary Accessor serializes data into a binary format when writing to the buffer. This is how many devices expect their data including those following the CCSDS standard. COSMOS handles converting signed and unsigned integers, floats, strings, etc. into their binary representation in the buffer. This includes handling big and little endian, bitfields, and variable length fields. Since binary is so common this is the default Accessor and will be used if no other accessors are given."}),"\n",(0,r.jsx)(s.h4,{id:"commands",children:"Commands"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-ruby",children:'COMMAND INST COLLECT BIG_ENDIAN "Starts a collect"\n ACCESSOR BinaryAccessor # Typically not explicitly defined because it is the default\n PARAMETER TYPE 64 16 UINT MIN MAX 0 "Collect type"\n PARAMETER DURATION 80 32 FLOAT 0.0 10.0 1.0 "Collect duration"\n PARAMETER OPCODE 112 8 UINT 0x0 0xFF 0xAB "Collect opcode"\n'})}),"\n",(0,r.jsx)(s.h4,{id:"telemetry",children:"Telemetry"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-ruby",children:'TELEMETRY INST HEALTH_STATUS BIG_ENDIAN "Health and status"\n ACCESSOR BinaryAccessor # Typically not explicitly defined because it is the default\n APPEND_ITEM CMD_ACPT_CNT 32 UINT "Command accept count"\n APPEND_ITEM COLLECTS 16 UINT "Number of collects"\n APPEND_ITEM DURATION 32 FLOAT "Most recent collect duration"\n'})}),"\n",(0,r.jsx)(s.h3,{id:"cbor-accessor",children:"CBOR Accessor"}),"\n",(0,r.jsxs)(s.p,{children:["The Concise Binary Object Representation (",(0,r.jsx)(s.a,{href:"https://en.wikipedia.org/wiki/CBOR",children:"CBOR"}),") Accessor serializes data into a binary format loosely based on JSON. It is a subclass of the JSON Accessor and is what COSMOS uses natively to store log files."]}),"\n",(0,r.jsx)(s.h4,{id:"commands-1",children:"Commands"}),"\n",(0,r.jsxs)(s.p,{children:["Using the CBOR Accessor for ",(0,r.jsx)(s.a,{href:"command",children:"command definitions"})," requires the use of ",(0,r.jsx)(s.a,{href:"command#template_file",children:"TEMPLATE_FILE"})," and ",(0,r.jsx)(s.a,{href:"command#key",children:"KEY"})," to allow the user to set values in the CBOR data. Note that the KEY values use ",(0,r.jsx)(s.a,{href:"https://en.wikipedia.org/wiki/JSONPath",children:"JSONPath"}),"."]}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-ruby",children:'COMMAND CBOR CBORCMD BIG_ENDIAN "CBOR Accessor Command"\n ACCESSOR CborAccessor\n TEMPLATE_FILE _cbor_template.bin\n APPEND_ID_PARAMETER ID_ITEM 32 INT 2 2 2 "Int Item"\n KEY $.id_item\n APPEND_PARAMETER ITEM1 16 UINT MIN MAX 101 "Int Item 2"\n KEY $.item1\n UNITS CELSIUS C\n APPEND_PARAMETER ITEM2 16 UINT MIN MAX 12 "Int Item 3"\n KEY $.more.item2\n FORMAT_STRING "0x%X"\n APPEND_PARAMETER ITEM3 64 FLOAT MIN MAX 3.14 "Float Item"\n KEY $.more.item3\n APPEND_PARAMETER ITEM4 128 STRING "Example" "String Item"\n KEY $.more.item4\n APPEND_ARRAY_PARAMETER ITEM5 8 UINT 0 "Array Item"\n KEY $.more.item5\n'})}),"\n",(0,r.jsx)(s.p,{children:"Creating the template file requires the use of the Ruby or Python CBOR libraries. Here is an example from Ruby:"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-ruby",children:'require \'cbor\'\ndata = {"id_item" : 2, "item1" : 101, "more" : { "item2" : 12, "item3" : 3.14, "item4" : "Example", "item5" : [4, 3, 2, 1] } }\nFile.open("_cbor_template.bin", \'wb\') do |file|\n file.write(data.to_cbor)\nend\n'})}),"\n",(0,r.jsx)(s.h4,{id:"telemetry-1",children:"Telemetry"}),"\n",(0,r.jsxs)(s.p,{children:["Using the CBOR Accessor for ",(0,r.jsx)(s.a,{href:"telemetry",children:"telemetry definitions"})," only requires the use of ",(0,r.jsx)(s.a,{href:"command#key",children:"KEY"})," to pull values from the CBOR data. Note that the KEY values use ",(0,r.jsx)(s.a,{href:"https://en.wikipedia.org/wiki/JSONPath",children:"JSONPath"}),"."]}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-ruby",children:'TELEMETRY CBOR CBORTLM BIG_ENDIAN "CBOR Accessor Telemetry"\n ACCESSOR CborAccessor\n APPEND_ID_ITEM ID_ITEM 32 INT 2 "Int Item"\n KEY $.id_item\n APPEND_ITEM ITEM1 16 UINT "Int Item 2"\n KEY $.item1\n GENERIC_READ_CONVERSION_START UINT 16\n value * 2\n GENERIC_READ_CONVERSION_END\n UNITS CELSIUS C\n APPEND_ITEM ITEM2 16 UINT "Int Item 3"\n KEY $.more.item2\n FORMAT_STRING "0x%X"\n APPEND_ITEM ITEM3 64 FLOAT "Float Item"\n KEY $.more.item3\n APPEND_ITEM ITEM4 128 STRING "String Item"\n KEY $.more.item4\n APPEND_ARRAY_ITEM ITEM5 8 UINT 0 "Array Item"\n KEY $.more.item5\n'})}),"\n",(0,r.jsx)(s.h3,{id:"form-accessor",children:"Form Accessor"}),"\n",(0,r.jsxs)(s.p,{children:["The Form Accessor is typically used with the ",(0,r.jsx)(s.a,{href:"interfaces#http-client-interface",children:"HTTP Client"})," interface to submit forms to a remote HTTP Server."]}),"\n",(0,r.jsx)(s.h4,{id:"commands-2",children:"Commands"}),"\n",(0,r.jsxs)(s.p,{children:["Using the Form Accessor for ",(0,r.jsx)(s.a,{href:"command",children:"command definitions"})," requires the use of ",(0,r.jsx)(s.a,{href:"command#key",children:"KEY"})," to allow the user to set values in the HTTP form. Note that the KEY values use ",(0,r.jsx)(s.a,{href:"https://en.wikipedia.org/wiki/XPath",children:"XPath"}),"."]}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-ruby",children:'COMMAND FORM FORMCMD BIG_ENDIAN "Form Accessor Command"\n ACCESSOR FormAccessor\n APPEND_ID_PARAMETER ID_ITEM 32 INT 2 2 2 "Int Item"\n KEY $.id_item\n APPEND_PARAMETER ITEM1 16 UINT MIN MAX 101 "Int Item 2"\n KEY $.item1\n UNITS CELSIUS C\n'})}),"\n",(0,r.jsx)(s.h4,{id:"telemetry-2",children:"Telemetry"}),"\n",(0,r.jsxs)(s.p,{children:["Using the Form Accessor for ",(0,r.jsx)(s.a,{href:"telemetry",children:"telemetry definitions"})," only requires the use of ",(0,r.jsx)(s.a,{href:"command#key",children:"KEY"})," to pull values from the HTTP response data. Note that the KEY values use ",(0,r.jsx)(s.a,{href:"https://en.wikipedia.org/wiki/XPath",children:"XPath"}),"."]}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-ruby",children:'TELEMETRY FORM FORMTLM BIG_ENDIAN "Form Accessor Telemetry"\n ACCESSOR FormAccessor\n APPEND_ID_ITEM ID_ITEM 32 INT 1 "Int Item"\n KEY $.id_item\n APPEND_ITEM ITEM1 16 UINT "Int Item 2"\n KEY $.item1\n'})}),"\n",(0,r.jsx)(s.h3,{id:"html-accessor",children:"HTML Accessor"}),"\n",(0,r.jsxs)(s.p,{children:["The HTML Accessor is typically used with the ",(0,r.jsx)(s.a,{href:"interfaces#http-client-interface",children:"HTTP Client"})," interface to parse a web page."]}),"\n",(0,r.jsxs)(s.p,{children:["For a full example see ",(0,r.jsx)(s.a,{href:"https://github.com/OpenC3/cosmos/tree/main/examples/openc3-cosmos-http-get",children:"openc3-cosmos-http-get"}),"."]}),"\n",(0,r.jsx)(s.h4,{id:"commands-3",children:"Commands"}),"\n",(0,r.jsx)(s.p,{children:"HTML Accessor is not typically used for commands but it would be similar to Telemetry using XPath Keys."}),"\n",(0,r.jsx)(s.h4,{id:"telemetry-3",children:"Telemetry"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-ruby",children:'TELEMETRY HTML RESPONSE BIG_ENDIAN "Search results"\n # Typically you use the HtmlAccessor to parse out the page that is returned\n # HtmlAccessor is passed to HttpAccessor and used internally\n ACCESSOR HttpAccessor HtmlAccessor\n APPEND_ITEM NAME 240 STRING\n # Keys were located by doing a manual search and then inspecting the page\n # Right click the text you\'re looking for and then Copy -> Copy XPath\n KEY normalize-space(//main/div/a[2]/span/h2/text())\n APPEND_ITEM DESCRIPTION 480 STRING\n KEY //main/div/a[2]/span/p/text()\n APPEND_ITEM VERSION 200 STRING\n KEY //main/div/a[2]/span/h2/span/text()\n APPEND_ITEM DOWNLOADS 112 STRING\n KEY normalize-space(//main/div/a[2]/p/text())\n'})}),"\n",(0,r.jsx)(s.h3,{id:"http-accessor",children:"HTTP Accessor"}),"\n",(0,r.jsxs)(s.p,{children:["HTTP Accessor is typically used with the ",(0,r.jsx)(s.a,{href:"interfaces#http-client-interface",children:"HTTP Client"})," or ",(0,r.jsx)(s.a,{href:"interfaces#http-server-interface",children:"HTTP Server"})," interface to parse a web page. It takes another accessor to do the low level reading and writing of the items. The default accessor is FormAccessor. HtlmAccessor, XmlAccessor and JsonAccessor are also common for manipulating HTML, XML and JSON respectively."]}),"\n",(0,r.jsxs)(s.p,{children:["For a full example see ",(0,r.jsx)(s.a,{href:"https://github.com/OpenC3/cosmos/tree/main/examples/openc3-cosmos-http-get",children:"openc3-cosmos-http-get"}),"."]}),"\n",(0,r.jsx)(s.h4,{id:"commands-4",children:"Commands"}),"\n",(0,r.jsx)(s.p,{children:"When used with the HTTP Client Interface, HTTP Accessor utilizes the following command parameters:"}),"\n",(0,r.jsxs)(s.table,{children:[(0,r.jsx)(s.thead,{children:(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.th,{children:"Parameter"}),(0,r.jsx)(s.th,{children:"Description"})]})}),(0,r.jsxs)(s.tbody,{children:[(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:"HTTP_PATH"}),(0,r.jsx)(s.td,{children:"requests at this path"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:"HTTP_METHOD"}),(0,r.jsx)(s.td,{children:"request method (GET, POST, DELETE)"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:"HTTP_PACKET"}),(0,r.jsx)(s.td,{children:"telemetry packet to store the response"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:"HTTP_ERROR_PACKET"}),(0,r.jsx)(s.td,{children:"telemetry packet to store error responses (status code >= 300)"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:"HTTP_QUERY_XXX"}),(0,r.jsx)(s.td,{children:"sets a value in the params passed to the request (XXX => value, or KEY => value), see example below"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:"HTTP_HEADER_XXX"}),(0,r.jsx)(s.td,{children:"sets a value in the headers passed to the request (XXX => value, or KEY => value), see example below"})]})]})]}),"\n",(0,r.jsx)(s.p,{children:"When used with the HTTP Server Interface, HTTP Accessor utilizes the following command parameters:"}),"\n",(0,r.jsxs)(s.table,{children:[(0,r.jsx)(s.thead,{children:(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.th,{children:"Parameter"}),(0,r.jsx)(s.th,{children:"Description"})]})}),(0,r.jsxs)(s.tbody,{children:[(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:"HTTP_STATUS"}),(0,r.jsx)(s.td,{children:"status to return to clients"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:"HTTP_PATH"}),(0,r.jsx)(s.td,{children:"mount point for server"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:"HTTP_PACKET"}),(0,r.jsx)(s.td,{children:"telemetry packet to store the request"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:"HTTP_HEADER_XXX"}),(0,r.jsx)(s.td,{children:"sets a value in the response headers (XXX => value, or KEY => value), see example below"})]})]})]}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-ruby",children:'COMMAND HTML SEARCH BIG_ENDIAN "Searches Rubygems.org"\n # Note FormAccessor is the default argument for HttpAccessor so it is typically not specified\n ACCESSOR HttpAccessor\n PARAMETER HTTP_PATH 0 0 DERIVED nil nil "/search"\n PARAMETER HTTP_METHOD 0 0 DERIVED nil nil "GET"\n PARAMETER HTTP_PACKET 0 0 DERIVED nil nil "RESPONSE"\n PARAMETER HTTP_ERROR_PACKET 0 0 DERIVED nil nil "ERROR"\n # This sets parameter query=openc3+cosmos\n # Note the parameter name \'query\' based on HTTP_QUERY_QUERY\n PARAMETER HTTP_QUERY_QUERY 0 0 DERIVED nil nil "openc3 cosmos"\n GENERIC_READ_CONVERSION_START\n value.split.join(\'+\')\n GENERIC_READ_CONVERSION_END\n # This sets header Content-Type=text/html\n # Note that TYPE is not used since the KEY is specified\n PARAMETER HTTP_HEADER_TYPE 0 0 DERIVED nil nil "text/html"\n KEY Content-Type\n'})}),"\n",(0,r.jsx)(s.h4,{id:"telemetry-4",children:"Telemetry"}),"\n",(0,r.jsx)(s.p,{children:"HTTP Accessor utilizes the following telemetry items:"}),"\n",(0,r.jsxs)(s.table,{children:[(0,r.jsx)(s.thead,{children:(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.th,{children:"Parameter"}),(0,r.jsx)(s.th,{children:"Description"})]})}),(0,r.jsxs)(s.tbody,{children:[(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:"HTTP_STATUS"}),(0,r.jsx)(s.td,{children:"the request status"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:"HTTP_HEADERS"}),(0,r.jsx)(s.td,{children:"hash of the response headers"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:"HTTP_REQUEST"}),(0,r.jsxs)(s.td,{children:["optional hash which returns all the request parameters, see ",(0,r.jsx)(s.a,{href:"interfaces#http-client-interface",children:"HTTP Client Interface"})]})]})]})]}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-ruby",children:'TELEMETRY HTML RESPONSE BIG_ENDIAN "Search results"\n # Typically you use the HtmlAccessor to parse out the page that is returned\n ACCESSOR HttpAccessor HtmlAccessor\n APPEND_ITEM NAME 240 STRING\n # Keys were located by doing a manual search and then inspecting the page\n # Right click the text you\'re looking for and then Copy -> Copy XPath\n KEY normalize-space(//main/div/a[2]/span/h2/text())\n APPEND_ITEM DESCRIPTION 480 STRING\n KEY //main/div/a[2]/span/p/text()\n APPEND_ITEM VERSION 200 STRING\n KEY //main/div/a[2]/span/h2/span/text()\n APPEND_ITEM DOWNLOADS 112 STRING\n KEY normalize-space(//main/div/a[2]/p/text())\n'})}),"\n",(0,r.jsx)(s.h3,{id:"json-accessor",children:"JSON Accessor"}),"\n",(0,r.jsxs)(s.p,{children:["The JSON Accessor serializes data into JavaScript Object Notation (",(0,r.jsx)(s.a,{href:"https://en.wikipedia.org/wiki/JSON",children:"JSON"}),"). JSON is a data interchange format that uses human-readable text to transmit data consisting of key value pairs and arrays."]}),"\n",(0,r.jsxs)(s.p,{children:["For a full example see ",(0,r.jsx)(s.a,{href:"https://github.com/OpenC3/cosmos/tree/main/examples/openc3-cosmos-accessor-test",children:"openc3-cosmos-accessor-test"}),"."]}),"\n",(0,r.jsx)(s.h4,{id:"commands-5",children:"Commands"}),"\n",(0,r.jsxs)(s.p,{children:["Using the JSON Accessor for ",(0,r.jsx)(s.a,{href:"command",children:"command definitions"})," requires the use of ",(0,r.jsx)(s.a,{href:"command#template",children:"TEMPLATE"})," and ",(0,r.jsx)(s.a,{href:"command#key",children:"KEY"})," to allow the user to set values in the JSON data. Note that the KEY values use ",(0,r.jsx)(s.a,{href:"https://en.wikipedia.org/wiki/JSONPath",children:"JSONPath"}),"."]}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-ruby",children:'COMMAND JSON JSONCMD BIG_ENDIAN "JSON Accessor Command"\n ACCESSOR JsonAccessor\n TEMPLATE \'{"id_item":1, "item1":101, "more": { "item2":12, "item3":3.14, "item4":"Example", "item5":[4, 3, 2, 1] } }\'\n APPEND_ID_PARAMETER ID_ITEM 32 INT 2 2 2 "Int Item"\n KEY $.id_item\n APPEND_PARAMETER ITEM1 16 UINT MIN MAX 101 "Int Item 2"\n KEY $.item1\n UNITS CELSIUS C\n APPEND_PARAMETER ITEM2 16 UINT MIN MAX 12 "Int Item 3"\n KEY $.more.item2\n FORMAT_STRING "0x%X"\n APPEND_PARAMETER ITEM3 64 FLOAT MIN MAX 3.14 "Float Item"\n KEY $.more.item3\n APPEND_PARAMETER ITEM4 128 STRING "Example" "String Item"\n KEY $.more.item4\n APPEND_ARRAY_PARAMETER ITEM5 8 UINT 0 "Array Item"\n KEY $.more.item5\n'})}),"\n",(0,r.jsx)(s.h4,{id:"telemetry-5",children:"Telemetry"}),"\n",(0,r.jsxs)(s.p,{children:["Using the JSON Accessor for ",(0,r.jsx)(s.a,{href:"telemetry",children:"telemetry definitions"})," only requires the use of ",(0,r.jsx)(s.a,{href:"command#key",children:"KEY"})," to pull values from the JSON data. Note that the KEY values use ",(0,r.jsx)(s.a,{href:"https://en.wikipedia.org/wiki/JSONPath",children:"JSONPath"}),"."]}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-ruby",children:'TELEMETRY JSON JSONTLM BIG_ENDIAN "JSON Accessor Telemetry"\n ACCESSOR JsonAccessor\n APPEND_ID_ITEM ID_ITEM 32 INT 1 "Int Item"\n KEY $.id_item\n APPEND_ITEM ITEM1 16 UINT "Int Item 2"\n KEY $.item1\n GENERIC_READ_CONVERSION_START UINT 16\n value * 2\n GENERIC_READ_CONVERSION_END\n UNITS CELSIUS C\n APPEND_ITEM ITEM2 16 UINT "Int Item 3"\n KEY $.more.item2\n FORMAT_STRING "0x%X"\n APPEND_ITEM ITEM3 64 FLOAT "Float Item"\n KEY $.more.item3\n APPEND_ITEM ITEM4 128 STRING "String Item"\n KEY $.more.item4\n APPEND_ARRAY_ITEM ITEM5 8 UINT 0 "Array Item"\n KEY $.more.item5\n'})}),"\n",(0,r.jsx)(s.h3,{id:"template-accessor",children:"Template Accessor"}),"\n",(0,r.jsxs)(s.p,{children:["The Template Accessor is commonly used with string based command / response protocols such as the ",(0,r.jsx)(s.a,{href:"protocols#cmdresponse-protocol",children:"CmdResponseProtocol"}),"."]}),"\n",(0,r.jsxs)(s.p,{children:["For a full example see ",(0,r.jsx)(s.a,{href:"https://github.com/OpenC3/cosmos-enterprise-plugins/tree/main/openc3-cosmos-scpi-power-supply",children:"openc3-cosmos-scpi-power-supply"})," in the COSMOS Enterprise Plugins."]}),"\n",(0,r.jsx)(s.h4,{id:"commands-6",children:"Commands"}),"\n",(0,r.jsxs)(s.p,{children:["Using the Template Accessor for ",(0,r.jsx)(s.a,{href:"command",children:"command definitions"})," requires the use of ",(0,r.jsx)(s.a,{href:"command#template",children:"TEMPLATE"})," to define a string template with optional parameters that are populated using the command parameters."]}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-ruby",children:'# Some commands don\'t have any parameters and the template is sent as-is\nCOMMAND SCPI_PS RESET BIG_ENDIAN "Reset the power supply state"\n ACCESSOR TemplateAccessor\n TEMPLATE "*RST"\n\n# This command has two parameters in the template defined by <XXX>\nCOMMAND SCPI_PS VOLTAGE BIG_ENDIAN "Sets the voltage of a power supply channel"\n ACCESSOR TemplateAccessor\n # <VOLTAGE> and <CHANNEL> are replaced by the parameter values\n TEMPLATE "VOLT <VOLTAGE>, (@<CHANNEL>)"\n APPEND_PARAMETER VOLTAGE 32 FLOAT MIN MAX 0.0 "Voltage Setting"\n UNITS VOLTS V\n APPEND_PARAMETER CHANNEL 8 UINT 1 2 1 "Output Channel"\n'})}),"\n",(0,r.jsx)(s.h4,{id:"telemetry-6",children:"Telemetry"}),"\n",(0,r.jsxs)(s.p,{children:["Using the Template Accessor for ",(0,r.jsx)(s.a,{href:"telemetry",children:"telemetry definitions"})," requires the use of ",(0,r.jsx)(s.a,{href:"telemetry#template",children:"TEMPLATE"})," to define a template where telemetry values are pulled from the string buffer."]}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-ruby",children:'TELEMETRY SCPI_PS STATUS BIG_ENDIAN "Power supply status"\n ACCESSOR TemplateAccessor\n # The raw string from the target is something like "1.234,2.345"\n # String is split by the comma and pushed into MEAS_VOLTAGE_1, MEAS_VOLTAGE_2\n TEMPLATE "<MEAS_VOLTAGE_1>,<MEAS_VOLTAGE_2>"\n APPEND_ITEM MEAS_VOLTAGE_1 32 FLOAT "Current Reading for Channel 1"\n APPEND_ITEM MEAS_VOLTAGE_2 32 FLOAT "Current Reading for Channel 2"\n'})}),"\n",(0,r.jsx)(s.h3,{id:"xml-accessor",children:"XML Accessor"}),"\n",(0,r.jsxs)(s.p,{children:["The XML Accessor is typically used with the ",(0,r.jsx)(s.a,{href:"interfaces#http-client-interface",children:"HTTP Client"})," interface to send and receive XML from a web server."]}),"\n",(0,r.jsxs)(s.p,{children:["For a full example see ",(0,r.jsx)(s.a,{href:"https://github.com/OpenC3/cosmos/tree/main/examples/openc3-cosmos-accessor-test",children:"openc3-cosmos-accessor-test"}),"."]}),"\n",(0,r.jsx)(s.h4,{id:"commands-7",children:"Commands"}),"\n",(0,r.jsxs)(s.p,{children:["Using the XML Accessor for ",(0,r.jsx)(s.a,{href:"command",children:"command definitions"})," requires the use of ",(0,r.jsx)(s.a,{href:"command#template",children:"TEMPLATE"})," and ",(0,r.jsx)(s.a,{href:"command#key",children:"KEY"})," to allow the user to set values in the XML data. Note that the KEY values use ",(0,r.jsx)(s.a,{href:"https://en.wikipedia.org/wiki/XPath",children:"XPath"}),"."]}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-ruby",children:'COMMAND XML XMLCMD BIG_ENDIAN "XML Accessor Command"\n ACCESSOR XmlAccessor\n TEMPLATE \'<html><head><script src="3"><\/script><noscript>101</noscript></head><body><img src="12"/><div><ul><li>3.14</li><li>Example</li></ul></div><div></div></body></html>\'\n APPEND_ID_PARAMETER ID_ITEM 32 INT 3 3 3 "Int Item"\n KEY "/html/head/script/@src"\n APPEND_PARAMETER ITEM1 16 UINT MIN MAX 101 "Int Item 2"\n KEY "/html/head/noscript/text()"\n UNITS CELSIUS C\n APPEND_PARAMETER ITEM2 16 UINT MIN MAX 12 "Int Item 3"\n KEY "/html/body/img/@src"\n FORMAT_STRING "0x%X"\n APPEND_PARAMETER ITEM3 64 FLOAT MIN MAX 3.14 "Float Item"\n KEY "/html/body/div/ul/li[1]/text()"\n APPEND_PARAMETER ITEM4 128 STRING "Example" "String Item"\n KEY "/html/body/div/ul/li[2]/text()"\n'})}),"\n",(0,r.jsx)(s.h4,{id:"telemetry-7",children:"Telemetry"}),"\n",(0,r.jsxs)(s.p,{children:["Using the XML Accessor for ",(0,r.jsx)(s.a,{href:"telemetry",children:"telemetry definitions"})," only requires the use of ",(0,r.jsx)(s.a,{href:"command#key",children:"KEY"})," to pull values from the XML data. Note that the KEY values use ",(0,r.jsx)(s.a,{href:"https://en.wikipedia.org/wiki/XPath",children:"XPath"}),"."]}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-ruby",children:'TELEMETRY XML XMLTLM BIG_ENDIAN "XML Accessor Telemetry"\n ACCESSOR XmlAccessor\n # Template is not required for telemetry, but is useful for simulation\n TEMPLATE \'<html><head><script src="3"><\/script><noscript>101</noscript></head><body><img src="12"/><div><ul><li>3.14</li><li>Example</li></ul></div><div></div></body></html>\'\n APPEND_ID_ITEM ID_ITEM 32 INT 3 "Int Item"\n KEY "/html/head/script/@src"\n APPEND_ITEM ITEM1 16 UINT "Int Item 2"\n KEY "/html/head/noscript/text()"\n GENERIC_READ_CONVERSION_START UINT 16\n value * 2\n GENERIC_READ_CONVERSION_END\n UNITS CELSIUS C\n APPEND_ITEM ITEM2 16 UINT "Int Item 3"\n KEY "/html/body/img/@src"\n FORMAT_STRING "0x%X"\n APPEND_ITEM ITEM3 64 FLOAT "Float Item"\n KEY "/html/body/div/ul/li[1]/text()"\n APPEND_ITEM ITEM4 128 STRING "String Item"\n KEY "/html/body/div/ul/li[2]/text()"\n'})}),"\n",(0,r.jsx)(s.h3,{id:"gems-ascii-enterprise",children:"GEMS Ascii (Enterprise)"}),"\n",(0,r.jsxs)(s.p,{children:["The GemsAsciiAccessor inherits from ",(0,r.jsx)(s.a,{href:"accessors#template-accessor",children:"TemplateAccessor"}),' to escape the following characters in outgoing commands: "&" => "&a", "|" => "&b", "," => "&c", and ";" => "&d" and reverse them in telemetry. See the ',(0,r.jsx)(s.a,{href:"https://www.omg.org/spec/GEMS/1.3/PDF",children:"GEMS Spec"})," for more information."]}),"\n",(0,r.jsxs)(s.p,{children:["For a full example, please see the ",(0,r.jsx)(s.a,{href:"https://github.com/OpenC3/cosmos-enterprise-plugins/tree/main/openc3-cosmos-gems-interface",children:"openc3-cosmos-gems-interface"})," in the COSMOS Enterprise Plugins."]}),"\n",(0,r.jsx)(s.h3,{id:"prometheus-enterprise",children:"Prometheus (Enterprise)"}),"\n",(0,r.jsx)(s.p,{children:"The PrometheusAccessor is used to read from a Prometheus endpoint and can automatically parse the results into a packet. The PrometheusAccessor is currently only implemented in Ruby."}),"\n",(0,r.jsxs)(s.p,{children:["For a full example, please see the ",(0,r.jsx)(s.a,{href:"https://github.com/OpenC3/cosmos-enterprise-plugins/tree/main/openc3-cosmos-prometheus-metrics",children:"openc3-cosmos-prometheus-metrics"})," in the COSMOS Enterprise Plugins."]}),"\n",(0,r.jsx)(s.h3,{id:"protocol-buffer-enterprise",children:"Protocol Buffer (Enterprise)"}),"\n",(0,r.jsxs)(s.p,{children:["The ProtoAccessor is used to read and write protocol buffers. It is primarily used in conjunction with the ",(0,r.jsx)(s.a,{href:"interfaces#grpc-interface-enterprise",children:"GrpcInterface"}),". The ProtoAccessor is currently only implemented in Ruby."]}),"\n",(0,r.jsxs)(s.table,{children:[(0,r.jsx)(s.thead,{children:(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.th,{children:"Parameter"}),(0,r.jsx)(s.th,{children:"Description"}),(0,r.jsx)(s.th,{children:"Required"})]})}),(0,r.jsxs)(s.tbody,{children:[(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:"Filename"}),(0,r.jsx)(s.td,{children:"File generated by the protocol buffer compiler"}),(0,r.jsx)(s.td,{children:"Yes"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:"Class"}),(0,r.jsx)(s.td,{children:"Class to use when encoding and decoding the buffer"}),(0,r.jsx)(s.td,{children:"Yes"})]})]})]}),"\n",(0,r.jsxs)(s.p,{children:["For a full example, please see the ",(0,r.jsx)(s.a,{href:"https://github.com/OpenC3/cosmos-enterprise-plugins/tree/main/openc3-cosmos-proto-target",children:"openc3-cosmos-proto-target"})," in the COSMOS Enterprise Plugins."]})]})}function h(e={}){let{wrapper:s}={...(0,i.a)(),...e.components};return s?(0,r.jsx)(s,{...e,children:(0,r.jsx)(d,{...e})}):d(e)}},2840:function(e,s,t){t.d(s,{Z:function(){return a},a:function(){return o}});var n=t(2784);let r={},i=n.createContext(r);function o(e){let s=n.useContext(i);return n.useMemo(function(){return"function"==typeof e?e(s):{...s,...e}},[s,e])}function a(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:o(e.components),n.createElement(i.Provider,{value:s},e.children)}}}]);
1
+ "use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([["6868"],{3704:function(e,s,t){t.r(s),t.d(s,{default:()=>h,frontMatter:()=>o,metadata:()=>n,assets:()=>c,toc:()=>l,contentTitle:()=>a});var n=JSON.parse('{"id":"configuration/accessors","title":"Accessors","description":"Responsible for reading and writing data to a buffer","source":"@site/docs/configuration/accessors.md","sourceDirName":"configuration","slug":"/configuration/accessors","permalink":"/tools/staticdocs/docs/configuration/accessors","draft":false,"unlisted":false,"editUrl":"https://github.com/OpenC3/cosmos/tree/main/docs.openc3.com/docs/configuration/accessors.md","tags":[],"version":"current","sidebarPosition":8,"frontMatter":{"sidebar_position":8,"title":"Accessors","description":"Responsible for reading and writing data to a buffer","sidebar_custom_props":{"myEmoji":"\u270F\uFE0F"}},"sidebar":"defaultSidebar","previous":{"title":"Protocols","permalink":"/tools/staticdocs/docs/configuration/protocols"},"next":{"title":"Tables","permalink":"/tools/staticdocs/docs/configuration/table"}}'),r=t("2322"),i=t("2840");let o={sidebar_position:8,title:"Accessors",description:"Responsible for reading and writing data to a buffer",sidebar_custom_props:{myEmoji:"\u270F\uFE0F"}},a=void 0,c={},l=[{value:"Binary Accessor",id:"binary-accessor",level:3},{value:"Commands",id:"commands",level:4},{value:"Telemetry",id:"telemetry",level:4},{value:"CBOR Accessor",id:"cbor-accessor",level:3},{value:"Commands",id:"commands-1",level:4},{value:"Telemetry",id:"telemetry-1",level:4},{value:"Form Accessor",id:"form-accessor",level:3},{value:"Commands",id:"commands-2",level:4},{value:"Telemetry",id:"telemetry-2",level:4},{value:"HTML Accessor",id:"html-accessor",level:3},{value:"Commands",id:"commands-3",level:4},{value:"Telemetry",id:"telemetry-3",level:4},{value:"HTTP Accessor",id:"http-accessor",level:3},{value:"Commands",id:"commands-4",level:4},{value:"Telemetry",id:"telemetry-4",level:4},{value:"JSON Accessor",id:"json-accessor",level:3},{value:"Commands",id:"commands-5",level:4},{value:"Telemetry",id:"telemetry-5",level:4},{value:"Template Accessor",id:"template-accessor",level:3},{value:"Commands",id:"commands-6",level:4},{value:"Telemetry",id:"telemetry-6",level:4},{value:"XML Accessor",id:"xml-accessor",level:3},{value:"Commands",id:"commands-7",level:4},{value:"Telemetry",id:"telemetry-7",level:4},{value:"GEMS Ascii (Enterprise)",id:"gems-ascii-enterprise",level:3},{value:"Prometheus (Enterprise)",id:"prometheus-enterprise",level:3},{value:"Protocol Buffer (Enterprise)",id:"protocol-buffer-enterprise",level:3}];function d(e){let s={a:"a",code:"code",h3:"h3",h4:"h4",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,i.a)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.p,{children:"Accessors are the low level code which know how to read and write data into a buffer. The buffer data then gets written out an interface which uses protocols to potentially change the data before it goes to the target. Accessors handle the different serializations formats such as binary (CCSDS), JSON, CBOR, XML, HTML, Protocol Buffers, etc."}),"\n",(0,r.jsxs)(s.p,{children:["For more information about how Accessors fit with Interfaces and Protocols see ",(0,r.jsx)(s.a,{href:"https://www.openc3.com/news/interoperability-without-standards",children:"Interoperability Without Standards"}),"."]}),"\n",(0,r.jsx)(s.p,{children:"COSMOS provides the following built-in accessors: Binary, CBOR, Form, HTML, HTTP, JSON, Template, XML."}),"\n",(0,r.jsx)(s.p,{children:"COSMOS Enterprise provides the following accessors: GEMS Ascii, Prometheus, Protocol Buffer."}),"\n",(0,r.jsx)(s.h3,{id:"binary-accessor",children:"Binary Accessor"}),"\n",(0,r.jsx)(s.p,{children:"The Binary Accessor serializes data into a binary format when writing to the buffer. This is how many devices expect their data including those following the CCSDS standard. COSMOS handles converting signed and unsigned integers, floats, strings, etc. into their binary representation in the buffer. This includes handling big and little endian, bitfields, and variable length fields. Since binary is so common this is the default Accessor and will be used if no other accessors are given."}),"\n",(0,r.jsx)(s.h4,{id:"commands",children:"Commands"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-ruby",children:'COMMAND INST COLLECT BIG_ENDIAN "Starts a collect"\n ACCESSOR BinaryAccessor # Typically not explicitly defined because it is the default\n PARAMETER TYPE 64 16 UINT MIN MAX 0 "Collect type"\n PARAMETER DURATION 80 32 FLOAT 0.0 10.0 1.0 "Collect duration"\n PARAMETER OPCODE 112 8 UINT 0x0 0xFF 0xAB "Collect opcode"\n'})}),"\n",(0,r.jsx)(s.h4,{id:"telemetry",children:"Telemetry"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-ruby",children:'TELEMETRY INST HEALTH_STATUS BIG_ENDIAN "Health and status"\n ACCESSOR BinaryAccessor # Typically not explicitly defined because it is the default\n APPEND_ITEM CMD_ACPT_CNT 32 UINT "Command accept count"\n APPEND_ITEM COLLECTS 16 UINT "Number of collects"\n APPEND_ITEM DURATION 32 FLOAT "Most recent collect duration"\n'})}),"\n",(0,r.jsx)(s.h3,{id:"cbor-accessor",children:"CBOR Accessor"}),"\n",(0,r.jsxs)(s.p,{children:["The Concise Binary Object Representation (",(0,r.jsx)(s.a,{href:"https://en.wikipedia.org/wiki/CBOR",children:"CBOR"}),") Accessor serializes data into a binary format loosely based on JSON. It is a subclass of the JSON Accessor and is what COSMOS uses natively to store log files."]}),"\n",(0,r.jsx)(s.h4,{id:"commands-1",children:"Commands"}),"\n",(0,r.jsxs)(s.p,{children:["Using the CBOR Accessor for ",(0,r.jsx)(s.a,{href:"command",children:"command definitions"})," requires the use of ",(0,r.jsx)(s.a,{href:"command#template_file",children:"TEMPLATE_FILE"})," and ",(0,r.jsx)(s.a,{href:"command#key",children:"KEY"})," to allow the user to set values in the CBOR data. Note that the KEY values use ",(0,r.jsx)(s.a,{href:"https://en.wikipedia.org/wiki/JSONPath",children:"JSONPath"}),"."]}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-ruby",children:'COMMAND CBOR CBORCMD BIG_ENDIAN "CBOR Accessor Command"\n ACCESSOR CborAccessor\n TEMPLATE_FILE _cbor_template.bin\n APPEND_ID_PARAMETER ID_ITEM 32 INT 2 2 2 "Int Item"\n KEY $.id_item\n APPEND_PARAMETER ITEM1 16 UINT MIN MAX 101 "Int Item 2"\n KEY $.item1\n UNITS CELSIUS C\n APPEND_PARAMETER ITEM2 16 UINT MIN MAX 12 "Int Item 3"\n KEY $.more.item2\n FORMAT_STRING "0x%X"\n APPEND_PARAMETER ITEM3 64 FLOAT MIN MAX 3.14 "Float Item"\n KEY $.more.item3\n APPEND_PARAMETER ITEM4 128 STRING "Example" "String Item"\n KEY $.more.item4\n APPEND_ARRAY_PARAMETER ITEM5 8 UINT 0 "Array Item"\n KEY $.more.item5\n'})}),"\n",(0,r.jsx)(s.p,{children:"Creating the template file requires the use of the Ruby or Python CBOR libraries. Here is an example from Ruby:"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-ruby",children:'require \'cbor\'\ndata = {"id_item" : 2, "item1" : 101, "more" : { "item2" : 12, "item3" : 3.14, "item4" : "Example", "item5" : [4, 3, 2, 1] } }\nFile.open("_cbor_template.bin", \'wb\') do |file|\n file.write(data.to_cbor)\nend\n'})}),"\n",(0,r.jsx)(s.h4,{id:"telemetry-1",children:"Telemetry"}),"\n",(0,r.jsxs)(s.p,{children:["Using the CBOR Accessor for ",(0,r.jsx)(s.a,{href:"telemetry",children:"telemetry definitions"})," only requires the use of ",(0,r.jsx)(s.a,{href:"command#key",children:"KEY"})," to pull values from the CBOR data. Note that the KEY values use ",(0,r.jsx)(s.a,{href:"https://en.wikipedia.org/wiki/JSONPath",children:"JSONPath"}),"."]}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-ruby",children:'TELEMETRY CBOR CBORTLM BIG_ENDIAN "CBOR Accessor Telemetry"\n ACCESSOR CborAccessor\n APPEND_ID_ITEM ID_ITEM 32 INT 2 "Int Item"\n KEY $.id_item\n APPEND_ITEM ITEM1 16 UINT "Int Item 2"\n KEY $.item1\n GENERIC_READ_CONVERSION_START UINT 16\n value * 2\n GENERIC_READ_CONVERSION_END\n UNITS CELSIUS C\n APPEND_ITEM ITEM2 16 UINT "Int Item 3"\n KEY $.more.item2\n FORMAT_STRING "0x%X"\n APPEND_ITEM ITEM3 64 FLOAT "Float Item"\n KEY $.more.item3\n APPEND_ITEM ITEM4 128 STRING "String Item"\n KEY $.more.item4\n APPEND_ARRAY_ITEM ITEM5 8 UINT 0 "Array Item"\n KEY $.more.item5\n'})}),"\n",(0,r.jsx)(s.h3,{id:"form-accessor",children:"Form Accessor"}),"\n",(0,r.jsxs)(s.p,{children:["The Form Accessor is typically used with the ",(0,r.jsx)(s.a,{href:"interfaces#http-client-interface",children:"HTTP Client"})," interface to submit forms to a remote HTTP Server."]}),"\n",(0,r.jsx)(s.h4,{id:"commands-2",children:"Commands"}),"\n",(0,r.jsxs)(s.p,{children:["Using the Form Accessor for ",(0,r.jsx)(s.a,{href:"command",children:"command definitions"})," requires the use of ",(0,r.jsx)(s.a,{href:"command#key",children:"KEY"})," to allow the user to set values in the HTTP form. Note that the KEY values use ",(0,r.jsx)(s.a,{href:"https://en.wikipedia.org/wiki/XPath",children:"XPath"}),"."]}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-ruby",children:'COMMAND FORM FORMCMD BIG_ENDIAN "Form Accessor Command"\n ACCESSOR FormAccessor\n APPEND_ID_PARAMETER ID_ITEM 32 INT 2 2 2 "Int Item"\n KEY $.id_item\n APPEND_PARAMETER ITEM1 16 UINT MIN MAX 101 "Int Item 2"\n KEY $.item1\n UNITS CELSIUS C\n'})}),"\n",(0,r.jsx)(s.h4,{id:"telemetry-2",children:"Telemetry"}),"\n",(0,r.jsxs)(s.p,{children:["Using the Form Accessor for ",(0,r.jsx)(s.a,{href:"telemetry",children:"telemetry definitions"})," only requires the use of ",(0,r.jsx)(s.a,{href:"command#key",children:"KEY"})," to pull values from the HTTP response data. Note that the KEY values use ",(0,r.jsx)(s.a,{href:"https://en.wikipedia.org/wiki/XPath",children:"XPath"}),"."]}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-ruby",children:'TELEMETRY FORM FORMTLM BIG_ENDIAN "Form Accessor Telemetry"\n ACCESSOR FormAccessor\n APPEND_ID_ITEM ID_ITEM 32 INT 1 "Int Item"\n KEY $.id_item\n APPEND_ITEM ITEM1 16 UINT "Int Item 2"\n KEY $.item1\n'})}),"\n",(0,r.jsx)(s.h3,{id:"html-accessor",children:"HTML Accessor"}),"\n",(0,r.jsxs)(s.p,{children:["The HTML Accessor is typically used with the ",(0,r.jsx)(s.a,{href:"interfaces#http-client-interface",children:"HTTP Client"})," interface to parse a web page."]}),"\n",(0,r.jsxs)(s.p,{children:["For a full example see ",(0,r.jsx)(s.a,{href:"https://github.com/OpenC3/cosmos/tree/main/examples/openc3-cosmos-http-get",children:"openc3-cosmos-http-get"}),"."]}),"\n",(0,r.jsx)(s.h4,{id:"commands-3",children:"Commands"}),"\n",(0,r.jsx)(s.p,{children:"HTML Accessor is not typically used for commands but it would be similar to Telemetry using XPath Keys."}),"\n",(0,r.jsx)(s.h4,{id:"telemetry-3",children:"Telemetry"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-ruby",children:'TELEMETRY HTML RESPONSE BIG_ENDIAN "Search results"\n # Typically you use the HtmlAccessor to parse out the page that is returned\n # HtmlAccessor is passed to HttpAccessor and used internally\n ACCESSOR HttpAccessor HtmlAccessor\n APPEND_ITEM NAME 240 STRING\n # Keys were located by doing a manual search and then inspecting the page\n # Right click the text you\'re looking for and then Copy -> Copy XPath\n KEY normalize-space(//main/div/a[2]/span/h2/text())\n APPEND_ITEM DESCRIPTION 480 STRING\n KEY //main/div/a[2]/span/p/text()\n APPEND_ITEM VERSION 200 STRING\n KEY //main/div/a[2]/span/h2/span/text()\n APPEND_ITEM DOWNLOADS 112 STRING\n KEY normalize-space(//main/div/a[2]/p/text())\n'})}),"\n",(0,r.jsx)(s.h3,{id:"http-accessor",children:"HTTP Accessor"}),"\n",(0,r.jsxs)(s.p,{children:["HTTP Accessor is typically used with the ",(0,r.jsx)(s.a,{href:"interfaces#http-client-interface",children:"HTTP Client"})," or ",(0,r.jsx)(s.a,{href:"interfaces#http-server-interface",children:"HTTP Server"})," interface to parse a web page. It takes another accessor to do the low level reading and writing of the items. The default accessor is FormAccessor. HtlmAccessor, XmlAccessor and JsonAccessor are also common for manipulating HTML, XML and JSON respectively."]}),"\n",(0,r.jsxs)(s.p,{children:["For a full example see ",(0,r.jsx)(s.a,{href:"https://github.com/OpenC3/cosmos/tree/main/examples/openc3-cosmos-http-get",children:"openc3-cosmos-http-get"}),"."]}),"\n",(0,r.jsx)(s.h4,{id:"commands-4",children:"Commands"}),"\n",(0,r.jsx)(s.p,{children:"When used with the HTTP Client Interface, HTTP Accessor utilizes the following command parameters:"}),"\n",(0,r.jsxs)(s.table,{children:[(0,r.jsx)(s.thead,{children:(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.th,{children:"Parameter"}),(0,r.jsx)(s.th,{children:"Description"})]})}),(0,r.jsxs)(s.tbody,{children:[(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:"HTTP_PATH"}),(0,r.jsx)(s.td,{children:"requests at this path"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:"HTTP_METHOD"}),(0,r.jsx)(s.td,{children:"request method (GET, POST, DELETE)"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:"HTTP_PACKET"}),(0,r.jsx)(s.td,{children:"telemetry packet to store the response"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:"HTTP_ERROR_PACKET"}),(0,r.jsx)(s.td,{children:"telemetry packet to store error responses (status code >= 300)"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:"HTTP_QUERY_XXX"}),(0,r.jsx)(s.td,{children:"sets a value in the params passed to the request (XXX => value, or KEY => value), see example below"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:"HTTP_HEADER_XXX"}),(0,r.jsx)(s.td,{children:"sets a value in the headers passed to the request (XXX => value, or KEY => value), see example below"})]})]})]}),"\n",(0,r.jsx)(s.p,{children:"When used with the HTTP Server Interface, HTTP Accessor utilizes the following command parameters:"}),"\n",(0,r.jsxs)(s.table,{children:[(0,r.jsx)(s.thead,{children:(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.th,{children:"Parameter"}),(0,r.jsx)(s.th,{children:"Description"})]})}),(0,r.jsxs)(s.tbody,{children:[(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:"HTTP_STATUS"}),(0,r.jsx)(s.td,{children:"status to return to clients"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:"HTTP_PATH"}),(0,r.jsx)(s.td,{children:"mount point for server"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:"HTTP_PACKET"}),(0,r.jsx)(s.td,{children:"telemetry packet to store the request"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:"HTTP_HEADER_XXX"}),(0,r.jsx)(s.td,{children:"sets a value in the response headers (XXX => value, or KEY => value), see example below"})]})]})]}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-ruby",children:'COMMAND HTML SEARCH BIG_ENDIAN "Searches Rubygems.org"\n # Note FormAccessor is the default argument for HttpAccessor so it is typically not specified\n ACCESSOR HttpAccessor\n PARAMETER HTTP_PATH 0 0 DERIVED nil nil "/search"\n PARAMETER HTTP_METHOD 0 0 DERIVED nil nil "GET"\n PARAMETER HTTP_PACKET 0 0 DERIVED nil nil "RESPONSE"\n PARAMETER HTTP_ERROR_PACKET 0 0 DERIVED nil nil "ERROR"\n # This sets parameter query=openc3+cosmos\n # Note the parameter name \'query\' based on HTTP_QUERY_QUERY\n PARAMETER HTTP_QUERY_QUERY 0 0 DERIVED nil nil "openc3 cosmos"\n GENERIC_READ_CONVERSION_START\n value.split.join(\'+\')\n GENERIC_READ_CONVERSION_END\n # This sets header Content-Type=text/html\n # Note that TYPE is not used since the KEY is specified\n PARAMETER HTTP_HEADER_TYPE 0 0 DERIVED nil nil "text/html"\n KEY Content-Type\n'})}),"\n",(0,r.jsx)(s.h4,{id:"telemetry-4",children:"Telemetry"}),"\n",(0,r.jsx)(s.p,{children:"HTTP Accessor utilizes the following telemetry items:"}),"\n",(0,r.jsxs)(s.table,{children:[(0,r.jsx)(s.thead,{children:(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.th,{children:"Parameter"}),(0,r.jsx)(s.th,{children:"Description"})]})}),(0,r.jsxs)(s.tbody,{children:[(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:"HTTP_STATUS"}),(0,r.jsx)(s.td,{children:"the request status"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:"HTTP_HEADERS"}),(0,r.jsx)(s.td,{children:"hash of the response headers"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:"HTTP_REQUEST"}),(0,r.jsxs)(s.td,{children:["optional hash which returns all the request parameters, see ",(0,r.jsx)(s.a,{href:"interfaces#http-client-interface",children:"HTTP Client Interface"})]})]})]})]}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-ruby",children:'TELEMETRY HTML RESPONSE BIG_ENDIAN "Search results"\n # Typically you use the HtmlAccessor to parse out the page that is returned\n ACCESSOR HttpAccessor HtmlAccessor\n APPEND_ITEM NAME 240 STRING\n # Keys were located by doing a manual search and then inspecting the page\n # Right click the text you\'re looking for and then Copy -> Copy XPath\n KEY normalize-space(//main/div/a[2]/span/h2/text())\n APPEND_ITEM DESCRIPTION 480 STRING\n KEY //main/div/a[2]/span/p/text()\n APPEND_ITEM VERSION 200 STRING\n KEY //main/div/a[2]/span/h2/span/text()\n APPEND_ITEM DOWNLOADS 112 STRING\n KEY normalize-space(//main/div/a[2]/p/text())\n'})}),"\n",(0,r.jsx)(s.h3,{id:"json-accessor",children:"JSON Accessor"}),"\n",(0,r.jsxs)(s.p,{children:["The JSON Accessor serializes data into JavaScript Object Notation (",(0,r.jsx)(s.a,{href:"https://en.wikipedia.org/wiki/JSON",children:"JSON"}),"). JSON is a data interchange format that uses human-readable text to transmit data consisting of key value pairs and arrays."]}),"\n",(0,r.jsxs)(s.p,{children:["For a full example see ",(0,r.jsx)(s.a,{href:"https://github.com/OpenC3/cosmos/tree/main/examples/openc3-cosmos-accessor-test",children:"openc3-cosmos-accessor-test"}),"."]}),"\n",(0,r.jsx)(s.h4,{id:"commands-5",children:"Commands"}),"\n",(0,r.jsxs)(s.p,{children:["Using the JSON Accessor for ",(0,r.jsx)(s.a,{href:"command",children:"command definitions"})," requires the use of ",(0,r.jsx)(s.a,{href:"command#template",children:"TEMPLATE"})," and ",(0,r.jsx)(s.a,{href:"command#key",children:"KEY"})," to allow the user to set values in the JSON data. Note that the KEY values use ",(0,r.jsx)(s.a,{href:"https://en.wikipedia.org/wiki/JSONPath",children:"JSONPath"}),"."]}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-ruby",children:'COMMAND JSON JSONCMD BIG_ENDIAN "JSON Accessor Command"\n ACCESSOR JsonAccessor\n TEMPLATE \'{"id_item":1, "item1":101, "more": { "item2":12, "item3":3.14, "item4":"Example", "item5":[4, 3, 2, 1] } }\'\n APPEND_ID_PARAMETER ID_ITEM 32 INT 2 2 2 "Int Item"\n KEY $.id_item\n APPEND_PARAMETER ITEM1 16 UINT MIN MAX 101 "Int Item 2"\n KEY $.item1\n UNITS CELSIUS C\n APPEND_PARAMETER ITEM2 16 UINT MIN MAX 12 "Int Item 3"\n KEY $.more.item2\n FORMAT_STRING "0x%X"\n APPEND_PARAMETER ITEM3 64 FLOAT MIN MAX 3.14 "Float Item"\n KEY $.more.item3\n APPEND_PARAMETER ITEM4 128 STRING "Example" "String Item"\n KEY $.more.item4\n APPEND_ARRAY_PARAMETER ITEM5 8 UINT 0 "Array Item"\n KEY $.more.item5\n'})}),"\n",(0,r.jsx)(s.h4,{id:"telemetry-5",children:"Telemetry"}),"\n",(0,r.jsxs)(s.p,{children:["Using the JSON Accessor for ",(0,r.jsx)(s.a,{href:"telemetry",children:"telemetry definitions"})," only requires the use of ",(0,r.jsx)(s.a,{href:"command#key",children:"KEY"})," to pull values from the JSON data. Note that the KEY values use ",(0,r.jsx)(s.a,{href:"https://en.wikipedia.org/wiki/JSONPath",children:"JSONPath"}),"."]}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-ruby",children:'TELEMETRY JSON JSONTLM BIG_ENDIAN "JSON Accessor Telemetry"\n ACCESSOR JsonAccessor\n APPEND_ID_ITEM ID_ITEM 32 INT 1 "Int Item"\n KEY $.id_item\n APPEND_ITEM ITEM1 16 UINT "Int Item 2"\n KEY $.item1\n GENERIC_READ_CONVERSION_START UINT 16\n value * 2\n GENERIC_READ_CONVERSION_END\n UNITS CELSIUS C\n APPEND_ITEM ITEM2 16 UINT "Int Item 3"\n KEY $.more.item2\n FORMAT_STRING "0x%X"\n APPEND_ITEM ITEM3 64 FLOAT "Float Item"\n KEY $.more.item3\n APPEND_ITEM ITEM4 128 STRING "String Item"\n KEY $.more.item4\n APPEND_ARRAY_ITEM ITEM5 8 UINT 0 "Array Item"\n KEY $.more.item5\n'})}),"\n",(0,r.jsx)(s.h3,{id:"template-accessor",children:"Template Accessor"}),"\n",(0,r.jsxs)(s.p,{children:["The Template Accessor is commonly used with string based command / response protocols such as the ",(0,r.jsx)(s.a,{href:"protocols#cmdresponse-protocol",children:"CmdResponseProtocol"}),"."]}),"\n",(0,r.jsxs)(s.p,{children:["For a full example see ",(0,r.jsx)(s.a,{href:"https://github.com/OpenC3/cosmos-enterprise-plugins/tree/main/openc3-cosmos-scpi-power-supply",children:"openc3-cosmos-scpi-power-supply"})," in the COSMOS Enterprise Plugins."]}),"\n",(0,r.jsx)(s.h4,{id:"commands-6",children:"Commands"}),"\n",(0,r.jsxs)(s.p,{children:["Using the Template Accessor for ",(0,r.jsx)(s.a,{href:"command",children:"command definitions"})," requires the use of ",(0,r.jsx)(s.a,{href:"command#template",children:"TEMPLATE"})," to define a string template with optional parameters that are populated using the command parameters."]}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-ruby",children:'# Some commands don\'t have any parameters and the template is sent as-is\nCOMMAND SCPI_PS RESET BIG_ENDIAN "Reset the power supply state"\n ACCESSOR TemplateAccessor\n TEMPLATE "*RST"\n\n# This command has two parameters in the template defined by <XXX>\nCOMMAND SCPI_PS VOLTAGE BIG_ENDIAN "Sets the voltage of a power supply channel"\n ACCESSOR TemplateAccessor\n # <VOLTAGE> and <CHANNEL> are replaced by the parameter values\n TEMPLATE "VOLT <VOLTAGE>, (@<CHANNEL>)"\n APPEND_PARAMETER VOLTAGE 32 FLOAT MIN MAX 0.0 "Voltage Setting"\n UNITS VOLTS V\n APPEND_PARAMETER CHANNEL 8 UINT 1 2 1 "Output Channel"\n'})}),"\n",(0,r.jsx)(s.h4,{id:"telemetry-6",children:"Telemetry"}),"\n",(0,r.jsxs)(s.p,{children:["Using the Template Accessor for ",(0,r.jsx)(s.a,{href:"telemetry",children:"telemetry definitions"})," requires the use of ",(0,r.jsx)(s.a,{href:"telemetry#template",children:"TEMPLATE"})," to define a template where telemetry values are pulled from the string buffer."]}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-ruby",children:'TELEMETRY SCPI_PS STATUS BIG_ENDIAN "Power supply status"\n ACCESSOR TemplateAccessor\n # The raw string from the target is something like "1.234,2.345"\n # String is split by the comma and pushed into MEAS_VOLTAGE_1, MEAS_VOLTAGE_2\n TEMPLATE "<MEAS_VOLTAGE_1>,<MEAS_VOLTAGE_2>"\n APPEND_ITEM MEAS_VOLTAGE_1 32 FLOAT "Current Reading for Channel 1"\n APPEND_ITEM MEAS_VOLTAGE_2 32 FLOAT "Current Reading for Channel 2"\n'})}),"\n",(0,r.jsx)(s.h3,{id:"xml-accessor",children:"XML Accessor"}),"\n",(0,r.jsxs)(s.p,{children:["The XML Accessor is typically used with the ",(0,r.jsx)(s.a,{href:"interfaces#http-client-interface",children:"HTTP Client"})," interface to send and receive XML from a web server."]}),"\n",(0,r.jsxs)(s.p,{children:["For a full example see ",(0,r.jsx)(s.a,{href:"https://github.com/OpenC3/cosmos/tree/main/examples/openc3-cosmos-accessor-test",children:"openc3-cosmos-accessor-test"}),"."]}),"\n",(0,r.jsx)(s.h4,{id:"commands-7",children:"Commands"}),"\n",(0,r.jsxs)(s.p,{children:["Using the XML Accessor for ",(0,r.jsx)(s.a,{href:"command",children:"command definitions"})," requires the use of ",(0,r.jsx)(s.a,{href:"command#template",children:"TEMPLATE"})," and ",(0,r.jsx)(s.a,{href:"command#key",children:"KEY"})," to allow the user to set values in the XML data. Note that the KEY values use ",(0,r.jsx)(s.a,{href:"https://en.wikipedia.org/wiki/XPath",children:"XPath"}),"."]}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-ruby",children:'COMMAND XML XMLCMD BIG_ENDIAN "XML Accessor Command"\n ACCESSOR XmlAccessor\n TEMPLATE \'<html><head><script src="3"><\/script><noscript>101</noscript></head><body><img src="12"/><div><ul><li>3.14</li><li>Example</li></ul></div><div></div></body></html>\'\n APPEND_ID_PARAMETER ID_ITEM 32 INT 3 3 3 "Int Item"\n KEY "/html/head/script/@src"\n APPEND_PARAMETER ITEM1 16 UINT MIN MAX 101 "Int Item 2"\n KEY "/html/head/noscript/text()"\n UNITS CELSIUS C\n APPEND_PARAMETER ITEM2 16 UINT MIN MAX 12 "Int Item 3"\n KEY "/html/body/img/@src"\n FORMAT_STRING "0x%X"\n APPEND_PARAMETER ITEM3 64 FLOAT MIN MAX 3.14 "Float Item"\n KEY "/html/body/div/ul/li[1]/text()"\n APPEND_PARAMETER ITEM4 128 STRING "Example" "String Item"\n KEY "/html/body/div/ul/li[2]/text()"\n'})}),"\n",(0,r.jsx)(s.h4,{id:"telemetry-7",children:"Telemetry"}),"\n",(0,r.jsxs)(s.p,{children:["Using the XML Accessor for ",(0,r.jsx)(s.a,{href:"telemetry",children:"telemetry definitions"})," only requires the use of ",(0,r.jsx)(s.a,{href:"command#key",children:"KEY"})," to pull values from the XML data. Note that the KEY values use ",(0,r.jsx)(s.a,{href:"https://en.wikipedia.org/wiki/XPath",children:"XPath"}),"."]}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-ruby",children:'TELEMETRY XML XMLTLM BIG_ENDIAN "XML Accessor Telemetry"\n ACCESSOR XmlAccessor\n # Template is not required for telemetry, but is useful for simulation\n TEMPLATE \'<html><head><script src="3"><\/script><noscript>101</noscript></head><body><img src="12"/><div><ul><li>3.14</li><li>Example</li></ul></div><div></div></body></html>\'\n APPEND_ID_ITEM ID_ITEM 32 INT 3 "Int Item"\n KEY "/html/head/script/@src"\n APPEND_ITEM ITEM1 16 UINT "Int Item 2"\n KEY "/html/head/noscript/text()"\n GENERIC_READ_CONVERSION_START UINT 16\n value * 2\n GENERIC_READ_CONVERSION_END\n UNITS CELSIUS C\n APPEND_ITEM ITEM2 16 UINT "Int Item 3"\n KEY "/html/body/img/@src"\n FORMAT_STRING "0x%X"\n APPEND_ITEM ITEM3 64 FLOAT "Float Item"\n KEY "/html/body/div/ul/li[1]/text()"\n APPEND_ITEM ITEM4 128 STRING "String Item"\n KEY "/html/body/div/ul/li[2]/text()"\n'})}),"\n",(0,r.jsx)(s.h3,{id:"gems-ascii-enterprise",children:"GEMS Ascii (Enterprise)"}),"\n",(0,r.jsxs)(s.p,{children:["The GemsAsciiAccessor inherits from ",(0,r.jsx)(s.a,{href:"accessors#template-accessor",children:"TemplateAccessor"}),' to escape the following characters in outgoing commands: "&" => "&a", "|" => "&b", "," => "&c", and ";" => "&d" and reverse them in telemetry. See the ',(0,r.jsx)(s.a,{href:"https://www.omg.org/spec/GEMS/1.3/PDF",children:"GEMS Spec"})," for more information."]}),"\n",(0,r.jsxs)(s.p,{children:["For a full example, please see the ",(0,r.jsx)(s.a,{href:"https://github.com/OpenC3/cosmos-enterprise-plugins/tree/main/openc3-cosmos-gems-interface",children:"openc3-cosmos-gems-interface"})," in the COSMOS Enterprise Plugins."]}),"\n",(0,r.jsx)(s.h3,{id:"prometheus-enterprise",children:"Prometheus (Enterprise)"}),"\n",(0,r.jsx)(s.p,{children:"The PrometheusAccessor is used to read from a Prometheus endpoint and can automatically parse the results into a packet. The PrometheusAccessor is currently only implemented in Ruby."}),"\n",(0,r.jsxs)(s.p,{children:["For a full example, please see the ",(0,r.jsx)(s.a,{href:"https://github.com/OpenC3/cosmos-enterprise-plugins/tree/main/openc3-cosmos-prometheus-metrics",children:"openc3-cosmos-prometheus-metrics"})," in the COSMOS Enterprise Plugins."]}),"\n",(0,r.jsx)(s.h3,{id:"protocol-buffer-enterprise",children:"Protocol Buffer (Enterprise)"}),"\n",(0,r.jsxs)(s.p,{children:["The ProtoAccessor is used to read and write protocol buffers. It is primarily used in conjunction with the ",(0,r.jsx)(s.a,{href:"interfaces#grpc-interface-enterprise",children:"GrpcInterface"}),". The ProtoAccessor is currently only implemented in Ruby."]}),"\n",(0,r.jsxs)(s.table,{children:[(0,r.jsx)(s.thead,{children:(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.th,{children:"Parameter"}),(0,r.jsx)(s.th,{children:"Description"}),(0,r.jsx)(s.th,{children:"Required"})]})}),(0,r.jsxs)(s.tbody,{children:[(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:"Filename"}),(0,r.jsx)(s.td,{children:"File generated by the protocol buffer compiler"}),(0,r.jsx)(s.td,{children:"Yes"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:"Class"}),(0,r.jsx)(s.td,{children:"Class to use when encoding and decoding the buffer"}),(0,r.jsx)(s.td,{children:"Yes"})]})]})]}),"\n",(0,r.jsxs)(s.p,{children:["For a full example, please see the ",(0,r.jsx)(s.a,{href:"https://github.com/OpenC3/cosmos-enterprise-plugins/tree/main/openc3-cosmos-proto-target",children:"openc3-cosmos-proto-target"})," in the COSMOS Enterprise Plugins."]})]})}function h(e={}){let{wrapper:s}={...(0,i.a)(),...e.components};return s?(0,r.jsx)(s,{...e,children:(0,r.jsx)(d,{...e})}):d(e)}},2840:function(e,s,t){t.d(s,{Z:function(){return a},a:function(){return o}});var n=t(2784);let r={},i=n.createContext(r);function o(e){let s=n.useContext(i);return n.useMemo(function(){return"function"==typeof e?e(s):{...s,...e}},[s,e])}function a(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:o(e.components),n.createElement(i.Provider,{value:s},e.children)}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([["8593"],{9005:function(e,t,i){i.r(t),i.d(t,{default:()=>f,frontMatter:()=>a,metadata:()=>n,assets:()=>d,toc:()=>r,contentTitle:()=>l});var n=JSON.parse('{"id":"guides/little-endian-bitfields","title":"Little Endian Bitfields","description":"Defining little endian bitfields","source":"@site/docs/guides/little-endian-bitfields.md","sourceDirName":"guides","slug":"/guides/little-endian-bitfields","permalink":"/tools/staticdocs/docs/guides/little-endian-bitfields","draft":false,"unlisted":false,"editUrl":"https://github.com/OpenC3/cosmos/tree/main/docs.openc3.com/docs/guides/little-endian-bitfields.md","tags":[],"version":"current","frontMatter":{"title":"Little Endian Bitfields","description":"Defining little endian bitfields","sidebar_custom_props":{"myEmoji":"\uD83D\uDCBB"}},"sidebar":"defaultSidebar","previous":{"title":"Exposing Microservices","permalink":"/tools/staticdocs/docs/guides/exposing_microservices"},"next":{"title":"Local Mode","permalink":"/tools/staticdocs/docs/guides/local-mode"}}'),s=i("2322"),o=i("2840");let a={title:"Little Endian Bitfields",description:"Defining little endian bitfields",sidebar_custom_props:{myEmoji:"\uD83D\uDCBB"}},l=void 0,d={},r=[];function c(e){let t={code:"code",li:"li",ol:"ol",p:"p",pre:"pre",...(0,o.a)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.p,{children:"Defining little endian bitfields is a little weird but is possible in COSMOS. However, note that APPEND does not work with little endian bitfields."}),"\n",(0,s.jsx)(t.p,{children:"Here are the rules on how COSMOS handles LITTLE_ENDIAN data:"}),"\n",(0,s.jsxs)(t.ol,{children:["\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsx)(t.p,{children:"COSMOS bit offsets are always defined in BIG_ENDIAN terms. Bit 0 is always the most significant bit of the first byte in a packet, and increasing from there."}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsx)(t.p,{children:"All 8, 16, 32, and 64-bit byte-aligned LITTLE_ENDIAN data types define their bit_offset as the most significant bit of the first byte in the packet that contains part of the item. (This is exactly the same as BIG_ENDIAN). Note that for all except 8-bit LITTLE_ENDIAN items, this is the LEAST significant byte of the item."}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsx)(t.p,{children:"LITTLE_ENDIAN bit fields are defined as any LITTLE_ENDIAN INT or UINT item that is not 8, 16, 32, or 64-bit and byte aligned."}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsx)(t.p,{children:"LITTLE_ENDIAN bit fields must define their bit_offset as the location of the most significant bit of the bitfield in BIG_ENDIAN space as described in rule 1 above. So for example. The following C struct at the beginning of a packet would be defined like so:"}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-c",children:'struct {\n unsigned short a:4;\n unsigned short b:8;\n unsigned short c:4;\n}\n\nITEM A 4 4 UINT "struct item a"\nITEM B 12 8 UINT "struct item b"\nITEM C 8 4 UINT "struct item c"\n'})}),"\n",(0,s.jsx)(t.p,{children:"This is hard to visualize, but the structure above gets spread out in a byte array like the following after byte swapping: least significant 4 bits of b, 4-bits a, 4-bits c, most significant 4 bits of b."}),"\n",(0,s.jsx)(t.p,{children:"The best advice is to experiment and use the View Raw feature in the Command and Telemetry Service to inspect the bytes of the packet and adjust as necessary."})]})}function f(e={}){let{wrapper:t}={...(0,o.a)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(c,{...e})}):c(e)}},2840:function(e,t,i){i.d(t,{Z:function(){return l},a:function(){return a}});var n=i(2784);let s={},o=n.createContext(s);function a(e){let t=n.useContext(o);return n.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function l(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:a(e.components),n.createElement(o.Provider,{value:t},e.children)}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([["9148"],{9011:function(e,t,o){o.r(t),o.d(t,{default:()=>h,frontMatter:()=>r,metadata:()=>n,assets:()=>l,toc:()=>c,contentTitle:()=>a});var n=JSON.parse('{"id":"meta/philosophy","title":"Philosophy","description":"COSMOS goals and philosophy","source":"@site/docs/meta/philosophy.md","sourceDirName":"meta","slug":"/meta/philosophy","permalink":"/tools/staticdocs/docs/meta/philosophy","draft":false,"unlisted":false,"editUrl":"https://github.com/OpenC3/cosmos/tree/main/docs.openc3.com/docs/meta/philosophy.md","tags":[],"version":"current","frontMatter":{"title":"Philosophy","description":"COSMOS goals and philosophy","sidebar_custom_props":{"myEmoji":"\uD83E\uDD14"}},"sidebar":"defaultSidebar","previous":{"title":"Licenses","permalink":"/tools/staticdocs/docs/meta/licenses"},"next":{"title":"XTCE Support","permalink":"/tools/staticdocs/docs/meta/xtce"}}'),i=o("2322"),s=o("2840");let r={title:"Philosophy",description:"COSMOS goals and philosophy",sidebar_custom_props:{myEmoji:"\uD83E\uDD14"}},a=void 0,l={},c=[];function d(e){let t={li:"li",ol:"ol",p:"p",...(0,s.a)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.p,{children:"COSMOS is a C3 (Command, Control and Communication) system with the following primary goals:"}),"\n",(0,i.jsxs)(t.ol,{children:["\n",(0,i.jsxs)(t.li,{children:["\n",(0,i.jsx)(t.p,{children:"Interface with Anything"}),"\n",(0,i.jsx)(t.p,{children:"COSMOS should be able to communicate with anything that provides a computer-to-computer interface, regardless of what the interface is. This means that COSMOS adapts to what other systems are doing and evolves over time. It does not publish an API that hardware must adhere to if it wants to communicate with COSMOS."}),"\n"]}),"\n",(0,i.jsxs)(t.li,{children:["\n",(0,i.jsx)(t.p,{children:"Log Everything"}),"\n",(0,i.jsx)(t.p,{children:"All data that flows into and out of COSMOS is logged. This provides history as well as attribution for what happened when and why. Keeping accurate logs is an essential and critical aspect of COSMOS."}),"\n"]}),"\n",(0,i.jsxs)(t.li,{children:["\n",(0,i.jsx)(t.p,{children:"Open Architecture and Source"}),"\n",(0,i.jsx)(t.p,{children:"Nothing about how COSMOS is implemented is meant to be secret or hidden, even in Enterprise Edition. In all editions, the source code for everything in COSMOS is provided and available for users to inspect or modify as needed. Never worry about an unsolvable problem or having to accept some detail that you don't like. This also opens the world to integrate anything they need into COSMOS without restriction or limitation."}),"\n"]}),"\n",(0,i.jsxs)(t.li,{children:["\n",(0,i.jsx)(t.p,{children:"Be Modular"}),"\n",(0,i.jsx)(t.p,{children:"There are infinite number of things for COSMOS to connect to, but it is impossible to ship COSMOS with all the code it would need to talk to everything. For this reason, COSMOS is designed to be modular in all the places that matter."}),"\n"]}),"\n",(0,i.jsxs)(t.li,{children:["\n",(0,i.jsx)(t.p,{children:"Use Configuration when Possible, and Code When Logic Is Needed"}),"\n",(0,i.jsx)(t.p,{children:"Configuration is great for making COSMOS as usable as possible by non-software engineers. It also shows where common patterns exist. However, configuration is horrible when logic or custom math are needed."}),"\n"]}),"\n",(0,i.jsxs)(t.li,{children:["\n",(0,i.jsx)(t.p,{children:"Empower Developers"}),"\n",(0,i.jsx)(t.p,{children:"COSMOS is meant to be easy enough to be used by everyone, not just C2 software experts."}),"\n"]}),"\n"]})]})}function h(e={}){let{wrapper:t}={...(0,s.a)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(d,{...e})}):d(e)}},2840:function(e,t,o){o.d(t,{Z:function(){return a},a:function(){return r}});var n=o(2784);let i={},s=n.createContext(i);function r(e){let t=n.useContext(s);return n.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:r(e.components),n.createElement(s.Provider,{value:t},e.children)}}}]);
1
+ "use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([["9148"],{5952:function(e,t,o){o.r(t),o.d(t,{default:()=>h,frontMatter:()=>r,metadata:()=>n,assets:()=>l,toc:()=>c,contentTitle:()=>a});var n=JSON.parse('{"id":"meta/philosophy","title":"Philosophy","description":"COSMOS goals and philosophy","source":"@site/docs/meta/philosophy.md","sourceDirName":"meta","slug":"/meta/philosophy","permalink":"/tools/staticdocs/docs/meta/philosophy","draft":false,"unlisted":false,"editUrl":"https://github.com/OpenC3/cosmos/tree/main/docs.openc3.com/docs/meta/philosophy.md","tags":[],"version":"current","frontMatter":{"title":"Philosophy","description":"COSMOS goals and philosophy","sidebar_custom_props":{"myEmoji":"\uD83E\uDD14"}},"sidebar":"defaultSidebar","previous":{"title":"Licenses","permalink":"/tools/staticdocs/docs/meta/licenses"},"next":{"title":"XTCE Support","permalink":"/tools/staticdocs/docs/meta/xtce"}}'),i=o("2322"),s=o("2840");let r={title:"Philosophy",description:"COSMOS goals and philosophy",sidebar_custom_props:{myEmoji:"\uD83E\uDD14"}},a=void 0,l={},c=[];function d(e){let t={li:"li",ol:"ol",p:"p",...(0,s.a)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.p,{children:"COSMOS is a C3 (Command, Control and Communication) system with the following primary goals:"}),"\n",(0,i.jsxs)(t.ol,{children:["\n",(0,i.jsxs)(t.li,{children:["\n",(0,i.jsx)(t.p,{children:"Interface with Anything"}),"\n",(0,i.jsx)(t.p,{children:"COSMOS should be able to communicate with anything that provides a computer-to-computer interface, regardless of what the interface is. This means that COSMOS adapts to what other systems are doing and evolves over time. It does not publish an API that hardware must adhere to if it wants to communicate with COSMOS."}),"\n"]}),"\n",(0,i.jsxs)(t.li,{children:["\n",(0,i.jsx)(t.p,{children:"Log Everything"}),"\n",(0,i.jsx)(t.p,{children:"All data that flows into and out of COSMOS is logged. This provides history as well as attribution for what happened when and why. Keeping accurate logs is an essential and critical aspect of COSMOS."}),"\n"]}),"\n",(0,i.jsxs)(t.li,{children:["\n",(0,i.jsx)(t.p,{children:"Open Architecture and Source"}),"\n",(0,i.jsx)(t.p,{children:"Nothing about how COSMOS is implemented is meant to be secret or hidden, even in Enterprise Edition. In all editions, the source code for everything in COSMOS is provided and available for users to inspect or modify as needed. Never worry about an unsolvable problem or having to accept some detail that you don't like. This also opens the world to integrate anything they need into COSMOS without restriction or limitation."}),"\n"]}),"\n",(0,i.jsxs)(t.li,{children:["\n",(0,i.jsx)(t.p,{children:"Be Modular"}),"\n",(0,i.jsx)(t.p,{children:"There are infinite number of things for COSMOS to connect to, but it is impossible to ship COSMOS with all the code it would need to talk to everything. For this reason, COSMOS is designed to be modular in all the places that matter."}),"\n"]}),"\n",(0,i.jsxs)(t.li,{children:["\n",(0,i.jsx)(t.p,{children:"Use Configuration when Possible, and Code When Logic Is Needed"}),"\n",(0,i.jsx)(t.p,{children:"Configuration is great for making COSMOS as usable as possible by non-software engineers. It also shows where common patterns exist. However, configuration is horrible when logic or custom math are needed."}),"\n"]}),"\n",(0,i.jsxs)(t.li,{children:["\n",(0,i.jsx)(t.p,{children:"Empower Developers"}),"\n",(0,i.jsx)(t.p,{children:"COSMOS is meant to be easy enough to be used by everyone, not just C2 software experts."}),"\n"]}),"\n"]})]})}function h(e={}){let{wrapper:t}={...(0,s.a)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(d,{...e})}):d(e)}},2840:function(e,t,o){o.d(t,{Z:function(){return a},a:function(){return r}});var n=o(2784);let i={},s=n.createContext(i);function r(e){let t=n.useContext(s);return n.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:r(e.components),n.createElement(s.Provider,{value:t},e.children)}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([["4737"],{3628:function(e,n,t){t.r(n),t.d(n,{default:()=>h,frontMatter:()=>r,metadata:()=>o,assets:()=>l,toc:()=>a,contentTitle:()=>c});var o=JSON.parse('{"id":"getting-started/installation","title":"Installation","description":"Installing OpenC3 COSMOS","source":"@site/docs/getting-started/installation.md","sourceDirName":"getting-started","slug":"/getting-started/installation","permalink":"/tools/staticdocs/docs/getting-started/installation","draft":false,"unlisted":false,"editUrl":"https://github.com/OpenC3/cosmos/tree/main/docs.openc3.com/docs/getting-started/installation.md","tags":[],"version":"current","sidebarPosition":1,"frontMatter":{"sidebar_position":1,"title":"Installation","description":"Installing OpenC3 COSMOS","sidebar_custom_props":{"myEmoji":"\uD83D\uDCBE"}},"sidebar":"defaultSidebar","previous":{"title":"Getting Started","permalink":"/tools/staticdocs/docs/getting-started"},"next":{"title":"Getting Started","permalink":"/tools/staticdocs/docs/getting-started/gettingstarted"}}'),s=t("2322"),i=t("2840");let r={sidebar_position:1,title:"Installation",description:"Installing OpenC3 COSMOS",sidebar_custom_props:{myEmoji:"\uD83D\uDCBE"}},c=void 0,l={},a=[{value:"Installing OpenC3 COSMOS",id:"installing-openc3-cosmos",level:2},{value:"Installing OpenC3 COSMOS on Host Machines",id:"installing-openc3-cosmos-on-host-machines",level:2},{value:"PREREQUISITES",id:"prerequisites",level:3},{value:"CLONE PROJECT",id:"clone-project",level:3},{value:"CERTIFICATES",id:"certificates",level:3},{value:"RUN",id:"run",level:3},{value:"CONNECT",id:"connect",level:3},{value:"NEXT STEPS",id:"next-steps",level:3},{value:"Feedback",id:"feedback",level:3}];function d(e){let n={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",hr:"hr",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,i.a)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h2,{id:"installing-openc3-cosmos",children:"Installing OpenC3 COSMOS"}),"\n",(0,s.jsx)(n.p,{children:"The following sections describe how to get OpenC3 COSMOS installed on various operating systems. This document should help you setup you host machine to allow you to have a running version of COSMOS in no time."}),"\n",(0,s.jsx)(n.h2,{id:"installing-openc3-cosmos-on-host-machines",children:"Installing OpenC3 COSMOS on Host Machines"}),"\n",(0,s.jsx)(n.h3,{id:"prerequisites",children:"PREREQUISITES"}),"\n",(0,s.jsxs)(n.p,{children:["If you're on Linux (recommended for production), we recommend installing Docker using the ",(0,s.jsx)(n.a,{href:"https://docs.docker.com/engine/install/",children:"Install Docker Engine"})," instructions (do not use Docker Desktop on Linux). Note: Red Hat users should read the ",(0,s.jsx)(n.a,{href:"podman",children:"Podman"})," documentation. If you're on Windows or Mac, install ",(0,s.jsx)(n.a,{href:"https://docs.docker.com/get-docker/",children:"Docker Desktop"}),". All platforms also need to install ",(0,s.jsx)(n.a,{href:"https://docs.docker.com/compose/install/",children:"Docker Compose"}),"."]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"Minimum Resources allocated to Docker: 8GB RAM, 1 CPU, 80GB Disk"}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"Recommended Resources allocated to Docker: 16GB RAM, 2+ CPUs, 100GB Disk"}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"Docker on Windows with WSL2:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["WSL2 consumes 50% of total memory on Windows or 8GB, whichever is less. However, on Windows builds before 20175 (use ",(0,s.jsx)(n.code,{children:"winver"})," to check) it consumes 80% of your total memory. This can have a negative effect on Windows performance!"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["On Windows builds < 20175 or for more fine grained control, create C:\\Users\\<username>\\",(0,s.jsx)(n.a,{href:"https://docs.microsoft.com/en-us/windows/wsl/wsl-config",children:".wslconfig"}),". Suggested contents on a 32GB machine:"]}),"\n",(0,s.jsx)(n.p,{children:"[wsl2]\nmemory=16GB\nswap=0"}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.admonition,{title:"Important: Modify Docker Connection Timeouts",type:"warning",children:(0,s.jsxs)(n.p,{children:['Docker by default will break idle (no data) connections after a period of 5 minutes. This "feature" will eventually cause you problems if you don\'t adjust the Docker settings. This may manifest as idle connections dropping or simply failing to resume after data should have started flowing again. Find the file at C:\\Users\\username\\AppData\\Roaming\\Docker\\settings.json on Windows or ~/Library/Group Containers/group.com.docker/settings.json on MacOS. Modify the value ',(0,s.jsx)(n.code,{children:"vpnKitMaxPortIdleTime"})," to change the timeout (recommend setting to 0). ",(0,s.jsx)(n.strong,{children:"Note:"})," 0 means no timeout (idle connections not dropped)"]})}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Note:"})," As of December 2021 the COSMOS Docker containers are based on the Alpine Docker image."]}),"\n",(0,s.jsx)(n.h3,{id:"clone-project",children:"CLONE PROJECT"}),"\n",(0,s.jsxs)(n.p,{children:["We recommend using the COSMOS ",(0,s.jsx)(n.a,{href:"key_concepts#projects",children:"project template"})," to get started."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"git clone https://github.com/OpenC3/cosmos-project.git\ngit clone https://github.com/OpenC3/cosmos-enterprise-project.git\n"})}),"\n",(0,s.jsxs)(n.admonition,{title:"Offline Installation",type:"info",children:[(0,s.jsx)("p",{style:{"margin-bottom":"20px"},children:"If you need to install in an offline environment you should first see if you're able to directly use the COSMOS containers. If so you can first save the containers:"}),(0,s.jsx)("p",{style:{"margin-bottom":"20px"},children:(0,s.jsx)("code",{children:"./openc3.sh util save docker.io openc3inc 5.16.2"})}),(0,s.jsx)("p",{style:{"margin-bottom":"20px"},children:"This will download the COSMOS containers from the docker.io repo using the openc3inc namespace and version 5.16.2. The repo, namespace and version are all configurable. Tar files are created in the 'tmp' directory which you can transfer to your offline environment. Transfer the tar files to your offline environment's project 'tmp' dir and import them with:"}),(0,s.jsx)("p",{style:{"margin-bottom":"20px"},children:(0,s.jsx)("code",{children:"./openc3.sh util load 5.16.2"})}),(0,s.jsx)("p",{style:{"margin-bottom":"20px"},children:"Note the version specified in save needs to match the version in load."})]}),"\n",(0,s.jsx)(n.h3,{id:"certificates",children:"CERTIFICATES"}),"\n",(0,s.jsxs)(n.p,{children:["The COSMOS containers are designed to work and be built in the presence of an SSL Decryption device. To support this a cacert.pem file can be placed at the base of the COSMOS 5 project that includes any certificates needed by your organization. ",(0,s.jsx)(n.strong,{children:"Note"}),": If you set the path to the ssl file in the ",(0,s.jsx)(n.code,{children:"SSL_CERT_FILE"})," environment variables the openc3 setup script will copy it and place it for the docker container to load."]}),"\n",(0,s.jsxs)(n.admonition,{title:"SSL Issues",type:"warning",children:[(0,s.jsx)(n.p,{children:'Increasingly organizations are using some sort of SSL decryptor device which can cause curl and other command line tools like git to have SSL certificate problems. If installation fails with messages that involve "certificate", "SSL", "self-signed", or "secure" this is the problem. IT typically sets up browsers to work correctly but not command line applications. Note that the file extension might not be .pem, it could be .pem, crt, .ca-bundle, .cer, .p7b, .p7s, or potentially something else.'}),(0,s.jsx)(n.p,{children:"The workaround is to get a proper local certificate file from your IT department that can be used by tools like curl (for example C:\\Shared\\Ball.pem). Doesn't matter just somewhere with no spaces."}),(0,s.jsx)(n.p,{children:"Then set the following environment variables to that path (ie. C:\\Shared\\Ball.pem)"}),(0,s.jsxs)(n.p,{children:["SSL_CERT_FILE",(0,s.jsx)("br",{}),"\nCURL_CA_BUNDLE",(0,s.jsx)("br",{}),"\nREQUESTS_CA_BUNDLE",(0,s.jsx)("br",{})]}),(0,s.jsxs)(n.p,{children:["Here are some directions on environment variables in Windows: ",(0,s.jsx)(n.a,{href:"https://www.computerhope.com/issues/ch000549.htm",children:"Windows Environment Variables"})]}),(0,s.jsx)(n.p,{children:"You will need to create new ones with the names above and set their value to the full path to the certificate file."})]}),"\n",(0,s.jsx)(n.h3,{id:"run",children:"RUN"}),"\n",(0,s.jsxs)(n.p,{children:['Add the locally cloned project directory to your path so you can directly use the batch file or shell script. In Windows this would be adding "C:\\openc3-project" to the PATH. In Linux you would edit your shell\'s rc file and export the PATH. For example, on a Mac add the following to ~/.zshrc: ',(0,s.jsx)(n.code,{children:"export PATH=~/cosmos-project:$PATH"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["Run ",(0,s.jsx)(n.code,{children:"openc3.bat run"})," (Windows), or ",(0,s.jsx)(n.code,{children:"./openc3.sh run"})," (linux/Mac)."]}),"\n",(0,s.jsx)(n.p,{children:"Note, you can edit the .env file and change OPENC3_TAG to a specific release (e.g. 5.0.9) rather than 'latest'."}),"\n",(0,s.jsxs)(n.p,{children:["If you see an error indicating docker daemon is not running ensure Docker and Docker compose is installed and running. If it errors please try to run ",(0,s.jsx)(n.code,{children:"docker --version"})," or ",(0,s.jsx)(n.code,{children:"docker-compose --version"})," and try to run the start command again. If the error continues please include the version in your issue if you choose to create one."]}),"\n",(0,s.jsxs)(n.p,{children:["Running ",(0,s.jsx)(n.code,{children:"docker ps"})," can help show the running containers."]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.code,{children:"openc3.*"})," takes multiple arguments. Run with no arguments for help. An example run of openc3.sh with no arguments will show a usage guide."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"./openc3.sh\nUsage: ./openc3.sh [cli, cliroot, start, stop, cleanup, run, util]\n* cli: run a cli command as the default user ('cli help' for more info)\n* cliroot: run a cli command as the root user ('cli help' for more info)\n* start: start the docker-compose openc3\n* stop: stop the running dockers for openc3\n* cleanup: cleanup network and volumes for openc3\n* run: run the prebuilt containers for openc3\n* util: various helper commands\n"})}),"\n",(0,s.jsx)(n.h3,{id:"connect",children:"CONNECT"}),"\n",(0,s.jsxs)(n.p,{children:["Connect a web browser to ",(0,s.jsx)(n.a,{href:"http://localhost:2900",children:"http://localhost:2900"}),". Set the password to whatever you want."]}),"\n",(0,s.jsx)(n.h3,{id:"next-steps",children:"NEXT STEPS"}),"\n",(0,s.jsxs)(n.p,{children:["Continue to ",(0,s.jsx)(n.a,{href:"gettingstarted",children:"Getting Started"}),"."]}),"\n",(0,s.jsx)(n.hr,{}),"\n",(0,s.jsx)(n.h3,{id:"feedback",children:"Feedback"}),"\n",(0,s.jsx)(n.admonition,{title:"Find a problem in the 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={}){let{wrapper:n}={...(0,i.a)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},2840:function(e,n,t){t.d(n,{Z:function(){return c},a:function(){return r}});var o=t(2784);let s={},i=o.createContext(s);function r(e){let n=o.useContext(i);return o.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:r(e.components),o.createElement(i.Provider,{value:n},e.children)}}}]);
1
+ "use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([["4737"],{5869:function(e,n,t){t.r(n),t.d(n,{default:()=>h,frontMatter:()=>r,metadata:()=>o,assets:()=>l,toc:()=>a,contentTitle:()=>c});var o=JSON.parse('{"id":"getting-started/installation","title":"Installation","description":"Installing OpenC3 COSMOS","source":"@site/docs/getting-started/installation.md","sourceDirName":"getting-started","slug":"/getting-started/installation","permalink":"/tools/staticdocs/docs/getting-started/installation","draft":false,"unlisted":false,"editUrl":"https://github.com/OpenC3/cosmos/tree/main/docs.openc3.com/docs/getting-started/installation.md","tags":[],"version":"current","sidebarPosition":1,"frontMatter":{"sidebar_position":1,"title":"Installation","description":"Installing OpenC3 COSMOS","sidebar_custom_props":{"myEmoji":"\uD83D\uDCBE"}},"sidebar":"defaultSidebar","previous":{"title":"Getting Started","permalink":"/tools/staticdocs/docs/getting-started"},"next":{"title":"Getting Started","permalink":"/tools/staticdocs/docs/getting-started/gettingstarted"}}'),s=t("2322"),i=t("2840");let r={sidebar_position:1,title:"Installation",description:"Installing OpenC3 COSMOS",sidebar_custom_props:{myEmoji:"\uD83D\uDCBE"}},c=void 0,l={},a=[{value:"Installing OpenC3 COSMOS",id:"installing-openc3-cosmos",level:2},{value:"Installing OpenC3 COSMOS on Host Machines",id:"installing-openc3-cosmos-on-host-machines",level:2},{value:"PREREQUISITES",id:"prerequisites",level:3},{value:"CLONE PROJECT",id:"clone-project",level:3},{value:"CERTIFICATES",id:"certificates",level:3},{value:"RUN",id:"run",level:3},{value:"CONNECT",id:"connect",level:3},{value:"NEXT STEPS",id:"next-steps",level:3},{value:"Feedback",id:"feedback",level:3}];function d(e){let n={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",hr:"hr",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,i.a)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h2,{id:"installing-openc3-cosmos",children:"Installing OpenC3 COSMOS"}),"\n",(0,s.jsx)(n.p,{children:"The following sections describe how to get OpenC3 COSMOS installed on various operating systems. This document should help you setup you host machine to allow you to have a running version of COSMOS in no time."}),"\n",(0,s.jsx)(n.h2,{id:"installing-openc3-cosmos-on-host-machines",children:"Installing OpenC3 COSMOS on Host Machines"}),"\n",(0,s.jsx)(n.h3,{id:"prerequisites",children:"PREREQUISITES"}),"\n",(0,s.jsxs)(n.p,{children:["If you're on Linux (recommended for production), we recommend installing Docker using the ",(0,s.jsx)(n.a,{href:"https://docs.docker.com/engine/install/",children:"Install Docker Engine"})," instructions (do not use Docker Desktop on Linux). Note: Red Hat users should read the ",(0,s.jsx)(n.a,{href:"podman",children:"Podman"})," documentation. If you're on Windows or Mac, install ",(0,s.jsx)(n.a,{href:"https://docs.docker.com/get-docker/",children:"Docker Desktop"}),". All platforms also need to install ",(0,s.jsx)(n.a,{href:"https://docs.docker.com/compose/install/",children:"Docker Compose"}),"."]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"Minimum Resources allocated to Docker: 8GB RAM, 1 CPU, 80GB Disk"}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"Recommended Resources allocated to Docker: 16GB RAM, 2+ CPUs, 100GB Disk"}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"Docker on Windows with WSL2:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["WSL2 consumes 50% of total memory on Windows or 8GB, whichever is less. However, on Windows builds before 20175 (use ",(0,s.jsx)(n.code,{children:"winver"})," to check) it consumes 80% of your total memory. This can have a negative effect on Windows performance!"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["On Windows builds < 20175 or for more fine grained control, create C:\\Users\\<username>\\",(0,s.jsx)(n.a,{href:"https://docs.microsoft.com/en-us/windows/wsl/wsl-config",children:".wslconfig"}),". Suggested contents on a 32GB machine:"]}),"\n",(0,s.jsx)(n.p,{children:"[wsl2]\nmemory=16GB\nswap=0"}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.admonition,{title:"Important: Modify Docker Connection Timeouts",type:"warning",children:(0,s.jsxs)(n.p,{children:['Docker by default will break idle (no data) connections after a period of 5 minutes. This "feature" will eventually cause you problems if you don\'t adjust the Docker settings. This may manifest as idle connections dropping or simply failing to resume after data should have started flowing again. Find the file at C:\\Users\\username\\AppData\\Roaming\\Docker\\settings.json on Windows or ~/Library/Group Containers/group.com.docker/settings.json on MacOS. Modify the value ',(0,s.jsx)(n.code,{children:"vpnKitMaxPortIdleTime"})," to change the timeout (recommend setting to 0). ",(0,s.jsx)(n.strong,{children:"Note:"})," 0 means no timeout (idle connections not dropped)"]})}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Note:"})," As of December 2021 the COSMOS Docker containers are based on the Alpine Docker image."]}),"\n",(0,s.jsx)(n.h3,{id:"clone-project",children:"CLONE PROJECT"}),"\n",(0,s.jsxs)(n.p,{children:["We recommend using the COSMOS ",(0,s.jsx)(n.a,{href:"key_concepts#projects",children:"project template"})," to get started."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"git clone https://github.com/OpenC3/cosmos-project.git\ngit clone https://github.com/OpenC3/cosmos-enterprise-project.git\n"})}),"\n",(0,s.jsxs)(n.admonition,{title:"Offline Installation",type:"info",children:[(0,s.jsx)("p",{style:{"margin-bottom":"20px"},children:"If you need to install in an offline environment you should first see if you're able to directly use the COSMOS containers. If so you can first save the containers:"}),(0,s.jsx)("p",{style:{"margin-bottom":"20px"},children:(0,s.jsx)("code",{children:"./openc3.sh util save docker.io openc3inc 5.16.2"})}),(0,s.jsx)("p",{style:{"margin-bottom":"20px"},children:"This will download the COSMOS containers from the docker.io repo using the openc3inc namespace and version 5.16.2. The repo, namespace and version are all configurable. Tar files are created in the 'tmp' directory which you can transfer to your offline environment. Transfer the tar files to your offline environment's project 'tmp' dir and import them with:"}),(0,s.jsx)("p",{style:{"margin-bottom":"20px"},children:(0,s.jsx)("code",{children:"./openc3.sh util load 5.16.2"})}),(0,s.jsx)("p",{style:{"margin-bottom":"20px"},children:"Note the version specified in save needs to match the version in load."})]}),"\n",(0,s.jsx)(n.h3,{id:"certificates",children:"CERTIFICATES"}),"\n",(0,s.jsxs)(n.p,{children:["The COSMOS containers are designed to work and be built in the presence of an SSL Decryption device. To support this a cacert.pem file can be placed at the base of the COSMOS 5 project that includes any certificates needed by your organization. ",(0,s.jsx)(n.strong,{children:"Note"}),": If you set the path to the ssl file in the ",(0,s.jsx)(n.code,{children:"SSL_CERT_FILE"})," environment variables the openc3 setup script will copy it and place it for the docker container to load."]}),"\n",(0,s.jsxs)(n.admonition,{title:"SSL Issues",type:"warning",children:[(0,s.jsx)(n.p,{children:'Increasingly organizations are using some sort of SSL decryptor device which can cause curl and other command line tools like git to have SSL certificate problems. If installation fails with messages that involve "certificate", "SSL", "self-signed", or "secure" this is the problem. IT typically sets up browsers to work correctly but not command line applications. Note that the file extension might not be .pem, it could be .pem, crt, .ca-bundle, .cer, .p7b, .p7s, or potentially something else.'}),(0,s.jsx)(n.p,{children:"The workaround is to get a proper local certificate file from your IT department that can be used by tools like curl (for example C:\\Shared\\Ball.pem). Doesn't matter just somewhere with no spaces."}),(0,s.jsx)(n.p,{children:"Then set the following environment variables to that path (ie. C:\\Shared\\Ball.pem)"}),(0,s.jsxs)(n.p,{children:["SSL_CERT_FILE",(0,s.jsx)("br",{}),"\nCURL_CA_BUNDLE",(0,s.jsx)("br",{}),"\nREQUESTS_CA_BUNDLE",(0,s.jsx)("br",{})]}),(0,s.jsxs)(n.p,{children:["Here are some directions on environment variables in Windows: ",(0,s.jsx)(n.a,{href:"https://www.computerhope.com/issues/ch000549.htm",children:"Windows Environment Variables"})]}),(0,s.jsx)(n.p,{children:"You will need to create new ones with the names above and set their value to the full path to the certificate file."})]}),"\n",(0,s.jsx)(n.h3,{id:"run",children:"RUN"}),"\n",(0,s.jsxs)(n.p,{children:['Add the locally cloned project directory to your path so you can directly use the batch file or shell script. In Windows this would be adding "C:\\openc3-project" to the PATH. In Linux you would edit your shell\'s rc file and export the PATH. For example, on a Mac add the following to ~/.zshrc: ',(0,s.jsx)(n.code,{children:"export PATH=~/cosmos-project:$PATH"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["Run ",(0,s.jsx)(n.code,{children:"openc3.bat run"})," (Windows), or ",(0,s.jsx)(n.code,{children:"./openc3.sh run"})," (linux/Mac)."]}),"\n",(0,s.jsx)(n.p,{children:"Note, you can edit the .env file and change OPENC3_TAG to a specific release (e.g. 5.0.9) rather than 'latest'."}),"\n",(0,s.jsxs)(n.p,{children:["If you see an error indicating docker daemon is not running ensure Docker and Docker compose is installed and running. If it errors please try to run ",(0,s.jsx)(n.code,{children:"docker --version"})," or ",(0,s.jsx)(n.code,{children:"docker-compose --version"})," and try to run the start command again. If the error continues please include the version in your issue if you choose to create one."]}),"\n",(0,s.jsxs)(n.p,{children:["Running ",(0,s.jsx)(n.code,{children:"docker ps"})," can help show the running containers."]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.code,{children:"openc3.*"})," takes multiple arguments. Run with no arguments for help. An example run of openc3.sh with no arguments will show a usage guide."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"./openc3.sh\nUsage: ./openc3.sh [cli, cliroot, start, stop, cleanup, run, util]\n* cli: run a cli command as the default user ('cli help' for more info)\n* cliroot: run a cli command as the root user ('cli help' for more info)\n* start: start the docker-compose openc3\n* stop: stop the running dockers for openc3\n* cleanup: cleanup network and volumes for openc3\n* run: run the prebuilt containers for openc3\n* util: various helper commands\n"})}),"\n",(0,s.jsx)(n.h3,{id:"connect",children:"CONNECT"}),"\n",(0,s.jsxs)(n.p,{children:["Connect a web browser to ",(0,s.jsx)(n.a,{href:"http://localhost:2900",children:"http://localhost:2900"}),". Set the password to whatever you want."]}),"\n",(0,s.jsx)(n.h3,{id:"next-steps",children:"NEXT STEPS"}),"\n",(0,s.jsxs)(n.p,{children:["Continue to ",(0,s.jsx)(n.a,{href:"gettingstarted",children:"Getting Started"}),"."]}),"\n",(0,s.jsx)(n.hr,{}),"\n",(0,s.jsx)(n.h3,{id:"feedback",children:"Feedback"}),"\n",(0,s.jsx)(n.admonition,{title:"Find a problem in the 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={}){let{wrapper:n}={...(0,i.a)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},2840:function(e,n,t){t.d(n,{Z:function(){return c},a:function(){return r}});var o=t(2784);let s={},i=o.createContext(s);function r(e){let n=o.useContext(i);return o.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:r(e.components),o.createElement(i.Provider,{value:n},e.children)}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([["9564"],{1945:function(e,t,n){n.r(t),n.d(t,{default:()=>h,frontMatter:()=>c,metadata:()=>s,assets:()=>r,toc:()=>l,contentTitle:()=>o});var s=JSON.parse('{"id":"tools/admin","title":"Admin","description":"Administer COSMOS, install plugins, change settings","source":"@site/docs/tools/admin.md","sourceDirName":"tools","slug":"/tools/admin","permalink":"/tools/staticdocs/docs/tools/admin","draft":false,"unlisted":false,"editUrl":"https://github.com/OpenC3/cosmos/tree/main/docs.openc3.com/docs/tools/admin.md","tags":[],"version":"current","frontMatter":{"title":"Admin","description":"Administer COSMOS, install plugins, change settings","sidebar_custom_props":{"myEmoji":"\uD83D\uDEE0\uFE0F"}},"sidebar":"defaultSidebar","previous":{"title":"Tools","permalink":"/tools/staticdocs/docs/tools"},"next":{"title":"Autonomic (Enterprise)","permalink":"/tools/staticdocs/docs/tools/autonomic"}}'),i=n("2322"),a=n("2840");let c={title:"Admin",description:"Administer COSMOS, install plugins, change settings",sidebar_custom_props:{myEmoji:"\uD83D\uDEE0\uFE0F"}},o=void 0,r={},l=[{value:"Introduction",id:"introduction",level:2},{value:"Plugins",id:"plugins",level:3},{value:"Targets",id:"targets",level:3},{value:"Interfaces",id:"interfaces",level:3},{value:"Routers",id:"routers",level:3},{value:"Microservices",id:"microservices",level:3},{value:"Packages",id:"packages",level:3},{value:"Tools",id:"tools",level:3},{value:"Redis",id:"redis",level:3},{value:"Secrets",id:"secrets",level:3},{value:"Settings",id:"settings",level:3}];function d(e){let t={a:"a",h2:"h2",h3:"h3",img:"img",p:"p",...(0,a.a)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.h2,{id:"introduction",children:"Introduction"}),"\n",(0,i.jsx)(t.p,{children:"Admin has it's own dedicated button at the top of the tools list. It is responsible for administering the COSMOS system including installing new plugins, viewing configuration, storing secrets and changing settings."}),"\n",(0,i.jsx)(t.h3,{id:"plugins",children:"Plugins"}),"\n",(0,i.jsx)(t.p,{children:"The Plugins tab is where you install new plugins into the COSMOS system. Plugins can dynamically add targets, microservices, interfaces, protocols, Telemetry Viewer widgets, and entire tools into the COSMOS runtime. The following screenshot shows the Plugins tab when only the COSMOS Demo is installed:"}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{alt:"Plugins",src:n(8880).Z+"",width:"2200",height:"874"})}),"\n",(0,i.jsx)(t.p,{children:"The plugin gem name is listed along with all the targets it contains. You can Download, Edit, Upgrade, or Delete (uninstall) the plugin using the buttons to the right. If a plugin's target has been modified, the target name turns into a link which when clicked will download the changed files. New plugins are installed by clicking the top field."}),"\n",(0,i.jsx)(t.h3,{id:"targets",children:"Targets"}),"\n",(0,i.jsx)(t.p,{children:"The Targets tab shows all the targets installed and what plugin they came from. Clicking the eyeball shows the raw JSON that makes up the target configuration."}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{alt:"Targets",src:n(2241).Z+"",width:"2200",height:"964"})}),"\n",(0,i.jsx)(t.h3,{id:"interfaces",children:"Interfaces"}),"\n",(0,i.jsx)(t.p,{children:"The Interfaces tab shows all the interfaces installed. Clicking the eyeball shows the raw JSON that makes up the interface configuration."}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{alt:"Interfaces",src:n(1932).Z+"",width:"2200",height:"766"})}),"\n",(0,i.jsx)(t.h3,{id:"routers",children:"Routers"}),"\n",(0,i.jsx)(t.p,{children:"The Routers tab shows all the routers installed. Clicking the eyeball shows the raw JSON that makes up the router configuration."}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{alt:"Routers",src:n(3238).Z+"",width:"2200",height:"480"})}),"\n",(0,i.jsx)(t.h3,{id:"microservices",children:"Microservices"}),"\n",(0,i.jsx)(t.p,{children:"The Microservices tab shows all the microservices installed, their update time, state, and count. Clicking the eyeball shows the raw JSON that makes up the microservice configuration."}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{alt:"Microservices",src:n(1844).Z+"",width:"2200",height:"1226"})}),"\n",(0,i.jsx)(t.h3,{id:"packages",children:"Packages"}),"\n",(0,i.jsx)(t.p,{children:"The Packages tab shows all the Ruby gems and Python packages installed in the system. You can also install packages from this tab if you're in an offline (air gapped) environment where COSMOS can't pull dependencies from Rubygems or Pypi."}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{alt:"Packages",src:n(633).Z+"",width:"2200",height:"2620"})}),"\n",(0,i.jsx)(t.h3,{id:"tools",children:"Tools"}),"\n",(0,i.jsx)(t.p,{children:"The Tools tab lists all the tools installed. You can reorder the tools in the Navigation bar by dragging and dropping the left side grab handle."}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{alt:"Tools",src:n(7065).Z+"",width:"2200",height:"2192"})}),"\n",(0,i.jsxs)(t.p,{children:["You can also add links to existing tools in the navigation bar by using the Add button. Any ",(0,i.jsx)(t.a,{href:"https://pictogrammers.com/library/mdi/",children:"material design icons"})," can be used as the Tool icon."]}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{alt:"Add Tool",src:n(6387).Z+"",width:"2060",height:"232"})}),"\n",(0,i.jsx)(t.h3,{id:"redis",children:"Redis"}),"\n",(0,i.jsx)(t.p,{children:"The Redis tab allows you to interact directly with the underlying Redis database, making it easy to modify or delete data. THIS IS DANGEROUS, and should only be performed by COSMOS developers."}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{alt:"Redis",src:n(6462).Z+"",width:"2200",height:"1254"})}),"\n",(0,i.jsx)(t.h3,{id:"secrets",children:"Secrets"}),"\n",(0,i.jsxs)(t.p,{children:["The Secrets tab allows you to create secrets that can be used by Interfaces or Microservices using the ",(0,i.jsx)(t.a,{href:"../configuration/plugins#secret",children:"SECRET"})," keyword. Secrets require setting the Secret Name and then can be set to an individual value using the Secret Value, or to the contents of a file (like a certificate file) using the file selector. In the following example the USERNAME and PASSWORD were set to values while CA_FILE was set using an uploaded certificate file."]}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{alt:"Secrets",src:n(6728).Z+"",width:"2200",height:"962"})}),"\n",(0,i.jsx)(t.h3,{id:"settings",children:"Settings"}),"\n",(0,i.jsx)(t.p,{children:"The Settings tab contains various settings used throughout COSMOS. These including clearing saved tool configuration, hiding the Astro Clock, changing the system time zone, adding a top and bottom banner, creating a subtitle in the navigation bar, and changing the URLs of the various package libraries."}),"\n",(0,i.jsxs)(t.p,{children:[(0,i.jsx)(t.img,{alt:"Settings1",src:n(7792).Z+"",width:"2200",height:"2172"}),"\n",(0,i.jsx)(t.img,{alt:"Settings2",src:n(4512).Z+"",width:"2200",height:"2436"})]})]})}function h(e={}){let{wrapper:t}={...(0,a.a)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(d,{...e})}):d(e)}},6387:function(e,t,n){n.d(t,{Z:function(){return s}});let s=n.p+"assets/images/add_tool-6919be6e6c05db133a8816a9fc03bf98b0789a8525da4cdaa7b041b25bf9edb8.png"},1932:function(e,t,n){n.d(t,{Z:function(){return s}});let s=n.p+"assets/images/interfaces-fa10646a27eb9045b70c2c485498a864bed1896ff171b7f31f8698288e08ae73.png"},1844:function(e,t,n){n.d(t,{Z:function(){return s}});let s=n.p+"assets/images/microservices-805cc7d137958ac8183579cdb9a9845e7aef79db19723f0773f4ea4d957b48a1.png"},633:function(e,t,n){n.d(t,{Z:function(){return s}});let s=n.p+"assets/images/packages-3bfae1a91b0534077280c323a40e879a8ac6a7c3ac45376b3c706a098dab12c3.png"},8880:function(e,t,n){n.d(t,{Z:function(){return s}});let s=n.p+"assets/images/plugins-aabbe060bec19e6fa2490b737f20758af9000066121f5af85f260a3b14f9b3d8.png"},6462:function(e,t,n){n.d(t,{Z:function(){return s}});let s=n.p+"assets/images/redis-4553b5b35292cca3df1fa08577f2175efef34e0fdfe512f30ca70785b086b24f.png"},3238:function(e,t,n){n.d(t,{Z:function(){return s}});let s=n.p+"assets/images/routers-489fe07165973feede7a63adf71781cca7ecb1f7d17c069761c1c57e70cf926e.png"},6728:function(e,t,n){n.d(t,{Z:function(){return s}});let s=n.p+"assets/images/secrets-c8daf324829a0d4dde1d30f9da89d884ca06ce458e400dfa5d1de4ccb10395a1.png"},7792:function(e,t,n){n.d(t,{Z:function(){return s}});let s=n.p+"assets/images/settings1-36a446ec0455ae5ab3a6d225647264647e517e1e2d83da5c639a63756e0339a6.png"},4512:function(e,t,n){n.d(t,{Z:function(){return s}});let s=n.p+"assets/images/settings2-c18e478b65ba569bea37a2bb185b4702e347aecc570fbc7b26a6e66aeecc9129.png"},2241:function(e,t,n){n.d(t,{Z:function(){return s}});let s=n.p+"assets/images/targets-c02c28769712aa226fdcbd3b90329285aeb39e775b9be1df6ab0e2ad31231518.png"},7065:function(e,t,n){n.d(t,{Z:function(){return s}});let s=n.p+"assets/images/tools-d3ea80e2fdc04e5b85743146ebaf1fc7f1406b7b5e6ec9b700ed35dedc8d16e6.png"},2840:function(e,t,n){n.d(t,{Z:function(){return o},a:function(){return c}});var s=n(2784);let i={},a=s.createContext(i);function c(e){let t=s.useContext(a);return s.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function o(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:c(e.components),s.createElement(a.Provider,{value:t},e.children)}}}]);
1
+ "use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([["9564"],{5126:function(e,t,n){n.r(t),n.d(t,{default:()=>h,frontMatter:()=>c,metadata:()=>s,assets:()=>r,toc:()=>l,contentTitle:()=>o});var s=JSON.parse('{"id":"tools/admin","title":"Admin","description":"Administer COSMOS, install plugins, change settings","source":"@site/docs/tools/admin.md","sourceDirName":"tools","slug":"/tools/admin","permalink":"/tools/staticdocs/docs/tools/admin","draft":false,"unlisted":false,"editUrl":"https://github.com/OpenC3/cosmos/tree/main/docs.openc3.com/docs/tools/admin.md","tags":[],"version":"current","frontMatter":{"title":"Admin","description":"Administer COSMOS, install plugins, change settings","sidebar_custom_props":{"myEmoji":"\uD83D\uDEE0\uFE0F"}},"sidebar":"defaultSidebar","previous":{"title":"Tools","permalink":"/tools/staticdocs/docs/tools"},"next":{"title":"Autonomic (Enterprise)","permalink":"/tools/staticdocs/docs/tools/autonomic"}}'),i=n("2322"),a=n("2840");let c={title:"Admin",description:"Administer COSMOS, install plugins, change settings",sidebar_custom_props:{myEmoji:"\uD83D\uDEE0\uFE0F"}},o=void 0,r={},l=[{value:"Introduction",id:"introduction",level:2},{value:"Plugins",id:"plugins",level:3},{value:"Targets",id:"targets",level:3},{value:"Interfaces",id:"interfaces",level:3},{value:"Routers",id:"routers",level:3},{value:"Microservices",id:"microservices",level:3},{value:"Packages",id:"packages",level:3},{value:"Tools",id:"tools",level:3},{value:"Redis",id:"redis",level:3},{value:"Secrets",id:"secrets",level:3},{value:"Settings",id:"settings",level:3}];function d(e){let t={a:"a",h2:"h2",h3:"h3",img:"img",p:"p",...(0,a.a)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.h2,{id:"introduction",children:"Introduction"}),"\n",(0,i.jsx)(t.p,{children:"Admin has it's own dedicated button at the top of the tools list. It is responsible for administering the COSMOS system including installing new plugins, viewing configuration, storing secrets and changing settings."}),"\n",(0,i.jsx)(t.h3,{id:"plugins",children:"Plugins"}),"\n",(0,i.jsx)(t.p,{children:"The Plugins tab is where you install new plugins into the COSMOS system. Plugins can dynamically add targets, microservices, interfaces, protocols, Telemetry Viewer widgets, and entire tools into the COSMOS runtime. The following screenshot shows the Plugins tab when only the COSMOS Demo is installed:"}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{alt:"Plugins",src:n(8880).Z+"",width:"2200",height:"874"})}),"\n",(0,i.jsx)(t.p,{children:"The plugin gem name is listed along with all the targets it contains. You can Download, Edit, Upgrade, or Delete (uninstall) the plugin using the buttons to the right. If a plugin's target has been modified, the target name turns into a link which when clicked will download the changed files. New plugins are installed by clicking the top field."}),"\n",(0,i.jsx)(t.h3,{id:"targets",children:"Targets"}),"\n",(0,i.jsx)(t.p,{children:"The Targets tab shows all the targets installed and what plugin they came from. Clicking the eyeball shows the raw JSON that makes up the target configuration."}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{alt:"Targets",src:n(2241).Z+"",width:"2200",height:"964"})}),"\n",(0,i.jsx)(t.h3,{id:"interfaces",children:"Interfaces"}),"\n",(0,i.jsx)(t.p,{children:"The Interfaces tab shows all the interfaces installed. Clicking the eyeball shows the raw JSON that makes up the interface configuration."}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{alt:"Interfaces",src:n(1932).Z+"",width:"2200",height:"766"})}),"\n",(0,i.jsx)(t.h3,{id:"routers",children:"Routers"}),"\n",(0,i.jsx)(t.p,{children:"The Routers tab shows all the routers installed. Clicking the eyeball shows the raw JSON that makes up the router configuration."}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{alt:"Routers",src:n(3238).Z+"",width:"2200",height:"480"})}),"\n",(0,i.jsx)(t.h3,{id:"microservices",children:"Microservices"}),"\n",(0,i.jsx)(t.p,{children:"The Microservices tab shows all the microservices installed, their update time, state, and count. Clicking the eyeball shows the raw JSON that makes up the microservice configuration."}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{alt:"Microservices",src:n(1844).Z+"",width:"2200",height:"1226"})}),"\n",(0,i.jsx)(t.h3,{id:"packages",children:"Packages"}),"\n",(0,i.jsx)(t.p,{children:"The Packages tab shows all the Ruby gems and Python packages installed in the system. You can also install packages from this tab if you're in an offline (air gapped) environment where COSMOS can't pull dependencies from Rubygems or Pypi."}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{alt:"Packages",src:n(633).Z+"",width:"2200",height:"2620"})}),"\n",(0,i.jsx)(t.h3,{id:"tools",children:"Tools"}),"\n",(0,i.jsx)(t.p,{children:"The Tools tab lists all the tools installed. You can reorder the tools in the Navigation bar by dragging and dropping the left side grab handle."}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{alt:"Tools",src:n(7065).Z+"",width:"2200",height:"2192"})}),"\n",(0,i.jsxs)(t.p,{children:["You can also add links to existing tools in the navigation bar by using the Add button. Any ",(0,i.jsx)(t.a,{href:"https://pictogrammers.com/library/mdi/",children:"material design icons"})," can be used as the Tool icon."]}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{alt:"Add Tool",src:n(6387).Z+"",width:"2060",height:"232"})}),"\n",(0,i.jsx)(t.h3,{id:"redis",children:"Redis"}),"\n",(0,i.jsx)(t.p,{children:"The Redis tab allows you to interact directly with the underlying Redis database, making it easy to modify or delete data. THIS IS DANGEROUS, and should only be performed by COSMOS developers."}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{alt:"Redis",src:n(6117).Z+"",width:"2200",height:"1254"})}),"\n",(0,i.jsx)(t.h3,{id:"secrets",children:"Secrets"}),"\n",(0,i.jsxs)(t.p,{children:["The Secrets tab allows you to create secrets that can be used by Interfaces or Microservices using the ",(0,i.jsx)(t.a,{href:"../configuration/plugins#secret",children:"SECRET"})," keyword. Secrets require setting the Secret Name and then can be set to an individual value using the Secret Value, or to the contents of a file (like a certificate file) using the file selector. In the following example the USERNAME and PASSWORD were set to values while CA_FILE was set using an uploaded certificate file."]}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{alt:"Secrets",src:n(6728).Z+"",width:"2200",height:"962"})}),"\n",(0,i.jsx)(t.h3,{id:"settings",children:"Settings"}),"\n",(0,i.jsx)(t.p,{children:"The Settings tab contains various settings used throughout COSMOS. These including clearing saved tool configuration, hiding the Astro Clock, changing the system time zone, adding a top and bottom banner, creating a subtitle in the navigation bar, and changing the URLs of the various package libraries."}),"\n",(0,i.jsxs)(t.p,{children:[(0,i.jsx)(t.img,{alt:"Settings1",src:n(7792).Z+"",width:"2200",height:"2172"}),"\n",(0,i.jsx)(t.img,{alt:"Settings2",src:n(4512).Z+"",width:"2200",height:"2436"})]})]})}function h(e={}){let{wrapper:t}={...(0,a.a)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(d,{...e})}):d(e)}},6387:function(e,t,n){n.d(t,{Z:function(){return s}});let s=n.p+"assets/images/add_tool-6919be6e6c05db133a8816a9fc03bf98b0789a8525da4cdaa7b041b25bf9edb8.png"},1932:function(e,t,n){n.d(t,{Z:function(){return s}});let s=n.p+"assets/images/interfaces-fa10646a27eb9045b70c2c485498a864bed1896ff171b7f31f8698288e08ae73.png"},1844:function(e,t,n){n.d(t,{Z:function(){return s}});let s=n.p+"assets/images/microservices-805cc7d137958ac8183579cdb9a9845e7aef79db19723f0773f4ea4d957b48a1.png"},633:function(e,t,n){n.d(t,{Z:function(){return s}});let s=n.p+"assets/images/packages-3bfae1a91b0534077280c323a40e879a8ac6a7c3ac45376b3c706a098dab12c3.png"},8880:function(e,t,n){n.d(t,{Z:function(){return s}});let s=n.p+"assets/images/plugins-aabbe060bec19e6fa2490b737f20758af9000066121f5af85f260a3b14f9b3d8.png"},6117:function(e,t,n){n.d(t,{Z:function(){return s}});let s=n.p+"assets/images/redis-4553b5b35292cca3df1fa08577f2175efef34e0fdfe512f30ca70785b086b24f.png"},3238:function(e,t,n){n.d(t,{Z:function(){return s}});let s=n.p+"assets/images/routers-489fe07165973feede7a63adf71781cca7ecb1f7d17c069761c1c57e70cf926e.png"},6728:function(e,t,n){n.d(t,{Z:function(){return s}});let s=n.p+"assets/images/secrets-c8daf324829a0d4dde1d30f9da89d884ca06ce458e400dfa5d1de4ccb10395a1.png"},7792:function(e,t,n){n.d(t,{Z:function(){return s}});let s=n.p+"assets/images/settings1-36a446ec0455ae5ab3a6d225647264647e517e1e2d83da5c639a63756e0339a6.png"},4512:function(e,t,n){n.d(t,{Z:function(){return s}});let s=n.p+"assets/images/settings2-c18e478b65ba569bea37a2bb185b4702e347aecc570fbc7b26a6e66aeecc9129.png"},2241:function(e,t,n){n.d(t,{Z:function(){return s}});let s=n.p+"assets/images/targets-c02c28769712aa226fdcbd3b90329285aeb39e775b9be1df6ab0e2ad31231518.png"},7065:function(e,t,n){n.d(t,{Z:function(){return s}});let s=n.p+"assets/images/tools-d3ea80e2fdc04e5b85743146ebaf1fc7f1406b7b5e6ec9b700ed35dedc8d16e6.png"},2840:function(e,t,n){n.d(t,{Z:function(){return o},a:function(){return c}});var s=n(2784);let i={},a=s.createContext(i);function c(e){let t=s.useContext(a);return s.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function o(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:c(e.components),s.createElement(a.Provider,{value:t},e.children)}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([["1029"],{8727:function(e,t,n){n.d(t,{Z:()=>x});var s=n("2322");n("2784");var a=n("7239"),l=n("8483"),i=n("6319"),o=n("4918"),r=n("8943"),c=n("7025"),d=n("5961");function u(e){return(0,s.jsx)("svg",{viewBox:"0 0 24 24",...e,children:(0,s.jsx)("path",{d:"M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z",fill:"currentColor"})})}function m(){let e=(0,d.ZP)("/");return(0,s.jsx)("li",{className:"breadcrumbs__item",children:(0,s.jsx)(r.Z,{"aria-label":(0,c.I)({id:"theme.docs.breadcrumbs.home",message:"Home page",description:"The ARIA label for the home page in the breadcrumbs"}),className:"breadcrumbs__link",href:e,children:(0,s.jsx)(u,{className:"breadcrumbHomeIcon_JFrk"})})})}function h(e){let{children:t,href:n,isLast:a}=e,l="breadcrumbs__link";return a?(0,s.jsx)("span",{className:l,itemProp:"name",children:t}):n?(0,s.jsx)(r.Z,{className:l,href:n,itemProp:"item",children:(0,s.jsx)("span",{itemProp:"name",children:t})}):(0,s.jsx)("span",{className:l,children:t})}function b(e){let{children:t,active:n,index:l,addMicrodata:i}=e;return(0,s.jsxs)("li",{...i&&{itemScope:!0,itemProp:"itemListElement",itemType:"https://schema.org/ListItem"},className:(0,a.Z)("breadcrumbs__item",{"breadcrumbs__item--active":n}),children:[t,(0,s.jsx)("meta",{itemProp:"position",content:String(l+1)})]})}function x(){let e=(0,i.s1)(),t=(0,o.Ns)();return e?(0,s.jsx)("nav",{className:(0,a.Z)(l.k.docs.docBreadcrumbs,"breadcrumbsContainer_zCmv"),"aria-label":(0,c.I)({id:"theme.docs.breadcrumbs.navAriaLabel",message:"Breadcrumbs",description:"The ARIA label for the breadcrumbs"}),children:(0,s.jsxs)("ul",{className:"breadcrumbs",itemScope:!0,itemType:"https://schema.org/BreadcrumbList",children:[t&&(0,s.jsx)(m,{}),e.map((t,n)=>{let a=n===e.length-1,l="category"===t.type&&t.linkUnlisted?void 0:t.href;return(0,s.jsx)(b,{active:a,index:n,addMicrodata:!!l,children:(0,s.jsx)(h,{href:l,isLast:a,children:t.label})},n)})]})}):null}},950:function(e,t,n){n.r(t),n.d(t,{default:()=>D});var s=n("2322"),a=n("2784"),l=n("4700"),i=n("7327");let o=a.createContext(null);function r(e){let{children:t,content:n}=e,l=(0,a.useMemo)(()=>({metadata:n.metadata,frontMatter:n.frontMatter,assets:n.assets,contentTitle:n.contentTitle,toc:n.toc}),[n]);return(0,s.jsx)(o.Provider,{value:l,children:t})}function c(){let e=(0,a.useContext)(o);if(null===e)throw new i.i6("DocProvider");return e}function d(){let{metadata:e,frontMatter:t,assets:n}=c();return(0,s.jsx)(l.d,{title:e.title,description:e.description,keywords:t.keywords,image:n.image??t.image})}var u=n("7239"),m=n("3247"),h=n("6852");function b(){let{metadata:e}=c();return(0,s.jsx)(h.Z,{previous:e.previous,next:e.next})}var x=n("5327"),v=n("9885"),p=n("8483"),j=n("7025"),g=n("8943");let f={tag:"tag_qE9H",tagRegular:"tagRegular_aHXt",tagWithCount:"tagWithCount_UC8q"};function _(e){let{permalink:t,label:n,count:a,description:l}=e;return(0,s.jsxs)(g.Z,{href:t,title:l,className:(0,u.Z)(f.tag,a?f.tagWithCount:f.tagRegular),children:[n,a&&(0,s.jsx)("span",{children:a})]})}function Z(e){let{tags:t}=e;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("b",{children:(0,s.jsx)(j.Z,{id:"theme.tags.tagsListLabel",description:"The label alongside a tag list",children:"Tags:"})}),(0,s.jsx)("ul",{className:(0,u.Z)("tags_q74f","padding--none","margin-left--sm"),children:t.map(e=>(0,s.jsx)("li",{className:"tag_lSC7",children:(0,s.jsx)(_,{...e})},e.permalink))})]})}var C=n("2007");function k(){let{metadata:e}=c(),{editUrl:t,lastUpdatedAt:n,lastUpdatedBy:a,tags:l}=e,i=l.length>0,o=!!(t||n||a);return i||o?(0,s.jsxs)("footer",{className:(0,u.Z)(p.k.docs.docFooter,"docusaurus-mt-lg"),children:[i&&(0,s.jsx)("div",{className:(0,u.Z)("row margin-top--sm",p.k.docs.docFooterTagsRow),children:(0,s.jsx)("div",{className:"col",children:(0,s.jsx)(Z,{tags:l})})}),o&&(0,s.jsx)(C.Z,{className:(0,u.Z)("margin-top--sm",p.k.docs.docFooterEditMetaRow),editUrl:t,lastUpdatedAt:n,lastUpdatedBy:a})]}):null}var N=n("6663"),L=n("101");let T={tocCollapsibleButton:"tocCollapsibleButton_htYj",tocCollapsibleButtonExpanded:"tocCollapsibleButtonExpanded_pAh7"};function w(e){let{collapsed:t,...n}=e;return(0,s.jsx)("button",{type:"button",...n,className:(0,u.Z)("clean-btn",T.tocCollapsibleButton,!t&&T.tocCollapsibleButtonExpanded,n.className),children:(0,s.jsx)(j.Z,{id:"theme.TOCCollapsible.toggleButtonLabel",description:"The label used by the button on the collapsible TOC component",children:"On this page"})})}let B={tocCollapsible:"tocCollapsible_O_Qc",tocCollapsibleContent:"tocCollapsibleContent_SlnY",tocCollapsibleExpanded:"tocCollapsibleExpanded_klrc"};function I(e){let{toc:t,className:n,minHeadingLevel:a,maxHeadingLevel:l}=e,{collapsed:i,toggleCollapsed:o}=(0,N.u)({initialState:!0});return(0,s.jsxs)("div",{className:(0,u.Z)(B.tocCollapsible,!i&&B.tocCollapsibleExpanded,n),children:[(0,s.jsx)(w,{collapsed:i,onClick:o}),(0,s.jsx)(N.z,{lazy:!0,className:B.tocCollapsibleContent,collapsed:i,children:(0,s.jsx)(L.Z,{toc:t,minHeadingLevel:a,maxHeadingLevel:l})})]})}function y(){let{toc:e,frontMatter:t}=c();return(0,s.jsx)(I,{toc:e,minHeadingLevel:t.toc_min_heading_level,maxHeadingLevel:t.toc_max_heading_level,className:(0,u.Z)(p.k.docs.docTocMobile,"tocMobile_tjDr")})}var A=n("4459");function M(){let{toc:e,frontMatter:t}=c();return(0,s.jsx)(A.Z,{toc:e,minHeadingLevel:t.toc_min_heading_level,maxHeadingLevel:t.toc_max_heading_level,className:p.k.docs.docTocDesktop})}var E=n("8322"),H=n("4793");function P(e){let{children:t}=e,n=function(){let{metadata:e,frontMatter:t,contentTitle:n}=c();return t.hide_title||void 0!==n?null:e.title}();return(0,s.jsxs)("div",{className:(0,u.Z)(p.k.docs.docMarkdown,"markdown"),children:[n&&(0,s.jsx)("header",{children:(0,s.jsx)(E.Z,{as:"h1",children:n})}),(0,s.jsx)(H.Z,{children:t})]})}var R=n("8727"),V=n("6518");let F={docItemContainer:"docItemContainer_Rv5Z",docItemCol:"docItemCol_YAwJ"};function S(e){let{children:t}=e,n=function(){let{frontMatter:e,toc:t}=c(),n=(0,m.i)(),a=e.hide_table_of_contents,l=!a&&t.length>0;return{hidden:a,mobile:l?(0,s.jsx)(y,{}):void 0,desktop:l&&("desktop"===n||"ssr"===n)?(0,s.jsx)(M,{}):void 0}}(),{metadata:a}=c();return(0,s.jsxs)("div",{className:"row",children:[(0,s.jsxs)("div",{className:(0,u.Z)("col",!n.hidden&&F.docItemCol),children:[(0,s.jsx)(V.Z,{metadata:a}),(0,s.jsx)(x.Z,{}),(0,s.jsxs)("div",{className:F.docItemContainer,children:[(0,s.jsxs)("article",{children:[(0,s.jsx)(R.Z,{}),(0,s.jsx)(v.Z,{}),n.mobile,(0,s.jsx)(P,{children:t}),(0,s.jsx)(k,{})]}),(0,s.jsx)(b,{})]})]}),n.desktop&&(0,s.jsx)("div",{className:"col col--3",children:n.desktop})]})}function D(e){let t=`docs-doc-id-${e.content.metadata.id}`,n=e.content;return(0,s.jsx)(r,{content:e.content,children:(0,s.jsxs)(l.FG,{className:t,children:[(0,s.jsx)(d,{}),(0,s.jsx)(S,{children:(0,s.jsx)(n,{})})]})})}},6852:function(e,t,n){n.d(t,{Z:()=>r});var s=n("2322");n("2784");var a=n("7025"),l=n("7239"),i=n("8943");function o(e){let{permalink:t,title:n,subLabel:a,isNext:o}=e;return(0,s.jsxs)(i.Z,{className:(0,l.Z)("pagination-nav__link",o?"pagination-nav__link--next":"pagination-nav__link--prev"),to:t,children:[a&&(0,s.jsx)("div",{className:"pagination-nav__sublabel",children:a}),(0,s.jsx)("div",{className:"pagination-nav__label",children:n})]})}function r(e){let{previous:t,next:n}=e;return(0,s.jsxs)("nav",{className:"pagination-nav docusaurus-mt-lg","aria-label":(0,a.I)({id:"theme.docs.paginator.navAriaLabel",message:"Docs pages",description:"The ARIA label for the docs pagination"}),children:[t&&(0,s.jsx)(o,{...t,subLabel:(0,s.jsx)(a.Z,{id:"theme.docs.paginator.previous",description:"The label used to navigate to the previous doc",children:"Previous"})}),n&&(0,s.jsx)(o,{...n,subLabel:(0,s.jsx)(a.Z,{id:"theme.docs.paginator.next",description:"The label used to navigate to the next doc",children:"Next"}),isNext:!0})]})}},9885:function(e,t,n){n.d(t,{Z:function(){return r}});var s=n(2322);n(2784);var a=n(7239),l=n(7025),i=n(8483),o=n(1530);function r(e){let{className:t}=e,n=(0,o.E)();return n.badge?(0,s.jsx)("span",{className:(0,a.Z)(t,i.k.docs.docVersionBadge,"badge badge--secondary"),children:(0,s.jsx)(l.Z,{id:"theme.docs.versionBadge.label",values:{versionLabel:n.label},children:"Version: {versionLabel}"})}):null}},5327:function(e,t,n){n.d(t,{Z:function(){return v}});var s=n(2322);n(2784);var a=n(7239),l=n(9221),i=n(8943),o=n(7025),r=n(6128),c=n(8483),d=n(8226),u=n(1530);let m={unreleased:function(e){let{siteTitle:t,versionMetadata:n}=e;return(0,s.jsx)(o.Z,{id:"theme.docs.versions.unreleasedVersionLabel",description:"The label used to tell the user that he's browsing an unreleased doc version",values:{siteTitle:t,versionLabel:(0,s.jsx)("b",{children:n.label})},children:"This is unreleased documentation for {siteTitle} {versionLabel} version."})},unmaintained:function(e){let{siteTitle:t,versionMetadata:n}=e;return(0,s.jsx)(o.Z,{id:"theme.docs.versions.unmaintainedVersionLabel",description:"The label used to tell the user that he's browsing an unmaintained doc version",values:{siteTitle:t,versionLabel:(0,s.jsx)("b",{children:n.label})},children:"This is documentation for {siteTitle} {versionLabel}, which is no longer actively maintained."})}};function h(e){let t=m[e.versionMetadata.banner];return(0,s.jsx)(t,{...e})}function b(e){let{versionLabel:t,to:n,onClick:a}=e;return(0,s.jsx)(o.Z,{id:"theme.docs.versions.latestVersionSuggestionLabel",description:"The label used to tell the user to check the latest version",values:{versionLabel:t,latestVersionLink:(0,s.jsx)("b",{children:(0,s.jsx)(i.Z,{to:n,onClick:a,children:(0,s.jsx)(o.Z,{id:"theme.docs.versions.latestVersionLinkLabel",description:"The label used for the latest version suggestion link label",children:"latest version"})})})},children:"For up-to-date documentation, see the {latestVersionLink} ({versionLabel})."})}function x(e){let{className:t,versionMetadata:n}=e,{siteConfig:{title:i}}=(0,l.Z)(),{pluginId:o}=(0,r.gA)({failfast:!0}),{savePreferredVersionName:u}=(0,d.J)(o),{latestDocSuggestion:m,latestVersionSuggestion:x}=(0,r.Jo)(o),v=m??x.docs.find(e=>e.id===x.mainDocId);return(0,s.jsxs)("div",{className:(0,a.Z)(t,c.k.docs.docVersionBanner,"alert alert--warning margin-bottom--md"),role:"alert",children:[(0,s.jsx)("div",{children:(0,s.jsx)(h,{siteTitle:i,versionMetadata:n})}),(0,s.jsx)("div",{className:"margin-top--md",children:(0,s.jsx)(b,{versionLabel:x.label,to:v.path,onClick:()=>u(x.name)})})]})}function v(e){let{className:t}=e,n=(0,u.E)();return n.banner?(0,s.jsx)(x,{className:t,versionMetadata:n}):null}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([["8884"],{5295:function(e,t,i){i.r(t),i.d(t,{default:()=>h,frontMatter:()=>c,metadata:()=>n,assets:()=>d,toc:()=>l,contentTitle:()=>a});var n=JSON.parse('{"id":"guides/local-mode","title":"Local Mode","description":"Edit scripts and screens directly on the host file system","source":"@site/docs/guides/local-mode.md","sourceDirName":"guides","slug":"/guides/local-mode","permalink":"/tools/staticdocs/docs/guides/local-mode","draft":false,"unlisted":false,"editUrl":"https://github.com/OpenC3/cosmos/tree/main/docs.openc3.com/docs/guides/local-mode.md","tags":[],"version":"current","frontMatter":{"title":"Local Mode","description":"Edit scripts and screens directly on the host file system","sidebar_custom_props":{"myEmoji":"\uD83E\uDDED"}},"sidebar":"defaultSidebar","previous":{"title":"Little Endian Bitfields","permalink":"/tools/staticdocs/docs/guides/little-endian-bitfields"},"next":{"title":"Logging","permalink":"/tools/staticdocs/docs/guides/logging"}}'),o=i("2322"),s=i("2840");let c={title:"Local Mode",description:"Edit scripts and screens directly on the host file system",sidebar_custom_props:{myEmoji:"\uD83E\uDDED"}},a=void 0,d={},l=[{value:"Using Local Mode",id:"using-local-mode",level:2},{value:"Editing scripts",id:"editing-scripts",level:3},{value:"Disabling Local Mode",id:"disabling-local-mode",level:3},{value:"Configuration Management",id:"configuration-management",level:2}];function r(e){let t={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",img:"img",p:"p",pre:"pre",...(0,s.a)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(t.p,{children:"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."}),"\n",(0,o.jsx)(t.h2,{id:"using-local-mode",children:"Using Local Mode"}),"\n",(0,o.jsxs)(t.p,{children:["In this tutorial we will use the COSMOS Demo as configured by the ",(0,o.jsx)(t.a,{href:"/tools/staticdocs/docs/getting-started/installation",children:"Installation Guide"}),". You should have cloned a ",(0,o.jsx)(t.a,{href:"https://github.com/OpenC3/cosmos-project",children:"cosmos-project"})," and started it using ",(0,o.jsx)(t.code,{children:"openc3.sh run"}),"."]}),"\n",(0,o.jsxs)(t.p,{children:["If you check the project directory you should see a ",(0,o.jsx)(t.code,{children:"plugins/DEFAULT/openc3-cosmos-demo"})," directory. This will contain both the gem that was installed and a ",(0,o.jsx)(t.code,{children:"plugin_instance.json"})," file. The ",(0,o.jsx)(t.code,{children:"plugin_instance.json"})," file captures the plugin.txt values when the plugin was installed. Note, all files in the plugins directory are meant to be configuration managed with the project. This ensures if you make local edits and check them in, another user can clone the project and get the exact same configuration. We will demonstrate this later."]}),"\n",(0,o.jsx)(t.h3,{id:"editing-scripts",children:"Editing scripts"}),"\n",(0,o.jsx)(t.admonition,{title:"Visual Studio Code",type:"info",children:(0,o.jsxs)(t.p,{children:["This tutorial will use ",(0,o.jsx)(t.a,{href:"https://code.visualstudio.com",children:"VS Code"})," which is the editor used by the COSMOS developers."]})}),"\n",(0,o.jsxs)(t.p,{children:["The most common use case for Local Mode is script development. Launch Script Runner and open the ",(0,o.jsx)(t.code,{children:"INST/procedures/checks.rb"})," file. If you run this script you'll notice that it has a few errors (by design) which prevent it from running to completion. Let's fix it! Comment out lines 7 & 9 and save the script. You should now notice that Local Mode has saved a copy of the script to ",(0,o.jsx)(t.code,{children:"plugins/targets_modified/INST/procedures/checks.rb"}),"."]}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{alt:"Project Layout",src:i(4465).Z+"",width:"991",height:"547"})}),"\n",(0,o.jsxs)(t.p,{children:["At this point Local Mode keeps these scripts in sync so we can edit in either place. Let's edit the local script by adding a simple comment at the top: ",(0,o.jsx)(t.code,{children:"# This is a script"}),". Now if we go back to Script Runner the changes have not ",(0,o.jsx)(t.em,{children:"automatically"})," appeared. However, there is a Reload button next to the filename that will refresh the file from the backend."]}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{alt:"Project Layout",src:i(2308).Z+"",width:"839",height:"532"})}),"\n",(0,o.jsx)(t.p,{children:"Clicking this reloads the file which has been synced into COSMOS and now we see our comment."}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{alt:"Project Layout",src:i(9).Z+"",width:"839",height:"232"})}),"\n",(0,o.jsx)(t.h3,{id:"disabling-local-mode",children:"Disabling Local Mode"}),"\n",(0,o.jsxs)(t.p,{children:["If you want to disable Local Mode you can edit the .env file and delete the setting ",(0,o.jsx)(t.code,{children:"OPENC3_LOCAL_MODE=1"}),"."]}),"\n",(0,o.jsx)(t.h2,{id:"configuration-management",children:"Configuration Management"}),"\n",(0,o.jsx)(t.p,{children:"It is recommended to configuration manage the entire project including the plugins directory. This will allow any user who starts COSMOS to launch an identical configuration. Plugins are created and updated with any modifications found in the targets_modified directory."}),"\n",(0,o.jsx)(t.p,{children:"At some point you will probably want to release your local changes back to the plugin they originated from. Simply copy the entire targets_modified/TARGET directory back to the original plugin. At that point you can rebuild the plugin using the CLI."}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{children:"openc3-cosmos-demo % ./openc3.sh cli rake build VERSION=1.0.1\n Successfully built RubyGem\n Name: openc3-cosmos-demo\n Version: 1.0.1\n File: openc3-cosmos-demo-1.0.1.gem\n"})}),"\n",(0,o.jsx)(t.p,{children:"Upgrade the plugin using the Admin Plugins tab and the Upgrade link. When you select your newly built plugin, COSMOS detects the existing changes and asks if you want to delete them. There is a stern warning attached because this will permanently remove these changes! Since we just moved over the changes and rebuilt the plugin we will check the box and INSTALL."}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{alt:"Project Layout",src:i(3079).Z+"",width:"1272",height:"619"})}),"\n",(0,o.jsxs)(t.p,{children:["When the new plugin is installed, the project's ",(0,o.jsx)(t.code,{children:"plugins"})," directory gets updated with the new plugin and everything under the targets_modified directory is removed because there are no modifications on a new install."]}),"\n",(0,o.jsx)(t.p,{children:"Local Mode is a powerful way to develop scripts and screens on the local file system and automatically have them sync to COSMOS."})]})}function h(e={}){let{wrapper:t}={...(0,s.a)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(r,{...e})}):r(e)}},3079:function(e,t,i){i.d(t,{Z:function(){return n}});let n=i.p+"assets/images/delete_modified-ecf9beabf5e6cc6b8cc9d249ba9e313bd18d51c671ebc36029b4cebd729fa2d0.png"},4465:function(e,t,i){i.d(t,{Z:function(){return n}});let n=i.p+"assets/images/project-c521374330008c1292b4da1b9a1c8af6647ab59f1617b470f26e76a521fe8059.png"},2308:function(e,t,i){i.d(t,{Z:function(){return n}});let n=i.p+"assets/images/reload_file-056b240b1d48539a9fecfe2ad1bac0c27d83f5dddcd29af6cf719986869406ee.png"},9:function(e,t,i){i.d(t,{Z:function(){return n}});let n=i.p+"assets/images/reloaded-516bc4c257f9b7f6ce3714f5a06eeef8ad47a8461e21613ba26989d5e56260ec.png"},2840:function(e,t,i){i.d(t,{Z:function(){return a},a:function(){return c}});var n=i(2784);let o={},s=n.createContext(o);function c(e){let t=n.useContext(s);return n.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:c(e.components),n.createElement(s.Provider,{value:t},e.children)}}}]);
1
+ "use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([["8884"],{5262:function(e,t,i){i.r(t),i.d(t,{default:()=>h,frontMatter:()=>c,metadata:()=>n,assets:()=>d,toc:()=>l,contentTitle:()=>a});var n=JSON.parse('{"id":"guides/local-mode","title":"Local Mode","description":"Edit scripts and screens directly on the host file system","source":"@site/docs/guides/local-mode.md","sourceDirName":"guides","slug":"/guides/local-mode","permalink":"/tools/staticdocs/docs/guides/local-mode","draft":false,"unlisted":false,"editUrl":"https://github.com/OpenC3/cosmos/tree/main/docs.openc3.com/docs/guides/local-mode.md","tags":[],"version":"current","frontMatter":{"title":"Local Mode","description":"Edit scripts and screens directly on the host file system","sidebar_custom_props":{"myEmoji":"\uD83E\uDDED"}},"sidebar":"defaultSidebar","previous":{"title":"Little Endian Bitfields","permalink":"/tools/staticdocs/docs/guides/little-endian-bitfields"},"next":{"title":"Logging","permalink":"/tools/staticdocs/docs/guides/logging"}}'),o=i("2322"),s=i("2840");let c={title:"Local Mode",description:"Edit scripts and screens directly on the host file system",sidebar_custom_props:{myEmoji:"\uD83E\uDDED"}},a=void 0,d={},l=[{value:"Using Local Mode",id:"using-local-mode",level:2},{value:"Editing scripts",id:"editing-scripts",level:3},{value:"Disabling Local Mode",id:"disabling-local-mode",level:3},{value:"Configuration Management",id:"configuration-management",level:2}];function r(e){let t={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",img:"img",p:"p",pre:"pre",...(0,s.a)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(t.p,{children:"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."}),"\n",(0,o.jsx)(t.h2,{id:"using-local-mode",children:"Using Local Mode"}),"\n",(0,o.jsxs)(t.p,{children:["In this tutorial we will use the COSMOS Demo as configured by the ",(0,o.jsx)(t.a,{href:"/tools/staticdocs/docs/getting-started/installation",children:"Installation Guide"}),". You should have cloned a ",(0,o.jsx)(t.a,{href:"https://github.com/OpenC3/cosmos-project",children:"cosmos-project"})," and started it using ",(0,o.jsx)(t.code,{children:"openc3.sh run"}),"."]}),"\n",(0,o.jsxs)(t.p,{children:["If you check the project directory you should see a ",(0,o.jsx)(t.code,{children:"plugins/DEFAULT/openc3-cosmos-demo"})," directory. This will contain both the gem that was installed and a ",(0,o.jsx)(t.code,{children:"plugin_instance.json"})," file. The ",(0,o.jsx)(t.code,{children:"plugin_instance.json"})," file captures the plugin.txt values when the plugin was installed. Note, all files in the plugins directory are meant to be configuration managed with the project. This ensures if you make local edits and check them in, another user can clone the project and get the exact same configuration. We will demonstrate this later."]}),"\n",(0,o.jsx)(t.h3,{id:"editing-scripts",children:"Editing scripts"}),"\n",(0,o.jsx)(t.admonition,{title:"Visual Studio Code",type:"info",children:(0,o.jsxs)(t.p,{children:["This tutorial will use ",(0,o.jsx)(t.a,{href:"https://code.visualstudio.com",children:"VS Code"})," which is the editor used by the COSMOS developers."]})}),"\n",(0,o.jsxs)(t.p,{children:["The most common use case for Local Mode is script development. Launch Script Runner and open the ",(0,o.jsx)(t.code,{children:"INST/procedures/checks.rb"})," file. If you run this script you'll notice that it has a few errors (by design) which prevent it from running to completion. Let's fix it! Comment out lines 7 & 9 and save the script. You should now notice that Local Mode has saved a copy of the script to ",(0,o.jsx)(t.code,{children:"plugins/targets_modified/INST/procedures/checks.rb"}),"."]}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{alt:"Project Layout",src:i(4465).Z+"",width:"991",height:"547"})}),"\n",(0,o.jsxs)(t.p,{children:["At this point Local Mode keeps these scripts in sync so we can edit in either place. Let's edit the local script by adding a simple comment at the top: ",(0,o.jsx)(t.code,{children:"# This is a script"}),". Now if we go back to Script Runner the changes have not ",(0,o.jsx)(t.em,{children:"automatically"})," appeared. However, there is a Reload button next to the filename that will refresh the file from the backend."]}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{alt:"Project Layout",src:i(2308).Z+"",width:"839",height:"532"})}),"\n",(0,o.jsx)(t.p,{children:"Clicking this reloads the file which has been synced into COSMOS and now we see our comment."}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{alt:"Project Layout",src:i(9).Z+"",width:"839",height:"232"})}),"\n",(0,o.jsx)(t.h3,{id:"disabling-local-mode",children:"Disabling Local Mode"}),"\n",(0,o.jsxs)(t.p,{children:["If you want to disable Local Mode you can edit the .env file and delete the setting ",(0,o.jsx)(t.code,{children:"OPENC3_LOCAL_MODE=1"}),"."]}),"\n",(0,o.jsx)(t.h2,{id:"configuration-management",children:"Configuration Management"}),"\n",(0,o.jsx)(t.p,{children:"It is recommended to configuration manage the entire project including the plugins directory. This will allow any user who starts COSMOS to launch an identical configuration. Plugins are created and updated with any modifications found in the targets_modified directory."}),"\n",(0,o.jsx)(t.p,{children:"At some point you will probably want to release your local changes back to the plugin they originated from. Simply copy the entire targets_modified/TARGET directory back to the original plugin. At that point you can rebuild the plugin using the CLI."}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{children:"openc3-cosmos-demo % ./openc3.sh cli rake build VERSION=1.0.1\n Successfully built RubyGem\n Name: openc3-cosmos-demo\n Version: 1.0.1\n File: openc3-cosmos-demo-1.0.1.gem\n"})}),"\n",(0,o.jsx)(t.p,{children:"Upgrade the plugin using the Admin Plugins tab and the Upgrade link. When you select your newly built plugin, COSMOS detects the existing changes and asks if you want to delete them. There is a stern warning attached because this will permanently remove these changes! Since we just moved over the changes and rebuilt the plugin we will check the box and INSTALL."}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{alt:"Project Layout",src:i(3079).Z+"",width:"1272",height:"619"})}),"\n",(0,o.jsxs)(t.p,{children:["When the new plugin is installed, the project's ",(0,o.jsx)(t.code,{children:"plugins"})," directory gets updated with the new plugin and everything under the targets_modified directory is removed because there are no modifications on a new install."]}),"\n",(0,o.jsx)(t.p,{children:"Local Mode is a powerful way to develop scripts and screens on the local file system and automatically have them sync to COSMOS."})]})}function h(e={}){let{wrapper:t}={...(0,s.a)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(r,{...e})}):r(e)}},3079:function(e,t,i){i.d(t,{Z:function(){return n}});let n=i.p+"assets/images/delete_modified-ecf9beabf5e6cc6b8cc9d249ba9e313bd18d51c671ebc36029b4cebd729fa2d0.png"},4465:function(e,t,i){i.d(t,{Z:function(){return n}});let n=i.p+"assets/images/project-c521374330008c1292b4da1b9a1c8af6647ab59f1617b470f26e76a521fe8059.png"},2308:function(e,t,i){i.d(t,{Z:function(){return n}});let n=i.p+"assets/images/reload_file-056b240b1d48539a9fecfe2ad1bac0c27d83f5dddcd29af6cf719986869406ee.png"},9:function(e,t,i){i.d(t,{Z:function(){return n}});let n=i.p+"assets/images/reloaded-516bc4c257f9b7f6ce3714f5a06eeef8ad47a8461e21613ba26989d5e56260ec.png"},2840:function(e,t,i){i.d(t,{Z:function(){return a},a:function(){return c}});var n=i(2784);let o={},s=n.createContext(o);function c(e){let t=n.useContext(s);return n.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:c(e.components),n.createElement(s.Provider,{value:t},e.children)}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([["8713"],{2664:function(e,s,t){t.r(s),t.d(s,{default:()=>h,frontMatter:()=>i,metadata:()=>n,assets:()=>c,toc:()=>d,contentTitle:()=>a});var n=JSON.parse('{"id":"getting-started/key_concepts","title":"Key Concepts","description":"Projects, Containerization, Frontend, Backend","source":"@site/docs/getting-started/key_concepts.md","sourceDirName":"getting-started","slug":"/getting-started/key_concepts","permalink":"/tools/staticdocs/docs/getting-started/key_concepts","draft":false,"unlisted":false,"editUrl":"https://github.com/OpenC3/cosmos/tree/main/docs.openc3.com/docs/getting-started/key_concepts.md","tags":[],"version":"current","sidebarPosition":5,"frontMatter":{"sidebar_position":5,"title":"Key Concepts","description":"Projects, Containerization, Frontend, Backend","sidebar_custom_props":{"myEmoji":"\uD83D\uDCA1"}},"sidebar":"defaultSidebar","previous":{"title":"Upgrading","permalink":"/tools/staticdocs/docs/getting-started/upgrading"},"next":{"title":"Requirements and Design","permalink":"/tools/staticdocs/docs/getting-started/requirements"}}'),o=t("2322"),r=t("2840");let i={sidebar_position:5,title:"Key Concepts",description:"Projects, Containerization, Frontend, Backend",sidebar_custom_props:{myEmoji:"\uD83D\uDCA1"}},a="OpenC3 COSMOS Key Concepts",c={},d=[{value:"Projects",id:"projects",level:2},{value:"Containerization",id:"containerization",level:2},{value:"Images",id:"images",level:3},{value:"Containers",id:"containers",level:3},{value:"Docker Compose",id:"docker-compose",level:3},{value:"Environment File",id:"environment-file",level:3},{value:"Kubernetes",id:"kubernetes",level:3},{value:"Frontend",id:"frontend",level:2},{value:"Vue.js",id:"vuejs",level:3},{value:"Single-Spa",id:"single-spa",level:3},{value:"Astro UX",id:"astro-ux",level:3},{value:"Backend",id:"backend",level:2},{value:"Redis",id:"redis",level:3},{value:"MinIO",id:"minio",level:3},{value:"Ruby on Rails",id:"ruby-on-rails",level:3}];function l(e){let s={a:"a",h1:"h1",h2:"h2",h3:"h3",header:"header",p:"p",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,r.a)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(s.header,{children:(0,o.jsx)(s.h1,{id:"openc3-cosmos-key-concepts",children:"OpenC3 COSMOS Key Concepts"})}),"\n",(0,o.jsx)(s.h2,{id:"projects",children:"Projects"}),"\n",(0,o.jsxs)(s.p,{children:["The main COSMOS ",(0,o.jsx)(s.a,{href:"https://github.com/OpenC3/cosmos",children:"repo"})," contains all the source code used to build and run COSMOS. However, users (not developers) of COSMOS should use the COSMOS ",(0,o.jsx)(s.a,{href:"https://github.com/OpenC3/cosmos-project",children:"project"})," to launch COSMOS. The project consists of the ",(0,o.jsx)(s.a,{href:"https://github.com/OpenC3/cosmos-project/blob/main/openc3.sh",children:"openc3.sh"})," and ",(0,o.jsx)(s.a,{href:"https://github.com/OpenC3/cosmos-project/blob/main/openc3.bat",children:"openc3.bat"})," files for starting and stopping COSMOS, the ",(0,o.jsx)(s.a,{href:"https://github.com/OpenC3/cosmos-project/blob/main/compose.yaml",children:"compose.yaml"})," for configuring the COSMOS containers, and the ",(0,o.jsx)(s.a,{href:"https://github.com/OpenC3/cosmos-project/blob/main/.env",children:".env"})," file for setting runtime variables. Additionally, the COSMOS project contains user modifiable config files for both Redis and Traefik."]}),"\n",(0,o.jsx)(s.h2,{id:"containerization",children:"Containerization"}),"\n",(0,o.jsx)(s.h3,{id:"images",children:"Images"}),"\n",(0,o.jsxs)(s.p,{children:["Per ",(0,o.jsx)(s.a,{href:"https://docs.docker.com/get-started/overview/#images",children:"Docker"}),', "An image is a read-only template with instructions for creating a Docker container." The base operating system COSMOS uses is called ',(0,o.jsx)(s.a,{href:"https://www.alpinelinux.org/",children:"Alpine Linux"}),". It is a simple and compact image with a full package system that allows us to install our dependencies. Starting with Alpine, we create a ",(0,o.jsx)(s.a,{href:"https://docs.docker.com/engine/reference/builder/",children:"Dockerfile"})," to add Ruby and Python and a few other packages to create our own docker image. We further build upon that image to create a NodeJS image to support our frontend and additional images to support our backend."]}),"\n",(0,o.jsx)(s.h3,{id:"containers",children:"Containers"}),"\n",(0,o.jsxs)(s.p,{children:["Per ",(0,o.jsx)(s.a,{href:"https://www.docker.com/resources/what-container/",children:"Docker"}),', "a container is a standard unit of software that packages up code and all its dependencies so the application runs quickly and reliably from one computing environment to another." Also per ',(0,o.jsx)(s.a,{href:"https://docs.docker.com/guides/walkthroughs/what-is-a-container/",children:"Docker"}),', "A container is an isolated environment for your code. This means that a container has no knowledge of your operating system, or your files. It runs on the environment provided to you by Docker Desktop. Containers have everything that your code needs in order to run, down to a base operating system." COSMOS utilizes containers to provide a consistent runtime environment. Containers make it easy to deploy to local on-prem servers, cloud environments, or air-gapped networks.']}),"\n",(0,o.jsx)(s.p,{children:"The COSMOS Open Source containers consist of the following:"}),"\n",(0,o.jsxs)(s.table,{children:[(0,o.jsx)(s.thead,{children:(0,o.jsxs)(s.tr,{children:[(0,o.jsx)(s.th,{children:"Name"}),(0,o.jsx)(s.th,{children:"Description"})]})}),(0,o.jsxs)(s.tbody,{children:[(0,o.jsxs)(s.tr,{children:[(0,o.jsx)(s.td,{children:"cosmos-openc3-cosmos-init-1"}),(0,o.jsx)(s.td,{children:"Copies files to Minio and configures COSMOS then exits"})]}),(0,o.jsxs)(s.tr,{children:[(0,o.jsx)(s.td,{children:"cosmos-openc3-operator-1"}),(0,o.jsx)(s.td,{children:"Main COSMOS container that runs the interfaces and target microservices"})]}),(0,o.jsxs)(s.tr,{children:[(0,o.jsx)(s.td,{children:"cosmos-openc3-cosmos-cmd-tlm-api-1"}),(0,o.jsx)(s.td,{children:"Rails server that provides all the COSMOS API endpoints"})]}),(0,o.jsxs)(s.tr,{children:[(0,o.jsx)(s.td,{children:"cosmos-openc3-cosmos-script-runner-api-1"}),(0,o.jsx)(s.td,{children:"Rails server that provides the Script API endpoints"})]}),(0,o.jsxs)(s.tr,{children:[(0,o.jsx)(s.td,{children:"cosmos-openc3-redis-1"}),(0,o.jsx)(s.td,{children:"Serves the static target configuration"})]}),(0,o.jsxs)(s.tr,{children:[(0,o.jsx)(s.td,{children:"cosmos-openc3-redis-ephemeral-1"}),(0,o.jsxs)(s.td,{children:["Serves the ",(0,o.jsx)(s.a,{href:"https://redis.io/docs/data-types/streams",children:"streams"})," containing the raw and decomutated data"]})]}),(0,o.jsxs)(s.tr,{children:[(0,o.jsx)(s.td,{children:"cosmos-openc3-minio-1"}),(0,o.jsx)(s.td,{children:"Provides a S3 like bucket storage interface and also serves as a static webserver for the tool files"})]}),(0,o.jsxs)(s.tr,{children:[(0,o.jsx)(s.td,{children:"cosmos-openc3-traefik-1"}),(0,o.jsx)(s.td,{children:"Provides a reverse proxy and load balancer with routes to the COSMOS endpoints"})]})]})]}),"\n",(0,o.jsxs)(s.p,{children:["The container list for ",(0,o.jsx)(s.a,{href:"https://openc3.com/enterprise",children:"Enterprise COSMOS"})," consists of the following:"]}),"\n",(0,o.jsxs)(s.table,{children:[(0,o.jsx)(s.thead,{children:(0,o.jsxs)(s.tr,{children:[(0,o.jsx)(s.th,{children:"Name"}),(0,o.jsx)(s.th,{children:"Description"})]})}),(0,o.jsxs)(s.tbody,{children:[(0,o.jsxs)(s.tr,{children:[(0,o.jsx)(s.td,{children:"cosmos-enterprise-openc3-metrics-1"}),(0,o.jsx)(s.td,{children:"Rails server that provides metrics on COSMOS performance"})]}),(0,o.jsxs)(s.tr,{children:[(0,o.jsx)(s.td,{children:"cosmos-enterprise-openc3-keycloak-1"}),(0,o.jsx)(s.td,{children:"Single-Sign On service for authentication"})]}),(0,o.jsxs)(s.tr,{children:[(0,o.jsx)(s.td,{children:"cosmos-enterprise-openc3-postgresql-1"}),(0,o.jsx)(s.td,{children:"SQL Database for use by Keycloak"})]}),(0,o.jsxs)(s.tr,{children:[(0,o.jsx)(s.td,{children:"openc3-nfs *"}),(0,o.jsx)(s.td,{children:"Network File System pod only for use in Kubernetes to share code libraries between containers"})]})]})]}),"\n",(0,o.jsx)(s.h3,{id:"docker-compose",children:"Docker Compose"}),"\n",(0,o.jsxs)(s.p,{children:["Per ",(0,o.jsx)(s.a,{href:"https://docs.docker.com/compose/",children:"Docker"}),', "Compose is a tool for defining and running multi-container Docker applications. With Compose, you use a YAML file to configure your application\'s services. Then, with a single command, you create and start all the services from your configuration." OpenC3 uses compose files to both build and run COSMOS. The ',(0,o.jsx)(s.a,{href:"https://github.com/OpenC3/cosmos-project/blob/main/compose.yaml",children:"compose.yaml"})," is where ports are exposed and environment variables are used."]}),"\n",(0,o.jsx)(s.h3,{id:"environment-file",children:"Environment File"}),"\n",(0,o.jsxs)(s.p,{children:["COSMOS uses an ",(0,o.jsx)(s.a,{href:"https://docs.docker.com/compose/environment-variables/env-file/",children:"environment file"})," along with Docker Compose to pass environment variables into the COSMOS runtime. This ",(0,o.jsx)(s.a,{href:"https://github.com/OpenC3/cosmos-project/blob/main/.env",children:".env"})," file consists of simple key value pairs that contain the version of COSMOS deployed, usernames and passwords, and much more."]}),"\n",(0,o.jsx)(s.h3,{id:"kubernetes",children:"Kubernetes"}),"\n",(0,o.jsxs)(s.p,{children:["Per ",(0,o.jsx)(s.a,{href:"https://kubernetes.io/",children:"Kubernetes.io"}),', "Kubernetes, also known as K8s, is an open-source system for automating deployment, scaling, and management of containerized applications. It groups containers that make up an application into logical units for easy management and discovery." ',(0,o.jsx)(s.a,{href:"https://openc3.com/enterprise",children:"COSMOS Enterprise"})," provides ",(0,o.jsx)(s.a,{href:"https://helm.sh/docs/topics/charts/",children:"Helm charts"})," for easy deployment to Kubernetes in various cloud environments."]}),"\n",(0,o.jsxs)(s.p,{children:["COSMOS Enterprise also provides ",(0,o.jsx)(s.a,{href:"https://www.terraform.io/",children:"Terraform"})," scripts to deploy COSMOS infrastructure on various cloud environments."]}),"\n",(0,o.jsx)(s.h2,{id:"frontend",children:"Frontend"}),"\n",(0,o.jsx)(s.h3,{id:"vuejs",children:"Vue.js"}),"\n",(0,o.jsxs)(s.p,{children:["The COSMOS frontend is fully browser native and is implemented in the Vue.js framework. Per ",(0,o.jsx)(s.a,{href:"https://vuejs.org/guide/introduction.html",children:"Vue.js"}),', "Vue is a JavaScript framework for building user interfaces. It builds on top of standard HTML, CSS, and JavaScript and provides a declarative and component-based programming model that helps you efficiently develop user interfaces, be they simple or complex." COSMOS utilizes Vue.js and the ',(0,o.jsx)(s.a,{href:"https://vuetifyjs.com/en/",children:"Vuetify"})," Component Framework UI library to build all the COSMOS tools which run in the browser of your choice. COSMOS 5 utilized Vue.js 2.x and Vuetify 2.x while COSMOS 6 utilizes Vue.js 3.x and Vuetify 3.x."]}),"\n",(0,o.jsx)(s.h3,{id:"single-spa",children:"Single-Spa"}),"\n",(0,o.jsxs)(s.p,{children:["While COSMOS itself is written in Vue.js, we utilize a technology called ",(0,o.jsx)(s.a,{href:"https://single-spa.js.org/",children:"single-spa"})," to allow COSMOS developers to create applications in any javascript framework they choose. Single-spa is a micro frontend framework and acts as a top level router to render the application being requested. COSMOS provides sample applications ready to plug into single-spa in Angular, React, Svelte, and Vue."]}),"\n",(0,o.jsx)(s.h3,{id:"astro-ux",children:"Astro UX"}),"\n",(0,o.jsxs)(s.p,{children:["Per ",(0,o.jsx)(s.a,{href:"https://www.astrouxds.com/",children:"AstroUXDS"}),', "The Astro Space UX Design System enables developers and designers to build rich space app experiences with established interaction patterns and best practices." COSMOS utilizes the Astro design guidelines for color, typograpy, and iconograpy. In some cases, e.g. ',(0,o.jsx)(s.a,{href:"https://www.astrouxds.com/components/clock/",children:"Astro Clock"}),", COSMOS directly incorporates Astro components."]}),"\n",(0,o.jsx)(s.h2,{id:"backend",children:"Backend"}),"\n",(0,o.jsx)(s.h3,{id:"redis",children:"Redis"}),"\n",(0,o.jsxs)(s.p,{children:[(0,o.jsx)(s.a,{href:"https://redis.io/",children:"Redis"})," is an in-memory data store with support for strings, hashes, lists, sets, sorted sets, streams, and more. COSMOS uses Redis to store both our configuration and data. If you look back at our ",(0,o.jsx)(s.a,{href:"/docs/getting-started/key_concepts#containers",children:"container list"})," you'll notice two redis containers: cosmos-openc3-redis-1 and cosmos-openc3-redis-ephemeral-1. The ephemeral container contains all the real-time data pushed into ",(0,o.jsx)(s.a,{href:"https://redis.io/docs/data-types/streams/",children:"Redis streams"}),". The other redis container contains COSMOS configuration that is meant to persist. ",(0,o.jsx)(s.a,{href:"https://openc3.com/enterprise",children:"COSMOS Enterprise"})," provides helm charts that setup ",(0,o.jsx)(s.a,{href:"https://redis.io/docs/management/scaling/",children:"Redis Cluster"})," to perform horizontal scaling where data is shared across multiple Redis nodes."]}),"\n",(0,o.jsx)(s.h3,{id:"minio",children:"MinIO"}),"\n",(0,o.jsxs)(s.p,{children:[(0,o.jsx)(s.a,{href:"https://min.io/",children:"MinIO"})," is a high-performance, S3 compatible object store. COSMOS uses this storage technology to host both the COSMOS tools themselves and the long term log files. ",(0,o.jsx)(s.a,{href:"https://openc3.com/enterprise",children:"COSMOS Enterprise"})," deployed in a cloud environment uses the available cloud native bucket storage technology, e.g. AWS S3, GCP Buckets, and Azure Blob Storage. Using bucket storage allows COSMOS to directly serve the tools as a static website and thus we don't need to deploy Tomcat or Nginx for example."]}),"\n",(0,o.jsx)(s.h3,{id:"ruby-on-rails",children:"Ruby on Rails"}),"\n",(0,o.jsxs)(s.p,{children:["The COSMOS API and Script Runner backends are powered by ",(0,o.jsx)(s.a,{href:"https://rubyonrails.org/",children:"Ruby on Rails"}),". Rails is a web application development framework written in the Ruby programming language. Rails (and our familiarity with Ruby) allows us to write less code while accomplishing more than many other languages and frameworks."]})]})}function h(e={}){let{wrapper:s}={...(0,r.a)(),...e.components};return s?(0,o.jsx)(s,{...e,children:(0,o.jsx)(l,{...e})}):l(e)}},2840:function(e,s,t){t.d(s,{Z:function(){return a},a:function(){return i}});var n=t(2784);let o={},r=n.createContext(o);function i(e){let s=n.useContext(r);return n.useMemo(function(){return"function"==typeof e?e(s):{...s,...e}},[s,e])}function a(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:i(e.components),n.createElement(r.Provider,{value:s},e.children)}}}]);
1
+ "use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([["8713"],{1035:function(e,s,t){t.r(s),t.d(s,{default:()=>h,frontMatter:()=>i,metadata:()=>n,assets:()=>c,toc:()=>d,contentTitle:()=>a});var n=JSON.parse('{"id":"getting-started/key_concepts","title":"Key Concepts","description":"Projects, Containerization, Frontend, Backend","source":"@site/docs/getting-started/key_concepts.md","sourceDirName":"getting-started","slug":"/getting-started/key_concepts","permalink":"/tools/staticdocs/docs/getting-started/key_concepts","draft":false,"unlisted":false,"editUrl":"https://github.com/OpenC3/cosmos/tree/main/docs.openc3.com/docs/getting-started/key_concepts.md","tags":[],"version":"current","sidebarPosition":5,"frontMatter":{"sidebar_position":5,"title":"Key Concepts","description":"Projects, Containerization, Frontend, Backend","sidebar_custom_props":{"myEmoji":"\uD83D\uDCA1"}},"sidebar":"defaultSidebar","previous":{"title":"Upgrading","permalink":"/tools/staticdocs/docs/getting-started/upgrading"},"next":{"title":"Requirements and Design","permalink":"/tools/staticdocs/docs/getting-started/requirements"}}'),o=t("2322"),r=t("2840");let i={sidebar_position:5,title:"Key Concepts",description:"Projects, Containerization, Frontend, Backend",sidebar_custom_props:{myEmoji:"\uD83D\uDCA1"}},a="OpenC3 COSMOS Key Concepts",c={},d=[{value:"Projects",id:"projects",level:2},{value:"Containerization",id:"containerization",level:2},{value:"Images",id:"images",level:3},{value:"Containers",id:"containers",level:3},{value:"Docker Compose",id:"docker-compose",level:3},{value:"Environment File",id:"environment-file",level:3},{value:"Kubernetes",id:"kubernetes",level:3},{value:"Frontend",id:"frontend",level:2},{value:"Vue.js",id:"vuejs",level:3},{value:"Single-Spa",id:"single-spa",level:3},{value:"Astro UX",id:"astro-ux",level:3},{value:"Backend",id:"backend",level:2},{value:"Redis",id:"redis",level:3},{value:"MinIO",id:"minio",level:3},{value:"Ruby on Rails",id:"ruby-on-rails",level:3}];function l(e){let s={a:"a",h1:"h1",h2:"h2",h3:"h3",header:"header",p:"p",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,r.a)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(s.header,{children:(0,o.jsx)(s.h1,{id:"openc3-cosmos-key-concepts",children:"OpenC3 COSMOS Key Concepts"})}),"\n",(0,o.jsx)(s.h2,{id:"projects",children:"Projects"}),"\n",(0,o.jsxs)(s.p,{children:["The main COSMOS ",(0,o.jsx)(s.a,{href:"https://github.com/OpenC3/cosmos",children:"repo"})," contains all the source code used to build and run COSMOS. However, users (not developers) of COSMOS should use the COSMOS ",(0,o.jsx)(s.a,{href:"https://github.com/OpenC3/cosmos-project",children:"project"})," to launch COSMOS. The project consists of the ",(0,o.jsx)(s.a,{href:"https://github.com/OpenC3/cosmos-project/blob/main/openc3.sh",children:"openc3.sh"})," and ",(0,o.jsx)(s.a,{href:"https://github.com/OpenC3/cosmos-project/blob/main/openc3.bat",children:"openc3.bat"})," files for starting and stopping COSMOS, the ",(0,o.jsx)(s.a,{href:"https://github.com/OpenC3/cosmos-project/blob/main/compose.yaml",children:"compose.yaml"})," for configuring the COSMOS containers, and the ",(0,o.jsx)(s.a,{href:"https://github.com/OpenC3/cosmos-project/blob/main/.env",children:".env"})," file for setting runtime variables. Additionally, the COSMOS project contains user modifiable config files for both Redis and Traefik."]}),"\n",(0,o.jsx)(s.h2,{id:"containerization",children:"Containerization"}),"\n",(0,o.jsx)(s.h3,{id:"images",children:"Images"}),"\n",(0,o.jsxs)(s.p,{children:["Per ",(0,o.jsx)(s.a,{href:"https://docs.docker.com/get-started/overview/#images",children:"Docker"}),', "An image is a read-only template with instructions for creating a Docker container." The base operating system COSMOS uses is called ',(0,o.jsx)(s.a,{href:"https://www.alpinelinux.org/",children:"Alpine Linux"}),". It is a simple and compact image with a full package system that allows us to install our dependencies. Starting with Alpine, we create a ",(0,o.jsx)(s.a,{href:"https://docs.docker.com/engine/reference/builder/",children:"Dockerfile"})," to add Ruby and Python and a few other packages to create our own docker image. We further build upon that image to create a NodeJS image to support our frontend and additional images to support our backend."]}),"\n",(0,o.jsx)(s.h3,{id:"containers",children:"Containers"}),"\n",(0,o.jsxs)(s.p,{children:["Per ",(0,o.jsx)(s.a,{href:"https://www.docker.com/resources/what-container/",children:"Docker"}),', "a container is a standard unit of software that packages up code and all its dependencies so the application runs quickly and reliably from one computing environment to another." Also per ',(0,o.jsx)(s.a,{href:"https://docs.docker.com/guides/walkthroughs/what-is-a-container/",children:"Docker"}),', "A container is an isolated environment for your code. This means that a container has no knowledge of your operating system, or your files. It runs on the environment provided to you by Docker Desktop. Containers have everything that your code needs in order to run, down to a base operating system." COSMOS utilizes containers to provide a consistent runtime environment. Containers make it easy to deploy to local on-prem servers, cloud environments, or air-gapped networks.']}),"\n",(0,o.jsx)(s.p,{children:"The COSMOS Open Source containers consist of the following:"}),"\n",(0,o.jsxs)(s.table,{children:[(0,o.jsx)(s.thead,{children:(0,o.jsxs)(s.tr,{children:[(0,o.jsx)(s.th,{children:"Name"}),(0,o.jsx)(s.th,{children:"Description"})]})}),(0,o.jsxs)(s.tbody,{children:[(0,o.jsxs)(s.tr,{children:[(0,o.jsx)(s.td,{children:"cosmos-openc3-cosmos-init-1"}),(0,o.jsx)(s.td,{children:"Copies files to Minio and configures COSMOS then exits"})]}),(0,o.jsxs)(s.tr,{children:[(0,o.jsx)(s.td,{children:"cosmos-openc3-operator-1"}),(0,o.jsx)(s.td,{children:"Main COSMOS container that runs the interfaces and target microservices"})]}),(0,o.jsxs)(s.tr,{children:[(0,o.jsx)(s.td,{children:"cosmos-openc3-cosmos-cmd-tlm-api-1"}),(0,o.jsx)(s.td,{children:"Rails server that provides all the COSMOS API endpoints"})]}),(0,o.jsxs)(s.tr,{children:[(0,o.jsx)(s.td,{children:"cosmos-openc3-cosmos-script-runner-api-1"}),(0,o.jsx)(s.td,{children:"Rails server that provides the Script API endpoints"})]}),(0,o.jsxs)(s.tr,{children:[(0,o.jsx)(s.td,{children:"cosmos-openc3-redis-1"}),(0,o.jsx)(s.td,{children:"Serves the static target configuration"})]}),(0,o.jsxs)(s.tr,{children:[(0,o.jsx)(s.td,{children:"cosmos-openc3-redis-ephemeral-1"}),(0,o.jsxs)(s.td,{children:["Serves the ",(0,o.jsx)(s.a,{href:"https://redis.io/docs/data-types/streams",children:"streams"})," containing the raw and decomutated data"]})]}),(0,o.jsxs)(s.tr,{children:[(0,o.jsx)(s.td,{children:"cosmos-openc3-minio-1"}),(0,o.jsx)(s.td,{children:"Provides a S3 like bucket storage interface and also serves as a static webserver for the tool files"})]}),(0,o.jsxs)(s.tr,{children:[(0,o.jsx)(s.td,{children:"cosmos-openc3-traefik-1"}),(0,o.jsx)(s.td,{children:"Provides a reverse proxy and load balancer with routes to the COSMOS endpoints"})]})]})]}),"\n",(0,o.jsxs)(s.p,{children:["The container list for ",(0,o.jsx)(s.a,{href:"https://openc3.com/enterprise",children:"Enterprise COSMOS"})," consists of the following:"]}),"\n",(0,o.jsxs)(s.table,{children:[(0,o.jsx)(s.thead,{children:(0,o.jsxs)(s.tr,{children:[(0,o.jsx)(s.th,{children:"Name"}),(0,o.jsx)(s.th,{children:"Description"})]})}),(0,o.jsxs)(s.tbody,{children:[(0,o.jsxs)(s.tr,{children:[(0,o.jsx)(s.td,{children:"cosmos-enterprise-openc3-metrics-1"}),(0,o.jsx)(s.td,{children:"Rails server that provides metrics on COSMOS performance"})]}),(0,o.jsxs)(s.tr,{children:[(0,o.jsx)(s.td,{children:"cosmos-enterprise-openc3-keycloak-1"}),(0,o.jsx)(s.td,{children:"Single-Sign On service for authentication"})]}),(0,o.jsxs)(s.tr,{children:[(0,o.jsx)(s.td,{children:"cosmos-enterprise-openc3-postgresql-1"}),(0,o.jsx)(s.td,{children:"SQL Database for use by Keycloak"})]}),(0,o.jsxs)(s.tr,{children:[(0,o.jsx)(s.td,{children:"openc3-nfs *"}),(0,o.jsx)(s.td,{children:"Network File System pod only for use in Kubernetes to share code libraries between containers"})]})]})]}),"\n",(0,o.jsx)(s.h3,{id:"docker-compose",children:"Docker Compose"}),"\n",(0,o.jsxs)(s.p,{children:["Per ",(0,o.jsx)(s.a,{href:"https://docs.docker.com/compose/",children:"Docker"}),', "Compose is a tool for defining and running multi-container Docker applications. With Compose, you use a YAML file to configure your application\'s services. Then, with a single command, you create and start all the services from your configuration." OpenC3 uses compose files to both build and run COSMOS. The ',(0,o.jsx)(s.a,{href:"https://github.com/OpenC3/cosmos-project/blob/main/compose.yaml",children:"compose.yaml"})," is where ports are exposed and environment variables are used."]}),"\n",(0,o.jsx)(s.h3,{id:"environment-file",children:"Environment File"}),"\n",(0,o.jsxs)(s.p,{children:["COSMOS uses an ",(0,o.jsx)(s.a,{href:"https://docs.docker.com/compose/environment-variables/env-file/",children:"environment file"})," along with Docker Compose to pass environment variables into the COSMOS runtime. This ",(0,o.jsx)(s.a,{href:"https://github.com/OpenC3/cosmos-project/blob/main/.env",children:".env"})," file consists of simple key value pairs that contain the version of COSMOS deployed, usernames and passwords, and much more."]}),"\n",(0,o.jsx)(s.h3,{id:"kubernetes",children:"Kubernetes"}),"\n",(0,o.jsxs)(s.p,{children:["Per ",(0,o.jsx)(s.a,{href:"https://kubernetes.io/",children:"Kubernetes.io"}),', "Kubernetes, also known as K8s, is an open-source system for automating deployment, scaling, and management of containerized applications. It groups containers that make up an application into logical units for easy management and discovery." ',(0,o.jsx)(s.a,{href:"https://openc3.com/enterprise",children:"COSMOS Enterprise"})," provides ",(0,o.jsx)(s.a,{href:"https://helm.sh/docs/topics/charts/",children:"Helm charts"})," for easy deployment to Kubernetes in various cloud environments."]}),"\n",(0,o.jsxs)(s.p,{children:["COSMOS Enterprise also provides ",(0,o.jsx)(s.a,{href:"https://www.terraform.io/",children:"Terraform"})," scripts to deploy COSMOS infrastructure on various cloud environments."]}),"\n",(0,o.jsx)(s.h2,{id:"frontend",children:"Frontend"}),"\n",(0,o.jsx)(s.h3,{id:"vuejs",children:"Vue.js"}),"\n",(0,o.jsxs)(s.p,{children:["The COSMOS frontend is fully browser native and is implemented in the Vue.js framework. Per ",(0,o.jsx)(s.a,{href:"https://vuejs.org/guide/introduction.html",children:"Vue.js"}),', "Vue is a JavaScript framework for building user interfaces. It builds on top of standard HTML, CSS, and JavaScript and provides a declarative and component-based programming model that helps you efficiently develop user interfaces, be they simple or complex." COSMOS utilizes Vue.js and the ',(0,o.jsx)(s.a,{href:"https://vuetifyjs.com/en/",children:"Vuetify"})," Component Framework UI library to build all the COSMOS tools which run in the browser of your choice. COSMOS 5 utilized Vue.js 2.x and Vuetify 2.x while COSMOS 6 utilizes Vue.js 3.x and Vuetify 3.x."]}),"\n",(0,o.jsx)(s.h3,{id:"single-spa",children:"Single-Spa"}),"\n",(0,o.jsxs)(s.p,{children:["While COSMOS itself is written in Vue.js, we utilize a technology called ",(0,o.jsx)(s.a,{href:"https://single-spa.js.org/",children:"single-spa"})," to allow COSMOS developers to create applications in any javascript framework they choose. Single-spa is a micro frontend framework and acts as a top level router to render the application being requested. COSMOS provides sample applications ready to plug into single-spa in Angular, React, Svelte, and Vue."]}),"\n",(0,o.jsx)(s.h3,{id:"astro-ux",children:"Astro UX"}),"\n",(0,o.jsxs)(s.p,{children:["Per ",(0,o.jsx)(s.a,{href:"https://www.astrouxds.com/",children:"AstroUXDS"}),', "The Astro Space UX Design System enables developers and designers to build rich space app experiences with established interaction patterns and best practices." COSMOS utilizes the Astro design guidelines for color, typograpy, and iconograpy. In some cases, e.g. ',(0,o.jsx)(s.a,{href:"https://www.astrouxds.com/components/clock/",children:"Astro Clock"}),", COSMOS directly incorporates Astro components."]}),"\n",(0,o.jsx)(s.h2,{id:"backend",children:"Backend"}),"\n",(0,o.jsx)(s.h3,{id:"redis",children:"Redis"}),"\n",(0,o.jsxs)(s.p,{children:[(0,o.jsx)(s.a,{href:"https://redis.io/",children:"Redis"})," is an in-memory data store with support for strings, hashes, lists, sets, sorted sets, streams, and more. COSMOS uses Redis to store both our configuration and data. If you look back at our ",(0,o.jsx)(s.a,{href:"/docs/getting-started/key_concepts#containers",children:"container list"})," you'll notice two redis containers: cosmos-openc3-redis-1 and cosmos-openc3-redis-ephemeral-1. The ephemeral container contains all the real-time data pushed into ",(0,o.jsx)(s.a,{href:"https://redis.io/docs/data-types/streams/",children:"Redis streams"}),". The other redis container contains COSMOS configuration that is meant to persist. ",(0,o.jsx)(s.a,{href:"https://openc3.com/enterprise",children:"COSMOS Enterprise"})," provides helm charts that setup ",(0,o.jsx)(s.a,{href:"https://redis.io/docs/management/scaling/",children:"Redis Cluster"})," to perform horizontal scaling where data is shared across multiple Redis nodes."]}),"\n",(0,o.jsx)(s.h3,{id:"minio",children:"MinIO"}),"\n",(0,o.jsxs)(s.p,{children:[(0,o.jsx)(s.a,{href:"https://min.io/",children:"MinIO"})," is a high-performance, S3 compatible object store. COSMOS uses this storage technology to host both the COSMOS tools themselves and the long term log files. ",(0,o.jsx)(s.a,{href:"https://openc3.com/enterprise",children:"COSMOS Enterprise"})," deployed in a cloud environment uses the available cloud native bucket storage technology, e.g. AWS S3, GCP Buckets, and Azure Blob Storage. Using bucket storage allows COSMOS to directly serve the tools as a static website and thus we don't need to deploy Tomcat or Nginx for example."]}),"\n",(0,o.jsx)(s.h3,{id:"ruby-on-rails",children:"Ruby on Rails"}),"\n",(0,o.jsxs)(s.p,{children:["The COSMOS API and Script Runner backends are powered by ",(0,o.jsx)(s.a,{href:"https://rubyonrails.org/",children:"Ruby on Rails"}),". Rails is a web application development framework written in the Ruby programming language. Rails (and our familiarity with Ruby) allows us to write less code while accomplishing more than many other languages and frameworks."]})]})}function h(e={}){let{wrapper:s}={...(0,r.a)(),...e.components};return s?(0,o.jsx)(s,{...e,children:(0,o.jsx)(l,{...e})}):l(e)}},2840:function(e,s,t){t.d(s,{Z:function(){return a},a:function(){return i}});var n=t(2784);let o={},r=n.createContext(o);function i(e){let s=n.useContext(r);return n.useMemo(function(){return"function"==typeof e?e(s):{...s,...e}},[s,e])}function a(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:i(e.components),n.createElement(r.Provider,{value:s},e.children)}}}]);