BayEOS-PHP
Main Page
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Pages
bayeos-gateway-client-php
MyClient.php
Go to the documentation of this file.
1
#!/usr/bin/php
2
<?php
3
$options
=array(
'bayeosgateway_url'
=>
4
'http://bayconf.bayceer.uni-bayreuth.de/gateway/frame/saveFlat'
,
5
'bayeosgateway_pw'
=>
'import'
,
6
'bayeosgateway_user'
=>
'import'
);
7
$names
=array(
'PHP-TestDevice1'
,
'PHP-TestDevice2'
);
8
9
require_once
'BayEOSGatewayClient.php'
;
10
/*
11
* extend the BayEOSGatewayClient-Class with a own
12
* implementation of readData($name)
13
*/
14
class
PHPTestDevice
extends
BayEOSGatewayClient
{
15
//Generate Data:
16
protected
function
readData
(){
17
if
($this->names[$this->i]==
'PHP-TestDevice1'
)
18
return
FALSE;
19
else
20
return
array(2,1.0,rand(-1,1));
21
22
}
23
}
24
25
//Create a Instance
26
$client
=
new
PHPTestDevice
(
$names
,
$options
);
27
28
//Run the client
29
$client
->run();
30
31
?>
PHPTestDevice
Definition:
MyClient.php:14
$options
$options
Definition:
MyClient.php:3
$client
$client
Definition:
MyClient.php:26
PHPTestDevice\readData
readData()
Definition:
MyClient.php:16
BayEOSGatewayClient
Definition:
BayEOSGatewayClient.php:845
$names
$names
Definition:
MyClient.php:7
Generated on Wed Jul 22 2015 13:09:58 for BayEOS-PHP by
1.8.6