PageSourceSearch

https://sst-simulator.org/sst-docs/assets/js/c7dca725.ec5f1058.js

js sst-simulator.org collected 2026-09-24 10:38:30 UTC 3,665 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[33937],{28453:(e,n,o)=>{o.d(n,{R:()=>i,x:()=>c});var t=o(96540);const s={},r=t.createContext(s);function i(e){const n=t.useContext(r);return t.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:i(e.components),t.createElement(r.Provider,{value:n},e.children)}},79725:(e,n,o)=>{o.r(n),o.d(n,{assets:()=>a,contentTitle:()=>c,default:()=>p,frontMatter:()=>i,metadata:()=>t,toc:()=>d});const t=JSON.parse('{"id":"core/component/info/getCoordinates","title":"getCoordinates","description":"Availability: Component, SubComponent, ComponentExtension","source":"@site/../docs/core/component/info/getCoordinates.md","sourceDirName":"core/component/info","slug":"/core/component/info/getCoordinates","permalink":"/sst-docs/docs/core/component/info/getCoordinates","draft":false,"unlisted":false,"editUrl":"https://github.com/sstsimulator/sst-docs/edit/master/docs/../docs/core/component/info/getCoordinates.md","tags":[],"version":"current","lastUpdatedBy":"grvosku","lastUpdatedAt":1779202020000,"frontMatter":{"title":"getCoordinates"},"sidebar":"core","previous":{"title":"requireLibrary","permalink":"/sst-docs/docs/core/component/info/requireLibrary"},"next":{"title":"getCurrentPriority","permalink":"/sst-docs/docs/core/component/info/getCurrentPriority"}}');var s=o(74848),r=o(28453);const i={title:"getCoordinates"},c=void 0,a={},d=[{value:"Parameters",id:"parameters",level:2},{value:"Example",id:"example",level:2},{value:"Header",id:"header",level:2}];function l(e){const n={code:"code",em:"em",h2:"h2",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-cpp",children:"const std::vector<double>& getCoordinates() const;\n"})}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.em,{children:"Availability:"})," Component, SubComponent, ComponentExtension"]}),"\n",(0,s.jsxs)(n.p,{children:["Returns the X, Y, Z coordinates of the component. For a SubComponent or ComponentExtension, these are the coordinates of the parent Component. These are typically used for visualization. Coordinates should be specified in the SST configuration input file if needed, otherwise they will default to ",(0,s.jsx)(n.code,{children:"(0.0, 0.0, 0.0)"}),". SST does not assign coordinates."]}),"\n",(0,s.jsx)(n.h2,{id:"parameters",children:"Parameters"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"returns"})," (",(0,s.jsx)(n.code,{children:"std::vector<double>"}),") A vector containing the X, Y, and Z coordinates of the component."]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"example",children:"Example"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-cpp",children:'#include <sst/core/component.h>\n\n// Example event handler in a component\nvoid example::handleEvent(SST::Event* ev) {\n    //highlight-next-line\n    std::vector<double> location = getCoordinates();\n    out->output("This component is located at X=%d, Y=%d, Z=%d\\n", location[0], location[1], location[2]);\n}\n'})}),"\n",(0,s.jsx)(n.h2,{id:"header",children:"Header"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-cpp",children:"#include <sst/core/component.h> // or\n#include <sst/core/subcomponent.h> // or\n#include <sst/core/componentExtension.h>\n"})})]})}function p(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.