Tsap.cs 1.1 KB

12345678910111213141516171819202122232425262728293031
  1. namespace S7.Net.Protocol
  2. {
  3. /// <summary>
  4. /// Provides a representation of the Transport Service Access Point, or TSAP in short. TSAP's are used
  5. /// to specify a client and server address. For most PLC types a default TSAP is available that allows
  6. /// connection from any IP and can be calculated using the rack and slot numbers.
  7. /// </summary>
  8. public struct Tsap
  9. {
  10. /// <summary>
  11. /// First byte of the TSAP.
  12. /// </summary>
  13. public byte FirstByte { get; set; }
  14. /// <summary>
  15. /// Second byte of the TSAP.
  16. /// </summary>
  17. public byte SecondByte { get; set; }
  18. /// <summary>
  19. /// Initializes a new instance of the <see cref="Tsap" /> class using the specified values.
  20. /// </summary>
  21. /// <param name="firstByte">The first byte of the TSAP.</param>
  22. /// <param name="secondByte">The second byte of the TSAP.</param>
  23. public Tsap(byte firstByte, byte secondByte)
  24. {
  25. FirstByte = firstByte;
  26. SecondByte = secondByte;
  27. }
  28. }
  29. }