openc3-cosmos-tool-docs 6.2.1 → 6.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/tools/staticdocs/404.html +1 -1
- data/tools/staticdocs/assets/images/horizontalbox-085c91cebe26fdd5f85b467556607dd4631da5bccabd84fb164d1f46e45e60c9.png +0 -0
- data/tools/staticdocs/assets/images/verticalbox-75738427d398302986b52afb373acef11abf3a24f60d20b8cca442688054b22b.png +0 -0
- data/tools/staticdocs/assets/js/1e02e6a3.12bdc98d.js +1 -0
- data/tools/staticdocs/assets/js/2bb7bf90.4a658ce6.js +1 -0
- data/tools/staticdocs/assets/js/35398c5c.fcf47881.js +1 -0
- data/tools/staticdocs/assets/js/5bc719f6.6d27292c.js +1 -0
- data/tools/staticdocs/assets/js/5c6ce5ec.652b922b.js +1 -0
- data/tools/staticdocs/assets/js/6b210247.6a77064a.js +1 -0
- data/tools/staticdocs/assets/js/6f92e431.6439052e.js +1 -0
- data/tools/staticdocs/assets/js/75e64983.324643a8.js +1 -0
- data/tools/staticdocs/assets/js/{7f5b2696.72e3b019.js → 7f5b2696.a3dc640e.js} +1 -1
- data/tools/staticdocs/assets/js/{9424f0b3.96e6dac4.js → 9424f0b3.3683501c.js} +1 -1
- data/tools/staticdocs/assets/js/964eb012.dbc2c206.js +1 -0
- data/tools/staticdocs/assets/js/97535711.e595488c.js +1 -0
- data/tools/staticdocs/assets/js/99581c43.841b4a2e.js +1 -0
- data/tools/staticdocs/assets/js/a9987364.b418f772.js +1 -0
- data/tools/staticdocs/assets/js/a9b2dc27.e01c9bb4.js +1 -0
- data/tools/staticdocs/assets/js/aa6b6c1b.3aad95fc.js +1 -0
- data/tools/staticdocs/assets/js/b062d239.535a2ceb.js +1 -0
- data/tools/staticdocs/assets/js/ce89ef36.6b89b0fe.js +1 -0
- data/tools/staticdocs/assets/js/{d8ca4191.f5da7c6d.js → d8ca4191.8df86c99.js} +1 -1
- data/tools/staticdocs/assets/js/db8fa1d0.f1eed806.js +1 -0
- data/tools/staticdocs/assets/js/{main.485b7747.js → main.8d947189.js} +2 -2
- data/tools/staticdocs/assets/js/runtime~main.d38c5d36.js +1 -0
- data/tools/staticdocs/docs/configuration/accessors.html +1 -1
- data/tools/staticdocs/docs/configuration/command.html +1 -1
- data/tools/staticdocs/docs/configuration/format.html +1 -1
- data/tools/staticdocs/docs/configuration/interfaces.html +1 -1
- data/tools/staticdocs/docs/configuration/plugins.html +1 -1
- data/tools/staticdocs/docs/configuration/protocols.html +1 -1
- data/tools/staticdocs/docs/configuration/ssl-tls.html +1 -1
- data/tools/staticdocs/docs/configuration/table.html +1 -1
- data/tools/staticdocs/docs/configuration/target.html +1 -1
- data/tools/staticdocs/docs/configuration/telemetry-screens.html +5 -5
- data/tools/staticdocs/docs/configuration/telemetry.html +1 -1
- data/tools/staticdocs/docs/configuration.html +1 -1
- data/tools/staticdocs/docs/development/curl.html +1 -1
- data/tools/staticdocs/docs/development/developing.html +1 -1
- data/tools/staticdocs/docs/development/json-api.html +1 -1
- data/tools/staticdocs/docs/development/log-structure.html +1 -1
- data/tools/staticdocs/docs/development/roadmap.html +20 -29
- data/tools/staticdocs/docs/development/streaming-api.html +88 -2
- data/tools/staticdocs/docs/development/testing.html +5 -2
- data/tools/staticdocs/docs/development.html +1 -1
- data/tools/staticdocs/docs/getting-started/cli.html +47 -0
- data/tools/staticdocs/docs/getting-started/generators.html +2 -2
- data/tools/staticdocs/docs/getting-started/gettingstarted.html +2 -2
- data/tools/staticdocs/docs/getting-started/installation.html +3 -3
- data/tools/staticdocs/docs/getting-started/{key_concepts.html → key-concepts.html} +3 -3
- data/tools/staticdocs/docs/getting-started/podman.html +2 -2
- data/tools/staticdocs/docs/getting-started/requirements.html +2 -2
- data/tools/staticdocs/docs/getting-started/upgrading.html +3 -3
- data/tools/staticdocs/docs/getting-started.html +1 -1
- data/tools/staticdocs/docs/guides/bridges.html +1 -1
- data/tools/staticdocs/docs/guides/cfs.html +1 -1
- data/tools/staticdocs/docs/guides/custom-widgets.html +2 -2
- data/tools/staticdocs/docs/guides/dynamic-packets.html +17 -0
- data/tools/staticdocs/docs/guides/{exposing_microservices.html → exposing-microservices.html} +2 -2
- data/tools/staticdocs/docs/guides/little-endian-bitfields.html +2 -2
- data/tools/staticdocs/docs/guides/local-mode.html +1 -1
- data/tools/staticdocs/docs/guides/logging.html +1 -1
- data/tools/staticdocs/docs/guides/monitoring.html +1 -1
- data/tools/staticdocs/docs/guides/performance.html +1 -1
- data/tools/staticdocs/docs/guides/raspberrypi.html +1 -1
- data/tools/staticdocs/docs/guides/script-writing.html +1 -1
- data/tools/staticdocs/docs/guides/scripting-api.html +33 -3
- data/tools/staticdocs/docs/guides.html +1 -1
- data/tools/staticdocs/docs/meta/contributing.html +1 -1
- data/tools/staticdocs/docs/meta/licenses.html +1 -1
- data/tools/staticdocs/docs/meta/philosophy.html +1 -1
- data/tools/staticdocs/docs/meta/xtce.html +1 -1
- data/tools/staticdocs/docs/meta.html +1 -1
- data/tools/staticdocs/docs/privacy.html +1 -1
- data/tools/staticdocs/docs/tools/admin.html +1 -1
- data/tools/staticdocs/docs/tools/autonomic.html +1 -1
- data/tools/staticdocs/docs/tools/bucket-explorer.html +1 -1
- data/tools/staticdocs/docs/tools/calendar.html +1 -1
- data/tools/staticdocs/docs/tools/cmd-sender.html +1 -1
- data/tools/staticdocs/docs/tools/cmd-tlm-server.html +1 -1
- data/tools/staticdocs/docs/tools/command_history.html +1 -1
- data/tools/staticdocs/docs/tools/data-extractor.html +1 -1
- data/tools/staticdocs/docs/tools/data-viewer.html +1 -1
- data/tools/staticdocs/docs/tools/handbooks.html +1 -1
- data/tools/staticdocs/docs/tools/limits-monitor.html +1 -1
- data/tools/staticdocs/docs/tools/packet-viewer.html +1 -1
- data/tools/staticdocs/docs/tools/script-runner.html +1 -1
- data/tools/staticdocs/docs/tools/table-manager.html +1 -1
- data/tools/staticdocs/docs/tools/tlm-grapher.html +1 -1
- data/tools/staticdocs/docs/tools/tlm-viewer.html +1 -1
- data/tools/staticdocs/docs/tools.html +1 -1
- data/tools/staticdocs/docs.html +1 -1
- data/tools/staticdocs/img/telemetry_viewer/widgets/horizontalbox.png +0 -0
- data/tools/staticdocs/img/telemetry_viewer/widgets/verticalbox.png +0 -0
- data/tools/staticdocs/index.html +1 -1
- data/tools/staticdocs/lunr-index-1743825503427.json +1 -0
- data/tools/staticdocs/lunr-index.json +1 -1
- data/tools/staticdocs/markdown-page.html +1 -1
- data/tools/staticdocs/search-doc-1743825503427.json +1 -0
- data/tools/staticdocs/search-doc.json +1 -1
- data/tools/staticdocs/sitemap.xml +1 -1
- metadata +33 -32
- data/tools/staticdocs/assets/images/horizontalbox-ddf82f64de700286a742a71e0c1adebbc7e9822a0dff41139f41bc476e4fc4ce.png +0 -0
- data/tools/staticdocs/assets/images/verticalbox-28fdba6f2c051a499b7f08a1be97edf0297ac9a9ce0dba44f02a7fe1c2616d91.png +0 -0
- data/tools/staticdocs/assets/js/1e02e6a3.f477eca7.js +0 -1
- data/tools/staticdocs/assets/js/2bb7bf90.4051cf46.js +0 -1
- data/tools/staticdocs/assets/js/31436304.a6b2eb4a.js +0 -1
- data/tools/staticdocs/assets/js/5bc719f6.b84c55e3.js +0 -1
- data/tools/staticdocs/assets/js/5c6ce5ec.67d1d92e.js +0 -1
- data/tools/staticdocs/assets/js/6b210247.ef28d4e5.js +0 -1
- data/tools/staticdocs/assets/js/6f92e431.d2ce2753.js +0 -1
- data/tools/staticdocs/assets/js/75e64983.81988bef.js +0 -1
- data/tools/staticdocs/assets/js/97535711.78660098.js +0 -1
- data/tools/staticdocs/assets/js/99581c43.5e55992d.js +0 -1
- data/tools/staticdocs/assets/js/a9987364.81e9c91d.js +0 -1
- data/tools/staticdocs/assets/js/aa6b6c1b.08f58887.js +0 -1
- data/tools/staticdocs/assets/js/ce89ef36.1d76e86a.js +0 -1
- data/tools/staticdocs/assets/js/db8fa1d0.94b76b52.js +0 -1
- data/tools/staticdocs/assets/js/ebec1ccb.f938ebaa.js +0 -1
- data/tools/staticdocs/assets/js/runtime~main.61a578da.js +0 -1
- data/tools/staticdocs/lunr-index-1741317069195.json +0 -1
- data/tools/staticdocs/search-doc-1741317069195.json +0 -1
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([["718"],{5809:function(e,n,i){i.r(n),i.d(n,{default:()=>h,frontMatter:()=>s,metadata:()=>r,assets:()=>a,toc:()=>l,contentTitle:()=>c});var r=JSON.parse('{"id":"guides/exposing-microservices","title":"Exposing Microservices","description":"Provide external accessibility to microservices","source":"@site/docs/guides/exposing-microservices.md","sourceDirName":"guides","slug":"/guides/exposing-microservices","permalink":"/tools/staticdocs/docs/guides/exposing-microservices","draft":false,"unlisted":false,"editUrl":"https://github.com/OpenC3/cosmos/tree/main/docs.openc3.com/docs/guides/exposing-microservices.md","tags":[],"version":"current","frontMatter":{"title":"Exposing Microservices","description":"Provide external accessibility to microservices","sidebar_custom_props":{"myEmoji":"\uD83D\uDEAA"}},"sidebar":"defaultSidebar","previous":{"title":"Dynamic Packets","permalink":"/tools/staticdocs/docs/guides/dynamic-packets"},"next":{"title":"Little Endian Bitfields","permalink":"/tools/staticdocs/docs/guides/little-endian-bitfields"}}'),t=i("2322"),o=i("2840");let s={title:"Exposing Microservices",description:"Provide external accessibility to microservices",sidebar_custom_props:{myEmoji:"\uD83D\uDEAA"}},c=void 0,a={},l=[{value:"Expose microservices using the PORT and ROUTE_PREFIX keywords",id:"expose-microservices-using-the-port-and-route_prefix-keywords",level:2},{value:"Connecting to microservices from a different INTERFACE in plugin.txt",id:"connecting-to-microservices-from-a-different-interface-in-plugintxt",level:2}];function d(e){let n={a:"a",admonition:"admonition",code:"code",h2:"h2",li:"li",p:"p",pre:"pre",ul:"ul",...(0,o.a)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.p,{children:"COSMOS provides a simple method to add new APIs and make custom microservices and interfaces accessible to the network."}),"\n",(0,t.jsx)(n.admonition,{title:"Make sure anything you expose is secure",type:"warning",children:(0,t.jsx)(n.p,{children:"Make sure that any new apis you expose check for user credentials and authorize actions appropriately."})}),"\n",(0,t.jsx)(n.h2,{id:"expose-microservices-using-the-port-and-route_prefix-keywords",children:"Expose microservices using the PORT and ROUTE_PREFIX keywords"}),"\n",(0,t.jsxs)(n.p,{children:["In your plugin.txt file, both ",(0,t.jsx)(n.a,{href:"../configuration/plugins#interface-1",children:"INTERFACE"})," and ",(0,t.jsx)(n.a,{href:"../configuration/plugins#microservice-1",children:"MICROSERVICE"})," support the keywords ",(0,t.jsx)(n.a,{href:"../configuration/plugins#port-1",children:"PORT"})," and ",(0,t.jsx)(n.a,{href:"../configuration/plugins#route_prefix-1",children:"ROUTE_PREFIX"}),"."]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.a,{href:"../configuration/plugins#port-1",children:"PORT"})," is used to declare the port(s) that your microservice is listening for connections on. This is used in combination with ",(0,t.jsx)(n.a,{href:"../configuration/plugins#route_prefix-1",children:"ROUTE_PREFIX"})," to create a dynamic traefik route to your microservice."]}),"\n",(0,t.jsx)(n.p,{children:"The following code is used internally to let traefik know where to connect to your microservice internally:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-ruby",children:"if ENV['OPENC3_OPERATOR_HOSTNAME']\n url = \"http://#{ENV['OPENC3_OPERATOR_HOSTNAME']}:#{port}\"\nelse\n if ENV['KUBERNETES_SERVICE_HOST']\n url = \"http://#{microservice_name.downcase.gsub('__', '-').gsub('_', '-')}-service:#{port}\"\n else\n url = \"http://openc3-operator:#{port}\"\n end\nend\n"})}),"\n",(0,t.jsx)(n.p,{children:"Note that this is the internal route to your microservice. Determining this route checks two different environment variables."}),"\n",(0,t.jsx)(n.p,{children:'OPENC3_OPERATOR_HOSTNAME is used to override the default service name for our regular docker compose operator of "openc3-operator". Usually this is not set.'}),"\n",(0,t.jsx)(n.p,{children:"In OpenC3 Enterprise, KUBERNETES_SERVICE_HOST is used to detect if we are running in a Kubernetes environment (it will be set by Kubernetes), in which case the service is expected to have a Kubernetes service named scope-user-microservicename-service. For example, if you are using the DEFAULT scope and have a microservice named MYMICROSERVICE the service would be found at the hostname: default-user-mymicroservice-service. Double underscores or single underscores are replaced by a dash and the name is all lower case."}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.a,{href:"../configuration/plugins#route_prefix-1",children:"ROUTE_PREFIX"})," is used to define the external route. The external route will take the form of http(s)://YOURCOSMOSDOMAIN",":PORT","/ROUTE_PREFIX. So for example, if you set the ",(0,t.jsx)(n.a,{href:"../configuration/plugins#route_prefix-1",children:"ROUTE_PREFIX"})," to /mymicroservice then on a default local installation, it could be reached at ",(0,t.jsx)(n.code,{children:"http://localhost:2900/mymicroservice"}),". The ",(0,t.jsx)(n.code,{children:"http://localhost:2900"})," part should be substituted by whatever domain you are accessing COSMOS at."]}),"\n",(0,t.jsxs)(n.p,{children:["Here is a snippet of code showing ",(0,t.jsx)(n.a,{href:"../configuration/plugins#port-1",children:"PORT"})," and ",(0,t.jsx)(n.a,{href:"../configuration/plugins#route_prefix-1",children:"ROUTE_PREFIX"})," in use within a plugin.txt file:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"VARIABLE cfdp_microservice_name CFDP\nVARIABLE cfdp_route_prefix /cfdp\nVARIABLE cfdp_port 2905\n\nMICROSERVICE CFDP <%= cfdp_microservice_name %>\n WORK_DIR .\n ROUTE_PREFIX <%= cfdp_route_prefix %>\n PORT <%= cfdp_port %>\n"})}),"\n",(0,t.jsx)(n.p,{children:"Leaving the variables at their default values the following will occur:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["The microservice will be exposed internally to Docker (Open Source or Enterprise) at: ",(0,t.jsx)(n.code,{children:"http://openc3-operator:2905"})]}),"\n",(0,t.jsxs)(n.li,{children:["The microservice will be exposed internally to Kubernetes (Enterprise) at: ",(0,t.jsx)(n.code,{children:"http://default-user-cfdp-service:2905"})]}),"\n",(0,t.jsxs)(n.li,{children:["The microservice will be exposed externally to the network at: ",(0,t.jsx)(n.code,{children:"http://localhost:2900/cfdp"})]}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:["The same can be done for ",(0,t.jsx)(n.a,{href:"../configuration/plugins#interface-1",children:"INTERFACE"})," but note that the Kubernetes service name will use the microservice name of the interface which takes the form of ",(0,t.jsx)(n.code,{children:"SCOPE__INTERFACE__INTERFACENAME"}),"."]}),"\n",(0,t.jsxs)(n.p,{children:["Here is an example using ",(0,t.jsx)(n.a,{href:"../configuration/plugins#port",children:"PORT"})," and ",(0,t.jsx)(n.a,{href:"../configuration/plugins#route_prefix",children:"ROUTE_PREFIX"})," with ",(0,t.jsx)(n.a,{href:"../configuration/plugins#interface-1",children:"INTERFACE"}),":"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"VARIABLE my_interface_name MY_INT\nVARIABLE my_route_prefix /myint\nVARIABLE my_port 2910\n\nINTERFACE <%= my_interface_name %> http_server_interface.rb <%= my_port %>\n ROUTE_PREFIX <%= my_route_prefix %>\n PORT <%= my_port %>\n"})}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["The interface will be exposed internally to Docker (Open Source or Enterprise) at: ",(0,t.jsx)(n.code,{children:"http://openc3-operator:2910"})]}),"\n",(0,t.jsxs)(n.li,{children:["The interface will be exposed internally to Kubernetes (Enterprise) at: ",(0,t.jsx)(n.code,{children:"http://default-interface-my-int-service:2905"})]}),"\n",(0,t.jsxs)(n.li,{children:["The interface will be exposed externally to the network at: ",(0,t.jsx)(n.code,{children:"http://localhost:2900/myint"})]}),"\n"]}),"\n",(0,t.jsx)(n.admonition,{title:"Sharded Operator on Kubernetes (Enterprise)",type:"warning",children:(0,t.jsx)(n.p,{children:"The sharded operator is expected to be used on Kubernetes whenever the Kubernetes Operator is not used. Typically this will be because the user does not have permission to use the Kubernetes API directly to spawn containers which is required for use of the Kubernetes Operator. In this case, Kubernetes services will NOT be automatically created, and will have to be manually created by a user with permissions in Kubernetes, or through some other authorized method (like a custom framework dashboard or config file)."})}),"\n",(0,t.jsx)(n.h2,{id:"connecting-to-microservices-from-a-different-interface-in-plugintxt",children:"Connecting to microservices from a different INTERFACE in plugin.txt"}),"\n",(0,t.jsx)(n.p,{children:"Sometimes you might want to have an INTERFACE connect to a microservice you are running. For this case, only the PORT keyword is required on the INTERFACE or MICROSERVICE because we are only connecting internally and ROUTE_PREFIX isn't used."}),"\n",(0,t.jsx)(n.p,{children:"The following code taken from our demo plugin provides an example of how to calculate the correct hostname across both Open Source and Enterprise versions of COSMOS in a plugin.txt file:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:" <% example_host = ENV['KUBERNETES_SERVICE_HOST'] ? \"#{scope}-user-#{example_microservice_name.downcase.gsub('__', '-').gsub('_', '-')}-service\" : \"openc3-operator\" %>\n INTERFACE <%= example_int_name %> example_interface.rb <%= example_host %> <%= example_port %>\n MAP_TARGET <%= example_target_name %>\n"})}),"\n",(0,t.jsx)(n.p,{children:"Note that the above code does not handle the OPENC3_OPERATOR_HOSTNAME environment variable which might change the default name of openc3-operator. Update as needed."})]})}function h(e={}){let{wrapper:n}={...(0,o.a)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(d,{...e})}):d(e)}},2840:function(e,n,i){i.d(n,{Z:function(){return c},a:function(){return s}});var r=i(2784);let t={},o=r.createContext(t);function s(e){let n=r.useContext(o);return r.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:s(e.components),r.createElement(o.Provider,{value:n},e.children)}}}]);
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([["1686"],{1526:function(t){t.exports=JSON.parse('{"categoryGeneratedIndex":{"title":"Configuration","slug":"/configuration","permalink":"/tools/staticdocs/docs/configuration","sidebar":"defaultSidebar","navigation":{"previous":{"title":"Requirements and Design","permalink":"/tools/staticdocs/docs/getting-started/requirements"},"next":{"title":"File Format","permalink":"/tools/staticdocs/docs/configuration/format"}}}}')}}]);
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([["8593"],{9005:function(e,t,i){i.r(t),i.d(t,{default:()=>f,frontMatter:()=>a,metadata:()=>n,assets:()=>d,toc:()=>r,contentTitle:()=>l});var n=JSON.parse('{"id":"guides/little-endian-bitfields","title":"Little Endian Bitfields","description":"Defining little endian bitfields","source":"@site/docs/guides/little-endian-bitfields.md","sourceDirName":"guides","slug":"/guides/little-endian-bitfields","permalink":"/tools/staticdocs/docs/guides/little-endian-bitfields","draft":false,"unlisted":false,"editUrl":"https://github.com/OpenC3/cosmos/tree/main/docs.openc3.com/docs/guides/little-endian-bitfields.md","tags":[],"version":"current","frontMatter":{"title":"Little Endian Bitfields","description":"Defining little endian bitfields","sidebar_custom_props":{"myEmoji":"\uD83D\uDCBB"}},"sidebar":"defaultSidebar","previous":{"title":"Exposing Microservices","permalink":"/tools/staticdocs/docs/guides/
|
1
|
+
"use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([["8593"],{9005:function(e,t,i){i.r(t),i.d(t,{default:()=>f,frontMatter:()=>a,metadata:()=>n,assets:()=>d,toc:()=>r,contentTitle:()=>l});var n=JSON.parse('{"id":"guides/little-endian-bitfields","title":"Little Endian Bitfields","description":"Defining little endian bitfields","source":"@site/docs/guides/little-endian-bitfields.md","sourceDirName":"guides","slug":"/guides/little-endian-bitfields","permalink":"/tools/staticdocs/docs/guides/little-endian-bitfields","draft":false,"unlisted":false,"editUrl":"https://github.com/OpenC3/cosmos/tree/main/docs.openc3.com/docs/guides/little-endian-bitfields.md","tags":[],"version":"current","frontMatter":{"title":"Little Endian Bitfields","description":"Defining little endian bitfields","sidebar_custom_props":{"myEmoji":"\uD83D\uDCBB"}},"sidebar":"defaultSidebar","previous":{"title":"Exposing Microservices","permalink":"/tools/staticdocs/docs/guides/exposing-microservices"},"next":{"title":"Local Mode","permalink":"/tools/staticdocs/docs/guides/local-mode"}}'),s=i("2322"),o=i("2840");let a={title:"Little Endian Bitfields",description:"Defining little endian bitfields",sidebar_custom_props:{myEmoji:"\uD83D\uDCBB"}},l=void 0,d={},r=[];function c(e){let t={code:"code",li:"li",ol:"ol",p:"p",pre:"pre",...(0,o.a)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.p,{children:"Defining little endian bitfields is a little weird but is possible in COSMOS. However, note that APPEND does not work with little endian bitfields."}),"\n",(0,s.jsx)(t.p,{children:"Here are the rules on how COSMOS handles LITTLE_ENDIAN data:"}),"\n",(0,s.jsxs)(t.ol,{children:["\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsx)(t.p,{children:"COSMOS bit offsets are always defined in BIG_ENDIAN terms. Bit 0 is always the most significant bit of the first byte in a packet, and increasing from there."}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsx)(t.p,{children:"All 8, 16, 32, and 64-bit byte-aligned LITTLE_ENDIAN data types define their bit_offset as the most significant bit of the first byte in the packet that contains part of the item. (This is exactly the same as BIG_ENDIAN). Note that for all except 8-bit LITTLE_ENDIAN items, this is the LEAST significant byte of the item."}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsx)(t.p,{children:"LITTLE_ENDIAN bit fields are defined as any LITTLE_ENDIAN INT or UINT item that is not 8, 16, 32, or 64-bit and byte aligned."}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsx)(t.p,{children:"LITTLE_ENDIAN bit fields must define their bit_offset as the location of the most significant bit of the bitfield in BIG_ENDIAN space as described in rule 1 above. So for example. The following C struct at the beginning of a packet would be defined like so:"}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-c",children:'struct {\n unsigned short a:4;\n unsigned short b:8;\n unsigned short c:4;\n}\n\nITEM A 4 4 UINT "struct item a"\nITEM B 12 8 UINT "struct item b"\nITEM C 8 4 UINT "struct item c"\n'})}),"\n",(0,s.jsx)(t.p,{children:"This is hard to visualize, but the structure above gets spread out in a byte array like the following after byte swapping: least significant 4 bits of b, 4-bits a, 4-bits c, most significant 4 bits of b."}),"\n",(0,s.jsx)(t.p,{children:"The best advice is to experiment and use the View Raw feature in the Command and Telemetry Service to inspect the bytes of the packet and adjust as necessary."})]})}function f(e={}){let{wrapper:t}={...(0,o.a)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(c,{...e})}):c(e)}},2840:function(e,t,i){i.d(t,{Z:function(){return l},a:function(){return a}});var n=i(2784);let s={},o=n.createContext(s);function a(e){let t=n.useContext(o);return n.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function l(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:a(e.components),n.createElement(o.Provider,{value:t},e.children)}}}]);
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([["4737"],{5869:function(e,n,t){t.r(n),t.d(n,{default:()=>h,frontMatter:()=>r,metadata:()=>o,assets:()=>l,toc:()=>a,contentTitle:()=>c});var o=JSON.parse('{"id":"getting-started/installation","title":"Installation","description":"Installing OpenC3 COSMOS","source":"@site/docs/getting-started/installation.md","sourceDirName":"getting-started","slug":"/getting-started/installation","permalink":"/tools/staticdocs/docs/getting-started/installation","draft":false,"unlisted":false,"editUrl":"https://github.com/OpenC3/cosmos/tree/main/docs.openc3.com/docs/getting-started/installation.md","tags":[],"version":"current","sidebarPosition":2,"frontMatter":{"sidebar_position":2,"title":"Installation","description":"Installing OpenC3 COSMOS","sidebar_custom_props":{"myEmoji":"\uD83D\uDCBE"}},"sidebar":"defaultSidebar","previous":{"title":"Key Concepts","permalink":"/tools/staticdocs/docs/getting-started/key-concepts"},"next":{"title":"Getting Started","permalink":"/tools/staticdocs/docs/getting-started/gettingstarted"}}'),s=t("2322"),i=t("2840");let r={sidebar_position:2,title:"Installation",description:"Installing OpenC3 COSMOS",sidebar_custom_props:{myEmoji:"\uD83D\uDCBE"}},c=void 0,l={},a=[{value:"Installing OpenC3 COSMOS",id:"installing-openc3-cosmos",level:2},{value:"Installing OpenC3 COSMOS on Host Machines",id:"installing-openc3-cosmos-on-host-machines",level:2},{value:"PREREQUISITES",id:"prerequisites",level:3},{value:"CLONE PROJECT",id:"clone-project",level:3},{value:"CERTIFICATES",id:"certificates",level:3},{value:"RUN",id:"run",level:3},{value:"CONNECT",id:"connect",level:3},{value:"NEXT STEPS",id:"next-steps",level:3},{value:"Feedback",id:"feedback",level:3}];function d(e){let n={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",hr:"hr",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,i.a)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h2,{id:"installing-openc3-cosmos",children:"Installing OpenC3 COSMOS"}),"\n",(0,s.jsx)(n.p,{children:"The following sections describe how to get OpenC3 COSMOS installed on various operating systems. This document should help you setup you host machine to allow you to have a running version of COSMOS in no time."}),"\n",(0,s.jsx)(n.h2,{id:"installing-openc3-cosmos-on-host-machines",children:"Installing OpenC3 COSMOS on Host Machines"}),"\n",(0,s.jsx)(n.h3,{id:"prerequisites",children:"PREREQUISITES"}),"\n",(0,s.jsxs)(n.p,{children:["If you're on Linux (recommended for production), we recommend installing Docker using the ",(0,s.jsx)(n.a,{href:"https://docs.docker.com/engine/install/",children:"Install Docker Engine"})," instructions (do not use Docker Desktop on Linux). Note: Red Hat users should read the ",(0,s.jsx)(n.a,{href:"podman",children:"Podman"})," documentation. If you're on Windows or Mac, install ",(0,s.jsx)(n.a,{href:"https://docs.docker.com/get-docker/",children:"Docker Desktop"}),". All platforms also need to install ",(0,s.jsx)(n.a,{href:"https://docs.docker.com/compose/install/",children:"Docker Compose"}),"."]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"Minimum Resources allocated to Docker: 8GB RAM, 1 CPU, 80GB Disk"}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"Recommended Resources allocated to Docker: 16GB RAM, 2+ CPUs, 100GB Disk"}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"Docker on Windows with WSL2:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["WSL2 consumes 50% of total memory on Windows or 8GB, whichever is less. However, on Windows builds before 20175 (use ",(0,s.jsx)(n.code,{children:"winver"})," to check) it consumes 80% of your total memory. This can have a negative effect on Windows performance!"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["On Windows builds < 20175 or for more fine grained control, create C:\\Users\\<username>\\",(0,s.jsx)(n.a,{href:"https://docs.microsoft.com/en-us/windows/wsl/wsl-config",children:".wslconfig"}),". Suggested contents on a 32GB machine:"]}),"\n",(0,s.jsx)(n.p,{children:"[wsl2]\nmemory=16GB\nswap=0"}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.admonition,{title:"Important: Modify Docker Connection Timeouts",type:"warning",children:(0,s.jsxs)(n.p,{children:['Docker by default will break idle (no data) connections after a period of 5 minutes. This "feature" will eventually cause you problems if you don\'t adjust the Docker settings. This may manifest as idle connections dropping or simply failing to resume after data should have started flowing again. Find the file at C:\\Users\\username\\AppData\\Roaming\\Docker\\settings.json on Windows or ~/Library/Group Containers/group.com.docker/settings.json on MacOS. Modify the value ',(0,s.jsx)(n.code,{children:"vpnKitMaxPortIdleTime"})," to change the timeout (recommend setting to 0). ",(0,s.jsx)(n.strong,{children:"Note:"})," 0 means no timeout (idle connections not dropped)"]})}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Note:"})," As of December 2021 the COSMOS Docker containers are based on the Alpine Docker image."]}),"\n",(0,s.jsx)(n.h3,{id:"clone-project",children:"CLONE PROJECT"}),"\n",(0,s.jsxs)(n.p,{children:["We recommend using the COSMOS ",(0,s.jsx)(n.a,{href:"key-concepts#projects",children:"project template"})," to get started."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"git clone https://github.com/OpenC3/cosmos-project.git\ngit clone https://github.com/OpenC3/cosmos-enterprise-project.git\n"})}),"\n",(0,s.jsxs)(n.admonition,{title:"Offline Installation",type:"info",children:[(0,s.jsx)("p",{style:{"margin-bottom":"20px"},children:"If you need to install in an offline environment you should first see if you're able to directly use the COSMOS containers. If so you can first save the containers:"}),(0,s.jsx)("p",{style:{"margin-bottom":"20px"},children:(0,s.jsx)("code",{children:"./openc3.sh util save docker.io openc3inc 5.16.2"})}),(0,s.jsx)("p",{style:{"margin-bottom":"20px"},children:"This will download the COSMOS containers from the docker.io repo using the openc3inc namespace and version 5.16.2. The repo, namespace and version are all configurable. Tar files are created in the 'tmp' directory which you can transfer to your offline environment. Transfer the tar files to your offline environment's project 'tmp' dir and import them with:"}),(0,s.jsx)("p",{style:{"margin-bottom":"20px"},children:(0,s.jsx)("code",{children:"./openc3.sh util load 5.16.2"})}),(0,s.jsx)("p",{style:{"margin-bottom":"20px"},children:"Note the version specified in save needs to match the version in load."})]}),"\n",(0,s.jsx)(n.h3,{id:"certificates",children:"CERTIFICATES"}),"\n",(0,s.jsxs)(n.p,{children:["The COSMOS containers are designed to work and be built in the presence of an SSL Decryption device. To support this a cacert.pem file can be placed at the base of the COSMOS 5 project that includes any certificates needed by your organization. ",(0,s.jsx)(n.strong,{children:"Note"}),": If you set the path to the ssl file in the ",(0,s.jsx)(n.code,{children:"SSL_CERT_FILE"})," environment variables the openc3 setup script will copy it and place it for the docker container to load."]}),"\n",(0,s.jsxs)(n.admonition,{title:"SSL Issues",type:"warning",children:[(0,s.jsx)(n.p,{children:'Increasingly organizations are using some sort of SSL decryptor device which can cause curl and other command line tools like git to have SSL certificate problems. If installation fails with messages that involve "certificate", "SSL", "self-signed", or "secure" this is the problem. IT typically sets up browsers to work correctly but not command line applications. Note that the file extension might not be .pem, it could be .pem, crt, .ca-bundle, .cer, .p7b, .p7s, or potentially something else.'}),(0,s.jsx)(n.p,{children:"The workaround is to get a proper local certificate file from your IT department that can be used by tools like curl (for example C:\\Shared\\Ball.pem). Doesn't matter just somewhere with no spaces."}),(0,s.jsx)(n.p,{children:"Then set the following environment variables to that path (ie. C:\\Shared\\Ball.pem)"}),(0,s.jsxs)(n.p,{children:["SSL_CERT_FILE",(0,s.jsx)("br",{}),"\nCURL_CA_BUNDLE",(0,s.jsx)("br",{}),"\nREQUESTS_CA_BUNDLE",(0,s.jsx)("br",{})]}),(0,s.jsxs)(n.p,{children:["Here are some directions on environment variables in Windows: ",(0,s.jsx)(n.a,{href:"https://www.computerhope.com/issues/ch000549.htm",children:"Windows Environment Variables"})]}),(0,s.jsx)(n.p,{children:"You will need to create new ones with the names above and set their value to the full path to the certificate file."})]}),"\n",(0,s.jsx)(n.h3,{id:"run",children:"RUN"}),"\n",(0,s.jsxs)(n.p,{children:['Add the locally cloned project directory to your path so you can directly use the batch file or shell script. In Windows this would be adding "C:\\openc3-project" to the PATH. In Linux you would edit your shell\'s rc file and export the PATH. For example, on a Mac add the following to ~/.zshrc: ',(0,s.jsx)(n.code,{children:"export PATH=~/cosmos-project:$PATH"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["Run ",(0,s.jsx)(n.code,{children:"openc3.bat run"})," (Windows), or ",(0,s.jsx)(n.code,{children:"./openc3.sh run"})," (linux/Mac)."]}),"\n",(0,s.jsx)(n.p,{children:"Note, you can edit the .env file and change OPENC3_TAG to a specific release (e.g. 5.0.9) rather than 'latest'."}),"\n",(0,s.jsxs)(n.p,{children:["If you see an error indicating docker daemon is not running ensure Docker and Docker compose is installed and running. If it errors please try to run ",(0,s.jsx)(n.code,{children:"docker --version"})," or ",(0,s.jsx)(n.code,{children:"docker-compose --version"})," and try to run the start command again. If the error continues please include the version in your issue if you choose to create one."]}),"\n",(0,s.jsxs)(n.p,{children:["Running ",(0,s.jsx)(n.code,{children:"docker ps"})," can help show the running containers."]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.code,{children:"openc3.*"})," takes multiple arguments. Run with no arguments for help. An example run of openc3.sh with no arguments will show a usage guide."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"./openc3.sh\nUsage: ./openc3.sh [cli, cliroot, start, stop, cleanup, run, util]\n* cli: run a cli command as the default user ('cli help' for more info)\n* cliroot: run a cli command as the root user ('cli help' for more info)\n* start: start the docker-compose openc3\n* stop: stop the running dockers for openc3\n* cleanup: cleanup network and volumes for openc3\n* run: run the prebuilt containers for openc3\n* util: various helper commands\n"})}),"\n",(0,s.jsx)(n.h3,{id:"connect",children:"CONNECT"}),"\n",(0,s.jsxs)(n.p,{children:["Connect a web browser to ",(0,s.jsx)(n.a,{href:"http://localhost:2900",children:"http://localhost:2900"}),". Set the password to whatever you want."]}),"\n",(0,s.jsx)(n.h3,{id:"next-steps",children:"NEXT STEPS"}),"\n",(0,s.jsxs)(n.p,{children:["Continue to ",(0,s.jsx)(n.a,{href:"gettingstarted",children:"Getting Started"}),"."]}),"\n",(0,s.jsx)(n.hr,{}),"\n",(0,s.jsx)(n.h3,{id:"feedback",children:"Feedback"}),"\n",(0,s.jsx)(n.admonition,{title:"Find a problem in the documentation?",type:"note",children:(0,s.jsxs)(n.p,{children:["Please ",(0,s.jsx)(n.a,{href:"https://github.com/OpenC3/cosmos/issues/new/choose",children:"create an issue"})," on\nGitHub describing what we can do to make it better."]})})]})}function h(e={}){let{wrapper:n}={...(0,i.a)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},2840:function(e,n,t){t.d(n,{Z:function(){return c},a:function(){return r}});var o=t(2784);let s={},i=o.createContext(s);function r(e){let n=o.useContext(i);return o.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:r(e.components),o.createElement(i.Provider,{value:n},e.children)}}}]);
|