GithubHelp home page GithubHelp logo

dcptestgenerator's Introduction

Modelica Libraries LogoModelica Libraries Logo

Modelica Standard Library

Free library from the Modelica Association to model mechanical (1D/3D), electrical (analog, digital, machines), magnetic, thermal, fluid, control systems and hierarchical state machines. Also numerical functions and functions for strings, files and streams are included.

Library description

Package Modelica is a free library that is developed together with the Modelica language from the Modelica Association. It is also called Modelica Standard Library. It provides model components and standard component interfaces from many engineering domains. Each model comes with documentation included. The generous license conditions allow usage in commercial products.

Note, the usage of a Modelica library requires a Modelica simulation environment, see the tools page, and that such an environment usually already includes the Modelica standard library. It is possible that the demo version of the commercial tools will not allow to simulate non-trivial examples from the library.

ModelicaLibraries

Current release

Modelica Standard Library v4.0.0 (2020-06-04)

Older Releases

Browse the Releases page in order to get access to older releases of the Modelica Standard Library.

License

This Modelica package is free software and the use is completely at your own risk; it can be redistributed and/or modified under the terms of the 3-Clause BSD License.

Status

CI checks CLA assistant Modelica v4.1.0-dev regression test ModelicaTest v4.1.0-dev regression test

Development and contribution

The development is organised by the Modelica Association Project - Libraries (MAP-LIB). See also the contribution guide and the MAP-LIB Project Rules for more information.

You may report any issues by using the Issue Tracker.

dcptestgenerator's People

Contributors

clemensschiffer avatar dependabot[bot] avatar gallleo avatar martinkrammer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dcptestgenerator's Issues

Build issues

In order to build this tool (in it's master branch version) you have to make some adjustments

  • Modify pom.xml adding the next block in the dependencies section
<dependency>
    <groupId>javax.xml.bind</groupId>
    <artifactId>jaxb-api</artifactId>
    <version>2.3.0</version>
</dependency>
  • Build the software using mvn package. If you are running in a 64 bit machine, the launch4j phase will probably fail. To solve this:
sudo apt-get install binutils-mingw-w64-x86-64
ln -sf /usr/bin/x86_64-w64-mingw32-ld ~/.m2/repository/com/akathist/maven/plugins/launch4j/launch4j-maven-plugin/1.5.1/launch4j-maven-plugin-1.5.1-workdir-linux/bin/ld
ln -sf /usr/bin/x86_64-w64-mingw32-windres ~/.m2/repository/com/akathist/maven/plugins/launch4j/launch4j-maven-plugin/1.5.1/launch4j-maven-plugin-1.5.1-workdir-linux/bin/windres 

The system I'm running on is

Ubuntu 18.04.2 LTS \n \l
Linux 28APO3997 4.15.0-47-generic #50-Ubuntu SMP Wed Mar 13 10:44:52 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

Wrong sequence id after starting the simulation

pdu_seq_id is reseted after sending a STC_run. This causes an error in the DCP-Slave implementation. The pdu_seq_id of DAT_input_output should be 326.

Log of the DCPTester:

2019-08-19 16:48:53 	 DEBUG 		 Pdu was send with content=type_id=STC_run pdu_seq_id=325 receiver=1 start_time=1566226134
2019-08-19 16:48:53 	 DEBUG 		 Pdu was received with content=type_id=RSP_ack sender=1 resp_seq_id=325
2019-08-19 16:48:53 	 DEBUG 		 Pdu was received with content=type_id=NTF_state_changed sender=1 state_id=SYNCHRONIZING
2019-08-19 16:48:53 	 DEBUG 		 Pdu was send with content=type_id=DAT_input_output pdu_seq_id=0 data_id=0 payload=00 00 00 00 ff ff ff ff ff ff ef ff 

xsd loading problems

After successfully building the tool you end up having the following issue

bgarciagonzalez@28APO3997:~/DCPTestGenerator/target$ ./XmlTemplateParser.exe 
run-detectors: unable to find an interpreter for ./XmlTemplateParser.exe

If you try the shaded jar the getClassLoader is not able to access its own resources

bgarciagonzalez@28APO3997:~/DCPTestGenerator$ java -jar target/PathExpander-0.0.1-SNAPSHOT-shaded.jar -dcpx pid.dcpx -UDP
org.xml.sax.SAXParseException; schema_reference.4: Failed to read schema document 'file:/home/bgarciagonzalez/DCPTestGenerator/file:/home/bgarciagonzalez/DCPTestGenerator/target/PathExpander-0.0.1-SNAPSHOT-shaded.jar!/xsd/dcpSlaveDescription.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.
	at java.xml/com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:204)

you can tweak that paths to point outside the jar but you wont get far

bgarciagonzalez@28APO3997:~/DCPTestGenerator$ java -jar target/PathExpander-0.0.1-SNAPSHOT-shaded.jar -dcpx pid.dcpx -UDP
Error while loading dcpx: javax.xml.bind.JAXBException: Implementation of JAXB-API has not been found on module path or classpath.
 - with linked exception:
[java.lang.ClassNotFoundException: com.sun.xml.internal.bind.v2.ContextFactory]

The system I'm running on is

Ubuntu 18.04.2 LTS \n \l
Linux 28APO3997 4.15.0-47-generic #50-Ubuntu SMP Wed Mar 13 10:44:52 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

error while parsing dcpx with binary data type

Seems like the tester can not handle dcpx files with binary data types.
The error message disappears if the data type is changed to string.

XmlTemplateParser.exe -dcpx Slave.dcpx --Tester.host 192.168.0.12 -UDP -out Test.xml
Slave Description was loaded.
Template loaded
Extension loaded
Generating file for : Test.xml
java.lang.Exception: Could not find Variable with ValueReference : 1
        at wrappers.DcpWrapper.getDataTypeFromVr(DcpWrapper.java:1554)
        at objectCreatorHelper.PayloadFieldCreator.createDefaultSendingPayloadField(PayloadFieldCreator.java:975)
        at objectCreatorHelper.TransitionCreator.createSendingDATInputOutput(TransitionCreator.java:6887)
        at testTransformer.TestTransformer.handleAddTransition(TestTransformer.java:1372)
        at testTransformer.TestTransformer.handleXmlNode(TestTransformer.java:629)
        at testTransformer.TestTransformer.handleForEach(TestTransformer.java:767)
        at testTransformer.TestTransformer.handleXmlNode(TestTransformer.java:657)
        at testTransformer.TestTransformer.handleIfItem(TestTransformer.java:1009)
        at testTransformer.TestTransformer.handleXmlNode(TestTransformer.java:650)
        at testTransformer.TestTransformer.handleForEach(TestTransformer.java:863)
        at testTransformer.TestTransformer.handleXmlNode(TestTransformer.java:657)
        at testTransformer.TestTransformer.generateFinalTestProcedure(TestTransformer.java:142)
        at main.Launcher.main(Launcher.java:282)
...

Wrong Test Procedure if dcpx contains string data types

Generated a test procedure with a dcpx Slave Description that contains a string input variable.
The TestGenerator sends the wrong source data type.
source_data_type should be string.

2019-07-10 16:13:52 	 DEBUG 		 Pdu was send with content=type_id=CFG_input pdu_seq_id=59 receiver=1 data_id =5 pos=0 target_vr=9 source_data_type=uint8
2019-07-10 16:13:52 	 DEBUG 		 Pdu was received with content=type_id=RSP_nack sender=1 resp_seq_id=59 exp_seq_id=60 error_code=INVALID_SOURCE_DATA_TYPE
2019-07-10 16:13:52 	 INFO 		 RSP_nack is not allowed. One of the following PDUs are allowed to receive: RSP_ack[sender=1] 

Testfile generation error if parameter is tunable

Test-File is not generated if a parameter is tunable.
Generation works if the variability is set to fixed

<Variable name="speed" valueReference="1" description="speed" variability="tunable" >
	<Parameter>
		<Float64 start="0 " />
	</Parameter>
</Variable>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.