Class Raw802Device
This class represents a local 802.15.4 device.
Inherited Members
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 |
See Also
Properties
XBeeProtocol
The protocol of the XBee device.
Declaration
public override XBeeProtocol XBeeProtocol { get; }
Property Value
Type | Description |
---|---|
XBeeProtocol |
Overrides
See Also
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()
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 |
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
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
Exceptions
Type | Condition |
---|---|
InterfaceNotOpenException | If this device connection is not open. |
See Also
Open()
Opens the connection interface associated with this XBee device.
Declaration
public override void Open()
Overrides
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 | |
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
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 |
InterfaceNotOpenException | If this device connection is not open. |
OperationNotSupportedException | If the device is remote. |
XBeeException | If there is any XBee related error. |
See Also
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 |
InterfaceNotOpenException | If this device connection is not open. |
OperationNotSupportedException | If the device is remote. |
XBeeException | If there is any XBee related error. |