Class RXSMSPacket
This class represents a RX (Receive) SMS packet. Packet is built using the parameters of the constructor or providing a valid API payload.
Inherited Members
Namespace: XBeeLibrary.Core.Packet.Cellular
Assembly: XBeeLibrary.Core.dll
Syntax
public class RXSMSPacket : XBeeAPIPacket
Constructors
RXSMSPacket(String, String)
Class constructor. Instantiates a new RXSMSPacket object with the given parameters.
Declaration
public RXSMSPacket(string phoneNumber, string data)
Parameters
Type | Name | Description |
---|---|---|
System.String | phoneNumber | The phone number. Only numbers and '+' prefix allowed. |
System.String | data | The received data. |
Exceptions
Type | Condition |
---|---|
System.ArgumentException | If
|
System.ArgumentNullException | If |
Properties
APIPacketParameters
Gets a map with the XBee packet parameters and their values.
Declaration
protected override LinkedDictionary<string, string> APIPacketParameters { get; }
Property Value
Type | Description |
---|---|
LinkedDictionary<System.String, System.String> | A sorted map containing the XBee packet parameters with their values. |
Overrides
APIPacketSpecificData
Gets the XBee API packet specific data.
Declaration
protected override byte[] APIPacketSpecificData { get; }
Property Value
Type | Description |
---|---|
System.Byte[] |
Overrides
Remarks
This does not include the frame ID if it is needed.
Data
The received data.
Declaration
public string Data { get; set; }
Property Value
Type | Description |
---|---|
System.String |
IsBroadcast
Indicates whether the packet is a broadcast packet.
Declaration
public override bool IsBroadcast { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Overrides
NeedsAPIFrameID
Indicates whether the API packet needs API Frame ID or not.
Declaration
public override bool NeedsAPIFrameID { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Overrides
PhoneNumber
The phone number. Only numbers and '+' prefix allowed.
Declaration
public string PhoneNumber { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | If the value to be set is |
System.ArgumentException | If the length of the value to be set is greater than XBeeLibrary.Core.Packet.Cellular.TXSMSPacket.PHONE_NUMBER_LENGTH or if the value to be set is invalid. |
PhoneNumberByteArray
The phone number byte array.
Declaration
public byte[] PhoneNumberByteArray { get; }
Property Value
Type | Description |
---|---|
System.Byte[] |
Methods
CreatePacket(Byte[])
Creates a new RXSMSPacket object from the given payload.
Declaration
public static RXSMSPacket CreatePacket(byte[] payload)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | payload | The API frame payload. It must start with the frame type corresponding
to a RX SMS packet ( |
Returns
Type | Description |
---|---|
RXSMSPacket | Parsed RX SMS packet. |
Exceptions
Type | Condition |
---|---|
System.ArgumentException | If |
System.ArgumentNullException | If |