diff --git a/docs/build/assets/Documenter.css b/docs/build/assets/Documenter.css new file mode 100644 index 0000000000000000000000000000000000000000..f7ae84ab159d70fecd8713b3e6ccdc59bb324d6a --- /dev/null +++ b/docs/build/assets/Documenter.css @@ -0,0 +1,18 @@ +div.wy-menu-vertical ul.current li.toctree-l3 a { + font-weight: bold; +} + +a.documenter-source { + float: right; +} + +.documenter-methodtable pre { + margin-left: 0px; + margin-right: 0px; + margin-top: 0px; + padding: 0px; +} + +.documenter-methodtable pre.documenter-inline { + display: inline; +} diff --git a/docs/build/assets/arrow.svg b/docs/build/assets/arrow.svg deleted file mode 100644 index ee2798d3fbc10eb527b708b41842d0a0078f8acd..0000000000000000000000000000000000000000 --- a/docs/build/assets/arrow.svg +++ /dev/null @@ -1,63 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<!-- Created with Inkscape (http://www.inkscape.org/) --> - -<svg - xmlns:dc="http://purl.org/dc/elements/1.1/" - xmlns:cc="http://creativecommons.org/ns#" - xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" - xmlns:svg="http://www.w3.org/2000/svg" - xmlns="http://www.w3.org/2000/svg" - xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" - xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - width="16.5mm" - height="8.6603003mm" - viewBox="0 0 58.464567 30.686103" - id="svg2" - version="1.1" - inkscape:version="0.91 r13725" - sodipodi:docname="arrow.svg"> - <defs - id="defs4" /> - <sodipodi:namedview - id="base" - pagecolor="#ffffff" - bordercolor="#666666" - borderopacity="1.0" - inkscape:pageopacity="0.0" - inkscape:pageshadow="2" - inkscape:zoom="11.2" - inkscape:cx="14.209234" - inkscape:cy="29.780479" - inkscape:document-units="px" - inkscape:current-layer="layer1" - showgrid="false" - inkscape:window-width="1920" - inkscape:window-height="1053" - inkscape:window-x="0" - inkscape:window-y="27" - inkscape:window-maximized="1" /> - <metadata - id="metadata7"> - <rdf:RDF> - <cc:Work - rdf:about=""> - <dc:format>image/svg+xml</dc:format> - <dc:type - rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> - <dc:title></dc:title> - </cc:Work> - </rdf:RDF> - </metadata> - <g - inkscape:label="Layer 1" - inkscape:groupmode="layer" - id="layer1" - transform="translate(0,-1021.6761)"> - <path - style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" - d="m 0,1021.6761 35.433071,0 -17.716536,30.6861 z" - id="path4140" - inkscape:connector-curvature="0" - sodipodi:nodetypes="cccc" /> - </g> -</svg> diff --git a/docs/build/assets/documenter.css b/docs/build/assets/documenter.css deleted file mode 100644 index 7cd26628de89b8c1b812e390f73e88df1a2662cc..0000000000000000000000000000000000000000 --- a/docs/build/assets/documenter.css +++ /dev/null @@ -1,601 +0,0 @@ -/* - * The default CSS style for Documenter.jl generated sites - * - * Heavily inspired by the Julia Sphinx theme - * https://github.com/JuliaLang/JuliaDoc - * which extends the sphinx_rtd_theme - * https://github.com/snide/sphinx_rtd_theme - * - * Part of Documenter.jl - * https://github.com/JuliaDocs/Documenter.jl - * - * License: MIT - */ - -/* fonts */ -body, input { - font-family: 'Lato', 'Helvetica Neue', Arial, sans-serif; - font-size: 16px; - color: #222; - text-rendering: optimizeLegibility; -} - -pre, code, kbd { - font-family: 'Roboto Mono', Monaco, courier, monospace; - font-size: 0.90em; -} - -pre code { - font-size: 1em; -} - -a { - color: #2980b9; - text-decoration: none; -} - -a:hover { - color: #3091d1; -} - -a:visited { - color: #9b59b6; -} - -body { - line-height: 1.5; -} - -h1 { - font-size: 1.75em; -} - -/* Unless the <h1> the is very first thing on the page (i.e. the second element - * in the <article>, * after the <header>, we add some additional styling to it - * to make it stand out a bit more. This way we get a reasonable fallback if CSS3 - * selectors are not supported in the browser. - */ -article > h1:not(:nth-child(2)) { - margin: 2.5em 0 0; - padding-bottom: 0.30em; - border-bottom: 1px solid #e5e5e5; -} -h2 { - font-size: 1.50em; - margin: 2.3em 0 0; - padding-bottom: 0.25em; - border-bottom: 1px solid #e5e5e5; -} -h3 { - font-size: 1.25em; - margin: 2.0em 0 0; -} -h4 { font-size: 1.15em; } -h5 { font-size: 1.10em; } -h6 { font-size: 1em; } - -h4, h5, h6 { - margin-top: 1.5em; - margin-bottom: 1em; -} - -img { - max-width: 100%; -} - -table { - border-collapse: collapse; - margin: 1em 0; -} - -th, td { - border: 1px solid #e1e4e5; - padding: 0.5em 1em; -} - -th { - border-bottom-width: 2px; -} - -tr:nth-child(even) { - background-color: #f3f6f6; -} - -hr { - border: 0; - border-top: 1px solid #e5e5e5; -} - -/* Inline code and code blocks */ - -code { - padding: 0.1em; - background-color: rgba(0,0,0,.04); - border-radius: 3px; -} - -pre { - background-color: #f5f5f5; - border: 1px solid #dddddd; - border-radius: 3px; - padding: 0.5em; - overflow: auto; -} - -pre code { - padding: 0; - background-color: initial; -} - -kbd { - font-size: 0.70em; - display: inline-block; - padding: 0.1em 0.5em 0.4em 0.5em; - line-height: 1.0em; - color: #444d56; - vertical-align: middle; - background-color: #fafbfc; - border: solid 1px #c6cbd1; - border-bottom-color: #959da5; - border-radius: 3px; - box-shadow: inset 0 -1px 0 #959da5; -} - -/* Headers in admonitions and docstrings */ -.admonition h1, -article section.docstring h1 { - font-size: 1.25em; -} - -.admonition h2, -article section.docstring h2 { - font-size: 1.10em; -} - -.admonition h3, -.admonition h4, -.admonition h5, -.admonition h6, -article section.docstring h3, -article section.docstring h4, -article section.docstring h5, -article section.docstring h6 { - font-size: 1em; -} - -/* Navigation */ -nav.toc { - position: fixed; - top: 0; - left: 0; - bottom: 0; - width: 20em; - display: flex; - flex-flow: column nowrap; - overflow-y: auto; - padding: 1em 0 0 0; - background-color: #fcfcfc; - box-shadow: inset -14px 0px 5px -12px rgb(210,210,210); -} - -nav.toc .logo { - margin: 0 auto; - display: block; - max-height: 6em; - max-width: 18em; -} - -nav.toc h1 { - text-align: center; - margin-top: .57em; - margin-bottom: 0; -} - -nav.toc select { - display: block; - height: 2em; - flex-shrink: 0; - padding: 0 1.6em 0 1em; - min-width: 7em; - max-width: 90%; - max-width: calc(100% - 5em); - margin: 0 auto; - font-size: .83em; - border: 1px solid #c9c9c9; - border-radius: 1em; - - /* TODO: doesn't seem to be centered on Safari */ - text-align: center; - text-align-last: center; - - appearance: none; - -moz-appearance: none; - -webkit-appearance: none; - - background: white url("arrow.svg"); - background-size: 1.155em; - background-repeat: no-repeat; - background-position: right; -} - -nav.toc select:hover { - border: 1px solid #a0a0a0; -} - -nav.toc select option { - text-align: center; -} - -nav.toc input { - display: block; - height: 2em; - width: 90%; - width: calc(100% - 5em); - margin: 1.2em auto; - padding: 0 1em; - border: 1px solid #c9c9c9; - border-radius: 1em; - font-size: .83em; -} - -nav.toc > ul * { - margin: 0; -} - -nav.toc > ul { - min-height: 2em; - overflow-y: auto; - margin: 0; -} - -nav.toc > ul > li:last-child { - padding-bottom: 1em; -} - -nav.toc ul { - color: #404040; - padding: 0; - list-style: none; -} - -nav.toc ul .toctext { - color: inherit; - display: block; -} - -nav.toc ul a:hover { - color: #fcfcfc; - background-color: #4e4a4a; -} - -nav.toc ul.internal a { - color: inherit; - display: block; -} - -nav.toc ul.internal a:hover { - background-color: #d6d6d6; -} - -nav.toc ul.internal { - background-color: #e3e3e3; - box-shadow: inset -14px 0px 5px -12px rgb(210,210,210); - list-style: none; -} - -nav.toc ul.internal li.toplevel { - border-top: 1px solid #909090; - font-weight: bold; -} - -nav.toc ul.internal li.toplevel:first-child { - border-top: none; -} - -nav.toc .toctext { - padding-top: 0.3em; - padding-bottom: 0.3em; - padding-right: 1em; -} - -nav.toc ul .toctext { - padding-left: 1em; -} - -nav.toc ul ul .toctext { - padding-left: 2em; -} - -nav.toc ul ul ul .toctext { - padding-left: 3em; -} - -nav.toc li.current > .toctext { - border-top: 1px solid #c9c9c9; - border-bottom: 1px solid #c9c9c9; - color: #404040; - font-weight: bold; - background-color: white; -} - -nav.toc ul::-webkit-scrollbar { - width: .4em; - background: none; -} - -nav.toc ul::-webkit-scrollbar-thumb { - border-radius: 5px; - background: #c9c9c9; -} - -nav.toc ul::-webkit-scrollbar-thumb:hover { - border-radius: 5px; - background: #aaaaaa; -} - -article { - margin-left: 20em; - min-width: 20em; - max-width: 48em; - padding: 2em; -} - -article > header {} - -article > header div#topbar { - display: none; -} - -article > header nav ul { - display: inline-block; - list-style: none; - margin: 0; - padding: 0; -} - -article > header nav li { - display: inline-block; - padding-right: 0.2em; -} - -article > header nav li:before { - content: "»"; - padding-right: 0.2em; -} - -article > header .edit-page { - float: right; -} - -article > footer {} - -article > footer a.prev { - float: left; -} -article > footer a.next { - float: right; -} - -article > footer a .direction:after { - content: ": "; -} - -article hr { - margin: 1em 0; -} - -article section.docstring { - border: 1px solid #ddd; - margin: 0.5em 0; - padding: 0.5em; - border-radius: 3px; -} - -article section.docstring .docstring-header { - margin-bottom: 1em; -} - -article section.docstring .docstring-binding { - color: #333; - font-weight: bold; -} - -article section.docstring .docstring-category { - font-style: italic; -} - -article section.docstring a.source-link { - display: block; - font-weight: bold; -} - -.nav-anchor, -.nav-anchor:hover, -.nav-anchor:visited { - color: #333; -} - -/* - * Admonitions - * - * Colors (title, body) - * warning: #f0b37e #ffedcc (orange) - * note: #6ab0de #e7f2fa (blue) - * tip: #1abc9c #dbfaf4 (green) -*/ -.admonition { - border-radius: 3px; - background-color: #eeeeee; - margin: 1em 0; -} - -.admonition-title { - border-radius: 3px 3px 0 0; - background-color: #9b9b9b; - padding: 0.15em 0.5em; -} - -.admonition-text { - padding: 0.5em; -} - -.admonition-text > :first-child { - margin-top: 0; -} - -.admonition-text > :last-child { - margin-bottom: 0; -} - -.admonition > .admonition-title:before { - font-family: "FontAwesome"; - margin-right: 5px; - content: "\f06a"; -} - -.admonition.warning > .admonition-title { - background-color: #f0b37e; -} - -.admonition.warning { - background-color: #ffedcc; -} - -.admonition.note > .admonition-title { - background-color: #6ab0de; -} - -.admonition.note { - background-color: #e7f2fa; -} - -.admonition.tip > .admonition-title { - background-color: #1abc9c; -} - -.admonition.tip { - background-color: #dbfaf4; -} - - -/* footnotes */ -.footnote { - padding-left: 0.8em; - border-left: 2px solid #ccc; -} - -/* Search page */ -#search-results .category { - font-size: smaller; -} - -/* Overriding the <code> block style of highligh.js. - * We have to override the padding and the background-color, since we style this - * part ourselves. Specifically, we style the <pre> surrounding the <code>, while - * highlight.js applies the .hljs style directly to the <code> tag. - */ -.hljs { - background-color: transparent; - padding: 0; -} - -@media only screen and (max-width: 768px) { - nav.toc { - position: fixed; - width: 16em; - left: -16em; - -webkit-overflow-scrolling: touch; - -webkit-transition-property: left; /* Safari */ - -webkit-transition-duration: 0.3s; /* Safari */ - transition-property: left; - transition-duration: 0.3s; - -webkit-transition-timing-function: ease-out; /* Safari */ - transition-timing-function: ease-out; - z-index: 2; - box-shadow: 5px 0px 5px 0px rgb(210,210,210); - } - - nav.toc.show { - left: 0; - } - - article { - margin-left: 0; - padding: 3em 0.9em 0 0.9em; /* top right bottom left */ - overflow-wrap: break-word; - } - - article > header { - position: fixed; - left: 0; - z-index: 1; - } - - article > header nav, hr { - display: none; - } - - article > header div#topbar { - display: block; /* is mobile */ - position: fixed; - width: 100%; - height: 1.5em; - padding-top: 1em; - padding-bottom: 1em; - background-color: #fcfcfc; - box-shadow: 0 1px 3px rgba(0,0,0,.26); - top: 0; - -webkit-transition-property: top; /* Safari */ - -webkit-transition-duration: 0.3s; /* Safari */ - transition-property: top; - transition-duration: 0.3s; - } - - article > header div#topbar.headroom--unpinned.headroom--not-top.headroom--not-bottom { - top: -4em; - -webkit-transition-property: top; /* Safari */ - -webkit-transition-duration: 0.7s; /* Safari */ - transition-property: top; - transition-duration: 0.7s; - } - - article > header div#topbar span { - width: 80%; - height: 1.5em; - margin-top: -0.1em; - margin-left: 0.9em; - font-size: 1.2em; - overflow: hidden; - } - - article > header div#topbar a.fa-bars { - float: right; - padding: 0.6em; - margin-top: -0.6em; - margin-right: 0.3em; - font-size: 1.5em; - } - - article > header div#topbar a.fa-bars:visited { - color: #3091d1; - } - - article table { - overflow-x: auto; - display: block; - } - - article div.MathJax_Display { - overflow: scroll; - } - - article span.MathJax { - overflow: hidden; - } -} - -@media only screen and (max-width: 320px) { - body { - font-size: 15px; - } -} diff --git a/docs/build/assets/documenter.js b/docs/build/assets/documenter.js deleted file mode 100644 index 761ae29456260d1fdad12176cbaa72740c6228d7..0000000000000000000000000000000000000000 --- a/docs/build/assets/documenter.js +++ /dev/null @@ -1,132 +0,0 @@ -/* - * Part of Documenter.jl - * https://github.com/JuliaDocs/Documenter.jl - * - * License: MIT - */ - -requirejs.config({ - paths: { - 'jquery': 'https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min', - 'jqueryui': 'https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.0/jquery-ui.min', - 'headroom': 'https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.3/headroom.min', - 'mathjax': 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS_HTML', - 'highlight': 'https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min', - 'highlight-julia': 'https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/languages/julia.min', - 'highlight-julia-repl': 'https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/languages/julia-repl.min', - }, - shim: { - 'mathjax' : { - exports: "MathJax" - }, - 'highlight-julia': ['highlight'], - 'highlight-julia-repl': ['highlight'], - } -}); - -// Load MathJax -require(['mathjax'], function(MathJax) { - MathJax.Hub.Config({ - "tex2jax": { - inlineMath: [['$','$'], ['\\(','\\)']], - processEscapes: true - } - }); - MathJax.Hub.Config({ - config: ["MMLorHTML.js"], - jax: [ - "input/TeX", - "output/HTML-CSS", - "output/NativeMML" - ], - extensions: [ - "MathMenu.js", - "MathZoom.js", - "TeX/AMSmath.js", - "TeX/AMSsymbols.js", - "TeX/autobold.js", - "TeX/autoload-all.js" - ] - }); - MathJax.Hub.Config({ - TeX: { equationNumbers: { autoNumber: "AMS" } } - }); -}) - -require(['jquery', 'highlight', 'highlight-julia', 'highlight-julia-repl'], function($, hljs) { - $(document).ready(function() { - hljs.initHighlighting(); - }) - -}) - -// update the version selector with info from the siteinfo.js and ../versions.js files -require(['jquery'], function($) { - $(document).ready(function() { - var version_selector = $("#version-selector"); - - // add the current version to the selector based on siteinfo.js, but only if the selector is empty - if (typeof DOCUMENTER_CURRENT_VERSION !== 'undefined' && $('#version-selector > option').length == 0) { - var option = $("<option value='#' selected='selected'>" + DOCUMENTER_CURRENT_VERSION + "</option>"); - version_selector.append(option); - } - - if (typeof DOC_VERSIONS !== 'undefined') { - var existing_versions = $('#version-selector > option'); - var existing_versions_texts = existing_versions.map(function(i,x){return x.text}); - DOC_VERSIONS.forEach(function(each) { - var version_url = documenterBaseURL + "/../" + each; - var existing_id = $.inArray(each, existing_versions_texts); - // if not already in the version selector, add it as a new option, - // otherwise update the old option with the URL and enable it - if (existing_id == -1) { - var option = $("<option value='" + version_url + "'>" + each + "</option>"); - version_selector.append(option); - } else { - var option = existing_versions[existing_id]; - option.value = version_url; - option.disabled = false; - } - }); - } - - // only show the version selector if the selector has been populated - if ($('#version-selector > option').length > 0) { - version_selector.css("visibility", "visible"); - } - - // Scroll the navigation bar to the currently selected menu item - $("nav.toc > ul").get(0).scrollTop = $(".current").get(0).offsetTop - $("nav.toc > ul").get(0).offsetTop; - }) - -}) - -// mobile -require(['jquery', 'headroom'], function($, Headroom) { - $(document).ready(function() { - var navtoc = $("nav.toc"); - $("nav.toc li.current a.toctext").click(function() { - navtoc.toggleClass('show'); - }); - $("article > header div#topbar a.fa-bars").click(function(ev) { - ev.preventDefault(); - navtoc.toggleClass('show'); - if (navtoc.hasClass('show')) { - var title = $("article > header div#topbar span").text(); - $("nav.toc ul li a:contains('" + title + "')").focus(); - } - }); - $("article#docs").bind('click', function(ev) { - if ($(ev.target).is('div#topbar a.fa-bars')) { - return; - } - if (navtoc.hasClass('show')) { - navtoc.removeClass('show'); - } - }); - if ($("article > header div#topbar").css('display') == 'block') { - var headroom = new Headroom(document.querySelector("article > header div#topbar"), {"tolerance": {"up": 10, "down": 10}}); - headroom.init(); - } - }) -}) diff --git a/docs/build/assets/mathjaxhelper.js b/docs/build/assets/mathjaxhelper.js new file mode 100644 index 0000000000000000000000000000000000000000..3561b109f9faa9dbe02247d56c79904b232a5659 --- /dev/null +++ b/docs/build/assets/mathjaxhelper.js @@ -0,0 +1,25 @@ +MathJax.Hub.Config({ + "tex2jax": { + inlineMath: [['$','$'], ['\\(','\\)']], + processEscapes: true + } +}); +MathJax.Hub.Config({ + config: ["MMLorHTML.js"], + jax: [ + "input/TeX", + "output/HTML-CSS", + "output/NativeMML" + ], + extensions: [ + "MathMenu.js", + "MathZoom.js", + "TeX/AMSmath.js", + "TeX/AMSsymbols.js", + "TeX/autobold.js", + "TeX/autoload-all.js" + ] +}); +MathJax.Hub.Config({ + TeX: { equationNumbers: { autoNumber: "AMS" } } +}); diff --git a/docs/build/assets/search.js b/docs/build/assets/search.js deleted file mode 100644 index 5d32c3aac9e326c6013adf0030aa9d5f87bb806f..0000000000000000000000000000000000000000 --- a/docs/build/assets/search.js +++ /dev/null @@ -1,250 +0,0 @@ -/* - * Part of Documenter.jl - * https://github.com/JuliaDocs/Documenter.jl - * - * License: MIT - */ - -// parseUri 1.2.2 -// (c) Steven Levithan <stevenlevithan.com> -// MIT License -function parseUri (str) { - var o = parseUri.options, - m = o.parser[o.strictMode ? "strict" : "loose"].exec(str), - uri = {}, - i = 14; - - while (i--) uri[o.key[i]] = m[i] || ""; - - uri[o.q.name] = {}; - uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) { - if ($1) uri[o.q.name][$1] = $2; - }); - - return uri; -}; -parseUri.options = { - strictMode: false, - key: ["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"], - q: { - name: "queryKey", - parser: /(?:^|&)([^&=]*)=?([^&]*)/g - }, - parser: { - strict: /^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/, - loose: /^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/ - } -}; - -requirejs.config({ - paths: { - 'jquery': 'https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min', - 'lunr': 'https://cdnjs.cloudflare.com/ajax/libs/lunr.js/2.3.5/lunr.min', - 'lodash': 'https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.11/lodash.min', - } -}); - -var currentScript = document.currentScript; - -require(["jquery", "lunr", "lodash"], function($, lunr, _) { - $("#search-form").submit(function(e) { - e.preventDefault() - }) - - // list below is the lunr 2.1.3 list minus the intersect with names(Base) - // (all, any, get, in, is, which) and (do, else, for, let, where, while, with) - // ideally we'd just filter the original list but it's not available as a variable - lunr.stopWordFilter = lunr.generateStopWordFilter([ - 'a', - 'able', - 'about', - 'across', - 'after', - 'almost', - 'also', - 'am', - 'among', - 'an', - 'and', - 'are', - 'as', - 'at', - 'be', - 'because', - 'been', - 'but', - 'by', - 'can', - 'cannot', - 'could', - 'dear', - 'did', - 'does', - 'either', - 'ever', - 'every', - 'from', - 'got', - 'had', - 'has', - 'have', - 'he', - 'her', - 'hers', - 'him', - 'his', - 'how', - 'however', - 'i', - 'if', - 'into', - 'it', - 'its', - 'just', - 'least', - 'like', - 'likely', - 'may', - 'me', - 'might', - 'most', - 'must', - 'my', - 'neither', - 'no', - 'nor', - 'not', - 'of', - 'off', - 'often', - 'on', - 'only', - 'or', - 'other', - 'our', - 'own', - 'rather', - 'said', - 'say', - 'says', - 'she', - 'should', - 'since', - 'so', - 'some', - 'than', - 'that', - 'the', - 'their', - 'them', - 'then', - 'there', - 'these', - 'they', - 'this', - 'tis', - 'to', - 'too', - 'twas', - 'us', - 'wants', - 'was', - 'we', - 'were', - 'what', - 'when', - 'who', - 'whom', - 'why', - 'will', - 'would', - 'yet', - 'you', - 'your' - ]) - - // add . as a separator, because otherwise "title": "Documenter.Anchors.add!" - // would not find anything if searching for "add!", only for the entire qualification - lunr.tokenizer.separator = /[\s\-\.]+/ - - // custom trimmer that doesn't strip @ and !, which are used in julia macro and function names - lunr.trimmer = function (token) { - return token.update(function (s) { - return s.replace(/^[^a-zA-Z0-9@!]+/, '').replace(/[^a-zA-Z0-9@!]+$/, '') - }) - } - - lunr.Pipeline.registerFunction(lunr.stopWordFilter, 'juliaStopWordFilter') - lunr.Pipeline.registerFunction(lunr.trimmer, 'juliaTrimmer') - - var index = lunr(function () { - this.ref('location') - this.field('title') - this.field('text') - documenterSearchIndex['docs'].forEach(function(e) { - this.add(e) - }, this) - }) - var store = {} - - documenterSearchIndex['docs'].forEach(function(e) { - store[e.location] = {title: e.title, category: e.category} - }) - - $(function(){ - function update_search(querystring) { - tokens = lunr.tokenizer(querystring) - results = index.query(function (q) { - tokens.forEach(function (t) { - q.term(t.toString(), { - fields: ["title"], - boost: 100, - usePipeline: false, - editDistance: 0, - wildcard: lunr.Query.wildcard.NONE - }) - q.term(t.toString(), { - fields: ["title"], - boost: 10, - usePipeline: false, - editDistance: 2, - wildcard: lunr.Query.wildcard.NONE - }) - q.term(t.toString(), { - fields: ["text"], - boost: 1, - usePipeline: true, - editDistance: 0, - wildcard: lunr.Query.wildcard.NONE - }) - }) - }) - $('#search-info').text("Number of results: " + results.length) - $('#search-results').empty() - results.forEach(function(result) { - data = store[result.ref] - link = $('<a>') - link.text(data.title) - link.attr('href', documenterBaseURL+'/'+result.ref) - cat = $('<span class="category">('+data.category+')</span>') - li = $('<li>').append(link).append(" ").append(cat) - $('#search-results').append(li) - }) - } - - function update_search_box() { - querystring = $('#search-query').val() - update_search(querystring) - } - - $('#search-query').keyup(_.debounce(update_search_box, 250)) - $('#search-query').change(update_search_box) - - search_query_uri = parseUri(window.location).queryKey["q"] - if(search_query_uri !== undefined) { - search_query = decodeURIComponent(search_query_uri.replace(/\+/g, '%20')) - $("#search-query").val(search_query) - } - update_search_box(); - }) -}) diff --git a/docs/build/examples/examples.md b/docs/build/examples/examples.md new file mode 100644 index 0000000000000000000000000000000000000000..7a6fecea5875f37b39080a25682afdd919f63e73 --- /dev/null +++ b/docs/build/examples/examples.md @@ -0,0 +1,117 @@ + +<a id='Examples-1'></a> + +# Examples + + +The following examples may be run from the BB, and may require the user to export the the LabConnections module to the LOAD_PATH manually, executing the following line in the Julia prompt + + +``` +push!(LOAD_PATH, "/home/debian/juliapackages") +``` + + +When running the examples with hardware in the loop, take caution not to short the BB ground with any output pin, as this will damage the board. For instance, if connecting a diode to the output pins, always use a resistor of >1000 Ohm in parallel. See the configuration page for information on which functionality specific pins support. + + +<a id='Example-with-LEDs-(BB)-1'></a> + +## Example with LEDs (BB) + + +To test the system LED functionality of the Julia code from the BBB, open a Julia prompt and run the SYS*LED*test.jl file + + +``` +include("/home/debian/juliapackages/LabConnections/test/BeagleBone/SYS_LED_test.jl") +``` + + +This example runs a test with hardware in the loop, exporting and unexporting the SYS_LED devices and blinking led D2-D5 in a sequence over 1 second, alternating with D2/D4 and D3/D5 on/off. + + +<a id='Example-with-GPIOs-(BB)-1'></a> + +## Example with GPIOs (BB) + + +To test the GPIO functionality of the Julia code from the BBB, open a Julia prompt and run the GPIO_test.jl file + + +``` +include("/home/debian/juliapackages/LabConnections/test/BeagleBone/GPIO_test.jl") +``` + + +This again runs the tests with the BBB in the loop, testing exception handling exporting of the file system and also runs all the GPIOs on the board high/low at a 0.1 period time over 1 second to demonstrate the IO communication visually. + + +<a id='Example-with-PWM-(BB)-1'></a> + +## Example with PWM (BB) + + +To test the PWM functionality of the Julia code from the BBB, open a Julia prompt and run the PWM_test.jl file + + +``` +include("/home/debian/juliapackages/LabConnections/test/BeagleBone/PWM_test.jl") +``` + + +This runs the PWM tests with the BBB in the loop, testing exception handling exporting of the file system. In addition, it runs all the PWM pins on the board with a duty cycle of 0.5 over a period time over 1 second to demonstrate the IO communication visually. + + +<a id='Example-with-SPI-(BB)-1'></a> + +## Example with SPI (BB) + + +All development on the SPI is currently done in C in a for of the serbus package. Consequently, this example is currently run completely separate from the LabConnections. + + +Make sure that the serbus package exists in the /juliapackages/ directory, where it is automatically placed when transferring code to the BB using the ./flash_BB shell script. Then simply run + + +``` +cp /home/debian/juliapackages/serbus/bb_spi.sh /home/debian +``` + + +and execute + + +``` +./bb_spi.sh +``` + + +in the /home/debian/ directory. The program then + + +1. Compiles a device tree overlay (should SPI1 be used) +2. Creates the binaries for the SPI driver and example +3. Runs the MCP3903 example script located in spi_MCP3903.c + + +The purpose of the program is to configure the ADC to operate in the continuous mode and then read the registers, outputting the measurements in the terminal. + + +<a id='Example-with-LEDs-(HOST)-1'></a> + +## Example with LEDs (HOST) + + +To operate the LEDs from the host computer, simply connect the BBB to the HOST via USB and run the "testLED.jl" on the HOST + + +``` +cd && cd .julia/v0.6/LabConnections/Examples/ && julia testLED.jl +``` + + +```@systemConfiguration + +``` + diff --git a/docs/build/examples/examples/index.html b/docs/build/examples/examples/index.html deleted file mode 100644 index 4bb0407c37e96c6eba33da8e35ecc4dbe2c6e1aa..0000000000000000000000000000000000000000 --- a/docs/build/examples/examples/index.html +++ /dev/null @@ -1,2 +0,0 @@ -<!DOCTYPE html> -<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Examples · LabConnections</title><link href="https://cdnjs.cloudflare.com/ajax/libs/normalize/4.2.0/normalize.min.css" rel="stylesheet" type="text/css"/><link href="https://fonts.googleapis.com/css?family=Lato|Roboto+Mono" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/default.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL="../.."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.2.0/require.min.js" data-main="../../assets/documenter.js"></script><script src="../../siteinfo.js"></script><script src="../../../versions.js"></script><link href="../../assets/documenter.css" rel="stylesheet" type="text/css"/></head><body><nav class="toc"><h1>LabConnections</h1><select id="version-selector" onChange="window.location.href=this.value" style="visibility: hidden"></select><form class="search" id="search-form" action="../../search/"><input id="search-query" name="q" type="text" placeholder="Search docs"/></form><ul><li class="current"><a class="toctext" href>Examples</a><ul class="internal"><li><a class="toctext" href="#Example-with-LEDs-(BB)-1">Example with LEDs (BB)</a></li><li><a class="toctext" href="#Example-with-GPIOs-(BB)-1">Example with GPIOs (BB)</a></li><li><a class="toctext" href="#Example-with-PWM-(BB)-1">Example with PWM (BB)</a></li><li><a class="toctext" href="#Example-with-SPI-(BB)-1">Example with SPI (BB)</a></li><li><a class="toctext" href="#Example-with-LEDs-(HOST)-1">Example with LEDs (HOST)</a></li></ul></li><li><a class="toctext" href="../testing/">Tests</a></li><li><a class="toctext" href="../../">LabConnections.jl Manual</a></li><li><a class="toctext" href="../../lib/functions/">Available functions</a></li><li><a class="toctext" href="../../lib/io_devices/">Available devices</a></li><li><a class="toctext" href="../../man/installation/">Installation Instructions</a></li><li><a class="toctext" href="../../man/introduction/">Introduction</a></li></ul></nav><article id="docs"><header><nav><ul><li><a href>Examples</a></li></ul><a class="edit-page" href="https://github.com//blob/master/docs/src/examples/examples.md"><span class="fa"></span> Edit on GitHub</a></nav><hr/><div id="topbar"><span>Examples</span><a class="fa fa-bars" href="#"></a></div></header><h1><a class="nav-anchor" id="Examples-1" href="#Examples-1">Examples</a></h1><p>The following examples may be run from the BB, and may require the user to export the the LabConnections module to the LOAD_PATH manually, executing the following line in the Julia prompt</p><pre><code class="language-none">push!(LOAD_PATH, "/home/debian/juliapackages")</code></pre><p>When running the examples with hardware in the loop, take caution not to short the BB ground with any output pin, as this will damage the board. For instance, if connecting a diode to the output pins, always use a resistor of >1000 Ohm in parallel. See the configuration page for information on which functionality specific pins support.</p><h2><a class="nav-anchor" id="Example-with-LEDs-(BB)-1" href="#Example-with-LEDs-(BB)-1">Example with LEDs (BB)</a></h2><p>To test the system LED functionality of the Julia code from the BBB, open a Julia prompt and run the SYS<em>LED</em>test.jl file</p><pre><code class="language-none">include("/home/debian/juliapackages/LabConnections/test/BeagleBone/SYS_LED_test.jl")</code></pre><p>This example runs a test with hardware in the loop, exporting and unexporting the SYS_LED devices and blinking led D2-D5 in a sequence over 1 second, alternating with D2/D4 and D3/D5 on/off.</p><h2><a class="nav-anchor" id="Example-with-GPIOs-(BB)-1" href="#Example-with-GPIOs-(BB)-1">Example with GPIOs (BB)</a></h2><p>To test the GPIO functionality of the Julia code from the BBB, open a Julia prompt and run the GPIO_test.jl file</p><pre><code class="language-none">include("/home/debian/juliapackages/LabConnections/test/BeagleBone/GPIO_test.jl")</code></pre><p>This again runs the tests with the BBB in the loop, testing exception handling exporting of the file system and also runs all the GPIOs on the board high/low at a 0.1 period time over 1 second to demonstrate the IO communication visually.</p><h2><a class="nav-anchor" id="Example-with-PWM-(BB)-1" href="#Example-with-PWM-(BB)-1">Example with PWM (BB)</a></h2><p>To test the PWM functionality of the Julia code from the BBB, open a Julia prompt and run the PWM_test.jl file</p><pre><code class="language-none">include("/home/debian/juliapackages/LabConnections/test/BeagleBone/PWM_test.jl")</code></pre><p>This runs the PWM tests with the BBB in the loop, testing exception handling exporting of the file system. In addition, it runs all the PWM pins on the board with a duty cycle of 0.5 over a period time over 1 second to demonstrate the IO communication visually.</p><h2><a class="nav-anchor" id="Example-with-SPI-(BB)-1" href="#Example-with-SPI-(BB)-1">Example with SPI (BB)</a></h2><p>All development on the SPI is currently done in C in a for of the serbus package. Consequently, this example is currently run completely separate from the LabConnections.</p><p>Make sure that the serbus package exists in the /juliapackages/ directory, where it is automatically placed when transferring code to the BB using the ./flash_BB shell script. Then simply run</p><pre><code class="language-none">cp /home/debian/juliapackages/serbus/bb_spi.sh /home/debian</code></pre><p>and execute</p><pre><code class="language-none">./bb_spi.sh</code></pre><p>in the /home/debian/ directory. The program then</p><ol><li>Compiles a device tree overlay (should SPI1 be used)</li><li>Creates the binaries for the SPI driver and example</li><li>Runs the MCP3903 example script located in spi_MCP3903.c</li></ol><p>The purpose of the program is to configure the ADC to operate in the continuous mode and then read the registers, outputting the measurements in the terminal.</p><h2><a class="nav-anchor" id="Example-with-LEDs-(HOST)-1" href="#Example-with-LEDs-(HOST)-1">Example with LEDs (HOST)</a></h2><p>To operate the LEDs from the host computer, simply connect the BBB to the HOST via USB and run the "testLED.jl" on the HOST</p><pre><code class="language-none">cd && cd .julia/v0.6/LabConnections/Examples/ && julia testLED.jl</code></pre><pre><code class="language-"></code></pre><footer><hr/><a class="next" href="../testing/"><span class="direction">Next</span><span class="title">Tests</span></a></footer></article></body></html> diff --git a/docs/build/examples/testing.md b/docs/build/examples/testing.md new file mode 100644 index 0000000000000000000000000000000000000000..d6c3c7465c1d1abf2caf5934ed777f071c0a9993 --- /dev/null +++ b/docs/build/examples/testing.md @@ -0,0 +1,27 @@ + +<a id='Tests-1'></a> + +# Tests + + +The BeagleBone tests can be run on any computer, regrdless of their file-syste. By setting the flag RUNNING_TESTS to true, a dummy file-system is exported in which the tests are run operate. This has the advantage of enabling testing of the code run on the BB free from the BB itself, without building the Debian FS, thereby enabling the automatic testing through Travis. + + +To run the tests, simply enter the /test/ directory and run + + +``` +julia run_tests.jl +``` + + +If the tests are to be run on the BB with hardware in the loop, run + + +``` +julia run_tests.jl +``` + + +on the BB, to run examples separately, see + diff --git a/docs/build/examples/testing/index.html b/docs/build/examples/testing/index.html deleted file mode 100644 index b798a0eaa26d136b221f3752aea8b9a5c7520a65..0000000000000000000000000000000000000000 --- a/docs/build/examples/testing/index.html +++ /dev/null @@ -1,2 +0,0 @@ -<!DOCTYPE html> -<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Tests · LabConnections</title><link href="https://cdnjs.cloudflare.com/ajax/libs/normalize/4.2.0/normalize.min.css" rel="stylesheet" type="text/css"/><link href="https://fonts.googleapis.com/css?family=Lato|Roboto+Mono" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/default.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL="../.."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.2.0/require.min.js" data-main="../../assets/documenter.js"></script><script src="../../siteinfo.js"></script><script src="../../../versions.js"></script><link href="../../assets/documenter.css" rel="stylesheet" type="text/css"/></head><body><nav class="toc"><h1>LabConnections</h1><select id="version-selector" onChange="window.location.href=this.value" style="visibility: hidden"></select><form class="search" id="search-form" action="../../search/"><input id="search-query" name="q" type="text" placeholder="Search docs"/></form><ul><li><a class="toctext" href="../examples/">Examples</a></li><li class="current"><a class="toctext" href>Tests</a><ul class="internal"></ul></li><li><a class="toctext" href="../../">LabConnections.jl Manual</a></li><li><a class="toctext" href="../../lib/functions/">Available functions</a></li><li><a class="toctext" href="../../lib/io_devices/">Available devices</a></li><li><a class="toctext" href="../../man/installation/">Installation Instructions</a></li><li><a class="toctext" href="../../man/introduction/">Introduction</a></li></ul></nav><article id="docs"><header><nav><ul><li><a href>Tests</a></li></ul><a class="edit-page" href="https://github.com//blob/master/docs/src/examples/testing.md"><span class="fa"></span> Edit on GitHub</a></nav><hr/><div id="topbar"><span>Tests</span><a class="fa fa-bars" href="#"></a></div></header><h1><a class="nav-anchor" id="Tests-1" href="#Tests-1">Tests</a></h1><p>The BeagleBone tests can be run on any computer, regrdless of their file-syste. By setting the flag RUNNING_TESTS to true, a dummy file-system is exported in which the tests are run operate. This has the advantage of enabling testing of the code run on the BB free from the BB itself, without building the Debian FS, thereby enabling the automatic testing through Travis.</p><p>To run the tests, simply enter the /test/ directory and run</p><pre><code class="language-none">julia run_tests.jl</code></pre><p>If the tests are to be run on the BB with hardware in the loop, run</p><pre><code class="language-none">julia run_tests.jl</code></pre><p>on the BB, to run examples separately, see</p><footer><hr/><a class="previous" href="../examples/"><span class="direction">Previous</span><span class="title">Examples</span></a><a class="next" href="../../"><span class="direction">Next</span><span class="title">LabConnections.jl Manual</span></a></footer></article></body></html> diff --git a/docs/build/index.html b/docs/build/index.html deleted file mode 100644 index 42d9b36c687ba2d3146282a9a3e2e456b3028301..0000000000000000000000000000000000000000 --- a/docs/build/index.html +++ /dev/null @@ -1,2 +0,0 @@ -<!DOCTYPE html> -<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>LabConnections.jl Manual · LabConnections</title><link href="https://cdnjs.cloudflare.com/ajax/libs/normalize/4.2.0/normalize.min.css" rel="stylesheet" type="text/css"/><link href="https://fonts.googleapis.com/css?family=Lato|Roboto+Mono" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/default.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL="."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.2.0/require.min.js" data-main="assets/documenter.js"></script><script src="siteinfo.js"></script><script src="../versions.js"></script><link href="assets/documenter.css" rel="stylesheet" type="text/css"/></head><body><nav class="toc"><h1>LabConnections</h1><select id="version-selector" onChange="window.location.href=this.value" style="visibility: hidden"></select><form class="search" id="search-form" action="search/"><input id="search-query" name="q" type="text" placeholder="Search docs"/></form><ul><li><a class="toctext" href="examples/examples/">Examples</a></li><li><a class="toctext" href="examples/testing/">Tests</a></li><li class="current"><a class="toctext" href>LabConnections.jl Manual</a><ul class="internal"><li><a class="toctext" href="#Examples-1">Examples</a></li><li><a class="toctext" href="#Guide-1">Guide</a></li><li><a class="toctext" href="#Functions-1">Functions</a></li><li><a class="toctext" href="#Documentation-Index-1">Documentation Index</a></li></ul></li><li><a class="toctext" href="lib/functions/">Available functions</a></li><li><a class="toctext" href="lib/io_devices/">Available devices</a></li><li><a class="toctext" href="man/installation/">Installation Instructions</a></li><li><a class="toctext" href="man/introduction/">Introduction</a></li></ul></nav><article id="docs"><header><nav><ul><li><a href>LabConnections.jl Manual</a></li></ul><a class="edit-page" href="https://github.com//blob/master/docs/src/index.md"><span class="fa"></span> Edit on GitHub</a></nav><hr/><div id="topbar"><span>LabConnections.jl Manual</span><a class="fa fa-bars" href="#"></a></div></header><h1><a class="nav-anchor" id="LabConnections.jl-Manual-1" href="#LabConnections.jl-Manual-1">LabConnections.jl Manual</a></h1><h2><a class="nav-anchor" id="Examples-1" href="#Examples-1">Examples</a></h2><ul><li><a href="examples/examples/#Examples-1">Examples</a></li><li><a href="examples/testing/#Tests-1">Tests</a></li></ul><h2><a class="nav-anchor" id="Guide-1" href="#Guide-1">Guide</a></h2><ul><li><a href="man/introduction/#Introduction-1">Introduction</a></li><li><a href="man/installation/#Installation-Instructions-1">Installation Instructions</a></li></ul><h2><a class="nav-anchor" id="Functions-1" href="#Functions-1">Functions</a></h2><ul><li><a href="lib/io_devices/#Available-devices-1">Available devices</a></li><li><a href="lib/functions/#Available-functions-1">Available functions</a></li></ul><h2><a class="nav-anchor" id="Documentation-Index-1" href="#Documentation-Index-1">Documentation Index</a></h2><ul><li><a href="lib/io_devices/#LabConnections.BeagleBone.Debug"><code>LabConnections.BeagleBone.Debug</code></a></li><li><a href="lib/io_devices/#LabConnections.BeagleBone.GPIO"><code>LabConnections.BeagleBone.GPIO</code></a></li><li><a href="lib/io_devices/#LabConnections.BeagleBone.IO_Object"><code>LabConnections.BeagleBone.IO_Object</code></a></li><li><a href="lib/io_devices/#LabConnections.BeagleBone.SysLED"><code>LabConnections.BeagleBone.SysLED</code></a></li><li><a href="lib/functions/#Base.read"><code>Base.read</code></a></li><li><a href="lib/functions/#Base.read"><code>Base.read</code></a></li><li><a href="lib/functions/#Base.read"><code>Base.read</code></a></li><li><a href="lib/functions/#LabConnections.BeagleBone.assert_pwm_write-Tuple{Int32,String}"><code>LabConnections.BeagleBone.assert_pwm_write</code></a></li><li><a href="lib/functions/#LabConnections.BeagleBone.bbparse-Tuple{Any}"><code>LabConnections.BeagleBone.bbparse</code></a></li><li><a href="lib/functions/#LabConnections.BeagleBone.bbparse-Tuple{Tuple,Any}"><code>LabConnections.BeagleBone.bbparse</code></a></li><li><a href="lib/functions/#LabConnections.BeagleBone.closedev-Tuple{String,Int32}"><code>LabConnections.BeagleBone.closedev</code></a></li><li><a href="lib/functions/#LabConnections.BeagleBone.export_gpio-Tuple{Int32}"><code>LabConnections.BeagleBone.export_gpio</code></a></li><li><a href="lib/functions/#LabConnections.BeagleBone.export_led"><code>LabConnections.BeagleBone.export_led</code></a></li><li><a href="lib/functions/#LabConnections.BeagleBone.export_pwm-Tuple{Int32}"><code>LabConnections.BeagleBone.export_pwm</code></a></li><li><a href="lib/functions/#LabConnections.BeagleBone.getdev-Tuple{String,Int32}"><code>LabConnections.BeagleBone.getdev</code></a></li><li><a href="lib/functions/#LabConnections.BeagleBone.initdev-Tuple{String,Int32}"><code>LabConnections.BeagleBone.initdev</code></a></li><li><a href="lib/functions/#LabConnections.BeagleBone.listdev-Tuple{}"><code>LabConnections.BeagleBone.listdev</code></a></li><li><a href="lib/functions/#LabConnections.BeagleBone.printdev-Tuple{String,Int32}"><code>LabConnections.BeagleBone.printdev</code></a></li><li><a href="lib/functions/#LabConnections.BeagleBone.run_server"><code>LabConnections.BeagleBone.run_server</code></a></li><li><a href="lib/functions/#LabConnections.BeagleBone.teardown"><code>LabConnections.BeagleBone.teardown</code></a></li><li><a href="lib/functions/#LabConnections.BeagleBone.teardown"><code>LabConnections.BeagleBone.teardown</code></a></li><li><a href="lib/functions/#LabConnections.BeagleBone.teardown"><code>LabConnections.BeagleBone.teardown</code></a></li><li><a href="lib/functions/#LabConnections.BeagleBone.to_string"><code>LabConnections.BeagleBone.to_string</code></a></li><li><a href="lib/functions/#LabConnections.BeagleBone.to_string"><code>LabConnections.BeagleBone.to_string</code></a></li><li><a href="lib/functions/#LabConnections.BeagleBone.to_string"><code>LabConnections.BeagleBone.to_string</code></a></li><li><a href="lib/functions/#LabConnections.BeagleBone.write!"><code>LabConnections.BeagleBone.write!</code></a></li><li><a href="lib/functions/#LabConnections.BeagleBone.write!"><code>LabConnections.BeagleBone.write!</code></a></li><li><a href="lib/functions/#LabConnections.BeagleBone.write!"><code>LabConnections.BeagleBone.write!</code></a></li></ul><footer><hr/><a class="previous" href="examples/testing/"><span class="direction">Previous</span><span class="title">Tests</span></a><a class="next" href="lib/functions/"><span class="direction">Next</span><span class="title">Available functions</span></a></footer></article></body></html> diff --git a/docs/build/index.md b/docs/build/index.md new file mode 100644 index 0000000000000000000000000000000000000000..1f15185b3ed7965ec7f25eb9e0dfe46d00a4c326 --- /dev/null +++ b/docs/build/index.md @@ -0,0 +1,65 @@ + +<a id='LabConnections.jl-Manual-1'></a> + +# LabConnections.jl Manual + + + + +<a id='Examples-1'></a> + +## Examples + +- [Examples](examples/examples.md#Examples-1) +- [Tests](examples/testing.md#Tests-1) + + +<a id='Guide-1'></a> + +## Guide + +- [Introduction](man/introduction.md#Introduction-1) +- [Installation Instructions](man/installation.md#Installation-Instructions-1) + + +<a id='Functions-1'></a> + +## Functions + +- [Available devices](lib/io_devices.md#Available-devices-1) +- [Available functions](lib/functions.md#Available-functions-1) + + +<a id='Documentation-Index-1'></a> + +## Documentation Index + +- [`LabConnections.BeagleBone.Debug`](lib/io_devices.md#LabConnections.BeagleBone.Debug) +- [`LabConnections.BeagleBone.GPIO`](lib/io_devices.md#LabConnections.BeagleBone.GPIO) +- [`LabConnections.BeagleBone.IO_Object`](lib/io_devices.md#LabConnections.BeagleBone.IO_Object) +- [`LabConnections.BeagleBone.SysLED`](lib/io_devices.md#LabConnections.BeagleBone.SysLED) +- [`Base.read`](lib/functions.md#Base.read) +- [`Base.read`](lib/functions.md#Base.read) +- [`Base.read`](lib/functions.md#Base.read) +- [`LabConnections.BeagleBone.assert_pwm_write`](lib/functions.md#LabConnections.BeagleBone.assert_pwm_write-Tuple{Int32,String}) +- [`LabConnections.BeagleBone.bbparse`](lib/functions.md#LabConnections.BeagleBone.bbparse-Tuple{Any}) +- [`LabConnections.BeagleBone.bbparse`](lib/functions.md#LabConnections.BeagleBone.bbparse-Tuple{Tuple,Any}) +- [`LabConnections.BeagleBone.closedev`](lib/functions.md#LabConnections.BeagleBone.closedev-Tuple{String,Int32}) +- [`LabConnections.BeagleBone.export_gpio`](lib/functions.md#LabConnections.BeagleBone.export_gpio-Tuple{Int32}) +- [`LabConnections.BeagleBone.export_led`](lib/functions.md#LabConnections.BeagleBone.export_led) +- [`LabConnections.BeagleBone.export_pwm`](lib/functions.md#LabConnections.BeagleBone.export_pwm-Tuple{Int32}) +- [`LabConnections.BeagleBone.getdev`](lib/functions.md#LabConnections.BeagleBone.getdev-Tuple{String,Int32}) +- [`LabConnections.BeagleBone.initdev`](lib/functions.md#LabConnections.BeagleBone.initdev-Tuple{String,Int32}) +- [`LabConnections.BeagleBone.listdev`](lib/functions.md#LabConnections.BeagleBone.listdev-Tuple{}) +- [`LabConnections.BeagleBone.printdev`](lib/functions.md#LabConnections.BeagleBone.printdev-Tuple{String,Int32}) +- [`LabConnections.BeagleBone.run_server`](lib/functions.md#LabConnections.BeagleBone.run_server) +- [`LabConnections.BeagleBone.teardown`](lib/functions.md#LabConnections.BeagleBone.teardown) +- [`LabConnections.BeagleBone.teardown`](lib/functions.md#LabConnections.BeagleBone.teardown) +- [`LabConnections.BeagleBone.teardown`](lib/functions.md#LabConnections.BeagleBone.teardown) +- [`LabConnections.BeagleBone.to_string`](lib/functions.md#LabConnections.BeagleBone.to_string) +- [`LabConnections.BeagleBone.to_string`](lib/functions.md#LabConnections.BeagleBone.to_string) +- [`LabConnections.BeagleBone.to_string`](lib/functions.md#LabConnections.BeagleBone.to_string) +- [`LabConnections.BeagleBone.write!`](lib/functions.md#LabConnections.BeagleBone.write!) +- [`LabConnections.BeagleBone.write!`](lib/functions.md#LabConnections.BeagleBone.write!) +- [`LabConnections.BeagleBone.write!`](lib/functions.md#LabConnections.BeagleBone.write!) + diff --git a/docs/build/lib/functions.md b/docs/build/lib/functions.md new file mode 100644 index 0000000000000000000000000000000000000000..36fff7057d1794b377460b6d2baa49fb8081d2c0 --- /dev/null +++ b/docs/build/lib/functions.md @@ -0,0 +1,294 @@ +- [`Base.read`](functions.md#Base.read) +- [`Base.read`](functions.md#Base.read) +- [`Base.read`](functions.md#Base.read) +- [`LabConnections.BeagleBone.assert_pwm_write`](functions.md#LabConnections.BeagleBone.assert_pwm_write-Tuple{Int32,String}) +- [`LabConnections.BeagleBone.bbparse`](functions.md#LabConnections.BeagleBone.bbparse-Tuple{Any}) +- [`LabConnections.BeagleBone.bbparse`](functions.md#LabConnections.BeagleBone.bbparse-Tuple{Tuple,Any}) +- [`LabConnections.BeagleBone.closedev`](functions.md#LabConnections.BeagleBone.closedev-Tuple{String,Int32}) +- [`LabConnections.BeagleBone.export_gpio`](functions.md#LabConnections.BeagleBone.export_gpio-Tuple{Int32}) +- [`LabConnections.BeagleBone.export_led`](functions.md#LabConnections.BeagleBone.export_led) +- [`LabConnections.BeagleBone.export_pwm`](functions.md#LabConnections.BeagleBone.export_pwm-Tuple{Int32}) +- [`LabConnections.BeagleBone.getdev`](functions.md#LabConnections.BeagleBone.getdev-Tuple{String,Int32}) +- [`LabConnections.BeagleBone.initdev`](functions.md#LabConnections.BeagleBone.initdev-Tuple{String,Int32}) +- [`LabConnections.BeagleBone.listdev`](functions.md#LabConnections.BeagleBone.listdev-Tuple{}) +- [`LabConnections.BeagleBone.printdev`](functions.md#LabConnections.BeagleBone.printdev-Tuple{String,Int32}) +- [`LabConnections.BeagleBone.run_server`](functions.md#LabConnections.BeagleBone.run_server) +- [`LabConnections.BeagleBone.teardown`](functions.md#LabConnections.BeagleBone.teardown) +- [`LabConnections.BeagleBone.teardown`](functions.md#LabConnections.BeagleBone.teardown) +- [`LabConnections.BeagleBone.teardown`](functions.md#LabConnections.BeagleBone.teardown) +- [`LabConnections.BeagleBone.to_string`](functions.md#LabConnections.BeagleBone.to_string) +- [`LabConnections.BeagleBone.to_string`](functions.md#LabConnections.BeagleBone.to_string) +- [`LabConnections.BeagleBone.to_string`](functions.md#LabConnections.BeagleBone.to_string) +- [`LabConnections.BeagleBone.write!`](functions.md#LabConnections.BeagleBone.write!) +- [`LabConnections.BeagleBone.write!`](functions.md#LabConnections.BeagleBone.write!) +- [`LabConnections.BeagleBone.write!`](functions.md#LabConnections.BeagleBone.write!) + + +<a id='Available-functions-1'></a> + +# Available functions + +<a id='LabConnections.BeagleBone.run_server' href='#LabConnections.BeagleBone.run_server'>#</a> +**`LabConnections.BeagleBone.run_server`** — *Function*. + + + +```julia +run_server(port=2001; debug=false) +``` + +Run a server on `port` that listens for commands from computer Optional debug keyword disables blinking system leds. + +<a id='Base.read' href='#Base.read'>#</a> +**`Base.read`** — *Function*. + + + +```julia +l = read(led::SysLED, debug::Bool=false) +``` + +Reads the current brightness value from the LED 'SysLED'. + +<a id='Base.read' href='#Base.read'>#</a> +**`Base.read`** — *Function*. + + + +```julia +l = read(pwm::PWM, operation::Int32, debug::Bool=false) +``` + +Reads the current value from an operation on a GPIO. + +<a id='Base.read' href='#Base.read'>#</a> +**`Base.read`** — *Function*. + + + +```julia +l = read(gpio::GPIO, operation::Int32, debug::Bool=false) +``` + +Reads the current value from an operation on a GPIO. + +<a id='LabConnections.BeagleBone.assert_pwm_write-Tuple{Int32,String}' href='#LabConnections.BeagleBone.assert_pwm_write-Tuple{Int32,String}'>#</a> +**`LabConnections.BeagleBone.assert_pwm_write`** — *Method*. + + + +```julia +assert_pwm_write(operation::Int32, entry::String) +``` + +Assertsion for the PWM input data. + +<a id='LabConnections.BeagleBone.bbparse-Tuple{Any}' href='#LabConnections.BeagleBone.bbparse-Tuple{Any}'>#</a> +**`LabConnections.BeagleBone.bbparse`** — *Method*. + + + +```julia +bbparse(cmd) +``` + +Parse and execute the command `cmd`. + +<a id='LabConnections.BeagleBone.bbparse-Tuple{Tuple,Any}' href='#LabConnections.BeagleBone.bbparse-Tuple{Tuple,Any}'>#</a> +**`LabConnections.BeagleBone.bbparse`** — *Method*. + + + +```julia +bbparse(l::Tuple, sock) +``` + +Parse input on the form `l=(iswrite, ndev, cmd1, cmd2, ..., cmdn)` where if `iswrite` `cmdi = (devname, id, val)` and if not `iswrite` `cmdi = (devname, id)` and send back on socket (vals, timestamps). + +<a id='LabConnections.BeagleBone.closedev-Tuple{String,Int32}' href='#LabConnections.BeagleBone.closedev-Tuple{String,Int32}'>#</a> +**`LabConnections.BeagleBone.closedev`** — *Method*. + + + +```julia +closedev(dev_name::String, i::Int32) +``` + +Closes down a currently active device of type 'dev_name' at index 'i' on the BeagleBone, and removes it from the dict of currently active devices. + +<a id='LabConnections.BeagleBone.export_gpio-Tuple{Int32}' href='#LabConnections.BeagleBone.export_gpio-Tuple{Int32}'>#</a> +**`LabConnections.BeagleBone.export_gpio`** — *Method*. + + + +```julia +export_gpio(i::Int32, debug::Bool=false) +``` + +Export the GPIO file system, either for real-time or testing usecases. + +<a id='LabConnections.BeagleBone.export_led' href='#LabConnections.BeagleBone.export_led'>#</a> +**`LabConnections.BeagleBone.export_led`** — *Function*. + + + +```julia +export_led(i::Int32, debug::Bool=false) +``` + +Exports a dummy filesystem for testing the LED implementation + +<a id='LabConnections.BeagleBone.export_pwm-Tuple{Int32}' href='#LabConnections.BeagleBone.export_pwm-Tuple{Int32}'>#</a> +**`LabConnections.BeagleBone.export_pwm`** — *Method*. + + + +```julia +export_gpio(i::Int32, debug::Bool=false) +``` + +Export the GPIO file system, either for real-time or testing usecases. + +<a id='LabConnections.BeagleBone.getdev-Tuple{String,Int32}' href='#LabConnections.BeagleBone.getdev-Tuple{String,Int32}'>#</a> +**`LabConnections.BeagleBone.getdev`** — *Method*. + + + +```julia +dev = getdev(dev_name::String, i::Int32) +``` + +Retrieves the active device of type `dev_name` at index 'i'. + +<a id='LabConnections.BeagleBone.initdev-Tuple{String,Int32}' href='#LabConnections.BeagleBone.initdev-Tuple{String,Int32}'>#</a> +**`LabConnections.BeagleBone.initdev`** — *Method*. + + + +```julia +active_device = initdev(dev_name::String, i:Int32) +``` + +Initializes a new device of type 'dev*name' at index 'i' on the BeagleBone, and adds it to the dict of currently active devices. Returns the initialized device 'active*device'. + +<a id='LabConnections.BeagleBone.listdev-Tuple{}' href='#LabConnections.BeagleBone.listdev-Tuple{}'>#</a> +**`LabConnections.BeagleBone.listdev`** — *Method*. + + + +```julia +message = listdev() +``` + +Lists all the active devices as an insidence array for testing. + +<a id='LabConnections.BeagleBone.printdev-Tuple{String,Int32}' href='#LabConnections.BeagleBone.printdev-Tuple{String,Int32}'>#</a> +**`LabConnections.BeagleBone.printdev`** — *Method*. + + + +```julia +message = printdev() +``` + +Prints all the active devices and writes out specifics of a single devices. + +<a id='LabConnections.BeagleBone.teardown' href='#LabConnections.BeagleBone.teardown'>#</a> +**`LabConnections.BeagleBone.teardown`** — *Function*. + + + +```julia +teardown(led::SysLED, debug::Bool=false) +``` + +Closes all open filestreams for the SysLED 'led'. + +<a id='LabConnections.BeagleBone.teardown' href='#LabConnections.BeagleBone.teardown'>#</a> +**`LabConnections.BeagleBone.teardown`** — *Function*. + + + +```julia +teardown(gpio::GPIO, debug::Bool=false) +``` + +Closes all open streams on the GPIO, and unexports it from the file system. + +<a id='LabConnections.BeagleBone.teardown' href='#LabConnections.BeagleBone.teardown'>#</a> +**`LabConnections.BeagleBone.teardown`** — *Function*. + + + +```julia +teardown!(pwd::PWM) +``` + +Closes all open streams on the PWM, and unexports it from the file system + +<a id='LabConnections.BeagleBone.to_string' href='#LabConnections.BeagleBone.to_string'>#</a> +**`LabConnections.BeagleBone.to_string`** — *Function*. + + + +```julia +to_string(led::SysLED, debug::Bool=false) +``` + +Generates a string representation of the GPIO device. + +<a id='LabConnections.BeagleBone.to_string' href='#LabConnections.BeagleBone.to_string'>#</a> +**`LabConnections.BeagleBone.to_string`** — *Function*. + + + +```julia +to_string(gpio::GPIO, debug::Bool=false) +``` + +Generates a string representation of the GPIO device. + +<a id='LabConnections.BeagleBone.to_string' href='#LabConnections.BeagleBone.to_string'>#</a> +**`LabConnections.BeagleBone.to_string`** — *Function*. + + + +```julia +to_string(pwm::PWM,, debug::Bool=false) +``` + +Generates a string representation of the GPIO device. + +<a id='LabConnections.BeagleBone.write!' href='#LabConnections.BeagleBone.write!'>#</a> +**`LabConnections.BeagleBone.write!`** — *Function*. + + + +```julia +write!(gpio::GPIO, args::Tuple{Int32,String}, debug::Bool=false) +``` + +Writes an entry to an operation on a GPIO, of the form args = (operation, entry). + +<a id='LabConnections.BeagleBone.write!' href='#LabConnections.BeagleBone.write!'>#</a> +**`LabConnections.BeagleBone.write!`** — *Function*. + + + +```julia +write!(led::SysLED, val::Bool, debug::Bool=false) +``` + +Turns the LED 'SysLed' on/off for val = true/false respectively. + +<a id='LabConnections.BeagleBone.write!' href='#LabConnections.BeagleBone.write!'>#</a> +**`LabConnections.BeagleBone.write!`** — *Function*. + + + +```julia +write!(pwm::PWM, args::Tuple{Int32,String}, debug::Bool=false) +``` + +Writes an entry to an operation on the PWM, of the form args = (operation, entry). + diff --git a/docs/build/lib/functions/index.html b/docs/build/lib/functions/index.html deleted file mode 100644 index aa3a00c8c9eecf6406656e52918e0fa2a76515c1..0000000000000000000000000000000000000000 --- a/docs/build/lib/functions/index.html +++ /dev/null @@ -1,2 +0,0 @@ -<!DOCTYPE html> -<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Available functions · LabConnections</title><link href="https://cdnjs.cloudflare.com/ajax/libs/normalize/4.2.0/normalize.min.css" rel="stylesheet" type="text/css"/><link href="https://fonts.googleapis.com/css?family=Lato|Roboto+Mono" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/default.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL="../.."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.2.0/require.min.js" data-main="../../assets/documenter.js"></script><script src="../../siteinfo.js"></script><script src="../../../versions.js"></script><link href="../../assets/documenter.css" rel="stylesheet" type="text/css"/></head><body><nav class="toc"><h1>LabConnections</h1><select id="version-selector" onChange="window.location.href=this.value" style="visibility: hidden"></select><form class="search" id="search-form" action="../../search/"><input id="search-query" name="q" type="text" placeholder="Search docs"/></form><ul><li><a class="toctext" href="../../examples/examples/">Examples</a></li><li><a class="toctext" href="../../examples/testing/">Tests</a></li><li><a class="toctext" href="../../">LabConnections.jl Manual</a></li><li class="current"><a class="toctext" href>Available functions</a><ul class="internal"></ul></li><li><a class="toctext" href="../io_devices/">Available devices</a></li><li><a class="toctext" href="../../man/installation/">Installation Instructions</a></li><li><a class="toctext" href="../../man/introduction/">Introduction</a></li></ul></nav><article id="docs"><header><nav><ul><li><a href>Available functions</a></li></ul><a class="edit-page" href="https://github.com//blob/master/docs/src/lib/functions.md"><span class="fa"></span> Edit on GitHub</a></nav><hr/><div id="topbar"><span>Available functions</span><a class="fa fa-bars" href="#"></a></div></header><ul><li><a href="#Base.read"><code>Base.read</code></a></li><li><a href="#Base.read"><code>Base.read</code></a></li><li><a href="#Base.read"><code>Base.read</code></a></li><li><a href="#LabConnections.BeagleBone.assert_pwm_write-Tuple{Int32,String}"><code>LabConnections.BeagleBone.assert_pwm_write</code></a></li><li><a href="#LabConnections.BeagleBone.bbparse-Tuple{Any}"><code>LabConnections.BeagleBone.bbparse</code></a></li><li><a href="#LabConnections.BeagleBone.bbparse-Tuple{Tuple,Any}"><code>LabConnections.BeagleBone.bbparse</code></a></li><li><a href="#LabConnections.BeagleBone.closedev-Tuple{String,Int32}"><code>LabConnections.BeagleBone.closedev</code></a></li><li><a href="#LabConnections.BeagleBone.export_gpio-Tuple{Int32}"><code>LabConnections.BeagleBone.export_gpio</code></a></li><li><a href="#LabConnections.BeagleBone.export_led"><code>LabConnections.BeagleBone.export_led</code></a></li><li><a href="#LabConnections.BeagleBone.export_pwm-Tuple{Int32}"><code>LabConnections.BeagleBone.export_pwm</code></a></li><li><a href="#LabConnections.BeagleBone.getdev-Tuple{String,Int32}"><code>LabConnections.BeagleBone.getdev</code></a></li><li><a href="#LabConnections.BeagleBone.initdev-Tuple{String,Int32}"><code>LabConnections.BeagleBone.initdev</code></a></li><li><a href="#LabConnections.BeagleBone.listdev-Tuple{}"><code>LabConnections.BeagleBone.listdev</code></a></li><li><a href="#LabConnections.BeagleBone.printdev-Tuple{String,Int32}"><code>LabConnections.BeagleBone.printdev</code></a></li><li><a href="#LabConnections.BeagleBone.run_server"><code>LabConnections.BeagleBone.run_server</code></a></li><li><a href="#LabConnections.BeagleBone.teardown"><code>LabConnections.BeagleBone.teardown</code></a></li><li><a href="#LabConnections.BeagleBone.teardown"><code>LabConnections.BeagleBone.teardown</code></a></li><li><a href="#LabConnections.BeagleBone.teardown"><code>LabConnections.BeagleBone.teardown</code></a></li><li><a href="#LabConnections.BeagleBone.to_string"><code>LabConnections.BeagleBone.to_string</code></a></li><li><a href="#LabConnections.BeagleBone.to_string"><code>LabConnections.BeagleBone.to_string</code></a></li><li><a href="#LabConnections.BeagleBone.to_string"><code>LabConnections.BeagleBone.to_string</code></a></li><li><a href="#LabConnections.BeagleBone.write!"><code>LabConnections.BeagleBone.write!</code></a></li><li><a href="#LabConnections.BeagleBone.write!"><code>LabConnections.BeagleBone.write!</code></a></li><li><a href="#LabConnections.BeagleBone.write!"><code>LabConnections.BeagleBone.write!</code></a></li></ul><h1><a class="nav-anchor" id="Available-functions-1" href="#Available-functions-1">Available functions</a></h1><section class="docstring"><div class="docstring-header"><a class="docstring-binding" id="LabConnections.BeagleBone.run_server" href="#LabConnections.BeagleBone.run_server"><code>LabConnections.BeagleBone.run_server</code></a> — <span class="docstring-category">Function</span>.</div><div><div><pre><code class="language-julia">run_server(port=2001; debug=false)</code></pre><p>Run a server on <code>port</code> that listens for commands from computer Optional debug keyword disables blinking system leds.</p></div></div></section><section class="docstring"><div class="docstring-header"><a class="docstring-binding" id="Base.read" href="#Base.read"><code>Base.read</code></a> — <span class="docstring-category">Function</span>.</div><div><div><pre><code class="language-julia">l = read(led::SysLED, debug::Bool=false)</code></pre><p>Reads the current brightness value from the LED 'SysLED'.</p></div></div></section><section class="docstring"><div class="docstring-header"><a class="docstring-binding" id="Base.read" href="#Base.read"><code>Base.read</code></a> — <span class="docstring-category">Function</span>.</div><div><div><pre><code class="language-julia">l = read(pwm::PWM, operation::Int32, debug::Bool=false)</code></pre><p>Reads the current value from an operation on a GPIO.</p></div></div></section><section class="docstring"><div class="docstring-header"><a class="docstring-binding" id="Base.read" href="#Base.read"><code>Base.read</code></a> — <span class="docstring-category">Function</span>.</div><div><div><pre><code class="language-julia">l = read(gpio::GPIO, operation::Int32, debug::Bool=false)</code></pre><p>Reads the current value from an operation on a GPIO.</p></div></div></section><section class="docstring"><div class="docstring-header"><a class="docstring-binding" id="LabConnections.BeagleBone.assert_pwm_write-Tuple{Int32,String}" href="#LabConnections.BeagleBone.assert_pwm_write-Tuple{Int32,String}"><code>LabConnections.BeagleBone.assert_pwm_write</code></a> — <span class="docstring-category">Method</span>.</div><div><div><pre><code class="language-julia">assert_pwm_write(operation::Int32, entry::String)</code></pre><p>Assertsion for the PWM input data.</p></div></div></section><section class="docstring"><div class="docstring-header"><a class="docstring-binding" id="LabConnections.BeagleBone.bbparse-Tuple{Any}" href="#LabConnections.BeagleBone.bbparse-Tuple{Any}"><code>LabConnections.BeagleBone.bbparse</code></a> — <span class="docstring-category">Method</span>.</div><div><div><pre><code class="language-julia">bbparse(cmd)</code></pre><p>Parse and execute the command <code>cmd</code>.</p></div></div></section><section class="docstring"><div class="docstring-header"><a class="docstring-binding" id="LabConnections.BeagleBone.bbparse-Tuple{Tuple,Any}" href="#LabConnections.BeagleBone.bbparse-Tuple{Tuple,Any}"><code>LabConnections.BeagleBone.bbparse</code></a> — <span class="docstring-category">Method</span>.</div><div><div><pre><code class="language-julia">bbparse(l::Tuple, sock)</code></pre><p>Parse input on the form <code>l=(iswrite, ndev, cmd1, cmd2, ..., cmdn)</code> where if <code>iswrite</code> <code>cmdi = (devname, id, val)</code> and if not <code>iswrite</code> <code>cmdi = (devname, id)</code> and send back on socket (vals, timestamps).</p></div></div></section><section class="docstring"><div class="docstring-header"><a class="docstring-binding" id="LabConnections.BeagleBone.closedev-Tuple{String,Int32}" href="#LabConnections.BeagleBone.closedev-Tuple{String,Int32}"><code>LabConnections.BeagleBone.closedev</code></a> — <span class="docstring-category">Method</span>.</div><div><div><pre><code class="language-julia">closedev(dev_name::String, i::Int32)</code></pre><p>Closes down a currently active device of type 'dev_name' at index 'i' on the BeagleBone, and removes it from the dict of currently active devices.</p></div></div></section><section class="docstring"><div class="docstring-header"><a class="docstring-binding" id="LabConnections.BeagleBone.export_gpio-Tuple{Int32}" href="#LabConnections.BeagleBone.export_gpio-Tuple{Int32}"><code>LabConnections.BeagleBone.export_gpio</code></a> — <span class="docstring-category">Method</span>.</div><div><div><pre><code class="language-julia">export_gpio(i::Int32, debug::Bool=false)</code></pre><p>Export the GPIO file system, either for real-time or testing usecases.</p></div></div></section><section class="docstring"><div class="docstring-header"><a class="docstring-binding" id="LabConnections.BeagleBone.export_led" href="#LabConnections.BeagleBone.export_led"><code>LabConnections.BeagleBone.export_led</code></a> — <span class="docstring-category">Function</span>.</div><div><div><pre><code class="language-julia">export_led(i::Int32, debug::Bool=false)</code></pre><p>Exports a dummy filesystem for testing the LED implementation</p></div></div></section><section class="docstring"><div class="docstring-header"><a class="docstring-binding" id="LabConnections.BeagleBone.export_pwm-Tuple{Int32}" href="#LabConnections.BeagleBone.export_pwm-Tuple{Int32}"><code>LabConnections.BeagleBone.export_pwm</code></a> — <span class="docstring-category">Method</span>.</div><div><div><pre><code class="language-julia">export_gpio(i::Int32, debug::Bool=false)</code></pre><p>Export the GPIO file system, either for real-time or testing usecases.</p></div></div></section><section class="docstring"><div class="docstring-header"><a class="docstring-binding" id="LabConnections.BeagleBone.getdev-Tuple{String,Int32}" href="#LabConnections.BeagleBone.getdev-Tuple{String,Int32}"><code>LabConnections.BeagleBone.getdev</code></a> — <span class="docstring-category">Method</span>.</div><div><div><pre><code class="language-julia">dev = getdev(dev_name::String, i::Int32)</code></pre><p>Retrieves the active device of type <code>dev_name</code> at index 'i'.</p></div></div></section><section class="docstring"><div class="docstring-header"><a class="docstring-binding" id="LabConnections.BeagleBone.initdev-Tuple{String,Int32}" href="#LabConnections.BeagleBone.initdev-Tuple{String,Int32}"><code>LabConnections.BeagleBone.initdev</code></a> — <span class="docstring-category">Method</span>.</div><div><div><pre><code class="language-julia">active_device = initdev(dev_name::String, i:Int32)</code></pre><p>Initializes a new device of type 'dev<em>name' at index 'i' on the BeagleBone, and adds it to the dict of currently active devices. Returns the initialized device 'active</em>device'.</p></div></div></section><section class="docstring"><div class="docstring-header"><a class="docstring-binding" id="LabConnections.BeagleBone.listdev-Tuple{}" href="#LabConnections.BeagleBone.listdev-Tuple{}"><code>LabConnections.BeagleBone.listdev</code></a> — <span class="docstring-category">Method</span>.</div><div><div><pre><code class="language-julia">message = listdev()</code></pre><p>Lists all the active devices as an insidence array for testing.</p></div></div></section><section class="docstring"><div class="docstring-header"><a class="docstring-binding" id="LabConnections.BeagleBone.printdev-Tuple{String,Int32}" href="#LabConnections.BeagleBone.printdev-Tuple{String,Int32}"><code>LabConnections.BeagleBone.printdev</code></a> — <span class="docstring-category">Method</span>.</div><div><div><pre><code class="language-julia">message = printdev()</code></pre><p>Prints all the active devices and writes out specifics of a single devices.</p></div></div></section><section class="docstring"><div class="docstring-header"><a class="docstring-binding" id="LabConnections.BeagleBone.teardown" href="#LabConnections.BeagleBone.teardown"><code>LabConnections.BeagleBone.teardown</code></a> — <span class="docstring-category">Function</span>.</div><div><div><pre><code class="language-julia">teardown(led::SysLED, debug::Bool=false)</code></pre><p>Closes all open filestreams for the SysLED 'led'.</p></div></div></section><section class="docstring"><div class="docstring-header"><a class="docstring-binding" id="LabConnections.BeagleBone.teardown" href="#LabConnections.BeagleBone.teardown"><code>LabConnections.BeagleBone.teardown</code></a> — <span class="docstring-category">Function</span>.</div><div><div><pre><code class="language-julia">teardown(gpio::GPIO, debug::Bool=false)</code></pre><p>Closes all open streams on the GPIO, and unexports it from the file system.</p></div></div></section><section class="docstring"><div class="docstring-header"><a class="docstring-binding" id="LabConnections.BeagleBone.teardown" href="#LabConnections.BeagleBone.teardown"><code>LabConnections.BeagleBone.teardown</code></a> — <span class="docstring-category">Function</span>.</div><div><div><pre><code class="language-julia">teardown!(pwd::PWM)</code></pre><p>Closes all open streams on the PWM, and unexports it from the file system</p></div></div></section><section class="docstring"><div class="docstring-header"><a class="docstring-binding" id="LabConnections.BeagleBone.to_string" href="#LabConnections.BeagleBone.to_string"><code>LabConnections.BeagleBone.to_string</code></a> — <span class="docstring-category">Function</span>.</div><div><div><pre><code class="language-julia">to_string(led::SysLED, debug::Bool=false)</code></pre><p>Generates a string representation of the GPIO device.</p></div></div></section><section class="docstring"><div class="docstring-header"><a class="docstring-binding" id="LabConnections.BeagleBone.to_string" href="#LabConnections.BeagleBone.to_string"><code>LabConnections.BeagleBone.to_string</code></a> — <span class="docstring-category">Function</span>.</div><div><div><pre><code class="language-julia">to_string(gpio::GPIO, debug::Bool=false)</code></pre><p>Generates a string representation of the GPIO device.</p></div></div></section><section class="docstring"><div class="docstring-header"><a class="docstring-binding" id="LabConnections.BeagleBone.to_string" href="#LabConnections.BeagleBone.to_string"><code>LabConnections.BeagleBone.to_string</code></a> — <span class="docstring-category">Function</span>.</div><div><div><pre><code class="language-julia">to_string(pwm::PWM,, debug::Bool=false)</code></pre><p>Generates a string representation of the GPIO device.</p></div></div></section><section class="docstring"><div class="docstring-header"><a class="docstring-binding" id="LabConnections.BeagleBone.write!" href="#LabConnections.BeagleBone.write!"><code>LabConnections.BeagleBone.write!</code></a> — <span class="docstring-category">Function</span>.</div><div><div><pre><code class="language-julia">write!(gpio::GPIO, args::Tuple{Int32,String}, debug::Bool=false)</code></pre><p>Writes an entry to an operation on a GPIO, of the form args = (operation, entry).</p></div></div></section><section class="docstring"><div class="docstring-header"><a class="docstring-binding" id="LabConnections.BeagleBone.write!" href="#LabConnections.BeagleBone.write!"><code>LabConnections.BeagleBone.write!</code></a> — <span class="docstring-category">Function</span>.</div><div><div><pre><code class="language-julia">write!(led::SysLED, val::Bool, debug::Bool=false)</code></pre><p>Turns the LED 'SysLed' on/off for val = true/false respectively.</p></div></div></section><section class="docstring"><div class="docstring-header"><a class="docstring-binding" id="LabConnections.BeagleBone.write!" href="#LabConnections.BeagleBone.write!"><code>LabConnections.BeagleBone.write!</code></a> — <span class="docstring-category">Function</span>.</div><div><div><pre><code class="language-julia">write!(pwm::PWM, args::Tuple{Int32,String}, debug::Bool=false)</code></pre><p>Writes an entry to an operation on the PWM, of the form args = (operation, entry).</p></div></div></section><footer><hr/><a class="previous" href="../../"><span class="direction">Previous</span><span class="title">LabConnections.jl Manual</span></a><a class="next" href="../io_devices/"><span class="direction">Next</span><span class="title">Available devices</span></a></footer></article></body></html> diff --git a/docs/build/lib/io_devices.md b/docs/build/lib/io_devices.md new file mode 100644 index 0000000000000000000000000000000000000000..f559bd230b6ff283eefaacfc9257d2e9f503455e --- /dev/null +++ b/docs/build/lib/io_devices.md @@ -0,0 +1,64 @@ +- [`LabConnections.BeagleBone.Debug`](io_devices.md#LabConnections.BeagleBone.Debug) +- [`LabConnections.BeagleBone.GPIO`](io_devices.md#LabConnections.BeagleBone.GPIO) +- [`LabConnections.BeagleBone.IO_Object`](io_devices.md#LabConnections.BeagleBone.IO_Object) +- [`LabConnections.BeagleBone.SysLED`](io_devices.md#LabConnections.BeagleBone.SysLED) + + +<a id='Available-devices-1'></a> + +# Available devices + +<a id='LabConnections.BeagleBone.Debug' href='#LabConnections.BeagleBone.Debug'>#</a> +**`LabConnections.BeagleBone.Debug`** — *Type*. + + + +```julia +Debug(i::Int32) +``` + +Type for debugging and precompile. + +<a id='LabConnections.BeagleBone.GPIO' href='#LabConnections.BeagleBone.GPIO'>#</a> +**`LabConnections.BeagleBone.GPIO`** — *Type*. + + + +```julia +GPIO(i::Int32) +``` + +Lowest form of communication with the GPIO pins. The available pins are listed in the "channel" parameter, and appear as directories in /sys/class/gpio after being exported. For instance, to setup a GPIO on "gpio112", configure it as an output pin and set it to high, the following code would be used. + +``` +`gpio = GPIO(1)` +`write!(gpio, (2,"out"))` +`write!(gpio, (1, "1"))` +``` + +The operation of reading the current output value of the GPIO is done by + +``` +`read(gpio, 1)` +``` + +See the test/BeagleBone/GPIO_test.jl for more examples. + +<a id='LabConnections.BeagleBone.IO_Object' href='#LabConnections.BeagleBone.IO_Object'>#</a> +**`LabConnections.BeagleBone.IO_Object`** — *Type*. + + + +Define abstract type for pins/LEDS on the BeagleBone + +<a id='LabConnections.BeagleBone.SysLED' href='#LabConnections.BeagleBone.SysLED'>#</a> +**`LabConnections.BeagleBone.SysLED`** — *Type*. + + + +```julia +SysLED(i::Int32) +``` + +Type representing the system LEDs on the BeagleBone. The LEDs are indexed by i ∈ [1,2,3,4]. + diff --git a/docs/build/lib/io_devices/index.html b/docs/build/lib/io_devices/index.html deleted file mode 100644 index 11289fb389d8b859fcae7069420d9ae037a3fe7b..0000000000000000000000000000000000000000 --- a/docs/build/lib/io_devices/index.html +++ /dev/null @@ -1,4 +0,0 @@ -<!DOCTYPE html> -<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Available devices · LabConnections</title><link href="https://cdnjs.cloudflare.com/ajax/libs/normalize/4.2.0/normalize.min.css" rel="stylesheet" type="text/css"/><link href="https://fonts.googleapis.com/css?family=Lato|Roboto+Mono" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/default.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL="../.."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.2.0/require.min.js" data-main="../../assets/documenter.js"></script><script src="../../siteinfo.js"></script><script src="../../../versions.js"></script><link href="../../assets/documenter.css" rel="stylesheet" type="text/css"/></head><body><nav class="toc"><h1>LabConnections</h1><select id="version-selector" onChange="window.location.href=this.value" style="visibility: hidden"></select><form class="search" id="search-form" action="../../search/"><input id="search-query" name="q" type="text" placeholder="Search docs"/></form><ul><li><a class="toctext" href="../../examples/examples/">Examples</a></li><li><a class="toctext" href="../../examples/testing/">Tests</a></li><li><a class="toctext" href="../../">LabConnections.jl Manual</a></li><li><a class="toctext" href="../functions/">Available functions</a></li><li class="current"><a class="toctext" href>Available devices</a><ul class="internal"></ul></li><li><a class="toctext" href="../../man/installation/">Installation Instructions</a></li><li><a class="toctext" href="../../man/introduction/">Introduction</a></li></ul></nav><article id="docs"><header><nav><ul><li><a href>Available devices</a></li></ul><a class="edit-page" href="https://github.com//blob/master/docs/src/lib/io_devices.md"><span class="fa"></span> Edit on GitHub</a></nav><hr/><div id="topbar"><span>Available devices</span><a class="fa fa-bars" href="#"></a></div></header><ul><li><a href="#LabConnections.BeagleBone.Debug"><code>LabConnections.BeagleBone.Debug</code></a></li><li><a href="#LabConnections.BeagleBone.GPIO"><code>LabConnections.BeagleBone.GPIO</code></a></li><li><a href="#LabConnections.BeagleBone.IO_Object"><code>LabConnections.BeagleBone.IO_Object</code></a></li><li><a href="#LabConnections.BeagleBone.SysLED"><code>LabConnections.BeagleBone.SysLED</code></a></li></ul><h1><a class="nav-anchor" id="Available-devices-1" href="#Available-devices-1">Available devices</a></h1><section class="docstring"><div class="docstring-header"><a class="docstring-binding" id="LabConnections.BeagleBone.Debug" href="#LabConnections.BeagleBone.Debug"><code>LabConnections.BeagleBone.Debug</code></a> — <span class="docstring-category">Type</span>.</div><div><div><pre><code class="language-julia">Debug(i::Int32)</code></pre><p>Type for debugging and precompile.</p></div></div></section><section class="docstring"><div class="docstring-header"><a class="docstring-binding" id="LabConnections.BeagleBone.GPIO" href="#LabConnections.BeagleBone.GPIO"><code>LabConnections.BeagleBone.GPIO</code></a> — <span class="docstring-category">Type</span>.</div><div><div><pre><code class="language-julia">GPIO(i::Int32)</code></pre><p>Lowest form of communication with the GPIO pins. The available pins are listed in the "channel" parameter, and appear as directories in /sys/class/gpio after being exported. For instance, to setup a GPIO on "gpio112", configure it as an output pin and set it to high, the following code would be used.</p><pre><code class="language-none">`gpio = GPIO(1)` -`write!(gpio, (2,"out"))` -`write!(gpio, (1, "1"))`</code></pre><p>The operation of reading the current output value of the GPIO is done by</p><pre><code class="language-none">`read(gpio, 1)`</code></pre><p>See the test/BeagleBone/GPIO_test.jl for more examples.</p></div></div></section><section class="docstring"><div class="docstring-header"><a class="docstring-binding" id="LabConnections.BeagleBone.IO_Object" href="#LabConnections.BeagleBone.IO_Object"><code>LabConnections.BeagleBone.IO_Object</code></a> — <span class="docstring-category">Type</span>.</div><div><div><p>Define abstract type for pins/LEDS on the BeagleBone</p></div></div></section><section class="docstring"><div class="docstring-header"><a class="docstring-binding" id="LabConnections.BeagleBone.SysLED" href="#LabConnections.BeagleBone.SysLED"><code>LabConnections.BeagleBone.SysLED</code></a> — <span class="docstring-category">Type</span>.</div><div><div><pre><code class="language-julia">SysLED(i::Int32)</code></pre><p>Type representing the system LEDs on the BeagleBone. The LEDs are indexed by i ∈ [1,2,3,4].</p></div></div></section><footer><hr/><a class="previous" href="../functions/"><span class="direction">Previous</span><span class="title">Available functions</span></a><a class="next" href="../../man/installation/"><span class="direction">Next</span><span class="title">Installation Instructions</span></a></footer></article></body></html> diff --git a/docs/build/man/installation.md b/docs/build/man/installation.md new file mode 100644 index 0000000000000000000000000000000000000000..dfc060ab894872be0f0f21640d1c82225e75ab08 --- /dev/null +++ b/docs/build/man/installation.md @@ -0,0 +1,161 @@ + +<a id='Installation-Instructions-1'></a> + + +<a id='Installation-Instructions-1'></a> + +# Installation Instructions + + +In these instructions we explain how to set up a working environment on a host computer and a BeagleBone Black. If you already have a prepared micro-SD card for flashing a BeagleBone, then you can safely skip the first section of these instructions. + + +<a id='On-the-BBB-1'></a> + + +<a id='Preparing-a-micro-SD-card-1'></a> + +## Preparing a micro-SD card + + +First, we will prepare a micro-SD card with an image of Debian and a binary of Julia, which we then can flash onto the BeagleBone. Start by downloading the Debian image [here](http://beagleboard.org/latest-images) (Debian 9.5 2018-10-07 4GB SD IoT) and write the image onto a micro-SD card ([this guide](http://derekmolloy.ie/write-a-new-image-to-the-beaglebone-black/) is helpful). Proceed by downloading the Julia v1.0 binary for 32-bit ARMv7 found [here](https://julialang.org/downloads/). Put the .tar-file of the Julia binary on the micro-SD card containing the Debian image under `/home/debian`, and unzip it. Make sure that the Julia folder has the correct name by typing + + +``` +`mv /home/debian/julia-<distro specific tag>/bin/julia /home/debian/julia/bin/julia' +``` + + +The file structure on the micro-SD now has the correct structure. The final step is to make sure that the micro-SD will automatically flash the Debian image onto the BeagleBone when booting up. To do this, follow the instructions found [here](https://elinux.org/Beagleboard:BeagleBoneBlack_Debian#Flashing_eMMC). Congratulations, you now have a prepared micro-SD card ready for flashing BeagleBones. + + +<a id='Flashing-the-BeagleBone-1'></a> + +## Flashing the BeagleBone + + +Insert a prepared micro-SD card in the slot on the BeagleBone, and press down the boot button S2 (the button closest to the micro-SD slot) and hold it down while you plug in the USB-cable to the BeagleBone. Keep the S2 button held down for a couple of seconds, until the onboard LEDs start to blink. After a short while the onboard LEDs should start to flash in a wave pattern, indicating that the BeagleBone is being flashed. After a while (can vary between 5-45 minutes) the BeagleBone will be turn off automatically, indicating that the flashing is complete. Remove the micro-SD before powering on the BeagleBone again (otherwise it will start to flash the BeagleBone again). + + +<a id='Trying-out-the-BeagleBone-1'></a> + +## Trying out the BeagleBone + + +Now your BeagleBone is ready to use. Log on to the BeagleBone via SSH by opening a terminal and typing + + +``` +`ssh debian@192.168.7.2' +``` + + +The default password is `temppwd`. You are now logged in to the BeagleBone running Debian. The Julia binary should be located at `/home/debian/julia-/bin/julia`. You can now start a Julia REPL on the BeagleBone by typing + + +``` +`/home/debian/julia-<distro specific tag>/bin/julia' +``` + + +If this works correctly, then you have a functioning BeagleBone ready for use with the LabConnections.jl package. + + +<a id='On-the-HOST-1'></a> + + +<a id='Setting-up-the-host-computer-1'></a> + +## Setting up the host computer + + +To get started, first install Julia v1.0.X on the host computer running a Linux distribution by following the instructions specified [here](https://github.com/JuliaLang/julia/blob/master/README.md). Once Julia is installed, run + + +``` +using Pkg +`Pkg.clone(https://gitlab.control.lth.se/labdev/LabConnections.jl)' +``` + + +in the Julia REPL to install all dependencies on the host computer. The source code is then located in `./julia/v1.0/LabConnections'. + + +If you plan on working with the SPI devices to debug the ADC/DAC, then you will need a forked `serbus' repository which wraps the`linux/spi/spidev'. Simply + + +``` +`cd && cd .julia/v0.6' +`git clone https://github.com/mgreiff/serbus' +``` + + +to get the latest revision of the serbus fork. + + +To update the BB with the latest revision of the code, + + +``` +`cd && cd .julia/v0.6/LabConnection/util' +`./flash_BB.sh' +``` + + +This scripts bundles the current code in LabCOnnections and serbus on the host computer and transfers it to the /home/debian/juliapackages directory on the BB. + + +<a id='Setting-up-automatic-communication-1'></a> + + +<a id='Setting-up-automatic-communication-1'></a> + +## Setting up automatic communication + + +To setup automatic start of Julia server on the BB, make sure to have completed all prior installation instructions, and that the lates revision of the LabConnections package is located on the BB. SSH to the BeagleBone and copy the julilaserver.service to the systemd/system + + +``` +`ssh debian@192.168.7.2' +`sudo cp -r /home/debian/juliapackets/LabConnections/src/BeagleBone/startup/juliaserver.service /lib/systemd/system/juliaserver.service` (on the BeagleBone) +``` + + +Then execute the commands + + +`sudo systemctl enable juliaserver` (on the BeagleBone) `sudo systemctl start juliaserver` (on the BeagleBone) + + +After a while, the BeagleBone should start blinking on SysLED 2: on-off-on-sleep-repeat. The server should now start automatically on restart of the BeagleBone, and you should be able to run the examples in in /Examples on the host computer. + + +```@systemConfiguration + +``` + + +<a id='Debugging-1'></a> + + +<a id='Debugging-1'></a> + +## Debugging + + +No errors will be seen on the BeagleBone when the automatic startup is used. For debugging purposes it might be useful to start the service manually on the beagle bone. Start julia as root: + + +``` +sudo /home/debian/julia/bin/julia +``` + + +and run the startup script: + + +``` +include("/home/debian/juliapackages/LabConnections/src/BeagleBone/startup/startup.jl") +``` + diff --git a/docs/build/man/installation/index.html b/docs/build/man/installation/index.html deleted file mode 100644 index 64d2ca553d9e81823f668333168d99930ffa99ea..0000000000000000000000000000000000000000 --- a/docs/build/man/installation/index.html +++ /dev/null @@ -1,6 +0,0 @@ -<!DOCTYPE html> -<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Installation Instructions · LabConnections</title><link href="https://cdnjs.cloudflare.com/ajax/libs/normalize/4.2.0/normalize.min.css" rel="stylesheet" type="text/css"/><link href="https://fonts.googleapis.com/css?family=Lato|Roboto+Mono" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/default.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL="../.."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.2.0/require.min.js" data-main="../../assets/documenter.js"></script><script src="../../siteinfo.js"></script><script src="../../../versions.js"></script><link href="../../assets/documenter.css" rel="stylesheet" type="text/css"/></head><body><nav class="toc"><h1>LabConnections</h1><select id="version-selector" onChange="window.location.href=this.value" style="visibility: hidden"></select><form class="search" id="search-form" action="../../search/"><input id="search-query" name="q" type="text" placeholder="Search docs"/></form><ul><li><a class="toctext" href="../../examples/examples/">Examples</a></li><li><a class="toctext" href="../../examples/testing/">Tests</a></li><li><a class="toctext" href="../../">LabConnections.jl Manual</a></li><li><a class="toctext" href="../../lib/functions/">Available functions</a></li><li><a class="toctext" href="../../lib/io_devices/">Available devices</a></li><li class="current"><a class="toctext" href>Installation Instructions</a><ul class="internal"><li><a class="toctext" href="#Preparing-a-micro-SD-card-1">Preparing a micro-SD card</a></li><li><a class="toctext" href="#Flashing-the-BeagleBone-1">Flashing the BeagleBone</a></li><li><a class="toctext" href="#Trying-out-the-BeagleBone-1">Trying out the BeagleBone</a></li><li><a class="toctext" href="#Setting-up-the-host-computer-1">Setting up the host computer</a></li><li><a class="toctext" href="#Setting-up-automatic-communication-1">Setting up automatic communication</a></li><li><a class="toctext" href="#Debugging-1">Debugging</a></li></ul></li><li><a class="toctext" href="../introduction/">Introduction</a></li></ul></nav><article id="docs"><header><nav><ul><li><a href>Installation Instructions</a></li></ul><a class="edit-page" href="https://github.com//blob/master/docs/src/man/installation.md"><span class="fa"></span> Edit on GitHub</a></nav><hr/><div id="topbar"><span>Installation Instructions</span><a class="fa fa-bars" href="#"></a></div></header><p><a id='Installation-Instructions-1'></a></p><h1><a class="nav-anchor" id="Installation-Instructions-1" href="#Installation-Instructions-1">Installation Instructions</a></h1><p>In these instructions we explain how to set up a working environment on a host computer and a BeagleBone Black. If you already have a prepared micro-SD card for flashing a BeagleBone, then you can safely skip the first section of these instructions.</p><p><a id='On-the-BBB-1'></a></p><h2><a class="nav-anchor" id="Preparing-a-micro-SD-card-1" href="#Preparing-a-micro-SD-card-1">Preparing a micro-SD card</a></h2><p>First, we will prepare a micro-SD card with an image of Debian and a binary of Julia, which we then can flash onto the BeagleBone. Start by downloading the Debian image <a href="http://beagleboard.org/latest-images">here</a> (Debian 9.5 2018-10-07 4GB SD IoT) and write the image onto a micro-SD card (<a href="http://derekmolloy.ie/write-a-new-image-to-the-beaglebone-black/">this guide</a> is helpful). Proceed by downloading the Julia v1.0 binary for 32-bit ARMv7 found <a href="https://julialang.org/downloads/">here</a>. Put the .tar-file of the Julia binary on the micro-SD card containing the Debian image under <code>/home/debian</code>, and unzip it. Make sure that the Julia folder has the correct name by typing</p><pre><code class="language-none">`mv /home/debian/julia-<distro specific tag>/bin/julia /home/debian/julia/bin/julia'</code></pre><p>The file structure on the micro-SD now has the correct structure. The final step is to make sure that the micro-SD will automatically flash the Debian image onto the BeagleBone when booting up. To do this, follow the instructions found <a href="https://elinux.org/Beagleboard:BeagleBoneBlack_Debian#Flashing_eMMC">here</a>. Congratulations, you now have a prepared micro-SD card ready for flashing BeagleBones.</p><h2><a class="nav-anchor" id="Flashing-the-BeagleBone-1" href="#Flashing-the-BeagleBone-1">Flashing the BeagleBone</a></h2><p>Insert a prepared micro-SD card in the slot on the BeagleBone, and press down the boot button S2 (the button closest to the micro-SD slot) and hold it down while you plug in the USB-cable to the BeagleBone. Keep the S2 button held down for a couple of seconds, until the onboard LEDs start to blink. After a short while the onboard LEDs should start to flash in a wave pattern, indicating that the BeagleBone is being flashed. After a while (can vary between 5-45 minutes) the BeagleBone will be turn off automatically, indicating that the flashing is complete. Remove the micro-SD before powering on the BeagleBone again (otherwise it will start to flash the BeagleBone again).</p><h2><a class="nav-anchor" id="Trying-out-the-BeagleBone-1" href="#Trying-out-the-BeagleBone-1">Trying out the BeagleBone</a></h2><p>Now your BeagleBone is ready to use. Log on to the BeagleBone via SSH by opening a terminal and typing</p><pre><code class="language-none">`ssh debian@192.168.7.2'</code></pre><p>The default password is <code>temppwd</code>. You are now logged in to the BeagleBone running Debian. The Julia binary should be located at <code>/home/debian/julia-/bin/julia</code>. You can now start a Julia REPL on the BeagleBone by typing</p><pre><code class="language-none">`/home/debian/julia-<distro specific tag>/bin/julia'</code></pre><p>If this works correctly, then you have a functioning BeagleBone ready for use with the LabConnections.jl package.</p><p><a id='On-the-HOST-1'></a></p><h2><a class="nav-anchor" id="Setting-up-the-host-computer-1" href="#Setting-up-the-host-computer-1">Setting up the host computer</a></h2><p>To get started, first install Julia v1.0.X on the host computer running a Linux distribution by following the instructions specified <a href="https://github.com/JuliaLang/julia/blob/master/README.md">here</a>. Once Julia is installed, run</p><pre><code class="language-none">using Pkg -`Pkg.clone(https://gitlab.control.lth.se/labdev/LabConnections.jl)'</code></pre><p>in the Julia REPL to install all dependencies on the host computer. The source code is then located in `./julia/v1.0/LabConnections'.</p><p>If you plan on working with the SPI devices to debug the ADC/DAC, then you will need a forked <code>serbus' repository which wraps the</code>linux/spi/spidev'. Simply</p><pre><code class="language-none">`cd && cd .julia/v0.6' -`git clone https://github.com/mgreiff/serbus'</code></pre><p>to get the latest revision of the serbus fork.</p><p>To update the BB with the latest revision of the code, </p><pre><code class="language-none">`cd && cd .julia/v0.6/LabConnection/util' -`./flash_BB.sh'</code></pre><p>This scripts bundles the current code in LabCOnnections and serbus on the host computer and transfers it to the /home/debian/juliapackages directory on the BB.</p><p><a id='Setting-up-automatic-communication-1'></a></p><h2><a class="nav-anchor" id="Setting-up-automatic-communication-1" href="#Setting-up-automatic-communication-1">Setting up automatic communication</a></h2><p>To setup automatic start of Julia server on the BB, make sure to have completed all prior installation instructions, and that the lates revision of the LabConnections package is located on the BB. SSH to the BeagleBone and copy the julilaserver.service to the systemd/system</p><pre><code class="language-none">`ssh debian@192.168.7.2' -`sudo cp -r /home/debian/juliapackets/LabConnections/src/BeagleBone/startup/juliaserver.service /lib/systemd/system/juliaserver.service` (on the BeagleBone)</code></pre><p>Then execute the commands</p><p><code>sudo systemctl enable juliaserver</code> (on the BeagleBone) <code>sudo systemctl start juliaserver</code> (on the BeagleBone)</p><p>After a while, the BeagleBone should start blinking on SysLED 2: on-off-on-sleep-repeat. The server should now start automatically on restart of the BeagleBone, and you should be able to run the examples in in /Examples on the host computer.</p><pre><code class="language-"></code></pre><p><a id='Debugging-1'></a></p><h2><a class="nav-anchor" id="Debugging-1" href="#Debugging-1">Debugging</a></h2><p>No errors will be seen on the BeagleBone when the automatic startup is used. For debugging purposes it might be useful to start the service manually on the beagle bone. Start julia as root:</p><pre><code class="language-none">sudo /home/debian/julia/bin/julia</code></pre><p>and run the startup script:</p><pre><code class="language-none">include("/home/debian/juliapackages/LabConnections/src/BeagleBone/startup/startup.jl")</code></pre><footer><hr/><a class="previous" href="../../lib/io_devices/"><span class="direction">Previous</span><span class="title">Available devices</span></a><a class="next" href="../introduction/"><span class="direction">Next</span><span class="title">Introduction</span></a></footer></article></body></html> diff --git a/docs/build/man/introduction.md b/docs/build/man/introduction.md new file mode 100644 index 0000000000000000000000000000000000000000..6d7027ef1e3ba510996217a5a0058ff93ca89e6d --- /dev/null +++ b/docs/build/man/introduction.md @@ -0,0 +1,10 @@ + +<a id='Introduction-1'></a> + +# Introduction + + +<a id='Installation-1'></a> + +## Installation + diff --git a/docs/build/man/introduction/index.html b/docs/build/man/introduction/index.html deleted file mode 100644 index 14106924ce18b3e69d717153f0fcc58f6287c746..0000000000000000000000000000000000000000 --- a/docs/build/man/introduction/index.html +++ /dev/null @@ -1,2 +0,0 @@ -<!DOCTYPE html> -<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Introduction · LabConnections</title><link href="https://cdnjs.cloudflare.com/ajax/libs/normalize/4.2.0/normalize.min.css" rel="stylesheet" type="text/css"/><link href="https://fonts.googleapis.com/css?family=Lato|Roboto+Mono" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/default.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL="../.."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.2.0/require.min.js" data-main="../../assets/documenter.js"></script><script src="../../siteinfo.js"></script><script src="../../../versions.js"></script><link href="../../assets/documenter.css" rel="stylesheet" type="text/css"/></head><body><nav class="toc"><h1>LabConnections</h1><select id="version-selector" onChange="window.location.href=this.value" style="visibility: hidden"></select><form class="search" id="search-form" action="../../search/"><input id="search-query" name="q" type="text" placeholder="Search docs"/></form><ul><li><a class="toctext" href="../../examples/examples/">Examples</a></li><li><a class="toctext" href="../../examples/testing/">Tests</a></li><li><a class="toctext" href="../../">LabConnections.jl Manual</a></li><li><a class="toctext" href="../../lib/functions/">Available functions</a></li><li><a class="toctext" href="../../lib/io_devices/">Available devices</a></li><li><a class="toctext" href="../installation/">Installation Instructions</a></li><li class="current"><a class="toctext" href>Introduction</a><ul class="internal"><li><a class="toctext" href="#Installation-1">Installation</a></li></ul></li></ul></nav><article id="docs"><header><nav><ul><li><a href>Introduction</a></li></ul><a class="edit-page" href="https://github.com//blob/master/docs/src/man/introduction.md"><span class="fa"></span> Edit on GitHub</a></nav><hr/><div id="topbar"><span>Introduction</span><a class="fa fa-bars" href="#"></a></div></header><h1><a class="nav-anchor" id="Introduction-1" href="#Introduction-1">Introduction</a></h1><h2><a class="nav-anchor" id="Installation-1" href="#Installation-1">Installation</a></h2><footer><hr/><a class="previous" href="../installation/"><span class="direction">Previous</span><span class="title">Installation Instructions</span></a></footer></article></body></html> diff --git a/docs/build/search/index.html b/docs/build/search/index.html deleted file mode 100644 index be304c79561052b51583d17526a91b45097296fc..0000000000000000000000000000000000000000 --- a/docs/build/search/index.html +++ /dev/null @@ -1,2 +0,0 @@ -<!DOCTYPE html> -<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Search · LabConnections</title><link href="https://cdnjs.cloudflare.com/ajax/libs/normalize/4.2.0/normalize.min.css" rel="stylesheet" type="text/css"/><link href="https://fonts.googleapis.com/css?family=Lato|Roboto+Mono" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/default.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL=".."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.2.0/require.min.js" data-main="../assets/documenter.js"></script><script src="../siteinfo.js"></script><script src="../../versions.js"></script><link href="../assets/documenter.css" rel="stylesheet" type="text/css"/></head><body><nav class="toc"><h1>LabConnections</h1><select id="version-selector" onChange="window.location.href=this.value" style="visibility: hidden"></select><form class="search" id="search-form" action><input id="search-query" name="q" type="text" placeholder="Search docs"/></form><ul><li><a class="toctext" href="../examples/examples/">Examples</a></li><li><a class="toctext" href="../examples/testing/">Tests</a></li><li><a class="toctext" href="../">LabConnections.jl Manual</a></li><li><a class="toctext" href="../lib/functions/">Available functions</a></li><li><a class="toctext" href="../lib/io_devices/">Available devices</a></li><li><a class="toctext" href="../man/installation/">Installation Instructions</a></li><li><a class="toctext" href="../man/introduction/">Introduction</a></li></ul></nav><article><header><nav><ul><li>Search</li></ul></nav><hr/><div id="topbar"><span>Search</span><a class="fa fa-bars" href="#"></a></div></header><h1>Search</h1><p id="search-info">Number of results: <span id="search-results-number">loading...</span></p><ul id="search-results"></ul></article></body><script src="../search_index.js"></script><script src="../assets/search.js"></script></html> diff --git a/docs/build/search_index.js b/docs/build/search_index.js deleted file mode 100644 index f70efb2906a5bfbe2fa3e94545208a59a69068de..0000000000000000000000000000000000000000 --- a/docs/build/search_index.js +++ /dev/null @@ -1,3 +0,0 @@ -var documenterSearchIndex = {"docs": -[{"location":"examples/examples/#Examples-1","page":"Examples","title":"Examples","text":"","category":"section"},{"location":"examples/examples/#","page":"Examples","title":"Examples","text":"The following examples may be run from the BB, and may require the user to export the the LabConnections module to the LOAD_PATH manually, executing the following line in the Julia prompt","category":"page"},{"location":"examples/examples/#","page":"Examples","title":"Examples","text":"push!(LOAD_PATH, \"/home/debian/juliapackages\")","category":"page"},{"location":"examples/examples/#","page":"Examples","title":"Examples","text":"When running the examples with hardware in the loop, take caution not to short the BB ground with any output pin, as this will damage the board. For instance, if connecting a diode to the output pins, always use a resistor of >1000 Ohm in parallel. See the configuration page for information on which functionality specific pins support.","category":"page"},{"location":"examples/examples/#Example-with-LEDs-(BB)-1","page":"Examples","title":"Example with LEDs (BB)","text":"","category":"section"},{"location":"examples/examples/#","page":"Examples","title":"Examples","text":"To test the system LED functionality of the Julia code from the BBB, open a Julia prompt and run the SYSLEDtest.jl file","category":"page"},{"location":"examples/examples/#","page":"Examples","title":"Examples","text":"include(\"/home/debian/juliapackages/LabConnections/test/BeagleBone/SYS_LED_test.jl\")","category":"page"},{"location":"examples/examples/#","page":"Examples","title":"Examples","text":"This example runs a test with hardware in the loop, exporting and unexporting the SYS_LED devices and blinking led D2-D5 in a sequence over 1 second, alternating with D2/D4 and D3/D5 on/off.","category":"page"},{"location":"examples/examples/#Example-with-GPIOs-(BB)-1","page":"Examples","title":"Example with GPIOs (BB)","text":"","category":"section"},{"location":"examples/examples/#","page":"Examples","title":"Examples","text":"To test the GPIO functionality of the Julia code from the BBB, open a Julia prompt and run the GPIO_test.jl file","category":"page"},{"location":"examples/examples/#","page":"Examples","title":"Examples","text":"include(\"/home/debian/juliapackages/LabConnections/test/BeagleBone/GPIO_test.jl\")","category":"page"},{"location":"examples/examples/#","page":"Examples","title":"Examples","text":"This again runs the tests with the BBB in the loop, testing exception handling exporting of the file system and also runs all the GPIOs on the board high/low at a 0.1 period time over 1 second to demonstrate the IO communication visually.","category":"page"},{"location":"examples/examples/#Example-with-PWM-(BB)-1","page":"Examples","title":"Example with PWM (BB)","text":"","category":"section"},{"location":"examples/examples/#","page":"Examples","title":"Examples","text":"To test the PWM functionality of the Julia code from the BBB, open a Julia prompt and run the PWM_test.jl file","category":"page"},{"location":"examples/examples/#","page":"Examples","title":"Examples","text":"include(\"/home/debian/juliapackages/LabConnections/test/BeagleBone/PWM_test.jl\")","category":"page"},{"location":"examples/examples/#","page":"Examples","title":"Examples","text":"This runs the PWM tests with the BBB in the loop, testing exception handling exporting of the file system. In addition, it runs all the PWM pins on the board with a duty cycle of 0.5 over a period time over 1 second to demonstrate the IO communication visually.","category":"page"},{"location":"examples/examples/#Example-with-SPI-(BB)-1","page":"Examples","title":"Example with SPI (BB)","text":"","category":"section"},{"location":"examples/examples/#","page":"Examples","title":"Examples","text":"All development on the SPI is currently done in C in a for of the serbus package. Consequently, this example is currently run completely separate from the LabConnections.","category":"page"},{"location":"examples/examples/#","page":"Examples","title":"Examples","text":"Make sure that the serbus package exists in the /juliapackages/ directory, where it is automatically placed when transferring code to the BB using the ./flash_BB shell script. Then simply run","category":"page"},{"location":"examples/examples/#","page":"Examples","title":"Examples","text":"cp /home/debian/juliapackages/serbus/bb_spi.sh /home/debian","category":"page"},{"location":"examples/examples/#","page":"Examples","title":"Examples","text":"and execute","category":"page"},{"location":"examples/examples/#","page":"Examples","title":"Examples","text":"./bb_spi.sh","category":"page"},{"location":"examples/examples/#","page":"Examples","title":"Examples","text":"in the /home/debian/ directory. The program then","category":"page"},{"location":"examples/examples/#","page":"Examples","title":"Examples","text":"Compiles a device tree overlay (should SPI1 be used)\nCreates the binaries for the SPI driver and example\nRuns the MCP3903 example script located in spi_MCP3903.c","category":"page"},{"location":"examples/examples/#","page":"Examples","title":"Examples","text":"The purpose of the program is to configure the ADC to operate in the continuous mode and then read the registers, outputting the measurements in the terminal.","category":"page"},{"location":"examples/examples/#Example-with-LEDs-(HOST)-1","page":"Examples","title":"Example with LEDs (HOST)","text":"","category":"section"},{"location":"examples/examples/#","page":"Examples","title":"Examples","text":"To operate the LEDs from the host computer, simply connect the BBB to the HOST via USB and run the \"testLED.jl\" on the HOST","category":"page"},{"location":"examples/examples/#","page":"Examples","title":"Examples","text":"cd && cd .julia/v0.6/LabConnections/Examples/ && julia testLED.jl","category":"page"},{"location":"examples/examples/#","page":"Examples","title":"Examples","text":"","category":"page"},{"location":"examples/testing/#Tests-1","page":"Tests","title":"Tests","text":"","category":"section"},{"location":"examples/testing/#","page":"Tests","title":"Tests","text":"The BeagleBone tests can be run on any computer, regrdless of their file-syste. By setting the flag RUNNING_TESTS to true, a dummy file-system is exported in which the tests are run operate. This has the advantage of enabling testing of the code run on the BB free from the BB itself, without building the Debian FS, thereby enabling the automatic testing through Travis.","category":"page"},{"location":"examples/testing/#","page":"Tests","title":"Tests","text":"To run the tests, simply enter the /test/ directory and run","category":"page"},{"location":"examples/testing/#","page":"Tests","title":"Tests","text":"julia run_tests.jl","category":"page"},{"location":"examples/testing/#","page":"Tests","title":"Tests","text":"If the tests are to be run on the BB with hardware in the loop, run","category":"page"},{"location":"examples/testing/#","page":"Tests","title":"Tests","text":"julia run_tests.jl","category":"page"},{"location":"examples/testing/#","page":"Tests","title":"Tests","text":"on the BB, to run examples separately, see","category":"page"},{"location":"#LabConnections.jl-Manual-1","page":"LabConnections.jl Manual","title":"LabConnections.jl Manual","text":"","category":"section"},{"location":"#","page":"LabConnections.jl Manual","title":"LabConnections.jl Manual","text":"CurrentModule = LabConnections","category":"page"},{"location":"#Examples-1","page":"LabConnections.jl Manual","title":"Examples","text":"","category":"section"},{"location":"#","page":"LabConnections.jl Manual","title":"LabConnections.jl Manual","text":"Pages = [\"examples/examples.md\", \"examples/testing.md\"]\nDepth = 1","category":"page"},{"location":"#Guide-1","page":"LabConnections.jl Manual","title":"Guide","text":"","category":"section"},{"location":"#","page":"LabConnections.jl Manual","title":"LabConnections.jl Manual","text":"Pages = [\"man/introduction.md\", \"man/installation.md\"]\nDepth = 1","category":"page"},{"location":"#Functions-1","page":"LabConnections.jl Manual","title":"Functions","text":"","category":"section"},{"location":"#","page":"LabConnections.jl Manual","title":"LabConnections.jl Manual","text":"Pages = [\"lib/io_devices.md\", \"lib/functions.md\"]","category":"page"},{"location":"#Documentation-Index-1","page":"LabConnections.jl Manual","title":"Documentation Index","text":"","category":"section"},{"location":"#","page":"LabConnections.jl Manual","title":"LabConnections.jl Manual","text":"Pages = [\"lib/io_devices.md\", \"lib/functions.md\"]\nDepth = 1","category":"page"},{"location":"lib/functions/#","page":"Available functions","title":"Available functions","text":"Pages = [\"functions.md\"]","category":"page"},{"location":"lib/functions/#Available-functions-1","page":"Available functions","title":"Available functions","text":"","category":"section"},{"location":"lib/functions/#","page":"Available functions","title":"Available functions","text":"Modules = [LabConnections.BeagleBone]\nOrder = [:function]","category":"page"},{"location":"lib/functions/#LabConnections.BeagleBone.run_server","page":"Available functions","title":"LabConnections.BeagleBone.run_server","text":"run_server(port=2001; debug=false)\n\nRun a server on port that listens for commands from computer Optional debug keyword disables blinking system leds.\n\n\n\n\n\n","category":"function"},{"location":"lib/functions/#Base.read","page":"Available functions","title":"Base.read","text":"l = read(led::SysLED, debug::Bool=false)\n\nReads the current brightness value from the LED 'SysLED'.\n\n\n\n\n\n","category":"function"},{"location":"lib/functions/#Base.read","page":"Available functions","title":"Base.read","text":"l = read(pwm::PWM, operation::Int32, debug::Bool=false)\n\nReads the current value from an operation on a GPIO.\n\n\n\n\n\n","category":"function"},{"location":"lib/functions/#Base.read","page":"Available functions","title":"Base.read","text":"l = read(gpio::GPIO, operation::Int32, debug::Bool=false)\n\nReads the current value from an operation on a GPIO.\n\n\n\n\n\n","category":"function"},{"location":"lib/functions/#LabConnections.BeagleBone.assert_pwm_write-Tuple{Int32,String}","page":"Available functions","title":"LabConnections.BeagleBone.assert_pwm_write","text":"assert_pwm_write(operation::Int32, entry::String)\n\nAssertsion for the PWM input data.\n\n\n\n\n\n","category":"method"},{"location":"lib/functions/#LabConnections.BeagleBone.bbparse-Tuple{Any}","page":"Available functions","title":"LabConnections.BeagleBone.bbparse","text":"bbparse(cmd)\n\nParse and execute the command cmd.\n\n\n\n\n\n","category":"method"},{"location":"lib/functions/#LabConnections.BeagleBone.bbparse-Tuple{Tuple,Any}","page":"Available functions","title":"LabConnections.BeagleBone.bbparse","text":"bbparse(l::Tuple, sock)\n\nParse input on the form l=(iswrite, ndev, cmd1, cmd2, ..., cmdn) where if iswrite cmdi = (devname, id, val) and if not iswrite cmdi = (devname, id) and send back on socket (vals, timestamps).\n\n\n\n\n\n","category":"method"},{"location":"lib/functions/#LabConnections.BeagleBone.closedev-Tuple{String,Int32}","page":"Available functions","title":"LabConnections.BeagleBone.closedev","text":"closedev(dev_name::String, i::Int32)\n\nCloses down a currently active device of type 'dev_name' at index 'i' on the BeagleBone, and removes it from the dict of currently active devices.\n\n\n\n\n\n","category":"method"},{"location":"lib/functions/#LabConnections.BeagleBone.export_gpio-Tuple{Int32}","page":"Available functions","title":"LabConnections.BeagleBone.export_gpio","text":"export_gpio(i::Int32, debug::Bool=false)\n\nExport the GPIO file system, either for real-time or testing usecases.\n\n\n\n\n\n","category":"method"},{"location":"lib/functions/#LabConnections.BeagleBone.export_led","page":"Available functions","title":"LabConnections.BeagleBone.export_led","text":"export_led(i::Int32, debug::Bool=false)\n\nExports a dummy filesystem for testing the LED implementation\n\n\n\n\n\n","category":"function"},{"location":"lib/functions/#LabConnections.BeagleBone.export_pwm-Tuple{Int32}","page":"Available functions","title":"LabConnections.BeagleBone.export_pwm","text":"export_gpio(i::Int32, debug::Bool=false)\n\nExport the GPIO file system, either for real-time or testing usecases.\n\n\n\n\n\n","category":"method"},{"location":"lib/functions/#LabConnections.BeagleBone.getdev-Tuple{String,Int32}","page":"Available functions","title":"LabConnections.BeagleBone.getdev","text":"dev = getdev(dev_name::String, i::Int32)\n\nRetrieves the active device of type dev_name at index 'i'.\n\n\n\n\n\n","category":"method"},{"location":"lib/functions/#LabConnections.BeagleBone.initdev-Tuple{String,Int32}","page":"Available functions","title":"LabConnections.BeagleBone.initdev","text":"active_device = initdev(dev_name::String, i:Int32)\n\nInitializes a new device of type 'devname' at index 'i' on the BeagleBone, and adds it to the dict of currently active devices. Returns the initialized device 'activedevice'.\n\n\n\n\n\n","category":"method"},{"location":"lib/functions/#LabConnections.BeagleBone.listdev-Tuple{}","page":"Available functions","title":"LabConnections.BeagleBone.listdev","text":"message = listdev()\n\nLists all the active devices as an insidence array for testing.\n\n\n\n\n\n","category":"method"},{"location":"lib/functions/#LabConnections.BeagleBone.printdev-Tuple{String,Int32}","page":"Available functions","title":"LabConnections.BeagleBone.printdev","text":"message = printdev()\n\nPrints all the active devices and writes out specifics of a single devices.\n\n\n\n\n\n","category":"method"},{"location":"lib/functions/#LabConnections.BeagleBone.teardown","page":"Available functions","title":"LabConnections.BeagleBone.teardown","text":"teardown(led::SysLED, debug::Bool=false)\n\nCloses all open filestreams for the SysLED 'led'.\n\n\n\n\n\n","category":"function"},{"location":"lib/functions/#LabConnections.BeagleBone.teardown","page":"Available functions","title":"LabConnections.BeagleBone.teardown","text":"teardown(gpio::GPIO, debug::Bool=false)\n\nCloses all open streams on the GPIO, and unexports it from the file system.\n\n\n\n\n\n","category":"function"},{"location":"lib/functions/#LabConnections.BeagleBone.teardown","page":"Available functions","title":"LabConnections.BeagleBone.teardown","text":"teardown!(pwd::PWM)\n\nCloses all open streams on the PWM, and unexports it from the file system\n\n\n\n\n\n","category":"function"},{"location":"lib/functions/#LabConnections.BeagleBone.to_string","page":"Available functions","title":"LabConnections.BeagleBone.to_string","text":"to_string(led::SysLED, debug::Bool=false)\n\nGenerates a string representation of the GPIO device.\n\n\n\n\n\n","category":"function"},{"location":"lib/functions/#LabConnections.BeagleBone.to_string","page":"Available functions","title":"LabConnections.BeagleBone.to_string","text":"to_string(gpio::GPIO, debug::Bool=false)\n\nGenerates a string representation of the GPIO device.\n\n\n\n\n\n","category":"function"},{"location":"lib/functions/#LabConnections.BeagleBone.to_string","page":"Available functions","title":"LabConnections.BeagleBone.to_string","text":"to_string(pwm::PWM,, debug::Bool=false)\n\nGenerates a string representation of the GPIO device.\n\n\n\n\n\n","category":"function"},{"location":"lib/functions/#LabConnections.BeagleBone.write!","page":"Available functions","title":"LabConnections.BeagleBone.write!","text":"write!(gpio::GPIO, args::Tuple{Int32,String}, debug::Bool=false)\n\nWrites an entry to an operation on a GPIO, of the form args = (operation, entry).\n\n\n\n\n\n","category":"function"},{"location":"lib/functions/#LabConnections.BeagleBone.write!","page":"Available functions","title":"LabConnections.BeagleBone.write!","text":"write!(led::SysLED, val::Bool, debug::Bool=false)\n\nTurns the LED 'SysLed' on/off for val = true/false respectively.\n\n\n\n\n\n","category":"function"},{"location":"lib/functions/#LabConnections.BeagleBone.write!","page":"Available functions","title":"LabConnections.BeagleBone.write!","text":"write!(pwm::PWM, args::Tuple{Int32,String}, debug::Bool=false)\n\nWrites an entry to an operation on the PWM, of the form args = (operation, entry).\n\n\n\n\n\n","category":"function"},{"location":"lib/io_devices/#","page":"Available devices","title":"Available devices","text":"Pages = [\"io_devices.md\"]","category":"page"},{"location":"lib/io_devices/#Available-devices-1","page":"Available devices","title":"Available devices","text":"","category":"section"},{"location":"lib/io_devices/#","page":"Available devices","title":"Available devices","text":"Modules = [LabConnections.BeagleBone]\nOrder = [:type]","category":"page"},{"location":"lib/io_devices/#LabConnections.BeagleBone.Debug","page":"Available devices","title":"LabConnections.BeagleBone.Debug","text":"Debug(i::Int32)\n\nType for debugging and precompile.\n\n\n\n\n\n","category":"type"},{"location":"lib/io_devices/#LabConnections.BeagleBone.GPIO","page":"Available devices","title":"LabConnections.BeagleBone.GPIO","text":"GPIO(i::Int32)\n\nLowest form of communication with the GPIO pins. The available pins are listed in the \"channel\" parameter, and appear as directories in /sys/class/gpio after being exported. For instance, to setup a GPIO on \"gpio112\", configure it as an output pin and set it to high, the following code would be used.\n\n`gpio = GPIO(1)`\n`write!(gpio, (2,\"out\"))`\n`write!(gpio, (1, \"1\"))`\n\nThe operation of reading the current output value of the GPIO is done by\n\n`read(gpio, 1)`\n\nSee the test/BeagleBone/GPIO_test.jl for more examples.\n\n\n\n\n\n","category":"type"},{"location":"lib/io_devices/#LabConnections.BeagleBone.IO_Object","page":"Available devices","title":"LabConnections.BeagleBone.IO_Object","text":"Define abstract type for pins/LEDS on the BeagleBone\n\n\n\n\n\n","category":"type"},{"location":"lib/io_devices/#LabConnections.BeagleBone.SysLED","page":"Available devices","title":"LabConnections.BeagleBone.SysLED","text":"SysLED(i::Int32)\n\nType representing the system LEDs on the BeagleBone. The LEDs are indexed by i ∈ [1,2,3,4].\n\n\n\n\n\n","category":"type"},{"location":"man/installation/#","page":"Installation Instructions","title":"Installation Instructions","text":"<a id='Installation-Instructions-1'></a>","category":"page"},{"location":"man/installation/#Installation-Instructions-1","page":"Installation Instructions","title":"Installation Instructions","text":"","category":"section"},{"location":"man/installation/#","page":"Installation Instructions","title":"Installation Instructions","text":"In these instructions we explain how to set up a working environment on a host computer and a BeagleBone Black. If you already have a prepared micro-SD card for flashing a BeagleBone, then you can safely skip the first section of these instructions.","category":"page"},{"location":"man/installation/#","page":"Installation Instructions","title":"Installation Instructions","text":"<a id='On-the-BBB-1'></a>","category":"page"},{"location":"man/installation/#Preparing-a-micro-SD-card-1","page":"Installation Instructions","title":"Preparing a micro-SD card","text":"","category":"section"},{"location":"man/installation/#","page":"Installation Instructions","title":"Installation Instructions","text":"First, we will prepare a micro-SD card with an image of Debian and a binary of Julia, which we then can flash onto the BeagleBone. Start by downloading the Debian image here (Debian 9.5 2018-10-07 4GB SD IoT) and write the image onto a micro-SD card (this guide is helpful). Proceed by downloading the Julia v1.0 binary for 32-bit ARMv7 found here. Put the .tar-file of the Julia binary on the micro-SD card containing the Debian image under /home/debian, and unzip it. Make sure that the Julia folder has the correct name by typing","category":"page"},{"location":"man/installation/#","page":"Installation Instructions","title":"Installation Instructions","text":"`mv /home/debian/julia-<distro specific tag>/bin/julia /home/debian/julia/bin/julia'","category":"page"},{"location":"man/installation/#","page":"Installation Instructions","title":"Installation Instructions","text":"The file structure on the micro-SD now has the correct structure. The final step is to make sure that the micro-SD will automatically flash the Debian image onto the BeagleBone when booting up. To do this, follow the instructions found here. Congratulations, you now have a prepared micro-SD card ready for flashing BeagleBones.","category":"page"},{"location":"man/installation/#Flashing-the-BeagleBone-1","page":"Installation Instructions","title":"Flashing the BeagleBone","text":"","category":"section"},{"location":"man/installation/#","page":"Installation Instructions","title":"Installation Instructions","text":"Insert a prepared micro-SD card in the slot on the BeagleBone, and press down the boot button S2 (the button closest to the micro-SD slot) and hold it down while you plug in the USB-cable to the BeagleBone. Keep the S2 button held down for a couple of seconds, until the onboard LEDs start to blink. After a short while the onboard LEDs should start to flash in a wave pattern, indicating that the BeagleBone is being flashed. After a while (can vary between 5-45 minutes) the BeagleBone will be turn off automatically, indicating that the flashing is complete. Remove the micro-SD before powering on the BeagleBone again (otherwise it will start to flash the BeagleBone again).","category":"page"},{"location":"man/installation/#Trying-out-the-BeagleBone-1","page":"Installation Instructions","title":"Trying out the BeagleBone","text":"","category":"section"},{"location":"man/installation/#","page":"Installation Instructions","title":"Installation Instructions","text":"Now your BeagleBone is ready to use. Log on to the BeagleBone via SSH by opening a terminal and typing","category":"page"},{"location":"man/installation/#","page":"Installation Instructions","title":"Installation Instructions","text":"`ssh debian@192.168.7.2'","category":"page"},{"location":"man/installation/#","page":"Installation Instructions","title":"Installation Instructions","text":"The default password is temppwd. You are now logged in to the BeagleBone running Debian. The Julia binary should be located at /home/debian/julia-/bin/julia. You can now start a Julia REPL on the BeagleBone by typing","category":"page"},{"location":"man/installation/#","page":"Installation Instructions","title":"Installation Instructions","text":"`/home/debian/julia-<distro specific tag>/bin/julia'","category":"page"},{"location":"man/installation/#","page":"Installation Instructions","title":"Installation Instructions","text":"If this works correctly, then you have a functioning BeagleBone ready for use with the LabConnections.jl package.","category":"page"},{"location":"man/installation/#","page":"Installation Instructions","title":"Installation Instructions","text":"<a id='On-the-HOST-1'></a>","category":"page"},{"location":"man/installation/#Setting-up-the-host-computer-1","page":"Installation Instructions","title":"Setting up the host computer","text":"","category":"section"},{"location":"man/installation/#","page":"Installation Instructions","title":"Installation Instructions","text":"To get started, first install Julia v1.0.X on the host computer running a Linux distribution by following the instructions specified here. Once Julia is installed, run","category":"page"},{"location":"man/installation/#","page":"Installation Instructions","title":"Installation Instructions","text":"using Pkg\n`Pkg.clone(https://gitlab.control.lth.se/labdev/LabConnections.jl)'","category":"page"},{"location":"man/installation/#","page":"Installation Instructions","title":"Installation Instructions","text":"in the Julia REPL to install all dependencies on the host computer. The source code is then located in `./julia/v1.0/LabConnections'.","category":"page"},{"location":"man/installation/#","page":"Installation Instructions","title":"Installation Instructions","text":"If you plan on working with the SPI devices to debug the ADC/DAC, then you will need a forked serbus' repository which wraps thelinux/spi/spidev'. Simply","category":"page"},{"location":"man/installation/#","page":"Installation Instructions","title":"Installation Instructions","text":"`cd && cd .julia/v0.6'\n`git clone https://github.com/mgreiff/serbus'","category":"page"},{"location":"man/installation/#","page":"Installation Instructions","title":"Installation Instructions","text":"to get the latest revision of the serbus fork.","category":"page"},{"location":"man/installation/#","page":"Installation Instructions","title":"Installation Instructions","text":"To update the BB with the latest revision of the code, ","category":"page"},{"location":"man/installation/#","page":"Installation Instructions","title":"Installation Instructions","text":"`cd && cd .julia/v0.6/LabConnection/util'\n`./flash_BB.sh'","category":"page"},{"location":"man/installation/#","page":"Installation Instructions","title":"Installation Instructions","text":"This scripts bundles the current code in LabCOnnections and serbus on the host computer and transfers it to the /home/debian/juliapackages directory on the BB.","category":"page"},{"location":"man/installation/#","page":"Installation Instructions","title":"Installation Instructions","text":"<a id='Setting-up-automatic-communication-1'></a>","category":"page"},{"location":"man/installation/#Setting-up-automatic-communication-1","page":"Installation Instructions","title":"Setting up automatic communication","text":"","category":"section"},{"location":"man/installation/#","page":"Installation Instructions","title":"Installation Instructions","text":"To setup automatic start of Julia server on the BB, make sure to have completed all prior installation instructions, and that the lates revision of the LabConnections package is located on the BB. SSH to the BeagleBone and copy the julilaserver.service to the systemd/system","category":"page"},{"location":"man/installation/#","page":"Installation Instructions","title":"Installation Instructions","text":"`ssh debian@192.168.7.2'\n`sudo cp -r /home/debian/juliapackets/LabConnections/src/BeagleBone/startup/juliaserver.service /lib/systemd/system/juliaserver.service` (on the BeagleBone)","category":"page"},{"location":"man/installation/#","page":"Installation Instructions","title":"Installation Instructions","text":"Then execute the commands","category":"page"},{"location":"man/installation/#","page":"Installation Instructions","title":"Installation Instructions","text":"sudo systemctl enable juliaserver (on the BeagleBone) sudo systemctl start juliaserver (on the BeagleBone)","category":"page"},{"location":"man/installation/#","page":"Installation Instructions","title":"Installation Instructions","text":"After a while, the BeagleBone should start blinking on SysLED 2: on-off-on-sleep-repeat. The server should now start automatically on restart of the BeagleBone, and you should be able to run the examples in in /Examples on the host computer.","category":"page"},{"location":"man/installation/#","page":"Installation Instructions","title":"Installation Instructions","text":"","category":"page"},{"location":"man/installation/#","page":"Installation Instructions","title":"Installation Instructions","text":"<a id='Debugging-1'></a>","category":"page"},{"location":"man/installation/#Debugging-1","page":"Installation Instructions","title":"Debugging","text":"","category":"section"},{"location":"man/installation/#","page":"Installation Instructions","title":"Installation Instructions","text":"No errors will be seen on the BeagleBone when the automatic startup is used. For debugging purposes it might be useful to start the service manually on the beagle bone. Start julia as root:","category":"page"},{"location":"man/installation/#","page":"Installation Instructions","title":"Installation Instructions","text":"sudo /home/debian/julia/bin/julia","category":"page"},{"location":"man/installation/#","page":"Installation Instructions","title":"Installation Instructions","text":"and run the startup script:","category":"page"},{"location":"man/installation/#","page":"Installation Instructions","title":"Installation Instructions","text":"include(\"/home/debian/juliapackages/LabConnections/src/BeagleBone/startup/startup.jl\")","category":"page"},{"location":"man/introduction/#Introduction-1","page":"Introduction","title":"Introduction","text":"","category":"section"},{"location":"man/introduction/#Installation-1","page":"Introduction","title":"Installation","text":"","category":"section"}] -} diff --git a/docs/make.jl b/docs/make.jl index 7dcc9d15f57e9ac266d7b03ffd6ae42ab675d136..6c510eba16bc83a4e500c91d4974b00caefb38a6 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -1,32 +1,5 @@ push!(LOAD_PATH,"../src/") println(LOAD_PATH) -using Documenter, LabConnections -# makedocs() -# deploydocs( -# deps = Deps.pip("pygments", "mkdocs", "python-markdown-math", "mkdocs-cinder"), -# repo = "gitlab.control.lth.se/processes/LabProcesses.jl", -# branch = "gh-pages", -# julia = "0.6", -# osname = "linux" -# ) +using Documenter, LabConnections, DocumenterMarkdown -makedocs(modules=[LabConnections],format=Documenter.HTML(),sitename="LabConnections") - -#makedocs( -# format = :html, -# sitename = "LabConnections", -# pages = [ -# "index.md", -# "installation.md", -# "systemConfiguration.md", -# "testing.md", -# "examples.md", -# ] -#) - -#deploydocs( -# repo = "gitlab.control.lth.se/labdev/LabConnections.jl.git", -# target = "build", -# deps = nothing, -# make = nothing -#) +makedocs(modules=[LabConnections],format=Markdown(),sitename="LabConnections")