openc3-cosmos-tool-docs 6.10.1 → 6.10.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (201) hide show
  1. checksums.yaml +4 -4
  2. data/tools/staticdocs/404.html +2 -2
  3. data/tools/staticdocs/assets/css/{styles.9a220ac7.css → styles.6a21a146.css} +1 -1
  4. data/tools/staticdocs/assets/js/{019369f3.d7bbc5e1.js → 019369f3.622250b4.js} +1 -1
  5. data/tools/staticdocs/assets/js/{058ffc22.e446ff0d.js → 058ffc22.8edfaac4.js} +1 -1
  6. data/tools/staticdocs/assets/js/{0686a885.5b4c4b4d.js → 0686a885.9151d3f9.js} +1 -1
  7. data/tools/staticdocs/assets/js/{078dbab0.656de457.js → 078dbab0.09694602.js} +1 -1
  8. data/tools/staticdocs/assets/js/{0f5d161c.7e54cdcf.js → 0f5d161c.4c365bfd.js} +1 -1
  9. data/tools/staticdocs/assets/js/0ff569c9.7a4faa61.js +1 -0
  10. data/tools/staticdocs/assets/js/{10209fc9.b137dbd6.js → 10209fc9.dc70ea3f.js} +1 -1
  11. data/tools/staticdocs/assets/js/{103cc3be.ee6acb84.js → 103cc3be.c15dbb1d.js} +1 -1
  12. data/tools/staticdocs/assets/js/13196248.c70e8c44.js +1 -0
  13. data/tools/staticdocs/assets/js/{13c1b4e4.4c262e75.js → 13c1b4e4.c29d1c64.js} +1 -1
  14. data/tools/staticdocs/assets/js/1731.371fb57d.js +1 -0
  15. data/tools/staticdocs/assets/js/{1c0a0c05.ddb465d3.js → 1c0a0c05.35a848fc.js} +1 -1
  16. data/tools/staticdocs/assets/js/{2047b354.6cacf929.js → 2047b354.1fd954bf.js} +1 -1
  17. data/tools/staticdocs/assets/js/{22b3ac48.7b94bcf3.js → 22b3ac48.9afe5dd8.js} +1 -1
  18. data/tools/staticdocs/assets/js/26b8abb2.980a3452.js +1 -0
  19. data/tools/staticdocs/assets/js/{2bb7bf90.3bde2607.js → 2bb7bf90.aa9deeb1.js} +1 -1
  20. data/tools/staticdocs/assets/js/{2c15ad40.4b4b971e.js → 2c15ad40.5b907671.js} +1 -1
  21. data/tools/staticdocs/assets/js/3064.05d05a26.js +1 -0
  22. data/tools/staticdocs/assets/js/35398c5c.17c941ac.js +1 -0
  23. data/tools/staticdocs/assets/js/{3dd7ef3b.0221eef2.js → 3dd7ef3b.60465ff4.js} +1 -1
  24. data/tools/staticdocs/assets/js/{40365d27.41de4945.js → 40365d27.a658985c.js} +1 -1
  25. data/tools/staticdocs/assets/js/{411898ad.6f36be2d.js → 411898ad.9843564e.js} +1 -1
  26. data/tools/staticdocs/assets/js/42170351.0865881a.js +1 -0
  27. data/tools/staticdocs/assets/js/{43652efd.e2fc7748.js → 43652efd.6c00e2f7.js} +1 -1
  28. data/tools/staticdocs/assets/js/5191.15b90810.js +1 -0
  29. data/tools/staticdocs/assets/js/{53ca7c5b.eccd9100.js → 53ca7c5b.576d6c45.js} +1 -1
  30. data/tools/staticdocs/assets/js/{54d0d530.cec50ece.js → 54d0d530.2278fc39.js} +1 -1
  31. data/tools/staticdocs/assets/js/{567dad64.50613669.js → 567dad64.89733625.js} +1 -1
  32. data/tools/staticdocs/assets/js/{5738ba7a.cede7d7a.js → 5738ba7a.c1945cad.js} +1 -1
  33. data/tools/staticdocs/assets/js/{59ed27a4.1b2efe08.js → 59ed27a4.53f184ee.js} +1 -1
  34. data/tools/staticdocs/assets/js/{5b233ba7.9faed769.js → 5b233ba7.e3319d37.js} +1 -1
  35. data/tools/staticdocs/assets/js/{5bc719f6.789ebf64.js → 5bc719f6.2fc3c8f6.js} +1 -1
  36. data/tools/staticdocs/assets/js/{5c6ce5ec.16226a4e.js → 5c6ce5ec.87929366.js} +1 -1
  37. data/tools/staticdocs/assets/js/5e3ed378.dcffdeae.js +1 -0
  38. data/tools/staticdocs/assets/js/{5fe211ef.bfe87c27.js → 5fe211ef.e2df613c.js} +1 -1
  39. data/tools/staticdocs/assets/js/6317.78aef81b.js +4 -0
  40. data/tools/staticdocs/assets/js/6321.2b2e50c9.js +101 -0
  41. data/tools/staticdocs/assets/js/6831b732.5cffcb1b.js +1 -0
  42. data/tools/staticdocs/assets/js/{696b4199.7520348a.js → 696b4199.e21ac90d.js} +1 -1
  43. data/tools/staticdocs/assets/js/{6b210247.fc77f080.js → 6b210247.6948ce0a.js} +1 -1
  44. data/tools/staticdocs/assets/js/{6b65133b.f2b11b07.js → 6b65133b.9a650bf4.js} +1 -1
  45. data/tools/staticdocs/assets/js/{6f92e431.26f4227b.js → 6f92e431.42d18623.js} +1 -1
  46. data/tools/staticdocs/assets/js/{72c6d8a8.0b8c5d2f.js → 72c6d8a8.f72ab546.js} +1 -1
  47. data/tools/staticdocs/assets/js/{75e64983.8112c73c.js → 75e64983.e1b9bc7d.js} +1 -1
  48. data/tools/staticdocs/assets/js/8330.134a0142.js +1 -0
  49. data/tools/staticdocs/assets/js/{867640d5.6bc9ed72.js → 867640d5.a8e8538f.js} +1 -1
  50. data/tools/staticdocs/assets/js/{89e76475.6411e788.js → 89e76475.32c89b40.js} +1 -1
  51. data/tools/staticdocs/assets/js/{8b939c74.5e039b7a.js → 8b939c74.99379b35.js} +1 -1
  52. data/tools/staticdocs/assets/js/{8f7843ee.fb130406.js → 8f7843ee.e62c6e1f.js} +1 -1
  53. data/tools/staticdocs/assets/js/{9424f0b3.90296433.js → 9424f0b3.bf3ec778.js} +1 -1
  54. data/tools/staticdocs/assets/js/{964eb012.94a1dac1.js → 964eb012.4e5410df.js} +1 -1
  55. data/tools/staticdocs/assets/js/{97535711.3e76daa6.js → 97535711.b76a8c8c.js} +1 -1
  56. data/tools/staticdocs/assets/js/{99581c43.48391a19.js → 99581c43.c34f316a.js} +1 -1
  57. data/tools/staticdocs/assets/js/{9d6e81d0.c9e12517.js → 9d6e81d0.09ec34de.js} +1 -1
  58. data/tools/staticdocs/assets/js/{9fb6059a.2473a196.js → 9fb6059a.88b86038.js} +1 -1
  59. data/tools/staticdocs/assets/js/{a677c089.4e7df83d.js → a677c089.08bdd6d4.js} +1 -1
  60. data/tools/staticdocs/assets/js/{a9987364.5ca31d27.js → a9987364.f143fcf5.js} +1 -1
  61. data/tools/staticdocs/assets/js/a9b2dc27.307c7457.js +1 -0
  62. data/tools/staticdocs/assets/js/aa6b6c1b.daef5095.js +1 -0
  63. data/tools/staticdocs/assets/js/b062d239.09ce80e1.js +1 -0
  64. data/tools/staticdocs/assets/js/{b38a6d74.b0b07b64.js → b38a6d74.00258c8b.js} +1 -1
  65. data/tools/staticdocs/assets/js/{b4596165.8792340f.js → b4596165.fa18ea16.js} +1 -1
  66. data/tools/staticdocs/assets/js/b6d70f94.22bbfe27.js +1 -0
  67. data/tools/staticdocs/assets/js/{b9f60ba6.f2b60175.js → b9f60ba6.f6e2591d.js} +1 -1
  68. data/tools/staticdocs/assets/js/{bd0034eb.f33ae892.js → bd0034eb.b3071da1.js} +1 -1
  69. data/tools/staticdocs/assets/js/{c24eae19.4d25de93.js → c24eae19.4d680f8b.js} +1 -1
  70. data/tools/staticdocs/assets/js/{c956ad1e.38882e03.js → c956ad1e.fa55a414.js} +1 -1
  71. data/tools/staticdocs/assets/js/{cb8c3f08.7ca03d18.js → cb8c3f08.9d7767a0.js} +1 -1
  72. data/tools/staticdocs/assets/js/{cd879be4.f77d4fff.js → cd879be4.207fcb79.js} +1 -1
  73. data/tools/staticdocs/assets/js/cf1c01b8.85934be0.js +1 -0
  74. data/tools/staticdocs/assets/js/{d1b923aa.a5b3429d.js → d1b923aa.b31315e3.js} +1 -1
  75. data/tools/staticdocs/assets/js/d1bfc316.16fb4147.js +1 -0
  76. data/tools/staticdocs/assets/js/{d24bf9b6.f380debf.js → d24bf9b6.c8d15feb.js} +1 -1
  77. data/tools/staticdocs/assets/js/{d57a4b5d.7ce9d24e.js → d57a4b5d.90256479.js} +1 -1
  78. data/tools/staticdocs/assets/js/{d59d8a14.41f22286.js → d59d8a14.2ecf6a7b.js} +1 -1
  79. data/tools/staticdocs/assets/js/d5d77c37.1de06b83.js +1 -0
  80. data/tools/staticdocs/assets/js/{d66bf9c0.c87e9dc0.js → d66bf9c0.be6ef286.js} +1 -1
  81. data/tools/staticdocs/assets/js/{d8ca4191.b24de36d.js → d8ca4191.4cf3e03b.js} +1 -1
  82. data/tools/staticdocs/assets/js/d9b92eba.13b9d3a8.js +1 -0
  83. data/tools/staticdocs/assets/js/db8fa1d0.0714f6fa.js +1 -0
  84. data/tools/staticdocs/assets/js/{dbe31111.4f18bf2b.js → dbe31111.ae534424.js} +1 -1
  85. data/tools/staticdocs/assets/js/{dc5f7beb.d439e98e.js → dc5f7beb.28bc7f0f.js} +1 -1
  86. data/tools/staticdocs/assets/js/{e501b0d1.e7e284e5.js → e501b0d1.9b902145.js} +1 -1
  87. data/tools/staticdocs/assets/js/{f15615f1.7dcf0c73.js → f15615f1.7835e26e.js} +1 -1
  88. data/tools/staticdocs/assets/js/{f75a5f33.a7c7ff1d.js → f75a5f33.8fcf0643.js} +1 -1
  89. data/tools/staticdocs/assets/js/fd886806.efd66dbe.js +1 -0
  90. data/tools/staticdocs/assets/js/{main.81fa15db.js → main.355b79aa.js} +6 -6
  91. data/tools/staticdocs/assets/js/{runtime~main.e35f5fea.js → runtime~main.4a381777.js} +1 -1
  92. data/tools/staticdocs/docs/configuration/accessors.html +46 -46
  93. data/tools/staticdocs/docs/configuration/command.html +87 -87
  94. data/tools/staticdocs/docs/configuration/conversions.html +47 -47
  95. data/tools/staticdocs/docs/configuration/format.html +21 -21
  96. data/tools/staticdocs/docs/configuration/interfaces.html +55 -55
  97. data/tools/staticdocs/docs/configuration/limits-response.html +10 -10
  98. data/tools/staticdocs/docs/configuration/plugins.html +129 -124
  99. data/tools/staticdocs/docs/configuration/processors.html +15 -15
  100. data/tools/staticdocs/docs/configuration/protocols.html +66 -66
  101. data/tools/staticdocs/docs/configuration/ssl-tls.html +15 -15
  102. data/tools/staticdocs/docs/configuration/table.html +44 -44
  103. data/tools/staticdocs/docs/configuration/target.html +21 -21
  104. data/tools/staticdocs/docs/configuration/telemetry-screens.html +253 -253
  105. data/tools/staticdocs/docs/configuration/telemetry.html +83 -83
  106. data/tools/staticdocs/docs/configuration.html +2 -2
  107. data/tools/staticdocs/docs/development/curl.html +14 -14
  108. data/tools/staticdocs/docs/development/developing.html +16 -16
  109. data/tools/staticdocs/docs/development/json-api.html +15 -15
  110. data/tools/staticdocs/docs/development/log-structure.html +11 -11
  111. data/tools/staticdocs/docs/development/roadmap.html +4 -4
  112. data/tools/staticdocs/docs/development/streaming-api.html +24 -24
  113. data/tools/staticdocs/docs/development/testing.html +17 -17
  114. data/tools/staticdocs/docs/development.html +2 -2
  115. data/tools/staticdocs/docs/getting-started/cli.html +42 -42
  116. data/tools/staticdocs/docs/getting-started/generators.html +24 -24
  117. data/tools/staticdocs/docs/getting-started/gettingstarted.html +19 -19
  118. data/tools/staticdocs/docs/getting-started/installation.html +49 -19
  119. data/tools/staticdocs/docs/getting-started/key-concepts.html +20 -20
  120. data/tools/staticdocs/docs/getting-started/podman.html +23 -23
  121. data/tools/staticdocs/docs/getting-started/requirements.html +19 -19
  122. data/tools/staticdocs/docs/getting-started/upgrading.html +44 -44
  123. data/tools/staticdocs/docs/getting-started/util.html +25 -25
  124. data/tools/staticdocs/docs/getting-started.html +2 -2
  125. data/tools/staticdocs/docs/guides/bridges.html +14 -14
  126. data/tools/staticdocs/docs/guides/cfs.html +32 -32
  127. data/tools/staticdocs/docs/guides/custom-widgets.html +33 -33
  128. data/tools/staticdocs/docs/guides/dynamic-packets.html +7 -6
  129. data/tools/staticdocs/docs/guides/exposing-microservices.html +11 -11
  130. data/tools/staticdocs/docs/guides/little-endian-bitfields.html +4 -4
  131. data/tools/staticdocs/docs/guides/local-mode.html +13 -13
  132. data/tools/staticdocs/docs/guides/logging.html +9 -9
  133. data/tools/staticdocs/docs/guides/monitoring.html +18 -18
  134. data/tools/staticdocs/docs/guides/performance.html +10 -10
  135. data/tools/staticdocs/docs/guides/raspberrypi.html +4 -4
  136. data/tools/staticdocs/docs/guides/reference-architectures.html +6 -6
  137. data/tools/staticdocs/docs/guides/roles-permissions.html +29 -29
  138. data/tools/staticdocs/docs/guides/script-writing.html +75 -68
  139. data/tools/staticdocs/docs/guides/scripting-api.html +672 -667
  140. data/tools/staticdocs/docs/guides/troubleshooting.html +7 -7
  141. data/tools/staticdocs/docs/guides.html +2 -2
  142. data/tools/staticdocs/docs/meta/contributing.html +12 -12
  143. data/tools/staticdocs/docs/meta/licenses.html +9 -9
  144. data/tools/staticdocs/docs/meta/philosophy.html +3 -3
  145. data/tools/staticdocs/docs/meta/vulnerabilities.html +5 -5
  146. data/tools/staticdocs/docs/meta/xtce.html +12 -12
  147. data/tools/staticdocs/docs/meta.html +2 -2
  148. data/tools/staticdocs/docs/privacy.html +17 -17
  149. data/tools/staticdocs/docs/tools/admin.html +28 -28
  150. data/tools/staticdocs/docs/tools/autonomic.html +19 -19
  151. data/tools/staticdocs/docs/tools/bucket-explorer.html +11 -11
  152. data/tools/staticdocs/docs/tools/calendar.html +24 -24
  153. data/tools/staticdocs/docs/tools/cmd-sender.html +13 -13
  154. data/tools/staticdocs/docs/tools/cmd-tlm-server.html +24 -24
  155. data/tools/staticdocs/docs/tools/command-history.html +6 -6
  156. data/tools/staticdocs/docs/tools/command-queue.html +8 -8
  157. data/tools/staticdocs/docs/tools/data-extractor.html +23 -23
  158. data/tools/staticdocs/docs/tools/data-viewer.html +10 -10
  159. data/tools/staticdocs/docs/tools/handbooks.html +4 -4
  160. data/tools/staticdocs/docs/tools/limits-monitor.html +15 -15
  161. data/tools/staticdocs/docs/tools/log-explorer.html +9 -9
  162. data/tools/staticdocs/docs/tools/packet-viewer.html +10 -10
  163. data/tools/staticdocs/docs/tools/script-runner.html +36 -36
  164. data/tools/staticdocs/docs/tools/systemhealth.html +21 -21
  165. data/tools/staticdocs/docs/tools/table-manager.html +10 -10
  166. data/tools/staticdocs/docs/tools/tlm-grapher.html +20 -20
  167. data/tools/staticdocs/docs/tools/tlm-viewer.html +15 -15
  168. data/tools/staticdocs/docs/tools.html +2 -2
  169. data/tools/staticdocs/docs.html +11 -11
  170. data/tools/staticdocs/index.html +2 -2
  171. data/tools/staticdocs/lunr-index-1765917283926.json +1 -0
  172. data/tools/staticdocs/lunr-index.json +1 -1
  173. data/tools/staticdocs/markdown-page.html +3 -3
  174. data/tools/staticdocs/search-doc-1765917283926.json +1 -0
  175. data/tools/staticdocs/search-doc.json +1 -1
  176. metadata +92 -92
  177. data/tools/staticdocs/assets/js/0ff569c9.9566d390.js +0 -1
  178. data/tools/staticdocs/assets/js/1202.d22d6899.js +0 -101
  179. data/tools/staticdocs/assets/js/13196248.8bbc13cd.js +0 -1
  180. data/tools/staticdocs/assets/js/1596.e0bc0cb8.js +0 -1
  181. data/tools/staticdocs/assets/js/26b8abb2.237c47e9.js +0 -1
  182. data/tools/staticdocs/assets/js/3140.8b312c79.js +0 -1
  183. data/tools/staticdocs/assets/js/35398c5c.0f3180d9.js +0 -1
  184. data/tools/staticdocs/assets/js/42170351.3618f599.js +0 -1
  185. data/tools/staticdocs/assets/js/4581.bbe04eae.js +0 -4
  186. data/tools/staticdocs/assets/js/5e3ed378.9ad2dcd2.js +0 -1
  187. data/tools/staticdocs/assets/js/6831b732.1790429a.js +0 -1
  188. data/tools/staticdocs/assets/js/7399.857e78fe.js +0 -1
  189. data/tools/staticdocs/assets/js/9601.e8389133.js +0 -1
  190. data/tools/staticdocs/assets/js/a9b2dc27.1f8d5c81.js +0 -1
  191. data/tools/staticdocs/assets/js/aa6b6c1b.750dc927.js +0 -1
  192. data/tools/staticdocs/assets/js/b062d239.cd8e5784.js +0 -1
  193. data/tools/staticdocs/assets/js/b6d70f94.43a5cd5a.js +0 -1
  194. data/tools/staticdocs/assets/js/cf1c01b8.f5a9a237.js +0 -1
  195. data/tools/staticdocs/assets/js/d1bfc316.7c605bc5.js +0 -1
  196. data/tools/staticdocs/assets/js/d5d77c37.ae6fba94.js +0 -1
  197. data/tools/staticdocs/assets/js/d9b92eba.b08eeda4.js +0 -1
  198. data/tools/staticdocs/assets/js/db8fa1d0.a05e2bae.js +0 -1
  199. data/tools/staticdocs/assets/js/fd886806.4b383c00.js +0 -1
  200. data/tools/staticdocs/lunr-index-1765340262146.json +0 -1
  201. data/tools/staticdocs/search-doc-1765340262146.json +0 -1
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([["8920"],{729:function(e,i,r){r.r(i),r.d(i,{metadata:()=>n,default:()=>h,frontMatter:()=>s,contentTitle:()=>c,toc:()=>l,assets:()=>a});var n=JSON.parse('{"id":"guides/exposing-microservices","title":"Exposing Microservices","description":"Provide external accessibility to microservices","source":"@site/docs/guides/exposing-microservices.md","sourceDirName":"guides","slug":"/guides/exposing-microservices","permalink":"/tools/staticdocs/docs/guides/exposing-microservices","draft":false,"unlisted":false,"editUrl":"https://github.com/OpenC3/cosmos/tree/main/docs.openc3.com/docs/guides/exposing-microservices.md","tags":[],"version":"current","frontMatter":{"title":"Exposing Microservices","description":"Provide external accessibility to microservices","sidebar_custom_props":{"myEmoji":"\u{1F6AA}"}},"sidebar":"defaultSidebar","previous":{"title":"Dynamic Packets","permalink":"/tools/staticdocs/docs/guides/dynamic-packets"},"next":{"title":"Little Endian Bitfields","permalink":"/tools/staticdocs/docs/guides/little-endian-bitfields"}}'),t=r(7259),o=r(9796);let s={title:"Exposing Microservices",description:"Provide external accessibility to microservices",sidebar_custom_props:{myEmoji:"\u{1F6AA}"}},c,a={},l=[{value:"Expose microservices using the PORT and ROUTE_PREFIX keywords",id:"expose-microservices-using-the-port-and-route_prefix-keywords",level:2},{value:"Connecting to microservices from a different INTERFACE in plugin.txt",id:"connecting-to-microservices-from-a-different-interface-in-plugintxt",level:2}];function d(e){let i={a:"a",admonition:"admonition",code:"code",h2:"h2",li:"li",p:"p",pre:"pre",ul:"ul",...(0,o.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(i.p,{children:"COSMOS provides a simple method to add new APIs and make custom microservices and interfaces accessible to the network."}),"\n",(0,t.jsx)(i.admonition,{title:"Make sure anything you expose is secure",type:"warning",children:(0,t.jsx)(i.p,{children:"Make sure that any new apis you expose check for user credentials and authorize actions appropriately."})}),"\n",(0,t.jsx)(i.h2,{id:"expose-microservices-using-the-port-and-route_prefix-keywords",children:"Expose microservices using the PORT and ROUTE_PREFIX keywords"}),"\n",(0,t.jsxs)(i.p,{children:["In your plugin.txt file, both ",(0,t.jsx)(i.a,{href:"../configuration/plugins#interface-1",children:"INTERFACE"})," and ",(0,t.jsx)(i.a,{href:"../configuration/plugins#microservice-1",children:"MICROSERVICE"})," support the keywords ",(0,t.jsx)(i.a,{href:"../configuration/plugins#port-1",children:"PORT"})," and ",(0,t.jsx)(i.a,{href:"../configuration/plugins#route_prefix-1",children:"ROUTE_PREFIX"}),"."]}),"\n",(0,t.jsxs)(i.p,{children:[(0,t.jsx)(i.a,{href:"../configuration/plugins#port-1",children:"PORT"})," is used to declare the port(s) that your microservice is listening for connections on. This is used in combination with ",(0,t.jsx)(i.a,{href:"../configuration/plugins#route_prefix-1",children:"ROUTE_PREFIX"})," to create a dynamic traefik route to your microservice."]}),"\n",(0,t.jsx)(i.p,{children:"The following code is used internally to let traefik know where to connect to your microservice internally:"}),"\n",(0,t.jsx)(i.pre,{children:(0,t.jsx)(i.code,{className:"language-ruby",children:"if ENV['OPENC3_OPERATOR_HOSTNAME']\n url = \"http://#{ENV['OPENC3_OPERATOR_HOSTNAME']}:#{port}\"\nelse\n if ENV['KUBERNETES_SERVICE_HOST']\n url = \"http://#{microservice_name.downcase.gsub('__', '-').gsub('_', '-')}-service:#{port}\"\n else\n url = \"http://openc3-operator:#{port}\"\n end\nend\n"})}),"\n",(0,t.jsx)(i.p,{children:"Note that this is the internal route to your microservice. Determining this route checks two different environment variables."}),"\n",(0,t.jsx)(i.p,{children:'OPENC3_OPERATOR_HOSTNAME is used to override the default service name for our regular docker compose operator of "openc3-operator". Usually this is not set.'}),"\n",(0,t.jsx)(i.p,{children:"In OpenC3 Enterprise, KUBERNETES_SERVICE_HOST is used to detect if we are running in a Kubernetes environment (it will be set by Kubernetes), in which case the service is expected to have a Kubernetes service named scope-user-microservicename-service. For example, if you are using the DEFAULT scope and have a microservice named MYMICROSERVICE the service would be found at the hostname: default-user-mymicroservice-service. Double underscores or single underscores are replaced by a dash and the name is all lower case."}),"\n",(0,t.jsxs)(i.p,{children:[(0,t.jsx)(i.a,{href:"../configuration/plugins#route_prefix-1",children:"ROUTE_PREFIX"})," is used to define the external route. The external route will take the form of http(s)://YOURCOSMOSDOMAIN",":PORT","/ROUTE_PREFIX. So for example, if you set the ",(0,t.jsx)(i.a,{href:"../configuration/plugins#route_prefix-1",children:"ROUTE_PREFIX"})," to /mymicroservice then on a default local installation, it could be reached at ",(0,t.jsx)(i.code,{children:"http://localhost:2900/mymicroservice"}),". The ",(0,t.jsx)(i.code,{children:"http://localhost:2900"})," part should be substituted by whatever domain you are accessing COSMOS at."]}),"\n",(0,t.jsxs)(i.p,{children:["Here is a snippet of code showing ",(0,t.jsx)(i.a,{href:"../configuration/plugins#port-1",children:"PORT"})," and ",(0,t.jsx)(i.a,{href:"../configuration/plugins#route_prefix-1",children:"ROUTE_PREFIX"})," in use within a plugin.txt file:"]}),"\n",(0,t.jsx)(i.pre,{children:(0,t.jsx)(i.code,{className:"language-bash",children:"VARIABLE cfdp_microservice_name CFDP\nVARIABLE cfdp_route_prefix /cfdp\nVARIABLE cfdp_port 2906\n\nMICROSERVICE CFDP <%= cfdp_microservice_name %>\n WORK_DIR .\n ROUTE_PREFIX <%= cfdp_route_prefix %>\n PORT <%= cfdp_port %>\n"})}),"\n",(0,t.jsx)(i.p,{children:"Leaving the variables at their default values the following will occur:"}),"\n",(0,t.jsxs)(i.ul,{children:["\n",(0,t.jsxs)(i.li,{children:["The microservice will be exposed internally to Docker (Core or Enterprise) at: ",(0,t.jsx)(i.code,{children:"http://openc3-operator:2906"})]}),"\n",(0,t.jsxs)(i.li,{children:["The microservice will be exposed internally to Kubernetes (Enterprise) at: ",(0,t.jsx)(i.code,{children:"http://default-user-cfdp-service:2906"})]}),"\n",(0,t.jsxs)(i.li,{children:["The microservice will be exposed externally to the network at: ",(0,t.jsx)(i.code,{children:"http://localhost:2900/cfdp"})]}),"\n"]}),"\n",(0,t.jsxs)(i.p,{children:["The same can be done for ",(0,t.jsx)(i.a,{href:"../configuration/plugins#interface-1",children:"INTERFACE"})," but note that the Kubernetes service name will use the microservice name of the interface which takes the form of ",(0,t.jsx)(i.code,{children:"SCOPE__INTERFACE__INTERFACENAME"}),"."]}),"\n",(0,t.jsxs)(i.p,{children:["Here is an example using ",(0,t.jsx)(i.a,{href:"../configuration/plugins#port",children:"PORT"})," and ",(0,t.jsx)(i.a,{href:"../configuration/plugins#route_prefix",children:"ROUTE_PREFIX"})," with ",(0,t.jsx)(i.a,{href:"../configuration/plugins#interface-1",children:"INTERFACE"}),":"]}),"\n",(0,t.jsx)(i.pre,{children:(0,t.jsx)(i.code,{className:"language-bash",children:"VARIABLE my_interface_name MY_INT\nVARIABLE my_route_prefix /myint\nVARIABLE my_port 2888\n\nINTERFACE <%= my_interface_name %> http_server_interface.rb <%= my_port %>\n ROUTE_PREFIX <%= my_route_prefix %>\n PORT <%= my_port %>\n"})}),"\n",(0,t.jsxs)(i.ul,{children:["\n",(0,t.jsxs)(i.li,{children:["The interface will be exposed internally to Docker (Core or Enterprise) at: ",(0,t.jsx)(i.code,{children:"http://openc3-operator:2888"})]}),"\n",(0,t.jsxs)(i.li,{children:["The interface will be exposed internally to Kubernetes (Enterprise) at: ",(0,t.jsx)(i.code,{children:"http://default-interface-my-int-service:2888"})]}),"\n",(0,t.jsxs)(i.li,{children:["The interface will be exposed externally to the network at: ",(0,t.jsx)(i.code,{children:"http://localhost:2900/myint"})]}),"\n"]}),"\n",(0,t.jsx)(i.admonition,{title:"Sharded Operator on Kubernetes (Enterprise)",type:"warning",children:(0,t.jsx)(i.p,{children:"The sharded operator is expected to be used on Kubernetes whenever the Kubernetes Operator is not used. Typically this will be because the user does not have permission to use the Kubernetes API directly to spawn containers which is required for use of the Kubernetes Operator. In this case, Kubernetes services will NOT be automatically created, and will have to be manually created by a user with permissions in Kubernetes, or through some other authorized method (like a custom framework dashboard or config file)."})}),"\n",(0,t.jsx)(i.h2,{id:"connecting-to-microservices-from-a-different-interface-in-plugintxt",children:"Connecting to microservices from a different INTERFACE in plugin.txt"}),"\n",(0,t.jsx)(i.p,{children:"Sometimes you might want to have an INTERFACE connect to a microservice you are running. For this case, only the PORT keyword is required on the INTERFACE or MICROSERVICE because we are only connecting internally and ROUTE_PREFIX isn't used."}),"\n",(0,t.jsx)(i.p,{children:"The following code taken from our demo plugin provides an example of how to calculate the correct hostname across both Core and Enterprise versions of COSMOS in a plugin.txt file:"}),"\n",(0,t.jsx)(i.pre,{children:(0,t.jsx)(i.code,{children:" <% example_host = ENV['KUBERNETES_SERVICE_HOST'] ? \"#{scope}-user-#{example_microservice_name.downcase.gsub('__', '-').gsub('_', '-')}-service\" : \"openc3-operator\" %>\n INTERFACE <%= example_int_name %> example_interface.rb <%= example_host %> <%= example_port %>\n MAP_TARGET <%= example_target_name %>\n"})}),"\n",(0,t.jsx)(i.p,{children:"Note that the above code does not handle the OPENC3_OPERATOR_HOSTNAME environment variable which might change the default name of openc3-operator. Update as needed."})]})}function h(e={}){let{wrapper:i}={...(0,o.R)(),...e.components};return i?(0,t.jsx)(i,{...e,children:(0,t.jsx)(d,{...e})}):d(e)}},9796:function(e,i,r){r.d(i,{R:()=>s,x:()=>c});var n=r(6363);let t={},o=n.createContext(t);function s(e){let i=n.useContext(o);return n.useMemo(function(){return"function"==typeof e?e(i):{...i,...e}},[i,e])}function c(e){let i;return i=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:s(e.components),n.createElement(o.Provider,{value:i},e.children)}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([["2030"],{3202:function(e,t,n){n.r(t),n.d(t,{metadata:()=>r,default:()=>h,frontMatter:()=>i,contentTitle:()=>a,toc:()=>l,assets:()=>c});var r=JSON.parse('{"id":"configuration/protocols","title":"Protocols","description":"Built-in COSMOS protocols including how to create one","source":"@site/docs/configuration/protocols.md","sourceDirName":"configuration","slug":"/configuration/protocols","permalink":"/tools/staticdocs/docs/configuration/protocols","draft":false,"unlisted":false,"editUrl":"https://github.com/OpenC3/cosmos/tree/main/docs.openc3.com/docs/configuration/protocols.md","tags":[],"version":"current","sidebarPosition":7,"frontMatter":{"sidebar_position":7,"title":"Protocols","description":"Built-in COSMOS protocols including how to create one","sidebar_custom_props":{"myEmoji":"\u{1F4A1}"}},"sidebar":"defaultSidebar","previous":{"title":"Interfaces","permalink":"/tools/staticdocs/docs/configuration/interfaces"},"next":{"title":"Accessors","permalink":"/tools/staticdocs/docs/configuration/accessors"}}'),s=n(7259),o=n(9796);let i={sidebar_position:7,title:"Protocols",description:"Built-in COSMOS protocols including how to create one",sidebar_custom_props:{myEmoji:"\u{1F4A1}"}},a,c={},l=[{value:"Packet Delineation Protocols",id:"packet-delineation-protocols",level:2},{value:"COBS Protocol",id:"cobs-protocol",level:3},{value:"SLIP Protocol",id:"slip-protocol",level:3},{value:"Burst Protocol",id:"burst-protocol",level:3},{value:"Fixed Protocol",id:"fixed-protocol",level:3},{value:"Length Protocol",id:"length-protocol",level:3},{value:"Terminated Protocol",id:"terminated-protocol",level:3},{value:"GEMS Protocol (Enterprise)",id:"gems-protocol-enterprise",level:3},{value:"CCSDS CLTU Protocol (Enterprise)",id:"ccsds-cltu-protocol-enterprise",level:3},{value:"CCSDS TCTF Protocol (Enterprise)",id:"ccsds-tctf-protocol-enterprise",level:3},{value:"CCSDS TMTF Protocol (Enterprise)",id:"ccsds-tmtf-protocol-enterprise",level:3},{value:"Template Protocol (Deprecated)",id:"template-protocol-deprecated",level:3},{value:"Preidentified Protocol",id:"preidentified-protocol",level:3},{value:"Helper Protocols",id:"helper-protocols",level:2},{value:"Command Response Protocol",id:"command-response-protocol",level:3},{value:"Packet Definitions",id:"packet-definitions",level:4},{value:"CRC Protocol",id:"crc-protocol",level:3},{value:"Ignore Packet Protocol",id:"ignore-packet-protocol",level:3},{value:"Custom Protocols",id:"custom-protocols",level:2},{value:"Method discussions",id:"method-discussions",level:2},{value:"initialize or <strong>init</strong>",id:"initialize-or-init",level:3},{value:"reset",id:"reset",level:3},{value:"connect_reset",id:"connect_reset",level:3},{value:"disconnect_reset",id:"disconnect_reset",level:3},{value:"read_data",id:"read_data",level:3},{value:"read_packet",id:"read_packet",level:3},{value:"write_packet",id:"write_packet",level:3},{value:"write_data",id:"write_data",level:3},{value:"post_write_interface",id:"post_write_interface",level:3},{value:"protocol_cmd",id:"protocol_cmd",level:3},{value:"Examples",id:"examples",level:2}];function d(e){let t={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",h4:"h4",img:"img",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,o.R)(),...e.components},{TabItem:r,Tabs:i}=t;return r||p("TabItem",!0),i||p("Tabs",!0),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(t.p,{children:["Protocols process data on behalf of an ",(0,s.jsx)(t.a,{href:"interfaces",children:"Interface"}),". They can modify the data being written, data being read, or both. Protocols can also mark a packet as stored instead of real-time which means COSMOS will not update the current value table with the packet data. Protocols can be layered and will be processed in order. For example, if you have a low-level encryption layer that must be first removed before processing a higher level buffer length protocol."]}),"\n",(0,s.jsx)(t.admonition,{title:"Protocol Run Order",type:"info",children:(0,s.jsx)(t.p,{children:"Read protocols execute in the order specified (First specified runs first). Write protocols execute in the reverse order (Last specified executes first)."})}),"\n",(0,s.jsx)(t.p,{children:"Protocols are typically used to define the logic to delineate packets and manipulate data as it written to and read from Interfaces. COSMOS includes Interfaces for TCP/IP Client, TCP/IP Server, Udp Client / Server, and Serial connections. For 99% of use cases these Interfaces should not require any changes as they universally handle the low-level details of reading and writing from these types of connections. All unique behavior should now be defined in Protocols."}),"\n",(0,s.jsx)(t.p,{children:"At a minimum, any byte stream based Interface will require a Protocol to delineate packets. TCP/IP and Serial are examples of byte stream based Interfaces. A byte stream is just a simple stream of bytes and thus you need some way to know where packets begin and end within the stream."}),"\n",(0,s.jsx)(t.p,{children:"TCP/IP is a friendly byte stream. Unless you are dealing with a very poorly written system, the first byte received on a TCP/IP connection will always be the start of a packet. Also, TCP/IP is a reliable connection in that it ensures that all data is received in the correct order, that no data is lost, and that the data is not corrupted (TCP/IP is protected by a CRC32 which is pretty good for avoiding unrecognized data corruption)."}),"\n",(0,s.jsx)(t.p,{children:"Serial is a much less friendly byte stream. With serial connections, it is very likely that when you open a serial port and start receiving data you will receive the middle of a message. (This problem is only avoided when interfacing with a system that only writes to the serial port in response to a command). For this reason, sync patterns are highly beneficial for serial interfaces. Additionally, serial interfaces may use some method to protect against unrecognized data corruption (Checksums, CRCs, etc.)"}),"\n",(0,s.jsx)(t.p,{children:"UDP is an inherently packet based connection. If you read from a UDP socket, you will always receive back an entire packet. The best UDP based Protocols take advantage of this fact. Some implementations try to make UDP act like a byte stream, but this is a misuse of the protocol because it is highly likely that you will lose data and have no way to recover."}),"\n",(0,s.jsxs)(t.p,{children:["For more information about how Protocols fit with Interfaces and Accessors see ",(0,s.jsx)(t.a,{href:"https://www.openc3.com/news/interoperability-without-standards",children:"Interoperability Without Standards"}),"."]}),"\n",(0,s.jsx)(t.h2,{id:"packet-delineation-protocols",children:"Packet Delineation Protocols"}),"\n",(0,s.jsx)(t.p,{children:"COSMOS provides the following packet delineation protocols: COBS, SLIP, Burst, Fixed, Length, Template (deprecated), Terminated and Preidentified. Each of these protocols has the primary purpose of separating out packets from a byte stream."}),"\n",(0,s.jsx)(t.p,{children:"COSMOS Enterprise provides the following packet delineation protocols: CCSDS CLTU (with BCH Encoding), CCSDS TCTF (with Randomizer), CCSDS TMTF (with Randomizer), and GEMS."}),"\n",(0,s.jsxs)(t.p,{children:['Note that all protocols take a final parameter called "Allow Empty Data". This indicates whether the protocol will allow an empty string to be passed down to later Protocols (instead of returning ',":STOP","). Can be true, false, or nil, where nil is interpreted as true unless the Protocol is the last Protocol of the chain. End users of a protocol will almost always simply leave off this parameter. For more information read the ",(0,s.jsx)(t.a,{href:"/tools/staticdocs/docs/configuration/protocols#custom-protocols",children:"Custom Protocols"})," documentation."]}),"\n",(0,s.jsx)(t.p,{children:"Note the first parameter after the PROTOCOL keyword is how to apply the protocol: READ, WRITE, or READ_WRITE. Read applies the protocol on incoming packets (telemetry) and write on outgoing packets (commands). The next parameter is the protocol filename or class name. All other parameters are protocol specific."}),"\n",(0,s.jsx)(t.h3,{id:"cobs-protocol",children:"COBS Protocol"}),"\n",(0,s.jsxs)(t.p,{children:["The Consistent Overhead Byte Stuffing (COBS) Protocol is an algorithm for encoding data bytes that results in efficient, reliable, unambiguous packet framing regardless of packet content, thus making it easy for receiving applications to recover from malformed packets. It employs the zero byte value to serve as a packet delimiter (a special value that indicates the boundary between packets). The algorithm replaces each zero data byte with a non-zero value so that no zero data bytes will appear in the packet and thus be misinterpreted as packet boundaries (See ",(0,s.jsx)(t.a,{href:"https://en.wikipedia.org/wiki/Consistent_Overhead_Byte_Stuffing",children:"https://en.wikipedia.org/wiki/Consistent_Overhead_Byte_Stuffing"})," for more)."]}),"\n",(0,s.jsxs)(i,{groupId:"script-language",children:[(0,s.jsxs)(r,{value:"python",label:"Python",children:[(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-python",children:"INTERFACE INTERFACE_NAME <parameters>\n PROTOCOL READ openc3/interfaces/protocols/cobs_protocol.py\n"})}),(0,s.jsxs)(t.p,{children:["Source code for ",(0,s.jsx)(t.a,{href:"https://github.com/OpenC3/cosmos/blob/main/openc3/python/openc3/interfaces/protocols/cobs_protocol.py",children:"cobs_protocol.py"})]})]}),(0,s.jsxs)(r,{value:"ruby",label:"Ruby",children:[(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-ruby",children:"INTERFACE INTERFACE_NAME <parameters>\n PROTOCOL READ CobsProtocol\n"})}),(0,s.jsxs)(t.p,{children:["Source code for ",(0,s.jsx)(t.a,{href:"https://github.com/OpenC3/cosmos/blob/main/openc3/lib/openc3/interfaces/protocols/cobs_protocol.rb",children:"cobs_protocol.rb"})]})]})]}),"\n",(0,s.jsx)(t.h3,{id:"slip-protocol",children:"SLIP Protocol"}),"\n",(0,s.jsxs)(t.p,{children:["The Serial Line IP (SLIP) Protocol defines a sequence of characters that frame IP packets on a serial line. It defines two special characters: END and ESC. END is 0xC0 and ESC is 0xDB. To send a packet, a SLIP host simply starts sending the data in the packet. If a data byte is the same code as END character, a two byte sequence of ESC and 0xDC is sent instead. If a data bytes is the same as an ESC character, an two byte sequence of ESC and 0xDD is sent instead. When the last byte in the packet has been sent, an END character is then transmitted (See ",(0,s.jsx)(t.a,{href:"https://datatracker.ietf.org/doc/html/rfc1055",children:"https://datatracker.ietf.org/doc/html/rfc1055"})," for more)."]}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{children:"Parameter"}),(0,s.jsx)(t.th,{children:"Description"}),(0,s.jsx)(t.th,{children:"Required"}),(0,s.jsx)(t.th,{children:"Default"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Start Char"}),(0,s.jsx)(t.td,{children:"Character to place at the start of frames"}),(0,s.jsx)(t.td,{children:"No"}),(0,s.jsx)(t.td,{children:"nil (no character)"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Read Strip Characters"}),(0,s.jsx)(t.td,{children:"Strip off start_char and end_char from reads"}),(0,s.jsx)(t.td,{children:"No"}),(0,s.jsx)(t.td,{children:"true"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Read Enable Escaping"}),(0,s.jsx)(t.td,{children:"Whether to enable character escaping on reads"}),(0,s.jsx)(t.td,{children:"No"}),(0,s.jsx)(t.td,{children:"true"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Write Enable Escaping"}),(0,s.jsx)(t.td,{children:"Whether to enable character escaping on writes"}),(0,s.jsx)(t.td,{children:"No"}),(0,s.jsx)(t.td,{children:"true"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"End Char"}),(0,s.jsx)(t.td,{children:"Character to place at the end of frames"}),(0,s.jsx)(t.td,{children:"No"}),(0,s.jsx)(t.td,{children:"0xC0"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Esc Char"}),(0,s.jsx)(t.td,{children:"Escape character"}),(0,s.jsx)(t.td,{children:"No"}),(0,s.jsx)(t.td,{children:"0xDB"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Escape End Char"}),(0,s.jsx)(t.td,{children:"Character to escape End character"}),(0,s.jsx)(t.td,{children:"No"}),(0,s.jsx)(t.td,{children:"0xDC"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Escape Esc Char"}),(0,s.jsx)(t.td,{children:"Character to escape Esc character"}),(0,s.jsx)(t.td,{children:"No"}),(0,s.jsx)(t.td,{children:"0xDD"})]})]})]}),"\n",(0,s.jsxs)(i,{groupId:"script-language",children:[(0,s.jsxs)(r,{value:"python",label:"Python",children:[(0,s.jsx)(t.p,{children:"Usage in plugin.txt:"}),(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-python",children:"INTERFACE INTERFACE_NAME <parameters>\n # Since we're using the defaults, none of the parameters are actually required\n PROTOCOL READ openc3/interfaces/protocols/slip_protocol.py None True True True 0xC0 0xDB 0xDC 0xDD\n"})}),(0,s.jsxs)(t.p,{children:["Source code for ",(0,s.jsx)(t.a,{href:"https://github.com/OpenC3/cosmos/blob/main/openc3/python/openc3/interfaces/protocols/slip_protocol.py",children:"slip_protocol.py"})]})]}),(0,s.jsxs)(r,{value:"ruby",label:"Ruby",children:[(0,s.jsx)(t.p,{children:"Usage in plugin.txt:"}),(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-ruby",children:"INTERFACE INTERFACE_NAME <parameters>\n # Since we're using the defaults, none of the parameters are actually required\n PROTOCOL READ SlipProtocol nil true true true 0xC0 0xDB 0xDC 0xDD\n"})}),(0,s.jsxs)(t.p,{children:["Source code for ",(0,s.jsx)(t.a,{href:"https://github.com/OpenC3/cosmos/blob/main/openc3/lib/openc3/interfaces/protocols/slip_protocol.rb",children:"slip_protocol.rb"})]})]})]}),"\n",(0,s.jsx)(t.h3,{id:"burst-protocol",children:"Burst Protocol"}),"\n",(0,s.jsx)(t.p,{children:"The Burst Protocol simply reads as much data as it can from the interface before returning the data as a COSMOS Packet (It returns a packet for each burst of data read). This Protocol relies on regular bursts of data delimited by time and thus is not very robust. However, it can utilize a sync pattern which does allow it to re-sync if necessary. It can also discard bytes from the incoming data to remove the sync pattern. Finally, it can add sync patterns to data being written out of the Interface."}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{children:"Parameter"}),(0,s.jsx)(t.th,{children:"Description"}),(0,s.jsx)(t.th,{children:"Required"}),(0,s.jsx)(t.th,{children:"Default"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Discard Leading Bytes"}),(0,s.jsx)(t.td,{children:"The number of bytes to discard from the binary data after reading. Note that this applies to bytes starting with the sync pattern if the sync pattern is being used."}),(0,s.jsx)(t.td,{children:"No"}),(0,s.jsx)(t.td,{children:"0 (do not discard bytes)"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Sync Pattern"}),(0,s.jsx)(t.td,{children:"Hex string representing a byte pattern that will be searched for in the raw data. This pattern represents a packet delimiter and all data found including the sync pattern will be returned"}),(0,s.jsx)(t.td,{children:"No"}),(0,s.jsx)(t.td,{children:"nil (no sync pattern)"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Fill Fields"}),(0,s.jsx)(t.td,{children:"Whether to fill in the sync pattern on outgoing packets"}),(0,s.jsx)(t.td,{children:"No"}),(0,s.jsx)(t.td,{children:"false"})]})]})]}),"\n",(0,s.jsxs)(i,{groupId:"script-language",children:[(0,s.jsxs)(r,{value:"python",label:"Python",children:[(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-python",children:"INTERFACE INTERFACE_NAME <parameters>\n # Use a sync pattern but discard it\n PROTOCOL READ openc3/interfaces/protocols/burst_protocol.py 4 0x1ACFFC1D\n"})}),(0,s.jsxs)(t.p,{children:["Source code for ",(0,s.jsx)(t.a,{href:"https://github.com/OpenC3/cosmos/blob/main/openc3/python/openc3/interfaces/protocols/burst_protocol.py",children:"burst_protocol.py"})]})]}),(0,s.jsxs)(r,{value:"ruby",label:"Ruby",children:[(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-ruby",children:"INTERFACE INTERFACE_NAME <parameters>\n # Use a sync pattern but discard it\n PROTOCOL READ BurstProtocol 4 0x1ACFFC1D\n"})}),(0,s.jsxs)(t.p,{children:["Source code for ",(0,s.jsx)(t.a,{href:"https://github.com/OpenC3/cosmos/blob/main/openc3/lib/openc3/interfaces/protocols/burst_protocol.rb",children:"burst_protocol.rb"})]})]})]}),"\n",(0,s.jsx)(t.h3,{id:"fixed-protocol",children:"Fixed Protocol"}),"\n",(0,s.jsx)(t.p,{children:"The Fixed Protocol reads a preset minimum amount of data which is necessary to properly identify all the defined packets using the interface. It then identifies the packet and proceeds to read as much data from the interface as necessary to create the packet which it then returns. This protocol relies on all the packets on the interface being fixed in length. For example, all the packets using the interface are a fixed size and contain a simple header with a 32-bit sync pattern followed by a 16 bit ID. The Fixed Protocol would elegantly handle this case with a minimum read size of 6 bytes. The Fixed Protocol also supports a sync pattern, discarding leading bytes, and filling the sync pattern similar to the Burst Protocol."}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{children:"Parameter"}),(0,s.jsx)(t.th,{children:"Description"}),(0,s.jsx)(t.th,{children:"Required"}),(0,s.jsx)(t.th,{children:"Default"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Minimum ID Size"}),(0,s.jsx)(t.td,{children:"The minimum number of bytes needed to identify a packet. All the packet definitions must declare their ID_ITEM(s) within this given number of bytes."}),(0,s.jsx)(t.td,{children:"Yes"}),(0,s.jsx)(t.td,{})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Discard Leading Bytes"}),(0,s.jsx)(t.td,{children:"The number of bytes to discard from the binary data after reading. Note that this applies to bytes starting with the sync pattern if the sync pattern is being used."}),(0,s.jsx)(t.td,{children:"No"}),(0,s.jsx)(t.td,{children:"0 (do not discard bytes)"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Sync Pattern"}),(0,s.jsx)(t.td,{children:"Hex string representing a byte pattern that will be searched for in the raw data. This pattern represents a packet delimiter and all data found including the sync pattern will be returned."}),(0,s.jsx)(t.td,{children:"No"}),(0,s.jsx)(t.td,{children:"nil (no sync pattern)"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Telemetry"}),(0,s.jsx)(t.td,{children:"Whether the data is telemetry"}),(0,s.jsx)(t.td,{children:"No"}),(0,s.jsx)(t.td,{children:"true (false means command)"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Fill Fields"}),(0,s.jsx)(t.td,{children:"Whether to fill in the sync pattern on outgoing packets"}),(0,s.jsx)(t.td,{children:"No"}),(0,s.jsx)(t.td,{children:"false"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Unknown Raise"}),(0,s.jsx)(t.td,{children:"Whether to raise an exception for an unknown packet"}),(0,s.jsx)(t.td,{children:"No"}),(0,s.jsx)(t.td,{children:"false"})]})]})]}),"\n",(0,s.jsxs)(i,{groupId:"script-language",children:[(0,s.jsxs)(r,{value:"python",label:"Python",children:[(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-python",children:"INTERFACE INTERFACE_NAME <parameters>\n PROTOCOL READ openc3/interfaces/protocols/fixed_protocol.py 6 4 0x1ACFFC1D True\n"})}),(0,s.jsxs)(t.p,{children:["Source code for ",(0,s.jsx)(t.a,{href:"https://github.com/OpenC3/cosmos/blob/main/openc3/python/openc3/interfaces/protocols/fixed_protocol.py",children:"fixed_protocol.py"})]})]}),(0,s.jsxs)(r,{value:"ruby",label:"Ruby",children:[(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-ruby",children:"INTERFACE INTERFACE_NAME <parameters>\n PROTOCOL READ FixedProtocol 6 4 0x1ACFFC1D true\n"})}),(0,s.jsxs)(t.p,{children:["Source code for ",(0,s.jsx)(t.a,{href:"https://github.com/OpenC3/cosmos/blob/main/openc3/lib/openc3/interfaces/protocols/fixed_protocol.rb",children:"fixed_protocol.rb"})]})]})]}),"\n",(0,s.jsx)(t.h3,{id:"length-protocol",children:"Length Protocol"}),"\n",(0,s.jsx)(t.p,{children:"The Length Protocol depends on a length field at a fixed location in the defined packets using the interface. It then reads enough data to grab the length field, decodes it, and reads the remaining length of the packet. For example, all the packets using the interface contain a CCSDS header with a length field. The Length Protocol can be set up to handle the length field and even the length offset CCSDS uses. The Length Protocol also supports a sync pattern, discarding leading bytes, and filling the length and sync pattern similar to the Burst Protocol."}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{children:"Parameter"}),(0,s.jsx)(t.th,{children:"Description"}),(0,s.jsx)(t.th,{children:"Required"}),(0,s.jsx)(t.th,{children:"Default"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Length Bit Offset"}),(0,s.jsx)(t.td,{children:"The bit offset from the start of the packet to the length field. Every packet using this interface must have the same structure such that the length field is the same size at the same location. Be sure to account for the length of the Sync Pattern in this value (if present)."}),(0,s.jsx)(t.td,{children:"No"}),(0,s.jsx)(t.td,{children:"0 bits"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Length Bit Size"}),(0,s.jsx)(t.td,{children:"The size in bits of the length field"}),(0,s.jsx)(t.td,{children:"No"}),(0,s.jsx)(t.td,{children:"16 bits"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Length Value Offset"}),(0,s.jsx)(t.td,{children:"The offset to apply to the length field value. The actual value of the length field plus this offset should equal the exact number of bytes required to read all data for the packet (including the length field itself, sync pattern, etc). For example, if the length field indicates packet length minus one, this value should be one. Be sure to account for the length of the Sync Pattern in this value (if present)."}),(0,s.jsx)(t.td,{children:"No"}),(0,s.jsx)(t.td,{children:"0"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Bytes per Count"}),(0,s.jsx)(t.td,{children:"The number of bytes per each length field 'count'. This is used if the units of the length field is something other than bytes, e.g. if the length field count is in words."}),(0,s.jsx)(t.td,{children:"No"}),(0,s.jsx)(t.td,{children:"1 byte"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Length Endianness"}),(0,s.jsx)(t.td,{children:"The endianness of the length field. Must be either 'BIG_ENDIAN' or 'LITTLE_ENDIAN'."}),(0,s.jsx)(t.td,{children:"No"}),(0,s.jsx)(t.td,{children:"'BIG_ENDIAN'"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Discard Leading Bytes"}),(0,s.jsx)(t.td,{children:"The number of bytes to discard from the binary data after reading. Note that this applies to bytes including the sync pattern if the sync pattern is being used. Discarding is one of the very last steps so any size and offsets above need to account for all the data before discarding."}),(0,s.jsx)(t.td,{children:"No"}),(0,s.jsx)(t.td,{children:"0 (do not discard bytes)"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Sync Pattern"}),(0,s.jsx)(t.td,{children:"Hex string representing a byte pattern that will be searched for in the raw data. This pattern represents a packet delimiter and all data found including the sync pattern will be returned."}),(0,s.jsx)(t.td,{children:"No"}),(0,s.jsx)(t.td,{children:"nil (no sync pattern)"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Max Length"}),(0,s.jsx)(t.td,{children:"The maximum allowed value in the length field"}),(0,s.jsx)(t.td,{children:"No"}),(0,s.jsx)(t.td,{children:"nil (no maximum length)"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Fill Length and Sync Pattern"}),(0,s.jsx)(t.td,{children:"Setting this flag to true causes the length field and sync pattern (if present) to be filled automatically on outgoing packets."}),(0,s.jsx)(t.td,{children:"No"}),(0,s.jsx)(t.td,{children:"false"})]})]})]}),"\n",(0,s.jsx)(t.p,{children:"The most confusing aspect of the Length Protocol is calculating the Length Value Offset. This is especially true in the commonly used CCSDS Space Packet Protocol. The best way to illustrate this is with an example. Suppose you have CCSDS Space Packets prepended with a Sync Pattern of 0x1ACFFC1D. This would look like the following:"}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{children:"Sync (4 bytes)"}),(0,s.jsx)(t.th,{children:"Header (4 bytes)"}),(0,s.jsx)(t.th,{children:"Length (2 bytes)"}),(0,s.jsx)(t.th,{children:"Data (4 bytes)"})]})}),(0,s.jsx)(t.tbody,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"0x1ACFFC1D"}),(0,s.jsx)(t.td,{children:"0x0001CADB"}),(0,s.jsx)(t.td,{children:"0x0003"}),(0,s.jsx)(t.td,{children:"0xDEADBEEF"})]})})]}),"\n",(0,s.jsxs)(t.p,{children:["In this case the total length of the packet is 14 bytes: ",(0,s.jsx)(t.strong,{children:"4 + 4 + 2 + 4 = 14"}),". With 4 bytes of data, the length field is 3 because in CCSDS the length field is calculated as (data length - 1). So how would we calculate the Length Value Offset? COSMOS reads all the bytes in the packet (including the Sync Pattern) so the total length is 14 bytes. The length field is 3 so the Length Value Offset (offset to apply to the length field value) should be 11 (",(0,s.jsx)(t.strong,{children:"3 + 11 = 14"}),")."]}),"\n",(0,s.jsxs)(i,{groupId:"script-language",children:[(0,s.jsxs)(r,{value:"python",label:"Python",children:[(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-python",children:"INTERFACE INTERFACE_NAME <parameters>\n # Example length protocol parameters for a CCSDS packet\n PROTOCOL READ openc3/interfaces/protocols/length_protocol.py 64 16 11 1 BIG_ENDIAN 4 0x1ACFFC1D None True\n"})}),(0,s.jsxs)(t.p,{children:["Source code for ",(0,s.jsx)(t.a,{href:"https://github.com/OpenC3/cosmos/blob/main/openc3/python/openc3/interfaces/protocols/length_protocol.py",children:"length_protocol.py"})]})]}),(0,s.jsxs)(r,{value:"ruby",label:"Ruby",children:[(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-ruby",children:"INTERFACE INTERFACE_NAME <parameters>\n # Example length protocol parameters for a CCSDS packet\n PROTOCOL READ LengthProtocol 64 16 11 1 BIG_ENDIAN 4 0x1ACFFC1D nil true\n"})}),(0,s.jsxs)(t.p,{children:["Source code for ",(0,s.jsx)(t.a,{href:"https://github.com/OpenC3/cosmos/blob/main/openc3/lib/openc3/interfaces/protocols/length_protocol.rb",children:"length_protocol.rb"})]})]})]}),"\n",(0,s.jsx)(t.h3,{id:"terminated-protocol",children:"Terminated Protocol"}),"\n",(0,s.jsx)(t.p,{children:"The Terminated Protocol delineates packets using termination characters found at the end of every packet. It continuously reads data until the termination characters are found at which point it returns the packet data. For example, all the packets using the interface are followed by 0xABCD. This data can either be a part of each packet that is kept or something which is known only by the Terminated Protocol and simply thrown away."}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{children:"Parameter"}),(0,s.jsx)(t.th,{children:"Description"}),(0,s.jsx)(t.th,{children:"Required"}),(0,s.jsx)(t.th,{children:"Default"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Write Termination Characters"}),(0,s.jsx)(t.td,{children:"The data to write after writing a command packet. Given as a hex string such as 0xABCD."}),(0,s.jsx)(t.td,{children:"Yes"}),(0,s.jsx)(t.td,{})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Read Termination Characters"}),(0,s.jsx)(t.td,{children:"The characters which delineate the end of a telemetry packet. Given as a hex string such as 0xABCD."}),(0,s.jsx)(t.td,{children:"Yes"}),(0,s.jsx)(t.td,{})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Strip Read Termination"}),(0,s.jsx)(t.td,{children:"Whether to remove the read termination characters before returning the telemetry packet"}),(0,s.jsx)(t.td,{children:"No"}),(0,s.jsx)(t.td,{children:"true"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Discard Leading Bytes"}),(0,s.jsx)(t.td,{children:"The number of bytes to discard from the binary data after reading. Note that this applies to bytes including the sync pattern if the sync pattern is being used."}),(0,s.jsx)(t.td,{children:"No"}),(0,s.jsx)(t.td,{children:"0 (do not discard bytes)"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Sync Pattern"}),(0,s.jsx)(t.td,{children:"Hex string representing a byte pattern that will be searched for in the raw data. This pattern represents a packet delimiter and all data found including the sync pattern will be returned."}),(0,s.jsx)(t.td,{children:"No"}),(0,s.jsx)(t.td,{children:"nil (no sync pattern)"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Fill Fields"}),(0,s.jsx)(t.td,{children:"Whether to fill in the sync pattern on outgoing packets"}),(0,s.jsx)(t.td,{children:"No"}),(0,s.jsx)(t.td,{children:"false"})]})]})]}),"\n",(0,s.jsxs)(i,{groupId:"script-language",children:[(0,s.jsxs)(r,{value:"python",label:"Python",children:[(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-python",children:"INTERFACE INTERFACE_NAME <parameters>\n # Example newline (0x0A) delimiter and sync pattern of 'DATA' (0x44415441 is ascii for 'DATA')\n PROTOCOL READ openc3/interfaces/protocols/terminated_protocol.py 0x0A 0x0A True 4 0x44415441\n"})}),(0,s.jsxs)(t.p,{children:["Source code for ",(0,s.jsx)(t.a,{href:"https://github.com/OpenC3/cosmos/blob/main/openc3/python/openc3/interfaces/protocols/terminated_protocol.py",children:"terminated_protocol.py"})]})]}),(0,s.jsxs)(r,{value:"ruby",label:"Ruby",children:[(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-ruby",children:"INTERFACE INTERFACE_NAME <parameters>\n # Example newline (0x0A) delimiter and sync pattern of 'DATA' (0x44415441 is ascii for 'DATA')\n PROTOCOL READ TerminatedProtocol 0x0A 0x0A True 4 0x44415441\n"})}),(0,s.jsxs)(t.p,{children:["Source code for ",(0,s.jsx)(t.a,{href:"https://github.com/OpenC3/cosmos/blob/main/openc3/lib/openc3/interfaces/protocols/terminated_protocol.rb",children:"terminated_protocol.rb"})]})]})]}),"\n",(0,s.jsx)(t.h3,{id:"gems-protocol-enterprise",children:"GEMS Protocol (Enterprise)"}),"\n",(0,s.jsx)(t.p,{children:"The GEMS Protocol implements the Ground Equipment Monitoring Service protocol. It is added along with the Terminated Protocol which delineates packets using '|END'. The GEMS Interface is currently only implemented in Ruby."}),"\n",(0,s.jsx)(t.p,{children:"The GEMS protocol doesn't take any parameters but should be added to an interface after the Terminated Protocol and Command Response Protocol."}),"\n",(0,s.jsx)(i,{groupId:"script-language",children:(0,s.jsxs)(r,{value:"ruby",label:"Ruby",children:[(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-ruby",children:"INTERFACE GEMS_INT tcpip_client_interface.rb openc3-operator 8080 8080 10.0 nil nil\n # TerminatedProtocol 0x7C454E44 0x7C454E44 false 0 0x7C47454D53 false ... means:\n # wtc rtc strip discard sync fill\n # where wtc = write termination characters, end of the gems protocol: 0x7C454E44 == '|END'\n # rtc = read termination characters, end of the gems protocol: 0x7C454E44 == '|END'\n # strip = strip read termination (false)\n # discard = 0 bytes\n # sync pattern = beginning of the GEMS protocol: 0x7C47454D53 == '|GEMS'\n # fill = whether to fill in the sync pattern (false as we specify fill in our cmd/tlm definitions)\n PROTOCOL READ TerminatedProtocol 0x7C454E44 0x7C454E44 false 0 0x7C47454D53 false\n # CmdResponseProtocol 5.0 0.2 true means:\n # 5 sec response timeout, 0.2 sec response polling,\n # and true to raise exceptions when protocol errors occur\n PROTOCOL READ_WRITE CmdResponseProtocol 5.0 0.2 true\n PROTOCOL READ_WRITE GemsProtocol\n"})}),(0,s.jsxs)(t.p,{children:["Source code for ",(0,s.jsx)(t.a,{href:"https://github.com/OpenC3/cosmos-enterprise-plugins/blob/main/openc3-cosmos-gems-interface/lib/gems_protocol.rb",children:"gems_protocol.rb"})]})]})}),"\n",(0,s.jsxs)(t.p,{children:["For a full example, please see the ",(0,s.jsx)(t.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,s.jsx)(t.h3,{id:"ccsds-cltu-protocol-enterprise",children:"CCSDS CLTU Protocol (Enterprise)"}),"\n",(0,s.jsx)(t.p,{children:"The CCSDS CLTU Protocol handles the CLTU (Communicates Link Transfer Unit) for Command Streams. It encodes outgoing messages with a BCH encoding and then applies a header and footer to the data."}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{children:"Parameter"}),(0,s.jsx)(t.th,{children:"Description"}),(0,s.jsx)(t.th,{children:"Required"}),(0,s.jsx)(t.th,{children:"Default"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Header"}),(0,s.jsx)(t.td,{children:"Header before BCH encoded data"}),(0,s.jsx)(t.td,{children:"No"}),(0,s.jsx)(t.td,{children:"0xEB90"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Footer"}),(0,s.jsx)(t.td,{children:"Footer after BCH encoded data"}),(0,s.jsx)(t.td,{children:"No"}),(0,s.jsx)(t.td,{children:"0xC5C5C5C5C5C5C579"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Fill Byte"}),(0,s.jsx)(t.td,{children:"BCH encoding fill byte"}),(0,s.jsx)(t.td,{children:"No"}),(0,s.jsx)(t.td,{children:"0x55"})]})]})]}),"\n",(0,s.jsx)(i,{groupId:"script-language",children:(0,s.jsxs)(r,{value:"ruby",label:"Ruby",children:[(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-ruby",children:"INTERFACE INTERFACE_NAME <params>\n PROTOCOL WRITE CcsdsCltuProtocol\n"})}),(0,s.jsxs)(t.p,{children:["Source code for ",(0,s.jsx)(t.a,{href:"https://github.com/OpenC3/cosmos-enterprise-plugins/blob/main/openc3-cosmos-ccsds-protocols/lib/ccsds_cltu_protocol.rb",children:"cltu_protocol.rb"})]})]})}),"\n",(0,s.jsxs)(t.p,{children:["For a full example, please see the ",(0,s.jsx)(t.a,{href:"https://github.com/OpenC3/cosmos-enterprise-plugins/tree/main/openc3-cosmos-ccsds-protocols",children:"openc3-cosmos-ccsds-protocols"})," in the COSMOS Enterprise Plugins."]}),"\n",(0,s.jsx)(t.h3,{id:"ccsds-tctf-protocol-enterprise",children:"CCSDS TCTF Protocol (Enterprise)"}),"\n",(0,s.jsx)(t.p,{children:"The CCSDS TCTF Protocol handles the Telecommand Transfer Frame for Command Streams."}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{children:"Parameter"}),(0,s.jsx)(t.th,{children:"Description"}),(0,s.jsx)(t.th,{children:"Required"}),(0,s.jsx)(t.th,{children:"Default"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Randomization"}),(0,s.jsx)(t.td,{children:"Whether to encode and randomize the transfer frame"}),(0,s.jsx)(t.td,{children:"No"}),(0,s.jsx)(t.td,{children:"true"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Error Control"}),(0,s.jsx)(t.td,{children:"Whether to use the Frame Error Control Field and apply a 16 bit CRC"}),(0,s.jsx)(t.td,{children:"No"}),(0,s.jsx)(t.td,{children:"false"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Bypass"}),(0,s.jsx)(t.td,{children:"Bypass bit where 0 is Type-A and 1 is Type-B (bypass frame acceptance checks)"}),(0,s.jsx)(t.td,{children:"No"}),(0,s.jsx)(t.td,{children:"1"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"SCID"}),(0,s.jsx)(t.td,{children:"Spacecraft Identifier (10 bits)"}),(0,s.jsx)(t.td,{children:"No"}),(0,s.jsx)(t.td,{children:"0"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"VCID"}),(0,s.jsx)(t.td,{children:"Virtual Channel Identifier (6 bits)"}),(0,s.jsx)(t.td,{children:"No"}),(0,s.jsx)(t.td,{children:"0"})]})]})]}),"\n",(0,s.jsx)(i,{groupId:"script-language",children:(0,s.jsxs)(r,{value:"ruby",label:"Ruby",children:[(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-ruby",children:"INTERFACE INTERFACE_NAME <params>\n PROTOCOL WRITE CcsdsTctfProtocol true false 1 0xA 0x1\n"})}),(0,s.jsxs)(t.p,{children:["Source code for ",(0,s.jsx)(t.a,{href:"https://github.com/OpenC3/cosmos-enterprise-plugins/blob/main/openc3-cosmos-ccsds-protocols/lib/ccsds_tctf_protocol.rb",children:"ccsds_tctf_protocol.rb"})]})]})}),"\n",(0,s.jsxs)(t.p,{children:["For a full example, please see the ",(0,s.jsx)(t.a,{href:"https://github.com/OpenC3/cosmos-enterprise-plugins/tree/main/openc3-cosmos-ccsds-protocols",children:"openc3-cosmos-ccsds-protocols"})," in the COSMOS Enterprise Plugins."]}),"\n",(0,s.jsx)(t.h3,{id:"ccsds-tmtf-protocol-enterprise",children:"CCSDS TMTF Protocol (Enterprise)"}),"\n",(0,s.jsx)(t.p,{children:"The CCSDS TMTF Protocol handles the Telemetry Transfer Frame for Telemetry Streams. It adds VCID, MC_FRM_CNT, VC_FRM_CNT to extra which will be included in the Decom data."}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{children:"Parameter"}),(0,s.jsx)(t.th,{children:"Description"}),(0,s.jsx)(t.th,{children:"Required"}),(0,s.jsx)(t.th,{children:"Default"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"SCID"}),(0,s.jsx)(t.td,{children:"Spacecraft Identifier (10 bits)"}),(0,s.jsx)(t.td,{children:"Yes"}),(0,s.jsx)(t.td,{})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Frame Length"}),(0,s.jsx)(t.td,{}),(0,s.jsx)(t.td,{children:"No"}),(0,s.jsx)(t.td,{children:"2048"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Randomization"}),(0,s.jsx)(t.td,{children:"Whether the transfer frame was encoded and randomized"}),(0,s.jsx)(t.td,{children:"No"}),(0,s.jsx)(t.td,{children:"true"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Discard Leading Bytes"}),(0,s.jsx)(t.td,{children:"The number of bytes to discard from the binary data after reading. Note that this applies to bytes including the sync pattern if the sync pattern is being used."}),(0,s.jsx)(t.td,{children:"No"}),(0,s.jsx)(t.td,{children:"0 (do not discard bytes)"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Sync Pattern"}),(0,s.jsx)(t.td,{children:"Hex string representing a byte pattern that will be searched for in the raw data. This pattern represents a packet delimiter and all data found including the sync pattern will be returned."}),(0,s.jsx)(t.td,{children:"No"}),(0,s.jsx)(t.td,{children:"0x1ACFFC1D"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Fill Fields"}),(0,s.jsx)(t.td,{children:"Whether to fill in the sync pattern on outgoing packets"}),(0,s.jsx)(t.td,{children:"No"}),(0,s.jsx)(t.td,{children:"true"})]})]})]}),"\n",(0,s.jsx)(i,{groupId:"script-language",children:(0,s.jsxs)(r,{value:"ruby",label:"Ruby",children:[(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-ruby",children:"INTERFACE INTERFACE_NAME <params>\n PROTOCOL READ CcsdsTmtfProtocol true 0 0x1ACFFC1D true\n"})}),(0,s.jsxs)(t.p,{children:["Source code for ",(0,s.jsx)(t.a,{href:"https://github.com/OpenC3/cosmos-enterprise-plugins/blob/main/openc3-cosmos-ccsds-protocols/lib/ccsds_tmtf_protocol.rb",children:"ccsds_tmtf_protocol.rb"})]})]})}),"\n",(0,s.jsxs)(t.p,{children:["For a full example, please see the ",(0,s.jsx)(t.a,{href:"https://github.com/OpenC3/cosmos-enterprise-plugins/tree/main/openc3-cosmos-ccsds-protocols",children:"openc3-cosmos-ccsds-protocols"})," in the COSMOS Enterprise Plugins."]}),"\n",(0,s.jsx)(t.h3,{id:"template-protocol-deprecated",children:"Template Protocol (Deprecated)"}),"\n",(0,s.jsx)(t.p,{children:"This protocol is now deprecated because it is not able to capture the original SCPI messages in COSMOS raw logging. Please use the TemplateAccessor with the Command Response Protocol instead."}),"\n",(0,s.jsxs)(t.p,{children:["The Template Protocol works much like the Terminated Protocol except it is designed for text-based command and response type interfaces such as SCPI (Standard Commands for Programmable Instruments). It delineates packets in the same way as the Terminated Protocol except each packet is referred to as a line (because each usually contains a line of text). For outgoing packets, a CMD_TEMPLATE field is expected to exist in the packet. This field contains a template string with items to be filled in delineated within HTML tag style brackets ",(0,s.jsx)(t.code,{children:'"<EXAMPLE>"'}),". The Template Protocol will read the named items from within the packet and fill in the CMD_TEMPLATE. This filled in string is then sent out rather than the originally passed in packet. Correspondingly, if a response is expected the outgoing packet should include a RSP_TEMPLATE and RSP_PACKET field. The RSP_TEMPLATE is used to extract data from the response string and build a corresponding RSP_PACKET. See the TEMPLATE target within the COSMOS Demo configuration for an example of usage."]}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{children:"Parameter"}),(0,s.jsx)(t.th,{children:"Description"}),(0,s.jsx)(t.th,{children:"Required"}),(0,s.jsx)(t.th,{children:"Default"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Write Termination Characters"}),(0,s.jsx)(t.td,{children:"The data to write after writing a command packet. Given as a hex string such as 0xABCD."}),(0,s.jsx)(t.td,{children:"Yes"}),(0,s.jsx)(t.td,{})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Read Termination Characters"}),(0,s.jsx)(t.td,{children:"The characters which delineate the end of a telemetry packet. Given as a hex string such as 0xABCD."}),(0,s.jsx)(t.td,{children:"Yes"}),(0,s.jsx)(t.td,{})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Ignore Lines"}),(0,s.jsx)(t.td,{children:"Number of response lines to ignore (completely drop)"}),(0,s.jsx)(t.td,{children:"No"}),(0,s.jsx)(t.td,{children:"0 lines"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Initial Read Delay"}),(0,s.jsx)(t.td,{children:"An initial delay after connecting after which the interface will be read till empty and data dropped. Useful for discarding connect headers and initial prompts."}),(0,s.jsx)(t.td,{children:"No"}),(0,s.jsx)(t.td,{children:"nil (no initial read)"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Response Lines"}),(0,s.jsx)(t.td,{children:"The number of lines that make up expected responses"}),(0,s.jsx)(t.td,{children:"No"}),(0,s.jsx)(t.td,{children:"1 line"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Strip Read Termination"}),(0,s.jsx)(t.td,{children:"Whether to remove the read termination characters before returning the telemetry packet"}),(0,s.jsx)(t.td,{children:"No"}),(0,s.jsx)(t.td,{children:"true"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Discard Leading Bytes"}),(0,s.jsx)(t.td,{children:"The number of bytes to discard from the binary data after reading. Note that this applies to bytes including the sync pattern if the sync pattern is being used."}),(0,s.jsx)(t.td,{children:"No"}),(0,s.jsx)(t.td,{children:"0 (do not discard bytes)"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Sync Pattern"}),(0,s.jsx)(t.td,{children:"Hex string representing a byte pattern that will be searched for in the raw data. This pattern represents a packet delimiter and all data found including the sync pattern will be returned."}),(0,s.jsx)(t.td,{children:"No"}),(0,s.jsx)(t.td,{children:"nil (no sync pattern)"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Fill Fields"}),(0,s.jsx)(t.td,{children:"Whether to fill in the sync pattern on outgoing packets"}),(0,s.jsx)(t.td,{children:"No"}),(0,s.jsx)(t.td,{children:"false"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Response Timeout"}),(0,s.jsx)(t.td,{children:"Number of seconds to wait for a response before timing out"}),(0,s.jsx)(t.td,{children:"No"}),(0,s.jsx)(t.td,{children:"5.0"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Response Polling Period"}),(0,s.jsx)(t.td,{children:"Number of seconds to wait between polling for a response"}),(0,s.jsx)(t.td,{children:"No"}),(0,s.jsx)(t.td,{children:"0.02"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Raise Exceptions"}),(0,s.jsx)(t.td,{children:"Whether to raise exceptions when errors occur like timeouts or unexpected responses"}),(0,s.jsx)(t.td,{children:"No"}),(0,s.jsx)(t.td,{children:"false"})]})]})]}),"\n",(0,s.jsx)(t.h3,{id:"preidentified-protocol",children:"Preidentified Protocol"}),"\n",(0,s.jsxs)(t.p,{children:["The Preidentified Protocol delineates packets using the COSMOS header. This Protocol was created to allow tools to connect and receive the entire packet stream. It can be used with the ",(0,s.jsx)(t.a,{href:"/docs/configuration/interfaces#file-interface",children:"FileInterface"})," to process COSMOS 4 log files. It can also be used to chain COSMOS instances together although that should rarely be needed with the new web native implementation."]}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{children:"Parameter"}),(0,s.jsx)(t.th,{children:"Description"}),(0,s.jsx)(t.th,{children:"Required"}),(0,s.jsx)(t.th,{children:"Default"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Sync Pattern"}),(0,s.jsx)(t.td,{children:"Hex string representing a byte pattern that will be searched for in the raw data. This pattern represents a packet delimiter and all data found AFTER the sync pattern will be returned. The sync pattern itself is discarded."}),(0,s.jsx)(t.td,{children:"No"}),(0,s.jsx)(t.td,{children:"nil (no sync pattern)"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Max Length"}),(0,s.jsx)(t.td,{children:"The maximum allowed value in the length field"}),(0,s.jsx)(t.td,{children:"No"}),(0,s.jsx)(t.td,{children:"nil (no maximum length)"})]})]})]}),"\n",(0,s.jsxs)(i,{groupId:"script-language",children:[(0,s.jsxs)(r,{value:"python",label:"Python",children:[(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-python",children:"INTERFACE INTERFACE_NAME <parameters>\n PROTOCOL READ openc3/interfaces/protocols/preidentified_protocol.py\n"})}),(0,s.jsxs)(t.p,{children:["Source code for ",(0,s.jsx)(t.a,{href:"https://github.com/OpenC3/cosmos/blob/main/openc3/python/openc3/interfaces/protocols/preidentified_protocol.py",children:"preidentified_protocol.py"})]})]}),(0,s.jsxs)(r,{value:"ruby",label:"Ruby",children:[(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-ruby",children:"INTERFACE INTERFACE_NAME <parameters>\n PROTOCOL READ PreidentifiedProtocol\n"})}),(0,s.jsxs)(t.p,{children:["Source code for ",(0,s.jsx)(t.a,{href:"https://github.com/OpenC3/cosmos/blob/main/openc3/lib/openc3/interfaces/protocols/preidentified_protocol.rb",children:"preidentified_protocol.rb"})]})]})]}),"\n",(0,s.jsxs)(t.p,{children:["For an example of using Preidentified Protocol see ",(0,s.jsx)(t.a,{href:"/docs/configuration/interfaces#file-interface",children:"FileInterface"}),"."]}),"\n",(0,s.jsx)(t.h2,{id:"helper-protocols",children:"Helper Protocols"}),"\n",(0,s.jsx)(t.p,{children:"COSMOS provides the following helper protocols: Command Response, Crc and Ignore. These protocols provide helper functionality to Interfaces."}),"\n",(0,s.jsx)(t.h3,{id:"command-response-protocol",children:"Command Response Protocol"}),"\n",(0,s.jsx)(t.p,{children:"The Command Response Protocol waits for a response for any commands with a defined response packet."}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{children:"Parameter"}),(0,s.jsx)(t.th,{children:"Description"}),(0,s.jsx)(t.th,{children:"Required"}),(0,s.jsx)(t.th,{children:"Default"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Response Timeout"}),(0,s.jsx)(t.td,{children:"Number of seconds to wait before timing out when waiting for a response"}),(0,s.jsx)(t.td,{children:"No"}),(0,s.jsx)(t.td,{children:"5"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Response Polling Period"}),(0,s.jsx)(t.td,{children:"Number of seconds to wait between polling for a response"}),(0,s.jsx)(t.td,{children:"No"}),(0,s.jsx)(t.td,{children:"0.02"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Raise Exceptions"}),(0,s.jsx)(t.td,{children:"Whether to raise exceptions when errors occur in the protocol like unexpected responses or response timeouts"}),(0,s.jsx)(t.td,{children:"No"}),(0,s.jsx)(t.td,{children:"false"})]})]})]}),"\n",(0,s.jsxs)(i,{groupId:"script-language",children:[(0,s.jsxs)(r,{value:"python",label:"Python",children:[(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-python",children:"INTERFACE INTERFACE_NAME <parameters>\n PROTOCOL READ openc3/interfaces/protocols/cmd_response_protocol.py 5.0 0.1 True\n"})}),(0,s.jsxs)(t.p,{children:["Source code for ",(0,s.jsx)(t.a,{href:"https://github.com/OpenC3/cosmos/blob/main/openc3/python/openc3/interfaces/protocols/cmd_response_protocol.py",children:"cmd_response_protocol.py"})]})]}),(0,s.jsxs)(r,{value:"ruby",label:"Ruby",children:[(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-ruby",children:"INTERFACE INTERFACE_NAME <parameters>\n PROTOCOL READ CmdResponseProtocol 5.0 0.1 true\n"})}),(0,s.jsxs)(t.p,{children:["Source code for ",(0,s.jsx)(t.a,{href:"https://github.com/OpenC3/cosmos/blob/main/openc3/lib/openc3/interfaces/protocols/cmd_response_protocol.rb",children:"cmd_response_protocol.rb"})]})]})]}),"\n",(0,s.jsx)(t.h4,{id:"packet-definitions",children:"Packet Definitions"}),"\n",(0,s.jsxs)(t.p,{children:["The Command Response Protocol utilizes the ",(0,s.jsx)(t.a,{href:"../configuration/command#response",children:"RESPONSE"})," keyword in the command definition to determine which telemetry packet should be expected when the given command is sent. This will block the command until the response is received."]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-ruby",children:'COMMAND SCPI_PS GET_STATUS BIG_ENDIAN "Gets status"\n ACCESSOR TemplateAccessor\n TEMPLATE ":MEAS:VOLT? (@1:2)"\n RESPONSE SCPI_PS STATUS\n'})}),"\n",(0,s.jsx)(t.p,{children:"The Response packet (STATUS) should be defined to contain the response data."}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-ruby",children:'TELEMETRY SCPI_PS STATUS BIG_ENDIAN "Status"\n ACCESSOR TemplateAccessor\n TEMPLATE "<MEAS_VOLTAGE_1>,<MEAS_VOLTAGE_2>"\n APPEND_ITEM MEAS_VOLTAGE_1 32 FLOAT "Voltage Reading for Channel 1"\n UNITS VOLTS V\n FORMAT_STRING %0.3f\n APPEND_ITEM MEAS_VOLTAGE_2 32 FLOAT "Voltage Reading for Channel 2"\n UNITS VOLTS V\n FORMAT_STRING %0.3f\n'})}),"\n",(0,s.jsxs)(t.p,{children:["For a full example, please see the ",(0,s.jsx)(t.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,s.jsx)(t.h3,{id:"crc-protocol",children:"CRC Protocol"}),"\n",(0,s.jsx)(t.p,{children:"The CRC protocol can add CRCs to outgoing commands and verify CRCs on incoming telemetry packets. Note: You either have to give all the parameters for Poly, Seed, Xor, Reflect or just use the defaults. You can't mix and match setting some and not others."}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{children:"Parameter"}),(0,s.jsx)(t.th,{children:"Description"}),(0,s.jsx)(t.th,{children:"Required"}),(0,s.jsx)(t.th,{children:"Default"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Write Item Name"}),(0,s.jsx)(t.td,{children:"Item to fill with calculated CRC value for outgoing packets (nil = don't fill)"}),(0,s.jsx)(t.td,{children:"No"}),(0,s.jsx)(t.td,{children:"nil"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Strip CRC"}),(0,s.jsx)(t.td,{children:"Whether to remove the CRC from incoming packets"}),(0,s.jsx)(t.td,{children:"No"}),(0,s.jsx)(t.td,{children:"false"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Bad Strategy"}),(0,s.jsx)(t.td,{children:"How to handle CRC errors on incoming packets. ERROR = Just log the error, DISCONNECT = Disconnect interface"}),(0,s.jsx)(t.td,{children:"No"}),(0,s.jsx)(t.td,{children:'"ERROR"'})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Bit Offset"}),(0,s.jsx)(t.td,{children:"Bit offset of the CRC in the data. Can be negative to indicate distance from end of packet"}),(0,s.jsx)(t.td,{children:"No"}),(0,s.jsx)(t.td,{children:"-32"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Bit Size"}),(0,s.jsx)(t.td,{children:"Bit size of the CRC - Must be 16, 32, or 64"}),(0,s.jsx)(t.td,{children:"No"}),(0,s.jsx)(t.td,{children:"32"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Endianness"}),(0,s.jsx)(t.td,{children:"Endianness of the CRC (BIG_ENDIAN/LITTLE_ENDIAN)"}),(0,s.jsx)(t.td,{children:"No"}),(0,s.jsx)(t.td,{children:'"BIG_ENDIAN"'})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Poly"}),(0,s.jsx)(t.td,{children:"Polynomial to use when calculating the CRC expressed as an integer"}),(0,s.jsx)(t.td,{children:"No"}),(0,s.jsx)(t.td,{children:"nil (use default polynomial - 16-bit=0x1021, 32-bit=0x04C11DB7, 64-bit=0x42F0E1EBA9EA3693)"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Seed"}),(0,s.jsx)(t.td,{children:"Seed value to start the calculation"}),(0,s.jsx)(t.td,{children:"No"}),(0,s.jsx)(t.td,{children:"nil (use default seed - 16-bit=0xFFFF, 32-bit=0xFFFFFFFF, 64-bit=0xFFFFFFFFFFFFFFFF)"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Xor"}),(0,s.jsx)(t.td,{children:"Whether to XOR the CRC result with 0xFFFF"}),(0,s.jsx)(t.td,{children:"No"}),(0,s.jsx)(t.td,{children:"nil (use default value - 16-bit=false, 32-bit=true, 64-bit=true)"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Reflect"}),(0,s.jsx)(t.td,{children:"Whether to bit reverse each byte of data before calculating the CRC"}),(0,s.jsx)(t.td,{children:"No"}),(0,s.jsx)(t.td,{children:"nil (use default value - 16-bit=false, 32-bit=true, 64-bit=true)"})]})]})]}),"\n",(0,s.jsxs)(i,{groupId:"script-language",children:[(0,s.jsxs)(r,{value:"python",label:"Python",children:[(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-python",children:"INTERFACE INTERFACE_NAME <parameters>\n # Handle a trailing 32 bit CRC on telemetry by stripping it off\n # In this example I changed the Reflect default to false so I had to explicitly specify all the values\n PROTOCOL READ openc3/interfaces/protocols/crc_protocol.py None True ERROR -32 32 BIG_ENDIAN 0x04C11DB7 0xFFFFFFFF True False\n"})}),(0,s.jsxs)(t.p,{children:["Source code for ",(0,s.jsx)(t.a,{href:"https://github.com/OpenC3/cosmos/blob/main/openc3/python/openc3/interfaces/protocols/crc_protocol.py",children:"crc_protocol.py"})]})]}),(0,s.jsxs)(r,{value:"ruby",label:"Ruby",children:[(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-ruby",children:"INTERFACE INTERFACE_NAME <parameters>\n # Handle a trailing 32 bit CRC on telemetry by stripping it off\n # In this example I changed the Reflect default to false so I had to explicitly specify all the values\n PROTOCOL READ CrcProtocol nil true ERROR -32 32 BIG_ENDIAN 0x04C11DB7 0xFFFFFFFF true false\n"})}),(0,s.jsxs)(t.p,{children:["Source code for ",(0,s.jsx)(t.a,{href:"https://github.com/OpenC3/cosmos/blob/main/openc3/lib/openc3/interfaces/protocols/crc_protocol.rb",children:"crc_protocol.rb"})]})]})]}),"\n",(0,s.jsx)(t.h3,{id:"ignore-packet-protocol",children:"Ignore Packet Protocol"}),"\n",(0,s.jsx)(t.p,{children:"The Ignore Packet protocol drops specified command packets sent by COSMOS or drops incoming telemetry packets."}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{children:"Parameter"}),(0,s.jsx)(t.th,{children:"Description"}),(0,s.jsx)(t.th,{children:"Required"}),(0,s.jsx)(t.th,{children:"Default"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Target Name"}),(0,s.jsx)(t.td,{children:"Target name of the packet to ignore"}),(0,s.jsx)(t.td,{children:"Yes"}),(0,s.jsx)(t.td,{children:"nil"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Packet Name"}),(0,s.jsx)(t.td,{children:"Packet name of the packet to ignore"}),(0,s.jsx)(t.td,{children:"Yes"}),(0,s.jsx)(t.td,{children:"nil"})]})]})]}),"\n",(0,s.jsxs)(i,{groupId:"script-language",children:[(0,s.jsxs)(r,{value:"python",label:"Python",children:[(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-python",children:"INTERFACE INTERFACE_NAME <parameters>\n # Ignore the INST MECH packet\n PROTOCOL READ openc3/interfaces/protocols/ignore_packet_protocol.py INST MECH\n"})}),(0,s.jsxs)(t.p,{children:["Source code for ",(0,s.jsx)(t.a,{href:"https://github.com/OpenC3/cosmos/blob/main/openc3/python/openc3/interfaces/protocols/ignore_packet_protocol.py",children:"ignore_packet_protocol.py"})]})]}),(0,s.jsxs)(r,{value:"ruby",label:"Ruby",children:[(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-ruby",children:"INTERFACE INTERFACE_NAME <parameters>\n # Ignore the INST MECH packet\n PROTOCOL READ IgnorePacketProtocol INST MECH\n"})}),(0,s.jsxs)(t.p,{children:["Source code for ",(0,s.jsx)(t.a,{href:"https://github.com/OpenC3/cosmos/blob/main/openc3/lib/openc3/interfaces/protocols/ignore_packet_protocol.rb",children:"ignore_packet_protocol.rb"})]})]})]}),"\n",(0,s.jsx)(t.h2,{id:"custom-protocols",children:"Custom Protocols"}),"\n",(0,s.jsx)(t.p,{children:"Creating a custom protocol is easy and should be the default solution for customizing COSMOS Interfaces (rather than creating a new Interface class). However, creating custom Interfaces is still useful for defaulting parameters to values that always are fixed for your target and for including the necessary Protocols. The COSMOS Interfaces take a lot of parameters that can be confusing to your end users. Thus you may want to create a custom Interface just to hard coded these values and cut the available parameters down to something like the hostname and port to connect to."}),"\n",(0,s.jsxs)(t.p,{children:["All custom Protocols should derive from the Protocol class ",(0,s.jsx)(t.a,{href:"https://github.com/OpenC3/cosmos/blob/main/openc3/lib/openc3/interfaces/protocols/protocol.rb",children:"openc3/interfaces/protocols/protocol.rb"})," (Ruby) and ",(0,s.jsx)(t.a,{href:"https://github.com/OpenC3/cosmos/blob/main/openc3/python/openc3/interfaces/protocols/protocol.py",children:"openc3/interfaces/protocols/protocol.py"})," (Python). This class defines the 9 methods that are relevant to writing your own protocol. The base class implementation for each method is included below as well as a discussion as to how the methods should be overridden and used in your own Protocols."]}),"\n",(0,s.jsx)(t.admonition,{title:"Ruby Protocol APIs",type:"info",children:(0,s.jsxs)(t.p,{children:["Protocols should not ",(0,s.jsx)(t.code,{children:"require 'openc3/script'"})," since they are part of a COSMOS interface. They should use the COSMOS library code directly like ",(0,s.jsx)(t.a,{href:"https://github.com/OpenC3/cosmos/blob/main/openc3/lib/openc3/system/system.rb",children:"System"}),", ",(0,s.jsx)(t.a,{href:"https://github.com/OpenC3/cosmos/blob/main/openc3/lib/openc3/packets/packet.rb",children:"Packet"}),", ",(0,s.jsx)(t.a,{href:"https://github.com/OpenC3/cosmos/blob/main/openc3/lib/openc3/utilities/bucket.rb",children:"Bucket"}),", ",(0,s.jsx)(t.a,{href:"https://github.com/OpenC3/cosmos/blob/main/openc3/lib/openc3/accessors/binary_accessor.rb",children:"BinaryAccessor"}),", etc. When in doubt, consult the existing COSMOS ",(0,s.jsx)(t.a,{href:"https://github.com/OpenC3/cosmos/tree/main/openc3/lib/openc3/interfaces/protocols",children:"protocol"})," classes."]})}),"\n",(0,s.jsx)(t.admonition,{title:"Python Protocol APIs",type:"info",children:(0,s.jsxs)(t.p,{children:["Protocols should not ",(0,s.jsx)(t.code,{children:"from openc3.script import *"})," since they are part of a COSMOS interface. They should use the COSMOS library code directly like ",(0,s.jsx)(t.a,{href:"https://github.com/OpenC3/cosmos/blob/main/openc3/python/openc3/system/system.py",children:"System"}),", ",(0,s.jsx)(t.a,{href:"https://github.com/OpenC3/cosmos/blob/main/openc3/python/openc3/packets/packet.py",children:"Packet"}),", ",(0,s.jsx)(t.a,{href:"https://github.com/OpenC3/cosmos/blob/main/openc3/python/openc3/utilities/bucket.py",children:"Bucket"}),", ",(0,s.jsx)(t.a,{href:"https://github.com/OpenC3/cosmos/blob/main/openc3/python/openc3/accessors/binary_accessor.py",children:"BinaryAccessor"}),", etc. When in doubt, consult the existing COSMOS ",(0,s.jsx)(t.a,{href:"https://github.com/OpenC3/cosmos/tree/main/openc3/python/openc3/interfaces/protocols",children:"protocol"})," classes."]})}),"\n",(0,s.jsx)(t.p,{children:"To really understand how Protocols work, you first must understand the logic within the base Interface class read and write methods."}),"\n",(0,s.jsx)(t.p,{children:"Let's first discuss the read method."}),"\n",(0,s.jsx)(t.admonition,{title:"Ruby Symbols, Python Strings",type:"info",children:(0,s.jsxs)(t.p,{children:["In the following discussions an all caps word is a symbol in Ruby and a string in Python. So a reference to STOP means ",":STOP",' in Ruby and "STOP" in Python.']})}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{alt:"Interface Read Logic",src:n(1408).A+"",width:"1063",height:"542"})}),"\n",(0,s.jsxs)(t.p,{children:["On ",(0,s.jsx)(t.em,{children:"every"}),' call to read, an empty string "" is first passed down to each of the read Protocol\'s ',(0,s.jsx)(t.code,{children:"read_data()"})," method ",(0,s.jsx)(t.em,{children:"before"})," new raw data is attempted to be read using the Interface's ",(0,s.jsx)(t.code,{children:"read_interface()"})," method. This is a signal to Protocols that have cached up more than one packet worth of data to output those cached packets before any new data is read from the Interface. Typically no data will be cached up and one of the Protocols ",(0,s.jsx)(t.code,{children:"read_data()"})," methods will return STOP in response to the empty string, indicating that more data is required to generate a packet. Each Protocol's ",(0,s.jsx)(t.code,{children:"read_data()"})," method can return one of three things: data that will be passed down to any additional Protocols or turned into a Packet, STOP which means more data is required from the Interface for the Protocol to continue, or DISCONNECT which means that something has happened that requires disconnecting the Interface (and by default trying to reconnect). Each Protocol's ",(0,s.jsx)(t.code,{children:"read_data()"})," method is passed the data that will eventually be turned into a packet and returns a possibly modified set of data. If the data passes through all Protocol's ",(0,s.jsx)(t.code,{children:"read_data()"})," methods it is then converted into a COSMOS packet using the Interface's convert_data_to_packet() method. This packet is then run in a similar fashion through each Read Protocol's read_packet() method. This method has essentially the same return possibilities: a Packet (instead of data as in ",(0,s.jsx)(t.code,{children:"read_data()"}),"), STOP, or DISCONNECT. If the Packet makes it through all read_packet() methods then the Interface packet read counter is incremented and the Packet is returned to the Interface."]}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{alt:"Interface Write Logic",src:n(1733).A+"",width:"931",height:"944"})}),"\n",(0,s.jsx)(t.p,{children:"The Interface write() method works very similarly to read. (It should be mentioned that by default write protocols run in the reverse order of read protocols. This makes sense because when reading you're typically stripping layers of data and when writing you're typically adding on layers in reverse order.)"}),"\n",(0,s.jsx)(t.p,{children:"First, the packet write counter is incremented. Then each write Protocol is given a chance to modify the packet by its write_packet() method being called. This method can either return a potentially modified packet, STOP, or DISCONNECT. If a write Protocol returns STOP no data will be written out the Interface and it is assumed that more packets are necessary before a final packet can be output. DISCONNECT will disconnect the Interface. If the packet makes it through all the write Protocol's write_packet() methods, then it is converted to binary data using the Interface's convert_packet_to_data() method. Next the write_data() method is called for each write Protocol giving it a chance to modify the lower level data. The same return options are available except a Ruby string or Python bytes object is returned instead of a COSMOS packet. If the data makes it through all write_data() methods, then it is written out on the Interface using the write_interface() method. Afterwards, each Protocol's post_write_interface() method is called with both the final modified Packet, and the actual data written out to the Interface. This method allows follow-up such as waiting for a response after writing out a message."}),"\n",(0,s.jsx)(t.h2,{id:"method-discussions",children:"Method discussions"}),"\n",(0,s.jsxs)(t.h3,{id:"initialize-or-init",children:["initialize or ",(0,s.jsx)(t.strong,{children:"init"})]}),"\n",(0,s.jsx)(t.p,{children:"This is the constructor for your custom Protocol. It should always call super(allow_empty_data) to initialize the base Protocol class."}),"\n",(0,s.jsx)(t.p,{children:"Base class implementation:"}),"\n",(0,s.jsxs)(i,{groupId:"script-language",children:[(0,s.jsx)(r,{value:"python",label:"Python",children:(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-python",children:"def __init__(self, allow_empty_data=None):\n self.interface = None\n self.allow_empty_data = ConfigParser.handle_true_false_none(allow_empty_data)\n self.reset()\n"})})}),(0,s.jsx)(r,{value:"ruby",label:"Ruby",children:(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-ruby",children:"# @param allow_empty_data [true/false] Whether STOP should be returned on empty data\ndef initialize(allow_empty_data = false)\n @interface = nil\n @allow_empty_data = ConfigParser.handle_true_false(allow_empty_data)\n reset()\nend\n"})})})]}),"\n",(0,s.jsxs)(t.p,{children:["As you can see, every Protocol maintains state on at least two items. The interface variable holds the Interface class instance that the protocol is associated with. This is sometimes necessary to introspect details that only the Interface knows. allow_empty_data is a flag used by the ",(0,s.jsx)(t.code,{children:"read_data(data)"})," method that is discussed later in this document."]}),"\n",(0,s.jsx)(t.h3,{id:"reset",children:"reset"}),"\n",(0,s.jsx)(t.p,{children:"The reset method is used to reset internal protocol state when the Interface is connected and/or disconnected. This method should be used for common resetting logic. Connect and Disconnect specific logic are handled in the next two methods."}),"\n",(0,s.jsx)(t.p,{children:"Base class implementation:"}),"\n",(0,s.jsxs)(i,{groupId:"script-language",children:[(0,s.jsx)(r,{value:"python",label:"Python",children:(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-python",children:"def reset(self):\n pass\n"})})}),(0,s.jsx)(r,{value:"ruby",label:"Ruby",children:(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-ruby",children:"def reset\nend\n"})})})]}),"\n",(0,s.jsx)(t.p,{children:"As you can see, the base class reset implementation doesn't do anything."}),"\n",(0,s.jsx)(t.h3,{id:"connect_reset",children:"connect_reset"}),"\n",(0,s.jsx)(t.p,{children:"The connect_reset method is used to reset internal Protocol state each time the Interface is connected."}),"\n",(0,s.jsx)(t.p,{children:"Base class implementation:"}),"\n",(0,s.jsxs)(i,{groupId:"script-language",children:[(0,s.jsx)(r,{value:"python",label:"Python",children:(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-python",children:"def connect_reset(self):\n self.reset()\n"})})}),(0,s.jsx)(r,{value:"ruby",label:"Ruby",children:(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-ruby",children:"def connect_reset\n reset()\nend\n"})})})]}),"\n",(0,s.jsx)(t.p,{children:"The base class connect_reset implementation just calls the reset method to ensure common reset logic is run."}),"\n",(0,s.jsx)(t.h3,{id:"disconnect_reset",children:"disconnect_reset"}),"\n",(0,s.jsx)(t.p,{children:"The disconnect_reset method is used to reset internal Protocol state each time the Interface is disconnected."}),"\n",(0,s.jsx)(t.p,{children:"Base class implementation:"}),"\n",(0,s.jsxs)(i,{groupId:"script-language",children:[(0,s.jsx)(r,{value:"python",label:"Python",children:(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-python",children:"def disconnect_reset(self):\n self.reset()\n"})})}),(0,s.jsx)(r,{value:"ruby",label:"Ruby",children:(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-ruby",children:"def disconnect_reset\n reset()\nend\n"})})})]}),"\n",(0,s.jsx)(t.p,{children:"The base class disconnect_reset implementation just calls the reset method to ensure common reset logic is run."}),"\n",(0,s.jsx)(t.h3,{id:"read_data",children:"read_data"}),"\n",(0,s.jsx)(t.p,{children:"The read_data method is used to analyze and potentially modify any raw data read by an Interface. It takes one parameter as the current state of the data to be analyzed. It can return either a string of data, STOP, or DISCONNECT. If it returns a string, then it believes that data may be ready to be a full packet, and is ready for processing by any following Protocols. If STOP is returned then the Protocol believes it needs more data to complete a full packet. If DISCONNECT is returned then the Protocol believes the Interface should be disconnected (and typically automatically reconnected)."}),"\n",(0,s.jsx)(t.p,{children:"Base class implementation:"}),"\n",(0,s.jsxs)(i,{groupId:"script-language",children:[(0,s.jsx)(r,{value:"python",label:"Python",children:(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-python",children:'def read_data(self, data, extra=None):\n if len(data) <= 0:\n if self.allow_empty_data is None:\n if self.interface and self.interface.read_protocols[-1] == self:\n # Last read interface in chain with auto self.allow_empty_data\n return ("STOP", extra)\n elif self.allow_empty_data:\n # Don\'t self.allow_empty_data means STOP\n return ("STOP", extra)\n return (data, extra)\n'})})}),(0,s.jsx)(r,{value:"ruby",label:"Ruby",children:(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-ruby",children:"def read_data(data)\n if (data.length <= 0)\n if @allow_empty_data.nil?\n if @interface and @interface.read_protocols[-1] == self # Last read interface in chain with auto @allow_empty_data\n return :STOP\n end\n elsif !@allow_empty_data # Don't @allow_empty_data means STOP\n return :STOP\n end\n end\n data\nend\n"})})})]}),"\n",(0,s.jsxs)(t.p,{children:["The base class implementation does nothing except return the data it was given. The only exception to this is when handling an empty string. If the allow_empty_data flag is false / False or if it is nil / None and the Protocol is the last in the chain, then the base implementation will return STOP to indicate that it is time to call the Interface ",(0,s.jsx)(t.code,{children:"read_interface()"})," method to get more data. Blank strings are used to signal Protocols that they have an opportunity to return a cached packet."]}),"\n",(0,s.jsx)(t.h3,{id:"read_packet",children:"read_packet"}),"\n",(0,s.jsx)(t.p,{children:"The read_packet method is used to analyze and potentially modify a COSMOS packet before it is returned by the Interface. It takes one parameter as the current state of the packet to be analyzed. It can return either a COSMOS packet, STOP, or DISCONNECT. If it returns a COSMOS packet, then it believes that the packet is valid, should be returned, and is ready for processing by any following Protocols. If STOP is returned then the Protocol believes the packet should be silently dropped. If DISCONNECT is returned then the Protocol believes the Interface should be disconnected (and typically automatically reconnected). This method is where a Protocol would set the stored flag on a packet if it determines that the packet is stored telemetry instead of real-time telemetry."}),"\n",(0,s.jsx)(t.p,{children:"Base class implementation:"}),"\n",(0,s.jsxs)(i,{groupId:"script-language",children:[(0,s.jsx)(r,{value:"python",label:"Python",children:(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-python",children:"def read_packet(self, packet):\n return packet\n"})})}),(0,s.jsx)(r,{value:"ruby",label:"Ruby",children:(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-ruby",children:"def read_packet(packet)\n return packet\nend\n"})})})]}),"\n",(0,s.jsx)(t.p,{children:"The base class always just returns the packet given."}),"\n",(0,s.jsx)(t.h3,{id:"write_packet",children:"write_packet"}),"\n",(0,s.jsx)(t.p,{children:"The write_packet method is used to analyze and potentially modify a COSMOS packet before it is output by the Interface. It takes one parameter as the current state of the packet to be analyzed. It can return either a COSMOS packet, STOP, or DISCONNECT. If it returns a COSMOS packet, then it believes that the packet is valid, should be written out the Interface, and is ready for processing by any following Protocols. If STOP is returned then the Protocol believes the packet should be silently dropped. If DISCONNECT is returned then the Protocol believes the Interface should be disconnected (and typically automatically reconnected)."}),"\n",(0,s.jsx)(t.p,{children:"Base class implementation:"}),"\n",(0,s.jsxs)(i,{groupId:"script-language",children:[(0,s.jsx)(r,{value:"python",label:"Python",children:(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-python",children:"def write_packet(self, packet):\n return packet\n"})})}),(0,s.jsx)(r,{value:"ruby",label:"Ruby",children:(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-ruby",children:"def write_packet(packet)\n return packet\nend\n"})})})]}),"\n",(0,s.jsx)(t.p,{children:"The base class always just returns the packet given."}),"\n",(0,s.jsx)(t.h3,{id:"write_data",children:"write_data"}),"\n",(0,s.jsx)(t.p,{children:"The write_data method is used to analyze and potentially modify data before it is written out by the Interface. It takes one parameter as the current state of the data to be analyzed and sent. It can return either a string of data, STOP, or DISCONNECT. If it returns a string of data, then it believes that the data is valid, should be written out the Interface, and is ready for processing by any following Protocols. If STOP is returned then the Protocol believes the data should be silently dropped. If DISCONNECT is returned then the Protocol believes the Interface should be disconnected (and typically automatically reconnected)."}),"\n",(0,s.jsx)(t.p,{children:"Base class implementation:"}),"\n",(0,s.jsxs)(i,{groupId:"script-language",children:[(0,s.jsx)(r,{value:"python",label:"Python",children:(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-python",children:"def write_data(self, data, extra=None):\n return (data, extra)\n"})})}),(0,s.jsx)(r,{value:"ruby",label:"Ruby",children:(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-ruby",children:"def write_data(data)\n return data\nend\n"})})})]}),"\n",(0,s.jsx)(t.p,{children:"The base class always just returns the data given."}),"\n",(0,s.jsx)(t.h3,{id:"post_write_interface",children:"post_write_interface"}),"\n",(0,s.jsxs)(t.p,{children:["The post_write_interface method is called after data has been written out the Interface. The typical use of this method is to provide a hook to implement command/response type interfaces where a response is always immediately expected in response to a command. It takes two parameters, the packet after all modifications by ",(0,s.jsx)(t.code,{children:"write_packet()"})," and the data that was actually written out the Interface. It can return either the same pair of packet/data, STOP, or DISCONNECT. If it returns a packet/data pair then they are passed on to any other Protocols. If STOP is returned then the Interface write() call completes and no further Protocols ",(0,s.jsx)(t.code,{children:"post_write_interface()"}),' methods are called. If DISCONNECT is returned then the Protocol believes the Interface should be disconnected (and typically automatically reconnected). Note that only the first parameter "packet", is checked to be STOP, or DISCONNECT on the return.']}),"\n",(0,s.jsx)(t.p,{children:"Base class implementation:"}),"\n",(0,s.jsxs)(i,{groupId:"script-language",children:[(0,s.jsx)(r,{value:"python",label:"Python",children:(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-python",children:"def post_write_interface(self, packet, data, extra=None):\n return (packet, data, extra)\n"})})}),(0,s.jsx)(r,{value:"ruby",label:"Ruby",children:(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-ruby",children:"def post_write_interface(packet, data)\n return packet, data\nend\n"})})})]}),"\n",(0,s.jsx)(t.p,{children:"The base class always just returns the packet/data given."}),"\n",(0,s.jsx)(t.h3,{id:"protocol_cmd",children:"protocol_cmd"}),"\n",(0,s.jsxs)(t.p,{children:["The protocol_cmd method is used to send commands to the protocol itself. This is useful to change protocol behavior during runtime. See ",(0,s.jsx)(t.a,{href:"../guides/scripting-api#interface_protocol_cmd",children:"interface_protocol_cmd"})," for more information."]}),"\n",(0,s.jsx)(t.p,{children:"Base class implementation:"}),"\n",(0,s.jsxs)(i,{groupId:"script-language",children:[(0,s.jsx)(r,{value:"python",label:"Python",children:(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-python",children:"def protocol_cmd(self, cmd_name, *cmd_args):\n # Default do nothing - Implemented by subclasses\n return False\n"})})}),(0,s.jsx)(r,{value:"ruby",label:"Ruby",children:(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-ruby",children:"def protocol_cmd(cmd_name, *cmd_args)\n # Default do nothing - Implemented by subclasses\n return false\nend\n"})})})]}),"\n",(0,s.jsx)(t.p,{children:"The base class does nothing as this is special functionality implemented by subclasses."}),"\n",(0,s.jsx)(t.h2,{id:"examples",children:"Examples"}),"\n",(0,s.jsxs)(t.p,{children:["Please see the linked ",(0,s.jsx)(t.a,{href:"https://github.com/OpenC3/cosmos/blob/main/openc3/lib/openc3/interfaces/protocols",children:"Ruby Protocol"})," and ",(0,s.jsx)(t.a,{href:"https://github.com/OpenC3/cosmos/blob/main/openc3/python/openc3/interfaces/protocols",children:"Python Protocol"})," code for examples of the above methods in action."]})]})}function h(e={}){let{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}function p(e,t){throw Error("Expected "+(t?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}},1408:function(e,t,n){n.d(t,{A:()=>r});let r=n.p+"assets/images/interface_read_logic-0deef27c1d2fec9de2a3720a3c9ecedb21a00dca7aabd13da0b8815c037e4c26.png"},1733:function(e,t,n){n.d(t,{A:()=>r});let r=n.p+"assets/images/interface_write_logic-3360afe1b4af20b10dafba848a21e09baccaacc06e2ec8b6c132ac7a3c99e994.png"},9796:function(e,t,n){n.d(t,{R:()=>i,x:()=>a});var r=n(6363);let s={},o=r.createContext(s);function i(e){let t=r.useContext(o);return r.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),r.createElement(o.Provider,{value:t},e.children)}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([["1548"],{287:function(e,o,s){s.r(o),s.d(o,{metadata:()=>n,default:()=>h,frontMatter:()=>r,contentTitle:()=>c,toc:()=>d,assets:()=>l});var n=JSON.parse('{"id":"guides/troubleshooting","title":"Troubleshooting","description":"How to solve various issues we\'ve encountered","source":"@site/docs/guides/troubleshooting.md","sourceDirName":"guides","slug":"/guides/troubleshooting","permalink":"/tools/staticdocs/docs/guides/troubleshooting","draft":false,"unlisted":false,"editUrl":"https://github.com/OpenC3/cosmos/tree/main/docs.openc3.com/docs/guides/troubleshooting.md","tags":[],"version":"current","frontMatter":{"title":"Troubleshooting","description":"How to solve various issues we\'ve encountered","sidebar_custom_props":{"myEmoji":"\u{1F914}"}},"sidebar":"defaultSidebar","previous":{"title":"Scripting API Guide","permalink":"/tools/staticdocs/docs/guides/scripting-api"},"next":{"title":"Development","permalink":"/tools/staticdocs/docs/development"}}'),t=s(7259),i=s(9796);let r={title:"Troubleshooting",description:"How to solve various issues we've encountered",sidebar_custom_props:{myEmoji:"\u{1F914}"}},c,l={},d=[];function a(e){let o={a:"a",code:"code",li:"li",ol:"ol",p:"p",pre:"pre",ul:"ul",...(0,i.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(o.p,{children:["We've seen a number of issues deploying COSMOS via Docker in various types of installations from single server to the cloud. This page captures some of the subtle issues we've discovered and ways to solve the problem. NOTE: Don't forget to also search our ",(0,t.jsx)(o.a,{href:"https://github.com/OpenC3/cosmos/issues",children:"Github Issues"})," (hit '/' and start typing)."]}),"\n",(0,t.jsxs)(o.ol,{children:["\n",(0,t.jsxs)(o.li,{children:["\n",(0,t.jsx)(o.p,{children:'After dozens of installed targets and interfaces, the CmdTlmServer logs indicate "unable to create thread". Microservices are crashing or not starting.'}),"\n",(0,t.jsxs)(o.p,{children:["This is typically due to hard limits on processes or file handles imposed by Linux. If you're on Podman, ensure you've followed the directions from the ",(0,t.jsx)(o.a,{href:"/docs/getting-started/podman",children:"Podman"})," page and have increased the ",(0,t.jsx)(o.code,{children:"pids_limit"})," in ",(0,t.jsx)(o.code,{children:"/etc/containers/containers.conf"}),". Also check your ",(0,t.jsx)(o.code,{children:"ulimit"})," variables by typing ",(0,t.jsx)(o.code,{children:"ulimit -a"})," and increase your file descriptors (",(0,t.jsx)(o.code,{children:"ulimit -t 65536"}),")."]}),"\n"]}),"\n",(0,t.jsxs)(o.li,{children:["\n",(0,t.jsx)(o.p,{children:"COSMOS becomes slow or unresponsive especially as additional plugins are added"}),"\n",(0,t.jsxs)(o.p,{children:["You may be maxing out your system. If you're on Enterprise you can check the ",(0,t.jsx)(o.a,{href:"/docs/tools/systemhealth",children:"System Health Tool"}),". Exec into the operator container (runs all the microservices) and see what the utilization is. NOTE: The container name may be different but you find it with ",(0,t.jsx)(o.code,{children:"docker ps"}),"."]}),"\n",(0,t.jsx)(o.pre,{children:(0,t.jsx)(o.code,{className:"language-bash",children:"docker ps\ndocker exec -it cosmos-openc3-operator-1 sh\n$ htop\n"})}),"\n",(0,t.jsx)(o.p,{children:"Check your memory utilization and CPU utilization. Is a single core pegged? You may need to distribute your workload better."}),"\n",(0,t.jsx)(o.p,{children:"If you're running Docker Desktop (Windows or Mac OS) you can update the Settings / Resources to add additional CPUs or Memory."}),"\n"]}),"\n",(0,t.jsxs)(o.li,{children:["\n",(0,t.jsx)(o.p,{children:'You\'re getting "too many files open" errors'}),"\n",(0,t.jsxs)(o.p,{children:["Check your ",(0,t.jsx)(o.code,{children:"ulimit"})," variables by typing ",(0,t.jsx)(o.code,{children:"ulimit -a"})," and increase your file descriptors ",(0,t.jsx)(o.code,{children:"ulimit -t 65536"}),". Note that you may want to put this in your ",(0,t.jsx)(o.code,{children:".bashrc"}),", ",(0,t.jsx)(o.code,{children:".zshrc"}),", etc to make this permanent."]}),"\n"]}),"\n",(0,t.jsxs)(o.li,{children:["\n",(0,t.jsx)(o.p,{children:"You get networking errors (without certificates)"}),"\n",(0,t.jsxs)(o.p,{children:["Make sure you're using ",(0,t.jsx)(o.code,{children:"127.0.0.1"})," instead of ",(0,t.jsx)(o.code,{children:"localhost"}),". Sometimes we've seen ",(0,t.jsx)(o.code,{children:"localhost"})," get mapped to ",(0,t.jsx)(o.code,{children:"::1"})," (IPV6) instead of ",(0,t.jsx)(o.code,{children:"127.0.0.1"})," (IPV4) which typically breaks things."]}),"\n",(0,t.jsxs)(o.p,{children:["Check your ",(0,t.jsx)(o.code,{children:"/etc/resolve.conf"})," and make sure you don't have any ",(0,t.jsx)(o.code,{children:"search"})," entries. You should have simple ",(0,t.jsx)(o.code,{children:"nameserver"})," entries."]}),"\n",(0,t.jsxs)(o.p,{children:["If you're on RHEL 9.x with rootless Podman make sure you've followed the directions from the ",(0,t.jsx)(o.a,{href:"/docs/getting-started/podman",children:"Podman"})," page and have configured Podman to use Netavark for DNS."]}),"\n"]}),"\n",(0,t.jsxs)(o.li,{children:["\n",(0,t.jsx)(o.p,{children:"You've enabled certificates and you're getting networking errors"}),"\n",(0,t.jsxs)(o.p,{children:["Make sure you've read both the ",(0,t.jsx)(o.a,{href:"/docs/configuration/ssl-tls",children:"SSL-TLS"})," docs and the ",(0,t.jsx)(o.a,{href:"https://github.com/OpenC3/cosmos-enterprise-project?tab=readme-ov-file#opening-to-the-network",children:"COSMOS Enterprise Project"})," instructions."]}),"\n"]}),"\n",(0,t.jsxs)(o.li,{children:["\n",(0,t.jsx)(o.p,{children:"You're getting 404 errors, missing icons, missing tools or functionality"}),"\n",(0,t.jsxs)(o.p,{children:["This is typically because the init container did not finish successfully. First examine the docker logs. NOTE: The container name maybe different but you find it with ",(0,t.jsx)(o.code,{children:"docker ps -a"}),"."]}),"\n",(0,t.jsx)(o.pre,{children:(0,t.jsx)(o.code,{className:"language-bash",children:"docker ps -a\ndocker logs cosmos-openc3-cosmos-init-1\n"})}),"\n",(0,t.jsxs)(o.p,{children:["Next ensure the files are actually present by execing into the operator container and checking. NOTE: The container name may be different but you find it with ",(0,t.jsx)(o.code,{children:"docker ps"}),"."]}),"\n",(0,t.jsx)(o.pre,{children:(0,t.jsx)(o.code,{className:"language-bash",children:"docker ps\ndocker exec -it cosmos-openc3-operator-1 sh\n$ cd /gems/gems/\n$ ls\n$ cd openc3-tool-base-6.6.1.pre.beta0.20250718002117/tools/base\n$ ls\n"})}),"\n",(0,t.jsxs)(o.p,{children:["In the above example we're making sure the tools/base files are there. You can ",(0,t.jsx)(o.code,{children:"cd"})," into any of the tools and ensure the files are present."]}),"\n"]}),"\n",(0,t.jsxs)(o.li,{children:["\n",(0,t.jsx)(o.p,{children:'On Windows, when using bind mounts in Docker compose, the system "locks up" and screens show "TooManyRequests" error'}),"\n",(0,t.jsx)(o.p,{children:"We've seen this on old versions of Docker Desktop when using bind mounts instead of named volumes. Our docker compose files use named volumes by default so be careful with bind mounts. We also recommend upgrading Docker Desktop and WLS2 if possible as this maybe OBE in newer versions of Docker Desktop / WSL2."}),"\n"]}),"\n",(0,t.jsxs)(o.li,{children:["\n",(0,t.jsxs)(o.p,{children:["When exposing COSMOS to the network through http, Chrome ",(0,t.jsx)(o.a,{href:"https://developer.chrome.com/docs/devtools/open",children:"DevTools"}),' shows "Web crypto API is not available".']}),"\n",(0,t.jsxs)(o.p,{children:["Make sure to follow all the instructions in the ",(0,t.jsx)(o.a,{href:"https://github.com/OpenC3/cosmos-enterprise-project/blob/main/README.md",children:"COSMOS Enterprise Project README"}),". In this case you need to do the following:"]}),"\n",(0,t.jsxs)(o.ul,{children:["\n",(0,t.jsx)(o.li,{children:"In Chrome go to: chrome://flags/#unsafely-treat-insecure-origin-as-secure"}),"\n",(0,t.jsx)(o.li,{children:"For Edge to to: edge://flags/#unsafely-treat-insecure-origin-as-secure"}),"\n",(0,t.jsx)(o.li,{children:"Add your http://<Your IP Address>:2900"}),"\n",(0,t.jsx)(o.li,{children:"Enable the Setting"}),"\n",(0,t.jsx)(o.li,{children:"Completely restart Chrome. On MacOS make sure the dot below the icon in chrome is gone by long pressing the icon and choosing Quit."}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(o.li,{children:["\n",(0,t.jsx)(o.p,{children:'When using your own certs, you see an error banner with "Token is invalid" with "Failed to open TCP connection to <KEYCLOAK URL> (execution expired)".'}),"\n",(0,t.jsxs)(o.p,{children:["We have seen this when a local firewall is blocking the 443 port to Keycloak. Keycloak itself can still be reachable at ",(0,t.jsx)(o.code,{children:"&lt;KEYCLOAK URL&gt;/auth"})," which makes it feel like this is not a firewall issue. However, if you exec into the ",(0,t.jsx)(o.code,{children:"cmd-tlm-api"})," container you should be able to curl the following Keycloak URL:"]}),"\n",(0,t.jsx)(o.pre,{children:(0,t.jsx)(o.code,{className:"language-bash",children:"docker ps\ndocker exec -it <CONTAINER ID FOR CMD_TLM_API> sh\n$ ping <KEYCLOAK URL>\n$ curl -vvv <KEYCLOAK URL>/realms/openc3/protocol/openid-connect/certs\n"})}),"\n",(0,t.jsx)(o.p,{children:"If this does not return you could be blocking the 443 port to Keycloak. Update your firewall settings and try again."}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(o.p,{children:["Encountering an issue not on this list? If you're a customer, please get in touch at ",(0,t.jsx)(o.a,{href:"mailto:support@openc3.com",children:"support@openc3.com"}),"."]})]})}function h(e={}){let{wrapper:o}={...(0,i.R)(),...e.components};return o?(0,t.jsx)(o,{...e,children:(0,t.jsx)(a,{...e})}):a(e)}},9796:function(e,o,s){s.d(o,{R:()=>r,x:()=>c});var n=s(6363);let t={},i=n.createContext(t);function r(e){let o=n.useContext(i);return n.useMemo(function(){return"function"==typeof e?e(o):{...o,...e}},[o,e])}function c(e){let o;return o=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:r(e.components),n.createElement(i.Provider,{value:o},e.children)}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([["9074"],{5803:function(e,t,n){n.r(t),n.d(t,{default:()=>ea});var a=n(7259),i=n(6363),r=n(3526),s=n(3283),o=n(4800),l=n(9399),c=n(9586),d=n(7226),u=n(4175),m=n(3225);function b(){let{shown:e,scrollToTop:t}=function({threshold:e}){let[t,n]=(0,i.useState)(!1),a=(0,i.useRef)(!1),{startScroll:r,cancelScroll:s}=(0,u.gk)();return(0,u.Mq)(({scrollY:t},i)=>{let r=i?.scrollY;r&&(a.current?a.current=!1:t>=r?(s(),n(!1)):t<e?n(!1):t+window.innerHeight<document.documentElement.scrollHeight&&n(!0))}),(0,m.$)(e=>{e.location.hash&&(a.current=!0,n(!1))}),{shown:t,scrollToTop:()=>r(0)}}({threshold:300});return(0,a.jsx)("button",{"aria-label":(0,d.T)({id:"theme.BackToTopButton.buttonAriaLabel",message:"Scroll back to top",description:"The ARIA label for the back to top button"}),className:(0,r.A)("clean-btn",o.G.common.backToTopButton,"backToTopButton_EO3c",e&&"backToTopButtonShow_GUL8"),type:"button",onClick:t})}var h=n(8584),p=n(7596),x=n(9862),f=n(5383),j=n(812);function _(e){return(0,a.jsx)("svg",{width:"20",height:"20","aria-hidden":"true",...e,children:(0,a.jsxs)("g",{fill:"#7a7a7a",children:[(0,a.jsx)("path",{d:"M9.992 10.023c0 .2-.062.399-.172.547l-4.996 7.492a.982.982 0 01-.828.454H1c-.55 0-1-.453-1-1 0-.2.059-.403.168-.551l4.629-6.942L.168 3.078A.939.939 0 010 2.528c0-.548.45-.997 1-.997h2.996c.352 0 .649.18.828.45L9.82 9.472c.11.148.172.347.172.55zm0 0"}),(0,a.jsx)("path",{d:"M19.98 10.023c0 .2-.058.399-.168.547l-4.996 7.492a.987.987 0 01-.828.454h-3c-.547 0-.996-.453-.996-1 0-.2.059-.403.168-.551l4.625-6.942-4.625-6.945a.939.939 0 01-.168-.55 1 1 0 01.996-.997h3c.348 0 .649.18.828.45l4.996 7.492c.11.148.168.347.168.55zm0 0"})]})})}function g({onClick:e}){return(0,a.jsx)("button",{type:"button",title:(0,d.T)({id:"theme.docs.sidebar.collapseButtonTitle",message:"Collapse sidebar",description:"The title attribute for collapse button of doc sidebar"}),"aria-label":(0,d.T)({id:"theme.docs.sidebar.collapseButtonAriaLabel",message:"Collapse sidebar",description:"The title attribute for collapse button of doc sidebar"}),className:(0,r.A)("button button--secondary button--outline","collapseSidebarButton_mcQt"),onClick:e,children:(0,a.jsx)(_,{className:"collapseSidebarButtonIcon_RN3f"})})}var v=n(2864),A=n(9125);let k=Symbol("EmptyContext"),C=i.createContext(k);function S({children:e}){let[t,n]=(0,i.useState)(null),r=(0,i.useMemo)(()=>({expandedItem:t,setExpandedItem:n}),[t]);return(0,a.jsx)(C.Provider,{value:r,children:e})}var N=n(3155),T=n(8146),y=n(2322),I=n(9635),L=n(3978),w=n(7252);function M({label:e}){return(0,a.jsx)("span",{title:e,className:"linkLabel_ruxY",children:e})}function E({item:e,onItemClick:t,activePath:n,level:i,index:s,...c}){let{href:d,label:u,className:m,autoAddBaseUrl:b}=e,h=(0,l.w8)(e,n),p=(0,L.A)(d);return(0,a.jsx)("li",{className:(0,r.A)(o.G.docs.docSidebarItemLink,o.G.docs.docSidebarItemLinkLevel(i),"menu__list-item",m),children:(0,a.jsxs)(y.A,{className:(0,r.A)("menu__link",!p&&"menuExternalLink_rR76",{"menu__link--active":h}),autoAddBaseUrl:b,"aria-current":h?"page":void 0,to:d,...p&&{onClick:t?()=>t(e):void 0},...c,children:[(0,a.jsx)(M,{label:u}),!p&&(0,a.jsx)(w.A,{})]})},u)}function B({collapsed:e,categoryLabel:t,onClick:n}){return(0,a.jsx)("button",{"aria-label":e?(0,d.T)({id:"theme.DocSidebarItem.expandCategoryAriaLabel",message:"Expand sidebar category '{label}'",description:"The ARIA label to expand the sidebar category"},{label:t}):(0,d.T)({id:"theme.DocSidebarItem.collapseCategoryAriaLabel",message:"Collapse sidebar category '{label}'",description:"The ARIA label to collapse the sidebar category"},{label:t}),"aria-expanded":!e,type:"button",className:"clean-btn menu__caret",onClick:n})}function G({label:e}){return(0,a.jsx)("span",{title:e,className:"categoryLinkLabel_VDQ2",children:e})}function H(e){return 0===(0,l.Y)(e.item.items,e.activePath).length?(0,a.jsx)(D,{...e}):(0,a.jsx)(P,{...e})}function D({item:e,...t}){if("string"!=typeof e.href)return null;let{type:n,collapsed:i,collapsible:r,items:s,linkUnlisted:o,...l}=e,c={type:"link",...l};return(0,a.jsx)(E,{item:c,...t})}function P({item:e,onItemClick:t,activePath:n,level:s,index:c,...d}){let u,{items:m,label:b,collapsible:h,className:p,href:x}=e,{docs:{sidebar:{autoCollapseCategories:j}}}=(0,f.p)(),_=(u=(0,I.A)(),(0,i.useMemo)(()=>e.href&&!e.linkUnlisted?e.href:!u&&e.collapsible?(0,l.Nr)(e):void 0,[e,u])),g=(0,l.w8)(e,n),v=(0,T.ys)(x,n),{collapsed:S,setCollapsed:L}=(0,N.u)({initialState:()=>!!h&&!g&&e.collapsed}),{expandedItem:w,setExpandedItem:M}=function(){let e=(0,i.useContext)(C);if(e===k)throw new A.dV("DocSidebarItemsExpandedStateProvider");return e}(),E=(e=!S)=>{M(e?null:c),L(e)};return!function({isActive:e,collapsed:t,updateCollapsed:n,activePath:a}){let r=(0,A.ZC)(e),s=(0,A.ZC)(a);(0,i.useEffect)(()=>{let i=e&&!r,o=e&&r&&a!==s;(i||o)&&t&&n(!1)},[e,r,t,n,a,s])}({isActive:g,collapsed:S,updateCollapsed:E,activePath:n}),(0,i.useEffect)(()=>{h&&null!=w&&w!==c&&j&&L(!0)},[h,w,c,L,j]),(0,a.jsxs)("li",{className:(0,r.A)(o.G.docs.docSidebarItemCategory,o.G.docs.docSidebarItemCategoryLevel(s),"menu__list-item",{"menu__list-item--collapsed":S},p),children:[(0,a.jsxs)("div",{className:(0,r.A)("menu__list-item-collapsible",{"menu__list-item-collapsible--active":v}),children:[(0,a.jsx)(y.A,{className:(0,r.A)("categoryLink_OZsf","menu__link",{"menu__link--sublist":h,"menu__link--sublist-caret":!x&&h,"menu__link--active":g}),onClick:n=>{t?.(e),h&&(x?v?(n.preventDefault(),E()):E(!1):(n.preventDefault(),E()))},"aria-current":v?"page":void 0,role:h&&!x?"button":void 0,"aria-expanded":h&&!x?!S:void 0,href:h?_??"#":_,...d,children:(0,a.jsx)(G,{label:b})}),x&&h&&(0,a.jsx)(B,{collapsed:S,categoryLabel:b,onClick:e=>{e.preventDefault(),E()}})]}),(0,a.jsx)(N.N,{lazy:!0,as:"ul",className:"menu__list",collapsed:S,children:(0,a.jsx)(O,{items:m,tabIndex:S?-1:0,onItemClick:t,activePath:n,level:s+1})})]})}function R({item:e,level:t,index:n}){let{value:i,defaultStyle:s,className:l}=e;return(0,a.jsx)("li",{className:(0,r.A)(o.G.docs.docSidebarItemLink,o.G.docs.docSidebarItemLinkLevel(t),s&&["menuHtmlItem_M6PS","menu__list-item"],l),dangerouslySetInnerHTML:{__html:i}},n)}function W({item:e,...t}){switch(e.type){case"category":return(0,a.jsx)(H,{item:e,...t});case"html":return(0,a.jsx)(R,{item:e,...t});default:return(0,a.jsx)(E,{item:e,...t})}}let O=(0,i.memo)(function({items:e,...t}){let n=(0,l.Y)(e,t.activePath);return(0,a.jsx)(S,{children:n.map((e,n)=>(0,a.jsx)(W,{item:e,index:n,...t},n))})});function Y({path:e,sidebar:t,className:n}){let s=function(){let{isActive:e}=(0,v.M)(),[t,n]=(0,i.useState)(e);return(0,u.Mq)(({scrollY:t})=>{e&&n(0===t)},[e]),e&&t}();return(0,a.jsx)("nav",{"aria-label":(0,d.T)({id:"theme.docs.sidebar.navAriaLabel",message:"Docs sidebar",description:"The ARIA label for the sidebar navigation"}),className:(0,r.A)("menu thin-scrollbar","menu_sODH",s&&"menuWithAnnouncementBar_uSXy",n),children:(0,a.jsx)("ul",{className:(0,r.A)(o.G.docs.docSidebarMenu,"menu__list"),children:(0,a.jsx)(O,{items:t,activePath:e,level:1})})})}let V=i.memo(function({path:e,sidebar:t,onCollapse:n,isHidden:i}){let{navbar:{hideOnScroll:s},docs:{sidebar:{hideable:o}}}=(0,f.p)();return(0,a.jsxs)("div",{className:(0,r.A)("sidebar_gO6z",s&&"sidebarWithHideableNavbar_WPrz",i&&"sidebarHidden_b26c"),children:[s&&(0,a.jsx)(j.A,{tabIndex:-1,className:"sidebarLogo_wGlS"}),(0,a.jsx)(Y,{path:e,sidebar:t}),o&&(0,a.jsx)(g,{onClick:n})]})});var z=n(9821),F=n(1428);let Z=({sidebar:e,path:t})=>{let n=(0,F.M)();return(0,a.jsx)("ul",{className:(0,r.A)(o.G.docs.docSidebarMenu,"menu__list"),children:(0,a.jsx)(O,{items:e,activePath:t,onItemClick:e=>{"category"===e.type&&e.href&&n.toggle(),"link"===e.type&&n.toggle()},level:1})})},U=i.memo(function(e){return(0,a.jsx)(z.GX,{component:Z,props:e})});function Q(e){let t=(0,x.l)();return(0,a.jsxs)(a.Fragment,{children:[("desktop"===t||"ssr"===t)&&(0,a.jsx)(V,{...e}),"mobile"===t&&(0,a.jsx)(U,{...e})]})}function q({toggleSidebar:e}){return(0,a.jsx)("div",{className:"expandButton_sZGd",title:(0,d.T)({id:"theme.docs.sidebar.expandButtonTitle",message:"Expand sidebar",description:"The ARIA label and title attribute for expand button of doc sidebar"}),"aria-label":(0,d.T)({id:"theme.docs.sidebar.expandButtonAriaLabel",message:"Expand sidebar",description:"The ARIA label and title attribute for expand button of doc sidebar"}),tabIndex:0,role:"button",onKeyDown:e,onClick:e,children:(0,a.jsx)(_,{className:"expandButtonIcon_Z_Rm"})})}let X={docSidebarContainer:"docSidebarContainer_DuYd",docSidebarContainerHidden:"docSidebarContainerHidden_ITYm",sidebarViewport:"sidebarViewport_m2O2"};function K({children:e}){let t=(0,c.t)();return(0,a.jsx)(i.Fragment,{children:e},t?.name??"noSidebar")}function $({sidebar:e,hiddenSidebarContainer:t,setHiddenSidebarContainer:n}){let{pathname:s}=(0,p.zy)(),[l,c]=(0,i.useState)(!1),d=(0,i.useCallback)(()=>{l&&c(!1),!l&&(0,h.O)()&&c(!0),n(e=>!e)},[n,l]);return(0,a.jsx)("aside",{className:(0,r.A)(o.G.docs.docSidebarContainer,X.docSidebarContainer,t&&X.docSidebarContainerHidden),onTransitionEnd:e=>{e.currentTarget.classList.contains(X.docSidebarContainer)&&t&&c(!0)},children:(0,a.jsx)(K,{children:(0,a.jsxs)("div",{className:(0,r.A)(X.sidebarViewport,l&&X.sidebarViewportHidden),children:[(0,a.jsx)(Q,{sidebar:e,path:s,onCollapse:d,isHidden:l}),l&&(0,a.jsx)(q,{toggleSidebar:d})]})})})}let J={docMainContainer:"docMainContainer_nOYO",docMainContainerEnhanced:"docMainContainerEnhanced_vew7",docItemWrapperEnhanced:"docItemWrapperEnhanced_yrQZ"};function ee({hiddenSidebarContainer:e,children:t}){let n=(0,c.t)();return(0,a.jsx)("main",{className:(0,r.A)(J.docMainContainer,(e||!n)&&J.docMainContainerEnhanced),children:(0,a.jsx)("div",{className:(0,r.A)("container padding-top--md padding-bottom--lg",J.docItemWrapper,e&&J.docItemWrapperEnhanced),children:t})})}function et({children:e}){let t=(0,c.t)(),[n,r]=(0,i.useState)(!1);return(0,a.jsxs)("div",{className:"docsWrapper_oxIj",children:[(0,a.jsx)(b,{}),(0,a.jsxs)("div",{className:"docRoot_hMsS",children:[t&&(0,a.jsx)($,{sidebar:t.items,hiddenSidebarContainer:n,setHiddenSidebarContainer:r}),(0,a.jsx)(ee,{hiddenSidebarContainer:n,children:e})]})]})}var en=n(5678);function ea(e){let t=(0,l.B5)(e);if(!t)return(0,a.jsx)(en.A,{});let{docElement:n,sidebarName:i,sidebarItems:d}=t;return(0,a.jsx)(s.e3,{className:(0,r.A)(o.G.page.docsDocPage),children:(0,a.jsx)(c.V,{name:i,items:d,children:(0,a.jsx)(et,{children:n})})})}},5678:function(e,t,n){n.d(t,{A:()=>o});var a=n(7259);n(6363);var i=n(3526),r=n(7226),s=n(4123);function o({className:e}){return(0,a.jsx)("main",{className:(0,i.A)("container margin-vert--xl",e),children:(0,a.jsx)("div",{className:"row",children:(0,a.jsxs)("div",{className:"col col--6 col--offset-3",children:[(0,a.jsx)(s.A,{as:"h1",className:"hero__title",children:(0,a.jsx)(r.A,{id:"theme.NotFound.title",description:"The title of the 404 page",children:"Page Not Found"})}),(0,a.jsx)("p",{children:(0,a.jsx)(r.A,{id:"theme.NotFound.p1",description:"The first paragraph of the 404 page",children:"We could not find what you were looking for."})}),(0,a.jsx)("p",{children:(0,a.jsx)(r.A,{id:"theme.NotFound.p2",description:"The 2nd paragraph of the 404 page",children:"Please contact the owner of the site that linked you to the original URL and let them know their link is broken."})})]})})})}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([["4242"],{1e3:function(e,t,a){a.r(t),a.d(t,{metadata:()=>n,default:()=>A,frontMatter:()=>r,contentTitle:()=>o,toc:()=>d,assets:()=>l});var n=JSON.parse('{"id":"tools/cmd-tlm-server","title":"Command and Telemetry Server","description":"Status about interfaces, targets and log messages","source":"@site/docs/tools/cmd-tlm-server.md","sourceDirName":"tools","slug":"/tools/cmd-tlm-server","permalink":"/tools/staticdocs/docs/tools/cmd-tlm-server","draft":false,"unlisted":false,"editUrl":"https://github.com/OpenC3/cosmos/tree/main/docs.openc3.com/docs/tools/cmd-tlm-server.md","tags":[],"version":"current","frontMatter":{"title":"Command and Telemetry Server","description":"Status about interfaces, targets and log messages","sidebar_custom_props":{"myEmoji":"\u{1F4E1}"}},"sidebar":"defaultSidebar","previous":{"title":"Command Sender","permalink":"/tools/staticdocs/docs/tools/cmd-sender"},"next":{"title":"Command History (Enterprise)","permalink":"/tools/staticdocs/docs/tools/command-history"}}'),s=a(7259),i=a(9796);let r={title:"Command and Telemetry Server",description:"Status about interfaces, targets and log messages",sidebar_custom_props:{myEmoji:"\u{1F4E1}"}},o,l={},d=[{value:"Introduction",id:"introduction",level:2},{value:"Command and Telemetry Server Menus",id:"command-and-telemetry-server-menus",level:2},{value:"File Menu Items",id:"file-menu-items",level:3},{value:"Interfaces Tab",id:"interfaces-tab",level:2},{value:"Targets Tab",id:"targets-tab",level:2},{value:"Command Packets Tab",id:"command-packets-tab",level:2},{value:"Telemetry Packets Tab",id:"telemetry-packets-tab",level:2},{value:"Data Flows Tab",id:"data-flows-tab",level:2},{value:"Status Tab",id:"status-tab",level:2},{value:"Log Messages",id:"log-messages",level:2}];function c(e){let t={a:"a",h2:"h2",h3:"h3",img:"img",p:"p",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.h2,{id:"introduction",children:"Introduction"}),"\n",(0,s.jsxs)(t.p,{children:["The Command and Telemetry Server application provides status about the ",(0,s.jsx)(t.a,{href:"/tools/staticdocs/docs/configuration/interfaces",children:"interfaces"})," and targets instantiated in your COSMOS installation. Interfaces can be connected or disconnected and raw byte counts are returned. The application also provides quick shortcuts to view both raw and formatted command and telemetry packets as they go through the COSMOS system. At the bottom of the Command and Telemetry Server is the Log Messages showing server messages."]}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{alt:"Cmd Tlm Server",src:a(5236).A+"",width:"2908",height:"1984"})}),"\n",(0,s.jsx)(t.h2,{id:"command-and-telemetry-server-menus",children:"Command and Telemetry Server Menus"}),"\n",(0,s.jsx)(t.h3,{id:"file-menu-items",children:"File Menu Items"}),"\n",(0,s.jsx)(t.p,{children:"The Command and Telemetry Server has one menu under File -> Options:"}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{alt:"File Menu",src:a(4068).A+"",width:"302",height:"114"})}),"\n",(0,s.jsx)(t.p,{children:"This dialog changes the refresh rate of the Command and Telemetry Server to reduce load on both your browser window and the backend server. Note that this changes the refresh rate of the various tabs in the application. The Log Messages will continue to update as messages are generated."}),"\n",(0,s.jsx)(t.h2,{id:"interfaces-tab",children:"Interfaces Tab"}),"\n",(0,s.jsx)(t.p,{children:"The Interfaces tab displays all the interfaces defined by your COSMOS installation. You can Connect or Disconnect interfaces and view raw byte and packet counts."}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{alt:"Interfaces",src:a(8537).A+"",width:"2878",height:"882"})}),"\n",(0,s.jsx)(t.p,{children:"You can get additional details about the interface by clicking the details button."}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{alt:"Interface Details",src:a(6370).A+"",width:"2746",height:"1696"})}),"\n",(0,s.jsx)(t.p,{children:"See the Data Flows tab for more details on how to interact with the interface data flows."}),"\n",(0,s.jsx)(t.h2,{id:"targets-tab",children:"Targets Tab"}),"\n",(0,s.jsx)(t.p,{children:"The Targets tab displays all the targets and their mapped interfaces along with the Command Authority status (Enterprise Only)."}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{alt:"Targets",src:a(1954).A+"",width:"2878",height:"1098"})}),"\n",(0,s.jsxs)(t.p,{children:[(0,s.jsx)(t.a,{href:"/tools/staticdocs/docs/configuration/command#command-authority-enterprise",children:"Command Authority (Enterprise)"})," allows individual users to take and release Command Authority which enables exclusive command and script access to that target for that user. Without taking Command Authority, users can not send a command or start a script under that target. Note, commands or scripts scheduled with Calendar or Autonomic are not affected by Command Authority."]}),"\n",(0,s.jsxs)(t.p,{children:["Command Authority, along with ",(0,s.jsx)(t.a,{href:"/tools/staticdocs/docs/configuration/command#critical-commanding-enterprise",children:"Critical Commanding (Enterprise)"}),", can be enabled in the Admin Console under the Scopes tab."]}),"\n",(0,s.jsx)(t.h2,{id:"command-packets-tab",children:"Command Packets Tab"}),"\n",(0,s.jsx)(t.p,{children:"The Command Packets tab displays all the available commands. The table can be sorted by clicking on the column headers. The table is paginated to support thousands of commands. The search bar searches all pages for a command."}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{alt:"Commands",src:a(1758).A+"",width:"2878",height:"1514"})}),"\n",(0,s.jsx)(t.p,{children:"Clicking on View Raw opens a dialog displaying the raw bytes for that command."}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{alt:"Raw Command",src:a(6155).A+"",width:"782",height:"301"})}),"\n",(0,s.jsxs)(t.p,{children:["Clicking View in Command Sender opens up a new ",(0,s.jsx)(t.a,{href:"/tools/staticdocs/docs/tools/cmd-sender",children:"Command Sender"})," window with the specified command."]}),"\n",(0,s.jsx)(t.h2,{id:"telemetry-packets-tab",children:"Telemetry Packets Tab"}),"\n",(0,s.jsx)(t.p,{children:"The Telemetry Packets tab displays all the available telemetry. The table can be sorted by clicking on the column headers. The table is paginated to support thousands of telemetry packets. The search bar searches all pages for a telemetry packet."}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{alt:"Telemetry",src:a(4943).A+"",width:"2878",height:"1514"})}),"\n",(0,s.jsx)(t.p,{children:"Clicking on View Raw opens a dialog displaying the raw bytes for that telemetry packet."}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{alt:"Raw Telemetry",src:a(2362).A+"",width:"782",height:"406"})}),"\n",(0,s.jsxs)(t.p,{children:["Clicking View in Packet Viewer opens up a new ",(0,s.jsx)(t.a,{href:"/tools/staticdocs/docs/tools/packet-viewer",children:"Packet Viewer"})," window with the specified telemetry packet."]}),"\n",(0,s.jsx)(t.h2,{id:"data-flows-tab",children:"Data Flows Tab"}),"\n",(0,s.jsx)(t.p,{children:"The Data Flows tab displays all the Interface data flows through the system."}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{alt:"Data Flows",src:a(800).A+"",width:"2878",height:"1822"})}),"\n",(0,s.jsx)(t.p,{children:'You can disconnect the interface from the COSMOS Processing by clicking and deleting the lines connecting the Processing to the Interface. This will leave the interface "connected" but no commands are sent out or telemetry processed. Removing the lines from the Interface to the Target will effectively "unmap" the interface and restart it. This may require re-installing the plugin to restore the interface.'}),"\n",(0,s.jsx)(t.p,{children:"From the Details dialog you can also view details about the individual Protocols applied to the Interface. In the EXAMPLE_INT Interface, when you click on the Length protocol you can see the details of the protocol."}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{alt:"Protocol Details",src:a(3573).A+"",width:"2768",height:"1212"})}),"\n",(0,s.jsx)(t.p,{children:"This dialog shows the various settings for the protocol as well as the raw data processed by the protocol."}),"\n",(0,s.jsx)(t.h2,{id:"status-tab",children:"Status Tab"}),"\n",(0,s.jsx)(t.p,{children:"The Status tab displays COSMOS system metrics."}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{alt:"Status",src:a(3760).A+"",width:"2878",height:"1498"})}),"\n",(0,s.jsx)(t.h2,{id:"log-messages",children:"Log Messages"}),"\n",(0,s.jsx)(t.p,{children:"The Log Messages table sits below all the tabs in the Command and Telemetry Server application. It displays server messages such as limits events (new RED, YELLOW, GREEN values), logging events (new files) and interface events (connecting and disconnecting). It can be filtered by severity or by entering values in the Search box. It can also be paused and resumed to inspect an individual message."}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{alt:"Log Messages",src:a(1935).A+"",width:"2788",height:"1172"})})]})}function A(e={}){let{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(c,{...e})}):c(e)}},1758:function(e,t,a){a.d(t,{A:()=>n});let n=a.p+"assets/images/cmd_packets-e7906db3691ccd29600e09cf005f6f53be9d9332ba4c319a1e81e1c8c6b665ed.png"},6155:function(e,t,a){a.d(t,{A:()=>n});let n=a.p+"assets/images/cmd_raw-28307ac400b66050ada7ecc8b7701deffe8fb7f01129b63ec35a54857cb886b7.png"},5236:function(e,t,a){a.d(t,{A:()=>n});let n=a.p+"assets/images/cmd_tlm_server-117772d4be1adbf89805f5b530da301b3dcc0d5085a552d779c9bc692bac4c44.png"},800:function(e,t,a){a.d(t,{A:()=>n});let n=a.p+"assets/images/data_flows-6796d95b379f3f69e3fcf9629c68aae389f3d9a287db5b4d0bbc385d478134b4.png"},4068:function(e,t,a){a.d(t,{A:()=>n});let n="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAS4AAAByCAYAAADtezx7AAAKqWlDQ1BJQ0MgUHJvZmlsZQAASImVlwdQU+kWgP9700MCgQQEpIQaivQWQErooUY6iEpIAoQSQiCo2JXFFVxRRERAEXRVRMFVKWJHFNuioALWBVlElHWxYMPyLjCE3X3z3pt3Zs6cb849//nP/889d84FgEzhisVpMAWAdFG2JNTXgx4dE0vHDQMSUAAUYAjUuLwsMYvDCQSIzNi/y/seAE3aO2aTuf79+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XD4QrrrBjauAAAgYQUA0y9fHz8eIulAHCIAACNQJAdEsTs4jP18ntHEREAABgwgo4TKoLlQDAiAAAnVEAOFWHYHGZUAABIwiIBEXUlxG0UQ9IAACdUQAEVcdgcZlQAAEjCPgKwFXRUW5cTWiJhAAARCoJQKaVqmIq7zwci1dBtWCAAiAgHEElFZxtPX/7To9v4OFa8EAAAAASUVORK5CYII="},6370:function(e,t,a){a.d(t,{A:()=>n});let n=a.p+"assets/images/interface_details-b71797d470007be1e0520bb5b859b4da9cd3411303388be9e6db914a99628dff.png"},8537:function(e,t,a){a.d(t,{A:()=>n});let n=a.p+"assets/images/interfaces-05db0ed276077b796b54a3bca76bd0841bfb0d700456258c878359d332ff9f8f.png"},1935:function(e,t,a){a.d(t,{A:()=>n});let n=a.p+"assets/images/log_messages-6da2901ac63928daa3dcaf39a78ca9e455482c48d4ba917ee704f697e5210818.png"},3573:function(e,t,a){a.d(t,{A:()=>n});let n=a.p+"assets/images/protocol_details-408f871b0bd8440091ac95ca76cac353bb06d0b3a6c3f756dd11e7e746d7c20c.png"},3760:function(e,t,a){a.d(t,{A:()=>n});let n=a.p+"assets/images/status-9b7ac4d919d196a2bf3379d0cb262c6609fb98074c744533bb9132097cb52155.png"},1954:function(e,t,a){a.d(t,{A:()=>n});let n=a.p+"assets/images/targets-b07f7cd9f19a4ca02d2838a4de58c25168f01ee256e692878e3b27b833632aca.png"},4943:function(e,t,a){a.d(t,{A:()=>n});let n=a.p+"assets/images/tlm_packets-18345c00fd6cc01a9f7a1e363fdf8375769ba5afa4ccf22c45925184eefc57ca.png"},2362:function(e,t,a){a.d(t,{A:()=>n});let n=a.p+"assets/images/tlm_raw-cc2223b25e8fc732557856168fd7fa04e7b3459bbd163825639fb6235a8e6180.png"},9796:function(e,t,a){a.d(t,{R:()=>r,x:()=>o});var n=a(6363);let s={},i=n.createContext(s);function r(e){let t=n.useContext(i);return n.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function o(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:r(e.components),n.createElement(i.Provider,{value:t},e.children)}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([["6558"],{222:function(e,t,o){o.r(t),o.d(t,{metadata:()=>n,default:()=>d,frontMatter:()=>r,contentTitle:()=>a,toc:()=>c,assets:()=>l});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":"\u{1F914}"}},"sidebar":"defaultSidebar","previous":{"title":"Licenses","permalink":"/tools/staticdocs/docs/meta/licenses"},"next":{"title":"Security Vulnerabilities","permalink":"/tools/staticdocs/docs/meta/vulnerabilities"}}'),i=o(7259),s=o(9796);let r={title:"Philosophy",description:"COSMOS goals and philosophy",sidebar_custom_props:{myEmoji:"\u{1F914}"}},a,l={},c=[];function h(e){let t={li:"li",ol:"ol",p:"p",...(0,s.R)(),...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. In all implementations, 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 d(e={}){let{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(h,{...e})}):h(e)}},9796:function(e,t,o){o.d(t,{R:()=>r,x:()=>a});var n=o(6363);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 +0,0 @@
1
- "use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([["2474"],{6153:function(e,n,t){t.r(n),t.d(n,{metadata:()=>o,default:()=>h,frontMatter:()=>r,contentTitle:()=>c,toc:()=>a,assets:()=>l});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":2,"frontMatter":{"sidebar_position":2,"title":"Installation","description":"Installing OpenC3 COSMOS","sidebar_custom_props":{"myEmoji":"\u{1F4BE}"}},"sidebar":"defaultSidebar","previous":{"title":"Key Concepts","permalink":"/tools/staticdocs/docs/getting-started/key-concepts"},"next":{"title":"Getting Started","permalink":"/tools/staticdocs/docs/getting-started/gettingstarted"}}'),s=t(7259),i=t(9796);let r={sidebar_position:2,title:"Installation",description:"Installing OpenC3 COSMOS",sidebar_custom_props:{myEmoji:"\u{1F4BE}"}},c,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:"Installation Video for macOS",id:"installation-video-for-macos",level:3},{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.R)(),...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:"installation-video-for-macos",children:"Installation Video for macOS"}),"\n",(0,s.jsx)("div",{style:{textAlign:"center"},children:(0,s.jsx)("iframe",{width:"560",height:"315",src:"https://www.youtube.com/embed/hmhOVIzg4-M",title:"Getting Started with COSMOS on macOS",frameborder:"0",allow:"autoplay; encrypted-media; picture-in-picture; fullscreen"})}),"\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 (increase memory as needed):"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"[wsl2]\nmemory=16GB\nswap=0\n"})}),"\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 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:\\cosmos-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.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},9796:function(e,n,t){t.d(n,{R:()=>r,x:()=>c});var o=t(6363);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 +0,0 @@
1
- "use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([["3670"],{1849:function(e,t,r){r.d(t,{A:()=>m});var n=r(7259);r(6363);var i=r(3526),c=r(2322),s=r(9399),o=r(6061),a=r(3978),d=r(7226),l=r(4123);function u({href:e,children:t}){return(0,n.jsx)(c.A,{href:e,className:(0,i.A)("card padding--lg","cardContainer_S8oU"),children:t})}function h({href:e,icon:t,title:r,description:c}){return(0,n.jsxs)(u,{href:e,children:[(0,n.jsxs)(l.A,{as:"h2",className:(0,i.A)("text--truncate","cardTitle_HoSo"),title:r,children:[t," ",r]}),c&&(0,n.jsx)("p",{className:(0,i.A)("text--truncate","cardDescription_c27F"),title:c,children:c})]})}function p({item:e}){let t=(0,s.Nr)(e),r=function(){let{selectMessage:e}=(0,o.W)();return t=>e(t,(0,d.T)({message:"1 item|{count} items",id:"theme.docs.DocCard.categoryDescription.plurals",description:"The default description for a category card in the generated index about how many items this category includes"},{count:t}))}();return t?(0,n.jsx)(h,{href:t,icon:"\u{1F5C3}\uFE0F",title:e.label,description:e.description??r(e.items.length)}):null}function f({item:e}){let t=e?.customProps?.myEmoji??((0,a.A)(e.href)?"\u{1F4C4}\uFE0F":"\u{1F517}"),r=(0,s.cC)(e.docId??void 0);return(0,n.jsx)(h,{href:e.href,icon:t,title:e.label,description:e.description??r?.description})}function m({item:e}){switch(e.type){case"link":return(0,n.jsx)(f,{item:e});case"category":return(0,n.jsx)(p,{item:e});default:throw Error(`unknown item type ${JSON.stringify(e)}`)}}}}]);