You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@daffodil.apache.org by Christofer Dutz <ch...@c-ware.de> on 2019/01/17 14:21:51 UTC

First success with modeling the message formats for the Siemens S7 Protocol with Daffodil

Hi all,

I just wanted to report that after finishing a first version of my S7 dfdl, I pretty quickly finished the 2 underlying protocols too.

https://github.com/apache/incubator-plc4x/tree/develop/src/main/dfdl

Next I will probably start with using daffodil for parsing/serializing test-data for easy human inspection
(the XML or JSON files will be a lot easier to maintain as the PCAPNG files).

Maybe I’ll even whip up a version of the S7 protocol based entirely on daffodil so we can do a performance measurement.
However I expect to require more CPU time and memory using this path …

As soon as I’m a little more familiar with it, I guess we could start the discussion on some code-generation.

Chris


Re: First success with modeling the message formats for the Siemens S7 Protocol with Daffodil

Posted by "Beckerle, Mike" <mb...@tresys.com>.
I don't know that it has been done before, but these are standard junit tests, just implemented in scala (usually), and so things that run Junit 4 tests detected in a src/test/scala or src/test/java directory will find these and run them.

________________________________
From: Christofer Dutz <ch...@c-ware.de>
Sent: Thursday, January 17, 2019 10:25:45 AM
To: dev@daffodil.apache.org
Subject: Re: First success with modeling the message formats for the Siemens S7 Protocol with Daffodil

Thanks for both your responses :-)

As we are building with Java and Maven, I'll probably stick more to the maven defaults and project setup.
I bet there is a way to run all of these tests in Maven surefire. Has this been done before?

Chris


Am 17.01.19, 16:03 schrieb "Steve Lawrence" <sl...@apache.org>:

    To add on to that, the following can be used to generate a new dfdl
    project layout using a template:

      sbt new stevedlawrence/dfdl-project-layout.g8

    It asks a couple questions about your format, then generates a project
    with skeleton files for the schema, TDML file, and scala test file. You
    can then run:

      sbt test

    to run the tests defined in the scala/tdml file. Information about the
    TDML format is at:

      https://daffodil.apache.org/tdml

    - Steve


    On 1/17/19 9:44 AM, Beckerle, Mike wrote:
    > Very nice schema Christofer.
    >
    >
    > I recommend adding tests in TDML so as to exercise these in your ordinary unit test/regression using Daffodil.
    >
    >
    > This article:
    >
    >
    > https://daffodil.apache.org/dfdl-layout/
    >
    >
    > explains the way we do this for sbt. Minor adaptations needed for maven I'm sure.
    >
    >
    > ...mike beckerle
    >
    >
    >
    >
    >
    > ________________________________
    > From: Christofer Dutz <ch...@c-ware.de>
    > Sent: Thursday, January 17, 2019 9:21:51 AM
    > To: dev@daffodil.apache.org
    > Subject: First success with modeling the message formats for the Siemens S7 Protocol with Daffodil
    >
    > Hi all,
    >
    > I just wanted to report that after finishing a first version of my S7 dfdl, I pretty quickly finished the 2 underlying protocols too.
    >
    > https://github.com/apache/incubator-plc4x/tree/develop/src/main/dfdl
    >
    > Next I will probably start with using daffodil for parsing/serializing test-data for easy human inspection
    > (the XML or JSON files will be a lot easier to maintain as the PCAPNG files).
    >
    > Maybe I’ll even whip up a version of the S7 protocol based entirely on daffodil so we can do a performance measurement.
    > However I expect to require more CPU time and memory using this path …
    >
    > As soon as I’m a little more familiar with it, I guess we could start the discussion on some code-generation.
    >
    > Chris
    >
    >




Re: First success with modeling the message formats for the Siemens S7 Protocol with Daffodil

Posted by Christofer Dutz <ch...@c-ware.de>.
Thanks for both your responses :-)

As we are building with Java and Maven, I'll probably stick more to the maven defaults and project setup.
I bet there is a way to run all of these tests in Maven surefire. Has this been done before?

Chris


Am 17.01.19, 16:03 schrieb "Steve Lawrence" <sl...@apache.org>:

    To add on to that, the following can be used to generate a new dfdl
    project layout using a template:
    
      sbt new stevedlawrence/dfdl-project-layout.g8
    
    It asks a couple questions about your format, then generates a project
    with skeleton files for the schema, TDML file, and scala test file. You
    can then run:
    
      sbt test
    
    to run the tests defined in the scala/tdml file. Information about the
    TDML format is at:
    
      https://daffodil.apache.org/tdml
    
    - Steve
    
    
    On 1/17/19 9:44 AM, Beckerle, Mike wrote:
    > Very nice schema Christofer.
    > 
    > 
    > I recommend adding tests in TDML so as to exercise these in your ordinary unit test/regression using Daffodil.
    > 
    > 
    > This article:
    > 
    > 
    > https://daffodil.apache.org/dfdl-layout/
    > 
    > 
    > explains the way we do this for sbt. Minor adaptations needed for maven I'm sure.
    > 
    > 
    > ...mike beckerle
    > 
    > 
    > 
    > 
    > 
    > ________________________________
    > From: Christofer Dutz <ch...@c-ware.de>
    > Sent: Thursday, January 17, 2019 9:21:51 AM
    > To: dev@daffodil.apache.org
    > Subject: First success with modeling the message formats for the Siemens S7 Protocol with Daffodil
    > 
    > Hi all,
    > 
    > I just wanted to report that after finishing a first version of my S7 dfdl, I pretty quickly finished the 2 underlying protocols too.
    > 
    > https://github.com/apache/incubator-plc4x/tree/develop/src/main/dfdl
    > 
    > Next I will probably start with using daffodil for parsing/serializing test-data for easy human inspection
    > (the XML or JSON files will be a lot easier to maintain as the PCAPNG files).
    > 
    > Maybe I’ll even whip up a version of the S7 protocol based entirely on daffodil so we can do a performance measurement.
    > However I expect to require more CPU time and memory using this path …
    > 
    > As soon as I’m a little more familiar with it, I guess we could start the discussion on some code-generation.
    > 
    > Chris
    > 
    > 
    
    


Re: First success with modeling the message formats for the Siemens S7 Protocol with Daffodil

Posted by Steve Lawrence <sl...@apache.org>.
To add on to that, the following can be used to generate a new dfdl
project layout using a template:

  sbt new stevedlawrence/dfdl-project-layout.g8

It asks a couple questions about your format, then generates a project
with skeleton files for the schema, TDML file, and scala test file. You
can then run:

  sbt test

to run the tests defined in the scala/tdml file. Information about the
TDML format is at:

  https://daffodil.apache.org/tdml

- Steve


On 1/17/19 9:44 AM, Beckerle, Mike wrote:
> Very nice schema Christofer.
> 
> 
> I recommend adding tests in TDML so as to exercise these in your ordinary unit test/regression using Daffodil.
> 
> 
> This article:
> 
> 
> https://daffodil.apache.org/dfdl-layout/
> 
> 
> explains the way we do this for sbt. Minor adaptations needed for maven I'm sure.
> 
> 
> ...mike beckerle
> 
> 
> 
> 
> 
> ________________________________
> From: Christofer Dutz <ch...@c-ware.de>
> Sent: Thursday, January 17, 2019 9:21:51 AM
> To: dev@daffodil.apache.org
> Subject: First success with modeling the message formats for the Siemens S7 Protocol with Daffodil
> 
> Hi all,
> 
> I just wanted to report that after finishing a first version of my S7 dfdl, I pretty quickly finished the 2 underlying protocols too.
> 
> https://github.com/apache/incubator-plc4x/tree/develop/src/main/dfdl
> 
> Next I will probably start with using daffodil for parsing/serializing test-data for easy human inspection
> (the XML or JSON files will be a lot easier to maintain as the PCAPNG files).
> 
> Maybe I’ll even whip up a version of the S7 protocol based entirely on daffodil so we can do a performance measurement.
> However I expect to require more CPU time and memory using this path …
> 
> As soon as I’m a little more familiar with it, I guess we could start the discussion on some code-generation.
> 
> Chris
> 
> 


Re: First success with modeling the message formats for the Siemens S7 Protocol with Daffodil

Posted by "Beckerle, Mike" <mb...@tresys.com>.
Very nice schema Christofer.


I recommend adding tests in TDML so as to exercise these in your ordinary unit test/regression using Daffodil.


This article:


https://daffodil.apache.org/dfdl-layout/


explains the way we do this for sbt. Minor adaptations needed for maven I'm sure.


...mike beckerle





________________________________
From: Christofer Dutz <ch...@c-ware.de>
Sent: Thursday, January 17, 2019 9:21:51 AM
To: dev@daffodil.apache.org
Subject: First success with modeling the message formats for the Siemens S7 Protocol with Daffodil

Hi all,

I just wanted to report that after finishing a first version of my S7 dfdl, I pretty quickly finished the 2 underlying protocols too.

https://github.com/apache/incubator-plc4x/tree/develop/src/main/dfdl

Next I will probably start with using daffodil for parsing/serializing test-data for easy human inspection
(the XML or JSON files will be a lot easier to maintain as the PCAPNG files).

Maybe I’ll even whip up a version of the S7 protocol based entirely on daffodil so we can do a performance measurement.
However I expect to require more CPU time and memory using this path …

As soon as I’m a little more familiar with it, I guess we could start the discussion on some code-generation.

Chris