From c6be1e064b4738d56b32d8f138383fc644d3b1cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Hru=C5=A1ka?= Date: Sat, 14 Jul 2018 17:07:35 +0200 Subject: [PATCH] deleted broken tests and examples, updated readme --- LICENSE | 2 + README.md | 12 +- examples/README.md | 3 - examples/example_750841_Mmemory.php | 65 ----- examples/example_datatype.php | 60 ---- examples/example_fc1.php | 24 -- examples/example_fc15.php | 27 -- examples/example_fc16.php | 25 -- examples/example_fc2.php | 25 -- examples/example_fc22.php | 25 -- examples/example_fc23.php | 28 -- examples/example_fc3.php | 24 -- examples/example_fc4.php | 18 -- examples/example_fc5.php | 23 -- examples/example_fc6.php | 22 -- tests/Codesys/TEST.EXP | 256 ------------------ tests/Codesys/_make_exp.cmd | 15 - tests/Codesys/test.pro | Bin 34020 -> 0 bytes tests/IecType/_test.bat | 11 - tests/IecType/ref/test.iecByte.php.html | 1 - tests/IecType/ref/test.iecDInt.php.html | 1 - tests/IecType/ref/test.iecInt.php.html | 1 - tests/IecType/ref/test.iecReal.php.html | 12 - tests/IecType/test.iecByte.php | 33 --- tests/IecType/test.iecDInt.php | 50 ---- tests/IecType/test.iecInt.php | 50 ---- tests/IecType/test.iecReal.php | 50 ---- tests/ModbusMaster/_test.bat | 11 - .../ref/test.tcp.fc16fc3.php.html | 72 ----- tests/ModbusMaster/ref/test.tcp.fc26.php.html | 1 - ...test.tcp.socket_protocol_mismatch.php.html | 1 - .../ref/test.udp.fc16fc3.php.html | 72 ----- tests/ModbusMaster/ref/test.udp.fc26.php.html | 1 - tests/ModbusMaster/test.tcp.fc16fc3.php | 44 --- tests/ModbusMaster/test.tcp.fc26.php | 24 -- .../test.tcp.socket_protocol_mismatch.php | 22 -- tests/ModbusMaster/test.udp.fc16fc3.php | 44 --- tests/ModbusMaster/test.udp.fc26.php | 24 -- tests/ModbusMasterTcp/_test.bat | 11 - .../ModbusMasterTcp/ref/test.fc16fc3.php.html | 72 ----- tests/ModbusMasterTcp/ref/test.fc26.php.html | 1 - tests/ModbusMasterTcp/test.fc16fc3.php | 44 --- tests/ModbusMasterTcp/test.fc26.php | 24 -- tests/ModbusMasterUdp/_test.bat | 11 - .../ModbusMasterUdp/ref/test.fc15fc1.php.html | 66 ----- .../ModbusMasterUdp/ref/test.fc16fc3.php.html | 72 ----- .../ref/test.fc16fc3bind.php.html | 72 ----- tests/ModbusMasterUdp/ref/test.fc2.php.html | 7 - tests/ModbusMasterUdp/ref/test.fc26.php.html | 1 - .../ref/test.fc26bind.php.html | 1 - tests/ModbusMasterUdp/ref/test.fc4.php.html | 11 - tests/ModbusMasterUdp/ref/test.fc5.php.html | 5 - .../ModbusMasterUdp/ref/test.fc6fc3.php.html | 5 - tests/ModbusMasterUdp/test.fc15fc1.php | 22 -- tests/ModbusMasterUdp/test.fc16fc3.php | 44 --- tests/ModbusMasterUdp/test.fc16fc3bind.php | 45 --- tests/ModbusMasterUdp/test.fc2.php | 14 - tests/ModbusMasterUdp/test.fc26.php | 24 -- tests/ModbusMasterUdp/test.fc26bind.php | 25 -- tests/ModbusMasterUdp/test.fc4.php | 14 - tests/ModbusMasterUdp/test.fc5.php | 23 -- tests/ModbusMasterUdp/test.fc6fc3.php | 15 - tests/PhpType/_test.bat | 11 - tests/PhpType/ref/test.bytes2mixed.php.html | 1 - tests/PhpType/ref/test.bytes2real.php.html | 1 - .../PhpType/ref/test.bytes2signedint.php.html | 1 - tests/PhpType/ref/test.bytes2string.php.html | 1 - .../ref/test.bytes2unsignedint.php.html | 6 - .../ref/test.strangearray.size.php.html | 1 - .../ref/test.strangearray.textarray.php.html | 1 - tests/PhpType/test.bytes2mixed.php | 37 --- tests/PhpType/test.bytes2real.php | 27 -- tests/PhpType/test.bytes2signedint.php | 35 --- tests/PhpType/test.bytes2string.php | 28 -- tests/PhpType/test.bytes2unsignedint.php | 36 --- tests/PhpType/test.strangearray.size.php | 44 --- tests/PhpType/test.strangearray.textarray.php | 22 -- tests/README.md | 3 - tests/config.bat | 5 - tests/config.php | 3 - 80 files changed, 8 insertions(+), 2063 deletions(-) delete mode 100644 examples/README.md delete mode 100644 examples/example_750841_Mmemory.php delete mode 100644 examples/example_datatype.php delete mode 100644 examples/example_fc1.php delete mode 100644 examples/example_fc15.php delete mode 100644 examples/example_fc16.php delete mode 100644 examples/example_fc2.php delete mode 100644 examples/example_fc22.php delete mode 100644 examples/example_fc23.php delete mode 100644 examples/example_fc3.php delete mode 100644 examples/example_fc4.php delete mode 100644 examples/example_fc5.php delete mode 100644 examples/example_fc6.php delete mode 100644 tests/Codesys/TEST.EXP delete mode 100644 tests/Codesys/_make_exp.cmd delete mode 100644 tests/Codesys/test.pro delete mode 100644 tests/IecType/_test.bat delete mode 100644 tests/IecType/ref/test.iecByte.php.html delete mode 100644 tests/IecType/ref/test.iecDInt.php.html delete mode 100644 tests/IecType/ref/test.iecInt.php.html delete mode 100644 tests/IecType/ref/test.iecReal.php.html delete mode 100644 tests/IecType/test.iecByte.php delete mode 100644 tests/IecType/test.iecDInt.php delete mode 100644 tests/IecType/test.iecInt.php delete mode 100644 tests/IecType/test.iecReal.php delete mode 100644 tests/ModbusMaster/_test.bat delete mode 100644 tests/ModbusMaster/ref/test.tcp.fc16fc3.php.html delete mode 100644 tests/ModbusMaster/ref/test.tcp.fc26.php.html delete mode 100644 tests/ModbusMaster/ref/test.tcp.socket_protocol_mismatch.php.html delete mode 100644 tests/ModbusMaster/ref/test.udp.fc16fc3.php.html delete mode 100644 tests/ModbusMaster/ref/test.udp.fc26.php.html delete mode 100644 tests/ModbusMaster/test.tcp.fc16fc3.php delete mode 100644 tests/ModbusMaster/test.tcp.fc26.php delete mode 100644 tests/ModbusMaster/test.tcp.socket_protocol_mismatch.php delete mode 100644 tests/ModbusMaster/test.udp.fc16fc3.php delete mode 100644 tests/ModbusMaster/test.udp.fc26.php delete mode 100644 tests/ModbusMasterTcp/_test.bat delete mode 100644 tests/ModbusMasterTcp/ref/test.fc16fc3.php.html delete mode 100644 tests/ModbusMasterTcp/ref/test.fc26.php.html delete mode 100644 tests/ModbusMasterTcp/test.fc16fc3.php delete mode 100644 tests/ModbusMasterTcp/test.fc26.php delete mode 100644 tests/ModbusMasterUdp/_test.bat delete mode 100644 tests/ModbusMasterUdp/ref/test.fc15fc1.php.html delete mode 100644 tests/ModbusMasterUdp/ref/test.fc16fc3.php.html delete mode 100644 tests/ModbusMasterUdp/ref/test.fc16fc3bind.php.html delete mode 100644 tests/ModbusMasterUdp/ref/test.fc2.php.html delete mode 100644 tests/ModbusMasterUdp/ref/test.fc26.php.html delete mode 100644 tests/ModbusMasterUdp/ref/test.fc26bind.php.html delete mode 100644 tests/ModbusMasterUdp/ref/test.fc4.php.html delete mode 100644 tests/ModbusMasterUdp/ref/test.fc5.php.html delete mode 100644 tests/ModbusMasterUdp/ref/test.fc6fc3.php.html delete mode 100644 tests/ModbusMasterUdp/test.fc15fc1.php delete mode 100644 tests/ModbusMasterUdp/test.fc16fc3.php delete mode 100644 tests/ModbusMasterUdp/test.fc16fc3bind.php delete mode 100644 tests/ModbusMasterUdp/test.fc2.php delete mode 100644 tests/ModbusMasterUdp/test.fc26.php delete mode 100644 tests/ModbusMasterUdp/test.fc26bind.php delete mode 100644 tests/ModbusMasterUdp/test.fc4.php delete mode 100644 tests/ModbusMasterUdp/test.fc5.php delete mode 100644 tests/ModbusMasterUdp/test.fc6fc3.php delete mode 100644 tests/PhpType/_test.bat delete mode 100644 tests/PhpType/ref/test.bytes2mixed.php.html delete mode 100644 tests/PhpType/ref/test.bytes2real.php.html delete mode 100644 tests/PhpType/ref/test.bytes2signedint.php.html delete mode 100644 tests/PhpType/ref/test.bytes2string.php.html delete mode 100644 tests/PhpType/ref/test.bytes2unsignedint.php.html delete mode 100644 tests/PhpType/ref/test.strangearray.size.php.html delete mode 100644 tests/PhpType/ref/test.strangearray.textarray.php.html delete mode 100644 tests/PhpType/test.bytes2mixed.php delete mode 100644 tests/PhpType/test.bytes2real.php delete mode 100644 tests/PhpType/test.bytes2signedint.php delete mode 100644 tests/PhpType/test.bytes2string.php delete mode 100644 tests/PhpType/test.bytes2unsignedint.php delete mode 100644 tests/PhpType/test.strangearray.size.php delete mode 100644 tests/PhpType/test.strangearray.textarray.php delete mode 100644 tests/README.md delete mode 100644 tests/config.bat delete mode 100644 tests/config.php diff --git a/LICENSE b/LICENSE index fafe0eb..9ffe6a8 100644 --- a/LICENSE +++ b/LICENSE @@ -14,6 +14,8 @@ Further improvements - John S. Long and other contributors Cleanup and namespaces - Ondřej Hruška, 2016 https://github.com/MightyPork/phpmodbus + + https://git.ondrovo.com/packages/php-modbus +---------------------------------------------------------+ diff --git a/README.md b/README.md index f478cd8..55749eb 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Implementation of the basic functionality of the Modbus TCP and UDP based protocol using PHP. -**NOTE: This is a fork to fix & update the library code (and code alone). Notably, the tests are probably all broken.** +**NOTE: This is a fork to fix & update the library code.** > **What's new** > @@ -31,8 +31,8 @@ Implementation of the basic functionality of the Modbus TCP and UDP based protoc ## Example ```php -use PHPModbus/ModbusMaster; -use PHPModbus/PhpType; +use MightyPork\PHPModbus\ModbusMaster; +use MightyPork\PHPModbus\PhpType; // Modbus master UDP $modbus = new ModbusMaster("192.168.1.1", "UDP"); @@ -41,7 +41,7 @@ try { $recData = $modbus->readMultipleRegisters(0, 12288, 5); } catch (Exception $e) { // Print error information if any - echo $modbus; + echo $modbus . "\n"; echo $e; exit; } @@ -51,12 +51,12 @@ echo PhpType::bytes2string($recData); Use the `setTimeout($seconds)` and `setSocketTimeout($read_timeout_sec, $write_timeout_sec)` methods to adjust wait times. -Most of the code is (to some extent) commented and documented with PhpDoc. You should get useful tooltips in your IDE. +Most of the code is (to some extent) commented and documented with PhpDoc. ## GoogleCode legacy docs & downloads -This project was originally hosted on (now defunct) Google Code. It's still archived here: +This project was originally hosted on Google Code. It is still archived here: * [GoogleCode Archived Repo](http://code.google.com/p/phpmodbus) diff --git a/examples/README.md b/examples/README.md deleted file mode 100644 index f3e0c3b..0000000 --- a/examples/README.md +++ /dev/null @@ -1,3 +0,0 @@ -Those examples have not been updated to use namespaces. - -They may not work. Just for reference. diff --git a/examples/example_750841_Mmemory.php b/examples/example_750841_Mmemory.php deleted file mode 100644 index 452b801..0000000 --- a/examples/example_750841_Mmemory.php +++ /dev/null @@ -1,65 +0,0 @@ -readMultipleRegisters($moduleId, $reference, $quantity); -} catch (Exception $e) { - echo $modbus; - echo $e; - exit; -} - -?> - - - - - WAGO 750-841 M-memory dump - - -

Dump of M-memory from WAGO 750-84x series coupler.

- - -

M-memory dump

- - - - - - - - - - - - - - -
Modbus addressMWxvalue
MW
- -

Modbus class status

- -
- - - diff --git a/examples/example_datatype.php b/examples/example_datatype.php deleted file mode 100644 index 86fa4dc..0000000 --- a/examples/example_datatype.php +++ /dev/null @@ -1,60 +0,0 @@ -readMultipleRegisters(0, 12288, 10); -} catch (Exception $e) { - // Print error information if any - echo $modbus; - echo $e; - exit; -} - -// Received data -echo "

Received Data

\n"; -print_r($recData); - -// Conversion -echo "

32 bits types

\n"; -// Chunk the data array to set of 4 bytes -$values = array_chunk($recData, 4); - -// Get float from REAL interpretation -echo "

REAL to Float

\n"; -foreach ($values as $bytes) - echo PhpType::bytes2float($bytes) . "
"; - -// Get integer from DINT interpretation -echo "

DINT to integer

\n"; -foreach ($values as $bytes) - echo PhpType::bytes2signedInt($bytes) . "
"; - -// Get integer of float from DINT interpretation -echo "

DWORD to integer (or float)

\n"; -foreach ($values as $bytes) - echo PhpType::bytes2unsignedInt($bytes) . "
"; - -echo "

16 bit types

\n"; -// Chunk the data array to set of 4 bytes -$values = array_chunk($recData, 2); - -// Get signed integer from INT interpretation -echo "

INT to integer

\n"; -foreach ($values as $bytes) - echo PhpType::bytes2signedInt($bytes) . "
"; - -// Get unsigned integer from WORD interpretation -echo "

WORD to integer

\n"; -foreach ($values as $bytes) - echo PhpType::bytes2unsignedInt($bytes) . "
"; - -// Get string from STRING interpretation -echo "

STRING to string

\n"; -echo PhpType::bytes2string($recData) . "
"; diff --git a/examples/example_fc1.php b/examples/example_fc1.php deleted file mode 100644 index d6c7497..0000000 --- a/examples/example_fc1.php +++ /dev/null @@ -1,24 +0,0 @@ -readCoils(0, 12288, 12); -} catch (Exception $e) { - // Print error information if any - echo $modbus; - echo $e; - exit; -} - -// Print status information -echo "
Status:
" . $modbus; - -// Print read data -echo "
Data:
"; -var_dump($recData); -echo "
"; diff --git a/examples/example_fc15.php b/examples/example_fc15.php deleted file mode 100644 index 23de38b..0000000 --- a/examples/example_fc15.php +++ /dev/null @@ -1,27 +0,0 @@ -writeMultipleCoils(0, 12288, $data); -} catch (Exception $e) { - // Print error information if any - echo $modbus; - echo $e; - exit; -} - -// Print status information -echo $modbus; diff --git a/examples/example_fc16.php b/examples/example_fc16.php deleted file mode 100644 index 1bff6f2..0000000 --- a/examples/example_fc16.php +++ /dev/null @@ -1,25 +0,0 @@ -writeMultipleRegister(0, 12288, $data, $dataTypes); -} catch (Exception $e) { - // Print error information if any - echo $modbus; - echo $e; - exit; -} - -// Print status information -echo $modbus; - -?> diff --git a/examples/example_fc2.php b/examples/example_fc2.php deleted file mode 100644 index 1563938..0000000 --- a/examples/example_fc2.php +++ /dev/null @@ -1,25 +0,0 @@ -readInputDiscretes(0, 0, 2); -} catch (Exception $e) { - // Print error information if any - echo $modbus; - echo $e; - exit; -} - -// Print status information -echo "
Status:
" . $modbus; - -// Print read data -echo "
Data:
"; -var_dump($recData); -echo "
"; diff --git a/examples/example_fc22.php b/examples/example_fc22.php deleted file mode 100644 index 34ccd2e..0000000 --- a/examples/example_fc22.php +++ /dev/null @@ -1,25 +0,0 @@ -maskWriteRegister(0, 12288, $andMask, $orMask); -} catch (Exception $e) { - // Print error information if any - echo $modbus; - echo $e; - exit; -} - -// Print status information -echo $modbus; diff --git a/examples/example_fc23.php b/examples/example_fc23.php deleted file mode 100644 index 0fa0ebe..0000000 --- a/examples/example_fc23.php +++ /dev/null @@ -1,28 +0,0 @@ -readWriteRegisters(0, 12288, 6, 12288, $data, $dataTypes); -} catch (Exception $e) { - // Print error information if any - echo $modbus; - echo $e; - exit; -} - -// Print status information -echo "
Status:
" . $modbus; - -// Print read data -echo "
Data:
"; -print_r($recData); -echo "
"; diff --git a/examples/example_fc3.php b/examples/example_fc3.php deleted file mode 100644 index 859e1c0..0000000 --- a/examples/example_fc3.php +++ /dev/null @@ -1,24 +0,0 @@ -readMultipleRegisters(0, 12288, 6); -} catch (Exception $e) { - // Print error information if any - echo $modbus; - echo $e; - exit; -} - -// Print status information -echo "
Status:
" . $modbus; - -// Print read data -echo "
Data:
"; -print_r($recData); -echo "
"; diff --git a/examples/example_fc4.php b/examples/example_fc4.php deleted file mode 100644 index 94478c6..0000000 --- a/examples/example_fc4.php +++ /dev/null @@ -1,18 +0,0 @@ -readMultipleInputRegisters(0, 0, 2); -} catch (Exception $e) { - // Print error information if any - echo $modbus; - echo $e; - exit; -} - -var_dump($recData); diff --git a/examples/example_fc5.php b/examples/example_fc5.php deleted file mode 100644 index 7f47680..0000000 --- a/examples/example_fc5.php +++ /dev/null @@ -1,23 +0,0 @@ -writeSingleCoil(0, 12288, $data_true); - $modbus->writeSingleCoil(0, 12289, $data_false); - $modbus->writeSingleCoil(0, 12290, $data_true); - $modbus->writeSingleCoil(0, 12291, $data_false); -} catch (Exception $e) { - // Print error information if any - echo $modbus; - echo $e; - exit; -} diff --git a/examples/example_fc6.php b/examples/example_fc6.php deleted file mode 100644 index 1d7c733..0000000 --- a/examples/example_fc6.php +++ /dev/null @@ -1,22 +0,0 @@ -writeSingleRegister(0, 12288, $data); -} catch (Exception $e) { - // Print error information if any - echo $modbus; - echo $e; - exit; -} - -// Print status information -echo $modbus; diff --git a/tests/Codesys/TEST.EXP b/tests/Codesys/TEST.EXP deleted file mode 100644 index 3e6f226..0000000 --- a/tests/Codesys/TEST.EXP +++ /dev/null @@ -1,256 +0,0 @@ - - -(* @NESTEDCOMMENTS := 'Yes' *) -(* @PATH := '' *) -(* @OBJECTFLAGS := '0, 8' *) -(* @SYMFILEFLAGS := '2048' *) -PROGRAM PLC_PRG -VAR - (* BOOL, COIL *) - COIL1 AT %MX0.0 : BOOL := 0; - COIL2 AT %MX0.1 : BOOL := 0; - COIL3 AT %MX0.2 : BOOL := 0; - COIL4 AT %MX0.3 : BOOL := 0; - COIL5 AT %MX0.4 : BOOL := 0; - COIL6 AT %MX0.5 : BOOL := 0; - COIL7 AT %MX0.6 : BOOL := 0; - COIL8 AT %MX0.7 : BOOL := 0; - - (* BYTE *) - BYTE1 AT %MB0 : BYTE := 0; - BYTE2 AT %MB1 : BYTE := 0; - BYTE3 AT %MB2 : BYTE := 0; - BYTE4 AT %MB3 : BYTE := 0; - BYTE5 AT %MB4 : BYTE := 0; - - (* INT *) - INT1 AT %MW0 : INT := 0; - INT2 AT %MW1 : INT := 0; - INT3 AT %MW2 : INT := 0; - INT4 AT %MW3 : INT := 0; - INT5 AT %MW4 : INT := 0; - - (* WORD *) - WORD1 AT %MW0 : WORD := 0; - WORD2 AT %MW1 : WORD := 0; - WORD3 AT %MW2 : WORD := 0; - WORD4 AT %MW3 : WORD := 0; - WORD5 AT %MW4 : WORD := 0; - - (* DINT *) - DINT1 AT %MD0 : DINT := 0; - DINT2 AT %MD1 : DINT := 0; - DINT3 AT %MD2 : DINT := 0; - DINT4 AT %MD3 : DINT := 0; - DINT5 AT %MD4 : DINT := 0; - - (* DWORD *) - DWORD1 AT %MD0 : DWORD := 0; - DWORD2 AT %MD1 : DWORD := 0; - DWORD3 AT %MD2 : DWORD := 0; - DWORD4 AT %MD3 : DWORD := 0; - DWORD5 AT %MD4 : DWORD := 0; - - (* REAL *) - REAL1 AT %MD0 : REAL := 0; - REAL2 AT %MD1 : REAL := 0; - REAL3 AT %MD2 : REAL := 0; - REAL4 AT %MD3 : REAL := 0; - REAL5 AT %MD4 : REAL := 0; - - (* String *) - STRING1 AT %MW0 : STRING := 'Hello word!!!'; -END_VAR - -(* @END_DECLARATION := '0' *) -(* Something to do *) -; -END_PROGRAM - -(* @NESTEDCOMMENTS := 'Yes' *) -(* @GLOBAL_VARIABLE_LIST := 'Global_Variables' *) -(* @PATH := '' *) -(* @OBJECTFLAGS := '0, 8' *) -(* @SYMFILEFLAGS := '2048' *) -VAR_GLOBAL -END_VAR - -(* @OBJECT_END := 'Global_Variables' *) -(* @CONNECTIONS := Global_Variables -FILENAME : '' -FILETIME : 0 -EXPORT : 0 -NUMOFCONNECTIONS : 0 -*) - -(* @NESTEDCOMMENTS := 'Yes' *) -(* @GLOBAL_VARIABLE_LIST := 'Variable_Configuration' *) -(* @PATH := '' *) -(* @OBJECTFLAGS := '0, 8' *) -(* @SYMFILEFLAGS := '2048' *) -VAR_CONFIG -END_VAR - -(* @OBJECT_END := 'Variable_Configuration' *) -(* @CONNECTIONS := Variable_Configuration -FILENAME : '' -FILETIME : 0 -EXPORT : 0 -NUMOFCONNECTIONS : 0 -*) - - -_ALARMCONFIG -_ALARMCONFIGNEXTTEXTID : 10002 -_ALARMCONFIGFORMATS : 'HH$':$'mm$':$'ss','dd$'-$'MM$'-$'yyyy' -_ALARMCLASSLIST : 1 -_ALARMCLASSID : 0 -_ALARMCLASSACKTYPE : 0 -_ALARMCLASSNAME : 'DEFAULT' -_ALARMCLASSDESCRIPTION : '' -_ALARMCLASSBGCOLORS : 16777215,16777215,16777215 -_ALARMCLASSTEXTCOLORS : 3394560,255,16711680 -_ALARMCLASSBITMAPS : '','','' -_ALARMACTIONLIST : 0 -(* @ALARMCLASSRESETCOLORS := '_ALARMCLASSRESETCOLORS: 33023,16777215' *) -(* @ALARMCLASSRESETBITMAP := '_ALARMCLASSRESETBITMAP: $'$'' *) -_ALARMGROUPLISTNAME : 'System' -_ALARMGROUPPATH : 'System' -_ALARMGROUPLIST : 0 -_VISUALSETTINGSFLAGS : 0,0,0,0 -_VISUALSETTINGSFLAGS : '','','' -_VISUALSETTINGSDYNTEXTFILECOUNT : 0 - -(* @ALARMCONFIGFLAGS := '_ALARMCONFIGFLAGS: 0' *) -(* @ALARMCONFIGGLOBALDB_STR := '_ALARMCONFIGGLOBALDB_STRINGS: $'$',$'$',$'$',$'$'' *) -(* @ALARMCONFIGGLOBALDB_NUM := '_ALARMCONFIGGLOBALDB_NUMBERS: 0,0' *) -_END_ALARMCONFIG - - -LIBRARY -Standard.lib 2.12.10 14:48:34 -(* @LIBRARYSYMFILEINFO := '0' *) -NumOfPOUs: 26 -ASCIIBYTE_TO_STRING: 2048 -CONCAT: 0 -CTD: 0 -CTU: 0 -CTUD: 0 -DELETE: 0 -F_TRIG: 0 -FIND: 0 -INSERT: 0 -LEFT: 0 -LEN: 0 -MID: 0 -R_TRIG: 0 -REAL_STATE: 2048 -REPLACE: 0 -RIGHT: 0 -RS: 0 -RTC: 0 -SEMA: 0 -SR: 0 -STANDARD_VERSION: 2048 -STRING_COMPARE: 2048 -STRING_TO_ASCIIBYTE: 2048 -TOF: 0 -TON: 0 -TP: 0 -NumOfGVLs: 1 -'Global Variables 0': 0 -END_LIBRARY - -LIBRARY -SYSLIBCALLBACK.LIB 2.12.10 14:48:32 -(* @LIBRARYSYMFILEINFO := '0' *) -NumOfPOUs: 2 -SysCallbackRegister: 0 -SysCallbackUnregister: 0 -NumOfGVLs: 2 -Globale_Variablen: 0 -Version: 0 -END_LIBRARY - -PLC_CONFIGURATION -_GLOBAL -_VERSION: 3 -_AUTOADR: 0 -_CHECKADR: 0 -_SAVECONFIGFILESINPROJECT: 0 -_END_GLOBAL - -_MODULE: '3S' -_SECTION_NAME: 'Root' -_INDEX_IN_PARENT: '-1' -_MODULE_NAME: 'Hardware configuration' -_NODE_ID: -1 -_IECIN: %IB0 -_IECOUT: %QB0 -_IECDIAG: %MB0 -_DOWNLOAD: 1 -_EXCLUDEFROMAUTOADR: 0 -_COMMENT: '' - -_MODULE: '3S' -_SECTION_NAME: 'K_Bus' -_INDEX_IN_PARENT: '1' -_MODULE_NAME: 'K-Bus' -_NODE_ID: 0 -_IECIN: %IB0 -_IECOUT: %QB0 -_IECDIAG: %MB0 -_DOWNLOAD: 1 -_EXCLUDEFROMAUTOADR: 0 -_COMMENT: '' -_END_MODULE - -_MODULE: '3S' -_SECTION_NAME: 'FB_VARS' -_INDEX_IN_PARENT: '2' -_MODULE_NAME: 'Fieldbus variables' -_NODE_ID: 1 -_IECIN: %IB0 -_IECOUT: %QB0 -_IECDIAG: %MB0 -_DOWNLOAD: 1 -_EXCLUDEFROMAUTOADR: 0 -_COMMENT: '' -_END_MODULE -_END_MODULE -PLC_END - - -RESOURCE -{event_task : 'start','Called when program starts','','FUNCTION systemevent: DWORD VAR_INPUT dwEvent: DWORD; dwFilter: DWORD; dwOwner: DWORD; END_VAR '}{event_task_info : 0,1,11986} -{event_task : 'stop','Called when program stops','','FUNCTION systemevent: DWORD VAR_INPUT dwEvent: DWORD; dwFilter: DWORD; dwOwner: DWORD; END_VAR '}{event_task_info : 0,2,11986} -{event_task : 'before_reset','Called before reset takes place','','FUNCTION systemevent: DWORD VAR_INPUT dwEvent: DWORD; dwFilter: DWORD; dwOwner: DWORD; END_VAR '}{event_task_info : 0,3,11986} -{event_task : 'after_reset','Called after reset took place','','FUNCTION systemevent: DWORD VAR_INPUT dwEvent: DWORD; dwFilter: DWORD; dwOwner: DWORD; END_VAR '}{event_task_info : 0,4,11986} -{event_task : 'shutdown','Called before shutdown is performed (Firmware update over ethernet)','','FUNCTION systemevent: DWORD VAR_INPUT dwEvent: DWORD; dwFilter: DWORD; dwOwner: DWORD; END_VAR '}{event_task_info : 0,5,11986} -{event_task : 'excpt_watchdog','Software watchdog of IEC-task expired','','FUNCTION systemevent: DWORD VAR_INPUT dwEvent: DWORD; dwFilter: DWORD; dwOwner: DWORD; END_VAR '}{event_task_info : 0,7,11986} -{event_task : 'excpt_fieldbus','Fieldbus error','','FUNCTION systemevent: DWORD VAR_INPUT dwEvent: DWORD; dwFilter: DWORD; dwOwner: DWORD; END_VAR '}{event_task_info : 0,9,11986} -{event_task : 'excpt_ioupdate','KBus error','','FUNCTION systemevent: DWORD VAR_INPUT dwEvent: DWORD; dwFilter: DWORD; dwOwner: DWORD; END_VAR '}{event_task_info : 0,10,11986} -{event_task : 'excpt_dividebyzero','Division by zero. Only integer operations!','','FUNCTION systemevent: DWORD VAR_INPUT dwEvent: DWORD; dwFilter: DWORD; dwOwner: DWORD; END_VAR '}{event_task_info : 0,18,11986} -{event_task : 'excpt_noncontinuable','Exception handler','','FUNCTION systemevent: DWORD VAR_INPUT dwEvent: DWORD; dwFilter: DWORD; dwOwner: DWORD; END_VAR '}{event_task_info : 0,20,11986} -{event_task : 'after_reading_inputs','Called after reading of inputs','','FUNCTION systemevent: DWORD VAR_INPUT dwEvent: DWORD; dwFilter: DWORD; dwOwner: DWORD; END_VAR '}{event_task_info : 0,28,11986} -{event_task : 'before_writing_outputs','Called before writing of outputs','','FUNCTION systemevent: DWORD VAR_INPUT dwEvent: DWORD; dwFilter: DWORD; dwOwner: DWORD; END_VAR '}{event_task_info : 0,29,11986} -{event_task : 'debug_loop','Debug loop at breakpoint','','FUNCTION systemevent: DWORD VAR_INPUT dwEvent: DWORD; dwFilter: DWORD; dwOwner: DWORD; END_VAR '}{event_task_info : 0,31,11986} -{event_task : 'online_change','Is called after CodeInit() at Online-Change','','FUNCTION systemevent: DWORD VAR_INPUT dwEvent: DWORD; dwFilter: DWORD; dwOwner: DWORD; END_VAR '}{event_task_info : 0,33,11986} -{event_task : 'before_download','Is called before the Download starts','','FUNCTION systemevent: DWORD VAR_INPUT dwEvent: DWORD; dwFilter: DWORD; dwOwner: DWORD; END_VAR '}{event_task_info : 0,34,11986} -{event_task : 'event_login','Is called before the login service is performed','','FUNCTION systemevent: DWORD VAR_INPUT dwEvent: DWORD; dwFilter: DWORD; dwOwner: DWORD; END_VAR '}{event_task_info : 0,501,11986} -{event_task : 'eth_overload','Ethernet Overload','','FUNCTION systemevent: DWORD VAR_INPUT dwEvent: DWORD; dwFilter: DWORD; dwOwner: DWORD; END_VAR '}{event_task_info : 0,750,11986} -{event_task : 'eth_network_ready','Is called directly after the Network and the PLC are initialised','','FUNCTION systemevent: DWORD VAR_INPUT dwEvent: DWORD; dwFilter: DWORD; dwOwner: DWORD; END_VAR '}{event_task_info : 0,751,11986} -{event_task : 'blink_code','New blink code / Blink code cleared ( Call STATUS_GET_LAST_ERROR for details )','','FUNCTION systemevent: DWORD VAR_INPUT dwEvent: DWORD; dwFilter: DWORD; dwOwner: DWORD; END_VAR '}{event_task_info : 0,752,11986} -{event_task : 'interrupt_0','Interrupt Real Time Clock (every second)','','FUNCTION systemevent: DWORD VAR_INPUT dwEvent: DWORD; dwFilter: DWORD; dwOwner: DWORD; END_VAR '}{event_task_info : 0,1000,11986} - -END_RESOURCE - - -_WORKSPACE -_GLOBALVISUALSETTINGS -_VISUALSETTINGSFLAGS : 0,0,0,0 -_VISUALSETTINGSFLAGS : '','','' -_VISUALSETTINGSDYNTEXTFILECOUNT : 0 -_VISUALBITMAPLISTCOUNT : 0 -_END_GLOBALVISUALSETTINGS -_END_WORKSPACE diff --git a/tests/Codesys/_make_exp.cmd b/tests/Codesys/_make_exp.cmd deleted file mode 100644 index 415af58..0000000 --- a/tests/Codesys/_make_exp.cmd +++ /dev/null @@ -1,15 +0,0 @@ -rem Create Codesys EXP file - -rem Build cmd file -set CODESYS="c:\Program Files (x86)\WAGO Software\CoDeSys V2.3\codesys.exe" -set PROJECT=test -del %PROJECT%.EXP -echo file open %PROJECT%.pro >> codesys_cmd_file.cmd -echo project export %PROJECT%.EXP >> codesys_cmd_file.cmd -rem echo file saveas %PROJECT%.lib internallib >> codesys_cmd_file.cmd -echo file close >> codesys_cmd_file.cmd -echo file quit >> codesys_cmd_file.cmd -%CODESYS% /noinfo /cmd codesys_cmd_file.cmd - -rem Clean all when finished -del codesys_cmd_file.cmd \ No newline at end of file diff --git a/tests/Codesys/test.pro b/tests/Codesys/test.pro deleted file mode 100644 index 6904c0c412cd9814cce6b332086a34bc044fff9d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 34020 zcm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4EN+;?_k3bZTj=1`Ln2j-UXv-G1X9qEYCZyjrsz;H9|M+D()VNh*n9w%2_;gj zuW8G(M^O1;cuiu$bBl>D?bLMREsq!T^?#vw3aJz!UMTua-*`ZQ}Oe3Gt| zf0~3nWJABF)k-kub`T+dzE?lUBSUB1(`h2D_*8r%8HxZe9fp=7CI8%tMuD(Py%yT7 zPcw=>3Ci=RTgJk!kCe$cH?CoCrzsf}Gwi%d4_w-TgQ{8w+!&xh04Wn(fo~i$O;*e~?};( "output/%%f.html" - -cd output -for %%f in (*.html) do %diff% "%%f" ../ref/"%%f" -cd .. -pause - -@echo on \ No newline at end of file diff --git a/tests/IecType/ref/test.iecByte.php.html b/tests/IecType/ref/test.iecByte.php.html deleted file mode 100644 index dc6e8a7..0000000 --- a/tests/IecType/ref/test.iecByte.php.html +++ /dev/null @@ -1 +0,0 @@ -125
98
0
0
0
0
0
0
0
0
0
0
255
255
255
255
158
88
97
168
\ No newline at end of file diff --git a/tests/IecType/ref/test.iecDInt.php.html b/tests/IecType/ref/test.iecDInt.php.html deleted file mode 100644 index 1abf31b..0000000 --- a/tests/IecType/ref/test.iecDInt.php.html +++ /dev/null @@ -1 +0,0 @@ -Endianing off
0 --> Packet: 0000_0000_
1 --> Packet: 0001_0000_
-1 --> Packet: ffff_ffff_
2147483647 --> Packet: ffff_7fff_
-2147483648 --> Packet: 0000_8000_
Endianing on
0 --> Packet: 0000_0000_
1 --> Packet: 0000_0001_
-1 --> Packet: ffff_ffff_
2147483647 --> Packet: 7fff_ffff_
-2147483648 --> Packet: 8000_0000_
\ No newline at end of file diff --git a/tests/IecType/ref/test.iecInt.php.html b/tests/IecType/ref/test.iecInt.php.html deleted file mode 100644 index 583ad9b..0000000 --- a/tests/IecType/ref/test.iecInt.php.html +++ /dev/null @@ -1 +0,0 @@ -Endianing off
0 --> Packet: 0000_
1 --> Packet: 0001_
-1 --> Packet: ffff_
32767 --> Packet: 7fff_
-32768 --> Packet: 8000_
Endianing on
0 --> Packet: 0000_
1 --> Packet: 0001_
-1 --> Packet: ffff_
32767 --> Packet: 7fff_
-32768 --> Packet: 8000_
\ No newline at end of file diff --git a/tests/IecType/ref/test.iecReal.php.html b/tests/IecType/ref/test.iecReal.php.html deleted file mode 100644 index a195b00..0000000 --- a/tests/IecType/ref/test.iecReal.php.html +++ /dev/null @@ -1,12 +0,0 @@ -Endianing off
-0 --> Packet: 0000_0000_
-1 --> Packet: 0000_3f80_
--2 --> Packet: 0000_c000_
-0.333333333333 --> Packet: aaab_3eaa_
-25 --> Packet: 0000_41c8_
-Endianing on
-0 --> Packet: 0000_0000_
-1 --> Packet: 3f80_0000_
--2 --> Packet: c000_0000_
-0.333333333333 --> Packet: 3eaa_aaab_
-25 --> Packet: 41c8_0000_
diff --git a/tests/IecType/test.iecByte.php b/tests/IecType/test.iecByte.php deleted file mode 100644 index 8af17c8..0000000 --- a/tests/IecType/test.iecByte.php +++ /dev/null @@ -1,33 +0,0 @@ - 125, // 32098 (DINT) - "1" => 98, - "2" => 0, - "3" => 0, - "4" => 0, // 0 (DINT) - "5" => 0, - "6" => 0, - "7" => 0, - "8" => 0, // 0 (DINT) - "9" => 0, - "10" => 0, - "11" => 0, - "12" => 255, // -1 (DINT) - "13" => 255, - "14" => 255, - "15" => 255, - "16" => 158, // -25000 (INT) - "17" => 88, - "18" => 97, // 25000 (INT) - "19" => 168 -); - -// Print mixed values -foreach($data as $d) - echo ord(IecType::iecBYTE($d)) . "
"; - -?> \ No newline at end of file diff --git a/tests/IecType/test.iecDInt.php b/tests/IecType/test.iecDInt.php deleted file mode 100644 index 24a4820..0000000 --- a/tests/IecType/test.iecDInt.php +++ /dev/null @@ -1,50 +0,0 @@ - 0, - "1" => 1, - "2" => -1, - "3" => pow(2,31)-1, - "4" => -pow(2,31) -); - -function byte2hex($value){ - $h = dechex(($value >> 4) & 0x0F); - $l = dechex($value & 0x0F); - return "$h$l"; -} - -function printPacket($packet){ - $str = ""; - $str .= "Packet: "; - for($i=0;$i"; -// Print mixed values -for($i=0;$i "; - $v = IecType::iecDINT($data[$i], 0); - echo printPacket($v); - "
"; -} - -echo "Endianing on
"; -// Print mixed values -for($i=0;$i "; - $v = IecType::iecDINT($data[$i], 1); - echo printPacket($v); - "
"; -} - -?> \ No newline at end of file diff --git a/tests/IecType/test.iecInt.php b/tests/IecType/test.iecInt.php deleted file mode 100644 index dec812e..0000000 --- a/tests/IecType/test.iecInt.php +++ /dev/null @@ -1,50 +0,0 @@ - 0, - "1" => 1, - "2" => -1, - "3" => pow(2,15)-1, - "4" => -pow(2,15) -); - -function byte2hex($value){ - $h = dechex(($value >> 4) & 0x0F); - $l = dechex($value & 0x0F); - return "$h$l"; -} - -function printPacket($packet){ - $str = ""; - $str .= "Packet: "; - for($i=0;$i"; -// Print mixed values -for($i=0;$i "; - $v = IecType::iecINT($data[$i], 0); - echo printPacket($v); - "
"; -} - -echo "Endianing on
"; -// Print mixed values -for($i=0;$i "; - $v = IecType::iecINT($data[$i], 1); - echo printPacket($v); - "
"; -} - -?> \ No newline at end of file diff --git a/tests/IecType/test.iecReal.php b/tests/IecType/test.iecReal.php deleted file mode 100644 index 30495fd..0000000 --- a/tests/IecType/test.iecReal.php +++ /dev/null @@ -1,50 +0,0 @@ - 0, // -> 0000 0000 - "1" => 1, // -> 3f80 0000 - "2" => -2, // -> c000 0000 - "3" => 0.333333333333, //1/3 -> 3eaa aaab - "4" => 25 // -> 41c8 0000 -); - -function byte2hex($value){ - $h = dechex(($value >> 4) & 0x0F); - $l = dechex($value & 0x0F); - return "$h$l"; -} - -function printPacket($packet){ - $str = ""; - $str .= "Packet: "; - for($i=0;$i\n"; -// Print mixed values -for($i=0;$i "; - $v = IecType::iecREAL($data[$i], 0); - echo printPacket($v); - "
\n"; -} - -echo "Endianing on
\n"; -// Print mixed values -for($i=0;$i "; - $v = IecType::iecREAL($data[$i], 1); - echo printPacket($v); - "
\n"; -} - -?> \ No newline at end of file diff --git a/tests/ModbusMaster/_test.bat b/tests/ModbusMaster/_test.bat deleted file mode 100644 index 8122004..0000000 --- a/tests/ModbusMaster/_test.bat +++ /dev/null @@ -1,11 +0,0 @@ -@echo off -call ../config.bat - -for %%f in (test.*.php) do %php% -q "%%f" > "output/%%f.html" - -cd output -for %%f in (*.html) do %diff% "%%f" ../ref/"%%f" -cd .. -pause - -@echo on \ No newline at end of file diff --git a/tests/ModbusMaster/ref/test.tcp.fc16fc3.php.html b/tests/ModbusMaster/ref/test.tcp.fc16fc3.php.html deleted file mode 100644 index 00dd046..0000000 --- a/tests/ModbusMaster/ref/test.tcp.fc16fc3.php.html +++ /dev/null @@ -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 -) diff --git a/tests/ModbusMaster/ref/test.tcp.fc26.php.html b/tests/ModbusMaster/ref/test.tcp.fc26.php.html deleted file mode 100644 index 7991aa8..0000000 --- a/tests/ModbusMaster/ref/test.tcp.fc26.php.html +++ /dev/null @@ -1 +0,0 @@ -writeMultipleRegister (FC26): DONE \ No newline at end of file diff --git a/tests/ModbusMaster/ref/test.tcp.socket_protocol_mismatch.php.html b/tests/ModbusMaster/ref/test.tcp.socket_protocol_mismatch.php.html deleted file mode 100644 index b25cfe4..0000000 --- a/tests/ModbusMaster/ref/test.tcp.socket_protocol_mismatch.php.html +++ /dev/null @@ -1 +0,0 @@ -Caught exception: Unknown socket protocol, should be 'TCP' or 'UDP' diff --git a/tests/ModbusMaster/ref/test.udp.fc16fc3.php.html b/tests/ModbusMaster/ref/test.udp.fc16fc3.php.html deleted file mode 100644 index 00dd046..0000000 --- a/tests/ModbusMaster/ref/test.udp.fc16fc3.php.html +++ /dev/null @@ -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 -) diff --git a/tests/ModbusMaster/ref/test.udp.fc26.php.html b/tests/ModbusMaster/ref/test.udp.fc26.php.html deleted file mode 100644 index 7991aa8..0000000 --- a/tests/ModbusMaster/ref/test.udp.fc26.php.html +++ /dev/null @@ -1 +0,0 @@ -writeMultipleRegister (FC26): DONE \ No newline at end of file diff --git a/tests/ModbusMaster/test.tcp.fc16fc3.php b/tests/ModbusMaster/test.tcp.fc16fc3.php deleted file mode 100644 index bd0b765..0000000 --- a/tests/ModbusMaster/test.tcp.fc16fc3.php +++ /dev/null @@ -1,44 +0,0 @@ -writeMultipleRegister(0, 12288, $data, $dataTypes); -// Read data - FC3 -$recData = $modbus->readMultipleRegisters(0, 12288, 5); -print_r($recData); - -// Data to be writen - INT -$data = array(0, 1, -1, pow(2,15)-1, -pow(2,15)); -$dataTypes = array("INT", "INT", "INT", "INT", "INT"); -// Write data - FC 16 -$modbus->writeMultipleRegister(0, 12288, $data, $dataTypes); -// Read data - FC3 -$recData = $modbus->readMultipleRegisters(0, 12288, 5); -print_r($recData); - -// Data to be writen - DINT -$data = array(0, 1, -1, pow(2,31)-1, -pow(2,31)); -$dataTypes = array("DINT", "DINT", "DINT", "DINT", "DINT"); -// Write data - FC 16 -$modbus->writeMultipleRegister(0, 12288, $data, $dataTypes); -// Read data - FC3 -$recData = $modbus->readMultipleRegisters(0, 12288, 10); -print_r($recData); - -// Data to be writen - REAL -$data = array(0, 1, -2, 1/3, 25); -$dataTypes = array("REAL", "REAL", "REAL", "REAL", "REAL"); -// Write data - FC 16 -$modbus->writeMultipleRegister(0, 12288, $data, $dataTypes); -// Read data - FC3 -$recData = $modbus->readMultipleRegisters(0, 12288, 10); -print_r($recData); - -?> \ No newline at end of file diff --git a/tests/ModbusMaster/test.tcp.fc26.php b/tests/ModbusMaster/test.tcp.fc26.php deleted file mode 100644 index 2c76b7f..0000000 --- a/tests/ModbusMaster/test.tcp.fc26.php +++ /dev/null @@ -1,24 +0,0 @@ -readWriteRegisters(0, 12288, 6, 12288, $data, $dataTypes); - -if(!$recData) { - // Print error information if any - echo "
Error:
" . $modbus->errstr . "
"; - // - exit(); -} - -// Print status information -echo "writeMultipleRegister (FC26): DONE"; -?> \ No newline at end of file diff --git a/tests/ModbusMaster/test.tcp.socket_protocol_mismatch.php b/tests/ModbusMaster/test.tcp.socket_protocol_mismatch.php deleted file mode 100644 index aa5f691..0000000 --- a/tests/ModbusMaster/test.tcp.socket_protocol_mismatch.php +++ /dev/null @@ -1,22 +0,0 @@ -readWriteRegisters(0, 12288, 6, 12288, $data, $dataTypes); -} catch (Exception $e) { - echo 'Caught exception: ', $e->getMessage(), "\n"; - exit(); -} -// Should through an Exception - -// Print status information -echo "Should never reach this line!"; \ No newline at end of file diff --git a/tests/ModbusMaster/test.udp.fc16fc3.php b/tests/ModbusMaster/test.udp.fc16fc3.php deleted file mode 100644 index 20dee62..0000000 --- a/tests/ModbusMaster/test.udp.fc16fc3.php +++ /dev/null @@ -1,44 +0,0 @@ -writeMultipleRegister(0, 12288, $data, $dataTypes); -// Read data - FC3 -$recData = $modbus->readMultipleRegisters(0, 12288, 5); -print_r($recData); - -// Data to be writen - INT -$data = array(0, 1, -1, pow(2,15)-1, -pow(2,15)); -$dataTypes = array("INT", "INT", "INT", "INT", "INT"); -// Write data - FC 16 -$modbus->writeMultipleRegister(0, 12288, $data, $dataTypes); -// Read data - FC3 -$recData = $modbus->readMultipleRegisters(0, 12288, 5); -print_r($recData); - -// Data to be writen - DINT -$data = array(0, 1, -1, pow(2,31)-1, -pow(2,31)); -$dataTypes = array("DINT", "DINT", "DINT", "DINT", "DINT"); -// Write data - FC 16 -$modbus->writeMultipleRegister(0, 12288, $data, $dataTypes); -// Read data - FC3 -$recData = $modbus->readMultipleRegisters(0, 12288, 10); -print_r($recData); - -// Data to be writen - REAL -$data = array(0, 1, -2, 1/3, 25); -$dataTypes = array("REAL", "REAL", "REAL", "REAL", "REAL"); -// Write data - FC 16 -$modbus->writeMultipleRegister(0, 12288, $data, $dataTypes); -// Read data - FC3 -$recData = $modbus->readMultipleRegisters(0, 12288, 10); -print_r($recData); - -?> \ No newline at end of file diff --git a/tests/ModbusMaster/test.udp.fc26.php b/tests/ModbusMaster/test.udp.fc26.php deleted file mode 100644 index 02352ac..0000000 --- a/tests/ModbusMaster/test.udp.fc26.php +++ /dev/null @@ -1,24 +0,0 @@ -readWriteRegisters(0, 12288, 6, 12288, $data, $dataTypes); - -if(!$recData) { - // Print error information if any - echo "
Error:
" . $modbus->errstr . "
"; - // - exit(); -} - -// Print status information -echo "writeMultipleRegister (FC26): DONE"; -?> \ No newline at end of file diff --git a/tests/ModbusMasterTcp/_test.bat b/tests/ModbusMasterTcp/_test.bat deleted file mode 100644 index 8122004..0000000 --- a/tests/ModbusMasterTcp/_test.bat +++ /dev/null @@ -1,11 +0,0 @@ -@echo off -call ../config.bat - -for %%f in (test.*.php) do %php% -q "%%f" > "output/%%f.html" - -cd output -for %%f in (*.html) do %diff% "%%f" ../ref/"%%f" -cd .. -pause - -@echo on \ No newline at end of file diff --git a/tests/ModbusMasterTcp/ref/test.fc16fc3.php.html b/tests/ModbusMasterTcp/ref/test.fc16fc3.php.html deleted file mode 100644 index 00dd046..0000000 --- a/tests/ModbusMasterTcp/ref/test.fc16fc3.php.html +++ /dev/null @@ -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 -) diff --git a/tests/ModbusMasterTcp/ref/test.fc26.php.html b/tests/ModbusMasterTcp/ref/test.fc26.php.html deleted file mode 100644 index 7991aa8..0000000 --- a/tests/ModbusMasterTcp/ref/test.fc26.php.html +++ /dev/null @@ -1 +0,0 @@ -writeMultipleRegister (FC26): DONE \ No newline at end of file diff --git a/tests/ModbusMasterTcp/test.fc16fc3.php b/tests/ModbusMasterTcp/test.fc16fc3.php deleted file mode 100644 index 2fc3ee2..0000000 --- a/tests/ModbusMasterTcp/test.fc16fc3.php +++ /dev/null @@ -1,44 +0,0 @@ -writeMultipleRegister(0, 12288, $data, $dataTypes); -// Read data - FC3 -$recData = $modbus->readMultipleRegisters(0, 12288, 5); -print_r($recData); - -// Data to be writen - INT -$data = array(0, 1, -1, pow(2,15)-1, -pow(2,15)); -$dataTypes = array("INT", "INT", "INT", "INT", "INT"); -// Write data - FC 16 -$modbus->writeMultipleRegister(0, 12288, $data, $dataTypes); -// Read data - FC3 -$recData = $modbus->readMultipleRegisters(0, 12288, 5); -print_r($recData); - -// Data to be writen - DINT -$data = array(0, 1, -1, pow(2,31)-1, -pow(2,31)); -$dataTypes = array("DINT", "DINT", "DINT", "DINT", "DINT"); -// Write data - FC 16 -$modbus->writeMultipleRegister(0, 12288, $data, $dataTypes); -// Read data - FC3 -$recData = $modbus->readMultipleRegisters(0, 12288, 10); -print_r($recData); - -// Data to be writen - REAL -$data = array(0, 1, -2, 1/3, 25); -$dataTypes = array("REAL", "REAL", "REAL", "REAL", "REAL"); -// Write data - FC 16 -$modbus->writeMultipleRegister(0, 12288, $data, $dataTypes); -// Read data - FC3 -$recData = $modbus->readMultipleRegisters(0, 12288, 10); -print_r($recData); - -?> \ No newline at end of file diff --git a/tests/ModbusMasterTcp/test.fc26.php b/tests/ModbusMasterTcp/test.fc26.php deleted file mode 100644 index 076ab22..0000000 --- a/tests/ModbusMasterTcp/test.fc26.php +++ /dev/null @@ -1,24 +0,0 @@ -readWriteRegisters(0, 12288, 6, 12288, $data, $dataTypes); - -if(!$recData) { - // Print error information if any - echo "
Error:
" . $modbus->errstr . "
"; - // - exit(); -} - -// Print status information -echo "writeMultipleRegister (FC26): DONE"; -?> \ No newline at end of file diff --git a/tests/ModbusMasterUdp/_test.bat b/tests/ModbusMasterUdp/_test.bat deleted file mode 100644 index 8122004..0000000 --- a/tests/ModbusMasterUdp/_test.bat +++ /dev/null @@ -1,11 +0,0 @@ -@echo off -call ../config.bat - -for %%f in (test.*.php) do %php% -q "%%f" > "output/%%f.html" - -cd output -for %%f in (*.html) do %diff% "%%f" ../ref/"%%f" -cd .. -pause - -@echo on \ No newline at end of file diff --git a/tests/ModbusMasterUdp/ref/test.fc15fc1.php.html b/tests/ModbusMasterUdp/ref/test.fc15fc1.php.html deleted file mode 100644 index 55a3de0..0000000 --- a/tests/ModbusMasterUdp/ref/test.fc15fc1.php.html +++ /dev/null @@ -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) -} diff --git a/tests/ModbusMasterUdp/ref/test.fc16fc3.php.html b/tests/ModbusMasterUdp/ref/test.fc16fc3.php.html deleted file mode 100644 index 00dd046..0000000 --- a/tests/ModbusMasterUdp/ref/test.fc16fc3.php.html +++ /dev/null @@ -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 -) diff --git a/tests/ModbusMasterUdp/ref/test.fc16fc3bind.php.html b/tests/ModbusMasterUdp/ref/test.fc16fc3bind.php.html deleted file mode 100644 index 00dd046..0000000 --- a/tests/ModbusMasterUdp/ref/test.fc16fc3bind.php.html +++ /dev/null @@ -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 -) diff --git a/tests/ModbusMasterUdp/ref/test.fc2.php.html b/tests/ModbusMasterUdp/ref/test.fc2.php.html deleted file mode 100644 index 5baae72..0000000 --- a/tests/ModbusMasterUdp/ref/test.fc2.php.html +++ /dev/null @@ -1,7 +0,0 @@ -Test should pass when %IX0.0==FALSE and %IX0.1==TRUE -array(2) { - [0]=> - bool(false) - [1]=> - bool(true) -} diff --git a/tests/ModbusMasterUdp/ref/test.fc26.php.html b/tests/ModbusMasterUdp/ref/test.fc26.php.html deleted file mode 100644 index 7991aa8..0000000 --- a/tests/ModbusMasterUdp/ref/test.fc26.php.html +++ /dev/null @@ -1 +0,0 @@ -writeMultipleRegister (FC26): DONE \ No newline at end of file diff --git a/tests/ModbusMasterUdp/ref/test.fc26bind.php.html b/tests/ModbusMasterUdp/ref/test.fc26bind.php.html deleted file mode 100644 index 7991aa8..0000000 --- a/tests/ModbusMasterUdp/ref/test.fc26bind.php.html +++ /dev/null @@ -1 +0,0 @@ -writeMultipleRegister (FC26): DONE \ No newline at end of file diff --git a/tests/ModbusMasterUdp/ref/test.fc4.php.html b/tests/ModbusMasterUdp/ref/test.fc4.php.html deleted file mode 100644 index 4cbe5ae..0000000 --- a/tests/ModbusMasterUdp/ref/test.fc4.php.html +++ /dev/null @@ -1,11 +0,0 @@ -Test should pass when %IX0.0==FALSE and %IX0.1==TRUE -array(4) { - [0]=> - int(0) - [1]=> - int(2) - [2]=> - int(0) - [3]=> - int(0) -} diff --git a/tests/ModbusMasterUdp/ref/test.fc5.php.html b/tests/ModbusMasterUdp/ref/test.fc5.php.html deleted file mode 100644 index a6a24be..0000000 --- a/tests/ModbusMasterUdp/ref/test.fc5.php.html +++ /dev/null @@ -1,5 +0,0 @@ -Array -( - [0] => 0 - [1] => 5 -) diff --git a/tests/ModbusMasterUdp/ref/test.fc6fc3.php.html b/tests/ModbusMasterUdp/ref/test.fc6fc3.php.html deleted file mode 100644 index 6102dcd..0000000 --- a/tests/ModbusMasterUdp/ref/test.fc6fc3.php.html +++ /dev/null @@ -1,5 +0,0 @@ -Array -( - [0] => 207 - [1] => 199 -) diff --git a/tests/ModbusMasterUdp/test.fc15fc1.php b/tests/ModbusMasterUdp/test.fc15fc1.php deleted file mode 100644 index 5a7d8c4..0000000 --- a/tests/ModbusMasterUdp/test.fc15fc1.php +++ /dev/null @@ -1,22 +0,0 @@ -writeMultipleCoils(0, 12288, $data); -//echo $modbus->status; -//$modbus->status = ""; -//echo "\n\n"; -// Read data - FC 1 -$recData = $modbus->readCoils(0, 12288, 32); -//echo $modbus->status; -//echo "\n\n"; -var_dump($recData); \ No newline at end of file diff --git a/tests/ModbusMasterUdp/test.fc16fc3.php b/tests/ModbusMasterUdp/test.fc16fc3.php deleted file mode 100644 index dff33c7..0000000 --- a/tests/ModbusMasterUdp/test.fc16fc3.php +++ /dev/null @@ -1,44 +0,0 @@ -writeMultipleRegister(0, 12288, $data, $dataTypes); -// Read data - FC3 -$recData = $modbus->readMultipleRegisters(0, 12288, 5); -print_r($recData); - -// Data to be writen - INT -$data = array(0, 1, -1, pow(2,15)-1, -pow(2,15)); -$dataTypes = array("INT", "INT", "INT", "INT", "INT"); -// Write data - FC 16 -$modbus->writeMultipleRegister(0, 12288, $data, $dataTypes); -// Read data - FC3 -$recData = $modbus->readMultipleRegisters(0, 12288, 5); -print_r($recData); - -// Data to be writen - DINT -$data = array(0, 1, -1, pow(2,31)-1, -pow(2,31)); -$dataTypes = array("DINT", "DINT", "DINT", "DINT", "DINT"); -// Write data - FC 16 -$modbus->writeMultipleRegister(0, 12288, $data, $dataTypes); -// Read data - FC3 -$recData = $modbus->readMultipleRegisters(0, 12288, 10); -print_r($recData); - -// Data to be writen - REAL -$data = array(0, 1, -2, 1/3, 25); -$dataTypes = array("REAL", "REAL", "REAL", "REAL", "REAL"); -// Write data - FC 16 -$modbus->writeMultipleRegister(0, 12288, $data, $dataTypes); -// Read data - FC3 -$recData = $modbus->readMultipleRegisters(0, 12288, 10); -print_r($recData); - -?> \ No newline at end of file diff --git a/tests/ModbusMasterUdp/test.fc16fc3bind.php b/tests/ModbusMasterUdp/test.fc16fc3bind.php deleted file mode 100644 index 5d3bed9..0000000 --- a/tests/ModbusMasterUdp/test.fc16fc3bind.php +++ /dev/null @@ -1,45 +0,0 @@ -client = $test_bind_client_ip; - -// Data to be writen - BYTE -$data = array(0, 1, 1, pow(2,8)-1, pow(2,8)-1); -$dataTypes = array("BYTE", "BYTE", "BYTE", "BYTE", "BYTE"); -// Write data - FC 16 -$modbus->writeMultipleRegister(0, 12288, $data, $dataTypes); -// Read data - FC3 -$recData = $modbus->readMultipleRegisters(0, 12288, 5); -print_r($recData); - -// Data to be writen - INT -$data = array(0, 1, -1, pow(2,15)-1, -pow(2,15)); -$dataTypes = array("INT", "INT", "INT", "INT", "INT"); -// Write data - FC 16 -$modbus->writeMultipleRegister(0, 12288, $data, $dataTypes); -// Read data - FC3 -$recData = $modbus->readMultipleRegisters(0, 12288, 5); -print_r($recData); - -// Data to be writen - DINT -$data = array(0, 1, -1, pow(2,31)-1, -pow(2,31)); -$dataTypes = array("DINT", "DINT", "DINT", "DINT", "DINT"); -// Write data - FC 16 -$modbus->writeMultipleRegister(0, 12288, $data, $dataTypes); -// Read data - FC3 -$recData = $modbus->readMultipleRegisters(0, 12288, 10); -print_r($recData); - -// Data to be writen - REAL -$data = array(0, 1, -2, 1/3, 25); -$dataTypes = array("REAL", "REAL", "REAL", "REAL", "REAL"); -// Write data - FC 16 -$modbus->writeMultipleRegister(0, 12288, $data, $dataTypes); -// Read data - FC3 -$recData = $modbus->readMultipleRegisters(0, 12288, 10); -print_r($recData); - -?> \ No newline at end of file diff --git a/tests/ModbusMasterUdp/test.fc2.php b/tests/ModbusMasterUdp/test.fc2.php deleted file mode 100644 index 3c73077..0000000 --- a/tests/ModbusMasterUdp/test.fc2.php +++ /dev/null @@ -1,14 +0,0 @@ -readInputDiscretes(0, 0, 2); - -var_dump($recData); \ No newline at end of file diff --git a/tests/ModbusMasterUdp/test.fc26.php b/tests/ModbusMasterUdp/test.fc26.php deleted file mode 100644 index 1a889de..0000000 --- a/tests/ModbusMasterUdp/test.fc26.php +++ /dev/null @@ -1,24 +0,0 @@ -readWriteRegisters(0, 12288, 6, 12288, $data, $dataTypes); - -if(!$recData) { - // Print error information if any - echo "
Error:
" . $modbus->errstr . "
"; - // - exit(); -} - -// Print status information -echo "writeMultipleRegister (FC26): DONE"; -?> \ No newline at end of file diff --git a/tests/ModbusMasterUdp/test.fc26bind.php b/tests/ModbusMasterUdp/test.fc26bind.php deleted file mode 100644 index bf24f9e..0000000 --- a/tests/ModbusMasterUdp/test.fc26bind.php +++ /dev/null @@ -1,25 +0,0 @@ -client = $test_bind_client_ip; - -// Data to be writen -$data = array(1000, 2000, 1.250, 1.250); -$dataTypes = array("REAL", "REAL", "REAL", "REAL"); - -// FC23 -$recData = $modbus->readWriteRegisters(0, 12288, 6, 12288, $data, $dataTypes); - -if(!$recData) { - // Print error information if any - echo "
Error:
" . $modbus->errstr . "
"; - // - exit(); -} - -// Print status information -echo "writeMultipleRegister (FC26): DONE"; -?> \ No newline at end of file diff --git a/tests/ModbusMasterUdp/test.fc4.php b/tests/ModbusMasterUdp/test.fc4.php deleted file mode 100644 index dee4929..0000000 --- a/tests/ModbusMasterUdp/test.fc4.php +++ /dev/null @@ -1,14 +0,0 @@ -readMultipleInputRegisters(0, 0, 2); - -var_dump($recData); \ No newline at end of file diff --git a/tests/ModbusMasterUdp/test.fc5.php b/tests/ModbusMasterUdp/test.fc5.php deleted file mode 100644 index 95e6f92..0000000 --- a/tests/ModbusMasterUdp/test.fc5.php +++ /dev/null @@ -1,23 +0,0 @@ -writeSingleRegister(0, 12288, array(0), array('WORD')); - -// Write single coil - FC5 -$modbus->writeSingleCoil(0, 12288, $data_true); -$modbus->writeSingleCoil(0, 12289, $data_false); -$modbus->writeSingleCoil(0, 12290, $data_true); -$modbus->writeSingleCoil(0, 12291, $data_false); - -// Read data - FC3 -$recData = $modbus->readMultipleRegisters(0, 12288, 1); -print_r($recData); diff --git a/tests/ModbusMasterUdp/test.fc6fc3.php b/tests/ModbusMasterUdp/test.fc6fc3.php deleted file mode 100644 index 03c39f5..0000000 --- a/tests/ModbusMasterUdp/test.fc6fc3.php +++ /dev/null @@ -1,15 +0,0 @@ -writeSingleRegister(0, 12288, $data, $dataTypes); -// Read data - FC3 -$recData = $modbus->readMultipleRegisters(0, 12288, 1); -print_r($recData); diff --git a/tests/PhpType/_test.bat b/tests/PhpType/_test.bat deleted file mode 100644 index 8122004..0000000 --- a/tests/PhpType/_test.bat +++ /dev/null @@ -1,11 +0,0 @@ -@echo off -call ../config.bat - -for %%f in (test.*.php) do %php% -q "%%f" > "output/%%f.html" - -cd output -for %%f in (*.html) do %diff% "%%f" ../ref/"%%f" -cd .. -pause - -@echo on \ No newline at end of file diff --git a/tests/PhpType/ref/test.bytes2mixed.php.html b/tests/PhpType/ref/test.bytes2mixed.php.html deleted file mode 100644 index 952bc9d..0000000 --- a/tests/PhpType/ref/test.bytes2mixed.php.html +++ /dev/null @@ -1 +0,0 @@ -32098
0
0
-1
-25000
25000
\ No newline at end of file diff --git a/tests/PhpType/ref/test.bytes2real.php.html b/tests/PhpType/ref/test.bytes2real.php.html deleted file mode 100644 index 7d44edb..0000000 --- a/tests/PhpType/ref/test.bytes2real.php.html +++ /dev/null @@ -1 +0,0 @@ -1000
2000
1.25
\ No newline at end of file diff --git a/tests/PhpType/ref/test.bytes2signedint.php.html b/tests/PhpType/ref/test.bytes2signedint.php.html deleted file mode 100644 index a2b10ea..0000000 --- a/tests/PhpType/ref/test.bytes2signedint.php.html +++ /dev/null @@ -1 +0,0 @@ --1
0
1
-2147483648
2147483647
diff --git a/tests/PhpType/ref/test.bytes2string.php.html b/tests/PhpType/ref/test.bytes2string.php.html deleted file mode 100644 index 31bbf09..0000000 --- a/tests/PhpType/ref/test.bytes2string.php.html +++ /dev/null @@ -1 +0,0 @@ -eHll oowlr!da
Hello world!
\ No newline at end of file diff --git a/tests/PhpType/ref/test.bytes2unsignedint.php.html b/tests/PhpType/ref/test.bytes2unsignedint.php.html deleted file mode 100644 index 29be8ee..0000000 --- a/tests/PhpType/ref/test.bytes2unsignedint.php.html +++ /dev/null @@ -1,6 +0,0 @@ -float(4294967295) -
int(0) -
int(1) -
float(2147483648) -
int(2147483647) -
diff --git a/tests/PhpType/ref/test.strangearray.size.php.html b/tests/PhpType/ref/test.strangearray.size.php.html deleted file mode 100644 index d0e619d..0000000 --- a/tests/PhpType/ref/test.strangearray.size.php.html +++ /dev/null @@ -1 +0,0 @@ -Exception 'Data are not in array 2 or 4 bytes'
25602
Exception 'Data are not in array 2 or 4 bytes'
25602
Exception 'Data are not in array 2 or 4 bytes'
\ No newline at end of file diff --git a/tests/PhpType/ref/test.strangearray.textarray.php.html b/tests/PhpType/ref/test.strangearray.textarray.php.html deleted file mode 100644 index 734d099..0000000 --- a/tests/PhpType/ref/test.strangearray.textarray.php.html +++ /dev/null @@ -1 +0,0 @@ -Exception 'Data are not numeric' \ No newline at end of file diff --git a/tests/PhpType/test.bytes2mixed.php b/tests/PhpType/test.bytes2mixed.php deleted file mode 100644 index 6b1b391..0000000 --- a/tests/PhpType/test.bytes2mixed.php +++ /dev/null @@ -1,37 +0,0 @@ - 125, // 32098 (DINT) - "1" => 98, - "2" => 0, - "3" => 0, - "4" => 0, // 0 (DINT) - "5" => 0, - "6" => 0, - "7" => 0, - "8" => 0, // 0 (DINT) - "9" => 0, - "10" => 0, - "11" => 0, - "12" => 255, // -1 (DINT) - "13" => 255, - "14" => 255, - "15" => 255, - "16" => 158, // -25000 (INT) - "17" => 88, - "18" => 97, // 25000 (INT) - "19" => 168 -); - -// Print mixed values -echo PhpType::bytes2unsignedInt(array_slice($data, 0, 4)) . "
"; -echo PhpType::bytes2signedInt(array_slice($data, 4, 4)) . "
"; -echo PhpType::bytes2signedInt(array_slice($data, 8, 4)) . "
"; -echo PhpType::bytes2signedInt(array_slice($data, 12, 4)) . "
"; -echo PhpType::bytes2signedInt(array_slice($data, 16, 2)) . "
"; -echo PhpType::bytes2signedInt(array_slice($data, 18, 2)) . "
"; - -?> \ No newline at end of file diff --git a/tests/PhpType/test.bytes2real.php b/tests/PhpType/test.bytes2real.php deleted file mode 100644 index b6acd56..0000000 --- a/tests/PhpType/test.bytes2real.php +++ /dev/null @@ -1,27 +0,0 @@ - 0, - 1 => 0, - 2 => 68, - 3 => 122, - 4 => 0, - 5 => 0, - 6 => 68, - 7 => 250, - 8 => 0, - 9 => 0, - 10 => 63, - 11 => 160, -); - -$dword = array_chunk($data, 4); - -// Print float interpretation of the real value -echo PhpType::bytes2float($dword[0]) . "
"; -echo PhpType::bytes2float($dword[1]) . "
"; -echo PhpType::bytes2float($dword[2]) . "
"; -?> \ No newline at end of file diff --git a/tests/PhpType/test.bytes2signedint.php b/tests/PhpType/test.bytes2signedint.php deleted file mode 100644 index 567299c..0000000 --- a/tests/PhpType/test.bytes2signedint.php +++ /dev/null @@ -1,35 +0,0 @@ -"; -} -?> diff --git a/tests/PhpType/test.bytes2string.php b/tests/PhpType/test.bytes2string.php deleted file mode 100644 index 547502b..0000000 --- a/tests/PhpType/test.bytes2string.php +++ /dev/null @@ -1,28 +0,0 @@ -"; -echo PhpType::bytes2string($data, true) . "
"; - -?> diff --git a/tests/PhpType/test.bytes2unsignedint.php b/tests/PhpType/test.bytes2unsignedint.php deleted file mode 100644 index 9aa6f37..0000000 --- a/tests/PhpType/test.bytes2unsignedint.php +++ /dev/null @@ -1,36 +0,0 @@ -"; -} -?> diff --git a/tests/PhpType/test.strangearray.size.php b/tests/PhpType/test.strangearray.size.php deleted file mode 100644 index ba817e2..0000000 --- a/tests/PhpType/test.strangearray.size.php +++ /dev/null @@ -1,44 +0,0 @@ - 100, // 32098 (DINT) - "1" => 2, - "2" => 0, - "3" => 0, - "4" => 100, // 32098 (DINT) - "5" => 2 -); - -// Print mixed values -try { - echo PhpType::bytes2unsignedInt(array_slice($data, 0, 1)) . "
"; -} catch(Exception $e) { - echo "Exception 'Data are not in array 2 or 4 bytes'". "
"; -} -try { - echo PhpType::bytes2unsignedInt(array_slice($data, 0, 2)). "
"; -} catch(Exception $e) { - echo "Exception 'Data are not in array 2 or 4 bytes'". "
"; -} -try { - echo PhpType::bytes2unsignedInt(array_slice($data, 0, 3)). "
"; -} catch(Exception $e) { - echo "Exception 'Data are not in array 2 or 4 bytes'". "
"; -} -try { - echo PhpType::bytes2unsignedInt(array_slice($data, 0, 4)). "
"; -} catch(Exception $e) { - echo "Exception 'Data are not in array 2 or 4 bytes'". "
"; -} -try { - echo PhpType::bytes2unsignedInt(array_slice($data, 0, 5)). "
"; -} catch(Exception $e) { - echo "Exception 'Data are not in array 2 or 4 bytes'". "
"; -} -?> \ No newline at end of file diff --git a/tests/PhpType/test.strangearray.textarray.php b/tests/PhpType/test.strangearray.textarray.php deleted file mode 100644 index 10306a0..0000000 --- a/tests/PhpType/test.strangearray.textarray.php +++ /dev/null @@ -1,22 +0,0 @@ - 100, // 32098 (DINT) - "1" => "e", - "2" => 0, - "3" => 0 -); - -// Print mixed values -try { - echo PhpType::bytes2unsignedInt(array_slice($data, 0, 4)); -} catch(Exception $e) { - echo "Exception 'Data are not numeric'"; -} -?> diff --git a/tests/README.md b/tests/README.md deleted file mode 100644 index 1dbebf5..0000000 --- a/tests/README.md +++ /dev/null @@ -1,3 +0,0 @@ -Probably broken and dubious. - -Left from the original repo. diff --git a/tests/config.bat b/tests/config.bat deleted file mode 100644 index ef49dfc..0000000 --- a/tests/config.bat +++ /dev/null @@ -1,5 +0,0 @@ -set php=c:\Program_Files\xampp\php\php.exe -rem set php=C:\PHP\versions\php-5.2.6-Win32\php.exe -d auto_prepend_file=C:\PHP\locale.php -set diff="diff.exe" -rem set testUri=http://localHost/nette/_trunk/tests -rem set wget=wget.exe diff --git a/tests/config.php b/tests/config.php deleted file mode 100644 index 9c71b4a..0000000 --- a/tests/config.php +++ /dev/null @@ -1,3 +0,0 @@ -