Modbus TCP and UDP library for PHP., originally from code.google.com/p/phpmodbus
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
php-modbus/Phpmodbus/ModbusMasterUdp.php

51 lines
1.2 KiB

12 years ago
<?php
/**
* Phpmodbus Copyright (c) 2004, 2012 Jan Krakora
12 years ago
*
* This source file is subject to the "PhpModbus license" that is bundled
* with this package in the file license.txt.
*
*
* @copyright Copyright (c) 2004, 2012 Jan Krakora
12 years ago
* @license PhpModbus license
* @category Phpmodbus
* @tutorial Phpmodbus.pkg
* @package Phpmodbus
* @version $id$
*
*/
require_once dirname(__FILE__) . '/ModbusMaster.php';
12 years ago
/**
* ModbusMasterUdp
*
* This class deals with the MODBUS master using UDP stack.
*
* Implemented MODBUS master functions:
* - FC 1: read coils
12 years ago
* - FC 3: read multiple registers
* - FC 15: write multiple coils
12 years ago
* - FC 16: write multiple registers
* - FC 23: read write registers
*
* @author Jan Krakora
* @copyright Copyright (c) 2004, 2012 Jan Krakora
12 years ago
* @package Phpmodbus
*
*/
class ModbusMasterUdp extends ModbusMaster {
12 years ago
/**
* ModbusMasterUdp
12 years ago
*
* This is the constructor that defines {@link $host} IP address of the object.
*
* @param String $host An IP address of a Modbus UDP device. E.g. "192.168.1.1".
12 years ago
*/
function ModbusMasterUdp($host){
$this->host = $host;
$this->socket_protocol = "UDP";
12 years ago
}
}