BayEOS-PHP
 All Data Structures Namespaces Files Functions Variables Pages
Public Member Functions | Protected Member Functions
XBee Class Reference
Inheritance diagram for XBee:
phpSerial

Public Member Functions

 XBee ()
 
 confDefaults ($device= '/dev/ttyUSB0')
 
 open ($waitForOpened=0.1)
 
 close ()
 
 send ($frame, $waitForReply=0)
 
 read ($count=0)
 
 getPANID ()
 
 getFrame ($timeout=120)
 
- Public Member Functions inherited from phpSerial
 phpSerial ()
 
 deviceSet ($device)
 
 deviceOpen ($mode="r+b")
 
 deviceClose ()
 
 confBaudRate ($rate)
 
 confParity ($parity)
 
 confCharacterLength ($int)
 
 confStopBits ($length)
 
 confFlowControl ($mode)
 
 setSetserialFlag ($param, $arg="")
 
 sendMessage ($str, $waitForReply=0.1)
 
 readPort ($count=0)
 
 serialflush ()
 
 _ckOpened ()
 
 _ckClosed ()
 
 _exec ($cmd, &$out=null)
 

Protected Member Functions

 _calcChecksum ($data)
 

Additional Inherited Members

- Data Fields inherited from phpSerial
 $_device = null
 
 $_windevice = null
 
 $_dHandle = null
 
 $_dState = SERIAL_DEVICE_NOTSET
 
 $_buffer = ""
 
 $_os = ""
 
 $autoflush = true
 

Detailed Description

Definition at line 26 of file phpXBee.php.

Member Function Documentation

_calcChecksum (   $data)
protected

Calculates checksum for cmdData. Leave off start byte, length and checksum

Parameters
String$dataShould be a binary string
Returns
String $checksum Should be a binary string

Definition at line 160 of file phpXBee.php.

close ( )

Closes this XBee connection

Returns
void

Definition at line 69 of file phpXBee.php.

confDefaults (   $device = '/dev/ttyUSB0')

Sets up typical Connection 38400 8-N-1

Parameters
String$deviceis the path to the xbee, defaults to /dev/ttyUSB0
Returns
void

Definition at line 44 of file phpXBee.php.

getFrame (   $timeout = 120)

Definition at line 172 of file phpXBee.php.

getPANID ( )

Definition at line 122 of file phpXBee.php.

open (   $waitForOpened = 0.1)

Opens this XBee connection.

Note that you can send raw serial with sendMessage from phpSerial

Returns
void
Parameters
$waitForOpenedint amount to sleep after openeing in seconds. Defaults to 0.1

Definition at line 60 of file phpXBee.php.

read (   $count = 0)

Definition at line 86 of file phpXBee.php.

send (   $frame,
  $waitForReply = 0 
)

Sends an XBee frame. $waitForReply is how long to wait on recieving

Parameters
$frame
int$waitForRply
Returns
void

Definition at line 80 of file phpXBee.php.

XBee ( )

Constructor. Parent is phpSerial

Returns
Xbee

Definition at line 33 of file phpXBee.php.


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