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
Inherited Members
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 |
System.ArgumentException | If |
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
Protocol
The IP protocol used in the transmission.
Declaration
public IPProtocol Protocol { get; }
Property Value
Type | Description |
---|---|
IPProtocol |
See Also
SourcePort
The source port of the transmission.
Declaration
public int SourcePort { get; }
Property Value
Type | Description |
---|---|
System.Int32 |