XBee C# library API reference

Show / Hide Table of Contents

Class Raw802Device

This class represents a local 802.15.4 device.

Inheritance
System.Object
AbstractXBeeDevice
XBeeDevice
Raw802Device
Inherited Members
XBeeDevice.PacketReceived
XBeeDevice.DataReceived
XBeeDevice.IOSampleReceived
XBeeDevice.ModemStatusReceived
XBeeDevice.UserDataRelayReceived
XBeeDevice.BluetoothDataReceived
XBeeDevice.MicroPythonDataReceived
XBeeDevice.OperatingMode
XBeeDevice.IsOpen
XBeeDevice.IsRemote
XBeeDevice.ReceiveTimeout
XBeeDevice.Close()
XBeeDevice.GetNextFrameID()
XBeeDevice.GetDestinationAddress()
XBeeDevice.SetDestinationAddress(XBee64BitAddress)
XBeeDevice.GetPANID()
XBeeDevice.SetPANID(Byte[])
XBeeDevice.GetDIOChangeDetection()
XBeeDevice.SetDIOChangeDetection(ISet<IOLine>)
XBeeDevice.GetIOSamplingRate()
XBeeDevice.SetIOSamplingRate(Int32)
XBeeDevice.GetPowerLevel()
XBeeDevice.SetPowerLevel(PowerLevel)
XBeeDevice.SendDataAsync(RemoteXBeeDevice, Byte[])
XBeeDevice.SendData(RemoteXBeeDevice, Byte[])
XBeeDevice.SendBroadcastData(Byte[])
XBeeDevice.SendUserDataRelay(XBeeLocalInterface, Byte[])
XBeeDevice.SendBluetoothData(Byte[])
XBeeDevice.SendMicroPythonData(Byte[])
XBeeDevice.SendPacket(XBeePacket, EventHandler<PacketReceivedEventArgs>)
XBeeDevice.SendPacketAsync(XBeePacket)
XBeeDevice.SendPacket(XBeePacket)
XBeeDevice.Reset()
XBeeDevice.ReadData()
XBeeDevice.ReadData(Int32)
XBeeDevice.ReadDataFrom(RemoteXBeeDevice)
XBeeDevice.ReadDataFrom(RemoteXBeeDevice, Int32)
XBeeDevice.ReadUserDataRelay()
XBeeDevice.ReadUserDataRelay(Int32)
AbstractXBeeDevice.DEFAULT_RECEIVE_TIMETOUT
AbstractXBeeDevice.TIMEOUT_BEFORE_COMMAND_MODE
AbstractXBeeDevice.TIMEOUT_ENTER_COMMAND_MODE
AbstractXBeeDevice.PARAMETER_NODE_ID
AbstractXBeeDevice.TIMEOUT_READ_PACKET
AbstractXBeeDevice.dataReader
AbstractXBeeDevice.currentFrameID
AbstractXBeeDevice.receiveTimeout
AbstractXBeeDevice.localXBeeDevice
AbstractXBeeDevice.logger
AbstractXBeeDevice.bluetoothPassword
AbstractXBeeDevice.network
AbstractXBeeDevice.ExplicitDataReceived
AbstractXBeeDevice.SerialDataReceived
AbstractXBeeDevice.SMSReceived
AbstractXBeeDevice.IPDataReceived
AbstractXBeeDevice.FirmwareVersion
AbstractXBeeDevice.HardwareVersion
AbstractXBeeDevice.HardwareVersionString
AbstractXBeeDevice.XBee16BitAddr
AbstractXBeeDevice.XBee64BitAddr
AbstractXBeeDevice.SignalStrength
AbstractXBeeDevice.ApplyConfigurationChangesEnabled
AbstractXBeeDevice.NodeID
AbstractXBeeDevice.IsInitialized
AbstractXBeeDevice.ConnectionInterface
AbstractXBeeDevice.APIOutputMode
AbstractXBeeDevice.ReadDeviceInfo()
AbstractXBeeDevice.SetIOConfiguration(IOLine, IOMode)
AbstractXBeeDevice.GetIOConfiguration(IOLine)
AbstractXBeeDevice.SetDIOValue(IOLine, IOValue)
AbstractXBeeDevice.GetDIOValue(IOLine)
AbstractXBeeDevice.SetPWMDutyCycle(IOLine, Double)
AbstractXBeeDevice.GetPWMDutyCycle(IOLine)
AbstractXBeeDevice.GetADCValue(IOLine)
AbstractXBeeDevice.ApplyChanges()
AbstractXBeeDevice.ReadIOSample()
AbstractXBeeDevice.SetParameter(String, Byte[])
AbstractXBeeDevice.GetParameter(String)
AbstractXBeeDevice.ExecuteParameter(String)
AbstractXBeeDevice.SoftwareReset()
AbstractXBeeDevice.ToString()
AbstractXBeeDevice.SetNodeID(String)
AbstractXBeeDevice.WriteChanges()
AbstractXBeeDevice.EnableBluetooth()
AbstractXBeeDevice.DisableBluetooth()
AbstractXBeeDevice.GetBluetoothMacAddress()
AbstractXBeeDevice.UpdateBluetoothPassword(String)
AbstractXBeeDevice.GetAddressString()
AbstractXBeeDevice.SendATCommand(ATCommand)
AbstractXBeeDevice.SendXBeePacketAsync(XBeePacket)
AbstractXBeeDevice.SendXBeePacket(XBeePacket, EventHandler<PacketReceivedEventArgs>)
AbstractXBeeDevice.SendXBeePacket(XBeePacket)
AbstractXBeeDevice.SendAndCheckXBeePacket(XBeePacket, Boolean)
AbstractXBeeDevice.CheckATCommandResponseIsValid(ATCommandResponse)
AbstractXBeeDevice.SendSerialData(Byte[])
AbstractXBeeDevice.DetermineOperatingMode()
AbstractXBeeDevice.ReadExplicitData()
AbstractXBeeDevice.ReadExplicitData(Int32)
AbstractXBeeDevice.ReadExplicitDataFrom(RemoteXBeeDevice)
AbstractXBeeDevice.ReadExplicitDataFrom(RemoteXBeeDevice, Int32)
AbstractXBeeDevice.SendExplicitDataAsync(XBee64BitAddress, Byte, Byte, Byte[], Byte[], Byte[])
AbstractXBeeDevice.SendExplicitDataAsync(XBee64BitAddress, XBee16BitAddress, Byte, Byte, Byte[], Byte[], Byte[])
AbstractXBeeDevice.SendExplicitDataAsync(RemoteXBeeDevice, Byte, Byte, Byte[], Byte[], Byte[])
AbstractXBeeDevice.SendExplicitData(XBee64BitAddress, Byte, Byte, Byte[], Byte[], Byte[])
AbstractXBeeDevice.SendExplicitData(XBee64BitAddress, XBee16BitAddress, Byte, Byte, Byte[], Byte[], Byte[])
AbstractXBeeDevice.SendExplicitData(RemoteXBeeDevice, Byte, Byte, Byte[], Byte[], Byte[])
AbstractXBeeDevice.SendBroadcastExplicitData(Byte, Byte, Byte[], Byte[], Byte[])
AbstractXBeeDevice.SendData(XBee64BitAddress, Byte[])
AbstractXBeeDevice.SendData(XBee64BitAddress, XBee16BitAddress, Byte[])
AbstractXBeeDevice.SendDataAsync(XBee64BitAddress, Byte[])
AbstractXBeeDevice.SendDataAsync(XBee64BitAddress, XBee16BitAddress, Byte[])
AbstractXBeeDevice.SetBluetoothPassword(String)
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: XBeeLibrary.Core
Assembly: XBeeLibrary.Core.dll
Syntax
public class Raw802Device : XBeeDevice

Constructors

Raw802Device(IConnectionInterface)

Class constructor. Instantiates a new Raw802Device object with the given connection interface.

Declaration
public Raw802Device(IConnectionInterface connectionInterface)
Parameters
Type Name Description
IConnectionInterface connectionInterface

The connection interface with the physical 802.15.4 device.

Exceptions
Type Condition
System.ArgumentNullException

If connectionInterface == null.

See Also
XBeeDevice(IConnectionInterface)
IConnectionInterface

Properties

XBeeProtocol

The protocol of the XBee device.

Declaration
public override XBeeProtocol XBeeProtocol { get; }
Property Value
Type Description
XBeeProtocol
Overrides
AbstractXBeeDevice.XBeeProtocol
See Also
RAW_802_15_4

Methods

ForceDisassociate()

Forces this XBee device to immediately disassociate from the network and re-attempt to associate.

Declaration
public void ForceDisassociate()
Remarks

Only valid for End Devices.

Exceptions
Type Condition
InterfaceNotOpenException

If this device connection is not open.

TimeoutException

If there is a timeout executing the force disassociate command.

XBeeException

If there is any other XBee related error.

See Also
GetAssociationIndicationStatus()

GetAssociationIndicationStatus()

Returns the current association status of this XBee device.

Declaration
public AssociationIndicationStatus GetAssociationIndicationStatus()
Returns
Type Description
AssociationIndicationStatus

The association indication status of the XBee device.

Remarks

It indicates occurrences of errors during the last association request.

Exceptions
Type Condition
ATCommandEmptyException

If the AI command returns a null or an empty value.

InterfaceNotOpenException

If this device connection is not open.

TimeoutException

If there is a timeout reading the association indication status.

XBeeException

If there is any other XBee related error.

See Also
ForceDisassociate()
AssociationIndicationStatus

GetNetwork()

Returns the network associated with this XBee device.

Declaration
public override XBeeNetwork GetNetwork()
Returns
Type Description
XBeeNetwork

The XBee network of the device.

Overrides
XBeeDevice.GetNetwork()
Exceptions
Type Condition
InterfaceNotOpenException

If this device connection is not open.

See Also
Raw802Network
XBeeNetwork

Open()

Opens the connection interface associated with this XBee device.

Declaration
public override void Open()
Overrides
XBeeDevice.Open()
Remarks

When opening the device an information reading process is automatically performed. This includes:

Exceptions
Type Condition
InterfaceAlreadyOpenException

If this device connection is already open.

InvalidOperatingModeException

If the operating mode of the device is UNKNOWN or AT

BluetoothAuthenticationException

If the BLE authentication process fails.

TimeoutException

If the timeout to read settings when initializing the device elapses without response.

XBeeException

If there is any problem opening this device connection.

See Also
IsOpen
Close()

SendData(XBee16BitAddress, Byte[])

Sends the provided data to the XBee device of the network corresponding to the given 16-bit address.

Declaration
public void SendData(XBee16BitAddress address, byte[] data)
Parameters
Type Name Description
XBee16BitAddress address

The 16-bit address of the XBee that will receive the data.

System.Byte[] data

Byte array containing data to be sent.

Remarks

This method blocks until a success or error response arrives or the configured receive timeout expires.

The receive timeout can be consulted/configured using the ReceiveTimeout property.

For non-blocking operations use the method SendData(XBee16BitAddress, Byte[]).

Exceptions
Type Condition
System.ArgumentNullException

If address == null or if data == null.

InterfaceNotOpenException

If this device connection is not open.

OperationNotSupportedException

If the device is remote.

XBeeException

If there is any XBee related error.

See Also
SendData(RemoteXBeeDevice, System.Byte[])
SendData(XBee64BitAddress, System.Byte[])
SendDataAsync(RemoteXBeeDevice, System.Byte[])
SendDataAsync(XBee16BitAddress, Byte[])
SendDataAsync(XBee64BitAddress, System.Byte[])
XBee16BitAddress

SendDataAsync(XBee16BitAddress, Byte[])

Sends the provided data to the XBee device of the network corresponding to the given 16-bit address asynchronously.

Declaration
public void SendDataAsync(XBee16BitAddress address, byte[] data)
Parameters
Type Name Description
XBee16BitAddress address

The 16-bit address of the XBee that will receive the data.

System.Byte[] data

Byte array containing data to be sent.

Remarks

Asynchronous transmissions do not wait for answer from the remote device or for transmit status packet.

Exceptions
Type Condition
System.ArgumentNullException

If address == null or if data == null.

InterfaceNotOpenException

If this device connection is not open.

OperationNotSupportedException

If the device is remote.

XBeeException

If there is any XBee related error.

See Also
SendData(RemoteXBeeDevice, System.Byte[])
SendData(XBee16BitAddress, Byte[])
SendData(XBee64BitAddress, System.Byte[])
SendDataAsync(RemoteXBeeDevice, System.Byte[])
SendDataAsync(XBee64BitAddress, System.Byte[])
XBee16BitAddress

See Also

CellularDevice
DigiMeshDevice
DigiPointDevice
XBeeDevice
ZigBeeDevice
Product page More documentation Official site About Digi Contact us Support
©2019 Digi International Inc. All rights reserved.
Digi International Inc.