Google Cloud IoT Core is being retired on August 16, 2023. Contact your Google Cloud account team for more information.

TelemetryEvent (iotcore 1.0.0 API)

Stay organized with collections Save and categorize content based on your preferences.

Class TelemetryEvent

  • public class TelemetryEvent
    extends Object
    Represents a telemetry event to publish to Cloud IoT Core.
    • Field Detail


        public static final int QOS_AT_MOST_ONCE
        At most once delivery.
        See Also:
        Constant Field Values

        public static final int QOS_AT_LEAST_ONCE
        At least once delivery.
        See Also:
        Constant Field Values
    • Constructor Detail

      • TelemetryEvent

        public TelemetryEvent(@NonNull
                              byte[] data,
                              String topicSubpath,
                              int qos)
        Constructs a new TelemetryEvent with the data to publish and an optional topic subpath destination.
        data - the telemetry event data to send to Cloud IoT Core
        topicSubpath - the subpath under "../device/../events/"
        qos - the quality of service to use when sending the message
    • Method Detail

      • getData

        public byte[] getData()
        Gets this event's data.
        this event's data
      • getTopicSubpath

        public String getTopicSubpath()
        Gets this event's topic subpath.

        Non-empty strings returned by this method always begin with a slash (e.g. /foo).

        this event's topic subpath
      • getQos

        public int getQos()
        Gets this event's quality of service settings.
        this event's QOS settings