openc3-cosmos-tool-docs 6.0.1 → 6.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (184) hide show
  1. checksums.yaml +4 -4
  2. data/tools/staticdocs/404.html +1 -1
  3. data/tools/staticdocs/assets/css/{styles.839a3ee9.css → styles.1de6b959.css} +1 -1
  4. data/tools/staticdocs/assets/images/arrayplot-ab4963f7ad4eb1d7ecc646065dd43b4816a06367fa5e07d58b8cf520deff931e.png +0 -0
  5. data/tools/staticdocs/assets/js/{019369f3.8413befc.js → 019369f3.1a6a0205.js} +1 -1
  6. data/tools/staticdocs/assets/js/{058ffc22.a4ceeb8e.js → 058ffc22.5cfabd67.js} +1 -1
  7. data/tools/staticdocs/assets/js/{0686a885.ae0a89e8.js → 0686a885.0e2ea47d.js} +1 -1
  8. data/tools/staticdocs/assets/js/{078dbab0.90ef4019.js → 078dbab0.5515d5e3.js} +1 -1
  9. data/tools/staticdocs/assets/js/{0f5d161c.1c827de2.js → 0f5d161c.7697df48.js} +1 -1
  10. data/tools/staticdocs/assets/js/{0ff569c9.3b7f9c95.js → 0ff569c9.f81b787b.js} +1 -1
  11. data/tools/staticdocs/assets/js/{103cc3be.76716a45.js → 103cc3be.e7943c80.js} +1 -1
  12. data/tools/staticdocs/assets/js/{13196248.18801ae0.js → 13196248.ea83002e.js} +1 -1
  13. data/tools/staticdocs/assets/js/{13c1b4e4.4457fa9a.js → 13c1b4e4.eb5250f4.js} +1 -1
  14. data/tools/staticdocs/assets/js/1e02e6a3.f477eca7.js +1 -0
  15. data/tools/staticdocs/assets/js/{2047b354.9470f5c9.js → 2047b354.d91f6c3e.js} +1 -1
  16. data/tools/staticdocs/assets/js/{22b3ac48.ac895789.js → 22b3ac48.0df9587b.js} +1 -1
  17. data/tools/staticdocs/assets/js/26b8abb2.7f8d4cb0.js +1 -0
  18. data/tools/staticdocs/assets/js/{2bb7bf90.471e10a1.js → 2bb7bf90.4051cf46.js} +1 -1
  19. data/tools/staticdocs/assets/js/31436304.a6b2eb4a.js +1 -0
  20. data/tools/staticdocs/assets/js/3969.afdd070b.js +1 -0
  21. data/tools/staticdocs/assets/js/{3dd7ef3b.d8bb37a8.js → 3dd7ef3b.c3455b97.js} +1 -1
  22. data/tools/staticdocs/assets/js/{40365d27.5f8a5da7.js → 40365d27.5ed2e9b5.js} +1 -1
  23. data/tools/staticdocs/assets/js/{411898ad.c8f67fde.js → 411898ad.f7fc4d80.js} +1 -1
  24. data/tools/staticdocs/assets/js/{42170351.86617d4a.js → 42170351.fbc05869.js} +1 -1
  25. data/tools/staticdocs/assets/js/{43652efd.0c473c25.js → 43652efd.60fa883f.js} +1 -1
  26. data/tools/staticdocs/assets/js/{2124.0e1f26f5.js → 5205.c6f31e57.js} +1 -1
  27. data/tools/staticdocs/assets/js/5328.3e2a53eb.js +1 -0
  28. data/tools/staticdocs/assets/js/53ca7c5b.fe331a71.js +1 -0
  29. data/tools/staticdocs/assets/js/{54d0d530.9ace531c.js → 54d0d530.ef91ba12.js} +1 -1
  30. data/tools/staticdocs/assets/js/5761.e7fabbc9.js +4 -0
  31. data/tools/staticdocs/assets/js/{5b233ba7.565c0c28.js → 5b233ba7.2ea0179c.js} +1 -1
  32. data/tools/staticdocs/assets/js/{5bc719f6.80b7b43c.js → 5bc719f6.b84c55e3.js} +1 -1
  33. data/tools/staticdocs/assets/js/{5c6ce5ec.ed839e0d.js → 5c6ce5ec.67d1d92e.js} +1 -1
  34. data/tools/staticdocs/assets/js/5e3ed378.8b51f7c0.js +1 -0
  35. data/tools/staticdocs/assets/js/5fe211ef.63b46202.js +1 -0
  36. data/tools/staticdocs/assets/js/651.a043d7b1.js +1 -0
  37. data/tools/staticdocs/assets/js/6831b732.bb38c0d0.js +1 -0
  38. data/tools/staticdocs/assets/js/{696b4199.34aa1d77.js → 696b4199.2a7ff897.js} +1 -1
  39. data/tools/staticdocs/assets/js/6b210247.ef28d4e5.js +1 -0
  40. data/tools/staticdocs/assets/js/{6b65133b.f71c0e94.js → 6b65133b.0376a397.js} +1 -1
  41. data/tools/staticdocs/assets/js/{6f92e431.c98e31e0.js → 6f92e431.d2ce2753.js} +1 -1
  42. data/tools/staticdocs/assets/js/72c6d8a8.b6fcfc30.js +1 -0
  43. data/tools/staticdocs/assets/js/{75e64983.45bf7edc.js → 75e64983.81988bef.js} +1 -1
  44. data/tools/staticdocs/assets/js/{80c97f38.5a408d9c.js → 80c97f38.607160d3.js} +1 -1
  45. data/tools/staticdocs/assets/js/{867640d5.866fe67b.js → 867640d5.2c0fa6d9.js} +1 -1
  46. data/tools/staticdocs/assets/js/89e76475.a76d0072.js +1 -0
  47. data/tools/staticdocs/assets/js/{8f7843ee.59da8025.js → 8f7843ee.abe30983.js} +1 -1
  48. data/tools/staticdocs/assets/js/9357.9a7e89b5.js +101 -0
  49. data/tools/staticdocs/assets/js/9424f0b3.5385d87f.js +1 -0
  50. data/tools/staticdocs/assets/js/{97535711.94a5b402.js → 97535711.88c7444a.js} +1 -1
  51. data/tools/staticdocs/assets/js/99581c43.5e55992d.js +1 -0
  52. data/tools/staticdocs/assets/js/9d6e81d0.28913d59.js +1 -0
  53. data/tools/staticdocs/assets/js/9fb6059a.821f7504.js +1 -0
  54. data/tools/staticdocs/assets/js/a677c089.2512b608.js +1 -0
  55. data/tools/staticdocs/assets/js/a9987364.81e9c91d.js +1 -0
  56. data/tools/staticdocs/assets/js/aa6b6c1b.40e48e37.js +1 -0
  57. data/tools/staticdocs/assets/js/{b4596165.a5fe2cea.js → b4596165.c648533a.js} +1 -1
  58. data/tools/staticdocs/assets/js/{b6d70f94.5df56282.js → b6d70f94.7813125e.js} +1 -1
  59. data/tools/staticdocs/assets/js/{b9f60ba6.cdb4a698.js → b9f60ba6.4c0bb1dd.js} +1 -1
  60. data/tools/staticdocs/assets/js/{bd0034eb.5fb449fc.js → bd0034eb.8ad39448.js} +1 -1
  61. data/tools/staticdocs/assets/js/{c24eae19.f419c8fb.js → c24eae19.89738127.js} +1 -1
  62. data/tools/staticdocs/assets/js/{c2598f55.85419dc8.js → c2598f55.812cdcd1.js} +1 -1
  63. data/tools/staticdocs/assets/js/{cb8c3f08.9264e5dd.js → cb8c3f08.07d1c9e9.js} +1 -1
  64. data/tools/staticdocs/assets/js/{cd879be4.aa3c877c.js → cd879be4.59af1749.js} +1 -1
  65. data/tools/staticdocs/assets/js/{d1b923aa.de9e8fd6.js → d1b923aa.a73e7e79.js} +1 -1
  66. data/tools/staticdocs/assets/js/d1bfc316.a58b9bbd.js +1 -0
  67. data/tools/staticdocs/assets/js/{d24bf9b6.1cb515f4.js → d24bf9b6.9fef8263.js} +1 -1
  68. data/tools/staticdocs/assets/js/{d57a4b5d.09769a64.js → d57a4b5d.c74b62b1.js} +1 -1
  69. data/tools/staticdocs/assets/js/{d5d77c37.1704d750.js → d5d77c37.e812e6e7.js} +1 -1
  70. data/tools/staticdocs/assets/js/{d66bf9c0.9a597f56.js → d66bf9c0.842d2efa.js} +1 -1
  71. data/tools/staticdocs/assets/js/d8ca4191.f5da7c6d.js +1 -0
  72. data/tools/staticdocs/assets/js/{d9b92eba.5a40eb6d.js → d9b92eba.34e63ba6.js} +1 -1
  73. data/tools/staticdocs/assets/js/{db8fa1d0.f9f65c91.js → db8fa1d0.94b76b52.js} +1 -1
  74. data/tools/staticdocs/assets/js/{dbe31111.dae4b9bd.js → dbe31111.75e9fc53.js} +1 -1
  75. data/tools/staticdocs/assets/js/dc5f7beb.9e4e6681.js +1 -0
  76. data/tools/staticdocs/assets/js/{e501b0d1.cb2ef34f.js → e501b0d1.d3a1e4bc.js} +1 -1
  77. data/tools/staticdocs/assets/js/{ebec1ccb.086b8668.js → ebec1ccb.120a5b80.js} +1 -1
  78. data/tools/staticdocs/assets/js/{f15615f1.afd4ba93.js → f15615f1.49804e96.js} +1 -1
  79. data/tools/staticdocs/assets/js/fd886806.124ffe26.js +1 -0
  80. data/tools/staticdocs/assets/js/main.d3e77dd5.js +36 -0
  81. data/tools/staticdocs/assets/js/runtime~main.92ff792a.js +1 -0
  82. data/tools/staticdocs/docs/configuration/accessors.html +2 -2
  83. data/tools/staticdocs/docs/configuration/command.html +12 -2
  84. data/tools/staticdocs/docs/configuration/format.html +2 -2
  85. data/tools/staticdocs/docs/configuration/interfaces.html +6 -2
  86. data/tools/staticdocs/docs/configuration/plugins.html +4 -4
  87. data/tools/staticdocs/docs/configuration/protocols.html +2 -2
  88. data/tools/staticdocs/docs/configuration/ssl-tls.html +2 -2
  89. data/tools/staticdocs/docs/configuration/table.html +12 -2
  90. data/tools/staticdocs/docs/configuration/target.html +2 -2
  91. data/tools/staticdocs/docs/configuration/telemetry-screens.html +60 -25
  92. data/tools/staticdocs/docs/configuration/telemetry.html +2 -2
  93. data/tools/staticdocs/docs/configuration.html +1 -1
  94. data/tools/staticdocs/docs/development/curl.html +2 -2
  95. data/tools/staticdocs/docs/development/developing.html +3 -3
  96. data/tools/staticdocs/docs/development/json-api.html +2 -2
  97. data/tools/staticdocs/docs/development/log-structure.html +2 -2
  98. data/tools/staticdocs/docs/development/roadmap.html +2 -2
  99. data/tools/staticdocs/docs/development/streaming-api.html +2 -2
  100. data/tools/staticdocs/docs/development/testing.html +2 -2
  101. data/tools/staticdocs/docs/development.html +1 -1
  102. data/tools/staticdocs/docs/getting-started/generators.html +2 -2
  103. data/tools/staticdocs/docs/getting-started/gettingstarted.html +2 -2
  104. data/tools/staticdocs/docs/getting-started/installation.html +2 -2
  105. data/tools/staticdocs/docs/getting-started/key_concepts.html +2 -2
  106. data/tools/staticdocs/docs/getting-started/podman.html +2 -2
  107. data/tools/staticdocs/docs/getting-started/requirements.html +2 -2
  108. data/tools/staticdocs/docs/getting-started/upgrading.html +2 -2
  109. data/tools/staticdocs/docs/getting-started.html +1 -1
  110. data/tools/staticdocs/docs/guides/bridges.html +2 -2
  111. data/tools/staticdocs/docs/guides/cfs.html +2 -2
  112. data/tools/staticdocs/docs/guides/custom-widgets.html +2 -2
  113. data/tools/staticdocs/docs/guides/exposing_microservices.html +33 -0
  114. data/tools/staticdocs/docs/guides/little-endian-bitfields.html +2 -2
  115. data/tools/staticdocs/docs/guides/local-mode.html +2 -2
  116. data/tools/staticdocs/docs/guides/logging.html +2 -2
  117. data/tools/staticdocs/docs/guides/monitoring.html +2 -2
  118. data/tools/staticdocs/docs/guides/performance.html +2 -2
  119. data/tools/staticdocs/docs/guides/raspberrypi.html +2 -2
  120. data/tools/staticdocs/docs/guides/script-writing.html +2 -2
  121. data/tools/staticdocs/docs/guides/scripting-api.html +496 -125
  122. data/tools/staticdocs/docs/guides.html +1 -1
  123. data/tools/staticdocs/docs/meta/contributing.html +2 -2
  124. data/tools/staticdocs/docs/meta/licenses.html +2 -2
  125. data/tools/staticdocs/docs/meta/philosophy.html +2 -2
  126. data/tools/staticdocs/docs/meta/xtce.html +2 -2
  127. data/tools/staticdocs/docs/meta.html +1 -1
  128. data/tools/staticdocs/docs/privacy.html +2 -2
  129. data/tools/staticdocs/docs/tools/admin.html +2 -2
  130. data/tools/staticdocs/docs/tools/autonomic.html +2 -2
  131. data/tools/staticdocs/docs/tools/bucket-explorer.html +2 -2
  132. data/tools/staticdocs/docs/tools/calendar.html +2 -2
  133. data/tools/staticdocs/docs/tools/cmd-sender.html +2 -2
  134. data/tools/staticdocs/docs/tools/cmd-tlm-server.html +2 -2
  135. data/tools/staticdocs/docs/tools/command_history.html +2 -2
  136. data/tools/staticdocs/docs/tools/data-extractor.html +2 -2
  137. data/tools/staticdocs/docs/tools/data-viewer.html +2 -2
  138. data/tools/staticdocs/docs/tools/handbooks.html +2 -2
  139. data/tools/staticdocs/docs/tools/limits-monitor.html +2 -2
  140. data/tools/staticdocs/docs/tools/packet-viewer.html +2 -2
  141. data/tools/staticdocs/docs/tools/script-runner.html +2 -2
  142. data/tools/staticdocs/docs/tools/table-manager.html +2 -2
  143. data/tools/staticdocs/docs/tools/tlm-grapher.html +2 -2
  144. data/tools/staticdocs/docs/tools/tlm-viewer.html +2 -2
  145. data/tools/staticdocs/docs/tools.html +1 -1
  146. data/tools/staticdocs/docs.html +2 -2
  147. data/tools/staticdocs/img/telemetry_viewer/widgets/arrayplot.png +0 -0
  148. data/tools/staticdocs/index.html +1 -1
  149. data/tools/staticdocs/lunr-index-1738736939408.json +1 -0
  150. data/tools/staticdocs/lunr-index.json +1 -1
  151. data/tools/staticdocs/markdown-page.html +2 -2
  152. data/tools/staticdocs/search-doc-1738736939408.json +1 -0
  153. data/tools/staticdocs/search-doc.json +1 -1
  154. data/tools/staticdocs/sitemap.xml +1 -1
  155. metadata +85 -81
  156. data/tools/staticdocs/assets/js/1602.1e622848.js +0 -1
  157. data/tools/staticdocs/assets/js/1e02e6a3.8e63f255.js +0 -1
  158. data/tools/staticdocs/assets/js/26b8abb2.45d268b1.js +0 -1
  159. data/tools/staticdocs/assets/js/3040.18a0bb2a.js +0 -4
  160. data/tools/staticdocs/assets/js/3687.6fa52db1.js +0 -101
  161. data/tools/staticdocs/assets/js/4303.a84f454a.js +0 -1
  162. data/tools/staticdocs/assets/js/53ca7c5b.f0e35da3.js +0 -1
  163. data/tools/staticdocs/assets/js/5e3ed378.048e258b.js +0 -1
  164. data/tools/staticdocs/assets/js/5fe211ef.96109971.js +0 -1
  165. data/tools/staticdocs/assets/js/6831b732.4008a669.js +0 -1
  166. data/tools/staticdocs/assets/js/6b210247.d37e3087.js +0 -1
  167. data/tools/staticdocs/assets/js/72c6d8a8.1053fbd7.js +0 -1
  168. data/tools/staticdocs/assets/js/7690.fc05b8e6.js +0 -1
  169. data/tools/staticdocs/assets/js/89e76475.b4e9da15.js +0 -1
  170. data/tools/staticdocs/assets/js/9424f0b3.cc8aa06e.js +0 -1
  171. data/tools/staticdocs/assets/js/99581c43.ebea1d08.js +0 -1
  172. data/tools/staticdocs/assets/js/9d6e81d0.4bc52207.js +0 -1
  173. data/tools/staticdocs/assets/js/9fb6059a.57936fbe.js +0 -1
  174. data/tools/staticdocs/assets/js/a677c089.d8d7a8f5.js +0 -1
  175. data/tools/staticdocs/assets/js/a9987364.2aa836fd.js +0 -1
  176. data/tools/staticdocs/assets/js/aa6b6c1b.993f091d.js +0 -1
  177. data/tools/staticdocs/assets/js/d1bfc316.82dd17ab.js +0 -1
  178. data/tools/staticdocs/assets/js/d8ca4191.1861d710.js +0 -1
  179. data/tools/staticdocs/assets/js/dc5f7beb.15fc7cc8.js +0 -1
  180. data/tools/staticdocs/assets/js/fd886806.fa25adc4.js +0 -1
  181. data/tools/staticdocs/assets/js/main.c4acbd62.js +0 -36
  182. data/tools/staticdocs/assets/js/runtime~main.cb6ff8de.js +0 -1
  183. data/tools/staticdocs/lunr-index-1734734383200.json +0 -1
  184. data/tools/staticdocs/search-doc-1734734383200.json +0 -1
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([["8519"],{5272:function(e,t,n){n.r(t),n.d(t,{default:()=>h,frontMatter:()=>c,metadata:()=>r,assets:()=>o,toc:()=>l,contentTitle:()=>d});var r=JSON.parse('{"id":"configuration/interfaces","title":"Interfaces","description":"Built-in COSMOS interfaces including how to create one","source":"@site/docs/configuration/interfaces.md","sourceDirName":"configuration","slug":"/configuration/interfaces","permalink":"/tools/staticdocs/docs/configuration/interfaces","draft":false,"unlisted":false,"editUrl":"https://github.com/OpenC3/cosmos/tree/main/docs.openc3.com/docs/configuration/interfaces.md","tags":[],"version":"current","sidebarPosition":6,"frontMatter":{"sidebar_position":6,"title":"Interfaces","description":"Built-in COSMOS interfaces including how to create one","sidebar_custom_props":{"myEmoji":"\uD83D\uDCA1"}},"sidebar":"defaultSidebar","previous":{"title":"Telemetry","permalink":"/tools/staticdocs/docs/configuration/telemetry"},"next":{"title":"Protocols","permalink":"/tools/staticdocs/docs/configuration/protocols"}}'),i=n("2322"),s=n("2840");let c={sidebar_position:6,title:"Interfaces",description:"Built-in COSMOS interfaces including how to create one",sidebar_custom_props:{myEmoji:"\uD83D\uDCA1"}},d=void 0,o={},l=[{value:"Overview",id:"overview",level:2},{value:"Protocols",id:"protocols",level:3},{value:"Accessors",id:"accessors",level:3},{value:"Provided Interfaces",id:"provided-interfaces",level:2},{value:"TCPIP Client Interface",id:"tcpip-client-interface",level:3},{value:"TCPIP Server Interface",id:"tcpip-server-interface",level:3},{value:"Interface Options",id:"interface-options",level:4},{value:"UDP Interface",id:"udp-interface",level:3},{value:"HTTP Client Interface",id:"http-client-interface",level:3},{value:"HTTP Server Interface",id:"http-server-interface",level:3},{value:"Interface Options",id:"interface-options-1",level:4},{value:"MQTT Interface",id:"mqtt-interface",level:3},{value:"Interface Options",id:"interface-options-2",level:4},{value:"Packet Definitions",id:"packet-definitions",level:4},{value:"MQTT Streaming Interface",id:"mqtt-streaming-interface",level:3},{value:"Interface Options",id:"interface-options-3",level:4},{value:"Packet Definitions",id:"packet-definitions-1",level:4},{value:"Serial Interface",id:"serial-interface",level:3},{value:"Interface Options",id:"interface-options-4",level:4},{value:"SNMP Interface (Enterprise)",id:"snmp-interface-enterprise",level:3},{value:"Interface Options",id:"interface-options-5",level:4},{value:"SNMP Trap Interface (Enterprise)",id:"snmp-trap-interface-enterprise",level:3},{value:"Interface Options",id:"interface-options-6",level:4},{value:"gRPC Interface (Enterprise)",id:"grpc-interface-enterprise",level:3},{value:"Commands",id:"commands",level:4},{value:"Custom Interfaces",id:"custom-interfaces",level:2}];function a(e){let t={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",h4:"h4",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,s.a)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.h2,{id:"overview",children:"Overview"}),"\n",(0,i.jsxs)(t.p,{children:["Interfaces are the connection to the external embedded systems called ",(0,i.jsx)(t.a,{href:"target",children:"targets"}),". Interfaces are defined by the top level ",(0,i.jsx)(t.a,{href:"/tools/staticdocs/docs/configuration/plugins#interface-1",children:"INTERFACE"})," keyword in the plugin.txt file."]}),"\n",(0,i.jsxs)(t.p,{children:["Interface classes provide the code that COSMOS uses to receive real-time telemetry from targets and to send commands to targets. The interface that a target uses could be anything (TCP/IP, serial, MQTT, SNMP, etc.), therefore it is important that this is a customizable portion of any reusable Command and Telemetry System. Fortunately the most common form of interfaces are over TCP/IP sockets, and COSMOS provides interface solutions for these. This guide will discuss how to use these interface classes, and how to create your own. Note that in most cases you can extend interfaces with ",(0,i.jsx)(t.a,{href:"/tools/staticdocs/docs/configuration/protocols",children:"Protocols"})," rather than implementing a new interface."]}),"\n",(0,i.jsx)(t.admonition,{title:"Interface and Routers Are Very Similar",type:"info",children:(0,i.jsx)(t.p,{children:"Note that Interfaces and Routers are very similar and share the same configuration parameters. Routers are simply Interfaces which route an existing Interface's telemetry data out to the connected target and routes the connected target's commands back to the original Interface's target."})}),"\n",(0,i.jsx)(t.h3,{id:"protocols",children:"Protocols"}),"\n",(0,i.jsxs)(t.p,{children:["Protocols define the behaviour of an Interface, including differentiating packet boundaries and modifying data as necessary. See ",(0,i.jsx)(t.a,{href:"protocols",children:"Protocols"})," for more information."]}),"\n",(0,i.jsx)(t.h3,{id:"accessors",children:"Accessors"}),"\n",(0,i.jsxs)(t.p,{children:["Accessors are responsible for reading and writing the buffer which is transmitted by the interface to the target. See ",(0,i.jsx)(t.a,{href:"accessors",children:"Accessors"})," for more information."]}),"\n",(0,i.jsxs)(t.p,{children:["For more information about how Interfaces fit with Protocols and Accessors see ",(0,i.jsx)(t.a,{href:"https://www.openc3.com/news/interoperability-without-standards",children:"Interoperability Without Standards"}),"."]}),"\n",(0,i.jsx)(t.h2,{id:"provided-interfaces",children:"Provided Interfaces"}),"\n",(0,i.jsxs)(t.p,{children:["COSMOS provides the following interfaces: TCPIP Client, TCPIP Server, UDP, HTTP Client, HTTP Server, MQTT and Serial. The interface to use is defined by the ",(0,i.jsx)(t.a,{href:"/tools/staticdocs/docs/configuration/plugins#interface",children:"INTERFACE"})," and ",(0,i.jsx)(t.a,{href:"/tools/staticdocs/docs/configuration/plugins#router",children:"ROUTER"})," keywords. See ",(0,i.jsx)(t.a,{href:"/tools/staticdocs/docs/configuration/plugins#interface-modifiers",children:"Interface Modifiers"})," for a description of the keywords which can follow the INTERFACE keyword."]}),"\n",(0,i.jsx)(t.p,{children:"COSMOS Enterprise provides the following interfaces: SNMP, SNMP Trap, GEMS, InfluxDB."}),"\n",(0,i.jsx)(t.h3,{id:"tcpip-client-interface",children:"TCPIP Client Interface"}),"\n",(0,i.jsx)(t.p,{children:"The TCPIP client interface connects to a TCPIP socket to send commands and receive telemetry. This interface is used for targets which open a socket and wait for a connection. This is the most common type of interface."}),"\n",(0,i.jsxs)(t.table,{children:[(0,i.jsx)(t.thead,{children:(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.th,{children:"Parameter"}),(0,i.jsx)(t.th,{children:"Description"}),(0,i.jsx)(t.th,{children:"Required"})]})}),(0,i.jsxs)(t.tbody,{children:[(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"Host"}),(0,i.jsx)(t.td,{children:"Machine name to connect to"}),(0,i.jsx)(t.td,{children:"Yes"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"Write Port"}),(0,i.jsx)(t.td,{children:"Port to write commands to (can be the same as read port). Pass nil / None to make the interface read only."}),(0,i.jsx)(t.td,{children:"Yes"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"Read Port"}),(0,i.jsx)(t.td,{children:"Port to read telemetry from (can be the same as write port). Pass nil / None to make the interface write only."}),(0,i.jsx)(t.td,{children:"Yes"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"Write Timeout"}),(0,i.jsx)(t.td,{children:"Number of seconds to wait before aborting the write"}),(0,i.jsx)(t.td,{children:"Yes"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"Read Timeout"}),(0,i.jsx)(t.td,{children:"Number of seconds to wait before aborting the read. Pass nil / None to block on read."}),(0,i.jsx)(t.td,{children:"Yes"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"Protocol Type"}),(0,i.jsx)(t.td,{children:"See Protocols."}),(0,i.jsx)(t.td,{children:"No"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"Protocol Arguments"}),(0,i.jsx)(t.td,{children:"See Protocols for the arguments each stream protocol takes."}),(0,i.jsx)(t.td,{children:"No"})]})]})]}),"\n",(0,i.jsx)(t.p,{children:"plugin.txt Ruby Examples:"}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-ruby",children:"INTERFACE INTERFACE_NAME tcpip_client_interface.rb host.docker.internal 8080 8081 10.0 nil LENGTH 0 16 0 1 BIG_ENDIAN 4 0xBA5EBA11\nINTERFACE INTERFACE_NAME tcpip_client_interface.rb host.docker.internal 8080 8080 10.0 nil BURST 4 0xDEADBEEF\nINTERFACE INTERFACE_NAME tcpip_client_interface.rb host.docker.internal 8080 8080 10.0 nil FIXED 6 0 nil true\nINTERFACE INTERFACE_NAME tcpip_client_interface.rb host.docker.internal 8080 8080 10.0 10.0 TERMINATED 0x0D0A 0x0D0A true 0 0xF005BA11\nINTERFACE INTERFACE_NAME tcpip_client_interface.rb host.docker.internal 8080 8080 10.0 10.0 TEMPLATE 0xA 0xA\nINTERFACE INTERFACE_NAME tcpip_client_interface.rb host.docker.internal 8080 8080 10.0 nil PREIDENTIFIED 0xCAFEBABE\nINTERFACE INTERFACE_NAME tcpip_client_interface.rb host.docker.internal 8080 8080 10.0 10.0 # no built-in protocol\n"})}),"\n",(0,i.jsx)(t.p,{children:"plugin.txt Python Examples:"}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-ruby",children:"INTERFACE INTERFACE_NAME openc3/interfaces/tcpip_client_interface.py host.docker.internal 8080 8081 10.0 None LENGTH 0 16 0 1 BIG_ENDIAN 4 0xBA5EBA11\nINTERFACE INTERFACE_NAME openc3/interfaces/tcpip_client_interface.py host.docker.internal 8080 8080 10.0 None BURST 4 0xDEADBEEF\nINTERFACE INTERFACE_NAME openc3/interfaces/tcpip_client_interface.py host.docker.internal 8080 8080 10.0 None FIXED 6 0 None true\nINTERFACE INTERFACE_NAME openc3/interfaces/tcpip_client_interface.py host.docker.internal 8080 8080 10.0 10.0 TERMINATED 0x0D0A 0x0D0A true 0 0xF005BA11\nINTERFACE INTERFACE_NAME openc3/interfaces/tcpip_client_interface.py host.docker.internal 8080 8080 10.0 10.0 TEMPLATE 0xA 0xA\nINTERFACE INTERFACE_NAME openc3/interfaces/tcpip_client_interface.py host.docker.internal 8080 8080 10.0 None PREIDENTIFIED 0xCAFEBABE\nINTERFACE INTERFACE_NAME openc3/interfaces/tcpip_client_interface.py host.docker.internal 8080 8080 10.0 10.0 # no built-in protocol\n"})}),"\n",(0,i.jsx)(t.h3,{id:"tcpip-server-interface",children:"TCPIP Server Interface"}),"\n",(0,i.jsx)(t.p,{children:"The TCPIP server interface creates a TCPIP server which listens for incoming connections and dynamically creates sockets which communicate with the target. This interface is used for targets which open a socket and try to connect to a server."}),"\n",(0,i.jsxs)(t.table,{children:[(0,i.jsx)(t.thead,{children:(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.th,{children:"Parameter"}),(0,i.jsx)(t.th,{children:"Description"}),(0,i.jsx)(t.th,{children:"Required"})]})}),(0,i.jsxs)(t.tbody,{children:[(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"Write Port"}),(0,i.jsx)(t.td,{children:"Port to write commands to (can be the same as read port)"}),(0,i.jsx)(t.td,{children:"Yes"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"Read Port"}),(0,i.jsx)(t.td,{children:"Port to read telemetry from (can be the same as write port)"}),(0,i.jsx)(t.td,{children:"Yes"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"Write Timeout"}),(0,i.jsx)(t.td,{children:"Number of seconds to wait before aborting the write"}),(0,i.jsx)(t.td,{children:"Yes"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"Read Timeout"}),(0,i.jsx)(t.td,{children:"Number of seconds to wait before aborting the read. Pass nil / None to block on read."}),(0,i.jsx)(t.td,{children:"Yes"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"Protocol Type"}),(0,i.jsx)(t.td,{children:"See Protocols."}),(0,i.jsx)(t.td,{children:"No"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"Protocol Arguments"}),(0,i.jsx)(t.td,{children:"See Protocols for the arguments each stream protocol takes."}),(0,i.jsx)(t.td,{children:"No"})]})]})]}),"\n",(0,i.jsx)(t.h4,{id:"interface-options",children:"Interface Options"}),"\n",(0,i.jsx)(t.p,{children:"Options are added directly beneath the interface definition as shown in the example."}),"\n",(0,i.jsxs)(t.table,{children:[(0,i.jsx)(t.thead,{children:(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.th,{children:"Option"}),(0,i.jsx)(t.th,{children:"Description"}),(0,i.jsx)(t.th,{children:"Default"})]})}),(0,i.jsx)(t.tbody,{children:(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"LISTEN_ADDRESS"}),(0,i.jsx)(t.td,{children:"IP address to accept connections on"}),(0,i.jsx)(t.td,{children:"0.0.0.0"})]})})]}),"\n",(0,i.jsx)(t.p,{children:"plugin.txt Ruby Examples:"}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-ruby",children:"INTERFACE INTERFACE_NAME tcpip_server_interface.rb 8080 8081 10.0 nil LENGTH 0 16 0 1 BIG_ENDIAN 4 0xBA5EBA11\nINTERFACE INTERFACE_NAME tcpip_server_interface.rb 8080 8080 10.0 nil BURST 4 0xDEADBEEF\nINTERFACE INTERFACE_NAME tcpip_server_interface.rb 8080 8080 10.0 nil FIXED 6 0 nil true\nINTERFACE INTERFACE_NAME tcpip_server_interface.rb 8080 8080 10.0 10.0 TERMINATED 0x0D0A 0x0D0A true 0 0xF005BA11\nINTERFACE INTERFACE_NAME tcpip_client_interface.rb 8080 8080 10.0 10.0 TEMPLATE 0xA 0xA\nINTERFACE INTERFACE_NAME tcpip_server_interface.rb 8080 8080 10.0 nil PREIDENTIFIED 0xCAFEBABE\nINTERFACE INTERFACE_NAME tcpip_client_interface.rb 8080 8080 10.0 10.0 # no built-in protocol\n OPTION LISTEN_ADDRESS 127.0.0.1\n"})}),"\n",(0,i.jsx)(t.p,{children:"plugin.txt Python Examples:"}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-ruby",children:"INTERFACE INTERFACE_NAME openc3/interfaces/tcpip_server_interface.py 8080 8081 10.0 None LENGTH 0 16 0 1 BIG_ENDIAN 4 0xBA5EBA11\nINTERFACE INTERFACE_NAME openc3/interfaces/tcpip_server_interface.py 8080 8080 10.0 None BURST 4 0xDEADBEEF\nINTERFACE INTERFACE_NAME openc3/interfaces/tcpip_server_interface.py 8080 8080 10.0 None FIXED 6 0 None true\nINTERFACE INTERFACE_NAME openc3/interfaces/tcpip_server_interface.py 8080 8080 10.0 10.0 TERMINATED 0x0D0A 0x0D0A true 0 0xF005BA11\nINTERFACE INTERFACE_NAME openc3/interfaces/tcpip_client_interface.py 8080 8080 10.0 10.0 TEMPLATE 0xA 0xA\nINTERFACE INTERFACE_NAME openc3/interfaces/tcpip_server_interface.py 8080 8080 10.0 None PREIDENTIFIED 0xCAFEBABE\nINTERFACE INTERFACE_NAME openc3/interfaces/tcpip_client_interface.py 8080 8080 10.0 10.0 # no built-in protocol\n"})}),"\n",(0,i.jsx)(t.h3,{id:"udp-interface",children:"UDP Interface"}),"\n",(0,i.jsx)(t.p,{children:"The UDP interface uses UDP packets to send and receive telemetry from the target."}),"\n",(0,i.jsxs)(t.table,{children:[(0,i.jsx)(t.thead,{children:(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.th,{children:"Parameter"}),(0,i.jsx)(t.th,{children:"Description"}),(0,i.jsx)(t.th,{children:"Required"}),(0,i.jsx)(t.th,{children:"Default"})]})}),(0,i.jsxs)(t.tbody,{children:[(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"Host"}),(0,i.jsx)(t.td,{children:"Host name or IP address of the machine to send and receive data with"}),(0,i.jsx)(t.td,{children:"Yes"}),(0,i.jsx)(t.td,{})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"Write Dest Port"}),(0,i.jsx)(t.td,{children:"Port on the remote machine to send commands to"}),(0,i.jsx)(t.td,{children:"Yes"}),(0,i.jsx)(t.td,{})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"Read Port"}),(0,i.jsx)(t.td,{children:"Port on the remote machine to read telemetry from"}),(0,i.jsx)(t.td,{children:"Yes"}),(0,i.jsx)(t.td,{})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"Write Source Port"}),(0,i.jsx)(t.td,{children:"Port on the local machine to send commands from"}),(0,i.jsx)(t.td,{children:"No"}),(0,i.jsx)(t.td,{children:"nil (socket is not bound to an outgoing port)"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"Interface Address"}),(0,i.jsx)(t.td,{children:"If the remote machine supports multicast the interface address is used to configure the outgoing multicast address"}),(0,i.jsx)(t.td,{children:"No"}),(0,i.jsx)(t.td,{children:"nil (not used)"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"TTL"}),(0,i.jsx)(t.td,{children:"Time to Live. The number of intermediate routers allowed before dropping the packet."}),(0,i.jsx)(t.td,{children:"No"}),(0,i.jsx)(t.td,{children:"128 (Windows)"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"Write Timeout"}),(0,i.jsx)(t.td,{children:"Number of seconds to wait before aborting the write"}),(0,i.jsx)(t.td,{children:"No"}),(0,i.jsx)(t.td,{children:"10.0"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"Read Timeout"}),(0,i.jsx)(t.td,{children:"Number of seconds to wait before aborting the read"}),(0,i.jsx)(t.td,{children:"No"}),(0,i.jsx)(t.td,{children:"nil (block on read)"})]})]})]}),"\n",(0,i.jsx)(t.p,{children:"plugin.txt Ruby Example:"}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-ruby",children:"INTERFACE INTERFACE_NAME udp_interface.rb host.docker.internal 8080 8081 8082 nil 128 10.0 nil\n"})}),"\n",(0,i.jsx)(t.p,{children:"plugin.txt Python Example:"}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-ruby",children:"INTERFACE INTERFACE_NAME openc3/interfaces/udp_interface.py host.docker.internal 8080 8081 8082 None 128 10.0 None\n"})}),"\n",(0,i.jsx)(t.h3,{id:"http-client-interface",children:"HTTP Client Interface"}),"\n",(0,i.jsxs)(t.p,{children:["The HTTP client interface connects to a HTTP server to send commands and receive telemetry. This interface is commonly used with the ",(0,i.jsx)(t.a,{href:"accessors#http-accessor",children:"HttpAccessor"})," and ",(0,i.jsx)(t.a,{href:"accessors#json-accessor",children:"JsonAccessor"}),". See the ",(0,i.jsx)(t.a,{href:"https://github.com/OpenC3/cosmos/tree/main/examples/openc3-cosmos-http-example",children:"openc3-cosmos-http-example"})," for more information."]}),"\n",(0,i.jsxs)(t.table,{children:[(0,i.jsx)(t.thead,{children:(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.th,{children:"Parameter"}),(0,i.jsx)(t.th,{children:"Description"}),(0,i.jsx)(t.th,{children:"Required"}),(0,i.jsx)(t.th,{children:"Default"})]})}),(0,i.jsxs)(t.tbody,{children:[(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"Host"}),(0,i.jsx)(t.td,{children:"Machine name to connect to"}),(0,i.jsx)(t.td,{children:"Yes"}),(0,i.jsx)(t.td,{})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"Port"}),(0,i.jsx)(t.td,{children:"Port to write commands to and read telemetry from"}),(0,i.jsx)(t.td,{children:"No"}),(0,i.jsx)(t.td,{children:"80"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"Protocol"}),(0,i.jsx)(t.td,{children:"HTTP or HTTPS protocol"}),(0,i.jsx)(t.td,{children:"No"}),(0,i.jsx)(t.td,{children:"HTTP"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"Write Timeout"}),(0,i.jsx)(t.td,{children:"Number of seconds to wait before aborting the write. Pass nil / None to block on write."}),(0,i.jsx)(t.td,{children:"No"}),(0,i.jsx)(t.td,{children:"5"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"Read Timeout"}),(0,i.jsx)(t.td,{children:"Number of seconds to wait before aborting the read. Pass nil / None to block on read."}),(0,i.jsx)(t.td,{children:"No"}),(0,i.jsx)(t.td,{children:"nil / None"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"Connect Timeout"}),(0,i.jsx)(t.td,{children:"Number of seconds to wait before aborting the connection"}),(0,i.jsx)(t.td,{children:"No"}),(0,i.jsx)(t.td,{children:"5"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"Include Request In Response"}),(0,i.jsx)(t.td,{children:"Whether to include the request in the extra data"}),(0,i.jsx)(t.td,{children:"No"}),(0,i.jsx)(t.td,{children:"false"})]})]})]}),"\n",(0,i.jsx)(t.p,{children:"plugin.txt Ruby Examples:"}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-ruby",children:"INTERFACE INTERFACE_NAME http_client_interface.rb myserver.com 80\n"})}),"\n",(0,i.jsx)(t.p,{children:"plugin.txt Python Examples:"}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-ruby",children:"INTERFACE INTERFACE_NAME openc3/interfaces/http_client_interface.py mysecure.com 443 HTTPS\n"})}),"\n",(0,i.jsx)(t.h3,{id:"http-server-interface",children:"HTTP Server Interface"}),"\n",(0,i.jsxs)(t.p,{children:["The HTTP server interface creates a simple unencrypted, unauthenticated HTTP server. This interface is commonly used with the ",(0,i.jsx)(t.a,{href:"accessors#http-accessor",children:"HttpAccessor"})," and ",(0,i.jsx)(t.a,{href:"accessors#json-accessor",children:"JsonAccessor"}),". See the ",(0,i.jsx)(t.a,{href:"https://github.com/OpenC3/cosmos/tree/main/examples/openc3-cosmos-http-example",children:"openc3-cosmos-http-example"})," for more information."]}),"\n",(0,i.jsxs)(t.table,{children:[(0,i.jsx)(t.thead,{children:(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.th,{children:"Parameter"}),(0,i.jsx)(t.th,{children:"Description"}),(0,i.jsx)(t.th,{children:"Required"}),(0,i.jsx)(t.th,{children:"Default"})]})}),(0,i.jsx)(t.tbody,{children:(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"Port"}),(0,i.jsx)(t.td,{children:"Port to write commands to and read telemetry from"}),(0,i.jsx)(t.td,{children:"No"}),(0,i.jsx)(t.td,{children:"80"})]})})]}),"\n",(0,i.jsx)(t.h4,{id:"interface-options-1",children:"Interface Options"}),"\n",(0,i.jsx)(t.p,{children:"Options are added directly beneath the interface definition as shown in the example."}),"\n",(0,i.jsxs)(t.table,{children:[(0,i.jsx)(t.thead,{children:(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.th,{children:"Option"}),(0,i.jsx)(t.th,{children:"Description"}),(0,i.jsx)(t.th,{children:"Default"})]})}),(0,i.jsx)(t.tbody,{children:(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"LISTEN_ADDRESS"}),(0,i.jsx)(t.td,{children:"IP address to accept connections on"}),(0,i.jsx)(t.td,{children:"0.0.0.0"})]})})]}),"\n",(0,i.jsx)(t.p,{children:"plugin.txt Ruby Examples:"}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-ruby",children:"INTERFACE INTERFACE_NAME http_server_interface.rb\n LISTEN_ADDRESS 127.0.0.1\n"})}),"\n",(0,i.jsx)(t.p,{children:"plugin.txt Python Examples:"}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-ruby",children:"INTERFACE INTERFACE_NAME openc3/interfaces/http_server_interface.py 88\n"})}),"\n",(0,i.jsx)(t.h3,{id:"mqtt-interface",children:"MQTT Interface"}),"\n",(0,i.jsxs)(t.p,{children:["The MQTT interface is typically used for connecting to Internet of Things (IoT) devices. The COSMOS MQTT interface is a client that can both publish and receive messages (commands and telemetry). It has built in support for SSL certificates as well as authentication. It differs from the MQTT Streaming Interface in that the commands and telemetry are transmitted over topics given by ",(0,i.jsx)(t.code,{children:"META TOPIC"})," in the command and telemetry definitions."]}),"\n",(0,i.jsxs)(t.table,{children:[(0,i.jsx)(t.thead,{children:(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.th,{children:"Parameter"}),(0,i.jsx)(t.th,{children:"Description"}),(0,i.jsx)(t.th,{children:"Required"}),(0,i.jsx)(t.th,{children:"Default"})]})}),(0,i.jsxs)(t.tbody,{children:[(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"Host"}),(0,i.jsx)(t.td,{children:"Host name or IP address of the MQTT broker"}),(0,i.jsx)(t.td,{children:"Yes"}),(0,i.jsx)(t.td,{})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"Port"}),(0,i.jsx)(t.td,{children:"Port on the MQTT broker to connect to. Keep in mind whether you're using SSL or not."}),(0,i.jsx)(t.td,{children:"No"}),(0,i.jsx)(t.td,{children:"1883"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"SSL"}),(0,i.jsx)(t.td,{children:"Whether to use SSL to connect"}),(0,i.jsx)(t.td,{children:"No"}),(0,i.jsx)(t.td,{children:"false"})]})]})]}),"\n",(0,i.jsx)(t.h4,{id:"interface-options-2",children:"Interface Options"}),"\n",(0,i.jsx)(t.p,{children:"Options are added directly beneath the interface definition as shown in the example."}),"\n",(0,i.jsxs)(t.table,{children:[(0,i.jsx)(t.thead,{children:(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.th,{children:"Option"}),(0,i.jsx)(t.th,{children:"Description"})]})}),(0,i.jsxs)(t.tbody,{children:[(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"ACK_TIMEOUT"}),(0,i.jsx)(t.td,{children:"Time to wait when connecting to the MQTT broker"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"USERNAME"}),(0,i.jsx)(t.td,{children:"Username for authentication with the MQTT broker"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"PASSWORD"}),(0,i.jsx)(t.td,{children:"Password for authentication with the MQTT broker"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"CERT"}),(0,i.jsx)(t.td,{children:"PEM encoded client certificate filename used with KEY for client TLS based authentication"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"KEY"}),(0,i.jsx)(t.td,{children:"PEM encoded client private keys filename"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"KEYFILE_PASSWORD"}),(0,i.jsx)(t.td,{children:"Password to decrypt the CERT and KEY files (Python only)"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"CA_FILE"}),(0,i.jsx)(t.td,{children:"Certificate Authority certificate filename that is to be treated as trusted by this client"})]})]})]}),"\n",(0,i.jsx)(t.p,{children:"plugin.txt Ruby Example:"}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-ruby",children:"INTERFACE MQTT_INT mqtt_interface.rb test.mosquitto.org 1883\n"})}),"\n",(0,i.jsxs)(t.p,{children:["plugin.txt Python Example (Note: This example uses the ",(0,i.jsx)(t.a,{href:"plugins#secret",children:"SECRET"})," keyword to set the PASSWORD option in the Interface):"]}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-ruby",children:"INTERFACE MQTT_INT openc3/interfaces/mqtt_interface.py test.mosquitto.org 8884\n OPTION USERNAME rw\n # Create an env variable called MQTT_PASSWORD with the secret named PASSWORD\n # and set an OPTION called PASSWORD with the secret value\n # For more information about secrets see the Admin Tool page\n SECRET ENV PASSWORD MQTT_PASSWORD PASSWORD\n"})}),"\n",(0,i.jsx)(t.h4,{id:"packet-definitions",children:"Packet Definitions"}),"\n",(0,i.jsx)(t.p,{children:"The MQTT Interface utilizes 'META TOPIC <topic name>' in the command and telemetry definition files to determine which topics to publish and receive messages from. Thus to send to the topic 'TEST' you would create a command like the following (Note: The command name 'TEST' does NOT have to match the topic name):"}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{children:"COMMAND MQTT TEST BIG_ENDIAN \"Test\"\n META TOPIC TEST # <- The topic name is 'TEST'\n APPEND_PARAMETER DATA 0 BLOCK '' \"MQTT Data\"\n"})}),"\n",(0,i.jsx)(t.p,{children:"Similarly to receive from the topic 'TEST' you would create a telemetry packet like the following (Note: The telemetry name 'TEST' does NOT have to match the topic name):"}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{children:'TELEMETRY MQTT TEST BIG_ENDIAN "Test"\n META TOPIC TEST # <- The topic name is \'TEST\'\n APPEND_ITEM DATA 0 BLOCK "MQTT Data"\n'})}),"\n",(0,i.jsxs)(t.p,{children:["For a full example, please see the ",(0,i.jsx)(t.a,{href:"https://github.com/OpenC3/cosmos/tree/main/openc3-cosmos-init/plugins/packages/openc3-cosmos-mqtt-test",children:"openc3-cosmos-mqtt-test"})," in the COSMOS source."]}),"\n",(0,i.jsx)(t.h3,{id:"mqtt-streaming-interface",children:"MQTT Streaming Interface"}),"\n",(0,i.jsx)(t.p,{children:"The MQTT streaming interface is typically used for connecting to Internet of Things (IoT) devices. The COSMOS MQTT streaming interface is a client that can both publish and receive messages (commands and telemetry). It has built in support for SSL certificates as well as authentication. It differs from the MQTT Interface in that all the commands are transmitted on a single topic and all telemetry is received on a single topic."}),"\n",(0,i.jsxs)(t.table,{children:[(0,i.jsx)(t.thead,{children:(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.th,{children:"Parameter"}),(0,i.jsx)(t.th,{children:"Description"}),(0,i.jsx)(t.th,{children:"Required"}),(0,i.jsx)(t.th,{children:"Default"})]})}),(0,i.jsxs)(t.tbody,{children:[(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"Host"}),(0,i.jsx)(t.td,{children:"Host name or IP address of the MQTT broker"}),(0,i.jsx)(t.td,{children:"Yes"}),(0,i.jsx)(t.td,{})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"Port"}),(0,i.jsx)(t.td,{children:"Port on the MQTT broker to connect to. Keep in mind whether you're using SSL or not."}),(0,i.jsx)(t.td,{children:"No"}),(0,i.jsx)(t.td,{children:"1883"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"SSL"}),(0,i.jsx)(t.td,{children:"Whether to use SSL to connect"}),(0,i.jsx)(t.td,{children:"No"}),(0,i.jsx)(t.td,{children:"false"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"Write Topic"}),(0,i.jsx)(t.td,{children:"Name of the write topic for all commands. Pass nil / None to make interface read only."}),(0,i.jsx)(t.td,{children:"No"}),(0,i.jsx)(t.td,{children:"nil / None"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"Read Topic"}),(0,i.jsx)(t.td,{children:"Name of the read topic for all telemetry. Pass nil / None to make interface write only."}),(0,i.jsx)(t.td,{children:"No"}),(0,i.jsx)(t.td,{children:"nil / None"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"Protocol Type"}),(0,i.jsx)(t.td,{children:"See Protocols."}),(0,i.jsx)(t.td,{children:"No"}),(0,i.jsx)(t.td,{})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"Protocol Arguments"}),(0,i.jsx)(t.td,{children:"See Protocols for the arguments each stream protocol takes."}),(0,i.jsx)(t.td,{children:"No"}),(0,i.jsx)(t.td,{})]})]})]}),"\n",(0,i.jsx)(t.h4,{id:"interface-options-3",children:"Interface Options"}),"\n",(0,i.jsx)(t.p,{children:"Options are added directly beneath the interface definition as shown in the example."}),"\n",(0,i.jsxs)(t.table,{children:[(0,i.jsx)(t.thead,{children:(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.th,{children:"Option"}),(0,i.jsx)(t.th,{children:"Description"})]})}),(0,i.jsxs)(t.tbody,{children:[(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"ACK_TIMEOUT"}),(0,i.jsx)(t.td,{children:"Time to wait when connecting to the MQTT broker"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"USERNAME"}),(0,i.jsx)(t.td,{children:"Username for authentication with the MQTT broker"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"PASSWORD"}),(0,i.jsx)(t.td,{children:"Password for authentication with the MQTT broker"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"CERT"}),(0,i.jsx)(t.td,{children:"PEM encoded client certificate filename used with KEY for client TLS based authentication"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"KEY"}),(0,i.jsx)(t.td,{children:"PEM encoded client private keys filename"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"KEYFILE_PASSWORD"}),(0,i.jsx)(t.td,{children:"Password to decrypt the CERT and KEY files (Python only)"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"CA_FILE"}),(0,i.jsx)(t.td,{children:"Certificate Authority certificate filename that is to be treated as trusted by this client"})]})]})]}),"\n",(0,i.jsx)(t.p,{children:"plugin.txt Ruby Example:"}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-ruby",children:"INTERFACE MQTT_INT mqtt_stream_interface.rb test.mosquitto.org 1883 false write read\n"})}),"\n",(0,i.jsxs)(t.p,{children:["plugin.txt Python Example (Note: This example uses the ",(0,i.jsx)(t.a,{href:"plugins#secret",children:"SECRET"})," keyword to set the PASSWORD option in the Interface):"]}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-ruby",children:"INTERFACE MQTT_INT openc3/interfaces/mqtt_stream_interface.py test.mosquitto.org 8884 False write read\n OPTION USERNAME rw\n # Create an env variable called MQTT_PASSWORD with the secret named PASSWORD\n # and set an OPTION called PASSWORD with the secret value\n # For more information about secrets see the Admin Tool page\n SECRET ENV PASSWORD MQTT_PASSWORD PASSWORD\n"})}),"\n",(0,i.jsx)(t.h4,{id:"packet-definitions-1",children:"Packet Definitions"}),"\n",(0,i.jsx)(t.p,{children:"The MQTT Streaming Interface utilizes the topic names passed to the interface so no additional information is necessary in the definition."}),"\n",(0,i.jsxs)(t.p,{children:["For a full example, please see the ",(0,i.jsx)(t.a,{href:"https://github.com/OpenC3/cosmos/tree/main/openc3-cosmos-init/plugins/packages/openc3-cosmos-mqtt-test",children:"openc3-cosmos-mqtt-test"})," in the COSMOS source."]}),"\n",(0,i.jsx)(t.h3,{id:"serial-interface",children:"Serial Interface"}),"\n",(0,i.jsx)(t.p,{children:"The serial interface connects to a target over a serial port. COSMOS provides drivers for both Windows and POSIX drivers for UNIX based systems. The Serial Interface is currently only implemented in Ruby."}),"\n",(0,i.jsxs)(t.table,{children:[(0,i.jsx)(t.thead,{children:(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.th,{children:"Parameter"}),(0,i.jsx)(t.th,{children:"Description"}),(0,i.jsx)(t.th,{children:"Required"})]})}),(0,i.jsxs)(t.tbody,{children:[(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"Write Port"}),(0,i.jsx)(t.td,{children:"Name of the serial port to write, e.g. 'COM1' or '/dev/ttyS0'. Pass nil / None to disable writing."}),(0,i.jsx)(t.td,{children:"Yes"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"Read Port"}),(0,i.jsx)(t.td,{children:"Name of the serial port to read, e.g. 'COM1' or '/dev/ttyS0'. Pass nil / None to disable reading."}),(0,i.jsx)(t.td,{children:"Yes"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"Baud Rate"}),(0,i.jsx)(t.td,{children:"Baud rate to read and write"}),(0,i.jsx)(t.td,{children:"Yes"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"Parity"}),(0,i.jsx)(t.td,{children:"Serial port parity. Must be 'NONE', 'EVEN', or 'ODD'."}),(0,i.jsx)(t.td,{children:"Yes"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"Stop Bits"}),(0,i.jsx)(t.td,{children:"Number of stop bits, e.g. 1."}),(0,i.jsx)(t.td,{children:"Yes"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"Write Timeout"}),(0,i.jsx)(t.td,{children:"Number of seconds to wait before aborting the write"}),(0,i.jsx)(t.td,{children:"Yes"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"Read Timeout"}),(0,i.jsx)(t.td,{children:"Number of seconds to wait before aborting the read. Pass nil / None to block on read."}),(0,i.jsx)(t.td,{children:"Yes"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"Protocol Type"}),(0,i.jsx)(t.td,{children:"See Protocols."}),(0,i.jsx)(t.td,{children:"No"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"Protocol Arguments"}),(0,i.jsx)(t.td,{children:"See Protocols for the arguments each stream protocol takes."}),(0,i.jsx)(t.td,{children:"No"})]})]})]}),"\n",(0,i.jsx)(t.h4,{id:"interface-options-4",children:"Interface Options"}),"\n",(0,i.jsx)(t.p,{children:"Options are added directly beneath the interface definition as shown in the example."}),"\n",(0,i.jsxs)(t.table,{children:[(0,i.jsx)(t.thead,{children:(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.th,{children:"Option"}),(0,i.jsx)(t.th,{children:"Description"}),(0,i.jsx)(t.th,{children:"Default"})]})}),(0,i.jsxs)(t.tbody,{children:[(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"FLOW_CONTROL"}),(0,i.jsx)(t.td,{children:"Serial port flow control. Must be one of NONE or RTSCTS."}),(0,i.jsx)(t.td,{children:"NONE"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"DATA_BITS"}),(0,i.jsx)(t.td,{children:"Number of data bits."}),(0,i.jsx)(t.td,{children:"8"})]})]})]}),"\n",(0,i.jsx)(t.p,{children:"plugin.txt Ruby Examples:"}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-ruby",children:"INTERFACE INTERFACE_NAME serial_interface.rb COM1 COM1 9600 NONE 1 10.0 nil LENGTH 0 16 0 1 BIG_ENDIAN 4 0xBA5EBA11\nINTERFACE INTERFACE_NAME serial_interface.rb /dev/ttyS1 /dev/ttyS1 38400 ODD 1 10.0 nil BURST 4 0xDEADBEEF\nINTERFACE INTERFACE_NAME serial_interface.rb COM2 COM2 19200 EVEN 1 10.0 nil FIXED 6 0 nil true\nINTERFACE INTERFACE_NAME serial_interface.rb COM4 COM4 115200 NONE 1 10.0 10.0 TERMINATED 0x0D0A 0x0D0A true 0 0xF005BA11\nINTERFACE INTERFACE_NAME serial_interface.rb COM4 COM4 115200 NONE 1 10.0 10.0 TEMPLATE 0xA 0xA\nINTERFACE INTERFACE_NAME serial_interface.rb /dev/ttyS0 /dev/ttyS0 57600 NONE 1 10.0 nil PREIDENTIFIED 0xCAFEBABE\nINTERFACE INTERFACE_NAME serial_interface.rb COM4 COM4 115200 NONE 1 10.0 10.0 # no built-in protocol\n OPTION FLOW_CONTROL RTSCTS\n OPTION DATA_BITS 7\n"})}),"\n",(0,i.jsx)(t.h3,{id:"snmp-interface-enterprise",children:"SNMP Interface (Enterprise)"}),"\n",(0,i.jsx)(t.p,{children:"The SNMP Interface is for connecting to Simple Network Management Protocol devices. The SNMP Interface is currently only implemented in Ruby."}),"\n",(0,i.jsxs)(t.table,{children:[(0,i.jsx)(t.thead,{children:(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.th,{children:"Parameter"}),(0,i.jsx)(t.th,{children:"Description"}),(0,i.jsx)(t.th,{children:"Required"}),(0,i.jsx)(t.th,{children:"Default"})]})}),(0,i.jsxs)(t.tbody,{children:[(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"Host"}),(0,i.jsx)(t.td,{children:"Host name of the SNMP device"}),(0,i.jsx)(t.td,{children:"Yes"}),(0,i.jsx)(t.td,{})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"Port"}),(0,i.jsx)(t.td,{children:"Port on the SNMP device"}),(0,i.jsx)(t.td,{children:"No"}),(0,i.jsx)(t.td,{children:"161"})]})]})]}),"\n",(0,i.jsx)(t.h4,{id:"interface-options-5",children:"Interface Options"}),"\n",(0,i.jsx)(t.p,{children:"Options are added directly beneath the interface definition as shown in the example."}),"\n",(0,i.jsxs)(t.table,{children:[(0,i.jsx)(t.thead,{children:(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.th,{children:"Option"}),(0,i.jsx)(t.th,{children:"Description"}),(0,i.jsx)(t.th,{children:"Default"})]})}),(0,i.jsxs)(t.tbody,{children:[(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"VERSION"}),(0,i.jsx)(t.td,{children:"SNMP Version: 1, 2, or 3"}),(0,i.jsx)(t.td,{children:"1"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"COMMUNITY"}),(0,i.jsx)(t.td,{children:"Password or user ID that allows access to a device"}),(0,i.jsx)(t.td,{children:"private"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"USERNAME"}),(0,i.jsx)(t.td,{children:"Username"}),(0,i.jsx)(t.td,{children:"N/A"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"RETRIES"}),(0,i.jsx)(t.td,{children:"Retries when sending requests"}),(0,i.jsx)(t.td,{children:"N/A"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"TIMEOUT"}),(0,i.jsx)(t.td,{children:"Timeout waiting for a response from an agent"}),(0,i.jsx)(t.td,{children:"N/A"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"CONTEXT"}),(0,i.jsx)(t.td,{children:"SNMP context"}),(0,i.jsx)(t.td,{children:"N/A"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"SECURITY_LEVEL"}),(0,i.jsx)(t.td,{children:"Must be one of NO_AUTH, AUTH_PRIV, or AUTH_NO_PRIV"}),(0,i.jsx)(t.td,{children:"N/A"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"AUTH_PROTOCOL"}),(0,i.jsx)(t.td,{children:"Must be one of MD5, SHA, or SHA256"}),(0,i.jsx)(t.td,{children:"N/A"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"PRIV_PROTOCOL"}),(0,i.jsx)(t.td,{children:"Must be one of DES or AES"}),(0,i.jsx)(t.td,{children:"N/A"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"AUTH_PASSWORD"}),(0,i.jsx)(t.td,{children:"Auth password"}),(0,i.jsx)(t.td,{children:"N/A"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"PRIV_PASSWORD"}),(0,i.jsx)(t.td,{children:"Priv password"}),(0,i.jsx)(t.td,{children:"N/A"})]})]})]}),"\n",(0,i.jsx)(t.p,{children:"plugin.txt Ruby Examples:"}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-ruby",children:"INTERFACE SNMP_INT snmp_interface.rb 192.168.1.249 161\n OPTION VERSION 1\n"})}),"\n",(0,i.jsxs)(t.p,{children:["For a full example, please see the ",(0,i.jsx)(t.a,{href:"https://github.com/OpenC3/cosmos-enterprise-plugins/tree/main/openc3-cosmos-apc-switched-pdu",children:"openc3-cosmos-apc-switched-pdu"})," in the COSMOS Enterprise Plugins."]}),"\n",(0,i.jsx)(t.h3,{id:"snmp-trap-interface-enterprise",children:"SNMP Trap Interface (Enterprise)"}),"\n",(0,i.jsx)(t.p,{children:"The SNMP Trap Interface is for receiving Simple Network Management Protocol traps. The SNMP Trap Interface is currently only implemented in Ruby."}),"\n",(0,i.jsxs)(t.table,{children:[(0,i.jsx)(t.thead,{children:(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.th,{children:"Parameter"}),(0,i.jsx)(t.th,{children:"Description"}),(0,i.jsx)(t.th,{children:"Required"}),(0,i.jsx)(t.th,{children:"Default"})]})}),(0,i.jsxs)(t.tbody,{children:[(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"Read Port"}),(0,i.jsx)(t.td,{children:"Port to read from"}),(0,i.jsx)(t.td,{children:"No"}),(0,i.jsx)(t.td,{children:"162"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"Read Timeout"}),(0,i.jsx)(t.td,{children:"Read timeout"}),(0,i.jsx)(t.td,{children:"No"}),(0,i.jsx)(t.td,{children:"nil"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"Bind Address"}),(0,i.jsx)(t.td,{children:"Address to bind UDP port to"}),(0,i.jsx)(t.td,{children:"Yes"}),(0,i.jsx)(t.td,{children:"0.0.0.0"})]})]})]}),"\n",(0,i.jsx)(t.h4,{id:"interface-options-6",children:"Interface Options"}),"\n",(0,i.jsx)(t.p,{children:"Options are added directly beneath the interface definition as shown in the example."}),"\n",(0,i.jsxs)(t.table,{children:[(0,i.jsx)(t.thead,{children:(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.th,{children:"Option"}),(0,i.jsx)(t.th,{children:"Description"}),(0,i.jsx)(t.th,{children:"Default"})]})}),(0,i.jsx)(t.tbody,{children:(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"VERSION"}),(0,i.jsx)(t.td,{children:"SNMP Version: 1, 2, or 3"}),(0,i.jsx)(t.td,{children:"1"})]})})]}),"\n",(0,i.jsx)(t.p,{children:"plugin.txt Ruby Examples:"}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-ruby",children:"INTERFACE SNMP_INT snmp_trap_interface.rb 162\n OPTION VERSION 1\n"})}),"\n",(0,i.jsxs)(t.p,{children:["For a full example, please see the ",(0,i.jsx)(t.a,{href:"https://github.com/OpenC3/cosmos-enterprise-plugins/tree/main/openc3-cosmos-apc-switched-pdu",children:"openc3-cosmos-apc-switched-pdu"})," in the COSMOS Enterprise Plugins."]}),"\n",(0,i.jsx)(t.h3,{id:"grpc-interface-enterprise",children:"gRPC Interface (Enterprise)"}),"\n",(0,i.jsxs)(t.p,{children:["The gRPC Interface is for interacting with ",(0,i.jsx)(t.a,{href:"https://grpc.io/",children:"gRPC"}),". The gRPC Interface is currently only implemented in Ruby."]}),"\n",(0,i.jsxs)(t.table,{children:[(0,i.jsx)(t.thead,{children:(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.th,{children:"Parameter"}),(0,i.jsx)(t.th,{children:"Description"}),(0,i.jsx)(t.th,{children:"Required"})]})}),(0,i.jsxs)(t.tbody,{children:[(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"Hostname"}),(0,i.jsx)(t.td,{children:"gRPC server"}),(0,i.jsx)(t.td,{children:"Yes"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"Port"}),(0,i.jsx)(t.td,{children:"gRPC port"}),(0,i.jsx)(t.td,{children:"Yes"})]})]})]}),"\n",(0,i.jsx)(t.p,{children:"plugin.txt Ruby Examples:"}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-ruby",children:"INTERFACE GRPC_INT grpc_interface.rb my.grpc.org 8080\n"})}),"\n",(0,i.jsx)(t.h4,{id:"commands",children:"Commands"}),"\n",(0,i.jsxs)(t.p,{children:["Using the GrpcInterface for ",(0,i.jsx)(t.a,{href:"command",children:"command definitions"})," requires the use of ",(0,i.jsx)(t.a,{href:"command#meta",children:"META"})," to define a GRPC_METHOD to use for each command."]}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-ruby",children:"COMMAND PROTO GET_USER BIG_ENDIAN 'Get a User'\n META GRPC_METHOD /example.photoservice.ExamplePhotoService/GetUser\n"})}),"\n",(0,i.jsxs)(t.p,{children:["For a full example, please see the ",(0,i.jsx)(t.a,{href:"https://github.com/OpenC3/cosmos-enterprise-plugins/tree/main/openc3-cosmos-proto-target",children:"openc3-cosmos-proto-target"})," in the COSMOS Enterprise Plugins."]}),"\n",(0,i.jsx)(t.h2,{id:"custom-interfaces",children:"Custom Interfaces"}),"\n",(0,i.jsx)(t.p,{children:"Interfaces have the following methods that must be implemented:"}),"\n",(0,i.jsxs)(t.ol,{children:["\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.strong,{children:"connect"})," - Open the socket or port or somehow establish the connection to the target. Note: This method may not block indefinitely. Be sure to call super() in your implementation."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.strong,{children:"connected?"})," - Return true or false depending on the connection state. Note: This method should return immediately."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.strong,{children:"disconnect"})," - Close the socket or port of somehow disconnect from the target. Note: This method may not block indefinitely. Be sure to call super() in your implementation."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.strong,{children:"read_interface"})," - Lowest level read of data on the interface. Note: This method should block until data is available or the interface disconnects. On a clean disconnect it should return nil."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.strong,{children:"write_interface"})," - Lowest level write of data on the interface. Note: This method may not block indefinitely."]}),"\n"]}),"\n",(0,i.jsx)(t.p,{children:"Interfaces also have the following methods that exist and have default implementations. They can be overridden if necessary but be sure to call super() to allow the default implementation to be executed."}),"\n",(0,i.jsxs)(t.ol,{children:["\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.strong,{children:"read_interface_base"})," - This method should always be called from read_interface(). It updates interface specific variables that are displayed by CmdTLmServer including the bytes read count, the most recent raw data read, and it handles raw logging if enabled."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.strong,{children:"write_interface_base"})," - This method should always be called from write_interface(). It updates interface specific variables that are displayed by CmdTLmServer including the bytes written count, the most recent raw data written, and it handles raw logging if enabled."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.strong,{children:"read"})," - Read the next packet from the interface. COSMOS implements this method to allow the Protocol system to operate on the data and the packet before it is returned."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.strong,{children:"write"})," - Send a packet to the interface. COSMOS implements this method to allow the Protocol system to operate on the packet and the data before it is sent."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.strong,{children:"write_raw"})," - Send a raw binary string of data to the target. COSMOS implements this method by basically calling write_interface with the raw data."]}),"\n"]}),"\n",(0,i.jsx)(t.admonition,{title:"Naming Conventions",type:"warning",children:(0,i.jsx)(t.p,{children:'When creating your own interfaces, in most cases they will be subclasses of one of the built-in interfaces described below. It is important to know that both the filename and class name of the interface files must match with correct capitalization or you will receive "class not found" errors when trying to load your new interface. For example, an interface file called labview_interface.rb must contain the class LabviewInterface. If the class was named, LabVIEWInterface, for example, COSMOS would not be able to find the class because of the unexpected capitalization.'})})]})}function h(e={}){let{wrapper:t}={...(0,s.a)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(a,{...e})}):a(e)}},2840:function(e,t,n){n.d(t,{Z:function(){return d},a:function(){return c}});var r=n(2784);let i={},s=r.createContext(i);function c(e){let t=r.useContext(s);return r.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function d(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:c(e.components),r.createElement(s.Provider,{value:t},e.children)}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([["1364"],{5138:function(e,t,n){n.r(t),n.d(t,{default:()=>h,frontMatter:()=>s,metadata:()=>i,assets:()=>l,toc:()=>c,contentTitle:()=>r});var i=JSON.parse('{"id":"getting-started/gettingstarted","title":"Getting Started","description":"Getting starting with COSMOS","source":"@site/docs/getting-started/gettingstarted.md","sourceDirName":"getting-started","slug":"/getting-started/gettingstarted","permalink":"/tools/staticdocs/docs/getting-started/gettingstarted","draft":false,"unlisted":false,"editUrl":"https://github.com/OpenC3/cosmos/tree/main/docs.openc3.com/docs/getting-started/gettingstarted.md","tags":[],"version":"current","sidebarPosition":2,"frontMatter":{"sidebar_position":2,"title":"Getting Started","description":"Getting starting with COSMOS","sidebar_custom_props":{"myEmoji":"\uD83E\uDDD1\u200D\uD83D\uDCBB"}},"sidebar":"defaultSidebar","previous":{"title":"Installation","permalink":"/tools/staticdocs/docs/getting-started/installation"},"next":{"title":"Code Generators","permalink":"/tools/staticdocs/docs/getting-started/generators"}}'),a=n("2322"),o=n("2840");let s={sidebar_position:2,title:"Getting Started",description:"Getting starting with COSMOS",sidebar_custom_props:{myEmoji:"\uD83E\uDDD1\u200D\uD83D\uDCBB"}},r=void 0,l={},c=[{value:"Interfacing with Your Hardware",id:"interfacing-with-your-hardware",level:2},{value:"Building Your Plugin",id:"building-your-plugin",level:2}];function d(e){let t={a:"a",admonition:"admonition",code:"code",h2:"h2",li:"li",ol:"ol",p:"p",pre:"pre",ul:"ul",...(0,o.a)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(t.p,{children:"Welcome to the OpenC3 COSMOS system... Let's get started! This guide is a high level overview that will help with setting up your first COSMOS project."}),"\n",(0,a.jsxs)(t.ol,{children:["\n",(0,a.jsxs)(t.li,{children:["Get COSMOS Installed onto your computer by following the ",(0,a.jsx)(t.a,{href:"installation",children:"Installation Guide"}),".","\n",(0,a.jsxs)(t.ul,{children:["\n",(0,a.jsx)(t.li,{children:"You should now have COSMOS installed and a Demo project available that we can make changes to."}),"\n"]}),"\n"]}),"\n",(0,a.jsxs)(t.li,{children:["Browse to ",(0,a.jsx)(t.a,{href:"http://localhost:2900",children:"http://localhost:2900"}),"\n",(0,a.jsxs)(t.ul,{children:["\n",(0,a.jsx)(t.li,{children:'The COSMOS Command and Telemetry Server will appear. This tool provides real-time information about each "target" in the system. Targets are external systems that receive commands and generate telemetry, often over ethernet or serial connections.'}),"\n"]}),"\n"]}),"\n",(0,a.jsxs)(t.li,{children:["Experiment with other COSMOS tools. This is a DEMO environment so you can't break anything. Some things to try:","\n",(0,a.jsxs)(t.ul,{children:["\n",(0,a.jsx)(t.li,{children:"Use Command Sender to send individual commands."}),"\n",(0,a.jsx)(t.li,{children:"Use Limits Monitor to watch for telemetry limits violations"}),"\n",(0,a.jsx)(t.li,{children:"Run some of the example scripts in Script Runner and Test Runner"}),"\n",(0,a.jsx)(t.li,{children:"View individual Telemetry packets in Packet Viewer"}),"\n",(0,a.jsx)(t.li,{children:"View detailed telemetry displays in Telemetry Viewer"}),"\n",(0,a.jsx)(t.li,{children:"Graph some data in Telemetry Grapher"}),"\n",(0,a.jsx)(t.li,{children:"View log type data in Data Viewer"}),"\n",(0,a.jsx)(t.li,{children:"Process log data with Data Extractor"}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,a.jsxs)(t.admonition,{title:"Browser Version Issue",type:"info",children:[(0,a.jsxs)(t.p,{children:["When you try to load the page and it fails to load, check with the built-in web development tools / DevTools. We have seen some strange things with version of browsers. You can build to a version of browser if you need to by reading about the ",(0,a.jsx)(t.a,{href:"https://github.com/browserslist/browserslist",children:"browserslist"}),". A typical failure results in:"]}),(0,a.jsx)(t.pre,{children:(0,a.jsx)(t.code,{children:"unexpected token ||=\n"})}),(0,a.jsxs)(t.p,{children:["To fix this make sure your browsers is compliant with the current settings in the ",(0,a.jsx)(t.a,{href:"https://github.com/OpenC3/cosmos/blob/main/openc3-cosmos-init/plugins/openc3-tool-base/.browserslistrc",children:".browserlistrc"})," file. You can change this and rebuild the image. Note: This can cause build speeds to increase or decrease."]})]}),"\n",(0,a.jsx)(t.h2,{id:"interfacing-with-your-hardware",children:"Interfacing with Your Hardware"}),"\n",(0,a.jsx)(t.p,{children:"Playing with the COSMOS Demo is fun and all, but now you want to talk to your own real hardware? Let's do it!"}),"\n",(0,a.jsx)(t.admonition,{title:"Install and Platform",type:"info",children:(0,a.jsx)(t.p,{children:"This guide assumes we're on Windows and COSMOS is installed in C:\\COSMOS. On Mac or Linux, change openc3.bat to openc3.sh and adjust paths as necessary to match your installation directory."})}),"\n",(0,a.jsxs)(t.ol,{children:["\n",(0,a.jsxs)(t.li,{children:["\n",(0,a.jsx)(t.p,{children:"Before creating your own configuration you should uninstall the COSMOS Demo so you're working with a clean COSMOS system. Click the Admin button and the PLUGINS tab. Then click the Trash can icon next to openc3-cosmos-demo to delete it. When you go back to the Command and Telemetry Server you should have a blank table with no interfaces."}),"\n"]}),"\n",(0,a.jsxs)(t.li,{children:["\n",(0,a.jsxs)(t.p,{children:["If you followed the ",(0,a.jsx)(t.a,{href:"installation",children:"Installation Guide"})," you should already be inside a cloned ",(0,a.jsx)(t.a,{href:"https://github.com/OpenC3/cosmos-project",children:"openc3-project"})," which is in your PATH (necessary for openc3.bat / openc3.sh to be resolved). Inside this project it's recommended to edit the README.md (",(0,a.jsx)(t.a,{href:"https://www.markdownguide.org/",children:"Markdown"}),") to describe your program / project."]}),"\n"]}),"\n",(0,a.jsxs)(t.li,{children:["\n",(0,a.jsx)(t.p,{children:"Now we need to create a plugin. Plugins are how we add targets and microservices to COSMOS. Our plugin will contain a single target which contains all the information defining the packets (command and telemetry) that are needed to communicate with the target. Use the COSMOS plugin generator to create the correct structure."}),"\n"]}),"\n"]}),"\n",(0,a.jsx)(t.admonition,{title:"Python vs Ruby",type:"info",children:(0,a.jsxs)(t.p,{children:["Each CLI command requires the use of ",(0,a.jsx)(t.code,{children:"--python"})," or ",(0,a.jsx)(t.code,{children:"--ruby"})," unless you se the OPENC3_LANGUAGE environment variable to 'python' or 'ruby'."]})}),"\n",(0,a.jsx)(t.pre,{children:(0,a.jsx)(t.code,{className:"language-batch",children:"C:\\openc3-project> openc3.bat cli generate plugin BOB --python\nPlugin openc3-cosmos-bob successfully generated!\n"})}),"\n",(0,a.jsxs)(t.p,{children:['This should create a new directory called "openc3-cosmos-bob" with a bunch of files in it. The full description of all the files is explained by the ',(0,a.jsx)(t.a,{href:"generators#plugin-generator",children:"Plugin Generator"})," page."]}),"\n",(0,a.jsx)(t.admonition,{title:"Run as the Root user",type:"info",children:(0,a.jsxs)(t.p,{children:["The cli runs as the default COSMOS container user which is the recommended practice. If you're having issues running as that user you can run as the root user (effectively ",(0,a.jsx)(t.code,{children:"docker run --user=root"})," ) by running ",(0,a.jsx)(t.code,{children:"cliroot"})," instead of ",(0,a.jsx)(t.code,{children:"cli"})," in any of the examples."]})}),"\n",(0,a.jsxs)(t.ol,{children:["\n",(0,a.jsxs)(t.li,{children:["\n",(0,a.jsxs)(t.p,{children:["Starting with ",(0,a.jsx)(t.a,{href:"https://openc3.com/news/2023/02/23/openc3-cosmos-5-5-0-released/",children:"COSMOS v5.5.0"}),", the plugin generator creates just the plugin framework (previously it would also create a target). From within the newly created plugin directory, we generate a target."]}),"\n",(0,a.jsx)(t.pre,{children:(0,a.jsx)(t.code,{className:"language-batch",children:"C:\\openc3-project> cd openc3-cosmos-bob\nopenc3-cosmos-bob> openc3.bat cli generate target BOB --python\nTarget BOB successfully generated!\n"})}),"\n"]}),"\n"]}),"\n",(0,a.jsx)(t.admonition,{title:"Generators",type:"info",children:(0,a.jsxs)(t.p,{children:["There are a number of generators available. Run ",(0,a.jsx)(t.code,{children:"openc3.bat cli generate"})," to see all the available options."]})}),"\n",(0,a.jsxs)(t.ol,{children:["\n",(0,a.jsxs)(t.li,{children:["\n",(0,a.jsx)(t.p,{children:"The target generator creates a single target named BOB. Best practice is to create a single target per plugin to make it easier to share targets and upgrade them individually. Lets see what the target generator created for us. Open the openc3-cosmos-bob/targets/BOB/cmd_tlm/cmd.txt:"}),"\n",(0,a.jsx)(t.pre,{children:(0,a.jsx)(t.code,{className:"language-ruby",children:'COMMAND BOB EXAMPLE BIG_ENDIAN "Packet description"\n # Keyword Name BitSize Type Min Max Default Description\n APPEND_ID_PARAMETER ID 16 INT 1 1 1 "Identifier"\n APPEND_PARAMETER VALUE 32 FLOAT 0 10.5 2.5 "Value"\n APPEND_PARAMETER BOOL 8 UINT MIN MAX 0 "Boolean"\n STATE FALSE 0\n STATE TRUE 1\n APPEND_PARAMETER LABEL 0 STRING "OpenC3" "The label to apply"\n'})}),"\n",(0,a.jsx)(t.p,{children:"What does this all mean?"}),"\n",(0,a.jsxs)(t.ul,{children:["\n",(0,a.jsx)(t.li,{children:"We created a COMMAND for target BOB named EXAMPLE."}),"\n",(0,a.jsx)(t.li,{children:'The command is made up of BIG_ENDIAN parameters and is described by "Packet description". Here we are using the append flavor of defining parameters which stacks them back to back as it builds up the packet and you don\'t have to worry about defining the bit offset into the packet.'}),"\n",(0,a.jsx)(t.li,{children:'First we APPEND_ID_PARAMETER a parameter that is used to identify the packet called ID that is an 16-bit signed integer (INT) with a minimum value of 1, a maximum value of 1, and a default value of 1, that is described as the "Identifier".'}),"\n",(0,a.jsx)(t.li,{children:"Next we APPEND_PARAMETER a parameter called VALUE that is a 32-bit float (FLOAT) that has a minimum value of 0, a maximum value of 10.5, and a default value of 2.5."}),"\n",(0,a.jsx)(t.li,{children:"Then we APPEND_PARAMETER a third parameter called BOOL which is a 8-bit unsigned integer (UINT) with a minimum value of MIN (meaning the smallest value a UINT supports, e.g 0), a maximum value of MAX (largest value a UINT supports, e.g. 255), and a default value of 0. BOOL has two states which are just a fancy way of giving meaning to the integer values 0 and 1. The STATE FALSE has a value of 0 and the STATE TRUE has a value of 1."}),"\n",(0,a.jsx)(t.li,{children:"Finally we APPEND_PARAMETER called LABEL which is a 0-bit (meaning it takes up all the remaining space in the packet) string (STRING) with a default value of \"OpenC3\". Strings don't have minimum or maximum values as that doesn't make sense for STRING types."}),"\n"]}),"\n",(0,a.jsxs)(t.p,{children:["Check out the full ",(0,a.jsx)(t.a,{href:"../configuration/command",children:"Command"})," documentation for more."]}),"\n"]}),"\n",(0,a.jsxs)(t.li,{children:["\n",(0,a.jsx)(t.p,{children:"Now open the openc3-cosmos-bob/targets/BOB/cmd_tlm/tlm.txt:"}),"\n",(0,a.jsx)(t.pre,{children:(0,a.jsx)(t.code,{className:"language-ruby",children:'TELEMETRY BOB STATUS BIG_ENDIAN "Telemetry description"\n # Keyword Name BitSize Type ID Description\n APPEND_ID_ITEM ID 16 INT 1 "Identifier"\n APPEND_ITEM VALUE 32 FLOAT "Value"\n APPEND_ITEM BOOL 8 UINT "Boolean"\n STATE FALSE 0\n STATE TRUE 1\n APPEND_ITEM LABEL 0 STRING "The label to apply"\n'})}),"\n",(0,a.jsxs)(t.ul,{children:["\n",(0,a.jsx)(t.li,{children:'This time we created a TELEMETRY packet for target BOB called STATUS that contains BIG_ENDIAN items and is described as "Telemetry description".'}),"\n",(0,a.jsx)(t.li,{children:'We start by defininig an ID_ITEM called ID that is a 16-bit signed integer (INT) with an id value of 1 and described as "Identifier". Id items are used to take unidentified blobs of bytes and determine which packet they are. In this case if a blob comes in with a value of 1, at bit offset 0 (since we APPEND this item first), interpreted as a 16-bit integer, then this packet will be "identified" as STATUS. Note the first packet defined without any ID_ITEMS is a "catch-all" packet that matches all incoming data (even if the data lengths don\'t match).'}),"\n",(0,a.jsx)(t.li,{children:"Next we define three items similar to the command definition above."}),"\n"]}),"\n",(0,a.jsxs)(t.p,{children:["Check out the full ",(0,a.jsx)(t.a,{href:"../configuration/telemetry",children:"Telemetry"})," documentation for more."]}),"\n"]}),"\n",(0,a.jsxs)(t.li,{children:["\n",(0,a.jsxs)(t.p,{children:["COSMOS has defined an example command and telemetry packet for our target. Most targets will obviously have more than one command and telemetry packet. To add more simply create additional COMMAND and TELEMETRY lines in your text files. Actual packets should match the structure of your command and telemetry. Be sure to add at least one unique ",(0,a.jsx)(t.a,{href:"../configuration/command#id_parameter",children:"ID_PARAMETER"})," and ",(0,a.jsx)(t.a,{href:"../configuration/telemetry#id_item",children:"ID_ITEM"})," so your packets can be distinguished from each other."]}),"\n"]}),"\n",(0,a.jsxs)(t.li,{children:["\n",(0,a.jsx)(t.p,{children:"Now we need to tell COSMOS how to connect to our BOB target. Open the openc3-cosmos-bob/plugin.txt file:"}),"\n",(0,a.jsx)(t.pre,{children:(0,a.jsx)(t.code,{className:"language-ruby",children:"# Set VARIABLEs here to allow variation in your plugin\n# See [Plugins](../configuration/plugins) for more information\nVARIABLE bob_target_name BOB\n\n# Modify this according to your actual target connection\n# See [Interfaces](../configuration/interfaces) for more information\nTARGET BOB <%= bob_target_name %>\nINTERFACE <%= bob_target_name %>_INT openc3/interfaces/tcpip_client_interface.py host.docker.internal 8080 8081 10.0 None BURST\n MAP_TARGET <%= bob_target_name %>\n"})}),"\n",(0,a.jsxs)(t.ul,{children:["\n",(0,a.jsx)(t.li,{children:'This configures the plugin with a VARIABLE called bob_target_name with a default of "BOB". When you install this plugin you will have the option to change the name of this target to something other than "BOB". This is useful to avoid name conflicts and allows you to have multiple copies of the BOB target in your COSMOS system.'}),"\n",(0,a.jsx)(t.li,{children:"The TARGET line declares the new BOB target using the name from the variable. The <%= %> syntax is called ERB (embedded Ruby) and allows us to put variables into our text files, in this case referencing our bob_target_name."}),"\n",(0,a.jsxs)(t.li,{children:["The last line declares a new INTERFACE called (by default) BOB_INT that will connect as a TCP/IP client using the code in tcpip_client_interface.py to address host.docker.internal (This adds an /etc/hosts entry to the correct IP address for the host's gateway) using port 8080 for writing and 8081 for reading. It also has a write timeout of 10 seconds and reads will never timeout (nil). The TCP/IP stream will be interpreted using the COSMOS ",(0,a.jsx)(t.a,{href:"../configuration/protocols#burst-protocol",children:"BURST"})," protocol which means it will read as much data as it can from the interface. For all the details on how to configure COSMOS interfaces please see the ",(0,a.jsx)(t.a,{href:"../configuration/interfaces",children:"Interface Guide"}),". The MAP_TARGET line tells COSMOS that it will receive telemetry from and send commands to the BOB target using the BOB_INT interface."]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,a.jsx)(t.admonition,{title:"Variables Support Reusability",type:"note",children:(0,a.jsx)(t.p,{children:"In a plugin that you plan to reuse you should make things like hostnames and ports variables"})}),"\n",(0,a.jsx)(t.h2,{id:"building-your-plugin",children:"Building Your Plugin"}),"\n",(0,a.jsxs)(t.ol,{children:["\n",(0,a.jsxs)(t.li,{children:["\n",(0,a.jsx)(t.p,{children:"Now we need to build our plugin and upload it to COSMOS."}),"\n",(0,a.jsx)(t.pre,{children:(0,a.jsx)(t.code,{className:"language-batch",children:"openc3-cosmos-bob> openc3.bat cli rake build VERSION=1.0.0\n Successfully built RubyGem\n Name: openc3-cosmos-bob\n Version: 1.0.0\n File: openc3-cosmos-bob-1.0.0.gem\n"})}),"\n",(0,a.jsxs)(t.ul,{children:["\n",(0,a.jsxs)(t.li,{children:["Note that the VERSION is required to specify the version to build. We recommend ",(0,a.jsx)(t.a,{href:"https://semver.org/",children:"semantic versioning"})," when building your plugin so people using your plugin (including you) know when there are breaking changes."]}),"\n"]}),"\n"]}),"\n",(0,a.jsxs)(t.li,{children:["\n",(0,a.jsx)(t.p,{children:"Once our plugin is built we need to upload it to COSMOS. Go back to the Admin page and click the Plugins Tab. Click on \"Click to install plugin\" and select the openc3-cosmos-bob-1.0.0.gem file. Then click Upload. Go back to the CmdTlmServer and you should see the plugin being deployed at which point the BOB_INT interface should appear and try to connect. Go ahead and click 'Cancel' because unless you really have something listening on port 8080 this will never connect. At this point you can explore the other CmdTlmServer tabs and other tools to see your newly defined BOB target."}),"\n"]}),"\n",(0,a.jsxs)(t.li,{children:["\n",(0,a.jsx)(t.p,{children:'Let\'s modify our BOB target and then update the copy in COSMOS. If you open Command Sender in COSMOS to BOB EXAMPLE you should see the VALUE parameter has value 2.5. Open the openc3-cosmos-bob/targets/BOB/cmd_tlm/cmd.txt and change the Default value for VALUE to 5 and the description to "New Value".'}),"\n",(0,a.jsx)(t.pre,{children:(0,a.jsx)(t.code,{className:"language-ruby",children:'COMMAND BOB EXAMPLE BIG_ENDIAN "Packet description"\n # Keyword Name BitSize Type Min Max Default Description\n APPEND_ID_PARAMETER ID 16 INT 1 1 1 "Identifier"\n APPEND_PARAMETER VALUE 32 FLOAT 0 10.5 5 "New Value"\n APPEND_PARAMETER BOOL 8 UINT MIN MAX 0 "Boolean"\n STATE FALSE 0\n STATE TRUE 1\n APPEND_PARAMETER LABEL 0 STRING "OpenC3" "The label to apply"\n'})}),"\n"]}),"\n",(0,a.jsxs)(t.li,{children:["\n",(0,a.jsx)(t.p,{children:"Rebuild the plugin with a new VERSION number. Since we didn't make any breaking changes we simply bump the patch release number:"}),"\n",(0,a.jsx)(t.pre,{children:(0,a.jsx)(t.code,{className:"language-batch",children:"openc3-cosmos-bob> openc3.bat cli rake build VERSION=1.0.1\n Successfully built RubyGem\n Name: openc3-cosmos-bob\n Version: 1.0.1\n File: openc3-cosmos-bob-1.0.1.gem\n"})}),"\n"]}),"\n",(0,a.jsxs)(t.li,{children:["\n",(0,a.jsx)(t.p,{children:'Go back to the Admin page and click the Plugins Tab. This time click the clock icon next to openc3-cosmos-bob-1.0.0 to Upgrade the plugin. Browse to the newly built plugin gem and select it. This will re-prompt for the plugin variables (bob_target_name) so don\'t change the name and just click OK. You should see a message about the plugin being installed at which point the plugins list will change to openc3-cosmos-bob-1.0.1.gem. Go back to Command Sender and you should see the new Default value for VALUE is 5 and the description is "New Value". We have upgraded our plugin!'}),"\n"]}),"\n",(0,a.jsxs)(t.li,{children:["\n",(0,a.jsxs)(t.p,{children:["At this point you can create a new plugin named after your real target and start modifying the interface and command and telemetry definitions to enable COSMOS to connect to and drive your target. If you run into trouble look for solutions on our ",(0,a.jsx)(t.a,{href:"https://github.com/OpenC3/cosmos/issues",children:"Github Issues"})," page. If you would like to enquire about support contracts or professional COSMOS development please contact us at ",(0,a.jsx)(t.a,{href:"mailto:support@openc3.com",children:"support@openc3.com"}),"."]}),"\n"]}),"\n"]})]})}function h(e={}){let{wrapper:t}={...(0,o.a)(),...e.components};return t?(0,a.jsx)(t,{...e,children:(0,a.jsx)(d,{...e})}):d(e)}},2840:function(e,t,n){n.d(t,{Z:function(){return r},a:function(){return s}});var i=n(2784);let a={},o=i.createContext(a);function s(e){let t=i.useContext(o);return i.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function r(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:s(e.components),i.createElement(o.Provider,{value:t},e.children)}}}]);