forked from S7NetPlus/s7netplus
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request S7NetPlus#191 from admo/issue190_nested_classes
Fix for Addresses are not aligned in case of custom type in class
- Loading branch information
Showing
8 changed files
with
183 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace S7.Net.UnitTest.Helpers | ||
{ | ||
class TestClassInnerWithBool | ||
{ | ||
public bool BitVariable00 { get; set; } | ||
} | ||
|
||
class TestClassInnerWithByte | ||
{ | ||
public byte ByteVariable00 { get; set; } | ||
} | ||
|
||
class TestClassInnerWithShort | ||
{ | ||
public short ShortVarialbe00 { get; set; } | ||
} | ||
|
||
class TestClassWithNestedClass | ||
{ | ||
/// <summary> | ||
/// DB1.DBX0.0 | ||
/// </summary> | ||
public bool BitVariable00 { get; set; } | ||
|
||
/// <summary> | ||
/// DB1.DBX0.1 | ||
/// </summary> | ||
public TestClassInnerWithBool BitVariable01 { get; set; } = new TestClassInnerWithBool(); | ||
|
||
/// <summary> | ||
/// DB1.DBB1.0 | ||
/// </summary> | ||
public TestClassInnerWithByte ByteVariable02 { get; set; } = new TestClassInnerWithByte(); | ||
|
||
/// <summary> | ||
/// DB1.DBX2.0 | ||
/// </summary> | ||
public bool BitVariable03 { get; set; } | ||
|
||
/// <summary> | ||
/// DB1.DBW4 | ||
/// </summary> | ||
public TestClassInnerWithShort ShortVariable04 { get; set; } = new TestClassInnerWithShort(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.