Skip to content

Commit

Permalink
Merge pull request #21 from loupeteam/feature/oss-release
Browse files Browse the repository at this point in the history
Feature/oss release
  • Loading branch information
AndrewMusser authored Nov 27, 2023
2 parents fd9f828 + 25c4325 commit e6e8c86
Show file tree
Hide file tree
Showing 401 changed files with 3,311 additions and 4,705 deletions.
9 changes: 9 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
The MIT License

Copyright 2023 Loupe

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
# Info
Library is provided by Loupe
https://loupe.team
[email protected]
1-800-240-7042

# Description
Tmplits is a framework for building HMI’s using the Handlebars template system. Tmplits manages loading assets and making them available as Partials to use throughout the HMI. This allows mixing standard HTML with a powerful template system, out of the box.

[![Publish Tmplits](https://github.com/loupeteam/tmplits/actions/workflows/publish-tmplits.yml/badge.svg)](https://github.com/loupeteam/tmplits/actions/workflows/publish-tmplits.yml)

[![Publish Tmplit](https://github.com/loupeteam/tmplits/actions/workflows/npm-publish-github-packages.yml/badge.svg)](https://github.com/loupeteam/tmplits/actions/workflows/npm-publish-github-packages.yml)
Expand All @@ -20,3 +29,13 @@ To manual publish:
```
lpm publish
```

For more documentation and examples, see https://loupeteam.github.io/LoupeDocs/libraries/tmplitdocs.html

# Installation
To install using the Loupe Package Manager (LPM), in the main HMI application directory run `lpm install tmplits`.
If you want to install all tmplits components, in the main HMI application directory run `lpm install tmplit-basic` . For more information about LPM, see https://loupeteam.github.io/LoupeDocs/tools/lpm.html

## Licensing

This project is licensed under the [MIT License](LICENSE).
2 changes: 1 addition & 1 deletion example/AsProject/AsProject.apj
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<?AutomationStudio Version="4.12.2.93" WorkingVersion="4.12"?>
<?AutomationStudio Version="4.12.4.107 SP" WorkingVersion="4.12"?>
<Project Version="1.00.0" Edition="Standard" EditionComment="Standard" xmlns="http://br-automation.co.at/AS/Project">
<Communication />
<ANSIC DefaultIncludes="true" />
Expand Down
13 changes: 13 additions & 0 deletions example/AsProject/Logical/Diagnostics/Diagnostics.var
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
(*
* File: Diagnostics.var
* Copyright (c) 2023 Loupe
* https://loupe.team
*
* This file is part of ErrorProg, licensed under the MIT License.
*)

VAR
gErrorCollector : ErrorCollector_typ := (0);
gErrorCollectorHMI : ErrorCollector_HMI_typ := (0);
END_VAR

11 changes: 11 additions & 0 deletions example/AsProject/Logical/Diagnostics/ErrorProg/ErrorProg.typ
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
(*
* File: ErrorProg.typ
* Copyright (c) 2023 Loupe
* https://loupe.team
*
* This file is part of ErrorProg, licensed under the MIT License.
*)

TYPE

END_TYPE
8 changes: 8 additions & 0 deletions example/AsProject/Logical/Diagnostics/ErrorProg/ErrorProg.var
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
(*
* File: ErrorProg.var
* Copyright (c) 2023 Loupe
* https://loupe.team
*
* This file is part of ErrorProg, licensed under the MIT License.
*)

16 changes: 16 additions & 0 deletions example/AsProject/Logical/Diagnostics/ErrorProg/ErrorProgCyclic.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
(*
* File: ErrorProgCyclic.st
* Copyright (c) 2023 Loupe
* https://loupe.team
*
* This file is part of ErrorProg, licensed under the MIT License.
*)


PROGRAM _CYCLIC

ErrorCollectorFn_HMI_Cyclic( gErrorCollectorHMI, gErrorCollector );

ErrorCollectorFn_Cyclic( gErrorCollector );

END_PROGRAM
17 changes: 17 additions & 0 deletions example/AsProject/Logical/Diagnostics/ErrorProg/ErrorProgInit.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
(*
* File: ErrorProgInit.st
* Copyright (c) 2023 Loupe
* https://loupe.team
*
* This file is part of ErrorProg, licensed under the MIT License.
*)

PROGRAM _INIT

(* gErrorCollector is initialized in FirstInitProg - Init only if it hasn't already been *)
IF NOT gErrorCollector.Internal.Initialized THEN
ErrorCollectorFn_Init(gErrorCollector);
END_IF
(* Sources are added to gErrorCollector in the source program. *)
END_PROGRAM
10 changes: 10 additions & 0 deletions example/AsProject/Logical/Diagnostics/ErrorProg/IEC.prg
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<?AutomationStudio FileVersion="4.9"?>
<Program SubType="IEC" xmlns="http://br-automation.co.at/AS/Program">
<Files>
<File Description="Initialization code">ErrorProgInit.st</File>
<File Description="Cyclic code">ErrorProgCyclic.st</File>
<File Description="Local data types" Private="true">ErrorProg.typ</File>
<File Description="Local variables" Private="true">ErrorProg.var</File>
</Files>
</Program>
7 changes: 7 additions & 0 deletions example/AsProject/Logical/Diagnostics/Package.pkg
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<Package xmlns="http://br-automation.co.at/AS/Package">
<Objects>
<Object Type="File">Diagnostics.var</Object>
<Object Type="Program" Language="IEC">ErrorProg</Object>
</Objects>
</Package>
10 changes: 10 additions & 0 deletions example/AsProject/Logical/Infrastructure/FirstInitProg/ANSIC.prg
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<?AutomationStudio Version=4.5.5.113 SP?>
<Program SubType="ANSIC" xmlns="http://br-automation.co.at/AS/Program">
<Files>
<File Description="Initialization code">FirstInitProgInit.c</File>
<File Description="Cyclic code">FirstInitProgCyclic.c</File>
<File Description="Local data types" Private="true">FirstInitProg.typ</File>
<File Description="Local variables" Private="true">FirstInitProg.var</File>
</Files>
</Program>
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
(********************************************************************
* File: FirstInitProg.typ
* Copyright (c) 2023 Loupe
* https://loupe.team
*
* This file is part of FirstInitProg, licensed under the MIT License.
********************************************************************)

TYPE

END_TYPE
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
(********************************************************************
* File: FirstInitProg.var
* Copyright (c) 2023 Loupe
* https://loupe.team
*
* This file is part of FirstInitProg, licensed under the MIT License.
********************************************************************)
VAR CONSTANT
NUM_FILEDEVICES : USINT := 4;
MAI_FILEDEVICES : USINT := NUM_FILEDEVICES-1;
END_VAR
VAR
simCheckDevLink : DevLink := (0);
fileDeviceDevLink : ARRAY[0..MAI_FILEDEVICES] OF DevLink := [4(0)];
fileDevice : ARRAY[0..MAI_FILEDEVICES] OF STRING[20] := [4('')];
directory : ARRAY[0..MAI_FILEDEVICES] OF STRING[320] := [4('')];
parameters : ARRAY[0..MAI_FILEDEVICES] OF STRING[320] := [4('')];
i : DINT := 0;
indexString : STRING[320] := '';
axisString : STRING[320] := '';
END_VAR
VAR RETAIN
_buildDate : STRING[80];
END_VAR
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
* File: FirstInitProgCyclic.c
* Copyright (c) 2023 Loupe
* https://loupe.team
*
* This file is part of FirstInitProg, licensed under the MIT License.
*/


#include <bur/plctypes.h>

#ifdef _DEFAULT_INCLUDES
#include <AsDefault.h>
#endif


void _CYCLIC FirstInitProgCyclic(void)
{
// Set our cyclic bit to true once FirstInit cyclic runs
// This is to tell the init routine if the cyclic has ran
gTransfer.cyclic = 1;

// DO NOT ADD ANY "OTHER" CYCLIC CODE HERE! //
if( strcmp(_buildDate, buildDate) != 0 ){
gTransfer.transfer = 1;
}
}

Loading

0 comments on commit e6e8c86

Please sign in to comment.