- Source:
Example
node.createSubscription(
'std_msgs/msg/String',
'topic',
(msg, messageInfo) => {
console.log('Source timestamp:', messageInfo.sourceTimestamp);
console.log('Received at:', messageInfo.receivedTimestamp);
console.log('Publisher GID:', messageInfo.publisherGid);
}
);
Members
member
publicationSequenceNumber :bigint
The publication sequence number assigned by the publisher.
Type:
- bigint
- Source:
member
publisherGid :Buffer
The globally unique identifier (GID) of the publisher.
A Buffer containing the raw GID bytes.
Type:
- Buffer
- Source:
member
receivedTimestamp :bigint
The timestamp when the message was received by the subscription (nanoseconds since epoch).
Type:
- bigint
- Source:
member
receptionSequenceNumber :bigint
The reception sequence number assigned by the subscriber.
Type:
- bigint
- Source:
member
sourceTimestamp :bigint
The timestamp when the message was published (nanoseconds since epoch).
Type:
- bigint
- Source:
Methods
function
toPlainObject() → {object}
Convert to a plain object representation.
- Source:
Returns:
Plain object with all metadata fields
Type
object