openc3-cosmos-tool-docs 5.16.2 → 5.17.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (160) hide show
  1. checksums.yaml +4 -4
  2. data/tools/staticdocs/404.html +4 -4
  3. data/tools/staticdocs/assets/js/{019369f3.3a124fd7.js → 019369f3.34291acc.js} +1 -1
  4. data/tools/staticdocs/assets/js/{058ffc22.c85ad785.js → 058ffc22.8d9049f4.js} +1 -1
  5. data/tools/staticdocs/assets/js/{0686a885.4d6b8154.js → 0686a885.dde7b18b.js} +1 -1
  6. data/tools/staticdocs/assets/js/{078dbab0.45ea4593.js → 078dbab0.b275e04c.js} +1 -1
  7. data/tools/staticdocs/assets/js/{0f5d161c.3dbf9f60.js → 0f5d161c.ca02c5b2.js} +1 -1
  8. data/tools/staticdocs/assets/js/{0ff569c9.317b47d0.js → 0ff569c9.ad025a56.js} +1 -1
  9. data/tools/staticdocs/assets/js/103cc3be.6b6cd0fa.js +1 -0
  10. data/tools/staticdocs/assets/js/{13196248.d8f8ef9f.js → 13196248.9e7794e3.js} +1 -1
  11. data/tools/staticdocs/assets/js/13c1b4e4.cec67b9c.js +1 -0
  12. data/tools/staticdocs/assets/js/{767ae34d.4ab04b1e.js → 1e02e6a3.e6ef8665.js} +1 -1
  13. data/tools/staticdocs/assets/js/{2047b354.75fe47dd.js → 2047b354.bdd2586a.js} +1 -1
  14. data/tools/staticdocs/assets/js/{22b3ac48.299bf4d6.js → 22b3ac48.0f4fbe9d.js} +1 -1
  15. data/tools/staticdocs/assets/js/{2bb7bf90.c642620c.js → 2bb7bf90.043455de.js} +1 -1
  16. data/tools/staticdocs/assets/js/{3dd7ef3b.f84c6956.js → 3dd7ef3b.c7c1d93f.js} +1 -1
  17. data/tools/staticdocs/assets/js/{40365d27.c318f801.js → 40365d27.7eb3f7b1.js} +1 -1
  18. data/tools/staticdocs/assets/js/{411898ad.f103f64b.js → 411898ad.d5f62a27.js} +1 -1
  19. data/tools/staticdocs/assets/js/{42170351.24db3d9a.js → 42170351.69a8ed02.js} +1 -1
  20. data/tools/staticdocs/assets/js/{43652efd.4e7d6a97.js → 43652efd.be2c1d02.js} +1 -1
  21. data/tools/staticdocs/assets/js/{54d0d530.769f5473.js → 54d0d530.28ba5be7.js} +1 -1
  22. data/tools/staticdocs/assets/js/5b233ba7.9c621552.js +1 -0
  23. data/tools/staticdocs/assets/js/{5bc719f6.84f6ce9e.js → 5bc719f6.7fa17221.js} +1 -1
  24. data/tools/staticdocs/assets/js/{5c6ce5ec.8667906a.js → 5c6ce5ec.5e6ca46b.js} +1 -1
  25. data/tools/staticdocs/assets/js/{5fe211ef.1d991947.js → 5fe211ef.71dc8326.js} +1 -1
  26. data/tools/staticdocs/assets/js/62df909c.906d9999.js +1 -0
  27. data/tools/staticdocs/assets/js/{d52d6961.1d15c902.js → 630e5448.6fea087c.js} +1 -1
  28. data/tools/staticdocs/assets/js/{6831b732.bbf2813b.js → 6831b732.5714d508.js} +1 -1
  29. data/tools/staticdocs/assets/js/696b4199.0335bd94.js +1 -0
  30. data/tools/staticdocs/assets/js/{6b210247.074332a1.js → 6b210247.2cbd59e6.js} +1 -1
  31. data/tools/staticdocs/assets/js/{6b65133b.109a6bef.js → 6b65133b.87dc7da6.js} +1 -1
  32. data/tools/staticdocs/assets/js/6f92e431.300a9857.js +1 -0
  33. data/tools/staticdocs/assets/js/{72c6d8a8.5fca8d68.js → 72c6d8a8.cfccace6.js} +1 -1
  34. data/tools/staticdocs/assets/js/75e64983.932fbc0e.js +1 -0
  35. data/tools/staticdocs/assets/js/{ca2c0ac4.adbecf86.js → 7f5b2696.60735273.js} +1 -1
  36. data/tools/staticdocs/assets/js/{867640d5.a8f59357.js → 867640d5.ffd4cf4c.js} +1 -1
  37. data/tools/staticdocs/assets/js/89e76475.97389cc5.js +1 -0
  38. data/tools/staticdocs/assets/js/{8f7843ee.0f25fdc3.js → 8f7843ee.d1ffd5ee.js} +1 -1
  39. data/tools/staticdocs/assets/js/9424f0b3.29299bde.js +1 -0
  40. data/tools/staticdocs/assets/js/{97535711.ddc0f5af.js → 97535711.fc45ced1.js} +1 -1
  41. data/tools/staticdocs/assets/js/{99581c43.0767018a.js → 99581c43.8e571df8.js} +1 -1
  42. data/tools/staticdocs/assets/js/{9fb6059a.30085d79.js → 9fb6059a.42881e94.js} +1 -1
  43. data/tools/staticdocs/assets/js/a507c363.04b98d2c.js +1 -0
  44. data/tools/staticdocs/assets/js/{a677c089.48b6c791.js → a677c089.b2928bac.js} +1 -1
  45. data/tools/staticdocs/assets/js/{a9987364.cfb3492e.js → a9987364.8f065f19.js} +1 -1
  46. data/tools/staticdocs/assets/js/{aa6b6c1b.a13cb467.js → aa6b6c1b.d78e5212.js} +1 -1
  47. data/tools/staticdocs/assets/js/{b4596165.b4c6c1b8.js → b4596165.6806d46b.js} +1 -1
  48. data/tools/staticdocs/assets/js/b6d70f94.f5514e8b.js +1 -0
  49. data/tools/staticdocs/assets/js/{b9f60ba6.655a4097.js → b9f60ba6.c3b3046d.js} +1 -1
  50. data/tools/staticdocs/assets/js/{bd0034eb.ff7f6265.js → bd0034eb.b4e3d6c1.js} +1 -1
  51. data/tools/staticdocs/assets/js/{c24eae19.98857ebf.js → c24eae19.6b084c7c.js} +1 -1
  52. data/tools/staticdocs/assets/js/{d394346f.e3f500eb.js → c2598f55.c5a1bac3.js} +1 -1
  53. data/tools/staticdocs/assets/js/{cb8c3f08.f669adda.js → cb8c3f08.a0ef4b5f.js} +1 -1
  54. data/tools/staticdocs/assets/js/{cd879be4.6ee752c7.js → cd879be4.6f19050a.js} +1 -1
  55. data/tools/staticdocs/assets/js/{eb3c311a.1b6ccdde.js → ce89ef36.aa518a52.js} +1 -1
  56. data/tools/staticdocs/assets/js/d1b923aa.3f3e186d.js +1 -0
  57. data/tools/staticdocs/assets/js/{d1bfc316.feddf1f3.js → d1bfc316.2d823a88.js} +1 -1
  58. data/tools/staticdocs/assets/js/{d24bf9b6.31d82456.js → d24bf9b6.53eca5e8.js} +1 -1
  59. data/tools/staticdocs/assets/js/{d57a4b5d.905988ec.js → d57a4b5d.aaa48891.js} +1 -1
  60. data/tools/staticdocs/assets/js/d5d77c37.be6fe7b6.js +1 -0
  61. data/tools/staticdocs/assets/js/{d8ca4191.56c22a69.js → d8ca4191.c6632184.js} +1 -1
  62. data/tools/staticdocs/assets/js/{d9b92eba.16d983a0.js → d9b92eba.c6a2c7e5.js} +1 -1
  63. data/tools/staticdocs/assets/js/{db8fa1d0.c35b153c.js → db8fa1d0.f078bc02.js} +1 -1
  64. data/tools/staticdocs/assets/js/dc5f7beb.a4afe7cd.js +1 -0
  65. data/tools/staticdocs/assets/js/{adf499b4.f7df5738.js → dfbae5fd.d1484e14.js} +1 -1
  66. data/tools/staticdocs/assets/js/{e501b0d1.3aa571ae.js → e501b0d1.d108a8a9.js} +1 -1
  67. data/tools/staticdocs/assets/js/{ebec1ccb.a801549e.js → ebec1ccb.1ded1149.js} +1 -1
  68. data/tools/staticdocs/assets/js/{f15615f1.0a240e68.js → f15615f1.f9b655a6.js} +1 -1
  69. data/tools/staticdocs/assets/js/fd886806.a21dd400.js +1 -0
  70. data/tools/staticdocs/assets/js/main.c2e2b617.js +2 -0
  71. data/tools/staticdocs/assets/js/runtime~main.2bb31799.js +1 -0
  72. data/tools/staticdocs/docs/configuration/command.html +6 -6
  73. data/tools/staticdocs/docs/configuration/format.html +5 -5
  74. data/tools/staticdocs/docs/configuration/interfaces.html +5 -5
  75. data/tools/staticdocs/docs/configuration/plugins.html +5 -5
  76. data/tools/staticdocs/docs/configuration/protocols.html +5 -5
  77. data/tools/staticdocs/docs/configuration/ssl-tls.html +5 -5
  78. data/tools/staticdocs/docs/configuration/table.html +5 -5
  79. data/tools/staticdocs/docs/configuration/target.html +5 -5
  80. data/tools/staticdocs/docs/configuration/telemetry-screens.html +18 -5
  81. data/tools/staticdocs/docs/configuration/telemetry.html +5 -5
  82. data/tools/staticdocs/docs/configuration.html +4 -4
  83. data/tools/staticdocs/docs/development/curl.html +5 -5
  84. data/tools/staticdocs/docs/development/developing.html +5 -5
  85. data/tools/staticdocs/docs/development/host-install.html +5 -5
  86. data/tools/staticdocs/docs/development/json-api.html +5 -5
  87. data/tools/staticdocs/docs/development/log-structure.html +5 -5
  88. data/tools/staticdocs/docs/development/roadmap.html +5 -5
  89. data/tools/staticdocs/docs/development/streaming-api.html +4 -4
  90. data/tools/staticdocs/docs/development/testing.html +5 -5
  91. data/tools/staticdocs/docs/development.html +4 -4
  92. data/tools/staticdocs/docs/getting-started/generators.html +5 -5
  93. data/tools/staticdocs/docs/getting-started/gettingstarted.html +5 -5
  94. data/tools/staticdocs/docs/getting-started/installation.html +6 -6
  95. data/tools/staticdocs/docs/getting-started/key_concepts.html +5 -5
  96. data/tools/staticdocs/docs/getting-started/podman.html +5 -5
  97. data/tools/staticdocs/docs/getting-started/requirements.html +5 -5
  98. data/tools/staticdocs/docs/getting-started/upgrading.html +5 -5
  99. data/tools/staticdocs/docs/getting-started.html +4 -4
  100. data/tools/staticdocs/docs/guides/bridges.html +5 -5
  101. data/tools/staticdocs/docs/guides/cfs.html +5 -5
  102. data/tools/staticdocs/docs/guides/custom-widgets.html +5 -5
  103. data/tools/staticdocs/docs/guides/little-endian-bitfields.html +4 -4
  104. data/tools/staticdocs/docs/guides/local-mode.html +5 -5
  105. data/tools/staticdocs/docs/guides/logging.html +5 -5
  106. data/tools/staticdocs/docs/guides/monitoring.html +5 -5
  107. data/tools/staticdocs/docs/guides/performance.html +5 -5
  108. data/tools/staticdocs/docs/guides/raspberrypi.html +5 -5
  109. data/tools/staticdocs/docs/guides/script-writing.html +5 -5
  110. data/tools/staticdocs/docs/guides/scripting-api.html +5 -5
  111. data/tools/staticdocs/docs/guides.html +4 -4
  112. data/tools/staticdocs/docs/meta/contributing.html +5 -5
  113. data/tools/staticdocs/docs/meta/licenses.html +5 -5
  114. data/tools/staticdocs/docs/meta/philosophy.html +4 -4
  115. data/tools/staticdocs/docs/meta/xtce.html +5 -5
  116. data/tools/staticdocs/docs/meta.html +4 -4
  117. data/tools/staticdocs/docs/privacy.html +5 -5
  118. data/tools/staticdocs/docs/tools/autonomic.html +5 -5
  119. data/tools/staticdocs/docs/tools/bucket-explorer.html +5 -5
  120. data/tools/staticdocs/docs/tools/calendar.html +5 -5
  121. data/tools/staticdocs/docs/tools/cmd-sender.html +5 -5
  122. data/tools/staticdocs/docs/tools/cmd-tlm-server.html +5 -5
  123. data/tools/staticdocs/docs/tools/data-extractor.html +5 -5
  124. data/tools/staticdocs/docs/tools/data-viewer.html +5 -5
  125. data/tools/staticdocs/docs/tools/handbooks.html +5 -5
  126. data/tools/staticdocs/docs/tools/limits-monitor.html +5 -5
  127. data/tools/staticdocs/docs/tools/packet-viewer.html +5 -5
  128. data/tools/staticdocs/docs/tools/script-runner.html +5 -5
  129. data/tools/staticdocs/docs/tools/table-manager.html +5 -5
  130. data/tools/staticdocs/docs/tools/tlm-grapher.html +5 -5
  131. data/tools/staticdocs/docs/tools/tlm-viewer.html +5 -5
  132. data/tools/staticdocs/docs/tools.html +4 -4
  133. data/tools/staticdocs/docs.html +5 -5
  134. data/tools/staticdocs/index.html +4 -4
  135. data/tools/staticdocs/lunr-index-1719505302032.json +1 -0
  136. data/tools/staticdocs/lunr-index.json +1 -1
  137. data/tools/staticdocs/markdown-page.html +4 -4
  138. data/tools/staticdocs/search-doc-1719505302032.json +1 -0
  139. data/tools/staticdocs/search-doc.json +1 -1
  140. metadata +74 -74
  141. data/tools/staticdocs/assets/js/103cc3be.a946540f.js +0 -1
  142. data/tools/staticdocs/assets/js/13c1b4e4.50ee3d02.js +0 -1
  143. data/tools/staticdocs/assets/js/3b6e6f8d.3eef0a1d.js +0 -1
  144. data/tools/staticdocs/assets/js/5b233ba7.0029b2f5.js +0 -1
  145. data/tools/staticdocs/assets/js/696b4199.2700ad91.js +0 -1
  146. data/tools/staticdocs/assets/js/6f92e431.67f5a7a4.js +0 -1
  147. data/tools/staticdocs/assets/js/75e64983.e31793e1.js +0 -1
  148. data/tools/staticdocs/assets/js/89e76475.de702714.js +0 -1
  149. data/tools/staticdocs/assets/js/9424f0b3.b24d0393.js +0 -1
  150. data/tools/staticdocs/assets/js/a507c363.198e9246.js +0 -1
  151. data/tools/staticdocs/assets/js/b6d70f94.20a403bf.js +0 -1
  152. data/tools/staticdocs/assets/js/d1b923aa.dcb1dede.js +0 -1
  153. data/tools/staticdocs/assets/js/d5d77c37.80e1a28b.js +0 -1
  154. data/tools/staticdocs/assets/js/dc5f7beb.291f4b91.js +0 -1
  155. data/tools/staticdocs/assets/js/fd886806.dc7cdf8e.js +0 -1
  156. data/tools/staticdocs/assets/js/main.eec2a1b0.js +0 -2
  157. data/tools/staticdocs/assets/js/runtime~main.14022dc5.js +0 -1
  158. data/tools/staticdocs/lunr-index-1716490741709.json +0 -1
  159. data/tools/staticdocs/search-doc-1716490741709.json +0 -1
  160. /data/tools/staticdocs/assets/js/{main.eec2a1b0.js.LICENSE.txt → main.c2e2b617.js.LICENSE.txt} +0 -0
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([[8499],{4634:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>d,contentTitle:()=>l,default:()=>h,frontMatter:()=>a,metadata:()=>s,toc:()=>r});var i=n(1085),o=n(1184);const a={title:"Table Manager"},l=void 0,s={id:"tools/table-manager",title:"Table Manager",description:"Introduction",source:"@site/docs/tools/table-manager.md",sourceDirName:"tools",slug:"/tools/table-manager",permalink:"/tools/staticdocs/docs/tools/table-manager",draft:!1,unlisted:!1,editUrl:"https://github.com/OpenC3/cosmos/tree/main/docs.openc3.com/docs/tools/table-manager.md",tags:[],version:"current",frontMatter:{title:"Table Manager"},sidebar:"defaultSidebar",previous:{title:"Script Runner",permalink:"/tools/staticdocs/docs/tools/script-runner"},next:{title:"Telemetry Grapher",permalink:"/tools/staticdocs/docs/tools/tlm-grapher"}},d={},r=[{value:"Introduction",id:"introduction",level:2},{value:"File Menu Items",id:"file-menu-items",level:3},{value:"File Download",id:"file-download",level:2},{value:"Upload / Download",id:"upload--download",level:2},{value:"upload.rb",id:"uploadrb",level:3},{value:"download.rb",id:"downloadrb",level:3}];function c(e){const t={a:"a",code:"code",h2:"h2",h3:"h3",img:"img",li:"li",p:"p",pre:"pre",ul:"ul",...(0,o.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.h2,{id:"introduction",children:"Introduction"}),"\n",(0,i.jsxs)(t.p,{children:["Table Manager is a binary file editor. It takes binary file ",(0,i.jsx)(t.a,{href:"/tools/staticdocs/docs/configuration/table",children:"definitions"})," similar to the COSMOS command packet definitions and builds a GUI to edit the fields in the binary file."]}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{alt:"Table Manager",src:n(6714).A+"",width:"1272",height:"849"})}),"\n",(0,i.jsx)(t.h3,{id:"file-menu-items",children:"File Menu Items"}),"\n",(0,i.jsx)("img",{src:n(132).A,alt:"File Menu",style:{float:"left","margin-right":"50px",height:"150px"}}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsxs)(t.li,{children:["Create a new binary based on ",(0,i.jsx)(t.a,{href:"/tools/staticdocs/docs/configuration/table",children:"definition"})]}),"\n",(0,i.jsx)(t.li,{children:"Open an existing binary"}),"\n",(0,i.jsx)(t.li,{children:"Save the current binary"}),"\n",(0,i.jsx)(t.li,{children:"Rename the current binary"}),"\n",(0,i.jsx)(t.li,{children:"Delete the current binary"}),"\n"]}),"\n",(0,i.jsx)(t.h2,{id:"file-download",children:"File Download"}),"\n",(0,i.jsxs)(t.p,{children:["The three buttons next to File Download download the binary file, the ",(0,i.jsx)(t.a,{href:"/tools/staticdocs/docs/configuration/table",children:"definition"})," file, and the report file. The binary is the raw bits defined by the table. The ",(0,i.jsx)(t.a,{href:"/tools/staticdocs/docs/configuration/table",children:"definition"})," is the structure definition of those raw bits. The report file is a Table Manager generated CSV that shows all the table values in the binary."]}),"\n",(0,i.jsx)(t.h2,{id:"upload--download",children:"Upload / Download"}),"\n",(0,i.jsxs)(t.p,{children:["Table Manager has the ability to directly call a COSMOS script to upload a binary file to a target or download a file into Table Manager. If a file called ",(0,i.jsx)(t.code,{children:"upload.rb"})," is found in the Target's procedures directory then the Upload button becomes active. If a file called ",(0,i.jsx)(t.code,{children:"download.rb"})," is found in the Target's procedures directory then the Download button becomes active. The B/G button indicates whether to run the upload / download scripts in the background. If you uncheck this box a new Script Runner window will show the line by line execution of the script."]}),"\n",(0,i.jsx)(t.h3,{id:"uploadrb",children:"upload.rb"}),"\n",(0,i.jsxs)(t.p,{children:["The COSMOS demo creates the following ",(0,i.jsx)(t.code,{children:"upload.rb"})," script. Note that the ",(0,i.jsx)(t.code,{children:"ENV['TBL_FILENAME']"})," is set to the name of the table file and the script uses ",(0,i.jsx)(t.code,{children:"get_target_file"})," to get access to the file. At this point the logic to upload the file to the target is specific to the commanding defined by the target but an example script is given."]}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-ruby",children:'# TBL_FILENAME is set to the name of the table file\nputs "file:#{ENV[\'TBL_FILENAME\']}"\n# Open the file\nfile = get_target_file(ENV[\'TBL_FILENAME\'])\nbuffer = file.read\n# puts buffer.formatted\n# Implement custom commanding logic to upload the table\n# Note that buffer is a Ruby string of bytes\n# You probably want to do something like:\n# buf_size = 512 # Size of a buffer in the upload command\n# i = 0\n# while i < buffer.length\n# # Send a part of the buffer\n# # NOTE: triple dots means start index, up to but not including, end index\n# # while double dots means start index, up to AND including, end index\n# cmd("TGT", "UPLOAD", "DATA" => buffer[i...(i + buf_size)])\n# i += buf_size\n# end\nfile.delete\n'})}),"\n",(0,i.jsx)(t.h3,{id:"downloadrb",children:"download.rb"}),"\n",(0,i.jsxs)(t.p,{children:["The COSMOS demo creates the following ",(0,i.jsx)(t.code,{children:"download.rb"})," script. Note that the ",(0,i.jsx)(t.code,{children:"ENV['TBL_FILENAME']"})," is set to the name of the table file to OVERWRITE and the script uses ",(0,i.jsx)(t.code,{children:"put_target_file"})," to get access to the file. At this point the logic to download the file from the target is specific to the commanding defined by the target but an example script is given."]}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-ruby",children:"# TBL_FILENAME is set to the name of the table file to overwrite\nputs \"file:#{ENV['TBL_FILENAME']}\"\n# Download the file\n# Implement custom commanding logic to download the table\n# You probably want to do something like:\nbuffer = ''\n# i = 1\n# num_segments = 5 # calculate based on TBL_FILENAME\n# table_id = 1 # calculate based on TBL_FILENAME\n# while i < num_segments\n# # Request a part of the table buffer\n# cmd(\"TGT DUMP with TABLE_ID #{table_id}, SEGMENT #{i}\")\n# buffer += tlm(\"TGT DUMP_PKT DATA\")\n# i += 1\n# end\nput_target_file(ENV['TBL_FILENAME'], buffer)\n"})})]})}function h(e={}){const{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(c,{...e})}):c(e)}},132:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/file_menu-d672c1f8064e5f847a2464397c1e75ee423452f1ba4a7d0861319bc7c7891196.png"},6714:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/table_manager-816d7a683e6883cb8049e5ec8ffef3076b37a489edcc0e5331bc5d81ab506da2.png"},1184:(e,t,n)=>{n.d(t,{R:()=>l});var i=n(4041);const o={},a=i.createContext(o);function l(e){const t=i.useContext(a);return i.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}}}]);
1
+ "use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([[8499],{6736:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>d,contentTitle:()=>l,default:()=>h,frontMatter:()=>a,metadata:()=>s,toc:()=>r});var i=n(1085),o=n(1184);const a={title:"Table Manager"},l=void 0,s={id:"tools/table-manager",title:"Table Manager",description:"Introduction",source:"@site/docs/tools/table-manager.md",sourceDirName:"tools",slug:"/tools/table-manager",permalink:"/tools/staticdocs/docs/tools/table-manager",draft:!1,unlisted:!1,editUrl:"https://github.com/OpenC3/cosmos/tree/main/docs.openc3.com/docs/tools/table-manager.md",tags:[],version:"current",frontMatter:{title:"Table Manager"},sidebar:"defaultSidebar",previous:{title:"Script Runner",permalink:"/tools/staticdocs/docs/tools/script-runner"},next:{title:"Telemetry Grapher",permalink:"/tools/staticdocs/docs/tools/tlm-grapher"}},d={},r=[{value:"Introduction",id:"introduction",level:2},{value:"File Menu Items",id:"file-menu-items",level:3},{value:"File Download",id:"file-download",level:2},{value:"Upload / Download",id:"upload--download",level:2},{value:"upload.rb",id:"uploadrb",level:3},{value:"download.rb",id:"downloadrb",level:3}];function c(e){const t={a:"a",code:"code",h2:"h2",h3:"h3",img:"img",li:"li",p:"p",pre:"pre",ul:"ul",...(0,o.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.h2,{id:"introduction",children:"Introduction"}),"\n",(0,i.jsxs)(t.p,{children:["Table Manager is a binary file editor. It takes binary file ",(0,i.jsx)(t.a,{href:"/tools/staticdocs/docs/configuration/table",children:"definitions"})," similar to the COSMOS command packet definitions and builds a GUI to edit the fields in the binary file."]}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{alt:"Table Manager",src:n(6714).A+"",width:"1272",height:"849"})}),"\n",(0,i.jsx)(t.h3,{id:"file-menu-items",children:"File Menu Items"}),"\n",(0,i.jsx)("img",{src:n(132).A,alt:"File Menu",style:{float:"left","margin-right":"50px",height:"150px"}}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsxs)(t.li,{children:["Create a new binary based on ",(0,i.jsx)(t.a,{href:"/tools/staticdocs/docs/configuration/table",children:"definition"})]}),"\n",(0,i.jsx)(t.li,{children:"Open an existing binary"}),"\n",(0,i.jsx)(t.li,{children:"Save the current binary"}),"\n",(0,i.jsx)(t.li,{children:"Rename the current binary"}),"\n",(0,i.jsx)(t.li,{children:"Delete the current binary"}),"\n"]}),"\n",(0,i.jsx)(t.h2,{id:"file-download",children:"File Download"}),"\n",(0,i.jsxs)(t.p,{children:["The three buttons next to File Download download the binary file, the ",(0,i.jsx)(t.a,{href:"/tools/staticdocs/docs/configuration/table",children:"definition"})," file, and the report file. The binary is the raw bits defined by the table. The ",(0,i.jsx)(t.a,{href:"/tools/staticdocs/docs/configuration/table",children:"definition"})," is the structure definition of those raw bits. The report file is a Table Manager generated CSV that shows all the table values in the binary."]}),"\n",(0,i.jsx)(t.h2,{id:"upload--download",children:"Upload / Download"}),"\n",(0,i.jsxs)(t.p,{children:["Table Manager has the ability to directly call a COSMOS script to upload a binary file to a target or download a file into Table Manager. If a file called ",(0,i.jsx)(t.code,{children:"upload.rb"})," is found in the Target's procedures directory then the Upload button becomes active. If a file called ",(0,i.jsx)(t.code,{children:"download.rb"})," is found in the Target's procedures directory then the Download button becomes active. The B/G button indicates whether to run the upload / download scripts in the background. If you uncheck this box a new Script Runner window will show the line by line execution of the script."]}),"\n",(0,i.jsx)(t.h3,{id:"uploadrb",children:"upload.rb"}),"\n",(0,i.jsxs)(t.p,{children:["The COSMOS demo creates the following ",(0,i.jsx)(t.code,{children:"upload.rb"})," script. Note that the ",(0,i.jsx)(t.code,{children:"ENV['TBL_FILENAME']"})," is set to the name of the table file and the script uses ",(0,i.jsx)(t.code,{children:"get_target_file"})," to get access to the file. At this point the logic to upload the file to the target is specific to the commanding defined by the target but an example script is given."]}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-ruby",children:'# TBL_FILENAME is set to the name of the table file\nputs "file:#{ENV[\'TBL_FILENAME\']}"\n# Open the file\nfile = get_target_file(ENV[\'TBL_FILENAME\'])\nbuffer = file.read\n# puts buffer.formatted\n# Implement custom commanding logic to upload the table\n# Note that buffer is a Ruby string of bytes\n# You probably want to do something like:\n# buf_size = 512 # Size of a buffer in the upload command\n# i = 0\n# while i < buffer.length\n# # Send a part of the buffer\n# # NOTE: triple dots means start index, up to but not including, end index\n# # while double dots means start index, up to AND including, end index\n# cmd("TGT", "UPLOAD", "DATA" => buffer[i...(i + buf_size)])\n# i += buf_size\n# end\nfile.delete\n'})}),"\n",(0,i.jsx)(t.h3,{id:"downloadrb",children:"download.rb"}),"\n",(0,i.jsxs)(t.p,{children:["The COSMOS demo creates the following ",(0,i.jsx)(t.code,{children:"download.rb"})," script. Note that the ",(0,i.jsx)(t.code,{children:"ENV['TBL_FILENAME']"})," is set to the name of the table file to OVERWRITE and the script uses ",(0,i.jsx)(t.code,{children:"put_target_file"})," to get access to the file. At this point the logic to download the file from the target is specific to the commanding defined by the target but an example script is given."]}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-ruby",children:"# TBL_FILENAME is set to the name of the table file to overwrite\nputs \"file:#{ENV['TBL_FILENAME']}\"\n# Download the file\n# Implement custom commanding logic to download the table\n# You probably want to do something like:\nbuffer = ''\n# i = 1\n# num_segments = 5 # calculate based on TBL_FILENAME\n# table_id = 1 # calculate based on TBL_FILENAME\n# while i < num_segments\n# # Request a part of the table buffer\n# cmd(\"TGT DUMP with TABLE_ID #{table_id}, SEGMENT #{i}\")\n# buffer += tlm(\"TGT DUMP_PKT DATA\")\n# i += 1\n# end\nput_target_file(ENV['TBL_FILENAME'], buffer)\n"})})]})}function h(e={}){const{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(c,{...e})}):c(e)}},132:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/file_menu-d672c1f8064e5f847a2464397c1e75ee423452f1ba4a7d0861319bc7c7891196.png"},6714:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/table_manager-816d7a683e6883cb8049e5ec8ffef3076b37a489edcc0e5331bc5d81ab506da2.png"},1184:(e,t,n)=>{n.d(t,{R:()=>l});var i=n(4041);const o={},a=i.createContext(o);function l(e){const t=i.useContext(a);return i.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([[9005],{158:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>d,contentTitle:()=>i,default:()=>h,frontMatter:()=>a,metadata:()=>o,toc:()=>c});var r=n(1085),s=n(1184);const a={sidebar_position:7,title:"Protocols"},i=void 0,o={id:"configuration/protocols",title:"Protocols",description:"Protocols process data on behalf of an Interface. They can modify the data being written, data being read, or both. Protocols can also mark a packet as stored instead of real-time which means COSMOS will not update the current value table with the packet data. Protocols can be layered and will be processed in order. For example, if you have a low-level encryption layer that must be first removed before processing a higher level buffer length protocol.",source:"@site/docs/configuration/protocols.md",sourceDirName:"configuration",slug:"/configuration/protocols",permalink:"/tools/staticdocs/docs/configuration/protocols",draft:!1,unlisted:!1,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"},sidebar:"defaultSidebar",previous:{title:"Interfaces",permalink:"/tools/staticdocs/docs/configuration/interfaces"},next:{title:"Tables",permalink:"/tools/staticdocs/docs/configuration/table"}},d={},c=[{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:"Template Protocol",id:"template-protocol",level:3},{value:"Preidentified Protocol",id:"preidentified-protocol",level:3},{value:"Helper Protocols",id:"helper-protocols",level:2},{value:"CmdResponse Protocol",id:"cmdresponse-protocol",level:3},{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",id:"initialize",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:"Examples",id:"examples",level:2}];function l(e){const t={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",img:"img",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,s.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.p,{children:"Protocols process data on behalf of an Interface. They can modify the data being written, data being read, or both. Protocols can also mark a packet as stored instead of real-time which means COSMOS will not update the current value table with the packet data. Protocols can be layered and will be processed in order. For example, if you have a low-level encryption layer that must be first removed before processing a higher level buffer length protocol."}),"\n",(0,r.jsx)(t.admonition,{title:"Protocol Run Order",type:"info",children:(0,r.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,r.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,r.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,r.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,r.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,r.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,r.jsx)(t.h2,{id:"packet-delineation-protocols",children:"Packet Delineation Protocols"}),"\n",(0,r.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,r.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,r.jsx)(t.a,{href:"/tools/staticdocs/docs/configuration/protocols#custom-protocols",children:"Custom Protocols"})," documentation."]}),"\n",(0,r.jsx)(t.h3,{id:"cobs-protocol",children:"COBS Protocol"}),"\n",(0,r.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,r.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,r.jsx)(t.h3,{id:"slip-protocol",children:"SLIP Protocol"}),"\n",(0,r.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,r.jsx)(t.a,{href:"https://datatracker.ietf.org/doc/html/rfc1055",children:"https://datatracker.ietf.org/doc/html/rfc1055"})," for more)."]}),"\n",(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Parameter"}),(0,r.jsx)(t.th,{children:"Description"}),(0,r.jsx)(t.th,{children:"Required"}),(0,r.jsx)(t.th,{children:"Default"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Start Char"}),(0,r.jsx)(t.td,{children:"Character to place at the start of frames"}),(0,r.jsx)(t.td,{children:"No"}),(0,r.jsx)(t.td,{children:"nil (no character)"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Read Strip Characters"}),(0,r.jsx)(t.td,{children:"Strip off start_char and end_char from reads"}),(0,r.jsx)(t.td,{children:"No"}),(0,r.jsx)(t.td,{children:"true"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Read Enable Escaping"}),(0,r.jsx)(t.td,{children:"Whether to enable character escaping on reads"}),(0,r.jsx)(t.td,{children:"No"}),(0,r.jsx)(t.td,{children:"true"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Write Enable Escaping"}),(0,r.jsx)(t.td,{children:"Whether to enable character escaping on writes"}),(0,r.jsx)(t.td,{children:"No"}),(0,r.jsx)(t.td,{children:"true"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"End Char"}),(0,r.jsx)(t.td,{children:"Character to place at the end of frames"}),(0,r.jsx)(t.td,{children:"No"}),(0,r.jsx)(t.td,{children:"0xC0"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Esc Char"}),(0,r.jsx)(t.td,{children:"Escape character"}),(0,r.jsx)(t.td,{children:"No"}),(0,r.jsx)(t.td,{children:"0xDB"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Escape End Char"}),(0,r.jsx)(t.td,{children:"Character to escape End character"}),(0,r.jsx)(t.td,{children:"No"}),(0,r.jsx)(t.td,{children:"0xDC"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Escape Esc Char"}),(0,r.jsx)(t.td,{children:"Character to escape Esc character"}),(0,r.jsx)(t.td,{children:"No"}),(0,r.jsx)(t.td,{children:"0xDD"})]})]})]}),"\n",(0,r.jsx)(t.h3,{id:"burst-protocol",children:"Burst Protocol"}),"\n",(0,r.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,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Parameter"}),(0,r.jsx)(t.th,{children:"Description"}),(0,r.jsx)(t.th,{children:"Required"}),(0,r.jsx)(t.th,{children:"Default"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Discard Leading Bytes"}),(0,r.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,r.jsx)(t.td,{children:"No"}),(0,r.jsx)(t.td,{children:"0 (do not discard bytes)"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Sync Pattern"}),(0,r.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,r.jsx)(t.td,{children:"No"}),(0,r.jsx)(t.td,{children:"nil (no sync pattern)"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Fill Fields"}),(0,r.jsx)(t.td,{children:"Whether to fill in the sync pattern on outgoing packets"}),(0,r.jsx)(t.td,{children:"No"}),(0,r.jsx)(t.td,{children:"false"})]})]})]}),"\n",(0,r.jsx)(t.h3,{id:"fixed-protocol",children:"Fixed Protocol"}),"\n",(0,r.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,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Parameter"}),(0,r.jsx)(t.th,{children:"Description"}),(0,r.jsx)(t.th,{children:"Required"}),(0,r.jsx)(t.th,{children:"Default"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Minimum ID Size"}),(0,r.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,r.jsx)(t.td,{children:"Yes"}),(0,r.jsx)(t.td,{})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Discard Leading Bytes"}),(0,r.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,r.jsx)(t.td,{children:"No"}),(0,r.jsx)(t.td,{children:"0 (do not discard bytes)"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Sync Pattern"}),(0,r.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,r.jsx)(t.td,{children:"No"}),(0,r.jsx)(t.td,{children:"nil (no sync pattern)"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Telemetry"}),(0,r.jsx)(t.td,{children:"Whether the data is telemetry"}),(0,r.jsx)(t.td,{children:"No"}),(0,r.jsx)(t.td,{children:"true (false means command)"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Fill Fields"}),(0,r.jsx)(t.td,{children:"Whether to fill in the sync pattern on outgoing packets"}),(0,r.jsx)(t.td,{children:"No"}),(0,r.jsx)(t.td,{children:"false"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Unknown Raise"}),(0,r.jsx)(t.td,{children:"Whether to raise an exception for an unknown packet"}),(0,r.jsx)(t.td,{children:"No"}),(0,r.jsx)(t.td,{children:"false"})]})]})]}),"\n",(0,r.jsx)(t.h3,{id:"length-protocol",children:"Length Protocol"}),"\n",(0,r.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,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Parameter"}),(0,r.jsx)(t.th,{children:"Description"}),(0,r.jsx)(t.th,{children:"Required"}),(0,r.jsx)(t.th,{children:"Default"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Length Bit Offset"}),(0,r.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,r.jsx)(t.td,{children:"No"}),(0,r.jsx)(t.td,{children:"0 bits"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Length Bit Size"}),(0,r.jsx)(t.td,{children:"The size in bits of the length field"}),(0,r.jsx)(t.td,{children:"No"}),(0,r.jsx)(t.td,{children:"16 bits"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Length Value Offset"}),(0,r.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,r.jsx)(t.td,{children:"No"}),(0,r.jsx)(t.td,{children:"0"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Bytes per Count"}),(0,r.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,r.jsx)(t.td,{children:"No"}),(0,r.jsx)(t.td,{children:"1 byte"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Length Endianness"}),(0,r.jsx)(t.td,{children:"The endianness of the length field. Must be either 'BIG_ENDIAN' or 'LITTLE_ENDIAN'."}),(0,r.jsx)(t.td,{children:"No"}),(0,r.jsx)(t.td,{children:"'BIG_ENDIAN'"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Discard Leading Bytes"}),(0,r.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,r.jsx)(t.td,{children:"No"}),(0,r.jsx)(t.td,{children:"0 (do not discard bytes)"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Sync Pattern"}),(0,r.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,r.jsx)(t.td,{children:"No"}),(0,r.jsx)(t.td,{children:"nil (no sync pattern)"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Max Length"}),(0,r.jsx)(t.td,{children:"The maximum allowed value in the length field"}),(0,r.jsx)(t.td,{children:"No"}),(0,r.jsx)(t.td,{children:"nil (no maximum length)"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Fill Length and Sync Pattern"}),(0,r.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,r.jsx)(t.td,{children:"No"}),(0,r.jsx)(t.td,{children:"false"})]})]})]}),"\n",(0,r.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,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Sync (4 bytes)"}),(0,r.jsx)(t.th,{children:"Header (4 bytes)"}),(0,r.jsx)(t.th,{children:"Length (2 bytes)"}),(0,r.jsx)(t.th,{children:"Data (4 bytes)"})]})}),(0,r.jsx)(t.tbody,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"0x1ACFFC1D"}),(0,r.jsx)(t.td,{children:"0x0001CADB"}),(0,r.jsx)(t.td,{children:"0x0003"}),(0,r.jsx)(t.td,{children:"0xDEADBEEF"})]})})]}),"\n",(0,r.jsxs)(t.p,{children:["In this case the total length of the packet is 14 bytes: ",(0,r.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,r.jsx)(t.strong,{children:"3 + 11 = 14"}),")."]}),"\n",(0,r.jsx)(t.h3,{id:"terminated-protocol",children:"Terminated Protocol"}),"\n",(0,r.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,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Parameter"}),(0,r.jsx)(t.th,{children:"Description"}),(0,r.jsx)(t.th,{children:"Required"}),(0,r.jsx)(t.th,{children:"Default"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Write Termination Characters"}),(0,r.jsx)(t.td,{children:"The data to write after writing a command packet. Given as a hex string such as 0xABCD."}),(0,r.jsx)(t.td,{children:"Yes"}),(0,r.jsx)(t.td,{})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Read Termination Characters"}),(0,r.jsx)(t.td,{children:"The characters which delineate the end of a telemetry packet. Given as a hex string such as 0xABCD."}),(0,r.jsx)(t.td,{children:"Yes"}),(0,r.jsx)(t.td,{})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Strip Read Termination"}),(0,r.jsx)(t.td,{children:"Whether to remove the read termination characters before returning the telemetry packet"}),(0,r.jsx)(t.td,{children:"No"}),(0,r.jsx)(t.td,{children:"true"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Discard Leading Bytes"}),(0,r.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,r.jsx)(t.td,{children:"No"}),(0,r.jsx)(t.td,{children:"0 (do not discard bytes)"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Sync Pattern"}),(0,r.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,r.jsx)(t.td,{children:"No"}),(0,r.jsx)(t.td,{children:"nil (no sync pattern)"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Fill Fields"}),(0,r.jsx)(t.td,{children:"Whether to fill in the sync pattern on outgoing packets"}),(0,r.jsx)(t.td,{children:"No"}),(0,r.jsx)(t.td,{children:"false"})]})]})]}),"\n",(0,r.jsx)(t.h3,{id:"template-protocol",children:"Template Protocol"}),"\n",(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Deprecated"})}),"\n",(0,r.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 CmdResponseProtocol instead."}),"\n",(0,r.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,r.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,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Parameter"}),(0,r.jsx)(t.th,{children:"Description"}),(0,r.jsx)(t.th,{children:"Required"}),(0,r.jsx)(t.th,{children:"Default"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Write Termination Characters"}),(0,r.jsx)(t.td,{children:"The data to write after writing a command packet. Given as a hex string such as 0xABCD."}),(0,r.jsx)(t.td,{children:"Yes"}),(0,r.jsx)(t.td,{})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Read Termination Characters"}),(0,r.jsx)(t.td,{children:"The characters which delineate the end of a telemetry packet. Given as a hex string such as 0xABCD."}),(0,r.jsx)(t.td,{children:"Yes"}),(0,r.jsx)(t.td,{})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Ignore Lines"}),(0,r.jsx)(t.td,{children:"Number of response lines to ignore (completely drop)"}),(0,r.jsx)(t.td,{children:"No"}),(0,r.jsx)(t.td,{children:"0 lines"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Initial Read Delay"}),(0,r.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,r.jsx)(t.td,{children:"No"}),(0,r.jsx)(t.td,{children:"nil (no initial read)"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Response Lines"}),(0,r.jsx)(t.td,{children:"The number of lines that make up expected responses"}),(0,r.jsx)(t.td,{children:"No"}),(0,r.jsx)(t.td,{children:"1 line"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Strip Read Termination"}),(0,r.jsx)(t.td,{children:"Whether to remove the read termination characters before returning the telemetry packet"}),(0,r.jsx)(t.td,{children:"No"}),(0,r.jsx)(t.td,{children:"true"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Discard Leading Bytes"}),(0,r.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,r.jsx)(t.td,{children:"No"}),(0,r.jsx)(t.td,{children:"0 (do not discard bytes)"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Sync Pattern"}),(0,r.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,r.jsx)(t.td,{children:"No"}),(0,r.jsx)(t.td,{children:"nil (no sync pattern)"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Fill Fields"}),(0,r.jsx)(t.td,{children:"Whether to fill in the sync pattern on outgoing packets"}),(0,r.jsx)(t.td,{children:"No"}),(0,r.jsx)(t.td,{children:"false"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Response Timeout"}),(0,r.jsx)(t.td,{children:"Number of seconds to wait for a response before timing out"}),(0,r.jsx)(t.td,{children:"No"}),(0,r.jsx)(t.td,{children:"5.0"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Response Polling Period"}),(0,r.jsx)(t.td,{children:"Number of seconds to wait between polling for a response"}),(0,r.jsx)(t.td,{children:"No"}),(0,r.jsx)(t.td,{children:"0.02"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Raise Exceptions"}),(0,r.jsx)(t.td,{children:"Whether to raise exceptions when errors occur like timeouts or unexpected responses"}),(0,r.jsx)(t.td,{children:"No"}),(0,r.jsx)(t.td,{children:"false"})]})]})]}),"\n",(0,r.jsx)(t.h3,{id:"preidentified-protocol",children:"Preidentified Protocol"}),"\n",(0,r.jsx)(t.p,{children:"The Preidentified Protocol delineates packets using a custom COSMOS header. This Protocol is created to allow tools to connect and receive the entire packet stream. It can also be used to chain COSMOS instances together although that should rarely be needed with the new web native implementation."}),"\n",(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Parameter"}),(0,r.jsx)(t.th,{children:"Description"}),(0,r.jsx)(t.th,{children:"Required"}),(0,r.jsx)(t.th,{children:"Default"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Sync Pattern"}),(0,r.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,r.jsx)(t.td,{children:"No"}),(0,r.jsx)(t.td,{children:"nil (no sync pattern)"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Max Length"}),(0,r.jsx)(t.td,{children:"The maximum allowed value in the length field"}),(0,r.jsx)(t.td,{children:"No"}),(0,r.jsx)(t.td,{children:"nil (no maximum length)"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Mode"}),(0,r.jsx)(t.td,{children:"The Version of the preidentified protocol to support (2 or 4).3"}),(0,r.jsx)(t.td,{children:"No"}),(0,r.jsx)(t.td,{children:"4"})]})]})]}),"\n",(0,r.jsx)(t.h2,{id:"helper-protocols",children:"Helper Protocols"}),"\n",(0,r.jsx)(t.p,{children:"COSMOS provides the following helper protocols: CmdResponse, Crc and Ignore. These protocols provide helper functionality to Interfaces."}),"\n",(0,r.jsx)(t.h3,{id:"cmdresponse-protocol",children:"CmdResponse Protocol"}),"\n",(0,r.jsx)(t.p,{children:"The CmdResponse Protocol waits for a response for any commands with a defined response packet (TODO: More documentation and examples)."}),"\n",(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Parameter"}),(0,r.jsx)(t.th,{children:"Description"}),(0,r.jsx)(t.th,{children:"Required"}),(0,r.jsx)(t.th,{children:"Default"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Response Timeout"}),(0,r.jsx)(t.td,{children:"Number of seconds to wait before timing out when waiting for a response"}),(0,r.jsx)(t.td,{children:"No"}),(0,r.jsx)(t.td,{children:"5"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Response Polling Period"}),(0,r.jsx)(t.td,{children:"Number of seconds to wait between polling for a response"}),(0,r.jsx)(t.td,{children:"No"}),(0,r.jsx)(t.td,{children:"0.02"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Raise Exceptions"}),(0,r.jsx)(t.td,{children:"Whether to raise exceptions when errors occur in the protocol like unexpected responses or response timeouts"}),(0,r.jsx)(t.td,{children:"No"}),(0,r.jsx)(t.td,{children:"false"})]})]})]}),"\n",(0,r.jsx)(t.h3,{id:"crc-protocol",children:"CRC Protocol"}),"\n",(0,r.jsx)(t.p,{children:"The CRC protocol can add CRCs to outgoing commands and verify CRCs on incoming telemetry packets."}),"\n",(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Parameter"}),(0,r.jsx)(t.th,{children:"Description"}),(0,r.jsx)(t.th,{children:"Required"}),(0,r.jsx)(t.th,{children:"Default"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Write Item Name"}),(0,r.jsx)(t.td,{children:"Item to fill with calculated CRC value for outgoing packets (nil = don't fill)"}),(0,r.jsx)(t.td,{children:"No"}),(0,r.jsx)(t.td,{children:"nil"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Strip CRC"}),(0,r.jsx)(t.td,{children:"Whether to remove the CRC from incoming packets"}),(0,r.jsx)(t.td,{children:"No"}),(0,r.jsx)(t.td,{children:"false"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Bad Strategy"}),(0,r.jsx)(t.td,{children:"How to handle CRC errors on incoming packets. ERROR = Just log the error, DISCONNECT = Disconnect interface"}),(0,r.jsx)(t.td,{children:"No"}),(0,r.jsx)(t.td,{children:'"ERROR"'})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Bit Offset"}),(0,r.jsx)(t.td,{children:"Bit offset of the CRC in the data. Can be negative to indicate distance from end of packet"}),(0,r.jsx)(t.td,{children:"No"}),(0,r.jsx)(t.td,{children:"-32"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Bit Size"}),(0,r.jsx)(t.td,{children:"Bit size of the CRC - Must be 16, 32, or 64"}),(0,r.jsx)(t.td,{children:"No"}),(0,r.jsx)(t.td,{children:"32"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Endianness"}),(0,r.jsx)(t.td,{children:"Endianness of the CRC (BIG_ENDIAN/LITTLE_ENDIAN)"}),(0,r.jsx)(t.td,{children:"No"}),(0,r.jsx)(t.td,{children:'"BIG_ENDIAN"'})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Poly"}),(0,r.jsx)(t.td,{children:"Polynomial to use when calculating the CRC expressed as an integer"}),(0,r.jsx)(t.td,{children:"No"}),(0,r.jsx)(t.td,{children:"nil (use default polynomial - 16-bit=0x1021, 32-bit=0x04C11DB7, 64-bit=0x42F0E1EBA9EA3693)"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Seed"}),(0,r.jsx)(t.td,{children:"Seed value to start the calculation"}),(0,r.jsx)(t.td,{children:"No"}),(0,r.jsx)(t.td,{children:"nil (use default seed - 16-bit=0xFFFF, 32-bit=0xFFFFFFFF, 64-bit=0xFFFFFFFFFFFFFFFF)"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Xor"}),(0,r.jsx)(t.td,{children:"Whether to XOR the CRC result with 0xFFFF"}),(0,r.jsx)(t.td,{children:"No"}),(0,r.jsx)(t.td,{children:"nil (use default value - 16-bit=false, 32-bit=true, 64-bit=true)"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Reflect"}),(0,r.jsx)(t.td,{children:"Whether to bit reverse each byte of data before calculating the CRC"}),(0,r.jsx)(t.td,{children:"No"}),(0,r.jsx)(t.td,{children:"nil (use default value - 16-bit=false, 32-bit=true, 64-bit=true)"})]})]})]}),"\n",(0,r.jsx)(t.h3,{id:"ignore-packet-protocol",children:"Ignore Packet Protocol"}),"\n",(0,r.jsx)(t.p,{children:"The Ignore Packet protocol drops specified command packets sent by COSMOS or drops incoming telemetry packets."}),"\n",(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Parameter"}),(0,r.jsx)(t.th,{children:"Description"}),(0,r.jsx)(t.th,{children:"Required"}),(0,r.jsx)(t.th,{children:"Default"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Target Name"}),(0,r.jsx)(t.td,{children:"Target name of the packet to ignore"}),(0,r.jsx)(t.td,{children:"Yes"}),(0,r.jsx)(t.td,{children:"nil"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Packet Name"}),(0,r.jsx)(t.td,{children:"Packet name of the packet to ignore"}),(0,r.jsx)(t.td,{children:"Yes"}),(0,r.jsx)(t.td,{children:"nil"})]})]})]}),"\n",(0,r.jsx)(t.h2,{id:"custom-protocols",children:"Custom Protocols"}),"\n",(0,r.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 base 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,r.jsxs)(t.p,{children:["All custom Protocols should derive from the Protocol class found in the COSMOS gem at ",(0,r.jsx)(t.a,{href:"https://github.com/OpenC3/cosmos/blob/main/openc3/lib/openc3/interfaces/protocols/protocol.rb",children:"lib/openc3/interfaces/protocols/protocol.rb"}),". 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,r.jsx)(t.admonition,{title:"Protocol APIs",type:"info",children:(0,r.jsxs)(t.p,{children:["Protocols should not ",(0,r.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,r.jsx)(t.a,{href:"https://github.com/OpenC3/cosmos/blob/main/openc3/lib/openc3/system/system.rb",children:"System"}),", ",(0,r.jsx)(t.a,{href:"https://github.com/OpenC3/cosmos/blob/main/openc3/lib/openc3/packets/packet.rb",children:"Packet"}),", ",(0,r.jsx)(t.a,{href:"https://github.com/OpenC3/cosmos/blob/main/openc3/lib/openc3/utilities/bucket.rb",children:"Bucket"}),", ",(0,r.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,r.jsx)(t.a,{href:"https://github.com/OpenC3/cosmos/tree/main/openc3/lib/openc3/interfaces/protocols",children:"protocol"})," classes."]})}),"\n",(0,r.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,r.jsx)(t.p,{children:"Let's first discuss the read method."}),"\n",(0,r.jsx)(t.p,{children:(0,r.jsx)(t.img,{alt:"Interface Read Logic",src:n(367).A+"",width:"1063",height:"542"})}),"\n",(0,r.jsxs)(t.p,{children:["On EVERY call to read, an empty Ruby string \"\" is first passed down to each of the read Protocol's read_data() method BEFORE new raw data is attempted to be read using the Interface's 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 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 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 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 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 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,r.jsx)(t.p,{children:(0,r.jsx)(t.img,{alt:"Interface Write Logic",src:n(8129).A+"",width:"931",height:"944"})}),"\n",(0,r.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,r.jsxs)(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 of data 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,r.jsx)(t.h2,{id:"method-discussions",children:"Method discussions"}),"\n",(0,r.jsx)(t.h3,{id:"initialize",children:"initialize"}),"\n",(0,r.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,r.jsx)(t.p,{children:"Base class implementation:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.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,r.jsx)(t.p,{children:"As you can see, every Protocol maintains state on at least two items. @interface 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 read_data(data) method that is discussed later in this document."}),"\n",(0,r.jsx)(t.h3,{id:"reset",children:"reset"}),"\n",(0,r.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,r.jsx)(t.p,{children:"Base class implementation:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:"def reset\nend\n"})}),"\n",(0,r.jsx)(t.p,{children:"As you can see, the base class reset implementation doesn't do anything."}),"\n",(0,r.jsx)(t.h3,{id:"connect_reset",children:"connect_reset"}),"\n",(0,r.jsx)(t.p,{children:"The connect_reset method is used to reset internal Protocol state each time the Interface is connected."}),"\n",(0,r.jsx)(t.p,{children:"Base class implementation:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:"def connect_reset\n reset()\nend\n"})}),"\n",(0,r.jsx)(t.p,{children:"The base class connect_reset implementation just calls the reset method to ensure common reset logic is run."}),"\n",(0,r.jsx)(t.h3,{id:"disconnect_reset",children:"disconnect_reset"}),"\n",(0,r.jsx)(t.p,{children:"The disconnect_reset method is used to reset internal Protocol state each time the Interface is disconnected."}),"\n",(0,r.jsx)(t.p,{children:"Base class implementation:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:"def disconnect_reset\n reset()\nend\n"})}),"\n",(0,r.jsx)(t.p,{children:"The base class disconnect_reset implementation just calls the reset method to ensure common reset logic is run."}),"\n",(0,r.jsx)(t.h3,{id:"read_data",children:"read_data"}),"\n",(0,r.jsxs)(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 Ruby string of data, ",":STOP",", or ",":DISCONNECT",". If it returns a Ruby 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,r.jsx)(t.p,{children:"Base Class Implemenation:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.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,r.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 or if it nil and the Protocol is the last in the chain, then the base implementation will return ",":STOP"," data to indicate that it is time to call the Interface 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,r.jsx)(t.h3,{id:"read_packet",children:"read_packet"}),"\n",(0,r.jsxs)(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,r.jsx)(t.p,{children:"Base Class Implementation:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:"def read_packet(packet)\n return packet\nend\n"})}),"\n",(0,r.jsx)(t.p,{children:"The base class always just returns the packet given."}),"\n",(0,r.jsx)(t.h3,{id:"write_packet",children:"write_packet"}),"\n",(0,r.jsxs)(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,r.jsx)(t.p,{children:"Base Class Implementation:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:"def write_packet(packet)\n return packet\nend\n"})}),"\n",(0,r.jsx)(t.p,{children:"The base class always just returns the packet given."}),"\n",(0,r.jsx)(t.h3,{id:"write_data",children:"write_data"}),"\n",(0,r.jsxs)(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 Ruby String of data, ",":STOP",", or ",":DISCONNECT",". If it returns a Ruby 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,r.jsx)(t.p,{children:"Base Class Implementation:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:"def write_data(data)\n return data\nend\n"})}),"\n",(0,r.jsx)(t.p,{children:"The base class always just returns the data given."}),"\n",(0,r.jsx)(t.h3,{id:"post_write_interface",children:"post_write_interface"}),"\n",(0,r.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 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 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,r.jsx)(t.p,{children:"Base Class Implementation:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ruby",children:"def post_write_interface(packet, data)\n return packet, data\nend\n"})}),"\n",(0,r.jsx)(t.p,{children:"The base class always just returns the packet/data given."}),"\n",(0,r.jsx)(t.h2,{id:"examples",children:"Examples"}),"\n",(0,r.jsx)(t.p,{children:"Please see the included COSMOS protocol code for examples of the above methods in action."}),"\n",(0,r.jsxs)(t.p,{children:[(0,r.jsx)(t.a,{href:"https://github.com/OpenC3/cosmos/blob/main/openc3/lib/openc3/interfaces/protocols/protocol.rb",children:"lib/openc3/interfaces/protocols/protocol.rb"}),"\n",(0,r.jsx)(t.a,{href:"https://github.com/OpenC3/cosmos/blob/main/openc3/lib/openc3/interfaces/protocols/burst_protocol.rb",children:"lib/openc3/interfaces/protocols/burst_protocol.rb"}),"\n",(0,r.jsx)(t.a,{href:"https://github.com/OpenC3/cosmos/blob/main/openc3/lib/openc3/interfaces/protocols/fixed_protocol.rb",children:"lib/openc3/interfaces/protocols/fixed_protocol.rb"}),"\n",(0,r.jsx)(t.a,{href:"https://github.com/OpenC3/cosmos/blob/main/openc3/lib/openc3/interfaces/protocols/length_protocol.rb",children:"lib/openc3/interfaces/protocols/length_protocol.rb"}),"\n",(0,r.jsx)(t.a,{href:"https://github.com/OpenC3/cosmos/blob/main/openc3/lib/openc3/interfaces/protocols/terminated_protocol.rb",children:"lib/openc3/interfaces/protocols/terminated_protocol.rb"}),"\n",(0,r.jsx)(t.a,{href:"https://github.com/OpenC3/cosmos/blob/main/openc3/lib/openc3/interfaces/protocols/template_protocol.rb",children:"lib/openc3/interfaces/protocols/template_protocol.rb"}),"\n",(0,r.jsx)(t.a,{href:"https://github.com/OpenC3/cosmos/blob/main/openc3/lib/openc3/interfaces/protocols/crc_protocol.rb",children:"lib/openc3/interfaces/protocols/crc_protocol.rb"}),"\n",(0,r.jsx)(t.a,{href:"https://github.com/OpenC3/cosmos/blob/main/openc3/lib/openc3/interfaces/protocols/preidentified_protocol.rb",children:"lib/openc3/interfaces/protocols/preidentified_protocol.rb"})]})]})}function h(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(l,{...e})}):l(e)}},367:(e,t,n)=>{n.d(t,{A:()=>r});const r=n.p+"assets/images/interface_read_logic-0deef27c1d2fec9de2a3720a3c9ecedb21a00dca7aabd13da0b8815c037e4c26.png"},8129:(e,t,n)=>{n.d(t,{A:()=>r});const r=n.p+"assets/images/interface_write_logic-3360afe1b4af20b10dafba848a21e09baccaacc06e2ec8b6c132ac7a3c99e994.png"},1184:(e,t,n)=>{n.d(t,{R:()=>i});var r=n(4041);const s={},a=r.createContext(s);function i(e){const t=r.useContext(a);return r.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([[3307],{6568:(e,t,i)=>{i.r(t),i.d(t,{assets:()=>a,contentTitle:()=>d,default:()=>h,frontMatter:()=>s,metadata:()=>l,toc:()=>o});var n=i(1085),r=i(1184);const s={sidebar_position:3,title:"Targets"},d="target.txt Keywords",l={id:"configuration/target",title:"Targets",description:"Targets are the external embedded systems that COSMOS connects to. Targets are defined by the top level TARGET keyword in the plugin.txt file. Each target is self contained in a target directory named after the target. In the root of the target directory there is a configuration file named target.txt which configures the individual target.",source:"@site/docs/configuration/target.md",sourceDirName:"configuration",slug:"/configuration/target",permalink:"/tools/staticdocs/docs/configuration/target",draft:!1,unlisted:!1,editUrl:"https://github.com/OpenC3/cosmos/tree/main/docs.openc3.com/docs/configuration/target.md",tags:[],version:"current",sidebarPosition:3,frontMatter:{sidebar_position:3,title:"Targets"},sidebar:"defaultSidebar",previous:{title:"Plugins",permalink:"/tools/staticdocs/docs/configuration/plugins"},next:{title:"Commands",permalink:"/tools/staticdocs/docs/configuration/command"}},a={},o=[{value:"LANGUAGE",id:"language",level:2},{value:"REQUIRE",id:"require",level:2},{value:"IGNORE_PARAMETER",id:"ignore_parameter",level:2},{value:"IGNORE_ITEM",id:"ignore_item",level:2},{value:"COMMANDS",id:"commands",level:2},{value:"TELEMETRY",id:"telemetry",level:2},{value:"CMD_UNIQUE_ID_MODE",id:"cmd_unique_id_mode",level:2},{value:"TLM_UNIQUE_ID_MODE",id:"tlm_unique_id_mode",level:2}];function c(e){const t={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,r.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(t.p,{children:["Targets are the external embedded systems that COSMOS connects to. Targets are defined by the top level ",(0,n.jsx)(t.a,{href:"/tools/staticdocs/docs/configuration/plugins#target-1",children:"TARGET"})," keyword in the plugin.txt file. Each target is self contained in a target directory named after the target. In the root of the target directory there is a configuration file named target.txt which configures the individual target."]}),"\n",(0,n.jsx)(t.h1,{id:"targettxt-keywords",children:"target.txt Keywords"}),"\n",(0,n.jsx)(t.h2,{id:"language",children:"LANGUAGE"}),"\n",(0,n.jsxs)(t.p,{children:[(0,n.jsx)("div",{class:"right",children:"(Since 5.11.1)"}),(0,n.jsx)(t.strong,{children:"Programming language of the target interfaces and microservices"})]}),"\n",(0,n.jsx)(t.p,{children:"The target language must be either Ruby or Python. The language determines how the target's interfaces and microservices are run. Note that both Ruby and Python still use ERB to perform templating."}),"\n",(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Parameter"}),(0,n.jsx)(t.th,{children:"Description"}),(0,n.jsx)(t.th,{children:"Required"})]})}),(0,n.jsx)(t.tbody,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsxs)(t.td,{children:["Ruby or Python",(0,n.jsx)("br",{}),(0,n.jsx)("br",{}),"Valid Values: ",(0,n.jsx)("span",{class:"values",children:"ruby, python"})]}),(0,n.jsx)(t.td,{children:"True"})]})})]}),"\n",(0,n.jsx)(t.p,{children:"Example Usage:"}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-ruby",children:"LANGUAGE python\n"})}),"\n",(0,n.jsx)(t.h2,{id:"require",children:"REQUIRE"}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"Requires a Ruby file"})}),"\n",(0,n.jsx)(t.p,{children:"List the Ruby files required to explicitly declare dependencies. This is now completely optional."}),"\n",(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Parameter"}),(0,n.jsx)(t.th,{children:"Description"}),(0,n.jsx)(t.th,{children:"Required"})]})}),(0,n.jsx)(t.tbody,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Filename"}),(0,n.jsx)(t.td,{children:'Filename to require. For files in the target\'s lib directory simply supply the filename, e.g. "REQUIRE my_file". Files in the base OpenC3 lib directory also should just list the filename. If a file is in a folder under the lib directory then you must specify the folder name, e.g. "REQUIRE folder/my_file". Note the ".rb" extension is optional when specifying the filename.'}),(0,n.jsx)(t.td,{children:"True"})]})})]}),"\n",(0,n.jsx)(t.p,{children:"Example Usage:"}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-ruby",children:"REQUIRE limits_response.rb\n"})}),"\n",(0,n.jsx)(t.h2,{id:"ignore_parameter",children:"IGNORE_PARAMETER"}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"Ignore the given command parameter"})}),"\n",(0,n.jsx)(t.p,{children:"Hint to other OpenC3 tools to hide or ignore this command parameter when processing the command. For example, Command Sender and Command Sequence will not display the parameter (by default) when showing the command and Script Runner code completion will not display the parameter."}),"\n",(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Parameter"}),(0,n.jsx)(t.th,{children:"Description"}),(0,n.jsx)(t.th,{children:"Required"})]})}),(0,n.jsx)(t.tbody,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Parameter Name"}),(0,n.jsx)(t.td,{children:"The name of a command parameter. Note that this parameter will be ignored in ALL the commands it appears in."}),(0,n.jsx)(t.td,{children:"True"})]})})]}),"\n",(0,n.jsx)(t.p,{children:"Example Usage:"}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-ruby",children:"IGNORE_PARAMETER CCSDS_VERSION\n"})}),"\n",(0,n.jsx)(t.h2,{id:"ignore_item",children:"IGNORE_ITEM"}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"Ignore the given telemetry item"})}),"\n",(0,n.jsx)(t.p,{children:"Hint to other OpenC3 tools to hide or ignore this telemetry item when processing the telemetry. For example, Packet Viewer will not display the item (by default) when showing the packet."}),"\n",(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Parameter"}),(0,n.jsx)(t.th,{children:"Description"}),(0,n.jsx)(t.th,{children:"Required"})]})}),(0,n.jsx)(t.tbody,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Item name"}),(0,n.jsx)(t.td,{children:"The name of a telemetry item. Note that this item will be ignored in ALL the telemetry it appears in."}),(0,n.jsx)(t.td,{children:"True"})]})})]}),"\n",(0,n.jsx)(t.p,{children:"Example Usage:"}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-ruby",children:"IGNORE_ITEM CCSDS_VERSION\n"})}),"\n",(0,n.jsx)(t.h2,{id:"commands",children:"COMMANDS"}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"Process the given command definition file"})}),"\n",(0,n.jsx)(t.p,{children:"This keyword is used to explicitly add the command definition file to the list of command and telemetry files to process."}),"\n",(0,n.jsx)(t.admonition,{type:"warning",children:(0,n.jsx)(t.p,{children:"Usage of this keyword overrides automatic command and telemetry file discovery. If this keyword is used, you must also use the TELEMETRY keyword to specify the telemetry files to process."})}),"\n",(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Parameter"}),(0,n.jsx)(t.th,{children:"Description"}),(0,n.jsx)(t.th,{children:"Required"})]})}),(0,n.jsx)(t.tbody,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Filename"}),(0,n.jsx)(t.td,{children:'Name of a command definition file in the target\'s cmd_tlm directory, e.g. "cmd.txt".'}),(0,n.jsx)(t.td,{children:"True"})]})})]}),"\n",(0,n.jsx)(t.p,{children:"Example Usage:"}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-ruby",children:"COMMANDS inst_cmds_v2.txt\nTELEMETRY inst_tlm_v2.txt\n"})}),"\n",(0,n.jsx)(t.h2,{id:"telemetry",children:"TELEMETRY"}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"Process the given telemetry definition file"})}),"\n",(0,n.jsx)(t.p,{children:"This keyword is used to explicitly add the telemetry definition file to the list of command and telemetry files to process."}),"\n",(0,n.jsx)(t.admonition,{type:"warning",children:(0,n.jsx)(t.p,{children:"Usage of this keyword overrides automatic command and telemetry file discovery. If this keyword is used, you must also use the COMMAND keyword to specify the command files to process."})}),"\n",(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Parameter"}),(0,n.jsx)(t.th,{children:"Description"}),(0,n.jsx)(t.th,{children:"Required"})]})}),(0,n.jsx)(t.tbody,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Filename"}),(0,n.jsx)(t.td,{children:'Name of a telemetry definition file in the target\'s cmd_tlm directory, e.g. "tlm.txt".'}),(0,n.jsx)(t.td,{children:"True"})]})})]}),"\n",(0,n.jsx)(t.p,{children:"Example Usage:"}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-ruby",children:"COMMANDS inst_cmds_v2.txt\nTELEMETRY inst_tlm_v2.txt\n"})}),"\n",(0,n.jsx)(t.h2,{id:"cmd_unique_id_mode",children:"CMD_UNIQUE_ID_MODE"}),"\n",(0,n.jsxs)(t.p,{children:[(0,n.jsx)("div",{class:"right",children:"(Since 4.4.0)"}),(0,n.jsx)(t.strong,{children:"Command packet identifiers don't all share the same bit offset, size, and type"})]}),"\n",(0,n.jsx)(t.p,{children:"Ideally all commands for a target are identified using the exact same bit offset, size, and type field in each command. If ANY command identifiers differ then this flag must be set to force a brute force identification method."}),"\n",(0,n.jsx)(t.admonition,{type:"warning",children:(0,n.jsx)(t.p,{children:"Using this mode significantly slows packet identification"})}),"\n",(0,n.jsx)(t.h2,{id:"tlm_unique_id_mode",children:"TLM_UNIQUE_ID_MODE"}),"\n",(0,n.jsxs)(t.p,{children:[(0,n.jsx)("div",{class:"right",children:"(Since 4.4.0)"}),(0,n.jsx)(t.strong,{children:"Telemetry packets identifiers don't all share the same bit offset, size, and type"})]}),"\n",(0,n.jsx)(t.p,{children:"Ideally all telemetry for a target are identified using the exact same bit offset, size, and type field in each packet. If ANY telemetry identifiers differ then this flag must be set to force a brute force identification method."}),"\n",(0,n.jsx)(t.admonition,{type:"warning",children:(0,n.jsx)(t.p,{children:"Using this mode significantly slows packet identification"})})]})}function h(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(c,{...e})}):c(e)}},1184:(e,t,i)=>{i.d(t,{R:()=>d});var n=i(4041);const r={},s=n.createContext(r);function d(e){const t=n.useContext(s);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}}}]);
1
+ "use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([[3307],{5918:(e,t,i)=>{i.r(t),i.d(t,{assets:()=>a,contentTitle:()=>d,default:()=>h,frontMatter:()=>s,metadata:()=>l,toc:()=>o});var n=i(1085),r=i(1184);const s={sidebar_position:3,title:"Targets"},d="target.txt Keywords",l={id:"configuration/target",title:"Targets",description:"Targets are the external embedded systems that COSMOS connects to. Targets are defined by the top level TARGET keyword in the plugin.txt file. Each target is self contained in a target directory named after the target. In the root of the target directory there is a configuration file named target.txt which configures the individual target.",source:"@site/docs/configuration/target.md",sourceDirName:"configuration",slug:"/configuration/target",permalink:"/tools/staticdocs/docs/configuration/target",draft:!1,unlisted:!1,editUrl:"https://github.com/OpenC3/cosmos/tree/main/docs.openc3.com/docs/configuration/target.md",tags:[],version:"current",sidebarPosition:3,frontMatter:{sidebar_position:3,title:"Targets"},sidebar:"defaultSidebar",previous:{title:"Plugins",permalink:"/tools/staticdocs/docs/configuration/plugins"},next:{title:"Commands",permalink:"/tools/staticdocs/docs/configuration/command"}},a={},o=[{value:"LANGUAGE",id:"language",level:2},{value:"REQUIRE",id:"require",level:2},{value:"IGNORE_PARAMETER",id:"ignore_parameter",level:2},{value:"IGNORE_ITEM",id:"ignore_item",level:2},{value:"COMMANDS",id:"commands",level:2},{value:"TELEMETRY",id:"telemetry",level:2},{value:"CMD_UNIQUE_ID_MODE",id:"cmd_unique_id_mode",level:2},{value:"TLM_UNIQUE_ID_MODE",id:"tlm_unique_id_mode",level:2}];function c(e){const t={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,r.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(t.p,{children:["Targets are the external embedded systems that COSMOS connects to. Targets are defined by the top level ",(0,n.jsx)(t.a,{href:"/tools/staticdocs/docs/configuration/plugins#target-1",children:"TARGET"})," keyword in the plugin.txt file. Each target is self contained in a target directory named after the target. In the root of the target directory there is a configuration file named target.txt which configures the individual target."]}),"\n",(0,n.jsx)(t.h1,{id:"targettxt-keywords",children:"target.txt Keywords"}),"\n",(0,n.jsx)(t.h2,{id:"language",children:"LANGUAGE"}),"\n",(0,n.jsxs)(t.p,{children:[(0,n.jsx)("div",{class:"right",children:"(Since 5.11.1)"}),(0,n.jsx)(t.strong,{children:"Programming language of the target interfaces and microservices"})]}),"\n",(0,n.jsx)(t.p,{children:"The target language must be either Ruby or Python. The language determines how the target's interfaces and microservices are run. Note that both Ruby and Python still use ERB to perform templating."}),"\n",(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Parameter"}),(0,n.jsx)(t.th,{children:"Description"}),(0,n.jsx)(t.th,{children:"Required"})]})}),(0,n.jsx)(t.tbody,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{}),(0,n.jsxs)(t.td,{children:["Ruby or Python",(0,n.jsx)("br",{}),(0,n.jsx)("br",{}),"Valid Values: ",(0,n.jsx)("span",{class:"values",children:"ruby, python"})]}),(0,n.jsx)(t.td,{children:"True"})]})})]}),"\n",(0,n.jsx)(t.p,{children:"Example Usage:"}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-ruby",children:"LANGUAGE python\n"})}),"\n",(0,n.jsx)(t.h2,{id:"require",children:"REQUIRE"}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"Requires a Ruby file"})}),"\n",(0,n.jsx)(t.p,{children:"List the Ruby files required to explicitly declare dependencies. This is now completely optional."}),"\n",(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Parameter"}),(0,n.jsx)(t.th,{children:"Description"}),(0,n.jsx)(t.th,{children:"Required"})]})}),(0,n.jsx)(t.tbody,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Filename"}),(0,n.jsx)(t.td,{children:'Filename to require. For files in the target\'s lib directory simply supply the filename, e.g. "REQUIRE my_file". Files in the base OpenC3 lib directory also should just list the filename. If a file is in a folder under the lib directory then you must specify the folder name, e.g. "REQUIRE folder/my_file". Note the ".rb" extension is optional when specifying the filename.'}),(0,n.jsx)(t.td,{children:"True"})]})})]}),"\n",(0,n.jsx)(t.p,{children:"Example Usage:"}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-ruby",children:"REQUIRE limits_response.rb\n"})}),"\n",(0,n.jsx)(t.h2,{id:"ignore_parameter",children:"IGNORE_PARAMETER"}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"Ignore the given command parameter"})}),"\n",(0,n.jsx)(t.p,{children:"Hint to other OpenC3 tools to hide or ignore this command parameter when processing the command. For example, Command Sender and Command Sequence will not display the parameter (by default) when showing the command and Script Runner code completion will not display the parameter."}),"\n",(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Parameter"}),(0,n.jsx)(t.th,{children:"Description"}),(0,n.jsx)(t.th,{children:"Required"})]})}),(0,n.jsx)(t.tbody,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Parameter Name"}),(0,n.jsx)(t.td,{children:"The name of a command parameter. Note that this parameter will be ignored in ALL the commands it appears in."}),(0,n.jsx)(t.td,{children:"True"})]})})]}),"\n",(0,n.jsx)(t.p,{children:"Example Usage:"}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-ruby",children:"IGNORE_PARAMETER CCSDS_VERSION\n"})}),"\n",(0,n.jsx)(t.h2,{id:"ignore_item",children:"IGNORE_ITEM"}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"Ignore the given telemetry item"})}),"\n",(0,n.jsx)(t.p,{children:"Hint to other OpenC3 tools to hide or ignore this telemetry item when processing the telemetry. For example, Packet Viewer will not display the item (by default) when showing the packet."}),"\n",(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Parameter"}),(0,n.jsx)(t.th,{children:"Description"}),(0,n.jsx)(t.th,{children:"Required"})]})}),(0,n.jsx)(t.tbody,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Item name"}),(0,n.jsx)(t.td,{children:"The name of a telemetry item. Note that this item will be ignored in ALL the telemetry it appears in."}),(0,n.jsx)(t.td,{children:"True"})]})})]}),"\n",(0,n.jsx)(t.p,{children:"Example Usage:"}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-ruby",children:"IGNORE_ITEM CCSDS_VERSION\n"})}),"\n",(0,n.jsx)(t.h2,{id:"commands",children:"COMMANDS"}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"Process the given command definition file"})}),"\n",(0,n.jsx)(t.p,{children:"This keyword is used to explicitly add the command definition file to the list of command and telemetry files to process."}),"\n",(0,n.jsx)(t.admonition,{type:"warning",children:(0,n.jsx)(t.p,{children:"Usage of this keyword overrides automatic command and telemetry file discovery. If this keyword is used, you must also use the TELEMETRY keyword to specify the telemetry files to process."})}),"\n",(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Parameter"}),(0,n.jsx)(t.th,{children:"Description"}),(0,n.jsx)(t.th,{children:"Required"})]})}),(0,n.jsx)(t.tbody,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Filename"}),(0,n.jsx)(t.td,{children:'Name of a command definition file in the target\'s cmd_tlm directory, e.g. "cmd.txt".'}),(0,n.jsx)(t.td,{children:"True"})]})})]}),"\n",(0,n.jsx)(t.p,{children:"Example Usage:"}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-ruby",children:"COMMANDS inst_cmds_v2.txt\nTELEMETRY inst_tlm_v2.txt\n"})}),"\n",(0,n.jsx)(t.h2,{id:"telemetry",children:"TELEMETRY"}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"Process the given telemetry definition file"})}),"\n",(0,n.jsx)(t.p,{children:"This keyword is used to explicitly add the telemetry definition file to the list of command and telemetry files to process."}),"\n",(0,n.jsx)(t.admonition,{type:"warning",children:(0,n.jsx)(t.p,{children:"Usage of this keyword overrides automatic command and telemetry file discovery. If this keyword is used, you must also use the COMMAND keyword to specify the command files to process."})}),"\n",(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Parameter"}),(0,n.jsx)(t.th,{children:"Description"}),(0,n.jsx)(t.th,{children:"Required"})]})}),(0,n.jsx)(t.tbody,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Filename"}),(0,n.jsx)(t.td,{children:'Name of a telemetry definition file in the target\'s cmd_tlm directory, e.g. "tlm.txt".'}),(0,n.jsx)(t.td,{children:"True"})]})})]}),"\n",(0,n.jsx)(t.p,{children:"Example Usage:"}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-ruby",children:"COMMANDS inst_cmds_v2.txt\nTELEMETRY inst_tlm_v2.txt\n"})}),"\n",(0,n.jsx)(t.h2,{id:"cmd_unique_id_mode",children:"CMD_UNIQUE_ID_MODE"}),"\n",(0,n.jsxs)(t.p,{children:[(0,n.jsx)("div",{class:"right",children:"(Since 4.4.0)"}),(0,n.jsx)(t.strong,{children:"Command packet identifiers don't all share the same bit offset, size, and type"})]}),"\n",(0,n.jsx)(t.p,{children:"Ideally all commands for a target are identified using the exact same bit offset, size, and type field in each command. If ANY command identifiers differ then this flag must be set to force a brute force identification method."}),"\n",(0,n.jsx)(t.admonition,{type:"warning",children:(0,n.jsx)(t.p,{children:"Using this mode significantly slows packet identification"})}),"\n",(0,n.jsx)(t.h2,{id:"tlm_unique_id_mode",children:"TLM_UNIQUE_ID_MODE"}),"\n",(0,n.jsxs)(t.p,{children:[(0,n.jsx)("div",{class:"right",children:"(Since 4.4.0)"}),(0,n.jsx)(t.strong,{children:"Telemetry packets identifiers don't all share the same bit offset, size, and type"})]}),"\n",(0,n.jsx)(t.p,{children:"Ideally all telemetry for a target are identified using the exact same bit offset, size, and type field in each packet. If ANY telemetry identifiers differ then this flag must be set to force a brute force identification method."}),"\n",(0,n.jsx)(t.admonition,{type:"warning",children:(0,n.jsx)(t.p,{children:"Using this mode significantly slows packet identification"})})]})}function h(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(c,{...e})}):c(e)}},1184:(e,t,i)=>{i.d(t,{R:()=>d});var n=i(4041);const r={},s=n.createContext(r);function d(e){const t=n.useContext(s);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([[313],{9786:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>d,contentTitle:()=>o,default:()=>u,frontMatter:()=>s,metadata:()=>a,toc:()=>c});var t=i(1085),r=i(1184);const s={title:"Bridges"},o=void 0,a={id:"guides/bridges",title:"Bridges",description:"COSMOS Bridges provide an easy solution for getting data from devices that don't speak Ethernet into COSMOS.",source:"@site/docs/guides/bridges.md",sourceDirName:"guides",slug:"/guides/bridges",permalink:"/tools/staticdocs/docs/guides/bridges",draft:!1,unlisted:!1,editUrl:"https://github.com/OpenC3/cosmos/tree/main/docs.openc3.com/docs/guides/bridges.md",tags:[],version:"current",frontMatter:{title:"Bridges"},sidebar:"defaultSidebar",previous:{title:"Guides",permalink:"/tools/staticdocs/docs/guides"},next:{title:"COSMOS and NASA cFS",permalink:"/tools/staticdocs/docs/guides/cfs"}},d={},c=[{value:"Bridges are Generally Just an Interface and Router",id:"bridges-are-generally-just-an-interface-and-router",level:2},{value:"Host Requirements for Running Bridges",id:"host-requirements-for-running-bridges",level:2},{value:"Bridge Configuration: bridge.txt",id:"bridge-configuration-bridgetxt",level:2},{value:"Bridge Commands: openc3cli",id:"bridge-commands-openc3cli",level:2},{value:"Example Bridge Gems",id:"example-bridge-gems",level:2},{value:"Note on Serial Ports",id:"note-on-serial-ports",level:2}];function l(e){const n={a:"a",admonition:"admonition",code:"code",h2:"h2",li:"li",p:"p",pre:"pre",ul:"ul",...(0,r.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.p,{children:"COSMOS Bridges provide an easy solution for getting data from devices that don't speak Ethernet into COSMOS.\nSerial ports are the most common, but other devices such as USB, PCI cards, and Bluetooth devices can also be\nsupported by using bridges to convert from a host computer accessible device, into an Ethernet byte stream that\nCOSMOS can process from inside of containers."}),"\n",(0,t.jsx)(n.admonition,{title:"Bridges are Meant to be Dumb",type:"warning",children:(0,t.jsx)(n.p,{children:"The purpose of bridges is to get bytes into COSMOS. Processing should be done in COSMOS itself, including details such as\npacket delineation."})}),"\n",(0,t.jsx)(n.h2,{id:"bridges-are-generally-just-an-interface-and-router",children:"Bridges are Generally Just an Interface and Router"}),"\n",(0,t.jsx)(n.p,{children:"Bridges are generally made up of a COSMOS Interface class that pull data from a host connected device, and a Router that forwards that data to\nCOSMOS over TCP/IP. In most cases, data can be safely sent to COSMOS using the BURST protocol, and let the COSMOS side use the correct packet delineation\nprotocol like LENGTH."}),"\n",(0,t.jsx)(n.h2,{id:"host-requirements-for-running-bridges",children:"Host Requirements for Running Bridges"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Requires a host Ruby installation (Ruby 3)"}),"\n",(0,t.jsxs)(n.li,{children:["Install the OpenC3 gem","\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"gem install openc3"}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["Make sure the Ruby gem executable path is in your PATH environment variable","\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["You can find this path by running ",(0,t.jsx)(n.code,{children:"gem environment"})," and looking for EXECUTABLE DIRECTORY"]}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["If successful, you should be able to run ",(0,t.jsx)(n.code,{children:"openc3cli"})," from a terminal"]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"bridge-configuration-bridgetxt",children:"Bridge Configuration: bridge.txt"}),"\n",(0,t.jsx)(n.p,{children:"Bridges are run using an configuration file named bridge.txt. This file is a subset of the plugin.txt configuration syntax supporting VARIABLE, INTERFACE, ROUTER, and associated modifier keywords. However, BRIDGES HAVE NO KNOWLEDGE OF TARGETS. So instead of MAP_TARGETS, the INTERFACE is associated with the ROUTER using the ROUTE keyword."}),"\n",(0,t.jsxs)(n.p,{children:["The following is the default bridge.txt that is generated by running ",(0,t.jsx)(n.code,{children:"openc3cli bridgesetup"})]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-ruby",children:"# Write serial port name\nVARIABLE write_port_name COM1\n\n# Read serial port name\nVARIABLE read_port_name COM1\n\n# Baud Rate\nVARIABLE baud_rate 115200\n\n# Parity - NONE, ODD, or EVEN\nVARIABLE parity NONE\n\n# Stop bits - 0, 1, or 2\nVARIABLE stop_bits 1\n\n# Write Timeout\nVARIABLE write_timeout 10.0\n\n# Read Timeout\nVARIABLE read_timeout nil\n\n# Flow Control - NONE, or RTSCTS\nVARIABLE flow_control NONE\n\n# Data bits per word - Typically 8\nVARIABLE data_bits 8\n\n# Port to listen for connections from COSMOS - Plugin must match\nVARIABLE router_port 2950\n\n# Port to listen on for connections from COSMOS. Defaults to localhost for security. Will need to be opened\n# if COSMOS is on another machine.\nVARIABLE router_listen_address 127.0.0.1\n\nINTERFACE SERIAL_INT serial_interface.rb <%= write_port_name %> <%= read_port_name %> <%= baud_rate %> <%= parity %> <%= stop_bits %> <%= write_timeout %> <%= read_timeout %>\n OPTION FLOW_CONTROL <%= flow_control %>\n OPTION DATA_BITS <%= data_bits %>\n\nROUTER SERIAL_ROUTER tcpip_server_interface.rb <%= router_port %> <%= router_port %> 10.0 nil BURST\n ROUTE SERIAL_INT\n OPTION LISTEN_ADDRESS <%= router_listen_address %>\n"})}),"\n",(0,t.jsx)(n.p,{children:"VARIABLE provides default values to variables that can be changed when the bridge is started. This example shows an INTERFACE that is configured to use the serial_interface.rb class. It also includes a standard ROUTER using tcpip_server_interface.rb that COSMOS can connect to and get the data from the serial port. The LISTEN_ADDRESS is set to 127.0.0.1 in this example to prevent access from outside of the host system. Docker running on the same machine can access\nthis server using the host.docker.internal hostname and the configured port (2950 in this example)."}),"\n",(0,t.jsx)(n.h2,{id:"bridge-commands-openc3cli",children:"Bridge Commands: openc3cli"}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.code,{children:"openc3cli bridgesetup"})}),"\n",(0,t.jsx)(n.p,{children:"Generates a bridge.txt example file"}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.code,{children:"openc3cli bridge [filename] [variable1=value1] [variable2=value2]"})}),"\n",(0,t.jsx)(n.p,{children:"Runs a bridge from a given configuration file. Defaults to bridge.txt in the current directory. Variables can also be passed into to override VARIABLE defaults."}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.code,{children:"openc3cli bridgegem [gem_name] [variable1=value1] [variable2=value2]"})}),"\n",(0,t.jsx)(n.p,{children:"Runs a bridge using the bridge.txt provided in a bridge gem. Variables can also be passed into to override VARIABLE defaults."}),"\n",(0,t.jsx)(n.h2,{id:"example-bridge-gems",children:"Example Bridge Gems"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["Serial Port: ",(0,t.jsx)(n.a,{href:"https://github.com/OpenC3/openc3-cosmos-bridge-serial",children:"openc3-cosmos-bridge-serial"})]}),"\n",(0,t.jsxs)(n.li,{children:["Host: ",(0,t.jsx)(n.a,{href:"https://github.com/OpenC3/openc3-cosmos-bridge-host",children:"openc3-cosmos-bridge-host"})]}),"\n",(0,t.jsxs)(n.li,{children:["HIDAPI: ",(0,t.jsx)(n.a,{href:"https://github.com/OpenC3/openc3-cosmos-bridge-hidapi",children:"openc3-cosmos-bridge-hidapi"})]}),"\n",(0,t.jsxs)(n.li,{children:["PS5 Dual Sense Controller: ",(0,t.jsx)(n.a,{href:"https://github.com/OpenC3/openc3-cosmos-bridge-dualsense",children:"openc3-cosmos-bridge-dualsense"})]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"note-on-serial-ports",children:"Note on Serial Ports"}),"\n",(0,t.jsx)(n.p,{children:"Serial ports can be used directly without bridges on Linux Docker installations."}),"\n",(0,t.jsx)(n.p,{children:"Add the following to the operator service in compose.yaml:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:' devices:\n - "/dev/ttyUSB0:/dev/ttyUSB0"\n'})}),"\n",(0,t.jsx)(n.p,{children:"Make sure the serial device has permissions for the user running Docker to access:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:"sudo chmod 666 /dev/ttyUSB0\n"})})]})}function u(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(l,{...e})}):l(e)}},1184:(e,n,i)=>{i.d(n,{R:()=>o});var t=i(4041);const r={},s=t.createContext(r);function o(e){const n=t.useContext(s);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}}}]);
1
+ "use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([[313],{8168:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>d,contentTitle:()=>o,default:()=>u,frontMatter:()=>s,metadata:()=>a,toc:()=>c});var t=i(1085),r=i(1184);const s={title:"Bridges"},o=void 0,a={id:"guides/bridges",title:"Bridges",description:"COSMOS Bridges provide an easy solution for getting data from devices that don't speak Ethernet into COSMOS.",source:"@site/docs/guides/bridges.md",sourceDirName:"guides",slug:"/guides/bridges",permalink:"/tools/staticdocs/docs/guides/bridges",draft:!1,unlisted:!1,editUrl:"https://github.com/OpenC3/cosmos/tree/main/docs.openc3.com/docs/guides/bridges.md",tags:[],version:"current",frontMatter:{title:"Bridges"},sidebar:"defaultSidebar",previous:{title:"Guides",permalink:"/tools/staticdocs/docs/guides"},next:{title:"COSMOS and NASA cFS",permalink:"/tools/staticdocs/docs/guides/cfs"}},d={},c=[{value:"Bridges are Generally Just an Interface and Router",id:"bridges-are-generally-just-an-interface-and-router",level:2},{value:"Host Requirements for Running Bridges",id:"host-requirements-for-running-bridges",level:2},{value:"Bridge Configuration: bridge.txt",id:"bridge-configuration-bridgetxt",level:2},{value:"Bridge Commands: openc3cli",id:"bridge-commands-openc3cli",level:2},{value:"Example Bridge Gems",id:"example-bridge-gems",level:2},{value:"Note on Serial Ports",id:"note-on-serial-ports",level:2}];function l(e){const n={a:"a",admonition:"admonition",code:"code",h2:"h2",li:"li",p:"p",pre:"pre",ul:"ul",...(0,r.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.p,{children:"COSMOS Bridges provide an easy solution for getting data from devices that don't speak Ethernet into COSMOS.\nSerial ports are the most common, but other devices such as USB, PCI cards, and Bluetooth devices can also be\nsupported by using bridges to convert from a host computer accessible device, into an Ethernet byte stream that\nCOSMOS can process from inside of containers."}),"\n",(0,t.jsx)(n.admonition,{title:"Bridges are Meant to be Dumb",type:"warning",children:(0,t.jsx)(n.p,{children:"The purpose of bridges is to get bytes into COSMOS. Processing should be done in COSMOS itself, including details such as\npacket delineation."})}),"\n",(0,t.jsx)(n.h2,{id:"bridges-are-generally-just-an-interface-and-router",children:"Bridges are Generally Just an Interface and Router"}),"\n",(0,t.jsx)(n.p,{children:"Bridges are generally made up of a COSMOS Interface class that pull data from a host connected device, and a Router that forwards that data to\nCOSMOS over TCP/IP. In most cases, data can be safely sent to COSMOS using the BURST protocol, and let the COSMOS side use the correct packet delineation\nprotocol like LENGTH."}),"\n",(0,t.jsx)(n.h2,{id:"host-requirements-for-running-bridges",children:"Host Requirements for Running Bridges"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Requires a host Ruby installation (Ruby 3)"}),"\n",(0,t.jsxs)(n.li,{children:["Install the OpenC3 gem","\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"gem install openc3"}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["Make sure the Ruby gem executable path is in your PATH environment variable","\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["You can find this path by running ",(0,t.jsx)(n.code,{children:"gem environment"})," and looking for EXECUTABLE DIRECTORY"]}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["If successful, you should be able to run ",(0,t.jsx)(n.code,{children:"openc3cli"})," from a terminal"]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"bridge-configuration-bridgetxt",children:"Bridge Configuration: bridge.txt"}),"\n",(0,t.jsx)(n.p,{children:"Bridges are run using an configuration file named bridge.txt. This file is a subset of the plugin.txt configuration syntax supporting VARIABLE, INTERFACE, ROUTER, and associated modifier keywords. However, BRIDGES HAVE NO KNOWLEDGE OF TARGETS. So instead of MAP_TARGETS, the INTERFACE is associated with the ROUTER using the ROUTE keyword."}),"\n",(0,t.jsxs)(n.p,{children:["The following is the default bridge.txt that is generated by running ",(0,t.jsx)(n.code,{children:"openc3cli bridgesetup"})]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-ruby",children:"# Write serial port name\nVARIABLE write_port_name COM1\n\n# Read serial port name\nVARIABLE read_port_name COM1\n\n# Baud Rate\nVARIABLE baud_rate 115200\n\n# Parity - NONE, ODD, or EVEN\nVARIABLE parity NONE\n\n# Stop bits - 0, 1, or 2\nVARIABLE stop_bits 1\n\n# Write Timeout\nVARIABLE write_timeout 10.0\n\n# Read Timeout\nVARIABLE read_timeout nil\n\n# Flow Control - NONE, or RTSCTS\nVARIABLE flow_control NONE\n\n# Data bits per word - Typically 8\nVARIABLE data_bits 8\n\n# Port to listen for connections from COSMOS - Plugin must match\nVARIABLE router_port 2950\n\n# Port to listen on for connections from COSMOS. Defaults to localhost for security. Will need to be opened\n# if COSMOS is on another machine.\nVARIABLE router_listen_address 127.0.0.1\n\nINTERFACE SERIAL_INT serial_interface.rb <%= write_port_name %> <%= read_port_name %> <%= baud_rate %> <%= parity %> <%= stop_bits %> <%= write_timeout %> <%= read_timeout %>\n OPTION FLOW_CONTROL <%= flow_control %>\n OPTION DATA_BITS <%= data_bits %>\n\nROUTER SERIAL_ROUTER tcpip_server_interface.rb <%= router_port %> <%= router_port %> 10.0 nil BURST\n ROUTE SERIAL_INT\n OPTION LISTEN_ADDRESS <%= router_listen_address %>\n"})}),"\n",(0,t.jsx)(n.p,{children:"VARIABLE provides default values to variables that can be changed when the bridge is started. This example shows an INTERFACE that is configured to use the serial_interface.rb class. It also includes a standard ROUTER using tcpip_server_interface.rb that COSMOS can connect to and get the data from the serial port. The LISTEN_ADDRESS is set to 127.0.0.1 in this example to prevent access from outside of the host system. Docker running on the same machine can access\nthis server using the host.docker.internal hostname and the configured port (2950 in this example)."}),"\n",(0,t.jsx)(n.h2,{id:"bridge-commands-openc3cli",children:"Bridge Commands: openc3cli"}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.code,{children:"openc3cli bridgesetup"})}),"\n",(0,t.jsx)(n.p,{children:"Generates a bridge.txt example file"}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.code,{children:"openc3cli bridge [filename] [variable1=value1] [variable2=value2]"})}),"\n",(0,t.jsx)(n.p,{children:"Runs a bridge from a given configuration file. Defaults to bridge.txt in the current directory. Variables can also be passed into to override VARIABLE defaults."}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.code,{children:"openc3cli bridgegem [gem_name] [variable1=value1] [variable2=value2]"})}),"\n",(0,t.jsx)(n.p,{children:"Runs a bridge using the bridge.txt provided in a bridge gem. Variables can also be passed into to override VARIABLE defaults."}),"\n",(0,t.jsx)(n.h2,{id:"example-bridge-gems",children:"Example Bridge Gems"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["Serial Port: ",(0,t.jsx)(n.a,{href:"https://github.com/OpenC3/openc3-cosmos-bridge-serial",children:"openc3-cosmos-bridge-serial"})]}),"\n",(0,t.jsxs)(n.li,{children:["Host: ",(0,t.jsx)(n.a,{href:"https://github.com/OpenC3/openc3-cosmos-bridge-host",children:"openc3-cosmos-bridge-host"})]}),"\n",(0,t.jsxs)(n.li,{children:["HIDAPI: ",(0,t.jsx)(n.a,{href:"https://github.com/OpenC3/openc3-cosmos-bridge-hidapi",children:"openc3-cosmos-bridge-hidapi"})]}),"\n",(0,t.jsxs)(n.li,{children:["PS5 Dual Sense Controller: ",(0,t.jsx)(n.a,{href:"https://github.com/OpenC3/openc3-cosmos-bridge-dualsense",children:"openc3-cosmos-bridge-dualsense"})]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"note-on-serial-ports",children:"Note on Serial Ports"}),"\n",(0,t.jsx)(n.p,{children:"Serial ports can be used directly without bridges on Linux Docker installations."}),"\n",(0,t.jsx)(n.p,{children:"Add the following to the operator service in compose.yaml:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:' devices:\n - "/dev/ttyUSB0:/dev/ttyUSB0"\n'})}),"\n",(0,t.jsx)(n.p,{children:"Make sure the serial device has permissions for the user running Docker to access:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:"sudo chmod 666 /dev/ttyUSB0\n"})})]})}function u(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(l,{...e})}):l(e)}},1184:(e,n,i)=>{i.d(n,{R:()=>o});var t=i(4041);const r={},s=t.createContext(r);function o(e){const n=t.useContext(s);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([[2577],{4283:(e,n,o)=>{o.r(n),o.d(n,{assets:()=>l,contentTitle:()=>c,default:()=>p,frontMatter:()=>i,metadata:()=>r,toc:()=>a});var s=o(1085),t=o(1184);const i={title:"Developing COSMOS"},c="Developing COSMOS",r={id:"development/developing",title:"Developing COSMOS",description:"So you want to help develop COSMOS? All of our open source COSMOS code is on Github so the first thing to do is get an account. Next clone the COSMOS repository. We accept contributions from others as Pull Requests.",source:"@site/docs/development/developing.md",sourceDirName:"development",slug:"/development/developing",permalink:"/tools/staticdocs/docs/development/developing",draft:!1,unlisted:!1,editUrl:"https://github.com/OpenC3/cosmos/tree/main/docs.openc3.com/docs/development/developing.md",tags:[],version:"current",frontMatter:{title:"Developing COSMOS"},sidebar:"defaultSidebar",previous:{title:"Testing with Curl",permalink:"/tools/staticdocs/docs/development/curl"},next:{title:"Host Install",permalink:"/tools/staticdocs/docs/development/host-install"}},l={},a=[{value:"Development Tools",id:"development-tools",level:2},{value:"Running a Frontend Application",id:"running-a-frontend-application",level:2},{value:"Running a Backend Server",id:"running-a-backend-server",level:2}];function d(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",li:"li",ol:"ol",p:"p",pre:"pre",...(0,t.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h1,{id:"developing-cosmos",children:"Developing COSMOS"}),"\n",(0,s.jsxs)(n.p,{children:["So you want to help develop COSMOS? All of our open source COSMOS code is on ",(0,s.jsx)(n.a,{href:"https://github.com/",children:"Github"})," so the first thing to do is get an ",(0,s.jsx)(n.a,{href:"https://github.com/join",children:"account"}),". Next ",(0,s.jsx)(n.a,{href:"https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository",children:"clone"})," the ",(0,s.jsx)(n.a,{href:"https://github.com/openc3/cosmos",children:"COSMOS"})," repository. We accept contributions from others as ",(0,s.jsx)(n.a,{href:"https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests",children:"Pull Requests"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"development-tools",children:"Development Tools"}),"\n",(0,s.jsxs)(n.p,{children:["The core COSMOS team develops with the ",(0,s.jsx)(n.a,{href:"https://code.visualstudio.com/",children:"Visual Studio Code"})," editor and we highly recommend it. We also utilize a number of extensions including docker, kubernetes, gitlens, prettier, eslint, python, vetur, and ruby. We commit our ",(0,s.jsx)(n.code,{children:"openc3.code-workspace"})," configuration for VSCode to help configure these plugins. You also need ",(0,s.jsx)(n.a,{href:"https://www.docker.com/products/docker-desktop",children:"Docker Desktop"})," which you should already have as it is a requirement to run COSMOS. You'll also need ",(0,s.jsx)(n.a,{href:"https://nodejs.org/en/download/",children:"NodeJS"})," and ",(0,s.jsx)(n.a,{href:"https://yarnpkg.com/getting-started/install",children:"yarn"})," installed."]}),"\n",(0,s.jsx)(n.h1,{id:"building-cosmos",children:"Building COSMOS"}),"\n",(0,s.jsx)(n.p,{children:"Note: We primarily develop COSMOS in MacOS so the commands here will reference bash scripts but the same files exist in Windows as batch scripts."}),"\n",(0,s.jsxs)(n.p,{children:["Build COSMOS using the ",(0,s.jsx)(n.code,{children:"openc3.sh"})," script:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"% ./openc3.sh build\n"})}),"\n",(0,s.jsx)(n.p,{children:"This will pull all the COSMOS container dependencies and build our local containers. Note: This can take a long time especially for your first build!"}),"\n",(0,s.jsx)(n.p,{children:"Once the build completes you can see the built images with the following command:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:'% docker image ls | grep "openc3"\nopenc3inc/openc3-cosmos-init latest 4cac7a3ea9d3 29 hours ago 446MB\nopenc3inc/openc3-cosmos-script-runner-api latest 4aacbaf49f7a 29 hours ago 431MB\nopenc3inc/openc3-cosmos-cmd-tlm-api latest 9a8806bd4be3 3 days ago 432MB\nopenc3inc/openc3-operator latest 223e98129fe9 3 days ago 405MB\nopenc3inc/openc3-base latest 98df5c0378c2 3 days ago 405MB\nopenc3inc/openc3-redis latest 5a3003a49199 8 days ago 111MB\nopenc3inc/openc3-traefik latest ec13a8d16a2f 8 days ago 104MB\nopenc3inc/openc3-minio latest 787f6e3fc0be 8 days ago 238MB\nopenc3inc/openc3-node latest b3ee86d3620a 8 days ago 372MB\nopenc3inc/openc3-ruby latest aa158bbb9539 8 days ago 326MB\n'})}),"\n",(0,s.jsxs)(n.admonition,{title:"Offline Building",type:"info",children:[(0,s.jsxs)(n.p,{children:["If you're building in a offline environment or want to use a private Rubygems, NPM or APK server (e.g. Nexus), you can update the following environment variables: RUBYGEMS_URL, NPM_URL, APK_URL, and more in the ",(0,s.jsx)(n.a,{href:"https://github.com/openc3/cosmos/blob/main/.env",children:".env"})," file. Example values:"]}),(0,s.jsxs)(n.p,{children:["ALPINE_VERSION=3.18",(0,s.jsx)("br",{}),"\nALPINE_BUILD=6",(0,s.jsx)("br",{}),"\nRUBYGEMS_URL=",(0,s.jsx)(n.a,{href:"https://rubygems.org",children:"https://rubygems.org"}),(0,s.jsx)("br",{}),"\nNPM_URL=",(0,s.jsx)(n.a,{href:"https://registry.npmjs.org",children:"https://registry.npmjs.org"}),(0,s.jsx)("br",{}),"\nAPK_URL=",(0,s.jsx)(n.a,{href:"http://dl-cdn.alpinelinux.org",children:"http://dl-cdn.alpinelinux.org"}),(0,s.jsx)("br",{})]})]}),"\n",(0,s.jsx)(n.h1,{id:"running-cosmos",children:"Running COSMOS"}),"\n",(0,s.jsxs)(n.p,{children:["Running COSMOS in development mode enables localhost access to internal API ports as well as sets ",(0,s.jsx)(n.code,{children:"RAILS_ENV=development"})," in the cmd-tlm-api and script-runner-api Rails servers. To run in development mode:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"% ./openc3.sh dev\n"})}),"\n",(0,s.jsx)(n.p,{children:"You can now see the running containers (I removed CONTAINER ID, CREATED and STATUS to save space):"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:'% docker ps\nIMAGE COMMAND PORTS NAMES\nopenc3/openc3-cmd-tlm-api:latest "/sbin/tini -- rails\u2026" 127.0.0.1:2901->2901/tcp cosmos-openc3-cmd-tlm-api-1\nopenc3/openc3-script-runner-api:latest "/sbin/tini -- rails\u2026" 127.0.0.1:2902->2902/tcp cosmos-openc3-script-runner-api-1\nopenc3/openc3-traefik:latest "/entrypoint.sh trae\u2026" 0.0.0.0:2900->80/tcp cosmos-openc3-traefik-1\nopenc3/openc3-operator:latest "/sbin/tini -- ruby \u2026" cosmos-openc3-operator-1\nopenc3/openc3-minio:latest "/usr/bin/docker-ent\u2026" 127.0.0.1:9000->9000/tcp cosmos-openc3-minio-1\nopenc3/openc3-redis:latest "docker-entrypoint.s\u2026" 127.0.0.1:6379->6379/tcp cosmos-openc3-redis-1\n'})}),"\n",(0,s.jsx)(n.p,{children:"If you go to localhost:2900 you should see COSMOS up and running!"}),"\n",(0,s.jsx)(n.h2,{id:"running-a-frontend-application",children:"Running a Frontend Application"}),"\n",(0,s.jsx)(n.p,{children:"So now that you have COSMOS up and running how do you develop an individual COSMOS application?"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsx)(n.li,{children:"Bootstrap the frontend with yarn"}),"\n"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"openc3-init % yarn\n"})}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsx)(n.li,{children:"Serve a local COSMOS application (CmdTlmServer, ScriptRunner, etc)"}),"\n"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"openc3-init % cd plugins/packages/openc3-tool-scriptrunner\nopenc3-tool-scriptrunner % yarn serve\n\nDONE Compiled successfully in 128722ms\nApp running at:\n- Local: http://localhost:2914/tools/scriptrunner/\n- Network: http://localhost:2914/tools/scriptrunner/\n\nNote that the development build is not optimized.\nTo create a production build, run npm run build.\n"})}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Set the ",(0,s.jsx)(n.a,{href:"https://single-spa.js.org/",children:"single SPA"})," override for the application"]}),"\n",(0,s.jsxs)(n.p,{children:["Visit localhost:2900 and Right-click 'Inspect'",(0,s.jsx)("br",{}),"\nIn the console paste:"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-javascript",children:'localStorage.setItem("devtools", true);\n'})}),"\n",(0,s.jsxs)(n.p,{children:["Refresh and you should see ",(0,s.jsx)(n.code,{children:"{...}"})," in the bottom right",(0,s.jsx)("br",{}),"\nClick the Default button next to the application (@openc3/tool-scriptrunner)",(0,s.jsx)("br",{}),"\nPaste in the development path which is dependent on the port returned by the local yarn serve and the tool name (scriptrunner)"]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.a,{href:"http://localhost:2914/tools/scriptrunner/js/app.js",children:"http://localhost:2914/tools/scriptrunner/js/app.js"})}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["Refresh the page and you should see your local copy of the application (Script Runner in this example). If you dynamically add code (like ",(0,s.jsx)(n.code,{children:"console.log"}),") the yarn window should re-compile and the browser should refresh displaying your new code. It is highly recommended to get familiar with your browser's ",(0,s.jsx)(n.a,{href:"https://developer.chrome.com/docs/devtools/overview/",children:"development tools"})," if you plan to do frontend development."]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"running-a-backend-server",children:"Running a Backend Server"}),"\n",(0,s.jsx)(n.p,{children:"If the code you want to develop is the cmd-tlm-api or script-runner-api backend servers there are several steps to enable access to a development copy."}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsx)(n.li,{children:"Run a development version of traefik. COSMOS uses traefik to direct API requests to the correct locations."}),"\n"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"% cd openc3-traefik\nopenc3-traefik % docker ps\n# Look for the container with name including traefik\nopenc3-traefik % docker stop cosmos-openc3-traefik-1\nopenc3-traefik % docker build --build-arg TRAEFIK_CONFIG=traefik-dev.yaml -t openc3-traefik-dev .\nopenc3-traefik % docker run --network=openc3-cosmos-network -p 2900:2900 -it --rm openc3-traefik-dev\n"})}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsx)(n.li,{children:"Run a local copy of the cmd-tlm-api or script-runner-api"}),"\n"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"% cd openc3-cosmos-cmd-tlm-api\nopenc3-cosmos-cmd-tlm-api % docker ps\n# Look for the container with name including cmd-tlm-api\nopenc3-cosmos-cmd-tlm-api % docker stop cosmos-openc3-cosmos-cmd-tlm-api-1\n# Run the following on Windows:\nopenc3-cosmos-cmd-tlm-api> dev_server.bat\n# In Linux, set all the environment variables in the .env file, but override REDIS to be local\nopenc3-cosmos-cmd-tlm-api % set -a; source ../.env; set +a\nopenc3-cosmos-cmd-tlm-api % export OPENC3_REDIS_HOSTNAME=127.0.0.1\nopenc3-cosmos-cmd-tlm-api % export OPENC3_REDIS_EPHEMERAL_HOSTNAME=127.0.0.1\nopenc3-cosmos-cmd-tlm-api % bundle install\nopenc3-cosmos-cmd-tlm-api % bundle exec rails s\n"})}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["Once the ",(0,s.jsx)(n.code,{children:"bundle exec rails s"})," command returns you should see API requests coming from interations in the frontend code. If you add code (like Ruby debugging statements) to the cmd-tlm-api code you need to stop the server (CTRL-C) and restart it to see the effect."]}),"\n"]})]})}function p(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},1184:(e,n,o)=>{o.d(n,{R:()=>c});var s=o(4041);const t={},i=s.createContext(t);function c(e){const n=s.useContext(i);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}}}]);
1
+ "use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([[2577],{1117:(e,n,o)=>{o.r(n),o.d(n,{assets:()=>l,contentTitle:()=>c,default:()=>p,frontMatter:()=>i,metadata:()=>r,toc:()=>a});var s=o(1085),t=o(1184);const i={title:"Developing COSMOS"},c="Developing COSMOS",r={id:"development/developing",title:"Developing COSMOS",description:"So you want to help develop COSMOS? All of our open source COSMOS code is on Github so the first thing to do is get an account. Next clone the COSMOS repository. We accept contributions from others as Pull Requests.",source:"@site/docs/development/developing.md",sourceDirName:"development",slug:"/development/developing",permalink:"/tools/staticdocs/docs/development/developing",draft:!1,unlisted:!1,editUrl:"https://github.com/OpenC3/cosmos/tree/main/docs.openc3.com/docs/development/developing.md",tags:[],version:"current",frontMatter:{title:"Developing COSMOS"},sidebar:"defaultSidebar",previous:{title:"Testing with Curl",permalink:"/tools/staticdocs/docs/development/curl"},next:{title:"Host Install",permalink:"/tools/staticdocs/docs/development/host-install"}},l={},a=[{value:"Development Tools",id:"development-tools",level:2},{value:"Running a Frontend Application",id:"running-a-frontend-application",level:2},{value:"Running a Backend Server",id:"running-a-backend-server",level:2}];function d(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",li:"li",ol:"ol",p:"p",pre:"pre",...(0,t.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h1,{id:"developing-cosmos",children:"Developing COSMOS"}),"\n",(0,s.jsxs)(n.p,{children:["So you want to help develop COSMOS? All of our open source COSMOS code is on ",(0,s.jsx)(n.a,{href:"https://github.com/",children:"Github"})," so the first thing to do is get an ",(0,s.jsx)(n.a,{href:"https://github.com/join",children:"account"}),". Next ",(0,s.jsx)(n.a,{href:"https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository",children:"clone"})," the ",(0,s.jsx)(n.a,{href:"https://github.com/openc3/cosmos",children:"COSMOS"})," repository. We accept contributions from others as ",(0,s.jsx)(n.a,{href:"https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests",children:"Pull Requests"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"development-tools",children:"Development Tools"}),"\n",(0,s.jsxs)(n.p,{children:["The core COSMOS team develops with the ",(0,s.jsx)(n.a,{href:"https://code.visualstudio.com/",children:"Visual Studio Code"})," editor and we highly recommend it. We also utilize a number of extensions including docker, kubernetes, gitlens, prettier, eslint, python, vetur, and ruby. We commit our ",(0,s.jsx)(n.code,{children:"openc3.code-workspace"})," configuration for VSCode to help configure these plugins. You also need ",(0,s.jsx)(n.a,{href:"https://www.docker.com/products/docker-desktop",children:"Docker Desktop"})," which you should already have as it is a requirement to run COSMOS. You'll also need ",(0,s.jsx)(n.a,{href:"https://nodejs.org/en/download/",children:"NodeJS"})," and ",(0,s.jsx)(n.a,{href:"https://yarnpkg.com/getting-started/install",children:"yarn"})," installed."]}),"\n",(0,s.jsx)(n.h1,{id:"building-cosmos",children:"Building COSMOS"}),"\n",(0,s.jsx)(n.p,{children:"Note: We primarily develop COSMOS in MacOS so the commands here will reference bash scripts but the same files exist in Windows as batch scripts."}),"\n",(0,s.jsxs)(n.p,{children:["Build COSMOS using the ",(0,s.jsx)(n.code,{children:"openc3.sh"})," script:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"% ./openc3.sh build\n"})}),"\n",(0,s.jsx)(n.p,{children:"This will pull all the COSMOS container dependencies and build our local containers. Note: This can take a long time especially for your first build!"}),"\n",(0,s.jsx)(n.p,{children:"Once the build completes you can see the built images with the following command:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:'% docker image ls | grep "openc3"\nopenc3inc/openc3-cosmos-init latest 4cac7a3ea9d3 29 hours ago 446MB\nopenc3inc/openc3-cosmos-script-runner-api latest 4aacbaf49f7a 29 hours ago 431MB\nopenc3inc/openc3-cosmos-cmd-tlm-api latest 9a8806bd4be3 3 days ago 432MB\nopenc3inc/openc3-operator latest 223e98129fe9 3 days ago 405MB\nopenc3inc/openc3-base latest 98df5c0378c2 3 days ago 405MB\nopenc3inc/openc3-redis latest 5a3003a49199 8 days ago 111MB\nopenc3inc/openc3-traefik latest ec13a8d16a2f 8 days ago 104MB\nopenc3inc/openc3-minio latest 787f6e3fc0be 8 days ago 238MB\nopenc3inc/openc3-node latest b3ee86d3620a 8 days ago 372MB\nopenc3inc/openc3-ruby latest aa158bbb9539 8 days ago 326MB\n'})}),"\n",(0,s.jsxs)(n.admonition,{title:"Offline Building",type:"info",children:[(0,s.jsxs)(n.p,{children:["If you're building in a offline environment or want to use a private Rubygems, NPM or APK server (e.g. Nexus), you can update the following environment variables: RUBYGEMS_URL, NPM_URL, APK_URL, and more in the ",(0,s.jsx)(n.a,{href:"https://github.com/openc3/cosmos/blob/main/.env",children:".env"})," file. Example values:"]}),(0,s.jsxs)(n.p,{children:["ALPINE_VERSION=3.18",(0,s.jsx)("br",{}),"\nALPINE_BUILD=6",(0,s.jsx)("br",{}),"\nRUBYGEMS_URL=",(0,s.jsx)(n.a,{href:"https://rubygems.org",children:"https://rubygems.org"}),(0,s.jsx)("br",{}),"\nNPM_URL=",(0,s.jsx)(n.a,{href:"https://registry.npmjs.org",children:"https://registry.npmjs.org"}),(0,s.jsx)("br",{}),"\nAPK_URL=",(0,s.jsx)(n.a,{href:"http://dl-cdn.alpinelinux.org",children:"http://dl-cdn.alpinelinux.org"}),(0,s.jsx)("br",{})]})]}),"\n",(0,s.jsx)(n.h1,{id:"running-cosmos",children:"Running COSMOS"}),"\n",(0,s.jsxs)(n.p,{children:["Running COSMOS in development mode enables localhost access to internal API ports as well as sets ",(0,s.jsx)(n.code,{children:"RAILS_ENV=development"})," in the cmd-tlm-api and script-runner-api Rails servers. To run in development mode:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"% ./openc3.sh dev\n"})}),"\n",(0,s.jsx)(n.p,{children:"You can now see the running containers (I removed CONTAINER ID, CREATED and STATUS to save space):"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:'% docker ps\nIMAGE COMMAND PORTS NAMES\nopenc3/openc3-cmd-tlm-api:latest "/sbin/tini -- rails\u2026" 127.0.0.1:2901->2901/tcp cosmos-openc3-cmd-tlm-api-1\nopenc3/openc3-script-runner-api:latest "/sbin/tini -- rails\u2026" 127.0.0.1:2902->2902/tcp cosmos-openc3-script-runner-api-1\nopenc3/openc3-traefik:latest "/entrypoint.sh trae\u2026" 0.0.0.0:2900->80/tcp cosmos-openc3-traefik-1\nopenc3/openc3-operator:latest "/sbin/tini -- ruby \u2026" cosmos-openc3-operator-1\nopenc3/openc3-minio:latest "/usr/bin/docker-ent\u2026" 127.0.0.1:9000->9000/tcp cosmos-openc3-minio-1\nopenc3/openc3-redis:latest "docker-entrypoint.s\u2026" 127.0.0.1:6379->6379/tcp cosmos-openc3-redis-1\n'})}),"\n",(0,s.jsx)(n.p,{children:"If you go to localhost:2900 you should see COSMOS up and running!"}),"\n",(0,s.jsx)(n.h2,{id:"running-a-frontend-application",children:"Running a Frontend Application"}),"\n",(0,s.jsx)(n.p,{children:"So now that you have COSMOS up and running how do you develop an individual COSMOS application?"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsx)(n.li,{children:"Bootstrap the frontend with yarn"}),"\n"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"openc3-init % yarn\n"})}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsx)(n.li,{children:"Serve a local COSMOS application (CmdTlmServer, ScriptRunner, etc)"}),"\n"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"openc3-init % cd plugins/packages/openc3-tool-scriptrunner\nopenc3-tool-scriptrunner % yarn serve\n\nDONE Compiled successfully in 128722ms\nApp running at:\n- Local: http://localhost:2914/tools/scriptrunner/\n- Network: http://localhost:2914/tools/scriptrunner/\n\nNote that the development build is not optimized.\nTo create a production build, run npm run build.\n"})}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Set the ",(0,s.jsx)(n.a,{href:"https://single-spa.js.org/",children:"single SPA"})," override for the application"]}),"\n",(0,s.jsxs)(n.p,{children:["Visit localhost:2900 and Right-click 'Inspect'",(0,s.jsx)("br",{}),"\nIn the console paste:"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-javascript",children:'localStorage.setItem("devtools", true);\n'})}),"\n",(0,s.jsxs)(n.p,{children:["Refresh and you should see ",(0,s.jsx)(n.code,{children:"{...}"})," in the bottom right",(0,s.jsx)("br",{}),"\nClick the Default button next to the application (@openc3/tool-scriptrunner)",(0,s.jsx)("br",{}),"\nPaste in the development path which is dependent on the port returned by the local yarn serve and the tool name (scriptrunner)"]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.a,{href:"http://localhost:2914/tools/scriptrunner/js/app.js",children:"http://localhost:2914/tools/scriptrunner/js/app.js"})}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["Refresh the page and you should see your local copy of the application (Script Runner in this example). If you dynamically add code (like ",(0,s.jsx)(n.code,{children:"console.log"}),") the yarn window should re-compile and the browser should refresh displaying your new code. It is highly recommended to get familiar with your browser's ",(0,s.jsx)(n.a,{href:"https://developer.chrome.com/docs/devtools/overview/",children:"development tools"})," if you plan to do frontend development."]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"running-a-backend-server",children:"Running a Backend Server"}),"\n",(0,s.jsx)(n.p,{children:"If the code you want to develop is the cmd-tlm-api or script-runner-api backend servers there are several steps to enable access to a development copy."}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsx)(n.li,{children:"Run a development version of traefik. COSMOS uses traefik to direct API requests to the correct locations."}),"\n"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"% cd openc3-traefik\nopenc3-traefik % docker ps\n# Look for the container with name including traefik\nopenc3-traefik % docker stop cosmos-openc3-traefik-1\nopenc3-traefik % docker build --build-arg TRAEFIK_CONFIG=traefik-dev.yaml -t openc3-traefik-dev .\nopenc3-traefik % docker run --network=openc3-cosmos-network -p 2900:2900 -it --rm openc3-traefik-dev\n"})}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsx)(n.li,{children:"Run a local copy of the cmd-tlm-api or script-runner-api"}),"\n"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"% cd openc3-cosmos-cmd-tlm-api\nopenc3-cosmos-cmd-tlm-api % docker ps\n# Look for the container with name including cmd-tlm-api\nopenc3-cosmos-cmd-tlm-api % docker stop cosmos-openc3-cosmos-cmd-tlm-api-1\n# Run the following on Windows:\nopenc3-cosmos-cmd-tlm-api> dev_server.bat\n# In Linux, set all the environment variables in the .env file, but override REDIS to be local\nopenc3-cosmos-cmd-tlm-api % set -a; source ../.env; set +a\nopenc3-cosmos-cmd-tlm-api % export OPENC3_REDIS_HOSTNAME=127.0.0.1\nopenc3-cosmos-cmd-tlm-api % export OPENC3_REDIS_EPHEMERAL_HOSTNAME=127.0.0.1\nopenc3-cosmos-cmd-tlm-api % bundle install\nopenc3-cosmos-cmd-tlm-api % bundle exec rails s\n"})}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["Once the ",(0,s.jsx)(n.code,{children:"bundle exec rails s"})," command returns you should see API requests coming from interations in the frontend code. If you add code (like Ruby debugging statements) to the cmd-tlm-api code you need to stop the server (CTRL-C) and restart it to see the effect."]}),"\n"]})]})}function p(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},1184:(e,n,o)=>{o.d(n,{R:()=>c});var s=o(4041);const t={},i=s.createContext(t);function c(e){const n=s.useContext(i);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([[7442],{9230:t=>{t.exports=JSON.parse('{"categoryGeneratedIndex":{"title":"Meta","slug":"/meta","permalink":"/tools/staticdocs/docs/meta","sidebar":"defaultSidebar","navigation":{"previous":{"title":"Testing COSMOS","permalink":"/tools/staticdocs/docs/development/testing"},"next":{"title":"Contributing","permalink":"/tools/staticdocs/docs/meta/contributing"}}}}')}}]);
1
+ "use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([[8482],{6926:t=>{t.exports=JSON.parse('{"categoryGeneratedIndex":{"title":"Meta","slug":"/meta","permalink":"/tools/staticdocs/docs/meta","sidebar":"defaultSidebar","navigation":{"previous":{"title":"Testing COSMOS","permalink":"/tools/staticdocs/docs/development/testing"},"next":{"title":"Contributing","permalink":"/tools/staticdocs/docs/meta/contributing"}}}}')}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([[6360],{5332:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>o,default:()=>m,frontMatter:()=>d,metadata:()=>i,toc:()=>r});var s=n(1085),a=n(1184);const d={title:"Command Sender"},o=void 0,i={id:"tools/cmd-sender",title:"Command Sender",description:"Introduction",source:"@site/docs/tools/cmd-sender.md",sourceDirName:"tools",slug:"/tools/cmd-sender",permalink:"/tools/staticdocs/docs/tools/cmd-sender",draft:!1,unlisted:!1,editUrl:"https://github.com/OpenC3/cosmos/tree/main/docs.openc3.com/docs/tools/cmd-sender.md",tags:[],version:"current",frontMatter:{title:"Command Sender"},sidebar:"defaultSidebar",previous:{title:"Calendar (Enterprise)",permalink:"/tools/staticdocs/docs/tools/calendar"},next:{title:"Command and Telemetry Server",permalink:"/tools/staticdocs/docs/tools/cmd-tlm-server"}},c={},r=[{value:"Introduction",id:"introduction",level:2},{value:"Command Sender Menus",id:"command-sender-menus",level:2},{value:"Mode Menu Items",id:"mode-menu-items",level:3},{value:"Sending Commands",id:"sending-commands",level:2},{value:"Hazardous Commands",id:"hazardous-commands",level:3}];function l(e){const t={a:"a",h2:"h2",h3:"h3",img:"img",li:"li",p:"p",ul:"ul",...(0,a.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.h2,{id:"introduction",children:"Introduction"}),"\n",(0,s.jsx)(t.p,{children:"Command Sender provides the ability to send any command defined by COSMOS. Commands are selected using the Target and Packet drop down fields which populate the command parameter (if any). A command history is stored which is also editable. Commands in the command history can be re-executed by pressing Enter."}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{alt:"Command Sender",src:n(9650).A+"",width:"1274",height:"664"})}),"\n",(0,s.jsx)(t.h2,{id:"command-sender-menus",children:"Command Sender Menus"}),"\n",(0,s.jsx)(t.h3,{id:"mode-menu-items",children:"Mode Menu Items"}),"\n",(0,s.jsx)("img",{src:n(4467).A,alt:"Mode Menu",style:{float:"left","margin-right":"50px",height:"120px"}}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:"Ignores parameter range checking"}),"\n",(0,s.jsx)(t.li,{children:"Displays parameter state values in hex"}),"\n",(0,s.jsx)(t.li,{children:"Shows ignored parameters"}),"\n",(0,s.jsx)(t.li,{children:"Disables all parameter conversions"}),"\n"]}),"\n",(0,s.jsx)(t.h2,{id:"sending-commands",children:"Sending Commands"}),"\n",(0,s.jsx)(t.p,{children:"Select a command by first selecting the target from the Select Target drop down. Changing the target automatically updates the Select Packet options to only display commands from that target. If the command has parameters a table is generated with all the parameters."}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{alt:"INST COLLECT",src:n(7564).A+"",width:"1276",height:"642"})}),"\n",(0,s.jsx)(t.p,{children:"Clicking on a parameter with States (like TYPE in the above example) brings up a drop down to select a state. Selecting a state populates the value field next to it. Sending a command updates the Status text and the Command History."}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{alt:"States",src:n(8132).A+"",width:"1276",height:"664"})}),"\n",(0,s.jsx)(t.p,{children:"You can directly edit the Command History to change a parameter value. Pressing Enter on the line will then execute the command. If the command has changed a new line will be entered in the Command History. Pressing Enter several times on the same line updates the Status text with the number of commands sent (3 in the next example)."}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{alt:"History",src:n(1071).A+"",width:"1276",height:"664"})}),"\n",(0,s.jsx)(t.h3,{id:"hazardous-commands",children:"Hazardous Commands"}),"\n",(0,s.jsxs)(t.p,{children:["Sending ",(0,s.jsx)(t.a,{href:"/tools/staticdocs/docs/configuration/command#hazardous",children:"hazardous"})," commands will prompt the user whether to send the command."]}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{alt:"INST CLEAR",src:n(1513).A+"",width:"1274",height:"546"})}),"\n",(0,s.jsxs)(t.p,{children:["Commands can also have hazardous ",(0,s.jsx)(t.a,{href:"/tools/staticdocs/docs/configuration/command#state",children:"states"})," (INST COLLECT with TYPE SPECIAL) which also prompt the user. In this example, we've also checked all the menu options to show ignored parameters, display state values in hex (see SPECIAL, 0x1), disabled range checking (DURATION 1000), and disabled parameter conversions."]}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{alt:"INST COLLECT Hazardous",src:n(4805).A+"",width:"1276",height:"919"})}),"\n",(0,s.jsxs)(t.p,{children:["Selecting Yes will send the command and update the history with all the parameters shown. Note that when writing Scripts all parameters are optional unless explicitly marked ",(0,s.jsx)(t.a,{href:"/tools/staticdocs/docs/configuration/command#required",children:"required"}),"."]})]})}function m(e={}){const{wrapper:t}={...(0,a.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},4467:(e,t,n)=>{n.d(t,{A:()=>s});const s=n.p+"assets/images/mode_menu-9c112084937db5bbff02c18a5681ad038caa0838fc88438628b134a6f6823a09.png"},8132:(e,t,n)=>{n.d(t,{A:()=>s});const s=n.p+"assets/images/collect_states-565ae4b6d02449850585afd7ce35982711d4d677f5a04c1332b2c176f1ec3a25.png"},9650:(e,t,n)=>{n.d(t,{A:()=>s});const s=n.p+"assets/images/command_sender-bb1543bde21fc1963405de5251d16a80a0c3a1bf5adb5fb78145d4995e2fe541.png"},1071:(e,t,n)=>{n.d(t,{A:()=>s});const s=n.p+"assets/images/history-2391436f9edc3e00104a7375f88f5de72b0967f9eb154dfecc346c0a70af4389.png"},1513:(e,t,n)=>{n.d(t,{A:()=>s});const s=n.p+"assets/images/inst_clear-2d5f985c879e8b917fedacdb8c6552bbd383231bf5c8ab8e560e77df4e050026.png"},7564:(e,t,n)=>{n.d(t,{A:()=>s});const s=n.p+"assets/images/inst_collect-81bc422b3b33c5ebcbe4c2f489c730b32ab0d6ea6c7f81cc79d9f6bc03e9db15.png"},4805:(e,t,n)=>{n.d(t,{A:()=>s});const s=n.p+"assets/images/inst_collect_hazardous-a8fb19ea296354a0cd276da1e0ad82f74479eea4e7e204fcf64b779596f2c092.png"},1184:(e,t,n)=>{n.d(t,{R:()=>o});var s=n(4041);const a={},d=s.createContext(a);function o(e){const t=s.useContext(d);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}}}]);
1
+ "use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([[6360],{8022:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>o,default:()=>m,frontMatter:()=>d,metadata:()=>i,toc:()=>r});var s=n(1085),a=n(1184);const d={title:"Command Sender"},o=void 0,i={id:"tools/cmd-sender",title:"Command Sender",description:"Introduction",source:"@site/docs/tools/cmd-sender.md",sourceDirName:"tools",slug:"/tools/cmd-sender",permalink:"/tools/staticdocs/docs/tools/cmd-sender",draft:!1,unlisted:!1,editUrl:"https://github.com/OpenC3/cosmos/tree/main/docs.openc3.com/docs/tools/cmd-sender.md",tags:[],version:"current",frontMatter:{title:"Command Sender"},sidebar:"defaultSidebar",previous:{title:"Calendar (Enterprise)",permalink:"/tools/staticdocs/docs/tools/calendar"},next:{title:"Command and Telemetry Server",permalink:"/tools/staticdocs/docs/tools/cmd-tlm-server"}},c={},r=[{value:"Introduction",id:"introduction",level:2},{value:"Command Sender Menus",id:"command-sender-menus",level:2},{value:"Mode Menu Items",id:"mode-menu-items",level:3},{value:"Sending Commands",id:"sending-commands",level:2},{value:"Hazardous Commands",id:"hazardous-commands",level:3}];function l(e){const t={a:"a",h2:"h2",h3:"h3",img:"img",li:"li",p:"p",ul:"ul",...(0,a.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.h2,{id:"introduction",children:"Introduction"}),"\n",(0,s.jsx)(t.p,{children:"Command Sender provides the ability to send any command defined by COSMOS. Commands are selected using the Target and Packet drop down fields which populate the command parameter (if any). A command history is stored which is also editable. Commands in the command history can be re-executed by pressing Enter."}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{alt:"Command Sender",src:n(9650).A+"",width:"1274",height:"664"})}),"\n",(0,s.jsx)(t.h2,{id:"command-sender-menus",children:"Command Sender Menus"}),"\n",(0,s.jsx)(t.h3,{id:"mode-menu-items",children:"Mode Menu Items"}),"\n",(0,s.jsx)("img",{src:n(4467).A,alt:"Mode Menu",style:{float:"left","margin-right":"50px",height:"120px"}}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:"Ignores parameter range checking"}),"\n",(0,s.jsx)(t.li,{children:"Displays parameter state values in hex"}),"\n",(0,s.jsx)(t.li,{children:"Shows ignored parameters"}),"\n",(0,s.jsx)(t.li,{children:"Disables all parameter conversions"}),"\n"]}),"\n",(0,s.jsx)(t.h2,{id:"sending-commands",children:"Sending Commands"}),"\n",(0,s.jsx)(t.p,{children:"Select a command by first selecting the target from the Select Target drop down. Changing the target automatically updates the Select Packet options to only display commands from that target. If the command has parameters a table is generated with all the parameters."}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{alt:"INST COLLECT",src:n(7564).A+"",width:"1276",height:"642"})}),"\n",(0,s.jsx)(t.p,{children:"Clicking on a parameter with States (like TYPE in the above example) brings up a drop down to select a state. Selecting a state populates the value field next to it. Sending a command updates the Status text and the Command History."}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{alt:"States",src:n(8132).A+"",width:"1276",height:"664"})}),"\n",(0,s.jsx)(t.p,{children:"You can directly edit the Command History to change a parameter value. Pressing Enter on the line will then execute the command. If the command has changed a new line will be entered in the Command History. Pressing Enter several times on the same line updates the Status text with the number of commands sent (3 in the next example)."}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{alt:"History",src:n(1071).A+"",width:"1276",height:"664"})}),"\n",(0,s.jsx)(t.h3,{id:"hazardous-commands",children:"Hazardous Commands"}),"\n",(0,s.jsxs)(t.p,{children:["Sending ",(0,s.jsx)(t.a,{href:"/tools/staticdocs/docs/configuration/command#hazardous",children:"hazardous"})," commands will prompt the user whether to send the command."]}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{alt:"INST CLEAR",src:n(1513).A+"",width:"1274",height:"546"})}),"\n",(0,s.jsxs)(t.p,{children:["Commands can also have hazardous ",(0,s.jsx)(t.a,{href:"/tools/staticdocs/docs/configuration/command#state",children:"states"})," (INST COLLECT with TYPE SPECIAL) which also prompt the user. In this example, we've also checked all the menu options to show ignored parameters, display state values in hex (see SPECIAL, 0x1), disabled range checking (DURATION 1000), and disabled parameter conversions."]}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{alt:"INST COLLECT Hazardous",src:n(4805).A+"",width:"1276",height:"919"})}),"\n",(0,s.jsxs)(t.p,{children:["Selecting Yes will send the command and update the history with all the parameters shown. Note that when writing Scripts all parameters are optional unless explicitly marked ",(0,s.jsx)(t.a,{href:"/tools/staticdocs/docs/configuration/command#required",children:"required"}),"."]})]})}function m(e={}){const{wrapper:t}={...(0,a.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},4467:(e,t,n)=>{n.d(t,{A:()=>s});const s=n.p+"assets/images/mode_menu-9c112084937db5bbff02c18a5681ad038caa0838fc88438628b134a6f6823a09.png"},8132:(e,t,n)=>{n.d(t,{A:()=>s});const s=n.p+"assets/images/collect_states-565ae4b6d02449850585afd7ce35982711d4d677f5a04c1332b2c176f1ec3a25.png"},9650:(e,t,n)=>{n.d(t,{A:()=>s});const s=n.p+"assets/images/command_sender-bb1543bde21fc1963405de5251d16a80a0c3a1bf5adb5fb78145d4995e2fe541.png"},1071:(e,t,n)=>{n.d(t,{A:()=>s});const s=n.p+"assets/images/history-2391436f9edc3e00104a7375f88f5de72b0967f9eb154dfecc346c0a70af4389.png"},1513:(e,t,n)=>{n.d(t,{A:()=>s});const s=n.p+"assets/images/inst_clear-2d5f985c879e8b917fedacdb8c6552bbd383231bf5c8ab8e560e77df4e050026.png"},7564:(e,t,n)=>{n.d(t,{A:()=>s});const s=n.p+"assets/images/inst_collect-81bc422b3b33c5ebcbe4c2f489c730b32ab0d6ea6c7f81cc79d9f6bc03e9db15.png"},4805:(e,t,n)=>{n.d(t,{A:()=>s});const s=n.p+"assets/images/inst_collect_hazardous-a8fb19ea296354a0cd276da1e0ad82f74479eea4e7e204fcf64b779596f2c092.png"},1184:(e,t,n)=>{n.d(t,{R:()=>o});var s=n(4041);const a={},d=s.createContext(a);function o(e){const t=s.useContext(d);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([[407],{9049:(t,o,e)=>{e.r(o),e.d(o,{assets:()=>r,contentTitle:()=>i,default:()=>h,frontMatter:()=>a,metadata:()=>c,toc:()=>d});var s=e(1085),n=e(1184);const a={title:"Handbooks"},i=void 0,c={id:"tools/handbooks",title:"Handbooks",description:"Introduction",source:"@site/docs/tools/handbooks.md",sourceDirName:"tools",slug:"/tools/handbooks",permalink:"/tools/staticdocs/docs/tools/handbooks",draft:!1,unlisted:!1,editUrl:"https://github.com/OpenC3/cosmos/tree/main/docs.openc3.com/docs/tools/handbooks.md",tags:[],version:"current",frontMatter:{title:"Handbooks"},sidebar:"defaultSidebar",previous:{title:"Data Viewer",permalink:"/tools/staticdocs/docs/tools/data-viewer"},next:{title:"Limits Monitor",permalink:"/tools/staticdocs/docs/tools/limits-monitor"}},r={},d=[{value:"Introduction",id:"introduction",level:2}];function l(t){const o={a:"a",h2:"h2",img:"img",p:"p",...(0,n.R)(),...t.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(o.h2,{id:"introduction",children:"Introduction"}),"\n",(0,s.jsxs)(o.p,{children:["Handbooks formats the COSMOS ",(0,s.jsx)(o.a,{href:"/tools/staticdocs/docs/configuration/command",children:"command"})," and ",(0,s.jsx)(o.a,{href:"/tools/staticdocs/docs/configuration/telemetry",children:"telemetry"})," definitions into a nicely formatted webpage that can be exported to a PDF."]}),"\n",(0,s.jsx)(o.p,{children:(0,s.jsx)(o.img,{alt:"Handbooks",src:e(1226).A+"",width:"1270",height:"710"})}),"\n",(0,s.jsx)(o.p,{children:"You can select the targets you want to display and the number of columns to display on the page. You can then use the browser to Print the page. Most browsers have the capability to Save as PDF rather than print to save the resulting page as PDF."})]})}function h(t={}){const{wrapper:o}={...(0,n.R)(),...t.components};return o?(0,s.jsx)(o,{...t,children:(0,s.jsx)(l,{...t})}):l(t)}},1226:(t,o,e)=>{e.d(o,{A:()=>s});const s=e.p+"assets/images/handbooks-948da6f5aad7a4175441235f2aac82668f9233c60412e412439b2e2af0bd1a45.png"},1184:(t,o,e)=>{e.d(o,{R:()=>i});var s=e(4041);const n={},a=s.createContext(n);function i(t){const o=s.useContext(a);return s.useMemo((function(){return"function"==typeof t?t(o):{...o,...t}}),[o,t])}}}]);
1
+ "use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([[407],{2279:(t,o,e)=>{e.r(o),e.d(o,{assets:()=>r,contentTitle:()=>i,default:()=>h,frontMatter:()=>a,metadata:()=>c,toc:()=>d});var s=e(1085),n=e(1184);const a={title:"Handbooks"},i=void 0,c={id:"tools/handbooks",title:"Handbooks",description:"Introduction",source:"@site/docs/tools/handbooks.md",sourceDirName:"tools",slug:"/tools/handbooks",permalink:"/tools/staticdocs/docs/tools/handbooks",draft:!1,unlisted:!1,editUrl:"https://github.com/OpenC3/cosmos/tree/main/docs.openc3.com/docs/tools/handbooks.md",tags:[],version:"current",frontMatter:{title:"Handbooks"},sidebar:"defaultSidebar",previous:{title:"Data Viewer",permalink:"/tools/staticdocs/docs/tools/data-viewer"},next:{title:"Limits Monitor",permalink:"/tools/staticdocs/docs/tools/limits-monitor"}},r={},d=[{value:"Introduction",id:"introduction",level:2}];function l(t){const o={a:"a",h2:"h2",img:"img",p:"p",...(0,n.R)(),...t.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(o.h2,{id:"introduction",children:"Introduction"}),"\n",(0,s.jsxs)(o.p,{children:["Handbooks formats the COSMOS ",(0,s.jsx)(o.a,{href:"/tools/staticdocs/docs/configuration/command",children:"command"})," and ",(0,s.jsx)(o.a,{href:"/tools/staticdocs/docs/configuration/telemetry",children:"telemetry"})," definitions into a nicely formatted webpage that can be exported to a PDF."]}),"\n",(0,s.jsx)(o.p,{children:(0,s.jsx)(o.img,{alt:"Handbooks",src:e(1226).A+"",width:"1270",height:"710"})}),"\n",(0,s.jsx)(o.p,{children:"You can select the targets you want to display and the number of columns to display on the page. You can then use the browser to Print the page. Most browsers have the capability to Save as PDF rather than print to save the resulting page as PDF."})]})}function h(t={}){const{wrapper:o}={...(0,n.R)(),...t.components};return o?(0,s.jsx)(o,{...t,children:(0,s.jsx)(l,{...t})}):l(t)}},1226:(t,o,e)=>{e.d(o,{A:()=>s});const s=e.p+"assets/images/handbooks-948da6f5aad7a4175441235f2aac82668f9233c60412e412439b2e2af0bd1a45.png"},1184:(t,o,e)=>{e.d(o,{R:()=>i});var s=e(4041);const n={},a=s.createContext(n);function i(t){const o=s.useContext(a);return s.useMemo((function(){return"function"==typeof t?t(o):{...o,...t}}),[o,t])}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([[6854],{5036:o=>{o.exports=JSON.parse('{"categoryGeneratedIndex":{"title":"Configuration","slug":"/configuration","permalink":"/tools/staticdocs/docs/configuration","sidebar":"defaultSidebar","navigation":{"previous":{"title":"Podman","permalink":"/tools/staticdocs/docs/getting-started/podman"},"next":{"title":"File Format","permalink":"/tools/staticdocs/docs/configuration/format"}}}}')}}]);
1
+ "use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([[5728],{8800:o=>{o.exports=JSON.parse('{"categoryGeneratedIndex":{"title":"Configuration","slug":"/configuration","permalink":"/tools/staticdocs/docs/configuration","sidebar":"defaultSidebar","navigation":{"previous":{"title":"Podman","permalink":"/tools/staticdocs/docs/getting-started/podman"},"next":{"title":"File Format","permalink":"/tools/staticdocs/docs/configuration/format"}}}}')}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([[3718],{3236:(e,t,s)=>{s.r(t),s.d(t,{assets:()=>d,contentTitle:()=>l,default:()=>a,frontMatter:()=>r,metadata:()=>o,toc:()=>c});var n=s(1085),i=s(1184);const r={title:"Performance"},l="COSMOS Hardware Requirements",o={id:"guides/performance",title:"Performance",description:"The COSMOS architecture was created with scalability in mind. Our goal is to support an unlimited number of connections and use cloud technologies to scale. Only COSMOS Enterprise Edition supports Kubernetes and the various cloud platforms which allow this level of scalability. While true scalability is only achieved in COSMOS Enterprise, both Open Source and Enterprise have various levels of observability and configuration settings which can affect performance.",source:"@site/docs/guides/performance.md",sourceDirName:"guides",slug:"/guides/performance",permalink:"/tools/staticdocs/docs/guides/performance",draft:!1,unlisted:!1,editUrl:"https://github.com/OpenC3/cosmos/tree/main/docs.openc3.com/docs/guides/performance.md",tags:[],version:"current",frontMatter:{title:"Performance"},sidebar:"defaultSidebar",previous:{title:"Monitoring",permalink:"/tools/staticdocs/docs/guides/monitoring"},next:{title:"Raspberry Pi",permalink:"/tools/staticdocs/docs/guides/raspberrypi"}},d={},c=[{value:"Memory",id:"memory",level:2},{value:"CPU",id:"cpu",level:2},{value:"Performance Comparison",id:"performance-comparison",level:2}];function h(e){const t={a:"a",code:"code",h1:"h1",h2:"h2",li:"li",ol:"ol",p:"p",pre:"pre",section:"section",sup:"sup",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,i.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(t.p,{children:["The COSMOS architecture was created with scalability in mind. Our goal is to support an unlimited number of connections and use cloud technologies to scale. Only ",(0,n.jsx)(t.a,{href:"https://openc3.com/enterprise",children:"COSMOS Enterprise Edition"})," supports Kubernetes and the various cloud platforms which allow this level of scalability. While true scalability is only achieved in COSMOS Enterprise, both Open Source and Enterprise have various levels of observability and configuration settings which can affect performance."]}),"\n",(0,n.jsx)(t.h1,{id:"cosmos-hardware-requirements",children:"COSMOS Hardware Requirements"}),"\n",(0,n.jsx)(t.h2,{id:"memory",children:"Memory"}),"\n",(0,n.jsx)(t.p,{children:"COSMOS can run on a Raspberry Pi up to a Kubernetes cluster in the cloud. On all platforms the key performance factor is the number and complexity of the targets and their defined packets. Targets can vary from simple targets taking 100 MB of RAM to complex targets taking 400 MB. The base COSMOS containers require about 800 MB of RAM. A good rule of thumb is to average about 300 MB of RAM for targets. As an example data point, the COSMOS Demo has 4 targets, two complex (INST & INST2) and two relatively simple (EXAMPLE & TEMPLATED), and requires 800 MB of RAM (on top of the 800 MB of base container RAM)."}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsx)(t.li,{children:"Base RAM MB Calculator = 800 + (num targets) * 300"}),"\n"]}),"\n",(0,n.jsxs)(t.p,{children:["In addition, the Redis streams contain the last 10 min of both raw and decommutated data from all targets. Thus you must wait ~15min to truly see what the high water memory mark will be. In the COSMOS Demo the INST & INST2 targets are fairly simple with four 1Hz packet of ~15 items and one 10Hz packet with 20 items. This only causes 50 MiB of redis RAM usage according to ",(0,n.jsx)(t.code,{children:"docker stats"}),". Installing the COSMOS ",(0,n.jsx)(t.a,{href:"https://github.com/OpenC3/openc3-cosmos-load-sim",children:"LoadSim"})," with 10 packets with 1000 items each at 10Hz pushed the redis memory usage to about 350 MiB."]}),"\n",(0,n.jsx)(t.h2,{id:"cpu",children:"CPU"}),"\n",(0,n.jsx)(t.p,{children:"Another consideration is the CPU performance. In the Open Source Edition, by default COSMOS spawns off 2 microservices per target. One combines packet logging and decommutation of the data and the other performs data reduction. In COSMOS Enterprise Edition on Kubernetes, each process becomes an independent container that is deployed on the cluster allowing horizontal scaling."}),"\n",(0,n.jsxs)(t.p,{children:["The COSMOS command and telemetry API and script running API servers should have a dedicated core while targets can generally share cores. It's hard to provide a general rule of thumb with the wide variety of architectures, clock speeds, and core counts. The best practice is to install COSMOS with the expected load and do some monitoring with ",(0,n.jsx)(t.code,{children:"htop"})," to visualize the load on the various cores. Any time a single core gets overloaded (100%) this is a concern and system slowdown can occur."]}),"\n",(0,n.jsx)(t.h2,{id:"performance-comparison",children:"Performance Comparison"}),"\n",(0,n.jsxs)(t.p,{children:["Performance characterization was performed in Azure on a Standard D4s v5 (4 vcpus, 16 GiB memory) chosen to allow virtualization per ",(0,n.jsx)(t.a,{href:"https://docs.docker.com/desktop/vm-vdi/#turn-on-nested-virtualization-on-microsoft-hyper-v",children:"Docker"}),". COSMOS ",(0,n.jsx)(t.a,{href:"https://github.com/OpenC3/cosmos-enterprise/releases/tag/v5.9.1",children:"5.9.1"})," Enterprise Edition was installed on both Windows 11 Pro ",(0,n.jsx)(t.sup,{children:(0,n.jsx)(t.a,{href:"#user-content-fn-1",id:"user-content-fnref-1","data-footnote-ref":!0,"aria-describedby":"footnote-label",children:"1"})})," and Ubuntu 22. Note: Enterprise Edition was not utilizing Kubernetes, just Docker. Testing involved starting the COSMOS Demo, connecting all targets (EXAMPLE, INST, INST2, TEMPLATED), opening the following TlmViewer screens (ADCS, ARRAY, BLOCK, COMMANDING, HS, LATEST, LIMITS, OTHER, PARAMS, SIMPLE, TABS) and creating two TlmGrapher graphs consisting of INST HEALTH_STATUS TEMP[1-4] and INST ADCS POS[X,Y,Z] and INST ADCS VEL[X,Y,Z]. This was allowed to run for 1hr and results were collected using ",(0,n.jsx)(t.code,{children:"htop"}),":"]}),"\n",(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{style:{textAlign:"left"},children:"Platform"}),(0,n.jsx)(t.th,{style:{textAlign:"left"},children:"Core CPU %"}),(0,n.jsx)(t.th,{style:{textAlign:"left"},children:"RAM"})]})}),(0,n.jsxs)(t.tbody,{children:[(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{style:{textAlign:"left"},children:"Windows 11 Pro"}),(0,n.jsx)(t.td,{style:{textAlign:"left"},children:"12% 12% 10% 10%"}),(0,n.jsx)(t.td,{style:{textAlign:"left"},children:"3.9G / 7.7G"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{style:{textAlign:"left"},children:"Headless Ubuntu 22"}),(0,n.jsx)(t.td,{style:{textAlign:"left"},children:"7% 7% 8% 6%"}),(0,n.jsx)(t.td,{style:{textAlign:"left"},children:"3.2G / 15.6G"})]})]})]}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsxs)(t.li,{children:["Windows was only allocated 8 GB of RAM due to the ",(0,n.jsx)(t.a,{href:"https://learn.microsoft.com/en-us/windows/wsl/wsl-config#configuration-setting-for-wslconfig",children:".wslconfig"})," settings."]}),"\n",(0,n.jsx)(t.li,{children:"Since Ubuntu was running headless, the screens and graphs were brought up on another machine."}),"\n"]}),"\n",(0,n.jsxs)(t.p,{children:[(0,n.jsx)(t.code,{children:"docker stats"})," was also run to show individual container cpu and memory usage:"]}),"\n",(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{style:{textAlign:"left"},children:"NAME"}),(0,n.jsx)(t.th,{style:{textAlign:"left"},children:"Windows CPU %"}),(0,n.jsx)(t.th,{children:"Ubuntu CPU %"}),(0,n.jsx)(t.th,{style:{textAlign:"left"},children:"Windows MEM"}),(0,n.jsx)(t.th,{children:"Ubuntu MEM"})]})}),(0,n.jsxs)(t.tbody,{children:[(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{style:{textAlign:"left"},children:"cosmos-enterprise-project-openc3-traefik-1"}),(0,n.jsx)(t.td,{style:{textAlign:"left"},children:"4.16%"}),(0,n.jsx)(t.td,{children:"1.32%"}),(0,n.jsx)(t.td,{style:{textAlign:"left"},children:"43.54MiB"}),(0,n.jsx)(t.td,{children:"51.38MiB"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{style:{textAlign:"left"},children:"cosmos-enterprise-project-openc3-cosmos-cmd-tlm-api-1"}),(0,n.jsx)(t.td,{style:{textAlign:"left"},children:"10.16%"}),(0,n.jsx)(t.td,{children:"6.14%"}),(0,n.jsx)(t.td,{style:{textAlign:"left"},children:"401.6MiB"}),(0,n.jsx)(t.td,{children:"392MiB"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{style:{textAlign:"left"},children:"cosmos-enterprise-project-openc3-keycloak-1"}),(0,n.jsx)(t.td,{style:{textAlign:"left"},children:"0.17%"}),(0,n.jsx)(t.td,{children:"0.13%"}),(0,n.jsx)(t.td,{style:{textAlign:"left"},children:"476.8MiB"}),(0,n.jsx)(t.td,{children:"476.8MiB"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{style:{textAlign:"left"},children:"cosmos-enterprise-project-openc3-operator-1"}),(0,n.jsx)(t.td,{style:{textAlign:"left"},children:"21.27%"}),(0,n.jsx)(t.td,{children:"13.91%"}),(0,n.jsx)(t.td,{style:{textAlign:"left"},children:"1.214GiB"}),(0,n.jsx)(t.td,{children:"1.207GiB"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{style:{textAlign:"left"},children:"cosmos-enterprise-project-openc3-cosmos-script-runner-api-1"}),(0,n.jsx)(t.td,{style:{textAlign:"left"},children:"0.01%"}),(0,n.jsx)(t.td,{children:"0.01%"}),(0,n.jsx)(t.td,{style:{textAlign:"left"},children:"127.4MiB"}),(0,n.jsx)(t.td,{children:"117.1MiB"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{style:{textAlign:"left"},children:"cosmos-enterprise-project-openc3-metrics-1"}),(0,n.jsx)(t.td,{style:{textAlign:"left"},children:"0.01%"}),(0,n.jsx)(t.td,{children:"0.00%"}),(0,n.jsx)(t.td,{style:{textAlign:"left"},children:"105.2MiB"}),(0,n.jsx)(t.td,{children:"83.87MiB"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{style:{textAlign:"left"},children:"cosmos-enterprise-project-openc3-redis-ephemeral-1"}),(0,n.jsx)(t.td,{style:{textAlign:"left"},children:"4.05%"}),(0,n.jsx)(t.td,{children:"1.89%"}),(0,n.jsx)(t.td,{style:{textAlign:"left"},children:"46.22MiB"}),(0,n.jsx)(t.td,{children:"69.84MiB"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{style:{textAlign:"left"},children:"cosmos-enterprise-project-openc3-redis-1"}),(0,n.jsx)(t.td,{style:{textAlign:"left"},children:"1.56%"}),(0,n.jsx)(t.td,{children:"0.72%"}),(0,n.jsx)(t.td,{style:{textAlign:"left"},children:"12.82MiB"}),(0,n.jsx)(t.td,{children:"9.484MiB"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{style:{textAlign:"left"},children:"cosmos-enterprise-project-openc3-minio-1"}),(0,n.jsx)(t.td,{style:{textAlign:"left"},children:"0.01%"}),(0,n.jsx)(t.td,{children:"0.00%"}),(0,n.jsx)(t.td,{style:{textAlign:"left"},children:"152.9MiB"}),(0,n.jsx)(t.td,{children:"169.8MiB"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{style:{textAlign:"left"},children:"cosmos-enterprise-project-openc3-postgresql-1"}),(0,n.jsx)(t.td,{style:{textAlign:"left"},children:"0.00%"}),(0,n.jsx)(t.td,{children:"0.39%"}),(0,n.jsx)(t.td,{style:{textAlign:"left"},children:"37.33MiB"}),(0,n.jsx)(t.td,{children:"41.02MiB"})]})]})]}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsx)(t.li,{children:"memory profiles are similar between the two platforms"}),"\n",(0,n.jsx)(t.li,{children:"redis-ephemeral isn't using much memory on the base Demo with its small packets"}),"\n"]}),"\n",(0,n.jsxs)(t.p,{children:["At this point the COSMOS ",(0,n.jsx)(t.a,{href:"https://github.com/OpenC3/openc3-cosmos-load-sim",children:"LoadSim"})," was installed with default settings which creates 10 packets with 1000 items each at 10Hz (110kB/s). After a 1 hr soak, htop now indicated:"]}),"\n",(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{style:{textAlign:"left"},children:"Platform"}),(0,n.jsx)(t.th,{style:{textAlign:"left"},children:"Core CPU %"}),(0,n.jsx)(t.th,{style:{textAlign:"left"},children:"RAM"})]})}),(0,n.jsxs)(t.tbody,{children:[(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{style:{textAlign:"left"},children:"Windows 11 Pro"}),(0,n.jsx)(t.td,{style:{textAlign:"left"},children:"40% 35% 39% 42%"}),(0,n.jsx)(t.td,{style:{textAlign:"left"},children:"4.64G / 7.7G"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{style:{textAlign:"left"},children:"Headless Ubuntu 22"}),(0,n.jsx)(t.td,{style:{textAlign:"left"},children:"17% 20% 16% 18%"}),(0,n.jsx)(t.td,{style:{textAlign:"left"},children:"3.74G / 15.6G"})]})]})]}),"\n",(0,n.jsx)(t.p,{children:"The larger packets and data rate of the LoadSim target caused both platforms to dramatically increase CPU utilization but the Linux machine stays quite performant."}),"\n",(0,n.jsxs)(t.p,{children:[(0,n.jsx)(t.code,{children:"docker stats"})," was also run to show individual container cpu and memory usage:"]}),"\n",(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{style:{textAlign:"left"},children:"NAME"}),(0,n.jsx)(t.th,{style:{textAlign:"left"},children:"Windows CPU %"}),(0,n.jsx)(t.th,{children:"Ubuntu CPU %"}),(0,n.jsx)(t.th,{style:{textAlign:"left"},children:"Windows MEM"}),(0,n.jsx)(t.th,{children:"Ubuntu MEM"})]})}),(0,n.jsxs)(t.tbody,{children:[(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{style:{textAlign:"left"},children:"cosmos-enterprise-project-openc3-traefik-1"}),(0,n.jsx)(t.td,{style:{textAlign:"left"},children:"4.09%"}),(0,n.jsx)(t.td,{children:"0.01%"}),(0,n.jsx)(t.td,{style:{textAlign:"left"},children:"44.3MiB"}),(0,n.jsx)(t.td,{children:"0.34MiB"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{style:{textAlign:"left"},children:"cosmos-enterprise-project-openc3-cosmos-cmd-tlm-api-1"}),(0,n.jsx)(t.td,{style:{textAlign:"left"},children:"17.78%"}),(0,n.jsx)(t.td,{children:"6.18%"}),(0,n.jsx)(t.td,{style:{textAlign:"left"},children:"407.9MiB"}),(0,n.jsx)(t.td,{children:"405.8MiB"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{style:{textAlign:"left"},children:"cosmos-enterprise-project-openc3-keycloak-1"}),(0,n.jsx)(t.td,{style:{textAlign:"left"},children:"0.20%"}),(0,n.jsx)(t.td,{children:"0.12%"}),(0,n.jsx)(t.td,{style:{textAlign:"left"},children:"480.2MiB"}),(0,n.jsx)(t.td,{children:"481.5MiB"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{style:{textAlign:"left"},children:"cosmos-enterprise-project-openc3-operator-1"}),(0,n.jsx)(t.td,{style:{textAlign:"left"},children:"221.15%"}),(0,n.jsx)(t.td,{children:"66.72%"}),(0,n.jsx)(t.td,{style:{textAlign:"left"},children:"1.6GiB"}),(0,n.jsx)(t.td,{children:"1.512GiB"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{style:{textAlign:"left"},children:"cosmos-enterprise-project-openc3-cosmos-script-runner-api-1"}),(0,n.jsx)(t.td,{style:{textAlign:"left"},children:"0.01%"}),(0,n.jsx)(t.td,{children:"0.01%"}),(0,n.jsx)(t.td,{style:{textAlign:"left"},children:"136.6MiB"}),(0,n.jsx)(t.td,{children:"127.5MiB"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{style:{textAlign:"left"},children:"cosmos-enterprise-project-openc3-metrics-1"}),(0,n.jsx)(t.td,{style:{textAlign:"left"},children:"0.01%"}),(0,n.jsx)(t.td,{children:"0.01%"}),(0,n.jsx)(t.td,{style:{textAlign:"left"},children:"106.3MiB"}),(0,n.jsx)(t.td,{children:"84.87MiB"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{style:{textAlign:"left"},children:"cosmos-enterprise-project-openc3-redis-ephemeral-1"}),(0,n.jsx)(t.td,{style:{textAlign:"left"},children:"19.63%"}),(0,n.jsx)(t.td,{children:"3.91%"}),(0,n.jsx)(t.td,{style:{textAlign:"left"},children:"333.8MiB"}),(0,n.jsx)(t.td,{children:"370.8MiB"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{style:{textAlign:"left"},children:"cosmos-enterprise-project-openc3-redis-1"}),(0,n.jsx)(t.td,{style:{textAlign:"left"},children:"7.42%"}),(0,n.jsx)(t.td,{children:"1.49%"}),(0,n.jsx)(t.td,{style:{textAlign:"left"},children:"15.87MiB"}),(0,n.jsx)(t.td,{children:"11.81MiB"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{style:{textAlign:"left"},children:"cosmos-enterprise-project-openc3-minio-1"}),(0,n.jsx)(t.td,{style:{textAlign:"left"},children:"0.10%"}),(0,n.jsx)(t.td,{children:"0.02%"}),(0,n.jsx)(t.td,{style:{textAlign:"left"},children:"167.8MiB"}),(0,n.jsx)(t.td,{children:"179.2MiB"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{style:{textAlign:"left"},children:"cosmos-enterprise-project-openc3-postgresql-1"}),(0,n.jsx)(t.td,{style:{textAlign:"left"},children:"0.00%"}),(0,n.jsx)(t.td,{children:"0.00%"}),(0,n.jsx)(t.td,{style:{textAlign:"left"},children:"35.4MiB"}),(0,n.jsx)(t.td,{children:"42.93MiB"})]})]})]}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsx)(t.li,{children:"memory profiles are similar between the two platforms"}),"\n",(0,n.jsx)(t.li,{children:"redis-ephemeral is now using much more RAM as it is storing the large LoadSim packets"}),"\n",(0,n.jsx)(t.li,{children:"Windows is using much more CPU power running the operator, cmd-tlm, and redis"}),"\n"]}),"\n",(0,n.jsx)(t.h1,{id:"conclusions",children:"Conclusions"}),"\n",(0,n.jsxs)(t.p,{children:["While it is easy to run COSMOS on any Docker platform, increasing the number and complexity of the targets requires choosing the correct hardware. Sizing can be approximated but the best solution is to install representative targets and use ",(0,n.jsx)(t.code,{children:"docker stats"})," and ",(0,n.jsx)(t.code,{children:"htop"})," to judge the CPU and memory pressure on the given hardware."]}),"\n",(0,n.jsxs)(t.p,{children:[(0,n.jsx)(t.a,{href:"https://openc3.com/enterprise",children:"COSMOS Enterprise Edition"})," on Kubernetes helps to eliminate the hardware sizing issue by scaling the cluster to meet the needs of the system. Check out ",(0,n.jsx)(t.a,{href:"https://openc3.com/news/scaling",children:"this recent talk"})," Ryan gave at GSAW showing how we scaled to over 160 satellites on a 4 node kubernetes cluster on EKS."]}),"\n",(0,n.jsx)("hr",{}),"\n","\n",(0,n.jsxs)(t.section,{"data-footnotes":!0,className:"footnotes",children:[(0,n.jsx)(t.h2,{className:"sr-only",id:"footnote-label",children:"Footnotes"}),"\n",(0,n.jsxs)(t.ol,{children:["\n",(0,n.jsxs)(t.li,{id:"user-content-fn-1",children:["\n",(0,n.jsx)(t.p,{children:"Full specs of the Windows Platform:"}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{children:"Windows 11 Pro\nDocker Desktop 4.22.0\nWSL version: 1.2.5.0\nKernel version: 5.15.90.1\nWSLg version: 1.0.51\nMSRDC version: 1.2.3770\nDirect3D version: 1.608.2-61064218\nDXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp\nWindows version: 10.0.22621.2134\n"})}),"\n",(0,n.jsx)(t.a,{href:"#user-content-fnref-1","data-footnote-backref":"","aria-label":"Back to reference 1",className:"data-footnote-backref",children:"\u21a9"}),"\n"]}),"\n"]}),"\n"]})]})}function a(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(h,{...e})}):h(e)}},1184:(e,t,s)=>{s.d(t,{R:()=>l});var n=s(4041);const i={},r=n.createContext(i);function l(e){const t=n.useContext(r);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([[7209],{9016:(e,t,n)=>{n.r(t),n.d(t,{default:()=>be});var a=n(4041),o=n(4357),i=n(145),s=n(7473),l=n(5096),c=n(7186),r=n(9082),d=n(1034),u=n(9404);const m={backToTopButton:"backToTopButton_z1FD",backToTopButtonShow:"backToTopButtonShow_w1wE"};var b=n(1085);function h(){const{shown:e,scrollToTop:t}=function(e){let{threshold:t}=e;const[n,o]=(0,a.useState)(!1),i=(0,a.useRef)(!1),{startScroll:s,cancelScroll:l}=(0,d.gk)();return(0,d.Mq)(((e,n)=>{let{scrollY:a}=e;const s=n?.scrollY;s&&(i.current?i.current=!1:a>=s?(l(),o(!1)):a<t?o(!1):a+window.innerHeight<document.documentElement.scrollHeight&&o(!0))})),(0,u.$)((e=>{e.location.hash&&(i.current=!0,o(!1))})),{shown:n,scrollToTop:()=>s(0)}}({threshold:300});return(0,b.jsx)("button",{"aria-label":(0,r.T)({id:"theme.BackToTopButton.buttonAriaLabel",message:"Scroll back to top",description:"The ARIA label for the back to top button"}),className:(0,o.A)("clean-btn",s.G.common.backToTopButton,m.backToTopButton,e&&m.backToTopButtonShow),type:"button",onClick:t})}var p=n(2631),x=n(6090),f=n(1187),j=n(2520),v=n(1631);function _(e){return(0,b.jsx)("svg",{width:"20",height:"20","aria-hidden":"true",...e,children:(0,b.jsxs)("g",{fill:"#7a7a7a",children:[(0,b.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,b.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"})]})})}const g={collapseSidebarButton:"collapseSidebarButton_Ftvb",collapseSidebarButtonIcon:"collapseSidebarButtonIcon_c4WT"};function C(e){let{onClick:t}=e;return(0,b.jsx)("button",{type:"button",title:(0,r.T)({id:"theme.docs.sidebar.collapseButtonTitle",message:"Collapse sidebar",description:"The title attribute for collapse button of doc sidebar"}),"aria-label":(0,r.T)({id:"theme.docs.sidebar.collapseButtonAriaLabel",message:"Collapse sidebar",description:"The title attribute for collapse button of doc sidebar"}),className:(0,o.A)("button button--secondary button--outline",g.collapseSidebarButton),onClick:t,children:(0,b.jsx)(_,{className:g.collapseSidebarButtonIcon})})}var A=n(9303),S=n(1786);const k=Symbol("EmptyContext"),T=a.createContext(k);function N(e){let{children:t}=e;const[n,o]=(0,a.useState)(null),i=(0,a.useMemo)((()=>({expandedItem:n,setExpandedItem:o})),[n]);return(0,b.jsx)(T.Provider,{value:i,children:t})}var I=n(6476),B=n(4271),y=n(2436),w=n(213);function L(e){let{collapsed:t,categoryLabel:n,onClick:a}=e;return(0,b.jsx)("button",{"aria-label":t?(0,r.T)({id:"theme.DocSidebarItem.expandCategoryAriaLabel",message:"Expand sidebar category '{label}'",description:"The ARIA label to expand the sidebar category"},{label:n}):(0,r.T)({id:"theme.DocSidebarItem.collapseCategoryAriaLabel",message:"Collapse sidebar category '{label}'",description:"The ARIA label to collapse the sidebar category"},{label:n}),"aria-expanded":!t,type:"button",className:"clean-btn menu__caret",onClick:a})}function E(e){let{item:t,onItemClick:n,activePath:i,level:c,index:r,...d}=e;const{items:u,label:m,collapsible:h,className:p,href:x}=t,{docs:{sidebar:{autoCollapseCategories:f}}}=(0,j.p)(),v=function(e){const t=(0,w.A)();return(0,a.useMemo)((()=>e.href&&!e.linkUnlisted?e.href:!t&&e.collapsible?(0,l.Nr)(e):void 0),[e,t])}(t),_=(0,l.w8)(t,i),g=(0,B.ys)(x,i),{collapsed:C,setCollapsed:A}=(0,I.u)({initialState:()=>!!h&&(!_&&t.collapsed)}),{expandedItem:N,setExpandedItem:E}=function(){const e=(0,a.useContext)(T);if(e===k)throw new S.dV("DocSidebarItemsExpandedStateProvider");return e}(),M=function(e){void 0===e&&(e=!C),E(e?null:r),A(e)};return function(e){let{isActive:t,collapsed:n,updateCollapsed:o}=e;const i=(0,S.ZC)(t);(0,a.useEffect)((()=>{t&&!i&&n&&o(!1)}),[t,i,n,o])}({isActive:_,collapsed:C,updateCollapsed:M}),(0,a.useEffect)((()=>{h&&null!=N&&N!==r&&f&&A(!0)}),[h,N,r,A,f]),(0,b.jsxs)("li",{className:(0,o.A)(s.G.docs.docSidebarItemCategory,s.G.docs.docSidebarItemCategoryLevel(c),"menu__list-item",{"menu__list-item--collapsed":C},p),children:[(0,b.jsxs)("div",{className:(0,o.A)("menu__list-item-collapsible",{"menu__list-item-collapsible--active":g}),children:[(0,b.jsx)(y.A,{className:(0,o.A)("menu__link",{"menu__link--sublist":h,"menu__link--sublist-caret":!x&&h,"menu__link--active":_}),onClick:h?e=>{n?.(t),x?M(!1):(e.preventDefault(),M())}:()=>{n?.(t)},"aria-current":g?"page":void 0,role:h&&!x?"button":void 0,"aria-expanded":h&&!x?!C:void 0,href:h?v??"#":v,...d,children:m}),x&&h&&(0,b.jsx)(L,{collapsed:C,categoryLabel:m,onClick:e=>{e.preventDefault(),M()}})]}),(0,b.jsx)(I.N,{lazy:!0,as:"ul",className:"menu__list",collapsed:C,children:(0,b.jsx)(V,{items:u,tabIndex:C?-1:0,onItemClick:n,activePath:i,level:c+1})})]})}var M=n(5436),H=n(7545);const R={menuExternalLink:"menuExternalLink_xK2O"};function W(e){let{item:t,onItemClick:n,activePath:a,level:i,index:c,...r}=e;const{href:d,label:u,className:m,autoAddBaseUrl:h}=t,p=(0,l.w8)(t,a),x=(0,M.A)(d);return(0,b.jsx)("li",{className:(0,o.A)(s.G.docs.docSidebarItemLink,s.G.docs.docSidebarItemLinkLevel(i),"menu__list-item",m),children:(0,b.jsxs)(y.A,{className:(0,o.A)("menu__link",!x&&R.menuExternalLink,{"menu__link--active":p}),autoAddBaseUrl:h,"aria-current":p?"page":void 0,to:d,...x&&{onClick:n?()=>n(t):void 0},...r,children:[u,!x&&(0,b.jsx)(H.A,{})]})},u)}const G={menuHtmlItem:"menuHtmlItem_anEq"};function P(e){let{item:t,level:n,index:a}=e;const{value:i,defaultStyle:l,className:c}=t;return(0,b.jsx)("li",{className:(0,o.A)(s.G.docs.docSidebarItemLink,s.G.docs.docSidebarItemLinkLevel(n),l&&[G.menuHtmlItem,"menu__list-item"],c),dangerouslySetInnerHTML:{__html:i}},a)}function D(e){let{item:t,...n}=e;switch(t.type){case"category":return(0,b.jsx)(E,{item:t,...n});case"html":return(0,b.jsx)(P,{item:t,...n});default:return(0,b.jsx)(W,{item:t,...n})}}function F(e){let{items:t,...n}=e;const a=(0,l.Y)(t,n.activePath);return(0,b.jsx)(N,{children:a.map(((e,t)=>(0,b.jsx)(D,{item:e,index:t,...n},t)))})}const V=(0,a.memo)(F),q={menu:"menu_qiME",menuWithAnnouncementBar:"menuWithAnnouncementBar_hRfJ"};function z(e){let{path:t,sidebar:n,className:i}=e;const l=function(){const{isActive:e}=(0,A.Mj)(),[t,n]=(0,a.useState)(e);return(0,d.Mq)((t=>{let{scrollY:a}=t;e&&n(0===a)}),[e]),e&&t}();return(0,b.jsx)("nav",{"aria-label":(0,r.T)({id:"theme.docs.sidebar.navAriaLabel",message:"Docs sidebar",description:"The ARIA label for the sidebar navigation"}),className:(0,o.A)("menu thin-scrollbar",q.menu,l&&q.menuWithAnnouncementBar,i),children:(0,b.jsx)("ul",{className:(0,o.A)(s.G.docs.docSidebarMenu,"menu__list"),children:(0,b.jsx)(V,{items:n,activePath:t,level:1})})})}const Y="sidebar_vJCc",K="sidebarWithHideableNavbar_Fo4g",U="sidebarHidden_vBKa",O="sidebarLogo_nlll";function X(e){let{path:t,sidebar:n,onCollapse:a,isHidden:i}=e;const{navbar:{hideOnScroll:s},docs:{sidebar:{hideable:l}}}=(0,j.p)();return(0,b.jsxs)("div",{className:(0,o.A)(Y,s&&K,i&&U),children:[s&&(0,b.jsx)(v.A,{tabIndex:-1,className:O}),(0,b.jsx)(z,{path:t,sidebar:n}),l&&(0,b.jsx)(C,{onClick:a})]})}const J=a.memo(X);var Z=n(7226),Q=n(2106);const $=e=>{let{sidebar:t,path:n}=e;const a=(0,Q.M)();return(0,b.jsx)("ul",{className:(0,o.A)(s.G.docs.docSidebarMenu,"menu__list"),children:(0,b.jsx)(V,{items:t,activePath:n,onItemClick:e=>{"category"===e.type&&e.href&&a.toggle(),"link"===e.type&&a.toggle()},level:1})})};function ee(e){return(0,b.jsx)(Z.GX,{component:$,props:e})}const te=a.memo(ee);function ne(e){const t=(0,f.l)(),n="desktop"===t||"ssr"===t,a="mobile"===t;return(0,b.jsxs)(b.Fragment,{children:[n&&(0,b.jsx)(J,{...e}),a&&(0,b.jsx)(te,{...e})]})}const ae={expandButton:"expandButton_SZY_",expandButtonIcon:"expandButtonIcon_CMLm"};function oe(e){let{toggleSidebar:t}=e;return(0,b.jsx)("div",{className:ae.expandButton,title:(0,r.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,r.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:t,onClick:t,children:(0,b.jsx)(_,{className:ae.expandButtonIcon})})}const ie={docSidebarContainer:"docSidebarContainer_e5ai",docSidebarContainerHidden:"docSidebarContainerHidden_vqQo",sidebarViewport:"sidebarViewport_N8x0"};function se(e){let{children:t}=e;const n=(0,c.t)();return(0,b.jsx)(a.Fragment,{children:t},n?.name??"noSidebar")}function le(e){let{sidebar:t,hiddenSidebarContainer:n,setHiddenSidebarContainer:i}=e;const{pathname:l}=(0,x.zy)(),[c,r]=(0,a.useState)(!1),d=(0,a.useCallback)((()=>{c&&r(!1),!c&&(0,p.O)()&&r(!0),i((e=>!e))}),[i,c]);return(0,b.jsx)("aside",{className:(0,o.A)(s.G.docs.docSidebarContainer,ie.docSidebarContainer,n&&ie.docSidebarContainerHidden),onTransitionEnd:e=>{e.currentTarget.classList.contains(ie.docSidebarContainer)&&n&&r(!0)},children:(0,b.jsx)(se,{children:(0,b.jsxs)("div",{className:(0,o.A)(ie.sidebarViewport,c&&ie.sidebarViewportHidden),children:[(0,b.jsx)(ne,{sidebar:t,path:l,onCollapse:d,isHidden:c}),c&&(0,b.jsx)(oe,{toggleSidebar:d})]})})})}const ce={docMainContainer:"docMainContainer_namt",docMainContainerEnhanced:"docMainContainerEnhanced_sRjM",docItemWrapperEnhanced:"docItemWrapperEnhanced_TX_6"};function re(e){let{hiddenSidebarContainer:t,children:n}=e;const a=(0,c.t)();return(0,b.jsx)("main",{className:(0,o.A)(ce.docMainContainer,(t||!a)&&ce.docMainContainerEnhanced),children:(0,b.jsx)("div",{className:(0,o.A)("container padding-top--md padding-bottom--lg",ce.docItemWrapper,t&&ce.docItemWrapperEnhanced),children:n})})}const de={docRoot:"docRoot_HciC",docsWrapper:"docsWrapper_XLvK"};function ue(e){let{children:t}=e;const n=(0,c.t)(),[o,i]=(0,a.useState)(!1);return(0,b.jsxs)("div",{className:de.docsWrapper,children:[(0,b.jsx)(h,{}),(0,b.jsxs)("div",{className:de.docRoot,children:[n&&(0,b.jsx)(le,{sidebar:n.items,hiddenSidebarContainer:o,setHiddenSidebarContainer:i}),(0,b.jsx)(re,{hiddenSidebarContainer:o,children:t})]})]})}var me=n(2757);function be(e){const t=(0,l.B5)(e);if(!t)return(0,b.jsx)(me.A,{});const{docElement:n,sidebarName:a,sidebarItems:r}=t;return(0,b.jsx)(i.e3,{className:(0,o.A)(s.G.page.docsDocPage),children:(0,b.jsx)(c.V,{name:a,items:r,children:(0,b.jsx)(ue,{children:n})})})}},2757:(e,t,n)=>{n.d(t,{A:()=>l});n(4041);var a=n(4357),o=n(9082),i=n(4775),s=n(1085);function l(e){let{className:t}=e;return(0,s.jsx)("main",{className:(0,a.A)("container margin-vert--xl",t),children:(0,s.jsx)("div",{className:"row",children:(0,s.jsxs)("div",{className:"col col--6 col--offset-3",children:[(0,s.jsx)(i.A,{as:"h1",className:"hero__title",children:(0,s.jsx)(o.A,{id:"theme.NotFound.title",description:"The title of the 404 page",children:"Page Not Found"})}),(0,s.jsx)("p",{children:(0,s.jsx)(o.A,{id:"theme.NotFound.p1",description:"The first paragraph of the 404 page",children:"We could not find what you were looking for."})}),(0,s.jsx)("p",{children:(0,s.jsx)(o.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
+ "use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([[7209],{9016:(e,t,n)=>{n.r(t),n.d(t,{default:()=>be});var a=n(4041),o=n(4357),i=n(145),s=n(7473),l=n(5096),c=n(7186),r=n(9082),d=n(1034),u=n(9404);const m={backToTopButton:"backToTopButton_z1FD",backToTopButtonShow:"backToTopButtonShow_w1wE"};var b=n(1085);function h(){const{shown:e,scrollToTop:t}=function(e){let{threshold:t}=e;const[n,o]=(0,a.useState)(!1),i=(0,a.useRef)(!1),{startScroll:s,cancelScroll:l}=(0,d.gk)();return(0,d.Mq)(((e,n)=>{let{scrollY:a}=e;const s=n?.scrollY;s&&(i.current?i.current=!1:a>=s?(l(),o(!1)):a<t?o(!1):a+window.innerHeight<document.documentElement.scrollHeight&&o(!0))})),(0,u.$)((e=>{e.location.hash&&(i.current=!0,o(!1))})),{shown:n,scrollToTop:()=>s(0)}}({threshold:300});return(0,b.jsx)("button",{"aria-label":(0,r.T)({id:"theme.BackToTopButton.buttonAriaLabel",message:"Scroll back to top",description:"The ARIA label for the back to top button"}),className:(0,o.A)("clean-btn",s.G.common.backToTopButton,m.backToTopButton,e&&m.backToTopButtonShow),type:"button",onClick:t})}var p=n(2631),x=n(6090),f=n(1187),j=n(2520),v=n(1631);function _(e){return(0,b.jsx)("svg",{width:"20",height:"20","aria-hidden":"true",...e,children:(0,b.jsxs)("g",{fill:"#7a7a7a",children:[(0,b.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,b.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"})]})})}const g={collapseSidebarButton:"collapseSidebarButton_Ftvb",collapseSidebarButtonIcon:"collapseSidebarButtonIcon_c4WT"};function C(e){let{onClick:t}=e;return(0,b.jsx)("button",{type:"button",title:(0,r.T)({id:"theme.docs.sidebar.collapseButtonTitle",message:"Collapse sidebar",description:"The title attribute for collapse button of doc sidebar"}),"aria-label":(0,r.T)({id:"theme.docs.sidebar.collapseButtonAriaLabel",message:"Collapse sidebar",description:"The title attribute for collapse button of doc sidebar"}),className:(0,o.A)("button button--secondary button--outline",g.collapseSidebarButton),onClick:t,children:(0,b.jsx)(_,{className:g.collapseSidebarButtonIcon})})}var A=n(9303),S=n(1786);const k=Symbol("EmptyContext"),T=a.createContext(k);function N(e){let{children:t}=e;const[n,o]=(0,a.useState)(null),i=(0,a.useMemo)((()=>({expandedItem:n,setExpandedItem:o})),[n]);return(0,b.jsx)(T.Provider,{value:i,children:t})}var I=n(6476),B=n(4271),y=n(2436),w=n(213);function L(e){let{collapsed:t,categoryLabel:n,onClick:a}=e;return(0,b.jsx)("button",{"aria-label":t?(0,r.T)({id:"theme.DocSidebarItem.expandCategoryAriaLabel",message:"Expand sidebar category '{label}'",description:"The ARIA label to expand the sidebar category"},{label:n}):(0,r.T)({id:"theme.DocSidebarItem.collapseCategoryAriaLabel",message:"Collapse sidebar category '{label}'",description:"The ARIA label to collapse the sidebar category"},{label:n}),"aria-expanded":!t,type:"button",className:"clean-btn menu__caret",onClick:a})}function E(e){let{item:t,onItemClick:n,activePath:i,level:c,index:r,...d}=e;const{items:u,label:m,collapsible:h,className:p,href:x}=t,{docs:{sidebar:{autoCollapseCategories:f}}}=(0,j.p)(),v=function(e){const t=(0,w.A)();return(0,a.useMemo)((()=>e.href&&!e.linkUnlisted?e.href:!t&&e.collapsible?(0,l.Nr)(e):void 0),[e,t])}(t),_=(0,l.w8)(t,i),g=(0,B.ys)(x,i),{collapsed:C,setCollapsed:A}=(0,I.u)({initialState:()=>!!h&&(!_&&t.collapsed)}),{expandedItem:N,setExpandedItem:E}=function(){const e=(0,a.useContext)(T);if(e===k)throw new S.dV("DocSidebarItemsExpandedStateProvider");return e}(),M=function(e){void 0===e&&(e=!C),E(e?null:r),A(e)};return function(e){let{isActive:t,collapsed:n,updateCollapsed:o}=e;const i=(0,S.ZC)(t);(0,a.useEffect)((()=>{t&&!i&&n&&o(!1)}),[t,i,n,o])}({isActive:_,collapsed:C,updateCollapsed:M}),(0,a.useEffect)((()=>{h&&null!=N&&N!==r&&f&&A(!0)}),[h,N,r,A,f]),(0,b.jsxs)("li",{className:(0,o.A)(s.G.docs.docSidebarItemCategory,s.G.docs.docSidebarItemCategoryLevel(c),"menu__list-item",{"menu__list-item--collapsed":C},p),children:[(0,b.jsxs)("div",{className:(0,o.A)("menu__list-item-collapsible",{"menu__list-item-collapsible--active":g}),children:[(0,b.jsx)(y.A,{className:(0,o.A)("menu__link",{"menu__link--sublist":h,"menu__link--sublist-caret":!x&&h,"menu__link--active":_}),onClick:h?e=>{n?.(t),x?M(!1):(e.preventDefault(),M())}:()=>{n?.(t)},"aria-current":g?"page":void 0,role:h&&!x?"button":void 0,"aria-expanded":h&&!x?!C:void 0,href:h?v??"#":v,...d,children:m}),x&&h&&(0,b.jsx)(L,{collapsed:C,categoryLabel:m,onClick:e=>{e.preventDefault(),M()}})]}),(0,b.jsx)(I.N,{lazy:!0,as:"ul",className:"menu__list",collapsed:C,children:(0,b.jsx)(V,{items:u,tabIndex:C?-1:0,onItemClick:n,activePath:i,level:c+1})})]})}var M=n(5436),H=n(7545);const R={menuExternalLink:"menuExternalLink_xK2O"};function W(e){let{item:t,onItemClick:n,activePath:a,level:i,index:c,...r}=e;const{href:d,label:u,className:m,autoAddBaseUrl:h}=t,p=(0,l.w8)(t,a),x=(0,M.A)(d);return(0,b.jsx)("li",{className:(0,o.A)(s.G.docs.docSidebarItemLink,s.G.docs.docSidebarItemLinkLevel(i),"menu__list-item",m),children:(0,b.jsxs)(y.A,{className:(0,o.A)("menu__link",!x&&R.menuExternalLink,{"menu__link--active":p}),autoAddBaseUrl:h,"aria-current":p?"page":void 0,to:d,...x&&{onClick:n?()=>n(t):void 0},...r,children:[u,!x&&(0,b.jsx)(H.A,{})]})},u)}const G={menuHtmlItem:"menuHtmlItem_anEq"};function P(e){let{item:t,level:n,index:a}=e;const{value:i,defaultStyle:l,className:c}=t;return(0,b.jsx)("li",{className:(0,o.A)(s.G.docs.docSidebarItemLink,s.G.docs.docSidebarItemLinkLevel(n),l&&[G.menuHtmlItem,"menu__list-item"],c),dangerouslySetInnerHTML:{__html:i}},a)}function D(e){let{item:t,...n}=e;switch(t.type){case"category":return(0,b.jsx)(E,{item:t,...n});case"html":return(0,b.jsx)(P,{item:t,...n});default:return(0,b.jsx)(W,{item:t,...n})}}function F(e){let{items:t,...n}=e;const a=(0,l.Y)(t,n.activePath);return(0,b.jsx)(N,{children:a.map(((e,t)=>(0,b.jsx)(D,{item:e,index:t,...n},t)))})}const V=(0,a.memo)(F),q={menu:"menu_qiME",menuWithAnnouncementBar:"menuWithAnnouncementBar_hRfJ"};function z(e){let{path:t,sidebar:n,className:i}=e;const l=function(){const{isActive:e}=(0,A.M)(),[t,n]=(0,a.useState)(e);return(0,d.Mq)((t=>{let{scrollY:a}=t;e&&n(0===a)}),[e]),e&&t}();return(0,b.jsx)("nav",{"aria-label":(0,r.T)({id:"theme.docs.sidebar.navAriaLabel",message:"Docs sidebar",description:"The ARIA label for the sidebar navigation"}),className:(0,o.A)("menu thin-scrollbar",q.menu,l&&q.menuWithAnnouncementBar,i),children:(0,b.jsx)("ul",{className:(0,o.A)(s.G.docs.docSidebarMenu,"menu__list"),children:(0,b.jsx)(V,{items:n,activePath:t,level:1})})})}const Y="sidebar_vJCc",K="sidebarWithHideableNavbar_Fo4g",U="sidebarHidden_vBKa",O="sidebarLogo_nlll";function X(e){let{path:t,sidebar:n,onCollapse:a,isHidden:i}=e;const{navbar:{hideOnScroll:s},docs:{sidebar:{hideable:l}}}=(0,j.p)();return(0,b.jsxs)("div",{className:(0,o.A)(Y,s&&K,i&&U),children:[s&&(0,b.jsx)(v.A,{tabIndex:-1,className:O}),(0,b.jsx)(z,{path:t,sidebar:n}),l&&(0,b.jsx)(C,{onClick:a})]})}const J=a.memo(X);var Z=n(7226),Q=n(2106);const $=e=>{let{sidebar:t,path:n}=e;const a=(0,Q.M)();return(0,b.jsx)("ul",{className:(0,o.A)(s.G.docs.docSidebarMenu,"menu__list"),children:(0,b.jsx)(V,{items:t,activePath:n,onItemClick:e=>{"category"===e.type&&e.href&&a.toggle(),"link"===e.type&&a.toggle()},level:1})})};function ee(e){return(0,b.jsx)(Z.GX,{component:$,props:e})}const te=a.memo(ee);function ne(e){const t=(0,f.l)(),n="desktop"===t||"ssr"===t,a="mobile"===t;return(0,b.jsxs)(b.Fragment,{children:[n&&(0,b.jsx)(J,{...e}),a&&(0,b.jsx)(te,{...e})]})}const ae={expandButton:"expandButton_SZY_",expandButtonIcon:"expandButtonIcon_CMLm"};function oe(e){let{toggleSidebar:t}=e;return(0,b.jsx)("div",{className:ae.expandButton,title:(0,r.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,r.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:t,onClick:t,children:(0,b.jsx)(_,{className:ae.expandButtonIcon})})}const ie={docSidebarContainer:"docSidebarContainer_e5ai",docSidebarContainerHidden:"docSidebarContainerHidden_vqQo",sidebarViewport:"sidebarViewport_N8x0"};function se(e){let{children:t}=e;const n=(0,c.t)();return(0,b.jsx)(a.Fragment,{children:t},n?.name??"noSidebar")}function le(e){let{sidebar:t,hiddenSidebarContainer:n,setHiddenSidebarContainer:i}=e;const{pathname:l}=(0,x.zy)(),[c,r]=(0,a.useState)(!1),d=(0,a.useCallback)((()=>{c&&r(!1),!c&&(0,p.O)()&&r(!0),i((e=>!e))}),[i,c]);return(0,b.jsx)("aside",{className:(0,o.A)(s.G.docs.docSidebarContainer,ie.docSidebarContainer,n&&ie.docSidebarContainerHidden),onTransitionEnd:e=>{e.currentTarget.classList.contains(ie.docSidebarContainer)&&n&&r(!0)},children:(0,b.jsx)(se,{children:(0,b.jsxs)("div",{className:(0,o.A)(ie.sidebarViewport,c&&ie.sidebarViewportHidden),children:[(0,b.jsx)(ne,{sidebar:t,path:l,onCollapse:d,isHidden:c}),c&&(0,b.jsx)(oe,{toggleSidebar:d})]})})})}const ce={docMainContainer:"docMainContainer_namt",docMainContainerEnhanced:"docMainContainerEnhanced_sRjM",docItemWrapperEnhanced:"docItemWrapperEnhanced_TX_6"};function re(e){let{hiddenSidebarContainer:t,children:n}=e;const a=(0,c.t)();return(0,b.jsx)("main",{className:(0,o.A)(ce.docMainContainer,(t||!a)&&ce.docMainContainerEnhanced),children:(0,b.jsx)("div",{className:(0,o.A)("container padding-top--md padding-bottom--lg",ce.docItemWrapper,t&&ce.docItemWrapperEnhanced),children:n})})}const de={docRoot:"docRoot_HciC",docsWrapper:"docsWrapper_XLvK"};function ue(e){let{children:t}=e;const n=(0,c.t)(),[o,i]=(0,a.useState)(!1);return(0,b.jsxs)("div",{className:de.docsWrapper,children:[(0,b.jsx)(h,{}),(0,b.jsxs)("div",{className:de.docRoot,children:[n&&(0,b.jsx)(le,{sidebar:n.items,hiddenSidebarContainer:o,setHiddenSidebarContainer:i}),(0,b.jsx)(re,{hiddenSidebarContainer:o,children:t})]})]})}var me=n(2757);function be(e){const t=(0,l.B5)(e);if(!t)return(0,b.jsx)(me.A,{});const{docElement:n,sidebarName:a,sidebarItems:r}=t;return(0,b.jsx)(i.e3,{className:(0,o.A)(s.G.page.docsDocPage),children:(0,b.jsx)(c.V,{name:a,items:r,children:(0,b.jsx)(ue,{children:n})})})}},2757:(e,t,n)=>{n.d(t,{A:()=>l});n(4041);var a=n(4357),o=n(9082),i=n(4775),s=n(1085);function l(e){let{className:t}=e;return(0,s.jsx)("main",{className:(0,a.A)("container margin-vert--xl",t),children:(0,s.jsx)("div",{className:"row",children:(0,s.jsxs)("div",{className:"col col--6 col--offset-3",children:[(0,s.jsx)(i.A,{as:"h1",className:"hero__title",children:(0,s.jsx)(o.A,{id:"theme.NotFound.title",description:"The title of the 404 page",children:"Page Not Found"})}),(0,s.jsx)("p",{children:(0,s.jsx)(o.A,{id:"theme.NotFound.p1",description:"The first paragraph of the 404 page",children:"We could not find what you were looking for."})}),(0,s.jsx)("p",{children:(0,s.jsx)(o.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."})})]})})})}}}]);