0.7 release

pull/1/head 0.7
John Long 11 years ago
parent 753bff38ec
commit 83d9baa9f6
  1. 6
      Phpmodbus/IecType.php
  2. 2
      Phpmodbus/ModbusMaster.php
  3. 4
      license.txt
  4. BIN
      tests/Codesys/DEFAULT.DFR
  5. BIN
      tests/Codesys/test.SDB
  6. 4
      tests/Codesys/test.SYM
  7. BIN
      tests/Codesys/test00002ed2r.ci
  8. BIN
      tests/Codesys/test00002ed2r.ri
  9. 1
      tests/IecType/output/test.iecByte.php.html
  10. 1
      tests/IecType/output/test.iecDInt.php.html
  11. 1
      tests/IecType/output/test.iecInt.php.html
  12. 12
      tests/IecType/output/test.iecReal.php.html
  13. 72
      tests/ModbusMaster/output/test.tcp.fc16fc3.php.html
  14. 1
      tests/ModbusMaster/output/test.tcp.fc26.php.html
  15. 1
      tests/ModbusMaster/output/test.tcp.socket_protocol_mismatch.php.html
  16. 72
      tests/ModbusMaster/output/test.udp.fc16fc3.php.html
  17. 1
      tests/ModbusMaster/output/test.udp.fc26.php.html
  18. 72
      tests/ModbusMasterTcp/output/test.fc16fc3.php.html
  19. 1
      tests/ModbusMasterTcp/output/test.fc26.php.html
  20. 66
      tests/ModbusMasterUdp/output/test.fc15fc1.php.html
  21. 72
      tests/ModbusMasterUdp/output/test.fc16fc3.php.html
  22. 72
      tests/ModbusMasterUdp/output/test.fc16fc3bind.php.html
  23. 7
      tests/ModbusMasterUdp/output/test.fc2.php.html
  24. 1
      tests/ModbusMasterUdp/output/test.fc26.php.html
  25. 1
      tests/ModbusMasterUdp/output/test.fc26bind.php.html
  26. 5
      tests/ModbusMasterUdp/output/test.fc6fc3.php.html
  27. 1
      tests/PhpType/output/test.bytes2mixed.php.html
  28. 1
      tests/PhpType/output/test.bytes2real.php.html
  29. 1
      tests/PhpType/output/test.bytes2signedint.php.html
  30. 1
      tests/PhpType/output/test.bytes2string.php.html
  31. 6
      tests/PhpType/output/test.bytes2unsignedint.php.html
  32. 1
      tests/PhpType/output/test.strangearray.size.php.html
  33. 1
      tests/PhpType/output/test.strangearray.textarray.php.html

@ -1,12 +1,12 @@
<?php <?php
/** /**
* Phpmodbus Copyright (c) 2004, 2010 Jan Krakora, WAGO Kontakttechnik GmbH & Co. KG (http://www.wago.com) * Phpmodbus Copyright (c) 2004, 2013 Jan Krakora
* *
* This source file is subject to the "PhpModbus license" that is bundled * This source file is subject to the "PhpModbus license" that is bundled
* with this package in the file license.txt. * with this package in the file license.txt.
* *
* @author Jan Krakora * @author Jan Krakora
* @copyright Copyright (c) 2004, 2010 Jan Krakora, WAGO Kontakttechnik GmbH & Co. KG (http://www.wago.com) * @copyright Copyright (c) 2004, 2013 Jan Krakora
* @license PhpModbus license * @license PhpModbus license
* @category Phpmodbus * @category Phpmodbus
* @package Phpmodbus * @package Phpmodbus
@ -20,7 +20,7 @@
* data types to a IEC data type. * data types to a IEC data type.
* *
* @author Jan Krakora * @author Jan Krakora
* @copyright Copyright (c) 2004, 2010 Jan Krakora, WAGO Kontakttechnik GmbH & Co. KG (http://www.wago.com) * @copyright Copyright (c) 2004, 2010 Jan Krakora
* @package Phpmodbus * @package Phpmodbus
*/ */
class IecType { class IecType {

@ -98,6 +98,8 @@ class ModbusMaster {
$this->status .= "Bound\n"; $this->status .= "Bound\n";
} }
} }
// Socket settings
socket_set_option($this->sock, SOL_SOCKET, SO_SNDTIMEO, array('sec' => 1, 'usec' => 0));
// Connect the socket // Connect the socket
$result = @socket_connect($this->sock, $this->host, $this->port); $result = @socket_connect($this->sock, $this->host, $this->port);
if ($result === false) { if ($result === false) {

@ -1,10 +1,10 @@
The Phpmodbus License, Version 1 The Phpmodbus License, Version 1
============================ ============================
Copyright (c) 2004, 2011 Jan Krakora, Wago (http://www.wago.com) Copyright (c) 2004, 2013 Jan Krakora
All rights reserved. All rights reserved.
This license is a legal agreement between you and Jan Krakora, Wago (the "Author") This license is a legal agreement between you and Jan Krakora (the "Author")
for the use of Phpmodbus (the "Software"). By obtaining, using and/or for the use of Phpmodbus (the "Software"). By obtaining, using and/or
copying the Software, you agree that you have read, understood, and will copying the Software, you agree that you have read, understood, and will
comply with the terms and conditions of this license. comply with the terms and conditions of this license.

Binary file not shown.

Binary file not shown.

@ -1,4 +0,0 @@
;Version=2
;ProjectId=114942
;Checksum=0
;Filesize=0

Binary file not shown.

Binary file not shown.

@ -1 +0,0 @@
125<br>98<br>0<br>0<br>0<br>0<br>0<br>0<br>0<br>0<br>0<br>0<br>255<br>255<br>255<br>255<br>158<br>88<br>97<br>168<br>

@ -1 +0,0 @@
Endianing off <hr>0 --> Packet: 0000_0000_</br>1 --> Packet: 0001_0000_</br>-1 --> Packet: ffff_ffff_</br>2147483647 --> Packet: ffff_7fff_</br>-2147483648 --> Packet: 0000_8000_</br>Endianing on <hr>0 --> Packet: 0000_0000_</br>1 --> Packet: 0000_0001_</br>-1 --> Packet: ffff_ffff_</br>2147483647 --> Packet: 7fff_ffff_</br>-2147483648 --> Packet: 8000_0000_</br>

@ -1 +0,0 @@
Endianing off <hr>0 --> Packet: 0000_</br>1 --> Packet: 0001_</br>-1 --> Packet: ffff_</br>32767 --> Packet: 7fff_</br>-32768 --> Packet: 8000_</br>Endianing on <hr>0 --> Packet: 0000_</br>1 --> Packet: 0001_</br>-1 --> Packet: ffff_</br>32767 --> Packet: 7fff_</br>-32768 --> Packet: 8000_</br>

@ -1,12 +0,0 @@
Endianing off <hr>
0 --> Packet: 0000_0000_<br>
1 --> Packet: 0000_3f80_<br>
-2 --> Packet: 0000_c000_<br>
0.333333333333 --> Packet: aaab_3eaa_<br>
25 --> Packet: 0000_41c8_<br>
Endianing on <hr>
0 --> Packet: 0000_0000_<br>
1 --> Packet: 3f80_0000_<br>
-2 --> Packet: c000_0000_<br>
0.333333333333 --> Packet: 3eaa_aaab_<br>
25 --> Packet: 41c8_0000_<br>

@ -1,72 +0,0 @@
Array
(
[0] => 0
[1] => 0
[2] => 0
[3] => 1
[4] => 0
[5] => 1
[6] => 0
[7] => 255
[8] => 0
[9] => 255
)
Array
(
[0] => 0
[1] => 0
[2] => 0
[3] => 1
[4] => 255
[5] => 255
[6] => 127
[7] => 255
[8] => 128
[9] => 0
)
Array
(
[0] => 0
[1] => 0
[2] => 0
[3] => 0
[4] => 0
[5] => 1
[6] => 0
[7] => 0
[8] => 255
[9] => 255
[10] => 255
[11] => 255
[12] => 255
[13] => 255
[14] => 127
[15] => 255
[16] => 0
[17] => 0
[18] => 128
[19] => 0
)
Array
(
[0] => 0
[1] => 0
[2] => 0
[3] => 0
[4] => 0
[5] => 0
[6] => 63
[7] => 128
[8] => 0
[9] => 0
[10] => 192
[11] => 0
[12] => 170
[13] => 171
[14] => 62
[15] => 170
[16] => 0
[17] => 0
[18] => 65
[19] => 200
)

@ -1 +0,0 @@
writeMultipleRegister (FC26): DONE

@ -1 +0,0 @@
Caught exception: Unknown socket protocol, should be 'TCP' or 'UDP'

@ -1,72 +0,0 @@
Array
(
[0] => 0
[1] => 0
[2] => 0
[3] => 1
[4] => 0
[5] => 1
[6] => 0
[7] => 255
[8] => 0
[9] => 255
)
Array
(
[0] => 0
[1] => 0
[2] => 0
[3] => 1
[4] => 255
[5] => 255
[6] => 127
[7] => 255
[8] => 128
[9] => 0
)
Array
(
[0] => 0
[1] => 0
[2] => 0
[3] => 0
[4] => 0
[5] => 1
[6] => 0
[7] => 0
[8] => 255
[9] => 255
[10] => 255
[11] => 255
[12] => 255
[13] => 255
[14] => 127
[15] => 255
[16] => 0
[17] => 0
[18] => 128
[19] => 0
)
Array
(
[0] => 0
[1] => 0
[2] => 0
[3] => 0
[4] => 0
[5] => 0
[6] => 63
[7] => 128
[8] => 0
[9] => 0
[10] => 192
[11] => 0
[12] => 170
[13] => 171
[14] => 62
[15] => 170
[16] => 0
[17] => 0
[18] => 65
[19] => 200
)

@ -1 +0,0 @@
writeMultipleRegister (FC26): DONE

@ -1,72 +0,0 @@
Array
(
[0] => 0
[1] => 0
[2] => 0
[3] => 1
[4] => 0
[5] => 1
[6] => 0
[7] => 255
[8] => 0
[9] => 255
)
Array
(
[0] => 0
[1] => 0
[2] => 0
[3] => 1
[4] => 255
[5] => 255
[6] => 127
[7] => 255
[8] => 128
[9] => 0
)
Array
(
[0] => 0
[1] => 0
[2] => 0
[3] => 0
[4] => 0
[5] => 1
[6] => 0
[7] => 0
[8] => 255
[9] => 255
[10] => 255
[11] => 255
[12] => 255
[13] => 255
[14] => 127
[15] => 255
[16] => 0
[17] => 0
[18] => 128
[19] => 0
)
Array
(
[0] => 0
[1] => 0
[2] => 0
[3] => 0
[4] => 0
[5] => 0
[6] => 63
[7] => 128
[8] => 0
[9] => 0
[10] => 192
[11] => 0
[12] => 170
[13] => 171
[14] => 62
[15] => 170
[16] => 0
[17] => 0
[18] => 65
[19] => 200
)

@ -1 +0,0 @@
writeMultipleRegister (FC26): DONE

@ -1,66 +0,0 @@
array(32) {
[0]=>
bool(true)
[1]=>
bool(false)
[2]=>
bool(true)
[3]=>
bool(true)
[4]=>
bool(false)
[5]=>
bool(true)
[6]=>
bool(true)
[7]=>
bool(true)
[8]=>
bool(true)
[9]=>
bool(true)
[10]=>
bool(true)
[11]=>
bool(true)
[12]=>
bool(false)
[13]=>
bool(false)
[14]=>
bool(false)
[15]=>
bool(false)
[16]=>
bool(false)
[17]=>
bool(false)
[18]=>
bool(false)
[19]=>
bool(false)
[20]=>
bool(true)
[21]=>
bool(true)
[22]=>
bool(true)
[23]=>
bool(true)
[24]=>
bool(true)
[25]=>
bool(true)
[26]=>
bool(true)
[27]=>
bool(true)
[28]=>
bool(true)
[29]=>
bool(true)
[30]=>
bool(true)
[31]=>
bool(true)
}

@ -1,72 +0,0 @@
Array
(
[0] => 0
[1] => 0
[2] => 0
[3] => 1
[4] => 0
[5] => 1
[6] => 0
[7] => 255
[8] => 0
[9] => 255
)
Array
(
[0] => 0
[1] => 0
[2] => 0
[3] => 1
[4] => 255
[5] => 255
[6] => 127
[7] => 255
[8] => 128
[9] => 0
)
Array
(
[0] => 0
[1] => 0
[2] => 0
[3] => 0
[4] => 0
[5] => 1
[6] => 0
[7] => 0
[8] => 255
[9] => 255
[10] => 255
[11] => 255
[12] => 255
[13] => 255
[14] => 127
[15] => 255
[16] => 0
[17] => 0
[18] => 128
[19] => 0
)
Array
(
[0] => 0
[1] => 0
[2] => 0
[3] => 0
[4] => 0
[5] => 0
[6] => 63
[7] => 128
[8] => 0
[9] => 0
[10] => 192
[11] => 0
[12] => 170
[13] => 171
[14] => 62
[15] => 170
[16] => 0
[17] => 0
[18] => 65
[19] => 200
)

@ -1,72 +0,0 @@
Array
(
[0] => 0
[1] => 0
[2] => 0
[3] => 1
[4] => 0
[5] => 1
[6] => 0
[7] => 255
[8] => 0
[9] => 255
)
Array
(
[0] => 0
[1] => 0
[2] => 0
[3] => 1
[4] => 255
[5] => 255
[6] => 127
[7] => 255
[8] => 128
[9] => 0
)
Array
(
[0] => 0
[1] => 0
[2] => 0
[3] => 0
[4] => 0
[5] => 1
[6] => 0
[7] => 0
[8] => 255
[9] => 255
[10] => 255
[11] => 255
[12] => 255
[13] => 255
[14] => 127
[15] => 255
[16] => 0
[17] => 0
[18] => 128
[19] => 0
)
Array
(
[0] => 0
[1] => 0
[2] => 0
[3] => 0
[4] => 0
[5] => 0
[6] => 63
[7] => 128
[8] => 0
[9] => 0
[10] => 192
[11] => 0
[12] => 170
[13] => 171
[14] => 62
[15] => 170
[16] => 0
[17] => 0
[18] => 65
[19] => 200
)

@ -1,7 +0,0 @@
Test should pass when %IX0.0==FALSE and %IX0.1==TRUE
array(2) {
[0]=>
bool(false)
[1]=>
bool(true)
}

@ -1 +0,0 @@
writeMultipleRegister (FC26): DONE

@ -1 +0,0 @@
writeMultipleRegister (FC26): DONE

@ -1,5 +0,0 @@
Array
(
[0] => 207
[1] => 199
)

@ -1 +0,0 @@
32098<br>0<br>0<br>-1<br>-25000<br>25000<br>

@ -1 +0,0 @@
-1<br>0<br>1<br>-2147483648<br>2147483647<br>

@ -1 +0,0 @@
eHll oowlr!da<br>Hello world!<br>

@ -1,6 +0,0 @@
float(4294967295)
<br>int(0)
<br>int(1)
<br>float(2147483648)
<br>int(2147483647)
<br>

@ -1 +0,0 @@
Exception 'Data are not in array 2 or 4 bytes'<br>25602<br>Exception 'Data are not in array 2 or 4 bytes'<br>25602<br>Exception 'Data are not in array 2 or 4 bytes'<br>
Loading…
Cancel
Save