Skip to content

Commit

Permalink
correct line endings
Browse files Browse the repository at this point in the history
  • Loading branch information
KarlWalther committed Dec 15, 2024
1 parent 93e6640 commit 90ff8dc
Show file tree
Hide file tree
Showing 8 changed files with 1,130 additions and 1,125 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cxf_check.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
# Workflow for CI testsname: CI-check_modelica-json_translator# Controls when the action will run.on: # Triggers the workflow on push events but only for the master branch push: branches: [ add_CI_workflow ]# Allows you to run this workflow manually from the Actions tab# workflow_dispatch:defaults: run: shell: bash# A workflow run is made up of one or more jobs that can run sequentially or in paralleljobs: test-modelica-json: # Skip if the commit message contains "ci skip" #if: "!contains(github.event.head_commit.message, 'ci skip')" runs-on: ubuntu-22.04 steps: # Checks-out repository under $GITHUB_WORKSPACE, so job can access it - name: Checkout code uses: actions/checkout@v3 - uses: actions/setup-python@v4 with: python-version: '3.10.11' # Version range or exact version of a Python version to use, using SemVer's version range syntax architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified - name: "Install pip" run: pip3 install --upgrade pip wheel - name: Download modelica-json-1.2.0.zip run: wget https://github.com/lbl-srg/modelica-json/releases/download/v1.2.0/modelica-json-1.2.0.zip -O modelica-json-1.2.0.zip - name: Unzip modelica-json-1.2.0.zip run: unzip modelica-json-1.2.0.zip -d modelica-json - name: Display folder structure run: tree - name: Set MODELICAPATH environment variable run: echo "export MODELICAPATH=\${MODELICAPATH}:/usr/local/Modelica/Library/" >> ~/.bashrc - name: Install Java dependencies run: sudo apt-get update && sudo apt-get install -y default-jdk default-jre - name: Install parser dependencies run: | cd modelica-json/modelica-json-1.2.0 make install - name: Compile Java files run: | cd modelica-json/modelica-json-1.2.0 make compile #- name: Run test cases # run: | # cd modelica-json/modelica-json-1.2.0 # npm test - name: Translate Modelica test cases to jsonld run: | cd modelica-json/modelica-json-1.2.0 node app.js -f ../../ModelicaTestCases/CompositeBlocks/CustomPWithLimiter.mo -o cxf node app.js -f ../../ModelicaTestCases/CompositeBlocks/Custom01.mo -o cxf node app.js -f ../../ModelicaTestCases/CompositeBlocks/Custom02.mo -o cxf node app.js -f ../../ModelicaTestCases/CompositeBlocks/Custom03.mo -o cxf node app.js -f ../../ModelicaTestCases/SingleBlocks/Reals/Add.mo -o cxf node app.js -f ../../ModelicaTestCases/SingleBlocks/Reals/MultiplyByParameter.mo -o cxf - name: Compare changes between existing and new jsonld's run: | diff -r modelica-json/modelica-json-1.2.0/cxf/home/runner/work/cdl-plc/cdl-plc/ModelicaTestCases/ cxf/ModelicaTestCases/ - name: Run translate_test_cases.py run: | pip install Jinja2 cd .CI/tests python translate_test_cases.py - name: Display folder structure run: tree - name: Compare changes between existing and new IEC XML's run: | file IEC61131-10XML/MultiplyByParameter/plc.xml file check_translation_to_IEC_XML/IEC61131-10XML/MultiplyByParameter/plc.xml# diff -r --exclude="README.md" IEC61131-10XML/ check_translation_to_IEC_XML/IEC61131-10XML/
# Workflow for CI testsname: CI-check_modelica-json_translator# Controls when the action will run.on: # Triggers the workflow on push events but only for the master branch push: branches: [ add_CI_workflow ]# Allows you to run this workflow manually from the Actions tab# workflow_dispatch:defaults: run: shell: bash# A workflow run is made up of one or more jobs that can run sequentially or in paralleljobs: test-modelica-json: # Skip if the commit message contains "ci skip" #if: "!contains(github.event.head_commit.message, 'ci skip')" runs-on: ubuntu-22.04 steps: # Checks-out repository under $GITHUB_WORKSPACE, so job can access it - name: Checkout code uses: actions/checkout@v3 - uses: actions/setup-python@v4 with: python-version: '3.10.11' # Version range or exact version of a Python version to use, using SemVer's version range syntax architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified - name: "Install pip" run: pip3 install --upgrade pip wheel - name: Download modelica-json-1.2.0.zip run: wget https://github.com/lbl-srg/modelica-json/releases/download/v1.2.0/modelica-json-1.2.0.zip -O modelica-json-1.2.0.zip - name: Unzip modelica-json-1.2.0.zip run: unzip modelica-json-1.2.0.zip -d modelica-json - name: Display folder structure run: tree - name: Set MODELICAPATH environment variable run: echo "export MODELICAPATH=\${MODELICAPATH}:/usr/local/Modelica/Library/" >> ~/.bashrc - name: Install Java dependencies run: sudo apt-get update && sudo apt-get install -y default-jdk default-jre - name: Install parser dependencies run: | cd modelica-json/modelica-json-1.2.0 make install - name: Compile Java files run: | cd modelica-json/modelica-json-1.2.0 make compile #- name: Run test cases # run: | # cd modelica-json/modelica-json-1.2.0 # npm test - name: Translate Modelica test cases to jsonld run: | cd modelica-json/modelica-json-1.2.0 node app.js -f ../../ModelicaTestCases/CompositeBlocks/CustomPWithLimiter.mo -o cxf node app.js -f ../../ModelicaTestCases/CompositeBlocks/Custom01.mo -o cxf node app.js -f ../../ModelicaTestCases/CompositeBlocks/Custom02.mo -o cxf node app.js -f ../../ModelicaTestCases/CompositeBlocks/Custom03.mo -o cxf node app.js -f ../../ModelicaTestCases/SingleBlocks/Reals/Add.mo -o cxf node app.js -f ../../ModelicaTestCases/SingleBlocks/Reals/MultiplyByParameter.mo -o cxf - name: Compare changes between existing and new jsonld's run: | diff -r modelica-json/modelica-json-1.2.0/cxf/home/runner/work/cdl-plc/cdl-plc/ModelicaTestCases/ cxf/ModelicaTestCases/ - name: Run translate_test_cases.py run: | pip install Jinja2 cd .CI/tests python translate_test_cases.py - name: Display folder structure run: tree - name: Compare changes between existing and new IEC XML's run: | file IEC61131-10XML/MultiplyByParameter/plc.xml file check_translation_to_IEC_XML/IEC61131-10XML/MultiplyByParameter/plc.xml diff -r --exclude="README.md" IEC61131-10XML/ check_translation_to_IEC_XML/IEC61131-10XML/
Expand Down
216 changes: 108 additions & 108 deletions IEC61131-10XML/Add/plc.xml
Original file line number Diff line number Diff line change
@@ -1,108 +1,108 @@
<?xml version="1.0" ?>
<project xmlns="http://www.plcopen.org/xml/tc6_0201" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:ns1="http://www.plcopen.org/xml/tc6_0201">
<fileHeader companyName="Unknown" productName="Unnamed" productVersion="1" creationDateTime="2024-01-09T16:45:07"/>
<contentHeader name="Unnamed" modificationDateTime="2024-01-23T14:31:54">
<coordinateInfo>
<fbd>
<scaling x="0" y="0"/>
</fbd>
<ld>
<scaling x="0" y="0"/>
</ld>
<sfc>
<scaling x="0" y="0"/>
</sfc>
</coordinateInfo>
</contentHeader>
<types>
<dataTypes/>
<pous>
<pou name="Add" pouType="program">
<interface>
<inputVars>
<variable name="u1">
<type>
<REAL/>
</type>
</variable>
<variable name="u2">
<type>
<REAL/>
</type>
</variable>
</inputVars>
<outputVars>
<variable name="y1">
<type>
<REAL/>
</type>
</variable>
</outputVars>
<localVars/>
</interface>
<body>
<FBD>
<inVariable localId="2" executionOrderId="0" width="10" height="10" negated="false">
<position x="0" y="0"/>
<connectionPointOut>
<relPosition x="42" y="13"/>
</connectionPointOut>
<expression>u1</expression>
</inVariable>
<inVariable localId="3" executionOrderId="0" width="10" height="10" negated="false">
<position x="0" y="80"/>
<connectionPointOut>
<relPosition x="42" y="13"/>
</connectionPointOut>
<expression>u2</expression>
</inVariable>
<block localId="1" typeName="ADD" executionOrderId="0" width="20" height="20">
<position x="792" y="60"/>
<inputVariables>
<variable formalParameter="IN1">
<connectionPointIn>
<relPosition x="0" y="40"/>
<connection refLocalId="2"/>
</connectionPointIn>
</variable>
<variable formalParameter="IN2">
<connectionPointIn>
<relPosition x="0" y="40"/>
<connection refLocalId="3"/>
</connectionPointIn>
</variable>
</inputVariables>
<inOutVariables/>
<outputVariables>
<variable formalParameter="OUT">
<connectionPointOut>
<relPosition x="74" y="30"/>
</connectionPointOut>
</variable>
</outputVariables>
</block>
<outVariable localId="4" executionOrderId="0" width="10" height="10" negated="false">
<position x="1440" y="40"/>
<connectionPointIn>
<relPosition x="0" y="22"/>
<connection refLocalId="1" formalParameter="OUT"/>
</connectionPointIn>
<expression>y1</expression>
</outVariable>
</FBD>
</body>
</pou>
</pous>
</types>
<instances>
<configurations>
<configuration name="config">
<resource name="resource1">
<task name="task0" priority="0" interval="T#20ms">
<pouInstance name="instance0" typeName="Add"/>
</task>
</resource>
</configuration>
</configurations>
</instances>
</project>
<?xml version="1.0" ?>
<project xmlns="http://www.plcopen.org/xml/tc6_0201" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:ns1="http://www.plcopen.org/xml/tc6_0201">
<fileHeader companyName="Unknown" productName="Unnamed" productVersion="1" creationDateTime="2024-01-09T16:45:07"/>
<contentHeader name="Unnamed" modificationDateTime="2024-01-23T14:31:54">
<coordinateInfo>
<fbd>
<scaling x="0" y="0"/>
</fbd>
<ld>
<scaling x="0" y="0"/>
</ld>
<sfc>
<scaling x="0" y="0"/>
</sfc>
</coordinateInfo>
</contentHeader>
<types>
<dataTypes/>
<pous>
<pou name="Add" pouType="program">
<interface>
<inputVars>
<variable name="u1">
<type>
<REAL/>
</type>
</variable>
<variable name="u2">
<type>
<REAL/>
</type>
</variable>
</inputVars>
<outputVars>
<variable name="y1">
<type>
<REAL/>
</type>
</variable>
</outputVars>
<localVars/>
</interface>
<body>
<FBD>
<inVariable localId="2" executionOrderId="0" width="10" height="10" negated="false">
<position x="0" y="0"/>
<connectionPointOut>
<relPosition x="42" y="13"/>
</connectionPointOut>
<expression>u1</expression>
</inVariable>
<inVariable localId="3" executionOrderId="0" width="10" height="10" negated="false">
<position x="0" y="80"/>
<connectionPointOut>
<relPosition x="42" y="13"/>
</connectionPointOut>
<expression>u2</expression>
</inVariable>
<block localId="1" typeName="ADD" executionOrderId="0" width="20" height="20">
<position x="792" y="60"/>
<inputVariables>
<variable formalParameter="IN1">
<connectionPointIn>
<relPosition x="0" y="40"/>
<connection refLocalId="2"/>
</connectionPointIn>
</variable>
<variable formalParameter="IN2">
<connectionPointIn>
<relPosition x="0" y="40"/>
<connection refLocalId="3"/>
</connectionPointIn>
</variable>
</inputVariables>
<inOutVariables/>
<outputVariables>
<variable formalParameter="OUT">
<connectionPointOut>
<relPosition x="74" y="30"/>
</connectionPointOut>
</variable>
</outputVariables>
</block>
<outVariable localId="4" executionOrderId="0" width="10" height="10" negated="false">
<position x="1440" y="40"/>
<connectionPointIn>
<relPosition x="0" y="22"/>
<connection refLocalId="1" formalParameter="OUT"/>
</connectionPointIn>
<expression>y1</expression>
</outVariable>
</FBD>
</body>
</pou>
</pous>
</types>
<instances>
<configurations>
<configuration name="config">
<resource name="resource1">
<task name="task0" priority="0" interval="T#20ms">
<pouInstance name="instance0" typeName="Add"/>
</task>
</resource>
</configuration>
</configurations>
</instances>
</project>
Loading

0 comments on commit 90ff8dc

Please sign in to comment.