"use strict";(self.webpackChunkdocs_site=self.webpackChunkdocs_site||[]).push([[3218],{6201:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>i,default:()=>h,frontMatter:()=>l,metadata:()=>o,toc:()=>a});const o=JSON.parse('{"id":"XXTLanControl.lua/core/README","title":"Core","description":"Import the Module","source":"@site/i18n/en/docusaurus-plugin-content-docs/current/XXTLanControl.lua/core/README.md","sourceDirName":"XXTLanControl.lua/core","slug":"/XXTLanControl.lua/core/","permalink":"/docs/en/XXTLanControl.lua/core/","draft":false,"unlisted":false,"tags":[],"version":"current","sidebarPosition":1,"frontMatter":{"sidebar_position":1},"sidebar":"tutorialSidebar","previous":{"title":"XXTLanControl Module","permalink":"/docs/en/XXTLanControl.lua/"},"next":{"title":"Set Controller Endpoint (LCC.set_api_url)","permalink":"/docs/en/XXTLanControl.lua/core/set_api_url"}}');var r=t(4848),s=t(8453);const l={sidebar_position:1},i="Core",c={},a=[{value:"Import the Module",id:"import-the-module",level:2},{value:"Before You Start",id:"before-you-start",level:2},{value:"What This Section Covers",id:"what-this-section-covers",level:2}];function d(e){const n={code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,s.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.header,{children:(0,r.jsx)(n.h1,{id:"core",children:"Core"})}),"\n",(0,r.jsx)(n.h2,{id:"import-the-module",children:"Import the Module"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-lua",children:'local LCC = require("XXTLanControl")\n'})}),"\n",(0,r.jsx)(n.h2,{id:"before-you-start",children:"Before You Start"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Make sure the XXTouch version on the device is new enough."}),"\n",(0,r.jsxs)(n.li,{children:["If the script is not started from the control center, call ",(0,r.jsx)(n.code,{children:"LCC.set_api_url()"})," first."]}),"\n",(0,r.jsxs)(n.li,{children:["Always call ",(0,r.jsx)(n.code,{children:"LCC.connect()"})," before using other helpers."]}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:["If the module version does not match, ",(0,r.jsx)(n.code,{children:"LCC.connect()"})," will try to download the newer module from the control center and reconnect automatically."]}),"\n",(0,r.jsx)(n.h2,{id:"what-this-section-covers",children:"What This Section Covers"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["set connection retry count with ",(0,r.jsx)(n.code,{children:"set_retry_count"})]}),"\n",(0,r.jsxs)(n.li,{children:["set the control center address with ",(0,r.jsx)(n.code,{children:"set_api_url"})]}),"\n",(0,r.jsxs)(n.li,{children:["set aliases for log channels 1 to 6 with ",(0,r.jsx)(n.code,{children:"set_log_aliases"})]}),"\n",(0,r.jsxs)(n.li,{children:["send logs back to the control center with ",(0,r.jsx)(n.code,{children:"log"})]}),"\n",(0,r.jsxs)(n.li,{children:["read script UI configuration values with ",(0,r.jsx)(n.code,{children:"get_ui_config"})]}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(d,{...e})}):d(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>l,x:()=>i});var o=t(6540);const r={},s=o.createContext(r);function l(e){const n=o.useContext(s);return o.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:l(e.components),o.createElement(s.Provider,{value:n},e.children)}}}]);