Datagram request message to send across data to a destination.
Constructor and description |
---|
DatagramReq
() |
DatagramReq
(AgentID recipient) Constructs datagram with parameter. |
Type Params | Return Type | Name and description |
---|---|---|
|
byte[] |
getData() Gets the data in bytes. |
|
Priority |
getPriority() Gets the priority of the datagram. |
|
int |
getProtocol() Gets the protocol number. |
|
Boolean |
getReliability() Gets the reliability. |
|
int |
getTo() Gets to/destination node address. |
|
float |
getTtl() Gets the time-to-live for the datagram. |
|
void |
setData(byte[] data) Sets data to be send across. |
|
void |
setPriority(Priority priority) Sets the priority of the datagram. |
|
void |
setProtocol(int protocol) Sets the protocol number. |
|
void |
setReliability(Boolean reliability) Sets the reliability. |
|
void |
setTo(int to) Sets the to/destination node address. |
|
void |
setTtl(float ttl) Sets the time-to-live for the datagram. |
|
String |
toString() |
Methods inherited from class | Name |
---|---|
class Message |
toString, setRecipient, setPerformative, getPerformative, getRecipient, setSender, getSender, setMessageID, getMessageID, setInReplyTo, getInReplyTo, wait, wait, wait, equals, hashCode, getClass, notify, notifyAll |
class Object |
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll |
Constructs datagram with parameter.
recipient
- agent IDGets the data in bytes.
Gets the priority of the datagram.
Gets the protocol number.
Gets the reliability.
Gets to/destination node address.
Gets the time-to-live for the datagram.
Sets data to be send across.
data
- in bytesSets the priority of the datagram. A priority are advisory, and an agent may choose to ignore it, if it does not support prioritization.
priority
- priority assigned to the request.Sets the protocol number.
protocol
- numberSets the reliability.
reliability
- true if reliable, false if unreliable, null if unspecifiedSets the to/destination node address.
to
- addressSets the time-to-live for the datagram. Time-to-live is advisory, and an agent may choose it ignore it.
ttl
- time-to-live (seconds) or NaN if no limit defined.Copyright 2013-19, Acoustic Research Laboratory, National University of Singapore, and Subnero Pte Ltd