BayEOS-PHP
 All Data Structures Namespaces Files Functions Variables Pages
Public Member Functions | Protected Member Functions | Protected Attributes
BayEOSGatewayClient Class Reference
Inheritance diagram for BayEOSGatewayClient:
BayEOSFifo Eurotherm2704 PHPLoggerImporter PHPQLI PHPSerialRouter PHPSocketRouter PHPTestDevice PHPXBeeRouter

Public Member Functions

 __construct ($names, $options=array(), $defaults=array())
 
 getOption ($key, $default='')
 
 run ()
 

Protected Member Functions

 initWriter ()
 
 readData ()
 
 saveData ($data)
 

Protected Attributes

 $names
 
 $options
 
 $writer
 
 $i
 

Detailed Description

Definition at line 845 of file BayEOSGatewayClient.php.

Constructor & Destructor Documentation

__construct (   $names,
  $options = array(),
  $defaults = array() 
)

Create a instance of BayEOSGatewayClient

Parameters
array$namesName array: e.g. array('Fifo.0','Fifo.1'...) Name is used for the storage directory: e.g. /tmp/Fifo.0, ...
array$optionsArray of options. Three forms are possible:
  1. $options['key']='value': Same value for all devices
  2. $options['key']=array('value1','value2',...): value1 is for device1, ...
  3. $options['key']=array('name1'=>'value1','name2'=>'value2',..)

It is not possilbe to mix forms for one key!!

Definition at line 862 of file BayEOSGatewayClient.php.

Member Function Documentation

getOption (   $key,
  $default = '' 
)

Helper function to get a option value

Parameters
string$key
string$default
Returns
string Value of the specified option key

Definition at line 913 of file BayEOSGatewayClient.php.

initWriter ( )
protected

Method called by BayEOSGatewayClient::run()

can be overwritten by implementation

Definition at line 1026 of file BayEOSGatewayClient.php.

readData ( )
protected

Method called by BayEOSGatewayClient::run()

must be overwritten by implementation!

Definition at line 1034 of file BayEOSGatewayClient.php.

run ( )

Runs the BayEOSGatewayClient

forks one BayEOSWrite and one BayEOSSender per name

Definition at line 931 of file BayEOSGatewayClient.php.

saveData (   $data)
protected

Method called by BayEOSGatewayClient::run()

can be overwritten by Implementation (e.g. to store routed frames)

Definition at line 1044 of file BayEOSGatewayClient.php.

Field Documentation

$i
protected

Definition at line 1051 of file BayEOSGatewayClient.php.

$names
protected

Definition at line 1048 of file BayEOSGatewayClient.php.

$options
protected

Definition at line 1049 of file BayEOSGatewayClient.php.

$writer
protected

Definition at line 1050 of file BayEOSGatewayClient.php.


The documentation for this class was generated from the following file: