[GitHub] [plc4x-build-tools] splatch opened a new pull request #3: [WIP] PLC4X-193 Support for little endian types in build tools.

2020-04-10 Thread GitBox
splatch opened a new pull request #3: [WIP] PLC4X-193 Support for little endian 
types in build tools.
URL: https://github.com/apache/plc4x-build-tools/pull/3
 
 
   This is work in progress.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[jira] [Created] (PLC4X-193) Provide option to host little endian fields in mspec

2020-04-10 Thread Jira
Łukasz Dywicki created PLC4X-193:


 Summary: Provide option to host little endian fields in mspec
 Key: PLC4X-193
 URL: https://issues.apache.org/jira/browse/PLC4X-193
 Project: Apache PLC4X
  Issue Type: Sub-task
  Components: Generation-Framework
Affects Versions: 0.7.0
Reporter: Łukasz Dywicki


Some fields might be encoded differently depending on protocol - this applies 
to numbers but also byte sequences.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


Re: Big and littleendian fields in one mspec

2020-04-10 Thread Łukasz Dywicki
I've made some progress with topic by modyfing mspec and allowing
'little endian' flag on fields. This moved me further to next issue -
which is whole type encoded little endian.

In ADS driver such type is State, which has 2 bytes and uses 8 bits for
various flags.
There are two cases which require different approach - reading and
writing. So for reading we need to swap N bytes based on type length.
For writing we need to alocate buffer for N bytes and swap them before
writing.

I am stuck now with freemaker templates and bit-io.

Cheers,
Łukasz



On 10.04.2020 17:57, Łukasz Dywicki wrote:
> I am doing some tests of ADS serialization.
> 
> I've run into some troubles with payload which is generated with new
> driver. I'm not sure if that's my fault or generated code.
> 
> I did a verification of what Wireshark shows and how ads structures are
> parsed. There is a gap I think. For example ams port number 1000
> (0x1027) is read as 4135.
> 
> Obviously I used wrong structures while implementing protocol logic in
> first place, but now I am uncertain of how fields are encoded. How we
> mark field as little endian when rest of payload is big endian? Do we
> have `uint_le`?
> 
> As far I remember route creation logic I was tracking last week used
> combination of LE and BE.
> 
> Best regards,
> Łukasz
> 


Big and littleendian fields in one mspec

2020-04-10 Thread Łukasz Dywicki
I am doing some tests of ADS serialization.

I've run into some troubles with payload which is generated with new
driver. I'm not sure if that's my fault or generated code.

I did a verification of what Wireshark shows and how ads structures are
parsed. There is a gap I think. For example ams port number 1000
(0x1027) is read as 4135.

Obviously I used wrong structures while implementing protocol logic in
first place, but now I am uncertain of how fields are encoded. How we
mark field as little endian when rest of payload is big endian? Do we
have `uint_le`?

As far I remember route creation logic I was tracking last week used
combination of LE and BE.

Best regards,
Łukasz


[jira] [Created] (PLC4X-191) Port ADS driver logic to generated driver

2020-04-10 Thread Jira
Łukasz Dywicki created PLC4X-191:


 Summary: Port ADS driver logic to generated driver
 Key: PLC4X-191
 URL: https://issues.apache.org/jira/browse/PLC4X-191
 Project: Apache PLC4X
  Issue Type: Improvement
  Components: Driver-ADS
Affects Versions: 0.7.0
Reporter: Łukasz Dywicki


While we have {{mspec}} describing frames necessary protocol logic and 
surrounding handling logic is currently missing.

This issue is created to track progress on support for ADS in new fashion.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)