Skip to content

Commit

Permalink
Merge branch 'feature/oss-release'
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewMusser committed Nov 10, 2023
2 parents de90c0d + b8f3a9d commit d8f55fb
Show file tree
Hide file tree
Showing 501 changed files with 125,612 additions and 97 deletions.
10 changes: 8 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
library "jenkinsLibrary@master"

library "jenkinsLibrary@develop"

buildPublishPipeline(
slackChannel: "sandbox-github"
slackChannel: "sandbox-github",
asProjectRepo: "vartools",
asProjectVersion: "main",
asProjectPath: "example/AsProject",
skipLpmInstall: true,
packagesToPublish: ['src/Ar/vartools']
)
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.
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Info
Library is provided by Loupe
https://loupe.team
[email protected]
1-800-240-7042

# Description
Helper library for getting and setting variable values. To use the functions within this library the variables must be declared in a .var file as opposed to inline.

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

# Installation
To install using the Loupe Package Manager (LPM), in an initialized Automation Studio project directory run `lpm install vartools`. For more information about LPM, see https://loupeteam.github.io/LoupeDocs/tools/lpm.html

## Licensing

This project is licensed under the [MIT License](LICENSE).
13 changes: 13 additions & 0 deletions example/AsProject/AsProject.apj
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<?AutomationStudio Version="4.11.5.46 SP" WorkingVersion="4.11"?>
<Project Description="Starter Automation Studio project." Version="1.00.0" Edition="Standard" EditionComment="Standard" xmlns="http://br-automation.co.at/AS/Project">
<Communication />
<ANSIC DefaultIncludes="true" />
<IEC ExtendedConstants="true" IecExtendedComments="true" KeywordsAsStructureMembers="false" NamingConventions="true" Pointers="true" Preprocessor="false" />
<Motion RestartAcoposParameter="true" RestartInitParameter="true" />
<Project StoreRuntimeInProject="false" />
<Variables DefaultInitValue="0" DefaultRetain="false" DefaultVolatile="true" />
<TechnologyPackages>
<Acp10Arnc0 Version="5.15.1" />
</TechnologyPackages>
</Project>
4 changes: 4 additions & 0 deletions example/AsProject/Logical/Global.typ
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

TYPE

END_TYPE
8 changes: 8 additions & 0 deletions example/AsProject/Logical/Global.var
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

VAR

END_VAR

VAR CONSTANT

END_VAR
7 changes: 7 additions & 0 deletions example/AsProject/Logical/Libraries/Loupe/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="Library" Language="ANSIC" Reference="true">..\..\src\Ar\vartools\ANSIC.lby</Object>
<Object Type="Library" Language="Binary">stringext</Object>
</Objects>
</Package>
14 changes: 14 additions & 0 deletions example/AsProject/Logical/Libraries/Loupe/stringext/Binary.lby
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version='1.0' encoding='utf-8'?>
<Library xmlns="http://br-automation.co.at/AS/Library" Version="0.14.4" SubType="Binary">
<Files>
<File Description="Exported data types">StringExt.typ</File>
<File Description="Exported constants">StringExt.var</File>
<File Description="Exported functions and function blocks">StringExt.fun</File>
<File Type="File">CHANGELOG.md</File>
</Files>
<Dependencies>
<Dependency ObjectName="astime" />
<Dependency ObjectName="AsBrStr" />
<Dependency ObjectName="AsBrWStr" />
</Dependencies>
</Library>
19 changes: 19 additions & 0 deletions example/AsProject/Logical/Libraries/Loupe/stringext/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
0.14.4 - Fix bug in SplitFileName()
0.14.3 - Add support for strptime in GCC6
0.14.2 - Add stringpTime() and stringfTime()
0.14.1 - Add formatString()
0.14.0 - Critical fix to work with BR library AsIecCon
0.13.0 - Add supporting functions for wstrings *Use v0.14.0 instead*
0.12.1 - Add stringlcpy() and stringlcat()
0.12 - Add GenerateTimestampMS_1() - YYYYMMDD_HHMMSS_SSS
0.11 - Add SplitFileName()
0.10 - Add GenerateTimestampMS()
0.9 - HexStringToDINT
0.8 - Move from AsString to AsBrStr to fix header clashes with stdlib
0.7 - Add appendArrayIndex()
0.6 - Fix bugs in ToUpper() and ToLower()
0.5 - Add Timestamp_TO_DT()
0.4 - Add ToUpper() and ToLower()
0.3 - Add strncat4()
0.2 - Add GenerateTimestamp()
0.1 - First version, includes lstrip(), rstrip(), atoui(), uitoa(), ByteToHexString()
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
/* Automation Studio generated header file */
/* Do not edit ! */
/* stringext 0.14.4 */

#ifndef _STRINGEXT_
#define _STRINGEXT_
#ifdef __cplusplus
extern "C"
{
#endif
#ifndef _stringext_VERSION
#define _stringext_VERSION 0.14.4
#endif

#include <bur/plctypes.h>

#ifndef _BUR_PUBLIC
#define _BUR_PUBLIC
#endif
#ifdef _SG3
#include "AsBrStr.h"
#include "astime.h"
#include "AsBrWStr.h"
#endif
#ifdef _SG4
#include "AsBrStr.h"
#include "astime.h"
#include "AsBrWStr.h"
#endif
#ifdef _SGC
#include "AsBrStr.h"
#include "astime.h"
#include "AsBrWStr.h"
#endif


/* Constants */
#ifdef _REPLACE_CONST
#define STREXT_INVALID_CHAR 221U
#define STREXT_MAX_UDINT 4294967295U
#else
_GLOBAL_CONST unsigned char STREXT_INVALID_CHAR;
_GLOBAL_CONST unsigned long STREXT_MAX_UDINT;
#endif




/* Datatypes and datatypes of function blocks */
typedef enum STREXT_ERR_enum
{ STREXT_ERR_INVALID_INPUT = -1
} STREXT_ERR_enum;

typedef struct StrExtArgs_typ
{ float r[5];
unsigned long s[5];
plcbit b[5];
signed long i[5];
} StrExtArgs_typ;



/* Prototyping of functions and function blocks */
_BUR_PUBLIC unsigned long lstrip(unsigned long pString, unsigned long pChars);
_BUR_PUBLIC unsigned long rstrip(unsigned long pString, unsigned long pChars);
_BUR_PUBLIC unsigned long atoui(unsigned long pString);
_BUR_PUBLIC unsigned long uitoa(unsigned long Value, unsigned long pString);
_BUR_PUBLIC unsigned long ByteToHexString(unsigned long pByte, unsigned long NumBytes, unsigned long pString);
_BUR_PUBLIC signed long HexStringToDINT(unsigned long pHexStr);
_BUR_PUBLIC unsigned short GenerateTimestampMS_1(unsigned long pDTStructure, unsigned long pTimestamp, unsigned long TimestampLength);
_BUR_PUBLIC unsigned short GenerateTimestampMS(unsigned long pDTStructure, unsigned long pTimestamp, unsigned long TimestampLength);
_BUR_PUBLIC unsigned short GenerateTimestamp(plcdt DT1, unsigned long pTimestamp, unsigned long TimestampLength);
_BUR_PUBLIC unsigned short strncat4(unsigned long pDest, unsigned long pSource1, unsigned long pSource2, unsigned long pSource3, unsigned long pSource4, unsigned long MaxLength);
_BUR_PUBLIC unsigned long ToUpper(unsigned long pString);
_BUR_PUBLIC unsigned long ToLower(unsigned long pString);
_BUR_PUBLIC plcdt Timestamp_TO_DT(unsigned long pDT, unsigned long pTimestamp);
_BUR_PUBLIC unsigned long appendArrayIndex(unsigned long Value, unsigned long pString);
_BUR_PUBLIC unsigned long SplitFileName(unsigned long pFileName, unsigned long pName, unsigned long pExtension);
_BUR_PUBLIC unsigned long stringlcpy(unsigned long pDest, unsigned long pSrc, unsigned long dSize);
_BUR_PUBLIC unsigned long stringlcat(unsigned long pDest, unsigned long pSrc, unsigned long dSize);
_BUR_PUBLIC unsigned long string2wstring(unsigned long pDest, unsigned long pSrc, unsigned long dSize);
_BUR_PUBLIC unsigned long wstring2string(unsigned long pDest, unsigned long pSrc, unsigned long dSize);
_BUR_PUBLIC unsigned short char2wchar(unsigned char character);
_BUR_PUBLIC unsigned char wchar2char(unsigned short wcharacter);
_BUR_PUBLIC signed long formatString(plcstring* dest, unsigned long destSize, plcstring* format, struct StrExtArgs_typ* pArgs);
_BUR_PUBLIC unsigned long stringfTime(unsigned long dest, unsigned long destSize, unsigned long format, plcdt time);
_BUR_PUBLIC plcdt stringpTime(unsigned long src, unsigned long format);


#ifdef __cplusplus
};
#endif
#endif /* _STRINGEXT_ */

Expand Down
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
/* Automation Studio generated header file */
/* Do not edit ! */
/* stringext 0.14.4 */

#ifndef _STRINGEXT_
#define _STRINGEXT_
#ifdef __cplusplus
extern "C"
{
#endif
#ifndef _stringext_VERSION
#define _stringext_VERSION 0.14.4
#endif

#include <bur/plctypes.h>

#ifndef _BUR_PUBLIC
#define _BUR_PUBLIC
#endif
#ifdef _SG3
#include "AsBrStr.h"
#include "astime.h"
#include "AsBrWStr.h"
#endif
#ifdef _SG4
#include "AsBrStr.h"
#include "astime.h"
#include "AsBrWStr.h"
#endif
#ifdef _SGC
#include "AsBrStr.h"
#include "astime.h"
#include "AsBrWStr.h"
#endif


/* Constants */
#ifdef _REPLACE_CONST
#define STREXT_INVALID_CHAR 221U
#define STREXT_MAX_UDINT 4294967295U
#else
_GLOBAL_CONST unsigned char STREXT_INVALID_CHAR;
_GLOBAL_CONST unsigned long STREXT_MAX_UDINT;
#endif




/* Datatypes and datatypes of function blocks */
typedef enum STREXT_ERR_enum
{ STREXT_ERR_INVALID_INPUT = -1
} STREXT_ERR_enum;

typedef struct StrExtArgs_typ
{ float r[5];
unsigned long s[5];
plcbit b[5];
signed long i[5];
} StrExtArgs_typ;



/* Prototyping of functions and function blocks */
_BUR_PUBLIC unsigned long lstrip(unsigned long pString, unsigned long pChars);
_BUR_PUBLIC unsigned long rstrip(unsigned long pString, unsigned long pChars);
_BUR_PUBLIC unsigned long atoui(unsigned long pString);
_BUR_PUBLIC unsigned long uitoa(unsigned long Value, unsigned long pString);
_BUR_PUBLIC unsigned long ByteToHexString(unsigned long pByte, unsigned long NumBytes, unsigned long pString);
_BUR_PUBLIC signed long HexStringToDINT(unsigned long pHexStr);
_BUR_PUBLIC unsigned short GenerateTimestampMS_1(unsigned long pDTStructure, unsigned long pTimestamp, unsigned long TimestampLength);
_BUR_PUBLIC unsigned short GenerateTimestampMS(unsigned long pDTStructure, unsigned long pTimestamp, unsigned long TimestampLength);
_BUR_PUBLIC unsigned short GenerateTimestamp(plcdt DT1, unsigned long pTimestamp, unsigned long TimestampLength);
_BUR_PUBLIC unsigned short strncat4(unsigned long pDest, unsigned long pSource1, unsigned long pSource2, unsigned long pSource3, unsigned long pSource4, unsigned long MaxLength);
_BUR_PUBLIC unsigned long ToUpper(unsigned long pString);
_BUR_PUBLIC unsigned long ToLower(unsigned long pString);
_BUR_PUBLIC plcdt Timestamp_TO_DT(unsigned long pDT, unsigned long pTimestamp);
_BUR_PUBLIC unsigned long appendArrayIndex(unsigned long Value, unsigned long pString);
_BUR_PUBLIC unsigned long SplitFileName(unsigned long pFileName, unsigned long pName, unsigned long pExtension);
_BUR_PUBLIC unsigned long stringlcpy(unsigned long pDest, unsigned long pSrc, unsigned long dSize);
_BUR_PUBLIC unsigned long stringlcat(unsigned long pDest, unsigned long pSrc, unsigned long dSize);
_BUR_PUBLIC unsigned long string2wstring(unsigned long pDest, unsigned long pSrc, unsigned long dSize);
_BUR_PUBLIC unsigned long wstring2string(unsigned long pDest, unsigned long pSrc, unsigned long dSize);
_BUR_PUBLIC unsigned short char2wchar(unsigned char character);
_BUR_PUBLIC unsigned char wchar2char(unsigned short wcharacter);
_BUR_PUBLIC signed long formatString(plcstring* dest, unsigned long destSize, plcstring* format, struct StrExtArgs_typ* pArgs);
_BUR_PUBLIC unsigned long stringfTime(unsigned long dest, unsigned long destSize, unsigned long format, plcdt time);
_BUR_PUBLIC plcdt stringpTime(unsigned long src, unsigned long format);


#ifdef __cplusplus
};
#endif
#endif /* _STRINGEXT_ */

Expand Down
Loading

0 comments on commit d8f55fb

Please sign in to comment.