XBee C# library API reference

Show / Hide Table of Contents

Class IPMessage

This class represents an IP message containing the IP address the message belongs to, the source and destination ports, the IP protocol, and the content (data) of the message.

Inheritance
System.Object
IPMessage
Inherited Members
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)
System.Object.ToString()
Namespace: XBeeLibrary.Core.Models
Assembly: XBeeLibrary.Core.dll
Syntax
public class IPMessage
Remarks

This class is used within the library to read data sent to IP devices.

Constructors

IPMessage(IPAddress, Int32, Int32, IPProtocol, Byte[])

Class constructor. Instantiates a new object of type IPMessage with the given parameters.

Declaration
public IPMessage(IPAddress ipAddress, int sourcePort, int destPort, IPProtocol protocol, byte[] data)
Parameters
Type Name Description
System.Net.IPAddress ipAddress

The IP address the message comes from.

System.Int32 sourcePort

TCP or UDP source port of the transmission.

System.Int32 destPort

TCP or UDP destination port of the transmission.

IPProtocol protocol

IP protocol used in the transmission.

System.Byte[] data

Byte array containing the data of the message.

Exceptions
Type Condition
System.ArgumentNullException

If ipAddress is null or if data is null.

System.ArgumentException

If sourcePort is null or invalid, or if destPort is null or invalid, or if protocol is UNKNOWN.

Properties

Data

The byte array containing the data of the message.

Declaration
public byte[] Data { get; }
Property Value
Type Description
System.Byte[]

DataString

The data of the message in string format.

Declaration
public string DataString { get; }
Property Value
Type Description
System.String

DestPort

The destination port of the transmission.

Declaration
public int DestPort { get; }
Property Value
Type Description
System.Int32

IPAddress

The IP address this message is associated to.

Declaration
public IPAddress IPAddress { get; }
Property Value
Type Description
System.Net.IPAddress
See Also
System.Net.IPAddress

Protocol

The IP protocol used in the transmission.

Declaration
public IPProtocol Protocol { get; }
Property Value
Type Description
IPProtocol
See Also
IPProtocol

SourcePort

The source port of the transmission.

Declaration
public int SourcePort { get; }
Property Value
Type Description
System.Int32
Product page More documentation Official site About Digi Contact us Support
©2019 Digi International Inc. All rights reserved.
Digi International Inc.