Table of Contents

Class MessageBase

Namespace
Iot.Device.Swarm
Assembly
Iot.Device.Swarm.dll

Base class for the received and transmitted messages.

public class MessageBase
Inheritance
MessageBase
Derived

Constructors

MessageBase(byte[], uint)

Initializes a new instance of the MessageBase class. Creates a Message to be sent to the Swarm network.

public MessageBase(byte[] data, uint applicationId = 0)

Parameters

data byte[]

Data to be sent.

applicationId uint

The application ID tag for the message.

MessageBase(string, uint)

Initializes a new instance of the MessageBase class. Creates a Message to be sent to the Swarm network.

public MessageBase(string data, uint applicationId = 0)

Parameters

data string

Data to be sent.

applicationId uint

The application ID tag for the message.

Properties

ApplicationID

Gets or sets application ID tag for message.

public uint ApplicationID { get; set; }

Property Value

uint

Remarks

This is optional. If not specified the message will be sent with ID 0. Swarm reserves the use of application IDs 65000 to 65535.

Data

Gets or sets payload of data.

public string Data { get; set; }

Property Value

string

Remarks

The maximum message size is 192 bytes.