diff --git a/.github/workflows/build-java-lib.yaml b/.github/workflows/create-java-release.yaml similarity index 89% rename from .github/workflows/build-java-lib.yaml rename to .github/workflows/create-java-release.yaml index 06bc25a..e99aa15 100644 --- a/.github/workflows/build-java-lib.yaml +++ b/.github/workflows/create-java-release.yaml @@ -1,9 +1,7 @@ -name: Java CI +name: Create Java Release on: - push: - branches: - - main + workflow_dispatch: permissions: packages: write diff --git a/java/visionapi/src/main/java/de/starwit/visionapi/Common.java b/java/visionapi/src/main/java/de/starwit/visionapi/Common.java index 6c6a91c..a5a34d5 100644 --- a/java/visionapi/src/main/java/de/starwit/visionapi/Common.java +++ b/java/visionapi/src/main/java/de/starwit/visionapi/Common.java @@ -55,6 +55,10 @@ public enum MessageType * INCIDENT = 5; */ INCIDENT(5), + /** + * SAE_EVENT = 6; + */ + SAE_EVENT(6), UNRECOGNIZED(-1), ; @@ -91,6 +95,10 @@ public enum MessageType * INCIDENT = 5; */ public static final int INCIDENT_VALUE = 5; + /** + * SAE_EVENT = 6; + */ + public static final int SAE_EVENT_VALUE = 6; public final int getNumber() { @@ -123,6 +131,7 @@ public static MessageType forNumber(int value) { case 3: return POSITION; case 4: return ANOMALY; case 5: return INCIDENT; + case 6: return SAE_EVENT; default: return null; } } @@ -2365,10 +2374,10 @@ public de.starwit.visionapi.Common.TypeMessage getDefaultInstanceForType() { "ngitude\030\002 \001(\001\"8\n\016MovementVector\022\021\n\tspeed" + "_kmh\030\001 \001(\001\022\023\n\013heading_deg\030\002 \001(\001\"4\n\013TypeM" + "essage\022%\n\004type\030\350\007 \001(\0162\026.visionapi.Messag" + - "eType*e\n\013MessageType\022\017\n\013UNSPECIFIED\020\000\022\007\n" + + "eType*t\n\013MessageType\022\017\n\013UNSPECIFIED\020\000\022\007\n" + "\003SAE\020\001\022\023\n\017DETECTION_COUNT\020\002\022\014\n\010POSITION\020" + - "\003\022\013\n\007ANOMALY\020\004\022\014\n\010INCIDENT\020\005B\026\n\024de.starw" + - "it.visionapib\006proto3" + "\003\022\013\n\007ANOMALY\020\004\022\014\n\010INCIDENT\020\005\022\r\n\tSAE_EVEN" + + "T\020\006B\026\n\024de.starwit.visionapib\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, diff --git a/java/visionapi/src/main/java/de/starwit/visionapi/Sae.java b/java/visionapi/src/main/java/de/starwit/visionapi/Sae.java index 4a14f28..912062c 100644 --- a/java/visionapi/src/main/java/de/starwit/visionapi/Sae.java +++ b/java/visionapi/src/main/java/de/starwit/visionapi/Sae.java @@ -7587,6 +7587,921 @@ public de.starwit.visionapi.Sae.PositionMessage getDefaultInstanceForType() { } + public interface EventMessageOrBuilder extends + // @@protoc_insertion_point(interface_extends:visionapi.EventMessage) + com.google.protobuf.MessageOrBuilder { + + /** + * string instance_id = 1; + * @return The instanceId. + */ + java.lang.String getInstanceId(); + /** + * string instance_id = 1; + * @return The bytes for instanceId. + */ + com.google.protobuf.ByteString + getInstanceIdBytes(); + + /** + * uint64 timestamp_utc_ms = 2; + * @return The timestampUtcMs. + */ + long getTimestampUtcMs(); + + /** + * .visionapi.EventMessage.EventType event_type = 3; + * @return The enum numeric value on the wire for eventType. + */ + int getEventTypeValue(); + /** + * .visionapi.EventMessage.EventType event_type = 3; + * @return The eventType. + */ + de.starwit.visionapi.Sae.EventMessage.EventType getEventType(); + + /** + * .visionapi.MessageType type = 1000; + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + * .visionapi.MessageType type = 1000; + * @return The type. + */ + de.starwit.visionapi.Common.MessageType getType(); + } + /** + * Protobuf type {@code visionapi.EventMessage} + */ + public static final class EventMessage extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:visionapi.EventMessage) + EventMessageOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 31, + /* patch= */ 1, + /* suffix= */ "", + EventMessage.class.getName()); + } + // Use EventMessage.newBuilder() to construct. + private EventMessage(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private EventMessage() { + instanceId_ = ""; + eventType_ = 0; + type_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return de.starwit.visionapi.Sae.internal_static_visionapi_EventMessage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return de.starwit.visionapi.Sae.internal_static_visionapi_EventMessage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + de.starwit.visionapi.Sae.EventMessage.class, de.starwit.visionapi.Sae.EventMessage.Builder.class); + } + + /** + * Protobuf enum {@code visionapi.EventMessage.EventType} + */ + public enum EventType + implements com.google.protobuf.ProtocolMessageEnum { + /** + * UNSPECIFIED = 0; + */ + UNSPECIFIED(0), + /** + * STARTUP = 1; + */ + STARTUP(1), + /** + * SHUTDOWN = 2; + */ + SHUTDOWN(2), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 31, + /* patch= */ 1, + /* suffix= */ "", + EventType.class.getName()); + } + /** + * UNSPECIFIED = 0; + */ + public static final int UNSPECIFIED_VALUE = 0; + /** + * STARTUP = 1; + */ + public static final int STARTUP_VALUE = 1; + /** + * SHUTDOWN = 2; + */ + public static final int SHUTDOWN_VALUE = 2; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static EventType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static EventType forNumber(int value) { + switch (value) { + case 0: return UNSPECIFIED; + case 1: return STARTUP; + case 2: return SHUTDOWN; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + EventType> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public EventType findValueByNumber(int number) { + return EventType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return de.starwit.visionapi.Sae.EventMessage.getDescriptor().getEnumTypes().get(0); + } + + private static final EventType[] VALUES = values(); + + public static EventType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private EventType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:visionapi.EventMessage.EventType) + } + + public static final int INSTANCE_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object instanceId_ = ""; + /** + * string instance_id = 1; + * @return The instanceId. + */ + @java.lang.Override + public java.lang.String getInstanceId() { + java.lang.Object ref = instanceId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instanceId_ = s; + return s; + } + } + /** + * string instance_id = 1; + * @return The bytes for instanceId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getInstanceIdBytes() { + java.lang.Object ref = instanceId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + instanceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TIMESTAMP_UTC_MS_FIELD_NUMBER = 2; + private long timestampUtcMs_ = 0L; + /** + * uint64 timestamp_utc_ms = 2; + * @return The timestampUtcMs. + */ + @java.lang.Override + public long getTimestampUtcMs() { + return timestampUtcMs_; + } + + public static final int EVENT_TYPE_FIELD_NUMBER = 3; + private int eventType_ = 0; + /** + * .visionapi.EventMessage.EventType event_type = 3; + * @return The enum numeric value on the wire for eventType. + */ + @java.lang.Override public int getEventTypeValue() { + return eventType_; + } + /** + * .visionapi.EventMessage.EventType event_type = 3; + * @return The eventType. + */ + @java.lang.Override public de.starwit.visionapi.Sae.EventMessage.EventType getEventType() { + de.starwit.visionapi.Sae.EventMessage.EventType result = de.starwit.visionapi.Sae.EventMessage.EventType.forNumber(eventType_); + return result == null ? de.starwit.visionapi.Sae.EventMessage.EventType.UNRECOGNIZED : result; + } + + public static final int TYPE_FIELD_NUMBER = 1000; + private int type_ = 0; + /** + * .visionapi.MessageType type = 1000; + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override public int getTypeValue() { + return type_; + } + /** + * .visionapi.MessageType type = 1000; + * @return The type. + */ + @java.lang.Override public de.starwit.visionapi.Common.MessageType getType() { + de.starwit.visionapi.Common.MessageType result = de.starwit.visionapi.Common.MessageType.forNumber(type_); + return result == null ? de.starwit.visionapi.Common.MessageType.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(instanceId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, instanceId_); + } + if (timestampUtcMs_ != 0L) { + output.writeUInt64(2, timestampUtcMs_); + } + if (eventType_ != de.starwit.visionapi.Sae.EventMessage.EventType.UNSPECIFIED.getNumber()) { + output.writeEnum(3, eventType_); + } + if (type_ != de.starwit.visionapi.Common.MessageType.UNSPECIFIED.getNumber()) { + output.writeEnum(1000, type_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(instanceId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, instanceId_); + } + if (timestampUtcMs_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(2, timestampUtcMs_); + } + if (eventType_ != de.starwit.visionapi.Sae.EventMessage.EventType.UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(3, eventType_); + } + if (type_ != de.starwit.visionapi.Common.MessageType.UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1000, type_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof de.starwit.visionapi.Sae.EventMessage)) { + return super.equals(obj); + } + de.starwit.visionapi.Sae.EventMessage other = (de.starwit.visionapi.Sae.EventMessage) obj; + + if (!getInstanceId() + .equals(other.getInstanceId())) return false; + if (getTimestampUtcMs() + != other.getTimestampUtcMs()) return false; + if (eventType_ != other.eventType_) return false; + if (type_ != other.type_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + INSTANCE_ID_FIELD_NUMBER; + hash = (53 * hash) + getInstanceId().hashCode(); + hash = (37 * hash) + TIMESTAMP_UTC_MS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTimestampUtcMs()); + hash = (37 * hash) + EVENT_TYPE_FIELD_NUMBER; + hash = (53 * hash) + eventType_; + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static de.starwit.visionapi.Sae.EventMessage parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static de.starwit.visionapi.Sae.EventMessage parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static de.starwit.visionapi.Sae.EventMessage parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static de.starwit.visionapi.Sae.EventMessage parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static de.starwit.visionapi.Sae.EventMessage parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static de.starwit.visionapi.Sae.EventMessage parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static de.starwit.visionapi.Sae.EventMessage parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static de.starwit.visionapi.Sae.EventMessage parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static de.starwit.visionapi.Sae.EventMessage parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static de.starwit.visionapi.Sae.EventMessage parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static de.starwit.visionapi.Sae.EventMessage parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static de.starwit.visionapi.Sae.EventMessage parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(de.starwit.visionapi.Sae.EventMessage prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code visionapi.EventMessage} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:visionapi.EventMessage) + de.starwit.visionapi.Sae.EventMessageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return de.starwit.visionapi.Sae.internal_static_visionapi_EventMessage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return de.starwit.visionapi.Sae.internal_static_visionapi_EventMessage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + de.starwit.visionapi.Sae.EventMessage.class, de.starwit.visionapi.Sae.EventMessage.Builder.class); + } + + // Construct using de.starwit.visionapi.Sae.EventMessage.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + instanceId_ = ""; + timestampUtcMs_ = 0L; + eventType_ = 0; + type_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return de.starwit.visionapi.Sae.internal_static_visionapi_EventMessage_descriptor; + } + + @java.lang.Override + public de.starwit.visionapi.Sae.EventMessage getDefaultInstanceForType() { + return de.starwit.visionapi.Sae.EventMessage.getDefaultInstance(); + } + + @java.lang.Override + public de.starwit.visionapi.Sae.EventMessage build() { + de.starwit.visionapi.Sae.EventMessage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public de.starwit.visionapi.Sae.EventMessage buildPartial() { + de.starwit.visionapi.Sae.EventMessage result = new de.starwit.visionapi.Sae.EventMessage(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(de.starwit.visionapi.Sae.EventMessage result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.instanceId_ = instanceId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.timestampUtcMs_ = timestampUtcMs_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.eventType_ = eventType_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.type_ = type_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof de.starwit.visionapi.Sae.EventMessage) { + return mergeFrom((de.starwit.visionapi.Sae.EventMessage)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(de.starwit.visionapi.Sae.EventMessage other) { + if (other == de.starwit.visionapi.Sae.EventMessage.getDefaultInstance()) return this; + if (!other.getInstanceId().isEmpty()) { + instanceId_ = other.instanceId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getTimestampUtcMs() != 0L) { + setTimestampUtcMs(other.getTimestampUtcMs()); + } + if (other.eventType_ != 0) { + setEventTypeValue(other.getEventTypeValue()); + } + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + instanceId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + timestampUtcMs_ = input.readUInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: { + eventType_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 8000: { + type_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 8000 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object instanceId_ = ""; + /** + * string instance_id = 1; + * @return The instanceId. + */ + public java.lang.String getInstanceId() { + java.lang.Object ref = instanceId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instanceId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string instance_id = 1; + * @return The bytes for instanceId. + */ + public com.google.protobuf.ByteString + getInstanceIdBytes() { + java.lang.Object ref = instanceId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + instanceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string instance_id = 1; + * @param value The instanceId to set. + * @return This builder for chaining. + */ + public Builder setInstanceId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + instanceId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string instance_id = 1; + * @return This builder for chaining. + */ + public Builder clearInstanceId() { + instanceId_ = getDefaultInstance().getInstanceId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string instance_id = 1; + * @param value The bytes for instanceId to set. + * @return This builder for chaining. + */ + public Builder setInstanceIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + instanceId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private long timestampUtcMs_ ; + /** + * uint64 timestamp_utc_ms = 2; + * @return The timestampUtcMs. + */ + @java.lang.Override + public long getTimestampUtcMs() { + return timestampUtcMs_; + } + /** + * uint64 timestamp_utc_ms = 2; + * @param value The timestampUtcMs to set. + * @return This builder for chaining. + */ + public Builder setTimestampUtcMs(long value) { + + timestampUtcMs_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * uint64 timestamp_utc_ms = 2; + * @return This builder for chaining. + */ + public Builder clearTimestampUtcMs() { + bitField0_ = (bitField0_ & ~0x00000002); + timestampUtcMs_ = 0L; + onChanged(); + return this; + } + + private int eventType_ = 0; + /** + * .visionapi.EventMessage.EventType event_type = 3; + * @return The enum numeric value on the wire for eventType. + */ + @java.lang.Override public int getEventTypeValue() { + return eventType_; + } + /** + * .visionapi.EventMessage.EventType event_type = 3; + * @param value The enum numeric value on the wire for eventType to set. + * @return This builder for chaining. + */ + public Builder setEventTypeValue(int value) { + eventType_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * .visionapi.EventMessage.EventType event_type = 3; + * @return The eventType. + */ + @java.lang.Override + public de.starwit.visionapi.Sae.EventMessage.EventType getEventType() { + de.starwit.visionapi.Sae.EventMessage.EventType result = de.starwit.visionapi.Sae.EventMessage.EventType.forNumber(eventType_); + return result == null ? de.starwit.visionapi.Sae.EventMessage.EventType.UNRECOGNIZED : result; + } + /** + * .visionapi.EventMessage.EventType event_type = 3; + * @param value The eventType to set. + * @return This builder for chaining. + */ + public Builder setEventType(de.starwit.visionapi.Sae.EventMessage.EventType value) { + if (value == null) { throw new NullPointerException(); } + bitField0_ |= 0x00000004; + eventType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .visionapi.EventMessage.EventType event_type = 3; + * @return This builder for chaining. + */ + public Builder clearEventType() { + bitField0_ = (bitField0_ & ~0x00000004); + eventType_ = 0; + onChanged(); + return this; + } + + private int type_ = 0; + /** + * .visionapi.MessageType type = 1000; + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override public int getTypeValue() { + return type_; + } + /** + * .visionapi.MessageType type = 1000; + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + type_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * .visionapi.MessageType type = 1000; + * @return The type. + */ + @java.lang.Override + public de.starwit.visionapi.Common.MessageType getType() { + de.starwit.visionapi.Common.MessageType result = de.starwit.visionapi.Common.MessageType.forNumber(type_); + return result == null ? de.starwit.visionapi.Common.MessageType.UNRECOGNIZED : result; + } + /** + * .visionapi.MessageType type = 1000; + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(de.starwit.visionapi.Common.MessageType value) { + if (value == null) { throw new NullPointerException(); } + bitField0_ |= 0x00000008; + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .visionapi.MessageType type = 1000; + * @return This builder for chaining. + */ + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000008); + type_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:visionapi.EventMessage) + } + + // @@protoc_insertion_point(class_scope:visionapi.EventMessage) + private static final de.starwit.visionapi.Sae.EventMessage DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new de.starwit.visionapi.Sae.EventMessage(); + } + + public static de.starwit.visionapi.Sae.EventMessage getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public EventMessage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public de.starwit.visionapi.Sae.EventMessage getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_visionapi_SaeMessage_descriptor; private static final @@ -7632,6 +8547,11 @@ public de.starwit.visionapi.Sae.PositionMessage getDefaultInstanceForType() { private static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_visionapi_PositionMessage_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_visionapi_EventMessage_descriptor; + private static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_visionapi_EventMessage_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { @@ -7674,7 +8594,13 @@ public de.starwit.visionapi.Sae.PositionMessage getDefaultInstanceForType() { "2\031.visionapi.MovementVector\0224\n\022raw_geo_c" + "oordinate\030\007 \001(\0132\030.visionapi.GeoCoordinat" + "e\022%\n\004type\030\350\007 \001(\0162\026.visionapi.MessageType" + - "B\026\n\024de.starwit.visionapib\006proto3" + "\"\324\001\n\014EventMessage\022\023\n\013instance_id\030\001 \001(\t\022\030" + + "\n\020timestamp_utc_ms\030\002 \001(\004\0225\n\nevent_type\030\003" + + " \001(\0162!.visionapi.EventMessage.EventType\022" + + "%\n\004type\030\350\007 \001(\0162\026.visionapi.MessageType\"7" + + "\n\tEventType\022\017\n\013UNSPECIFIED\020\000\022\013\n\007STARTUP\020" + + "\001\022\014\n\010SHUTDOWN\020\002B\026\n\024de.starwit.visionapib" + + "\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, @@ -7735,6 +8661,12 @@ public de.starwit.visionapi.Sae.PositionMessage getDefaultInstanceForType() { com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_visionapi_PositionMessage_descriptor, new java.lang.String[] { "TimestampUtcMs", "GeoCoordinate", "Hdop", "Fix", "SaeUuid", "MovementVector", "RawGeoCoordinate", "Type", }); + internal_static_visionapi_EventMessage_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_visionapi_EventMessage_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_visionapi_EventMessage_descriptor, + new java.lang.String[] { "InstanceId", "TimestampUtcMs", "EventType", "Type", }); descriptor.resolveAllFeaturesImmutable(); de.starwit.visionapi.Common.getDescriptor(); } diff --git a/python/visionapi/visionapi/common_pb2.py b/python/visionapi/visionapi/common_pb2.py index 8edadc2..64607fc 100644 --- a/python/visionapi/visionapi/common_pb2.py +++ b/python/visionapi/visionapi/common_pb2.py @@ -24,7 +24,7 @@ -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x16visionapi/common.proto\x12\tvisionapi\"*\n\tModelInfo\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\t\"4\n\rGeoCoordinate\x12\x10\n\x08latitude\x18\x01 \x01(\x01\x12\x11\n\tlongitude\x18\x02 \x01(\x01\"8\n\x0eMovementVector\x12\x11\n\tspeed_kmh\x18\x01 \x01(\x01\x12\x13\n\x0bheading_deg\x18\x02 \x01(\x01\"4\n\x0bTypeMessage\x12%\n\x04type\x18\xe8\x07 \x01(\x0e\x32\x16.visionapi.MessageType*e\n\x0bMessageType\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x07\n\x03SAE\x10\x01\x12\x13\n\x0f\x44\x45TECTION_COUNT\x10\x02\x12\x0c\n\x08POSITION\x10\x03\x12\x0b\n\x07\x41NOMALY\x10\x04\x12\x0c\n\x08INCIDENT\x10\x05\x42\x16\n\x14\x64\x65.starwit.visionapib\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x16visionapi/common.proto\x12\tvisionapi\"*\n\tModelInfo\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\t\"4\n\rGeoCoordinate\x12\x10\n\x08latitude\x18\x01 \x01(\x01\x12\x11\n\tlongitude\x18\x02 \x01(\x01\"8\n\x0eMovementVector\x12\x11\n\tspeed_kmh\x18\x01 \x01(\x01\x12\x13\n\x0bheading_deg\x18\x02 \x01(\x01\"4\n\x0bTypeMessage\x12%\n\x04type\x18\xe8\x07 \x01(\x0e\x32\x16.visionapi.MessageType*t\n\x0bMessageType\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x07\n\x03SAE\x10\x01\x12\x13\n\x0f\x44\x45TECTION_COUNT\x10\x02\x12\x0c\n\x08POSITION\x10\x03\x12\x0b\n\x07\x41NOMALY\x10\x04\x12\x0c\n\x08INCIDENT\x10\x05\x12\r\n\tSAE_EVENT\x10\x06\x42\x16\n\x14\x64\x65.starwit.visionapib\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -33,7 +33,7 @@ _globals['DESCRIPTOR']._loaded_options = None _globals['DESCRIPTOR']._serialized_options = b'\n\024de.starwit.visionapi' _globals['_MESSAGETYPE']._serialized_start=247 - _globals['_MESSAGETYPE']._serialized_end=348 + _globals['_MESSAGETYPE']._serialized_end=363 _globals['_MODELINFO']._serialized_start=37 _globals['_MODELINFO']._serialized_end=79 _globals['_GEOCOORDINATE']._serialized_start=81 diff --git a/python/visionapi/visionapi/common_pb2.pyi b/python/visionapi/visionapi/common_pb2.pyi index d874907..399280d 100644 --- a/python/visionapi/visionapi/common_pb2.pyi +++ b/python/visionapi/visionapi/common_pb2.pyi @@ -13,12 +13,14 @@ class MessageType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): POSITION: _ClassVar[MessageType] ANOMALY: _ClassVar[MessageType] INCIDENT: _ClassVar[MessageType] + SAE_EVENT: _ClassVar[MessageType] UNSPECIFIED: MessageType SAE: MessageType DETECTION_COUNT: MessageType POSITION: MessageType ANOMALY: MessageType INCIDENT: MessageType +SAE_EVENT: MessageType class ModelInfo(_message.Message): __slots__ = ("name", "version") diff --git a/python/visionapi/visionapi/sae_pb2.py b/python/visionapi/visionapi/sae_pb2.py index ac82992..ce0dd5f 100644 --- a/python/visionapi/visionapi/sae_pb2.py +++ b/python/visionapi/visionapi/sae_pb2.py @@ -25,7 +25,7 @@ from visionapi import common_pb2 as visionapi_dot_common__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x13visionapi/sae.proto\x12\tvisionapi\x1a\x16visionapi/common.proto\"\xda\x01\n\nSaeMessage\x12$\n\x05\x66rame\x18\x01 \x01(\x0b\x32\x15.visionapi.VideoFrame\x12(\n\ndetections\x18\x02 \x03(\x0b\x32\x14.visionapi.Detection\x12#\n\x07metrics\x18\x63 \x01(\x0b\x32\x12.visionapi.Metrics\x12\x30\n\x0emodel_metadata\x18\x64 \x01(\x0b\x32\x18.visionapi.ModelMetadata\x12%\n\x04type\x18\xe8\x07 \x01(\x0e\x32\x16.visionapi.MessageType\"\xee\x01\n\nVideoFrame\x12\x11\n\tsource_id\x18\x01 \x01(\t\x12\x18\n\x10timestamp_utc_ms\x18\x02 \x01(\x04\x12\x1f\n\x05shape\x18\x03 \x01(\x0b\x32\x10.visionapi.Shape\x12\x12\n\nframe_data\x18\x04 \x01(\x0c\x12\x17\n\x0f\x66rame_data_jpeg\x18\x05 \x01(\x0c\x12\x31\n\x0f\x63\x61mera_location\x18\x06 \x01(\x0b\x32\x18.visionapi.GeoCoordinate\x12\x32\n\x0fmovement_vector\x18\x07 \x01(\x0b\x32\x19.visionapi.MovementVector\"8\n\x05Shape\x12\x0e\n\x06height\x18\x01 \x01(\r\x12\r\n\x05width\x18\x02 \x01(\r\x12\x10\n\x08\x63hannels\x18\x03 \x01(\r\"\xa4\x01\n\tDetection\x12,\n\x0c\x62ounding_box\x18\x01 \x01(\x0b\x32\x16.visionapi.BoundingBox\x12\x12\n\nconfidence\x18\x02 \x01(\x02\x12\x10\n\x08\x63lass_id\x18\x03 \x01(\r\x12\x11\n\tobject_id\x18\x04 \x01(\x0c\x12\x30\n\x0egeo_coordinate\x18\x05 \x01(\x0b\x32\x18.visionapi.GeoCoordinate\"I\n\x0b\x42oundingBox\x12\r\n\x05min_x\x18\x01 \x01(\x02\x12\r\n\x05min_y\x18\x02 \x01(\x02\x12\r\n\x05max_x\x18\x03 \x01(\x02\x12\r\n\x05max_y\x18\x04 \x01(\x02\"R\n\x07Metrics\x12#\n\x1b\x64\x65tection_inference_time_us\x18\x01 \x01(\r\x12\"\n\x1atracking_inference_time_us\x18\x02 \x01(\r\"\x81\x01\n\rModelMetadata\x12=\n\x0b\x63lass_names\x18\x01 \x03(\x0b\x32(.visionapi.ModelMetadata.ClassNamesEntry\x1a\x31\n\x0f\x43lassNamesEntry\x12\x0b\n\x03key\x18\x01 \x01(\r\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x9b\x02\n\x0fPositionMessage\x12\x18\n\x10timestamp_utc_ms\x18\x01 \x01(\x04\x12\x30\n\x0egeo_coordinate\x18\x02 \x01(\x0b\x32\x18.visionapi.GeoCoordinate\x12\x0c\n\x04hdop\x18\x03 \x01(\x02\x12\x0b\n\x03\x66ix\x18\x04 \x01(\x08\x12\x10\n\x08sae_uuid\x18\x05 \x01(\x0c\x12\x32\n\x0fmovement_vector\x18\x06 \x01(\x0b\x32\x19.visionapi.MovementVector\x12\x34\n\x12raw_geo_coordinate\x18\x07 \x01(\x0b\x32\x18.visionapi.GeoCoordinate\x12%\n\x04type\x18\xe8\x07 \x01(\x0e\x32\x16.visionapi.MessageTypeB\x16\n\x14\x64\x65.starwit.visionapib\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x13visionapi/sae.proto\x12\tvisionapi\x1a\x16visionapi/common.proto\"\xda\x01\n\nSaeMessage\x12$\n\x05\x66rame\x18\x01 \x01(\x0b\x32\x15.visionapi.VideoFrame\x12(\n\ndetections\x18\x02 \x03(\x0b\x32\x14.visionapi.Detection\x12#\n\x07metrics\x18\x63 \x01(\x0b\x32\x12.visionapi.Metrics\x12\x30\n\x0emodel_metadata\x18\x64 \x01(\x0b\x32\x18.visionapi.ModelMetadata\x12%\n\x04type\x18\xe8\x07 \x01(\x0e\x32\x16.visionapi.MessageType\"\xee\x01\n\nVideoFrame\x12\x11\n\tsource_id\x18\x01 \x01(\t\x12\x18\n\x10timestamp_utc_ms\x18\x02 \x01(\x04\x12\x1f\n\x05shape\x18\x03 \x01(\x0b\x32\x10.visionapi.Shape\x12\x12\n\nframe_data\x18\x04 \x01(\x0c\x12\x17\n\x0f\x66rame_data_jpeg\x18\x05 \x01(\x0c\x12\x31\n\x0f\x63\x61mera_location\x18\x06 \x01(\x0b\x32\x18.visionapi.GeoCoordinate\x12\x32\n\x0fmovement_vector\x18\x07 \x01(\x0b\x32\x19.visionapi.MovementVector\"8\n\x05Shape\x12\x0e\n\x06height\x18\x01 \x01(\r\x12\r\n\x05width\x18\x02 \x01(\r\x12\x10\n\x08\x63hannels\x18\x03 \x01(\r\"\xa4\x01\n\tDetection\x12,\n\x0c\x62ounding_box\x18\x01 \x01(\x0b\x32\x16.visionapi.BoundingBox\x12\x12\n\nconfidence\x18\x02 \x01(\x02\x12\x10\n\x08\x63lass_id\x18\x03 \x01(\r\x12\x11\n\tobject_id\x18\x04 \x01(\x0c\x12\x30\n\x0egeo_coordinate\x18\x05 \x01(\x0b\x32\x18.visionapi.GeoCoordinate\"I\n\x0b\x42oundingBox\x12\r\n\x05min_x\x18\x01 \x01(\x02\x12\r\n\x05min_y\x18\x02 \x01(\x02\x12\r\n\x05max_x\x18\x03 \x01(\x02\x12\r\n\x05max_y\x18\x04 \x01(\x02\"R\n\x07Metrics\x12#\n\x1b\x64\x65tection_inference_time_us\x18\x01 \x01(\r\x12\"\n\x1atracking_inference_time_us\x18\x02 \x01(\r\"\x81\x01\n\rModelMetadata\x12=\n\x0b\x63lass_names\x18\x01 \x03(\x0b\x32(.visionapi.ModelMetadata.ClassNamesEntry\x1a\x31\n\x0f\x43lassNamesEntry\x12\x0b\n\x03key\x18\x01 \x01(\r\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x9b\x02\n\x0fPositionMessage\x12\x18\n\x10timestamp_utc_ms\x18\x01 \x01(\x04\x12\x30\n\x0egeo_coordinate\x18\x02 \x01(\x0b\x32\x18.visionapi.GeoCoordinate\x12\x0c\n\x04hdop\x18\x03 \x01(\x02\x12\x0b\n\x03\x66ix\x18\x04 \x01(\x08\x12\x10\n\x08sae_uuid\x18\x05 \x01(\x0c\x12\x32\n\x0fmovement_vector\x18\x06 \x01(\x0b\x32\x19.visionapi.MovementVector\x12\x34\n\x12raw_geo_coordinate\x18\x07 \x01(\x0b\x32\x18.visionapi.GeoCoordinate\x12%\n\x04type\x18\xe8\x07 \x01(\x0e\x32\x16.visionapi.MessageType\"\xd4\x01\n\x0c\x45ventMessage\x12\x13\n\x0binstance_id\x18\x01 \x01(\t\x12\x18\n\x10timestamp_utc_ms\x18\x02 \x01(\x04\x12\x35\n\nevent_type\x18\x03 \x01(\x0e\x32!.visionapi.EventMessage.EventType\x12%\n\x04type\x18\xe8\x07 \x01(\x0e\x32\x16.visionapi.MessageType\"7\n\tEventType\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07STARTUP\x10\x01\x12\x0c\n\x08SHUTDOWN\x10\x02\x42\x16\n\x14\x64\x65.starwit.visionapib\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -53,4 +53,8 @@ _globals['_MODELMETADATA_CLASSNAMESENTRY']._serialized_end=1034 _globals['_POSITIONMESSAGE']._serialized_start=1037 _globals['_POSITIONMESSAGE']._serialized_end=1320 + _globals['_EVENTMESSAGE']._serialized_start=1323 + _globals['_EVENTMESSAGE']._serialized_end=1535 + _globals['_EVENTMESSAGE_EVENTTYPE']._serialized_start=1480 + _globals['_EVENTMESSAGE_EVENTTYPE']._serialized_end=1535 # @@protoc_insertion_point(module_scope) diff --git a/python/visionapi/visionapi/sae_pb2.pyi b/python/visionapi/visionapi/sae_pb2.pyi index 24f4191..a298ff3 100644 --- a/python/visionapi/visionapi/sae_pb2.pyi +++ b/python/visionapi/visionapi/sae_pb2.pyi @@ -1,5 +1,6 @@ from visionapi import common_pb2 as _common_pb2 from google.protobuf.internal import containers as _containers +from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from collections.abc import Iterable as _Iterable, Mapping as _Mapping @@ -115,3 +116,23 @@ class PositionMessage(_message.Message): raw_geo_coordinate: _common_pb2.GeoCoordinate type: _common_pb2.MessageType def __init__(self, timestamp_utc_ms: _Optional[int] = ..., geo_coordinate: _Optional[_Union[_common_pb2.GeoCoordinate, _Mapping]] = ..., hdop: _Optional[float] = ..., fix: bool = ..., sae_uuid: _Optional[bytes] = ..., movement_vector: _Optional[_Union[_common_pb2.MovementVector, _Mapping]] = ..., raw_geo_coordinate: _Optional[_Union[_common_pb2.GeoCoordinate, _Mapping]] = ..., type: _Optional[_Union[_common_pb2.MessageType, str]] = ...) -> None: ... + +class EventMessage(_message.Message): + __slots__ = ("instance_id", "timestamp_utc_ms", "event_type", "type") + class EventType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = () + UNSPECIFIED: _ClassVar[EventMessage.EventType] + STARTUP: _ClassVar[EventMessage.EventType] + SHUTDOWN: _ClassVar[EventMessage.EventType] + UNSPECIFIED: EventMessage.EventType + STARTUP: EventMessage.EventType + SHUTDOWN: EventMessage.EventType + INSTANCE_ID_FIELD_NUMBER: _ClassVar[int] + TIMESTAMP_UTC_MS_FIELD_NUMBER: _ClassVar[int] + EVENT_TYPE_FIELD_NUMBER: _ClassVar[int] + TYPE_FIELD_NUMBER: _ClassVar[int] + instance_id: str + timestamp_utc_ms: int + event_type: EventMessage.EventType + type: _common_pb2.MessageType + def __init__(self, instance_id: _Optional[str] = ..., timestamp_utc_ms: _Optional[int] = ..., event_type: _Optional[_Union[EventMessage.EventType, str]] = ..., type: _Optional[_Union[_common_pb2.MessageType, str]] = ...) -> None: ... diff --git a/visionapi/common.proto b/visionapi/common.proto index 4d21ea7..77c4938 100644 --- a/visionapi/common.proto +++ b/visionapi/common.proto @@ -31,4 +31,5 @@ enum MessageType { POSITION = 3; ANOMALY = 4; INCIDENT = 5; + SAE_EVENT = 6; } \ No newline at end of file diff --git a/visionapi/sae.proto b/visionapi/sae.proto index 5741c6b..4243dd5 100644 --- a/visionapi/sae.proto +++ b/visionapi/sae.proto @@ -63,4 +63,17 @@ message PositionMessage { MovementVector movement_vector = 6; GeoCoordinate raw_geo_coordinate = 7; MessageType type = 1000; -} \ No newline at end of file +} + +message EventMessage { + enum EventType { + UNSPECIFIED = 0; + STARTUP = 1; + SHUTDOWN = 2; + } + + string instance_id = 1; + uint64 timestamp_utc_ms = 2; + EventType event_type = 3; + MessageType type = 1000; +}