革博士程序V1仓库
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

1854 行
99 KiB

  1. <?xml version="1.0"?>
  2. <doc>
  3. <assembly>
  4. <name>S7.Net</name>
  5. </assembly>
  6. <members>
  7. <member name="T:S7.Net.Conversion">
  8. <summary>
  9. Conversion methods to convert from Siemens numeric format to C# and back
  10. </summary>
  11. </member>
  12. <member name="M:S7.Net.Conversion.BinStringToInt32(System.String)">
  13. <summary>
  14. Converts a binary string to Int32 value
  15. </summary>
  16. <param name="txt"></param>
  17. <returns></returns>
  18. </member>
  19. <member name="M:S7.Net.Conversion.BinStringToByte(System.String)">
  20. <summary>
  21. Converts a binary string to a byte. Can return null.
  22. </summary>
  23. <param name="txt"></param>
  24. <returns></returns>
  25. </member>
  26. <member name="M:S7.Net.Conversion.ValToBinString(System.Object)">
  27. <summary>
  28. Converts the value to a binary string
  29. </summary>
  30. <param name="value"></param>
  31. <returns></returns>
  32. </member>
  33. <member name="M:S7.Net.Conversion.SelectBit(System.Byte,System.Int32)">
  34. <summary>
  35. Helper to get a bit value given a byte and the bit index.
  36. Example: DB1.DBX0.5 -> var bytes = ReadBytes(DB1.DBW0); bool bit = bytes[0].SelectBit(5);
  37. </summary>
  38. <param name="data"></param>
  39. <param name="bitPosition"></param>
  40. <returns></returns>
  41. </member>
  42. <member name="M:S7.Net.Conversion.ConvertToShort(System.UInt16)">
  43. <summary>
  44. Converts from ushort value to short value; it's used to retrieve negative values from words
  45. </summary>
  46. <param name="input"></param>
  47. <returns></returns>
  48. </member>
  49. <member name="M:S7.Net.Conversion.ConvertToUshort(System.Int16)">
  50. <summary>
  51. Converts from short value to ushort value; it's used to pass negative values to DWs
  52. </summary>
  53. <param name="input"></param>
  54. <returns></returns>
  55. </member>
  56. <member name="M:S7.Net.Conversion.ConvertToInt(System.UInt32)">
  57. <summary>
  58. Converts from UInt32 value to Int32 value; it's used to retrieve negative values from DBDs
  59. </summary>
  60. <param name="input"></param>
  61. <returns></returns>
  62. </member>
  63. <member name="M:S7.Net.Conversion.ConvertToUInt(System.Int32)">
  64. <summary>
  65. Converts from Int32 value to UInt32 value; it's used to pass negative values to DBDs
  66. </summary>
  67. <param name="input"></param>
  68. <returns></returns>
  69. </member>
  70. <member name="M:S7.Net.Conversion.ConvertToUInt(System.Single)">
  71. <summary>
  72. Converts from float to DWord (DBD)
  73. </summary>
  74. <param name="input"></param>
  75. <returns></returns>
  76. </member>
  77. <member name="M:S7.Net.Conversion.ConvertToFloat(System.UInt32)">
  78. <summary>
  79. Converts from DWord (DBD) to float
  80. </summary>
  81. <param name="input"></param>
  82. <returns></returns>
  83. </member>
  84. <member name="T:S7.Net.COTP">
  85. <summary>
  86. COTP Protocol functions and types
  87. </summary>
  88. </member>
  89. <member name="T:S7.Net.COTP.TPDU">
  90. <summary>
  91. Describes a COTP TPDU (Transport protocol data unit)
  92. </summary>
  93. </member>
  94. <member name="M:S7.Net.COTP.TPDU.ReadAsync(System.IO.Stream,System.Threading.CancellationToken)">
  95. <summary>
  96. Reads COTP TPDU (Transport protocol data unit) from the network stream
  97. See: https://tools.ietf.org/html/rfc905
  98. </summary>
  99. <param name="stream">The socket to read from</param>
  100. <param name="cancellationToken">A cancellation token that can be used to cancel the asynchronous operation.</param>
  101. <returns>COTP DPDU instance</returns>
  102. </member>
  103. <member name="T:S7.Net.COTP.TSDU">
  104. <summary>
  105. Describes a COTP TSDU (Transport service data unit). One TSDU consist of 1 ore more TPDUs
  106. </summary>
  107. </member>
  108. <member name="M:S7.Net.COTP.TSDU.ReadAsync(System.IO.Stream,System.Threading.CancellationToken)">
  109. <summary>
  110. Reads the full COTP TSDU (Transport service data unit)
  111. See: https://tools.ietf.org/html/rfc905
  112. </summary>
  113. <param name="stream">The stream to read from</param>
  114. <param name="cancellationToken">A cancellation token that can be used to cancel the asynchronous operation.</param>
  115. <returns>Data in TSDU</returns>
  116. </member>
  117. <member name="T:S7.Net.CpuType">
  118. <summary>
  119. Types of S7 cpu supported by the library
  120. </summary>
  121. </member>
  122. <member name="F:S7.Net.CpuType.S7200">
  123. <summary>
  124. S7 200 cpu type
  125. </summary>
  126. </member>
  127. <member name="F:S7.Net.CpuType.Logo0BA8">
  128. <summary>
  129. Siemens Logo 0BA8
  130. </summary>
  131. </member>
  132. <member name="F:S7.Net.CpuType.S7200Smart">
  133. <summary>
  134. S7 200 Smart
  135. </summary>
  136. </member>
  137. <member name="F:S7.Net.CpuType.S7300">
  138. <summary>
  139. S7 300 cpu type
  140. </summary>
  141. </member>
  142. <member name="F:S7.Net.CpuType.S7400">
  143. <summary>
  144. S7 400 cpu type
  145. </summary>
  146. </member>
  147. <member name="F:S7.Net.CpuType.S71200">
  148. <summary>
  149. S7 1200 cpu type
  150. </summary>
  151. </member>
  152. <member name="F:S7.Net.CpuType.S71500">
  153. <summary>
  154. S7 1500 cpu type
  155. </summary>
  156. </member>
  157. <member name="T:S7.Net.ErrorCode">
  158. <summary>
  159. Types of error code that can be set after a function is called
  160. </summary>
  161. </member>
  162. <member name="F:S7.Net.ErrorCode.NoError">
  163. <summary>
  164. The function has been executed correctly
  165. </summary>
  166. </member>
  167. <member name="F:S7.Net.ErrorCode.WrongCPU_Type">
  168. <summary>
  169. Wrong type of CPU error
  170. </summary>
  171. </member>
  172. <member name="F:S7.Net.ErrorCode.ConnectionError">
  173. <summary>
  174. Connection error
  175. </summary>
  176. </member>
  177. <member name="F:S7.Net.ErrorCode.IPAddressNotAvailable">
  178. <summary>
  179. Ip address not available
  180. </summary>
  181. </member>
  182. <member name="F:S7.Net.ErrorCode.WrongVarFormat">
  183. <summary>
  184. Wrong format of the variable
  185. </summary>
  186. </member>
  187. <member name="F:S7.Net.ErrorCode.WrongNumberReceivedBytes">
  188. <summary>
  189. Wrong number of received bytes
  190. </summary>
  191. </member>
  192. <member name="F:S7.Net.ErrorCode.SendData">
  193. <summary>
  194. Error on send data
  195. </summary>
  196. </member>
  197. <member name="F:S7.Net.ErrorCode.ReadData">
  198. <summary>
  199. Error on read data
  200. </summary>
  201. </member>
  202. <member name="F:S7.Net.ErrorCode.WriteData">
  203. <summary>
  204. Error on write data
  205. </summary>
  206. </member>
  207. <member name="T:S7.Net.DataType">
  208. <summary>
  209. Types of memory area that can be read
  210. </summary>
  211. </member>
  212. <member name="F:S7.Net.DataType.Input">
  213. <summary>
  214. Input area memory
  215. </summary>
  216. </member>
  217. <member name="F:S7.Net.DataType.Output">
  218. <summary>
  219. Output area memory
  220. </summary>
  221. </member>
  222. <member name="F:S7.Net.DataType.Memory">
  223. <summary>
  224. Merkers area memory (M0, M0.0, ...)
  225. </summary>
  226. </member>
  227. <member name="F:S7.Net.DataType.DataBlock">
  228. <summary>
  229. DB area memory (DB1, DB2, ...)
  230. </summary>
  231. </member>
  232. <member name="F:S7.Net.DataType.Timer">
  233. <summary>
  234. Timer area memory(T1, T2, ...)
  235. </summary>
  236. </member>
  237. <member name="F:S7.Net.DataType.Counter">
  238. <summary>
  239. Counter area memory (C1, C2, ...)
  240. </summary>
  241. </member>
  242. <member name="T:S7.Net.VarType">
  243. <summary>
  244. Types
  245. </summary>
  246. </member>
  247. <member name="F:S7.Net.VarType.Bit">
  248. <summary>
  249. S7 Bit variable type (bool)
  250. </summary>
  251. </member>
  252. <member name="F:S7.Net.VarType.Byte">
  253. <summary>
  254. S7 Byte variable type (8 bits)
  255. </summary>
  256. </member>
  257. <member name="F:S7.Net.VarType.Word">
  258. <summary>
  259. S7 Word variable type (16 bits, 2 bytes)
  260. </summary>
  261. </member>
  262. <member name="F:S7.Net.VarType.DWord">
  263. <summary>
  264. S7 DWord variable type (32 bits, 4 bytes)
  265. </summary>
  266. </member>
  267. <member name="F:S7.Net.VarType.Int">
  268. <summary>
  269. S7 Int variable type (16 bits, 2 bytes)
  270. </summary>
  271. </member>
  272. <member name="F:S7.Net.VarType.DInt">
  273. <summary>
  274. DInt variable type (32 bits, 4 bytes)
  275. </summary>
  276. </member>
  277. <member name="F:S7.Net.VarType.Real">
  278. <summary>
  279. Real variable type (32 bits, 4 bytes)
  280. </summary>
  281. </member>
  282. <member name="F:S7.Net.VarType.LReal">
  283. <summary>
  284. LReal variable type (64 bits, 8 bytes)
  285. </summary>
  286. </member>
  287. <member name="F:S7.Net.VarType.String">
  288. <summary>
  289. Char Array / C-String variable type (variable)
  290. </summary>
  291. </member>
  292. <member name="F:S7.Net.VarType.S7String">
  293. <summary>
  294. S7 String variable type (variable)
  295. </summary>
  296. </member>
  297. <member name="F:S7.Net.VarType.S7WString">
  298. <summary>
  299. S7 WString variable type (variable)
  300. </summary>
  301. </member>
  302. <member name="F:S7.Net.VarType.Timer">
  303. <summary>
  304. Timer variable type
  305. </summary>
  306. </member>
  307. <member name="F:S7.Net.VarType.Counter">
  308. <summary>
  309. Counter variable type
  310. </summary>
  311. </member>
  312. <member name="F:S7.Net.VarType.DateTime">
  313. <summary>
  314. DateTIme variable type
  315. </summary>
  316. </member>
  317. <member name="F:S7.Net.VarType.DateTimeLong">
  318. <summary>
  319. DateTimeLong variable type
  320. </summary>
  321. </member>
  322. <member name="M:S7.Net.Helper.MemoryStreamExtension.Write(System.IO.MemoryStream,System.Byte[])">
  323. <summary>
  324. Helper function to write to whole content of the given byte array to a memory stream.
  325. Writes all bytes in value from 0 to value.Length to the memory stream.
  326. </summary>
  327. <param name="stream"></param>
  328. <param name="value"></param>
  329. </member>
  330. <member name="M:S7.Net.Helper.MemoryStreamExtension.Write(System.IO.MemoryStream,System.ReadOnlySpan{System.Byte})">
  331. <summary>
  332. Helper function to write the whole content of the given byte span to a memory stream.
  333. </summary>
  334. <param name="stream"></param>
  335. <param name="value"></param>
  336. </member>
  337. <member name="T:S7.Net.Plc">
  338. <summary>
  339. Creates an instance of S7.Net driver
  340. </summary>
  341. <summary>
  342. Creates an instance of S7.Net driver
  343. </summary>
  344. </member>
  345. <member name="F:S7.Net.Plc.DefaultPort">
  346. <summary>
  347. The default port for the S7 protocol.
  348. </summary>
  349. </member>
  350. <member name="F:S7.Net.Plc.DefaultTimeout">
  351. <summary>
  352. The default timeout (in milliseconds) used for <see cref="P:ReadTimeout"/> and <see cref="P:WriteTimeout"/>.
  353. </summary>
  354. </member>
  355. <member name="P:S7.Net.Plc.IP">
  356. <summary>
  357. IP address of the PLC
  358. </summary>
  359. </member>
  360. <member name="P:S7.Net.Plc.Port">
  361. <summary>
  362. PORT Number of the PLC, default is 102
  363. </summary>
  364. </member>
  365. <member name="P:S7.Net.Plc.TsapPair">
  366. <summary>
  367. The TSAP addresses used during the connection request.
  368. </summary>
  369. </member>
  370. <member name="P:S7.Net.Plc.CPU">
  371. <summary>
  372. CPU type of the PLC
  373. </summary>
  374. </member>
  375. <member name="P:S7.Net.Plc.Rack">
  376. <summary>
  377. Rack of the PLC
  378. </summary>
  379. </member>
  380. <member name="P:S7.Net.Plc.Slot">
  381. <summary>
  382. Slot of the CPU of the PLC
  383. </summary>
  384. </member>
  385. <member name="P:S7.Net.Plc.MaxPDUSize">
  386. <summary>
  387. Max PDU size this cpu supports
  388. </summary>
  389. </member>
  390. <member name="P:S7.Net.Plc.ReadTimeout">
  391. <summary>Gets or sets the amount of time that a read operation blocks waiting for data from PLC.</summary>
  392. <returns>A <see cref="T:System.Int32" /> that specifies the amount of time, in milliseconds, that will elapse before a read operation fails. The default value, <see cref="F:System.Threading.Timeout.Infinite" />, specifies that the read operation does not time out.</returns>
  393. </member>
  394. <member name="P:S7.Net.Plc.WriteTimeout">
  395. <summary>Gets or sets the amount of time that a write operation blocks waiting for data to PLC. </summary>
  396. <returns>A <see cref="T:System.Int32" /> that specifies the amount of time, in milliseconds, that will elapse before a write operation fails. The default value, <see cref="F:System.Threading.Timeout.Infinite" />, specifies that the write operation does not time out.</returns>
  397. </member>
  398. <member name="P:S7.Net.Plc.IsConnected">
  399. <summary>
  400. Gets a value indicating whether a connection to the PLC has been established.
  401. </summary>
  402. <remarks>
  403. The <see cref="P:S7.Net.Plc.IsConnected"/> property gets the connection state of the Client socket as
  404. of the last I/O operation. When it returns <c>false</c>, the Client socket was either
  405. never connected, or is no longer connected.
  406. <para>
  407. Because the <see cref="P:S7.Net.Plc.IsConnected"/> property only reflects the state of the connection
  408. as of the most recent operation, you should attempt to send or receive a message to
  409. determine the current state. After the message send fails, this property no longer
  410. returns <c>true</c>. Note that this behavior is by design. You cannot reliably test the
  411. state of the connection because, in the time between the test and a send/receive, the
  412. connection could have been lost. Your code should assume the socket is connected, and
  413. gracefully handle failed transmissions.
  414. </para>
  415. </remarks>
  416. </member>
  417. <member name="M:S7.Net.Plc.#ctor(S7.Net.CpuType,System.String,System.Int16,System.Int16)">
  418. <summary>
  419. Creates a PLC object with all the parameters needed for connections.
  420. For S7-1200 and S7-1500, the default is rack = 0 and slot = 0.
  421. You need slot > 0 if you are connecting to external ethernet card (CP).
  422. For S7-300 and S7-400 the default is rack = 0 and slot = 2.
  423. </summary>
  424. <param name="cpu">CpuType of the PLC (select from the enum)</param>
  425. <param name="ip">Ip address of the PLC</param>
  426. <param name="rack">rack of the PLC, usually it's 0, but check in the hardware configuration of Step7 or TIA portal</param>
  427. <param name="slot">slot of the CPU of the PLC, usually it's 2 for S7300-S7400, 0 for S7-1200 and S7-1500.
  428. If you use an external ethernet card, this must be set accordingly.</param>
  429. </member>
  430. <member name="M:S7.Net.Plc.#ctor(S7.Net.CpuType,System.String,System.Int32,System.Int16,System.Int16)">
  431. <summary>
  432. Creates a PLC object with all the parameters needed for connections.
  433. For S7-1200 and S7-1500, the default is rack = 0 and slot = 0.
  434. You need slot > 0 if you are connecting to external ethernet card (CP).
  435. For S7-300 and S7-400 the default is rack = 0 and slot = 2.
  436. </summary>
  437. <param name="cpu">CpuType of the PLC (select from the enum)</param>
  438. <param name="ip">Ip address of the PLC</param>
  439. <param name="port">Port number used for the connection, default 102.</param>
  440. <param name="rack">rack of the PLC, usually it's 0, but check in the hardware configuration of Step7 or TIA portal</param>
  441. <param name="slot">slot of the CPU of the PLC, usually it's 2 for S7300-S7400, 0 for S7-1200 and S7-1500.
  442. If you use an external ethernet card, this must be set accordingly.</param>
  443. </member>
  444. <member name="M:S7.Net.Plc.#ctor(System.String,S7.Net.Protocol.TsapPair)">
  445. <summary>
  446. Creates a PLC object with all the parameters needed for connections.
  447. For S7-1200 and S7-1500, the default is rack = 0 and slot = 0.
  448. You need slot > 0 if you are connecting to external ethernet card (CP).
  449. For S7-300 and S7-400 the default is rack = 0 and slot = 2.
  450. </summary>
  451. <param name="ip">Ip address of the PLC</param>
  452. <param name="tsapPair">The TSAP addresses used for the connection request.</param>
  453. </member>
  454. <member name="M:S7.Net.Plc.#ctor(System.String,System.Int32,S7.Net.Protocol.TsapPair)">
  455. <summary>
  456. Creates a PLC object with all the parameters needed for connections. Use this constructor
  457. if you want to manually override the TSAP addresses used during the connection request.
  458. </summary>
  459. <param name="ip">Ip address of the PLC</param>
  460. <param name="port">Port number used for the connection, default 102.</param>
  461. <param name="tsapPair">The TSAP addresses used for the connection request.</param>
  462. </member>
  463. <member name="M:S7.Net.Plc.Close">
  464. <summary>
  465. Close connection to PLC
  466. </summary>
  467. </member>
  468. <member name="M:S7.Net.Plc.Dispose(System.Boolean)">
  469. <summary>
  470. Dispose Plc Object
  471. </summary>
  472. <param name="disposing"></param>
  473. </member>
  474. <member name="M:S7.Net.Plc.OpenAsync(System.Threading.CancellationToken)">
  475. <summary>
  476. Connects to the PLC and performs a COTP ConnectionRequest and S7 CommunicationSetup.
  477. </summary>
  478. <param name="cancellationToken">The token to monitor for cancellation requests. The default value is None.
  479. Please note that the cancellation will not affect opening the socket in any way and only affects data transfers for configuring the connection after the socket connection is successfully established.
  480. Please note that cancellation is advisory/cooperative and will not lead to immediate cancellation in all cases.</param>
  481. <returns>A task that represents the asynchronous open operation.</returns>
  482. </member>
  483. <member name="M:S7.Net.Plc.ReadBytesAsync(S7.Net.DataType,System.Int32,System.Int32,System.Int32,System.Threading.CancellationToken)">
  484. <summary>
  485. Reads a number of bytes from a DB starting from a specified index. This handles more than 200 bytes with multiple requests.
  486. If the read was not successful, check LastErrorCode or LastErrorString.
  487. </summary>
  488. <param name="dataType">Data type of the memory area, can be DB, Timer, Counter, Merker(Memory), Input, Output.</param>
  489. <param name="db">Address of the memory area (if you want to read DB1, this is set to 1). This must be set also for other memory area types: counters, timers,etc.</param>
  490. <param name="startByteAdr">Start byte address. If you want to read DB1.DBW200, this is 200.</param>
  491. <param name="count">Byte count, if you want to read 120 bytes, set this to 120.</param>
  492. <param name="cancellationToken">The token to monitor for cancellation requests. The default value is None.
  493. Please note that cancellation is advisory/cooperative and will not lead to immediate cancellation in all cases.</param>
  494. <returns>Returns the bytes in an array</returns>
  495. </member>
  496. <member name="M:S7.Net.Plc.ReadBytesAsync(System.Memory{System.Byte},S7.Net.DataType,System.Int32,System.Int32,System.Threading.CancellationToken)">
  497. <summary>
  498. Reads a number of bytes from a DB starting from a specified index. This handles more than 200 bytes with multiple requests.
  499. If the read was not successful, check LastErrorCode or LastErrorString.
  500. </summary>
  501. <param name="buffer">Buffer to receive the read bytes. The <see cref="P:System.Memory`1.Length"/> determines the number of bytes to read.</param>
  502. <param name="dataType">Data type of the memory area, can be DB, Timer, Counter, Merker(Memory), Input, Output.</param>
  503. <param name="db">Address of the memory area (if you want to read DB1, this is set to 1). This must be set also for other memory area types: counters, timers,etc.</param>
  504. <param name="startByteAdr">Start byte address. If you want to read DB1.DBW200, this is 200.</param>
  505. <param name="cancellationToken">The token to monitor for cancellation requests. The default value is None.
  506. Please note that cancellation is advisory/cooperative and will not lead to immediate cancellation in all cases.</param>
  507. <returns>Returns the bytes in an array</returns>
  508. </member>
  509. <member name="M:S7.Net.Plc.ReadAsync(S7.Net.DataType,System.Int32,System.Int32,S7.Net.VarType,System.Int32,System.Byte,System.Threading.CancellationToken)">
  510. <summary>
  511. Read and decode a certain number of bytes of the "VarType" provided.
  512. This can be used to read multiple consecutive variables of the same type (Word, DWord, Int, etc).
  513. If the read was not successful, check LastErrorCode or LastErrorString.
  514. </summary>
  515. <param name="dataType">Data type of the memory area, can be DB, Timer, Counter, Merker(Memory), Input, Output.</param>
  516. <param name="db">Address of the memory area (if you want to read DB1, this is set to 1). This must be set also for other memory area types: counters, timers,etc.</param>
  517. <param name="startByteAdr">Start byte address. If you want to read DB1.DBW200, this is 200.</param>
  518. <param name="varType">Type of the variable/s that you are reading</param>
  519. <param name="bitAdr">Address of bit. If you want to read DB1.DBX200.6, set 6 to this parameter.</param>
  520. <param name="varCount"></param>
  521. <param name="cancellationToken">The token to monitor for cancellation requests. The default value is None.
  522. Please note that cancellation is advisory/cooperative and will not lead to immediate cancellation in all cases.</param>
  523. </member>
  524. <member name="M:S7.Net.Plc.ReadAsync(System.String,System.Threading.CancellationToken)">
  525. <summary>
  526. Reads a single variable from the PLC, takes in input strings like "DB1.DBX0.0", "DB20.DBD200", "MB20", "T45", etc.
  527. If the read was not successful, check LastErrorCode or LastErrorString.
  528. </summary>
  529. <param name="variable">Input strings like "DB1.DBX0.0", "DB20.DBD200", "MB20", "T45", etc.</param>
  530. <param name="cancellationToken">The token to monitor for cancellation requests. The default value is None.
  531. Please note that cancellation is advisory/cooperative and will not lead to immediate cancellation in all cases.</param>
  532. <returns>Returns an object that contains the value. This object must be cast accordingly.</returns>
  533. </member>
  534. <member name="M:S7.Net.Plc.ReadStructAsync(System.Type,System.Int32,System.Int32,System.Threading.CancellationToken)">
  535. <summary>
  536. Reads all the bytes needed to fill a struct in C#, starting from a certain address, and return an object that can be casted to the struct.
  537. </summary>
  538. <param name="structType">Type of the struct to be readed (es.: TypeOf(MyStruct)).</param>
  539. <param name="db">Address of the DB.</param>
  540. <param name="startByteAdr">Start byte address. If you want to read DB1.DBW200, this is 200.</param>
  541. <param name="cancellationToken">The token to monitor for cancellation requests. The default value is None.
  542. Please note that cancellation is advisory/cooperative and will not lead to immediate cancellation in all cases.</param>
  543. <returns>Returns a struct that must be cast.</returns>
  544. </member>
  545. <member name="M:S7.Net.Plc.ReadStructAsync``1(System.Int32,System.Int32,System.Threading.CancellationToken)">
  546. <summary>
  547. Reads all the bytes needed to fill a struct in C#, starting from a certain address, and returns the struct or null if nothing was read.
  548. </summary>
  549. <typeparam name="T">The struct type</typeparam>
  550. <param name="db">Address of the DB.</param>
  551. <param name="startByteAdr">Start byte address. If you want to read DB1.DBW200, this is 200.</param>
  552. <param name="cancellationToken">The token to monitor for cancellation requests. The default value is None.
  553. Please note that cancellation is advisory/cooperative and will not lead to immediate cancellation in all cases.</param>
  554. <returns>Returns a nulable struct. If nothing was read null will be returned.</returns>
  555. </member>
  556. <member name="M:S7.Net.Plc.ReadClassAsync(System.Object,System.Int32,System.Int32,System.Threading.CancellationToken)">
  557. <summary>
  558. Reads all the bytes needed to fill a class in C#, starting from a certain address, and set all the properties values to the value that are read from the PLC.
  559. This reads only properties, it doesn't read private variable or public variable without {get;set;} specified.
  560. </summary>
  561. <param name="sourceClass">Instance of the class that will store the values</param>
  562. <param name="db">Index of the DB; es.: 1 is for DB1</param>
  563. <param name="startByteAdr">Start byte address. If you want to read DB1.DBW200, this is 200.</param>
  564. <param name="cancellationToken">The token to monitor for cancellation requests. The default value is None.
  565. Please note that cancellation is advisory/cooperative and will not lead to immediate cancellation in all cases.</param>
  566. <returns>The number of read bytes</returns>
  567. </member>
  568. <member name="M:S7.Net.Plc.ReadClassAsync``1(System.Int32,System.Int32,System.Threading.CancellationToken)">
  569. <summary>
  570. Reads all the bytes needed to fill a class in C#, starting from a certain address, and set all the properties values to the value that are read from the PLC.
  571. This reads only properties, it doesn't read private variable or public variable without {get;set;} specified. To instantiate the class defined by the generic
  572. type, the class needs a default constructor.
  573. </summary>
  574. <typeparam name="T">The class that will be instantiated. Requires a default constructor</typeparam>
  575. <param name="db">Index of the DB; es.: 1 is for DB1</param>
  576. <param name="startByteAdr">Start byte address. If you want to read DB1.DBW200, this is 200.</param>
  577. <param name="cancellationToken">The token to monitor for cancellation requests. The default value is None.
  578. Please note that cancellation is advisory/cooperative and will not lead to immediate cancellation in all cases.</param>
  579. <returns>An instance of the class with the values read from the PLC. If no data has been read, null will be returned</returns>
  580. </member>
  581. <member name="M:S7.Net.Plc.ReadClassAsync``1(System.Func{``0},System.Int32,System.Int32,System.Threading.CancellationToken)">
  582. <summary>
  583. Reads all the bytes needed to fill a class in C#, starting from a certain address, and set all the properties values to the value that are read from the PLC.
  584. This reads only properties, it doesn't read private variable or public variable without {get;set;} specified.
  585. </summary>
  586. <typeparam name="T">The class that will be instantiated</typeparam>
  587. <param name="classFactory">Function to instantiate the class</param>
  588. <param name="db">Index of the DB; es.: 1 is for DB1</param>
  589. <param name="startByteAdr">Start byte address. If you want to read DB1.DBW200, this is 200.</param>
  590. <param name="cancellationToken">The token to monitor for cancellation requests. The default value is None.
  591. Please note that cancellation is advisory/cooperative and will not lead to immediate cancellation in all cases.</param>
  592. <returns>An instance of the class with the values read from the PLC. If no data has been read, null will be returned</returns>
  593. </member>
  594. <member name="M:S7.Net.Plc.ReadMultipleVarsAsync(System.Collections.Generic.List{S7.Net.Types.DataItem},System.Threading.CancellationToken)">
  595. <summary>
  596. Reads multiple vars in a single request.
  597. You have to create and pass a list of DataItems and you obtain in response the same list with the values.
  598. Values are stored in the property "Value" of the dataItem and are already converted.
  599. If you don't want the conversion, just create a dataItem of bytes.
  600. The number of DataItems as well as the total size of the requested data can not exceed a certain limit (protocol restriction).
  601. </summary>
  602. <param name="dataItems">List of dataitems that contains the list of variables that must be read.</param>
  603. <param name="cancellationToken">The token to monitor for cancellation requests. The default value is None.
  604. Please note that cancellation is advisory/cooperative and will not lead to immediate cancellation in all cases.</param>
  605. </member>
  606. <member name="M:S7.Net.Plc.ReadStatusAsync(System.Threading.CancellationToken)">
  607. <summary>
  608. Read the current status from the PLC. A value of 0x08 indicates the PLC is in run status, regardless of the PLC type.
  609. </summary>
  610. <param name="cancellationToken">The token to monitor for cancellation requests. The default value is None.
  611. Please note that cancellation is advisory/cooperative and will not lead to immediate cancellation in all cases.</param>
  612. <returns>A task that represents the asynchronous operation, with it's result set to the current PLC status on completion.</returns>
  613. </member>
  614. <member name="M:S7.Net.Plc.WriteBytesAsync(S7.Net.DataType,System.Int32,System.Int32,System.Byte[],System.Threading.CancellationToken)">
  615. <summary>
  616. Write a number of bytes from a DB starting from a specified index. This handles more than 200 bytes with multiple requests.
  617. If the write was not successful, check LastErrorCode or LastErrorString.
  618. </summary>
  619. <param name="dataType">Data type of the memory area, can be DB, Timer, Counter, Merker(Memory), Input, Output.</param>
  620. <param name="db">Address of the memory area (if you want to read DB1, this is set to 1). This must be set also for other memory area types: counters, timers,etc.</param>
  621. <param name="startByteAdr">Start byte address. If you want to write DB1.DBW200, this is 200.</param>
  622. <param name="value">Bytes to write. If more than 200, multiple requests will be made.</param>
  623. <param name="cancellationToken">The token to monitor for cancellation requests. The default value is None.
  624. Please note that cancellation is advisory/cooperative and will not lead to immediate cancellation in all cases.</param>
  625. <returns>A task that represents the asynchronous write operation.</returns>
  626. </member>
  627. <member name="M:S7.Net.Plc.WriteBytesAsync(S7.Net.DataType,System.Int32,System.Int32,System.ReadOnlyMemory{System.Byte},System.Threading.CancellationToken)">
  628. <summary>
  629. Write a number of bytes from a DB starting from a specified index. This handles more than 200 bytes with multiple requests.
  630. If the write was not successful, check LastErrorCode or LastErrorString.
  631. </summary>
  632. <param name="dataType">Data type of the memory area, can be DB, Timer, Counter, Merker(Memory), Input, Output.</param>
  633. <param name="db">Address of the memory area (if you want to read DB1, this is set to 1). This must be set also for other memory area types: counters, timers,etc.</param>
  634. <param name="startByteAdr">Start byte address. If you want to write DB1.DBW200, this is 200.</param>
  635. <param name="value">Bytes to write. If more than 200, multiple requests will be made.</param>
  636. <param name="cancellationToken">The token to monitor for cancellation requests. The default value is None.
  637. Please note that cancellation is advisory/cooperative and will not lead to immediate cancellation in all cases.</param>
  638. <returns>A task that represents the asynchronous write operation.</returns>
  639. </member>
  640. <member name="M:S7.Net.Plc.WriteBitAsync(S7.Net.DataType,System.Int32,System.Int32,System.Int32,System.Boolean,System.Threading.CancellationToken)">
  641. <summary>
  642. Write a single bit from a DB with the specified index.
  643. </summary>
  644. <param name="dataType">Data type of the memory area, can be DB, Timer, Counter, Merker(Memory), Input, Output.</param>
  645. <param name="db">Address of the memory area (if you want to read DB1, this is set to 1). This must be set also for other memory area types: counters, timers,etc.</param>
  646. <param name="startByteAdr">Start byte address. If you want to write DB1.DBW200, this is 200.</param>
  647. <param name="bitAdr">The address of the bit. (0-7)</param>
  648. <param name="value">Bytes to write. If more than 200, multiple requests will be made.</param>
  649. <param name="cancellationToken">The token to monitor for cancellation requests. The default value is None.
  650. Please note that cancellation is advisory/cooperative and will not lead to immediate cancellation in all cases.</param>
  651. <returns>A task that represents the asynchronous write operation.</returns>
  652. </member>
  653. <member name="M:S7.Net.Plc.WriteBitAsync(S7.Net.DataType,System.Int32,System.Int32,System.Int32,System.Int32,System.Threading.CancellationToken)">
  654. <summary>
  655. Write a single bit from a DB with the specified index.
  656. </summary>
  657. <param name="dataType">Data type of the memory area, can be DB, Timer, Counter, Merker(Memory), Input, Output.</param>
  658. <param name="db">Address of the memory area (if you want to read DB1, this is set to 1). This must be set also for other memory area types: counters, timers,etc.</param>
  659. <param name="startByteAdr">Start byte address. If you want to write DB1.DBW200, this is 200.</param>
  660. <param name="bitAdr">The address of the bit. (0-7)</param>
  661. <param name="value">Bytes to write. If more than 200, multiple requests will be made.</param>
  662. <param name="cancellationToken">The token to monitor for cancellation requests. The default value is None.
  663. Please note that cancellation is advisory/cooperative and will not lead to immediate cancellation in all cases.</param>
  664. <returns>A task that represents the asynchronous write operation.</returns>
  665. </member>
  666. <member name="M:S7.Net.Plc.WriteAsync(S7.Net.DataType,System.Int32,System.Int32,System.Object,System.Int32,System.Threading.CancellationToken)">
  667. <summary>
  668. Takes in input an object and tries to parse it to an array of values. This can be used to write many data, all of the same type.
  669. You must specify the memory area type, memory are address, byte start address and bytes count.
  670. If the read was not successful, check LastErrorCode or LastErrorString.
  671. </summary>
  672. <param name="dataType">Data type of the memory area, can be DB, Timer, Counter, Merker(Memory), Input, Output.</param>
  673. <param name="db">Address of the memory area (if you want to read DB1, this is set to 1). This must be set also for other memory area types: counters, timers,etc.</param>
  674. <param name="startByteAdr">Start byte address. If you want to read DB1.DBW200, this is 200.</param>
  675. <param name="value">Bytes to write. The lenght of this parameter can't be higher than 200. If you need more, use recursion.</param>
  676. <param name="bitAdr">The address of the bit. (0-7)</param>
  677. <param name="cancellationToken">The token to monitor for cancellation requests. The default value is None.
  678. Please note that cancellation is advisory/cooperative and will not lead to immediate cancellation in all cases.</param>
  679. <returns>A task that represents the asynchronous write operation.</returns>
  680. </member>
  681. <member name="M:S7.Net.Plc.WriteAsync(System.String,System.Object,System.Threading.CancellationToken)">
  682. <summary>
  683. Writes a single variable from the PLC, takes in input strings like "DB1.DBX0.0", "DB20.DBD200", "MB20", "T45", etc.
  684. </summary>
  685. <param name="variable">Input strings like "DB1.DBX0.0", "DB20.DBD200", "MB20", "T45", etc.</param>
  686. <param name="value">Value to be written to the PLC</param>
  687. <param name="cancellationToken">The token to monitor for cancellation requests. The default value is None.
  688. Please note that cancellation is advisory/cooperative and will not lead to immediate cancellation in all cases.</param>
  689. <returns>A task that represents the asynchronous write operation.</returns>
  690. </member>
  691. <member name="M:S7.Net.Plc.WriteStructAsync(System.Object,System.Int32,System.Int32,System.Threading.CancellationToken)">
  692. <summary>
  693. Writes a C# struct to a DB in the PLC
  694. </summary>
  695. <param name="structValue">The struct to be written</param>
  696. <param name="db">Db address</param>
  697. <param name="startByteAdr">Start bytes on the PLC</param>
  698. <param name="cancellationToken">The token to monitor for cancellation requests. The default value is None.
  699. Please note that cancellation is advisory/cooperative and will not lead to immediate cancellation in all cases.</param>
  700. <returns>A task that represents the asynchronous write operation.</returns>
  701. </member>
  702. <member name="M:S7.Net.Plc.WriteClassAsync(System.Object,System.Int32,System.Int32,System.Threading.CancellationToken)">
  703. <summary>
  704. Writes a C# class to a DB in the PLC
  705. </summary>
  706. <param name="classValue">The class to be written</param>
  707. <param name="db">Db address</param>
  708. <param name="startByteAdr">Start bytes on the PLC</param>
  709. <param name="cancellationToken">The token to monitor for cancellation requests. The default value is None.
  710. Please note that cancellation is advisory/cooperative and will not lead to immediate cancellation in all cases.</param>
  711. <returns>A task that represents the asynchronous write operation.</returns>
  712. </member>
  713. <member name="M:S7.Net.Plc.WriteAsync(S7.Net.Types.DataItem[])">
  714. <summary>
  715. Write DataItem(s) to the PLC. Throws an exception if the response is invalid
  716. or when the PLC reports errors for item(s) written.
  717. </summary>
  718. <param name="dataItems">The DataItem(s) to write to the PLC.</param>
  719. <returns>Task that completes when response from PLC is parsed.</returns>
  720. </member>
  721. <member name="M:S7.Net.Plc.WriteBytesWithASingleRequestAsync(S7.Net.DataType,System.Int32,System.Int32,System.ReadOnlyMemory{System.Byte},System.Threading.CancellationToken)">
  722. <summary>
  723. Writes up to 200 bytes to the PLC. You must specify the memory area type, memory are address, byte start address and bytes count.
  724. </summary>
  725. <param name="dataType">Data type of the memory area, can be DB, Timer, Counter, Merker(Memory), Input, Output.</param>
  726. <param name="db">Address of the memory area (if you want to read DB1, this is set to 1). This must be set also for other memory area types: counters, timers,etc.</param>
  727. <param name="startByteAdr">Start byte address. If you want to read DB1.DBW200, this is 200.</param>
  728. <param name="value">Bytes to write. The lenght of this parameter can't be higher than 200. If you need more, use recursion.</param>
  729. <param name="cancellationToken">A cancellation token that can be used to cancel the asynchronous operation.</param>
  730. <returns>A task that represents the asynchronous write operation.</returns>
  731. </member>
  732. <member name="M:S7.Net.Plc.WriteReadHeader(System.IO.MemoryStream,System.Int32)">
  733. <summary>
  734. Creates the header to read bytes from the PLC.
  735. </summary>
  736. <param name="stream">The stream to write to.</param>
  737. <param name="amount">The number of items to read.</param>
  738. </member>
  739. <member name="M:S7.Net.Plc.BuildReadDataRequestPackage(System.IO.MemoryStream,S7.Net.DataType,System.Int32,System.Int32,System.Int32)">
  740. <summary>
  741. Create the bytes-package to request data from the PLC. You have to specify the memory type (dataType),
  742. the address of the memory, the address of the byte and the bytes count.
  743. </summary>
  744. <param name="stream">The stream to write the read data request to.</param>
  745. <param name="dataType">MemoryType (DB, Timer, Counter, etc.)</param>
  746. <param name="db">Address of the memory to be read</param>
  747. <param name="startByteAdr">Start address of the byte</param>
  748. <param name="count">Number of bytes to be read</param>
  749. <returns></returns>
  750. </member>
  751. <member name="M:S7.Net.Plc.ParseBytes(S7.Net.VarType,System.Byte[],System.Int32,System.Byte)">
  752. <summary>
  753. Given a S7 variable type (Bool, Word, DWord, etc.), it converts the bytes in the appropriate C# format.
  754. </summary>
  755. <param name="varType"></param>
  756. <param name="bytes"></param>
  757. <param name="varCount"></param>
  758. <param name="bitAdr"></param>
  759. <returns></returns>
  760. </member>
  761. <member name="M:S7.Net.Plc.VarTypeToByteLength(S7.Net.VarType,System.Int32)">
  762. <summary>
  763. Given a S7 <see cref="T:S7.Net.VarType"/> (Bool, Word, DWord, etc.), it returns how many bytes to read.
  764. </summary>
  765. <param name="varType"></param>
  766. <param name="varCount"></param>
  767. <returns>Byte lenght of variable</returns>
  768. </member>
  769. <member name="M:S7.Net.Plc.Open">
  770. <summary>
  771. Connects to the PLC and performs a COTP ConnectionRequest and S7 CommunicationSetup.
  772. </summary>
  773. </member>
  774. <member name="M:S7.Net.Plc.ReadBytes(S7.Net.DataType,System.Int32,System.Int32,System.Int32)">
  775. <summary>
  776. Reads a number of bytes from a DB starting from a specified index. This handles more than 200 bytes with multiple requests.
  777. If the read was not successful, check LastErrorCode or LastErrorString.
  778. </summary>
  779. <param name="dataType">Data type of the memory area, can be DB, Timer, Counter, Merker(Memory), Input, Output.</param>
  780. <param name="db">Address of the memory area (if you want to read DB1, this is set to 1). This must be set also for other memory area types: counters, timers,etc.</param>
  781. <param name="startByteAdr">Start byte address. If you want to read DB1.DBW200, this is 200.</param>
  782. <param name="count">Byte count, if you want to read 120 bytes, set this to 120.</param>
  783. <returns>Returns the bytes in an array</returns>
  784. </member>
  785. <member name="M:S7.Net.Plc.ReadBytes(System.Span{System.Byte},S7.Net.DataType,System.Int32,System.Int32)">
  786. <summary>
  787. Reads a number of bytes from a DB starting from a specified index. This handles more than 200 bytes with multiple requests.
  788. If the read was not successful, check LastErrorCode or LastErrorString.
  789. </summary>
  790. <param name="buffer">Buffer to receive the read bytes. The <see cref="P:System.Span`1.Length"/> determines the number of bytes to read.</param>
  791. <param name="dataType">Data type of the memory area, can be DB, Timer, Counter, Merker(Memory), Input, Output.</param>
  792. <param name="db">Address of the memory area (if you want to read DB1, this is set to 1). This must be set also for other memory area types: counters, timers,etc.</param>
  793. <param name="startByteAdr">Start byte address. If you want to read DB1.DBW200, this is 200.</param>
  794. <returns>Returns the bytes in an array</returns>
  795. </member>
  796. <member name="M:S7.Net.Plc.Read(S7.Net.DataType,System.Int32,System.Int32,S7.Net.VarType,System.Int32,System.Byte)">
  797. <summary>
  798. Read and decode a certain number of bytes of the "VarType" provided.
  799. This can be used to read multiple consecutive variables of the same type (Word, DWord, Int, etc).
  800. If the read was not successful, check LastErrorCode or LastErrorString.
  801. </summary>
  802. <param name="dataType">Data type of the memory area, can be DB, Timer, Counter, Merker(Memory), Input, Output.</param>
  803. <param name="db">Address of the memory area (if you want to read DB1, this is set to 1). This must be set also for other memory area types: counters, timers,etc.</param>
  804. <param name="startByteAdr">Start byte address. If you want to read DB1.DBW200, this is 200.</param>
  805. <param name="varType">Type of the variable/s that you are reading</param>
  806. <param name="bitAdr">Address of bit. If you want to read DB1.DBX200.6, set 6 to this parameter.</param>
  807. <param name="varCount"></param>
  808. </member>
  809. <member name="M:S7.Net.Plc.Read(System.String)">
  810. <summary>
  811. Reads a single variable from the PLC, takes in input strings like "DB1.DBX0.0", "DB20.DBD200", "MB20", "T45", etc.
  812. If the read was not successful, check LastErrorCode or LastErrorString.
  813. </summary>
  814. <param name="variable">Input strings like "DB1.DBX0.0", "DB20.DBD200", "MB20", "T45", etc.</param>
  815. <returns>Returns an object that contains the value. This object must be cast accordingly. If no data has been read, null will be returned</returns>
  816. </member>
  817. <member name="M:S7.Net.Plc.ReadStruct(System.Type,System.Int32,System.Int32)">
  818. <summary>
  819. Reads all the bytes needed to fill a struct in C#, starting from a certain address, and return an object that can be casted to the struct.
  820. </summary>
  821. <param name="structType">Type of the struct to be readed (es.: TypeOf(MyStruct)).</param>
  822. <param name="db">Address of the DB.</param>
  823. <param name="startByteAdr">Start byte address. If you want to read DB1.DBW200, this is 200.</param>
  824. <returns>Returns a struct that must be cast. If no data has been read, null will be returned</returns>
  825. </member>
  826. <member name="M:S7.Net.Plc.ReadStruct``1(System.Int32,System.Int32)">
  827. <summary>
  828. Reads all the bytes needed to fill a struct in C#, starting from a certain address, and returns the struct or null if nothing was read.
  829. </summary>
  830. <typeparam name="T">The struct type</typeparam>
  831. <param name="db">Address of the DB.</param>
  832. <param name="startByteAdr">Start byte address. If you want to read DB1.DBW200, this is 200.</param>
  833. <returns>Returns a nullable struct. If nothing was read null will be returned.</returns>
  834. </member>
  835. <member name="M:S7.Net.Plc.ReadClass(System.Object,System.Int32,System.Int32)">
  836. <summary>
  837. Reads all the bytes needed to fill a class in C#, starting from a certain address, and set all the properties values to the value that are read from the PLC.
  838. This reads only properties, it doesn't read private variable or public variable without {get;set;} specified.
  839. </summary>
  840. <param name="sourceClass">Instance of the class that will store the values</param>
  841. <param name="db">Index of the DB; es.: 1 is for DB1</param>
  842. <param name="startByteAdr">Start byte address. If you want to read DB1.DBW200, this is 200.</param>
  843. <returns>The number of read bytes</returns>
  844. </member>
  845. <member name="M:S7.Net.Plc.ReadClass``1(System.Int32,System.Int32)">
  846. <summary>
  847. Reads all the bytes needed to fill a class in C#, starting from a certain address, and set all the properties values to the value that are read from the PLC.
  848. This reads only properties, it doesn't read private variable or public variable without {get;set;} specified. To instantiate the class defined by the generic
  849. type, the class needs a default constructor.
  850. </summary>
  851. <typeparam name="T">The class that will be instantiated. Requires a default constructor</typeparam>
  852. <param name="db">Index of the DB; es.: 1 is for DB1</param>
  853. <param name="startByteAdr">Start byte address. If you want to read DB1.DBW200, this is 200.</param>
  854. <returns>An instance of the class with the values read from the PLC. If no data has been read, null will be returned</returns>
  855. </member>
  856. <member name="M:S7.Net.Plc.ReadClass``1(System.Func{``0},System.Int32,System.Int32)">
  857. <summary>
  858. Reads all the bytes needed to fill a class in C#, starting from a certain address, and set all the properties values to the value that are read from the PLC.
  859. This reads only properties, it doesn't read private variable or public variable without {get;set;} specified.
  860. </summary>
  861. <typeparam name="T">The class that will be instantiated</typeparam>
  862. <param name="classFactory">Function to instantiate the class</param>
  863. <param name="db">Index of the DB; es.: 1 is for DB1</param>
  864. <param name="startByteAdr">Start byte address. If you want to read DB1.DBW200, this is 200.</param>
  865. <returns>An instance of the class with the values read from the PLC. If no data has been read, null will be returned</returns>
  866. </member>
  867. <member name="M:S7.Net.Plc.WriteBytes(S7.Net.DataType,System.Int32,System.Int32,System.Byte[])">
  868. <summary>
  869. Write a number of bytes from a DB starting from a specified index. This handles more than 200 bytes with multiple requests.
  870. If the write was not successful, check LastErrorCode or LastErrorString.
  871. </summary>
  872. <param name="dataType">Data type of the memory area, can be DB, Timer, Counter, Merker(Memory), Input, Output.</param>
  873. <param name="db">Address of the memory area (if you want to read DB1, this is set to 1). This must be set also for other memory area types: counters, timers,etc.</param>
  874. <param name="startByteAdr">Start byte address. If you want to write DB1.DBW200, this is 200.</param>
  875. <param name="value">Bytes to write. If more than 200, multiple requests will be made.</param>
  876. </member>
  877. <member name="M:S7.Net.Plc.WriteBytes(S7.Net.DataType,System.Int32,System.Int32,System.ReadOnlySpan{System.Byte})">
  878. <summary>
  879. Write a number of bytes from a DB starting from a specified index. This handles more than 200 bytes with multiple requests.
  880. If the write was not successful, check LastErrorCode or LastErrorString.
  881. </summary>
  882. <param name="dataType">Data type of the memory area, can be DB, Timer, Counter, Merker(Memory), Input, Output.</param>
  883. <param name="db">Address of the memory area (if you want to read DB1, this is set to 1). This must be set also for other memory area types: counters, timers,etc.</param>
  884. <param name="startByteAdr">Start byte address. If you want to write DB1.DBW200, this is 200.</param>
  885. <param name="value">Bytes to write. If more than 200, multiple requests will be made.</param>
  886. </member>
  887. <member name="M:S7.Net.Plc.WriteBit(S7.Net.DataType,System.Int32,System.Int32,System.Int32,System.Boolean)">
  888. <summary>
  889. Write a single bit from a DB with the specified index.
  890. </summary>
  891. <param name="dataType">Data type of the memory area, can be DB, Timer, Counter, Merker(Memory), Input, Output.</param>
  892. <param name="db">Address of the memory area (if you want to read DB1, this is set to 1). This must be set also for other memory area types: counters, timers,etc.</param>
  893. <param name="startByteAdr">Start byte address. If you want to write DB1.DBW200, this is 200.</param>
  894. <param name="bitAdr">The address of the bit. (0-7)</param>
  895. <param name="value">Bytes to write. If more than 200, multiple requests will be made.</param>
  896. </member>
  897. <member name="M:S7.Net.Plc.WriteBit(S7.Net.DataType,System.Int32,System.Int32,System.Int32,System.Int32)">
  898. <summary>
  899. Write a single bit to a DB with the specified index.
  900. </summary>
  901. <param name="dataType">Data type of the memory area, can be DB, Timer, Counter, Merker(Memory), Input, Output.</param>
  902. <param name="db">Address of the memory area (if you want to write DB1, this is set to 1). This must be set also for other memory area types: counters, timers,etc.</param>
  903. <param name="startByteAdr">Start byte address. If you want to write DB1.DBW200, this is 200.</param>
  904. <param name="bitAdr">The address of the bit. (0-7)</param>
  905. <param name="value">Value to write (0 or 1).</param>
  906. </member>
  907. <member name="M:S7.Net.Plc.Write(S7.Net.DataType,System.Int32,System.Int32,System.Object,System.Int32)">
  908. <summary>
  909. Takes in input an object and tries to parse it to an array of values. This can be used to write many data, all of the same type.
  910. You must specify the memory area type, memory are address, byte start address and bytes count.
  911. If the read was not successful, check LastErrorCode or LastErrorString.
  912. </summary>
  913. <param name="dataType">Data type of the memory area, can be DB, Timer, Counter, Merker(Memory), Input, Output.</param>
  914. <param name="db">Address of the memory area (if you want to read DB1, this is set to 1). This must be set also for other memory area types: counters, timers,etc.</param>
  915. <param name="startByteAdr">Start byte address. If you want to read DB1.DBW200, this is 200.</param>
  916. <param name="value">Bytes to write. The lenght of this parameter can't be higher than 200. If you need more, use recursion.</param>
  917. <param name="bitAdr">The address of the bit. (0-7)</param>
  918. </member>
  919. <member name="M:S7.Net.Plc.Write(System.String,System.Object)">
  920. <summary>
  921. Writes a single variable from the PLC, takes in input strings like "DB1.DBX0.0", "DB20.DBD200", "MB20", "T45", etc.
  922. </summary>
  923. <param name="variable">Input strings like "DB1.DBX0.0", "DB20.DBD200", "MB20", "T45", etc.</param>
  924. <param name="value">Value to be written to the PLC</param>
  925. </member>
  926. <member name="M:S7.Net.Plc.WriteStruct(System.Object,System.Int32,System.Int32)">
  927. <summary>
  928. Writes a C# struct to a DB in the PLC
  929. </summary>
  930. <param name="structValue">The struct to be written</param>
  931. <param name="db">Db address</param>
  932. <param name="startByteAdr">Start bytes on the PLC</param>
  933. </member>
  934. <member name="M:S7.Net.Plc.WriteClass(System.Object,System.Int32,System.Int32)">
  935. <summary>
  936. Writes a C# class to a DB in the PLC
  937. </summary>
  938. <param name="classValue">The class to be written</param>
  939. <param name="db">Db address</param>
  940. <param name="startByteAdr">Start bytes on the PLC</param>
  941. </member>
  942. <member name="M:S7.Net.Plc.Write(S7.Net.Types.DataItem[])">
  943. <summary>
  944. Write DataItem(s) to the PLC. Throws an exception if the response is invalid
  945. or when the PLC reports errors for item(s) written.
  946. </summary>
  947. <param name="dataItems">The DataItem(s) to write to the PLC.</param>
  948. </member>
  949. <member name="M:S7.Net.Plc.ReadMultipleVars(System.Collections.Generic.List{S7.Net.Types.DataItem})">
  950. <summary>
  951. Reads multiple vars in a single request.
  952. You have to create and pass a list of DataItems and you obtain in response the same list with the values.
  953. Values are stored in the property "Value" of the dataItem and are already converted.
  954. If you don't want the conversion, just create a dataItem of bytes.
  955. The number of DataItems as well as the total size of the requested data can not exceed a certain limit (protocol restriction).
  956. </summary>
  957. <param name="dataItems">List of dataitems that contains the list of variables that must be read.</param>
  958. </member>
  959. <member name="M:S7.Net.Plc.ReadStatus">
  960. <summary>
  961. Read the current status from the PLC. A value of 0x08 indicates the PLC is in run status, regardless of the PLC type.
  962. </summary>
  963. <returns>The current PLC status.</returns>
  964. </member>
  965. <member name="T:S7.Net.Protocol.S7.DataItemAddress">
  966. <summary>
  967. Represents an area of memory in the PLC
  968. </summary>
  969. </member>
  970. <member name="P:S7.Net.Protocol.S7.DataItemAddress.DataType">
  971. <summary>
  972. Memory area to read
  973. </summary>
  974. </member>
  975. <member name="P:S7.Net.Protocol.S7.DataItemAddress.DB">
  976. <summary>
  977. Address of memory area to read (example: for DB1 this value is 1, for T45 this value is 45)
  978. </summary>
  979. </member>
  980. <member name="P:S7.Net.Protocol.S7.DataItemAddress.StartByteAddress">
  981. <summary>
  982. Address of the first byte to read
  983. </summary>
  984. </member>
  985. <member name="P:S7.Net.Protocol.S7.DataItemAddress.ByteLength">
  986. <summary>
  987. Length of data to read
  988. </summary>
  989. </member>
  990. <member name="T:S7.Net.Protocol.Tsap">
  991. <summary>
  992. Provides a representation of the Transport Service Access Point, or TSAP in short. TSAP's are used
  993. to specify a client and server address. For most PLC types a default TSAP is available that allows
  994. connection from any IP and can be calculated using the rack and slot numbers.
  995. </summary>
  996. </member>
  997. <member name="P:S7.Net.Protocol.Tsap.FirstByte">
  998. <summary>
  999. First byte of the TSAP.
  1000. </summary>
  1001. </member>
  1002. <member name="P:S7.Net.Protocol.Tsap.SecondByte">
  1003. <summary>
  1004. Second byte of the TSAP.
  1005. </summary>
  1006. </member>
  1007. <member name="M:S7.Net.Protocol.Tsap.#ctor(System.Byte,System.Byte)">
  1008. <summary>
  1009. Initializes a new instance of the <see cref="T:S7.Net.Protocol.Tsap" /> class using the specified values.
  1010. </summary>
  1011. <param name="firstByte">The first byte of the TSAP.</param>
  1012. <param name="secondByte">The second byte of the TSAP.</param>
  1013. </member>
  1014. <member name="T:S7.Net.Protocol.TsapPair">
  1015. <summary>
  1016. Implements a pair of TSAP addresses used to connect to a PLC.
  1017. </summary>
  1018. </member>
  1019. <member name="P:S7.Net.Protocol.TsapPair.Local">
  1020. <summary>
  1021. The local <see cref="T:S7.Net.Protocol.Tsap" />.
  1022. </summary>
  1023. </member>
  1024. <member name="P:S7.Net.Protocol.TsapPair.Remote">
  1025. <summary>
  1026. The remote <see cref="T:S7.Net.Protocol.Tsap" />
  1027. </summary>
  1028. </member>
  1029. <member name="M:S7.Net.Protocol.TsapPair.#ctor(S7.Net.Protocol.Tsap,S7.Net.Protocol.Tsap)">
  1030. <summary>
  1031. Initializes a new instance of the <see cref="T:S7.Net.Protocol.TsapPair" /> class using the specified local and
  1032. remote TSAP.
  1033. </summary>
  1034. <param name="local">The local TSAP.</param>
  1035. <param name="remote">The remote TSAP.</param>
  1036. </member>
  1037. <member name="M:S7.Net.Protocol.TsapPair.GetDefaultTsapPair(S7.Net.CpuType,System.Int32,System.Int32)">
  1038. <summary>
  1039. Builds a <see cref="T:S7.Net.Protocol.TsapPair" /> that can be used to connect to a PLC using the default connection
  1040. addresses.
  1041. </summary>
  1042. <remarks>
  1043. The remote TSAP is constructed using <code>new Tsap(0x03, (byte) ((rack &lt;&lt; 5) | slot))</code>.
  1044. </remarks>
  1045. <param name="cpuType">The CPU type of the PLC.</param>
  1046. <param name="rack">The rack of the PLC's network card.</param>
  1047. <param name="slot">The slot of the PLC's network card.</param>
  1048. <returns>A TSAP pair that matches the given parameters.</returns>
  1049. <exception cref="T:System.ArgumentOutOfRangeException">The <paramref name="cpuType"/> is invalid.
  1050. -or-
  1051. The <paramref name="rack"/> parameter is less than 0.
  1052. -or-
  1053. The <paramref name="rack"/> parameter is greater than 15.
  1054. -or-
  1055. The <paramref name="slot"/> parameter is less than 0.
  1056. -or-
  1057. The <paramref name="slot"/> parameter is greater than 15.</exception>
  1058. </member>
  1059. <member name="T:S7.Net.StreamExtensions">
  1060. <summary>
  1061. Extensions for Streams
  1062. </summary>
  1063. </member>
  1064. <member name="M:S7.Net.StreamExtensions.ReadExact(System.IO.Stream,System.Byte[],System.Int32,System.Int32)">
  1065. <summary>
  1066. Reads bytes from the stream into the buffer until exactly the requested number of bytes (or EOF) have been read
  1067. </summary>
  1068. <param name="stream">the Stream to read from</param>
  1069. <param name="buffer">the buffer to read into</param>
  1070. <param name="offset">the offset in the buffer to read into</param>
  1071. <param name="count">the amount of bytes to read into the buffer</param>
  1072. <returns>returns the amount of read bytes</returns>
  1073. </member>
  1074. <member name="M:S7.Net.StreamExtensions.ReadExactAsync(System.IO.Stream,System.Byte[],System.Int32,System.Int32,System.Threading.CancellationToken)">
  1075. <summary>
  1076. Reads bytes from the stream into the buffer until exactly the requested number of bytes (or EOF) have been read
  1077. </summary>
  1078. <param name="stream">the Stream to read from</param>
  1079. <param name="buffer">the buffer to read into</param>
  1080. <param name="offset">the offset in the buffer to read into</param>
  1081. <param name="count">the amount of bytes to read into the buffer</param>
  1082. <param name="cancellationToken">A cancellation token that can be used to cancel the asynchronous operation.</param>
  1083. <returns>returns the amount of read bytes</returns>
  1084. </member>
  1085. <member name="T:S7.Net.TPKT">
  1086. <summary>
  1087. Describes a TPKT Packet
  1088. </summary>
  1089. </member>
  1090. <member name="M:S7.Net.TPKT.ReadAsync(System.IO.Stream,System.Threading.CancellationToken)">
  1091. <summary>
  1092. Reads a TPKT from the socket Async
  1093. </summary>
  1094. <param name="stream">The stream to read from</param>
  1095. <param name="cancellationToken">A cancellation token that can be used to cancel the asynchronous operation.</param>
  1096. <returns>Task TPKT Instace</returns>
  1097. </member>
  1098. <member name="T:S7.Net.Types.Bit">
  1099. <summary>
  1100. Contains the conversion methods to convert Bit from S7 plc to C#.
  1101. </summary>
  1102. </member>
  1103. <member name="M:S7.Net.Types.Bit.FromByte(System.Byte,System.Byte)">
  1104. <summary>
  1105. Converts a Bit to bool
  1106. </summary>
  1107. </member>
  1108. <member name="M:S7.Net.Types.Bit.ToBitArray(System.Byte[])">
  1109. <summary>
  1110. Converts an array of bytes to a BitArray.
  1111. </summary>
  1112. <param name="bytes">The bytes to convert.</param>
  1113. <returns>A BitArray with the same number of bits and equal values as <paramref name="bytes"/>.</returns>
  1114. </member>
  1115. <member name="M:S7.Net.Types.Bit.ToBitArray(System.Byte[],System.Int32)">
  1116. <summary>
  1117. Converts an array of bytes to a BitArray.
  1118. </summary>
  1119. <param name="bytes">The bytes to convert.</param>
  1120. <param name="length">The number of bits to return.</param>
  1121. <returns>A BitArray with <paramref name="length"/> bits.</returns>
  1122. </member>
  1123. <member name="T:S7.Net.Types.Boolean">
  1124. <summary>
  1125. Contains the methods to read, set and reset bits inside bytes
  1126. </summary>
  1127. </member>
  1128. <member name="M:S7.Net.Types.Boolean.GetValue(System.Byte,System.Int32)">
  1129. <summary>
  1130. Returns the value of a bit in a bit, given the address of the bit
  1131. </summary>
  1132. </member>
  1133. <member name="M:S7.Net.Types.Boolean.SetBit(System.Byte,System.Int32)">
  1134. <summary>
  1135. Sets the value of a bit to 1 (true), given the address of the bit. Returns
  1136. a copy of the value with the bit set.
  1137. </summary>
  1138. <param name="value">The input value to modify.</param>
  1139. <param name="bit">The index (zero based) of the bit to set.</param>
  1140. <returns>The modified value with the bit at index set.</returns>
  1141. </member>
  1142. <member name="M:S7.Net.Types.Boolean.SetBit(System.Byte@,System.Int32)">
  1143. <summary>
  1144. Sets the value of a bit to 1 (true), given the address of the bit.
  1145. </summary>
  1146. <param name="value">The value to modify.</param>
  1147. <param name="bit">The index (zero based) of the bit to set.</param>
  1148. </member>
  1149. <member name="M:S7.Net.Types.Boolean.ClearBit(System.Byte,System.Int32)">
  1150. <summary>
  1151. Resets the value of a bit to 0 (false), given the address of the bit. Returns
  1152. a copy of the value with the bit cleared.
  1153. </summary>
  1154. <param name="value">The input value to modify.</param>
  1155. <param name="bit">The index (zero based) of the bit to clear.</param>
  1156. <returns>The modified value with the bit at index cleared.</returns>
  1157. </member>
  1158. <member name="M:S7.Net.Types.Boolean.ClearBit(System.Byte@,System.Int32)">
  1159. <summary>
  1160. Resets the value of a bit to 0 (false), given the address of the bit
  1161. </summary>
  1162. <param name="value">The input value to modify.</param>
  1163. <param name="bit">The index (zero based) of the bit to clear.</param>
  1164. </member>
  1165. <member name="T:S7.Net.Types.Byte">
  1166. <summary>
  1167. Contains the methods to convert from bytes to byte arrays
  1168. </summary>
  1169. </member>
  1170. <member name="M:S7.Net.Types.Byte.ToByteArray(System.Byte)">
  1171. <summary>
  1172. Converts a byte to byte array
  1173. </summary>
  1174. </member>
  1175. <member name="M:S7.Net.Types.Byte.FromByteArray(System.Byte[])">
  1176. <summary>
  1177. Converts a byte array to byte
  1178. </summary>
  1179. <param name="bytes"></param>
  1180. <returns></returns>
  1181. </member>
  1182. <member name="T:S7.Net.Types.Class">
  1183. <summary>
  1184. Contains the methods to convert a C# class to S7 data types
  1185. </summary>
  1186. </member>
  1187. <member name="M:S7.Net.Types.Class.GetClassSize(System.Object,System.Double,System.Boolean)">
  1188. <summary>
  1189. Gets the size of the class in bytes.
  1190. </summary>
  1191. <param name="instance">An instance of the class</param>
  1192. <param name="numBytes">The offset of the current field.</param>
  1193. <param name="isInnerProperty"><see langword="true" /> if this property belongs to a class being serialized as member of the class requested for serialization; otherwise, <see langword="false" />.</param>
  1194. <returns>the number of bytes</returns>
  1195. </member>
  1196. <member name="M:S7.Net.Types.Class.FromBytes(System.Object,System.Byte[],System.Double,System.Boolean)">
  1197. <summary>
  1198. Sets the object's values with the given array of bytes
  1199. </summary>
  1200. <param name="sourceClass">The object to fill in the given array of bytes</param>
  1201. <param name="bytes">The array of bytes</param>
  1202. <param name="numBytes">The offset for the current field.</param>
  1203. <param name="isInnerClass"><see langword="true" /> if this class is the type of a member of the class to be serialized; otherwise, <see langword="false" />.</param>
  1204. </member>
  1205. <member name="M:S7.Net.Types.Class.ToBytes(System.Object,System.Byte[],System.Double)">
  1206. <summary>
  1207. Creates a byte array depending on the struct type.
  1208. </summary>
  1209. <param name="sourceClass">The struct object.</param>
  1210. <param name="bytes">The target byte array.</param>
  1211. <param name="numBytes">The offset for the current field.</param>
  1212. <returns>A byte array or null if fails.</returns>
  1213. </member>
  1214. <member name="T:S7.Net.Types.Counter">
  1215. <summary>
  1216. Contains the conversion methods to convert Counter from S7 plc to C# ushort (UInt16).
  1217. </summary>
  1218. </member>
  1219. <member name="M:S7.Net.Types.Counter.FromByteArray(System.Byte[])">
  1220. <summary>
  1221. Converts a Counter (2 bytes) to ushort (UInt16)
  1222. </summary>
  1223. </member>
  1224. <member name="M:S7.Net.Types.Counter.ToByteArray(System.UInt16)">
  1225. <summary>
  1226. Converts a ushort (UInt16) to word (2 bytes)
  1227. </summary>
  1228. </member>
  1229. <member name="M:S7.Net.Types.Counter.ToByteArray(System.UInt16[])">
  1230. <summary>
  1231. Converts an array of ushort (UInt16) to an array of bytes
  1232. </summary>
  1233. </member>
  1234. <member name="M:S7.Net.Types.Counter.ToArray(System.Byte[])">
  1235. <summary>
  1236. Converts an array of bytes to an array of ushort
  1237. </summary>
  1238. </member>
  1239. <member name="T:S7.Net.Types.DataItem">
  1240. <summary>
  1241. Create an instance of a memory block that can be read by using ReadMultipleVars
  1242. </summary>
  1243. </member>
  1244. <member name="P:S7.Net.Types.DataItem.DataType">
  1245. <summary>
  1246. Memory area to read
  1247. </summary>
  1248. </member>
  1249. <member name="P:S7.Net.Types.DataItem.VarType">
  1250. <summary>
  1251. Type of data to be read (default is bytes)
  1252. </summary>
  1253. </member>
  1254. <member name="P:S7.Net.Types.DataItem.DB">
  1255. <summary>
  1256. Address of memory area to read (example: for DB1 this value is 1, for T45 this value is 45)
  1257. </summary>
  1258. </member>
  1259. <member name="P:S7.Net.Types.DataItem.StartByteAdr">
  1260. <summary>
  1261. Address of the first byte to read
  1262. </summary>
  1263. </member>
  1264. <member name="P:S7.Net.Types.DataItem.BitAdr">
  1265. <summary>
  1266. Addess of bit to read from StartByteAdr
  1267. </summary>
  1268. </member>
  1269. <member name="P:S7.Net.Types.DataItem.Count">
  1270. <summary>
  1271. Number of variables to read
  1272. </summary>
  1273. </member>
  1274. <member name="P:S7.Net.Types.DataItem.Value">
  1275. <summary>
  1276. Contains the value of the memory area after the read has been executed
  1277. </summary>
  1278. </member>
  1279. <member name="M:S7.Net.Types.DataItem.#ctor">
  1280. <summary>
  1281. Create an instance of DataItem
  1282. </summary>
  1283. </member>
  1284. <member name="M:S7.Net.Types.DataItem.FromAddress(System.String)">
  1285. <summary>
  1286. Create an instance of <see cref="T:S7.Net.Types.DataItem"/> from the supplied address.
  1287. </summary>
  1288. <param name="address">The address to create the DataItem for.</param>
  1289. <returns>A new <see cref="T:S7.Net.Types.DataItem"/> instance with properties parsed from <paramref name="address"/>.</returns>
  1290. <remarks>The <see cref="P:S7.Net.Types.DataItem.Count" /> property is not parsed from the address.</remarks>
  1291. </member>
  1292. <member name="M:S7.Net.Types.DataItem.FromAddressAndValue``1(System.String,``0)">
  1293. <summary>
  1294. Create an instance of <see cref="T:S7.Net.Types.DataItem"/> from the supplied address and value.
  1295. </summary>
  1296. <param name="address">The address to create the DataItem for.</param>
  1297. <param name="value">The value to be applied to the DataItem.</param>
  1298. <returns>A new <see cref="T:S7.Net.Types.DataItem"/> instance with properties parsed from <paramref name="address"/> and the supplied value set.</returns>
  1299. </member>
  1300. <member name="T:S7.Net.Types.DateTime">
  1301. <summary>
  1302. Contains the methods to convert between <see cref="T:System.DateTime"/> and S7 representation of datetime values.
  1303. </summary>
  1304. </member>
  1305. <member name="F:S7.Net.Types.DateTime.SpecMinimumDateTime">
  1306. <summary>
  1307. The minimum <see cref="T:System.DateTime"/> value supported by the specification.
  1308. </summary>
  1309. </member>
  1310. <member name="F:S7.Net.Types.DateTime.SpecMaximumDateTime">
  1311. <summary>
  1312. The maximum <see cref="T:System.DateTime"/> value supported by the specification.
  1313. </summary>
  1314. </member>
  1315. <member name="M:S7.Net.Types.DateTime.FromByteArray(System.Byte[])">
  1316. <summary>
  1317. Parses a <see cref="T:System.DateTime"/> value from bytes.
  1318. </summary>
  1319. <param name="bytes">Input bytes read from PLC.</param>
  1320. <returns>A <see cref="T:System.DateTime"/> object representing the value read from PLC.</returns>
  1321. <exception cref="T:System.ArgumentOutOfRangeException">Thrown when the length of
  1322. <paramref name="bytes"/> is not 8 or any value in <paramref name="bytes"/>
  1323. is outside the valid range of values.</exception>
  1324. </member>
  1325. <member name="M:S7.Net.Types.DateTime.ToArray(System.Byte[])">
  1326. <summary>
  1327. Parses an array of <see cref="T:System.DateTime"/> values from bytes.
  1328. </summary>
  1329. <param name="bytes">Input bytes read from PLC.</param>
  1330. <returns>An array of <see cref="T:System.DateTime"/> objects representing the values read from PLC.</returns>
  1331. <exception cref="T:System.ArgumentOutOfRangeException">Thrown when the length of
  1332. <paramref name="bytes"/> is not a multiple of 8 or any value in
  1333. <paramref name="bytes"/> is outside the valid range of values.</exception>
  1334. </member>
  1335. <member name="M:S7.Net.Types.DateTime.ToByteArray(System.DateTime)">
  1336. <summary>
  1337. Converts a <see cref="T:System.DateTime"/> value to a byte array.
  1338. </summary>
  1339. <param name="dateTime">The DateTime value to convert.</param>
  1340. <returns>A byte array containing the S7 date time representation of <paramref name="dateTime"/>.</returns>
  1341. <exception cref="T:System.ArgumentOutOfRangeException">Thrown when the value of
  1342. <paramref name="dateTime"/> is before <see cref="P:SpecMinimumDateTime"/>
  1343. or after <see cref="P:SpecMaximumDateTime"/>.</exception>
  1344. </member>
  1345. <member name="M:S7.Net.Types.DateTime.ToByteArray(System.DateTime[])">
  1346. <summary>
  1347. Converts an array of <see cref="T:System.DateTime"/> values to a byte array.
  1348. </summary>
  1349. <param name="dateTimes">The DateTime values to convert.</param>
  1350. <returns>A byte array containing the S7 date time representations of <paramref name="dateTimes"/>.</returns>
  1351. <exception cref="T:System.ArgumentOutOfRangeException">Thrown when any value of
  1352. <paramref name="dateTimes"/> is before <see cref="P:SpecMinimumDateTime"/>
  1353. or after <see cref="P:SpecMaximumDateTime"/>.</exception>
  1354. </member>
  1355. <member name="T:S7.Net.Types.DateTimeLong">
  1356. <summary>
  1357. Contains the methods to convert between <see cref="T:System.DateTime" /> and S7 representation of DateTimeLong (DTL) values.
  1358. </summary>
  1359. </member>
  1360. <member name="F:S7.Net.Types.DateTimeLong.SpecMinimumDateTime">
  1361. <summary>
  1362. The minimum <see cref="T:System.DateTime" /> value supported by the specification.
  1363. </summary>
  1364. </member>
  1365. <member name="F:S7.Net.Types.DateTimeLong.SpecMaximumDateTime">
  1366. <summary>
  1367. The maximum <see cref="T:System.DateTime" /> value supported by the specification.
  1368. </summary>
  1369. </member>
  1370. <member name="M:S7.Net.Types.DateTimeLong.FromByteArray(System.Byte[])">
  1371. <summary>
  1372. Parses a <see cref="T:System.DateTime" /> value from bytes.
  1373. </summary>
  1374. <param name="bytes">Input bytes read from PLC.</param>
  1375. <returns>A <see cref="T:System.DateTime" /> object representing the value read from PLC.</returns>
  1376. <exception cref="T:System.ArgumentOutOfRangeException">
  1377. Thrown when the length of
  1378. <paramref name="bytes" /> is not 12 or any value in <paramref name="bytes" />
  1379. is outside the valid range of values.
  1380. </exception>
  1381. </member>
  1382. <member name="M:S7.Net.Types.DateTimeLong.ToArray(System.Byte[])">
  1383. <summary>
  1384. Parses an array of <see cref="T:System.DateTime" /> values from bytes.
  1385. </summary>
  1386. <param name="bytes">Input bytes read from PLC.</param>
  1387. <returns>An array of <see cref="T:System.DateTime" /> objects representing the values read from PLC.</returns>
  1388. <exception cref="T:System.ArgumentOutOfRangeException">
  1389. Thrown when the length of
  1390. <paramref name="bytes" /> is not a multiple of 12 or any value in
  1391. <paramref name="bytes" /> is outside the valid range of values.
  1392. </exception>
  1393. </member>
  1394. <member name="M:S7.Net.Types.DateTimeLong.ToByteArray(System.DateTime)">
  1395. <summary>
  1396. Converts a <see cref="T:System.DateTime" /> value to a byte array.
  1397. </summary>
  1398. <param name="dateTime">The DateTime value to convert.</param>
  1399. <returns>A byte array containing the S7 DateTimeLong representation of <paramref name="dateTime" />.</returns>
  1400. <exception cref="T:System.ArgumentOutOfRangeException">
  1401. Thrown when the value of
  1402. <paramref name="dateTime" /> is before <see cref="P:SpecMinimumDateTime" />
  1403. or after <see cref="P:SpecMaximumDateTime" />.
  1404. </exception>
  1405. </member>
  1406. <member name="M:S7.Net.Types.DateTimeLong.ToByteArray(System.DateTime[])">
  1407. <summary>
  1408. Converts an array of <see cref="T:System.DateTime" /> values to a byte array.
  1409. </summary>
  1410. <param name="dateTimes">The DateTime values to convert.</param>
  1411. <returns>A byte array containing the S7 DateTimeLong representations of <paramref name="dateTimes" />.</returns>
  1412. <exception cref="T:System.ArgumentOutOfRangeException">
  1413. Thrown when any value of
  1414. <paramref name="dateTimes" /> is before <see cref="P:SpecMinimumDateTime" />
  1415. or after <see cref="P:SpecMaximumDateTime" />.
  1416. </exception>
  1417. </member>
  1418. <member name="T:S7.Net.Types.DInt">
  1419. <summary>
  1420. Contains the conversion methods to convert DInt from S7 plc to C# int (Int32).
  1421. </summary>
  1422. </member>
  1423. <member name="M:S7.Net.Types.DInt.FromByteArray(System.Byte[])">
  1424. <summary>
  1425. Converts a S7 DInt (4 bytes) to int (Int32)
  1426. </summary>
  1427. </member>
  1428. <member name="M:S7.Net.Types.DInt.ToByteArray(System.Int32)">
  1429. <summary>
  1430. Converts a int (Int32) to S7 DInt (4 bytes)
  1431. </summary>
  1432. </member>
  1433. <member name="M:S7.Net.Types.DInt.ToByteArray(System.Int32[])">
  1434. <summary>
  1435. Converts an array of int (Int32) to an array of bytes
  1436. </summary>
  1437. </member>
  1438. <member name="M:S7.Net.Types.DInt.ToArray(System.Byte[])">
  1439. <summary>
  1440. Converts an array of S7 DInt to an array of int (Int32)
  1441. </summary>
  1442. </member>
  1443. <member name="T:S7.Net.Types.Double">
  1444. <summary>
  1445. Contains the conversion methods to convert Real from S7 plc to C# double.
  1446. </summary>
  1447. </member>
  1448. <member name="M:S7.Net.Types.Double.FromByteArray(System.Byte[])">
  1449. <summary>
  1450. Converts a S7 Real (4 bytes) to double
  1451. </summary>
  1452. </member>
  1453. <member name="M:S7.Net.Types.Double.FromDWord(System.Int32)">
  1454. <summary>
  1455. Converts a S7 DInt to double
  1456. </summary>
  1457. </member>
  1458. <member name="M:S7.Net.Types.Double.FromDWord(System.UInt32)">
  1459. <summary>
  1460. Converts a S7 DWord to double
  1461. </summary>
  1462. </member>
  1463. <member name="M:S7.Net.Types.Double.ToByteArray(System.Double)">
  1464. <summary>
  1465. Converts a double to S7 Real (4 bytes)
  1466. </summary>
  1467. </member>
  1468. <member name="M:S7.Net.Types.Double.ToByteArray(System.Double[])">
  1469. <summary>
  1470. Converts an array of double to an array of bytes
  1471. </summary>
  1472. </member>
  1473. <member name="M:S7.Net.Types.Double.ToArray(System.Byte[])">
  1474. <summary>
  1475. Converts an array of S7 Real to an array of double
  1476. </summary>
  1477. </member>
  1478. <member name="T:S7.Net.Types.DWord">
  1479. <summary>
  1480. Contains the conversion methods to convert DWord from S7 plc to C#.
  1481. </summary>
  1482. </member>
  1483. <member name="M:S7.Net.Types.DWord.FromByteArray(System.Byte[])">
  1484. <summary>
  1485. Converts a S7 DWord (4 bytes) to uint (UInt32)
  1486. </summary>
  1487. </member>
  1488. <member name="M:S7.Net.Types.DWord.FromBytes(System.Byte,System.Byte,System.Byte,System.Byte)">
  1489. <summary>
  1490. Converts 4 bytes to DWord (UInt32)
  1491. </summary>
  1492. </member>
  1493. <member name="M:S7.Net.Types.DWord.ToByteArray(System.UInt32)">
  1494. <summary>
  1495. Converts a uint (UInt32) to S7 DWord (4 bytes)
  1496. </summary>
  1497. </member>
  1498. <member name="M:S7.Net.Types.DWord.ToByteArray(System.UInt32[])">
  1499. <summary>
  1500. Converts an array of uint (UInt32) to an array of S7 DWord (4 bytes)
  1501. </summary>
  1502. </member>
  1503. <member name="M:S7.Net.Types.DWord.ToArray(System.Byte[])">
  1504. <summary>
  1505. Converts an array of S7 DWord to an array of uint (UInt32)
  1506. </summary>
  1507. </member>
  1508. <member name="T:S7.Net.Types.Int">
  1509. <summary>
  1510. Contains the conversion methods to convert Int from S7 plc to C#.
  1511. </summary>
  1512. </member>
  1513. <member name="M:S7.Net.Types.Int.FromByteArray(System.Byte[])">
  1514. <summary>
  1515. Converts a S7 Int (2 bytes) to short (Int16)
  1516. </summary>
  1517. </member>
  1518. <member name="M:S7.Net.Types.Int.ToByteArray(System.Int16)">
  1519. <summary>
  1520. Converts a short (Int16) to a S7 Int byte array (2 bytes)
  1521. </summary>
  1522. </member>
  1523. <member name="M:S7.Net.Types.Int.ToByteArray(System.Int16[])">
  1524. <summary>
  1525. Converts an array of short (Int16) to a S7 Int byte array (2 bytes)
  1526. </summary>
  1527. </member>
  1528. <member name="M:S7.Net.Types.Int.ToArray(System.Byte[])">
  1529. <summary>
  1530. Converts an array of S7 Int to an array of short (Int16)
  1531. </summary>
  1532. </member>
  1533. <member name="M:S7.Net.Types.Int.CWord(System.Int32)">
  1534. <summary>
  1535. Converts a C# int value to a C# short value, to be used as word.
  1536. </summary>
  1537. <param name="value"></param>
  1538. <returns></returns>
  1539. </member>
  1540. <member name="T:S7.Net.Types.LReal">
  1541. <summary>
  1542. Contains the conversion methods to convert Real from S7 plc to C# double.
  1543. </summary>
  1544. </member>
  1545. <member name="M:S7.Net.Types.LReal.FromByteArray(System.Byte[])">
  1546. <summary>
  1547. Converts a S7 LReal (8 bytes) to double
  1548. </summary>
  1549. </member>
  1550. <member name="M:S7.Net.Types.LReal.ToByteArray(System.Double)">
  1551. <summary>
  1552. Converts a double to S7 LReal (8 bytes)
  1553. </summary>
  1554. </member>
  1555. <member name="M:S7.Net.Types.LReal.ToByteArray(System.Double[])">
  1556. <summary>
  1557. Converts an array of double to an array of bytes
  1558. </summary>
  1559. </member>
  1560. <member name="M:S7.Net.Types.LReal.ToArray(System.Byte[])">
  1561. <summary>
  1562. Converts an array of S7 LReal to an array of double
  1563. </summary>
  1564. </member>
  1565. <member name="T:S7.Net.Types.Real">
  1566. <summary>
  1567. Contains the conversion methods to convert Real from S7 plc to C# double.
  1568. </summary>
  1569. </member>
  1570. <member name="M:S7.Net.Types.Real.FromByteArray(System.Byte[])">
  1571. <summary>
  1572. Converts a S7 Real (4 bytes) to float
  1573. </summary>
  1574. </member>
  1575. <member name="M:S7.Net.Types.Real.ToByteArray(System.Single)">
  1576. <summary>
  1577. Converts a float to S7 Real (4 bytes)
  1578. </summary>
  1579. </member>
  1580. <member name="M:S7.Net.Types.Real.ToByteArray(System.Single[])">
  1581. <summary>
  1582. Converts an array of float to an array of bytes
  1583. </summary>
  1584. </member>
  1585. <member name="M:S7.Net.Types.Real.ToArray(System.Byte[])">
  1586. <summary>
  1587. Converts an array of S7 Real to an array of float
  1588. </summary>
  1589. </member>
  1590. <member name="T:S7.Net.Types.S7String">
  1591. <summary>
  1592. Contains the methods to convert from S7 strings to C# strings
  1593. An S7 String has a preceeding 2 byte header containing its capacity and length
  1594. </summary>
  1595. </member>
  1596. <member name="P:S7.Net.Types.S7String.StringEncoding">
  1597. <summary>
  1598. The Encoding used when serializing and deserializing S7String (Encoding.ASCII by default)
  1599. </summary>
  1600. <exception cref="T:System.ArgumentNullException">StringEncoding must not be null</exception>
  1601. </member>
  1602. <member name="M:S7.Net.Types.S7String.FromByteArray(System.Byte[])">
  1603. <summary>
  1604. Converts S7 bytes to a string
  1605. </summary>
  1606. <param name="bytes"></param>
  1607. <returns></returns>
  1608. </member>
  1609. <member name="M:S7.Net.Types.S7String.ToByteArray(System.String,System.Int32)">
  1610. <summary>
  1611. Converts a <see cref="T:string"/> to S7 string with 2-byte header.
  1612. </summary>
  1613. <param name="value">The string to convert to byte array.</param>
  1614. <param name="reservedLength">The length (in characters) allocated in PLC for the string.</param>
  1615. <returns>A <see cref="T:byte[]" /> containing the string header and string value with a maximum length of <paramref name="reservedLength"/> + 2.</returns>
  1616. </member>
  1617. <member name="M:S7.Net.Types.S7StringAttribute.#ctor(S7.Net.Types.S7StringType,System.Int32)">
  1618. <summary>
  1619. Initializes a new instance of the <see cref="T:S7.Net.Types.S7StringAttribute"/> class.
  1620. </summary>
  1621. <param name="type">The string type.</param>
  1622. <param name="reservedLength">Reserved length of the string in characters.</param>
  1623. <exception cref="T:System.ArgumentException">Please use a valid value for the string type</exception>
  1624. </member>
  1625. <member name="P:S7.Net.Types.S7StringAttribute.Type">
  1626. <summary>
  1627. Gets the type of the string.
  1628. </summary>
  1629. <value>
  1630. The string type.
  1631. </value>
  1632. </member>
  1633. <member name="P:S7.Net.Types.S7StringAttribute.ReservedLength">
  1634. <summary>
  1635. Gets the reserved length of the string in characters.
  1636. </summary>
  1637. <value>
  1638. The reserved length of the string in characters.
  1639. </value>
  1640. </member>
  1641. <member name="P:S7.Net.Types.S7StringAttribute.ReservedLengthInBytes">
  1642. <summary>
  1643. Gets the reserved length in bytes.
  1644. </summary>
  1645. <value>
  1646. The reserved length in bytes.
  1647. </value>
  1648. </member>
  1649. <member name="T:S7.Net.Types.S7StringType">
  1650. <summary>
  1651. String type.
  1652. </summary>
  1653. </member>
  1654. <member name="F:S7.Net.Types.S7StringType.S7String">
  1655. <summary>
  1656. ASCII string.
  1657. </summary>
  1658. </member>
  1659. <member name="F:S7.Net.Types.S7StringType.S7WString">
  1660. <summary>
  1661. Unicode string.
  1662. </summary>
  1663. </member>
  1664. <member name="T:S7.Net.Types.S7WString">
  1665. <summary>
  1666. Contains the methods to convert from S7 wstrings to C# strings
  1667. An S7 WString has a preceding 4 byte header containing its capacity and length
  1668. </summary>
  1669. </member>
  1670. <member name="M:S7.Net.Types.S7WString.FromByteArray(System.Byte[])">
  1671. <summary>
  1672. Converts S7 bytes to a string
  1673. </summary>
  1674. <param name="bytes"></param>
  1675. <returns></returns>
  1676. </member>
  1677. <member name="M:S7.Net.Types.S7WString.ToByteArray(System.String,System.Int32)">
  1678. <summary>
  1679. Converts a <see cref="T:string"/> to S7 wstring with 4-byte header.
  1680. </summary>
  1681. <param name="value">The string to convert to byte array.</param>
  1682. <param name="reservedLength">The length (in characters) allocated in PLC for the string.</param>
  1683. <returns>A <see cref="T:byte[]" /> containing the string header and string value with a maximum length of <paramref name="reservedLength"/> + 4.</returns>
  1684. </member>
  1685. <member name="T:S7.Net.Types.Single">
  1686. <summary>
  1687. Contains the conversion methods to convert Real from S7 plc to C# float.
  1688. </summary>
  1689. </member>
  1690. <member name="M:S7.Net.Types.Single.FromByteArray(System.Byte[])">
  1691. <summary>
  1692. Converts a S7 Real (4 bytes) to float
  1693. </summary>
  1694. </member>
  1695. <member name="M:S7.Net.Types.Single.FromDWord(System.Int32)">
  1696. <summary>
  1697. Converts a S7 DInt to float
  1698. </summary>
  1699. </member>
  1700. <member name="M:S7.Net.Types.Single.FromDWord(System.UInt32)">
  1701. <summary>
  1702. Converts a S7 DWord to float
  1703. </summary>
  1704. </member>
  1705. <member name="M:S7.Net.Types.Single.ToByteArray(System.Single)">
  1706. <summary>
  1707. Converts a double to S7 Real (4 bytes)
  1708. </summary>
  1709. </member>
  1710. <member name="M:S7.Net.Types.Single.ToByteArray(System.Single[])">
  1711. <summary>
  1712. Converts an array of float to an array of bytes
  1713. </summary>
  1714. </member>
  1715. <member name="M:S7.Net.Types.Single.ToArray(System.Byte[])">
  1716. <summary>
  1717. Converts an array of S7 Real to an array of float
  1718. </summary>
  1719. </member>
  1720. <member name="T:S7.Net.Types.String">
  1721. <summary>
  1722. Contains the methods to convert from S7 Array of Chars (like a const char[N] C-String) to C# strings
  1723. </summary>
  1724. </member>
  1725. <member name="M:S7.Net.Types.String.ToByteArray(System.String,System.Int32)">
  1726. <summary>
  1727. Converts a string to <paramref name="reservedLength"/> of bytes, padded with 0-bytes if required.
  1728. </summary>
  1729. <param name="value">The string to write to the PLC.</param>
  1730. <param name="reservedLength">The amount of bytes reserved for the <paramref name="value"/> in the PLC.</param>
  1731. </member>
  1732. <member name="M:S7.Net.Types.String.FromByteArray(System.Byte[])">
  1733. <summary>
  1734. Converts S7 bytes to a string
  1735. </summary>
  1736. <param name="bytes"></param>
  1737. <returns></returns>
  1738. </member>
  1739. <member name="T:S7.Net.Types.StringEx">
  1740. <inheritdoc cref="T:S7.Net.Types.S7String"/>
  1741. </member>
  1742. <member name="M:S7.Net.Types.StringEx.FromByteArray(System.Byte[])">
  1743. <inheritdoc cref="M:S7.Net.Types.S7String.FromByteArray(System.Byte[])"/>
  1744. </member>
  1745. <member name="M:S7.Net.Types.StringEx.ToByteArray(System.String,System.Int32)">
  1746. <inheritdoc cref="M:S7.Net.Types.S7String.ToByteArray(System.String,System.Int32)"/>
  1747. </member>
  1748. <member name="T:S7.Net.Types.Struct">
  1749. <summary>
  1750. Contains the method to convert a C# struct to S7 data types
  1751. </summary>
  1752. </member>
  1753. <member name="M:S7.Net.Types.Struct.GetStructSize(System.Type)">
  1754. <summary>
  1755. Gets the size of the struct in bytes.
  1756. </summary>
  1757. <param name="structType">the type of the struct</param>
  1758. <returns>the number of bytes</returns>
  1759. </member>
  1760. <member name="M:S7.Net.Types.Struct.FromBytes(System.Type,System.Byte[])">
  1761. <summary>
  1762. Creates a struct of a specified type by an array of bytes.
  1763. </summary>
  1764. <param name="structType">The struct type</param>
  1765. <param name="bytes">The array of bytes</param>
  1766. <returns>The object depending on the struct type or null if fails(array-length != struct-length</returns>
  1767. </member>
  1768. <member name="M:S7.Net.Types.Struct.ToBytes(System.Object)">
  1769. <summary>
  1770. Creates a byte array depending on the struct type.
  1771. </summary>
  1772. <param name="structValue">The struct object</param>
  1773. <returns>A byte array or null if fails.</returns>
  1774. </member>
  1775. <member name="T:S7.Net.Types.Timer">
  1776. <summary>
  1777. Converts the Timer data type to C# data type
  1778. </summary>
  1779. </member>
  1780. <member name="M:S7.Net.Types.Timer.FromByteArray(System.Byte[])">
  1781. <summary>
  1782. Converts the timer bytes to a double
  1783. </summary>
  1784. </member>
  1785. <member name="M:S7.Net.Types.Timer.ToByteArray(System.UInt16)">
  1786. <summary>
  1787. Converts a ushort (UInt16) to an array of bytes formatted as time
  1788. </summary>
  1789. </member>
  1790. <member name="M:S7.Net.Types.Timer.ToByteArray(System.UInt16[])">
  1791. <summary>
  1792. Converts an array of ushorts (Uint16) to an array of bytes formatted as time
  1793. </summary>
  1794. </member>
  1795. <member name="M:S7.Net.Types.Timer.ToArray(System.Byte[])">
  1796. <summary>
  1797. Converts an array of bytes formatted as time to an array of doubles
  1798. </summary>
  1799. <param name="bytes"></param>
  1800. <returns></returns>
  1801. </member>
  1802. <member name="M:S7.Net.Types.TypeHelper.ToByteArray``1(``0[],System.Func{``0,System.Byte[]})">
  1803. <summary>
  1804. Converts an array of T to an array of bytes
  1805. </summary>
  1806. </member>
  1807. <member name="M:S7.Net.Types.TypeHelper.ToArray``1(System.Byte[],System.Func{System.Byte[],``0})">
  1808. <summary>
  1809. Converts an array of T repesented as S7 binary data to an array of T
  1810. </summary>
  1811. </member>
  1812. <member name="T:S7.Net.Types.Word">
  1813. <summary>
  1814. Contains the conversion methods to convert Words from S7 plc to C#.
  1815. </summary>
  1816. </member>
  1817. <member name="M:S7.Net.Types.Word.FromByteArray(System.Byte[])">
  1818. <summary>
  1819. Converts a word (2 bytes) to ushort (UInt16)
  1820. </summary>
  1821. </member>
  1822. <member name="M:S7.Net.Types.Word.FromBytes(System.Byte,System.Byte)">
  1823. <summary>
  1824. Converts 2 bytes to ushort (UInt16)
  1825. </summary>
  1826. </member>
  1827. <member name="M:S7.Net.Types.Word.ToByteArray(System.UInt16)">
  1828. <summary>
  1829. Converts a ushort (UInt16) to word (2 bytes)
  1830. </summary>
  1831. </member>
  1832. <member name="M:S7.Net.Types.Word.ToByteArray(System.UInt16[])">
  1833. <summary>
  1834. Converts an array of ushort (UInt16) to an array of bytes
  1835. </summary>
  1836. </member>
  1837. <member name="M:S7.Net.Types.Word.ToArray(System.Byte[])">
  1838. <summary>
  1839. Converts an array of bytes to an array of ushort
  1840. </summary>
  1841. </member>
  1842. </members>
  1843. </doc>