phpDocumentor eibnetmux
[ class tree: eibnetmux ] [ index: eibnetmux ] [ all elements ]

Class: KNXgroup

Source Location: /eibnetmux.php

Class KNXgroup

Class Overview

A class for handling a KNX logical group

Use this class to work with a KNX Logical Group, to read its value from the bus or to set it. This class encapsulates the interfaces with the eibnetmux class to communicate with the server relieving you from it.

Located in /eibnetmux.php [line 71]



		
		
		
		

Methods

[ Top ]
Method Summary
KNXgroup   __construct()   Instantiate a KNX logical group.
integer   getAPIversion()   Return API version.
string   getGroupName()   Get group name
string   getValueType()   Return the type of value read from bus for KNX logical group.
mixed   read()   Read value of KNX logical group from bus.
void   write()   Send value to KNX logical group on bus.

[ Top ]
Methods
Constructor __construct  [line 104]

  KNXgroup __construct( string $group, integer $eis_type  )

Instantiate a KNX logical group.

Parameters:
string   $group:  name of group in the form main/sub/group, e.g. 3/2/18
integer   $eis_type:  data type expected by devices associated with this group (1-15)

API Tags:
Access:  public


[ Top ]
getAPIversion  [line 404]

  integer getAPIversion( )

Return API version.


API Tags:
Return:  -1: no connection established, >0: version


[ Top ]
getGroupName  [line 199]

  string getGroupName( )

Get group name


API Tags:
Return:  Name of group, format main/sub/group, e.g. 2/1/9
Access:  public


[ Top ]
getValueType  [line 168]

  string getValueType( )

Return the type of value read from bus for KNX logical group.

The EIS data type specifies the data type of a KNX logical group on the bus. If an application doesn't know a group's data type, use this function to know how to correctly interpret the returned value.


API Tags:
Return:  Type of result: 'number' or 'text'
Access:  public


[ Top ]
read  [line 122]

  mixed read( object $conn  )

Read value of KNX logical group from bus.

This function accesses the KNX bus via the eibnetmux server (using an eibnetmux object). It sends a read request for the KNX logical group and waits for any device to respond. If a response is received, the sent value is converted according to the EIS data type, and finally returned to the caller.

Parameters:
object   $conn:  Object of class eibnetmux

API Tags:
Return:  Result can be integer or string. Use getValueType() to find out.
Access:  public


[ Top ]
write  [line 145]

  void write( object $conn, mixed $value  )

Send value to KNX logical group on bus.

This function accesses the KNX bus via the eibnetmux server (using an eibnetmux object). It converts the passed value according to the EIS data type to the KNX data format and sends it in a write request for the KNX logical group.

Parameters:
object   $conn:  Object of class eibnetmux
mixed   $value:  Value to send to bus (string or integer, depending on group's EIS)

API Tags:
Access:  public


[ Top ]

Documentation generated on Tue, 08 Sep 2009 00:09:17 +0200 by phpDocumentor 1.4.1