diff --git a/attribute.go b/attribute.go index a73141e..7941a9a 100644 --- a/attribute.go +++ b/attribute.go @@ -593,3 +593,33 @@ func (ea *EnumAttribute) ToFloat() (*FloatAttribute, error) { func (ea *EnumAttribute) ToEnum() (*EnumAttribute, error) { return ea, nil } + +type referenceableEntity interface { + EntityID() EntityID +} + +type withRefs[R referenceableEntity] struct { + refs *set[EntityID, R] +} + +func newWithRefs[R referenceableEntity]() *withRefs[R] { + return &withRefs[R]{ + refs: newSet[EntityID, R](), + } +} + +func (t *withRefs[R]) addRef(ref R) { + t.refs.add(ref.EntityID(), ref) +} + +func (t *withRefs[R]) removeRef(refID EntityID) { + t.refs.remove(refID) +} + +func (t *withRefs[R]) ReferenceCount() int { + return t.refs.size() +} + +func (t *withRefs[R]) References() []R { + return t.refs.getValues() +} diff --git a/canid_builder.go b/canid_builder.go index d91bab8..efa1a7c 100644 --- a/canid_builder.go +++ b/canid_builder.go @@ -16,24 +16,24 @@ type CANID uint32 type CANIDBuilderOpKind int const ( - // CANIDBuilderOpMessagePriority represents an operation + // CANIDBuilderOpKindMessagePriority represents an operation // that involves the message priority. - CANIDBuilderOpMessagePriority CANIDBuilderOpKind = iota - // CANIDBuilderOpMessageID represents an operation + CANIDBuilderOpKindMessagePriority CANIDBuilderOpKind = iota + // CANIDBuilderOpKindMessageID represents an operation // that involves the message id. - CANIDBuilderOpMessageID - // CANIDBuilderOpNodeID represents an operation + CANIDBuilderOpKindMessageID + // CANIDBuilderOpKindNodeID represents an operation // that involves the node id. - CANIDBuilderOpNodeID + CANIDBuilderOpKindNodeID ) func (bok CANIDBuilderOpKind) String() string { switch bok { - case CANIDBuilderOpMessagePriority: + case CANIDBuilderOpKindMessagePriority: return "message-priority" - case CANIDBuilderOpMessageID: + case CANIDBuilderOpKindMessageID: return "message-id" - case CANIDBuilderOpNodeID: + case CANIDBuilderOpKindNodeID: return "node-id" default: return "unknown" @@ -73,7 +73,7 @@ func (bo *CANIDBuilderOp) Len() int { // the CAN-ID of the messages within a [Bus]. type CANIDBuilder struct { *entity - *withTemplateRefs[*Bus] + *withRefs[*Bus] operations []*CANIDBuilderOp } @@ -81,8 +81,8 @@ type CANIDBuilder struct { // NewCANIDBuilder creates a new [CANIDBuilder] with the given name. func NewCANIDBuilder(name string) *CANIDBuilder { return &CANIDBuilder{ - entity: newEntity(name), - withTemplateRefs: newWithTemplateRefs[*Bus](), + entity: newEntity(name), + withRefs: newWithRefs[*Bus](), operations: []*CANIDBuilderOp{}, } @@ -117,11 +117,11 @@ func (b *CANIDBuilder) Calculate(messagePriority MessagePriority, messageID Mess for _, op := range b.operations { tmpVal := uint32(0) switch op.kind { - case CANIDBuilderOpMessagePriority: + case CANIDBuilderOpKindMessagePriority: tmpVal = uint32(messagePriority) - case CANIDBuilderOpMessageID: + case CANIDBuilderOpKindMessageID: tmpVal = uint32(messageID) - case CANIDBuilderOpNodeID: + case CANIDBuilderOpKindNodeID: tmpVal = uint32(nodeID) } @@ -139,7 +139,7 @@ func (b *CANIDBuilder) Calculate(messagePriority MessagePriority, messageID Mess // The length of the operation is fixed (2 bits). func (b *CANIDBuilder) UseMessagePriority(from int) *CANIDBuilder { b.operations = append(b.operations, &CANIDBuilderOp{ - kind: CANIDBuilderOpMessagePriority, + kind: CANIDBuilderOpKindMessagePriority, from: from, len: 2, }) @@ -149,7 +149,7 @@ func (b *CANIDBuilder) UseMessagePriority(from int) *CANIDBuilder { // UseMessageID adds an operation that involves the message id from the given index and length. func (b *CANIDBuilder) UseMessageID(from, len int) *CANIDBuilder { b.operations = append(b.operations, &CANIDBuilderOp{ - kind: CANIDBuilderOpMessageID, + kind: CANIDBuilderOpKindMessageID, from: from, len: len, }) @@ -159,7 +159,7 @@ func (b *CANIDBuilder) UseMessageID(from, len int) *CANIDBuilder { // UseNodeID adds an operation that involves the node id from the given index and length. func (b *CANIDBuilder) UseNodeID(from, len int) *CANIDBuilder { b.operations = append(b.operations, &CANIDBuilderOp{ - kind: CANIDBuilderOpNodeID, + kind: CANIDBuilderOpKindNodeID, from: from, len: len, }) diff --git a/exporter.go b/exporter.go index 418325b..7152fee 100644 --- a/exporter.go +++ b/exporter.go @@ -435,10 +435,10 @@ func (e *exporter) exportStandardSignal(stdSig *StandardSignal, dbcSig *dbc.Sign dbcSig.ValueType = dbc.SignalUnsigned } - dbcSig.Min = stdSig.min - dbcSig.Max = stdSig.max - dbcSig.Offset = stdSig.offset - dbcSig.Factor = stdSig.scale + dbcSig.Min = stdSig.typ.min + dbcSig.Max = stdSig.typ.max + dbcSig.Offset = stdSig.typ.offset + dbcSig.Factor = stdSig.typ.scale unit := stdSig.unit if unit != nil { diff --git a/importer.go b/importer.go index 84e8d58..8abfd55 100644 --- a/importer.go +++ b/importer.go @@ -615,6 +615,12 @@ func (i *importer) importSignal(dbcSig *dbc.Signal, dbcMsgID uint32) (Signal, er if err != nil { return nil, i.errorf(dbcSig, err) } + + tmpSigType.SetMin(dbcSig.Min) + tmpSigType.SetMax(dbcSig.Max) + tmpSigType.SetScale(dbcSig.Factor) + tmpSigType.SetOffset(dbcSig.Offset) + sigType = tmpSigType } @@ -623,10 +629,6 @@ func (i *importer) importSignal(dbcSig *dbc.Signal, dbcMsgID uint32) (Signal, er return nil, i.errorf(dbcSig, err) } - if err := stdSig.SetPhysicalValues(dbcSig.Min, dbcSig.Max, dbcSig.Offset, dbcSig.Factor); err != nil { - return nil, i.errorf(dbcSig, err) - } - if dbcSig.Unit != "" { stdSig.SetUnit(NewSignalUnit(fmt.Sprintf("%s_Unit", sigName), SignalUnitKindCustom, dbcSig.Unit)) } diff --git a/md_exporter.go b/md_exporter.go index f4c3a7a..48f635b 100644 --- a/md_exporter.go +++ b/md_exporter.go @@ -163,13 +163,13 @@ func (e *mdExporter) exportSignal(sig Signal) { } func (e *mdExporter) exportStandardSignal(stdSig *StandardSignal) { - e.sigTableRow = append(e.sigTableRow, fmt.Sprintf("%g", stdSig.min)) + e.sigTableRow = append(e.sigTableRow, fmt.Sprintf("%g", stdSig.typ.min)) - e.sigTableRow = append(e.sigTableRow, fmt.Sprintf("%g", stdSig.max)) + e.sigTableRow = append(e.sigTableRow, fmt.Sprintf("%g", stdSig.typ.max)) - e.sigTableRow = append(e.sigTableRow, fmt.Sprintf("%g", stdSig.offset)) + e.sigTableRow = append(e.sigTableRow, fmt.Sprintf("%g", stdSig.typ.offset)) - e.sigTableRow = append(e.sigTableRow, fmt.Sprintf("%g", stdSig.scale)) + e.sigTableRow = append(e.sigTableRow, fmt.Sprintf("%g", stdSig.typ.scale)) unitSymbol := "-" if stdSig.unit != nil { diff --git a/message.go b/message.go index 0bd5e10..bf9f01b 100644 --- a/message.go +++ b/message.go @@ -12,7 +12,7 @@ type MessageID uint32 // MessagePriority rappresents the priority of a [Message]. // The priorities are very high, high, medium, and low. // The higher priority has the value 0 and the lower has 3. -type MessagePriority uint +type MessagePriority uint32 const ( // MessagePriorityVeryHigh defines a very high priority. @@ -74,7 +74,6 @@ const ( type Message struct { *attributeEntity - // senderNode *Node senderNodeInt *NodeInterface signals *set[EntityID, Signal] @@ -87,9 +86,7 @@ type Message struct { id MessageID staticCANID CANID hasStaticCANID bool - // id MessageCANID - // isStaticID bool - // idGenFn MessageCANIDGeneratorFn + priority MessagePriority byteOrder MessageByteOrder @@ -107,7 +104,6 @@ func NewMessage(name string, id MessageID, sizeByte int) *Message { return &Message{ attributeEntity: newAttributeEntity(name, AttributeRefKindMessage), - // senderNode: nil, senderNodeInt: nil, signals: newSet[EntityID, Signal](), @@ -120,8 +116,7 @@ func NewMessage(name string, id MessageID, sizeByte int) *Message { id: id, staticCANID: 0, hasStaticCANID: false, - // isStaticID: false, - // idGenFn: defMsgIDGenFn, + priority: MessagePriorityVeryHigh, byteOrder: MessageByteOrderLittleEndian, diff --git a/message_test.go b/message_test.go index 31111bc..6477b8f 100644 --- a/message_test.go +++ b/message_test.go @@ -19,20 +19,20 @@ func Test_Message_AppendSignal(t *testing.T) { msg := NewMessage("msg_0", 1, 8) - sigTypInt8, _ := newSignalType("int8", SignalTypeKindInteger, 8, true, -128, 127) - sigTypInt32, _ := newSignalType("int32", SignalTypeKindInteger, 32, true, -128, 127) + size8Type, _ := NewIntegerSignalType("8_bits", 8, false) + size32Type, _ := NewIntegerSignalType("32_bits", 32, false) sigNames := []string{"sig_0", "sig_1", "sig_2", "sig_3", "sig_4"} - sig0, _ := NewStandardSignal(sigNames[0], sigTypInt8) - sig1, _ := NewStandardSignal(sigNames[1], sigTypInt8) - sig2, _ := NewStandardSignal(sigNames[2], sigTypInt8) - sig3, _ := NewStandardSignal(sigNames[3], sigTypInt8) - sig4, _ := NewStandardSignal(sigNames[4], sigTypInt32) + sig0, _ := NewStandardSignal(sigNames[0], size8Type) + sig1, _ := NewStandardSignal(sigNames[1], size8Type) + sig2, _ := NewStandardSignal(sigNames[2], size8Type) + sig3, _ := NewStandardSignal(sigNames[3], size8Type) + sig4, _ := NewStandardSignal(sigNames[4], size32Type) assert.NoError(msg.AppendSignal(sig0)) - duplicatedSigName, _ := NewStandardSignal(sigNames[0], sigTypInt8) + duplicatedSigName, _ := NewStandardSignal(sigNames[0], size8Type) assert.Error(msg.AppendSignal(duplicatedSigName)) assert.NoError(msg.AppendSignal(sig1)) @@ -41,11 +41,12 @@ func Test_Message_AppendSignal(t *testing.T) { assert.NoError(msg.AppendSignal(sig4)) - sigTypMassive, _ := newSignalType("massive", SignalTypeKindInteger, 128, true, -128, 127) + sigTypMassive, err := NewIntegerSignalType("massive", 128, false) + assert.NoError(err) massiveSig, _ := NewStandardSignal("massive_sig", sigTypMassive) assert.Error(msg.AppendSignal(massiveSig)) - exidingSig, _ := NewStandardSignal("exiding_sig", sigTypInt8) + exidingSig, _ := NewStandardSignal("exiding_sig", size8Type) assert.Error(msg.AppendSignal(exidingSig)) results := msg.Signals() @@ -60,25 +61,27 @@ func Test_Message_InsertSignal(t *testing.T) { msg := NewMessage("msg_0", 1, 8) - sigTypInt8, _ := newSignalType("int8", SignalTypeKindInteger, 8, true, -128, 127) - sigTypInt32, _ := newSignalType("int32", SignalTypeKindInteger, 32, true, -128, 127) + size8Type, err := NewIntegerSignalType("8_bits", 8, false) + assert.NoError(err) + size32Type, err := NewIntegerSignalType("32_bits", 32, false) + assert.NoError(err) sigNames := []string{"sig_0", "sig_1", "sig_2", "sig_3", "sig_4"} - sig0, _ := NewStandardSignal(sigNames[0], sigTypInt8) - sig1, _ := NewStandardSignal(sigNames[1], sigTypInt8) - sig2, _ := NewStandardSignal(sigNames[2], sigTypInt8) - sig3, _ := NewStandardSignal(sigNames[3], sigTypInt8) - sig4, _ := NewStandardSignal(sigNames[4], sigTypInt32) + sig0, _ := NewStandardSignal(sigNames[0], size8Type) + sig1, _ := NewStandardSignal(sigNames[1], size8Type) + sig2, _ := NewStandardSignal(sigNames[2], size8Type) + sig3, _ := NewStandardSignal(sigNames[3], size8Type) + sig4, _ := NewStandardSignal(sigNames[4], size32Type) assert.NoError(msg.InsertSignal(sig0, 0)) assert.NoError(msg.InsertSignal(sig1, 24)) - duplicatedSigName, _ := NewStandardSignal(sigNames[0], sigTypInt8) + duplicatedSigName, _ := NewStandardSignal(sigNames[0], size8Type) assert.Error(msg.InsertSignal(duplicatedSigName, 16)) - overlappingSig, _ := NewStandardSignal("overlapping_sig", sigTypInt8) + overlappingSig, _ := NewStandardSignal("overlapping_sig", size8Type) assert.Error(msg.InsertSignal(overlappingSig, 0)) assert.Error(msg.InsertSignal(overlappingSig, 7)) assert.Error(msg.InsertSignal(overlappingSig, 23)) @@ -87,11 +90,12 @@ func Test_Message_InsertSignal(t *testing.T) { assert.NoError(msg.InsertSignal(sig3, 8)) assert.NoError(msg.InsertSignal(sig4, 32)) - sigTypMassive, _ := newSignalType("massive", SignalTypeKindInteger, 128, true, -128, 127) + sigTypMassive, err := NewIntegerSignalType("massive", 128, false) + assert.NoError(err) massiveSig, _ := NewStandardSignal("massive_sig", sigTypMassive) assert.Error(msg.InsertSignal(massiveSig, 0)) - exidingSig, _ := NewStandardSignal("exiding_sig", sigTypInt8) + exidingSig, _ := NewStandardSignal("exiding_sig", size8Type) assert.Error(msg.InsertSignal(exidingSig, 0)) assert.Error(msg.InsertSignal(exidingSig, 64)) @@ -110,16 +114,18 @@ func Test_Message_RemoveSignal(t *testing.T) { msg := NewMessage("msg_0", 1, 8) - sigTypInt8, _ := newSignalType("int8", SignalTypeKindInteger, 8, true, -128, 127) - sigTypInt32, _ := newSignalType("int32", SignalTypeKindInteger, 32, true, -128, 127) + size8Type, err := NewIntegerSignalType("8_bits", 8, false) + assert.NoError(err) + size32Type, err := NewIntegerSignalType("32_bits", 32, false) + assert.NoError(err) sigNames := []string{"sig_0", "sig_1", "sig_2", "sig_3", "sig_4"} - sig0, _ := NewStandardSignal(sigNames[0], sigTypInt8) - sig1, _ := NewStandardSignal(sigNames[1], sigTypInt8) - sig2, _ := NewStandardSignal(sigNames[2], sigTypInt8) - sig3, _ := NewStandardSignal(sigNames[3], sigTypInt8) - sig4, _ := NewStandardSignal(sigNames[4], sigTypInt32) + sig0, _ := NewStandardSignal(sigNames[0], size8Type) + sig1, _ := NewStandardSignal(sigNames[1], size8Type) + sig2, _ := NewStandardSignal(sigNames[2], size8Type) + sig3, _ := NewStandardSignal(sigNames[3], size8Type) + sig4, _ := NewStandardSignal(sigNames[4], size32Type) assert.NoError(msg.AppendSignal(sig0)) assert.NoError(msg.AppendSignal(sig1)) @@ -145,11 +151,12 @@ func Test_Message_CompactSignals(t *testing.T) { msg := NewMessage("msg_0", 1, 8) - sigTypInt8, _ := newSignalType("int8", SignalTypeKindInteger, 8, true, -128, 127) + size8Type, err := NewIntegerSignalType("8_bits", 8, false) + assert.NoError(err) - sig0, _ := NewStandardSignal("sig_0", sigTypInt8) - sig1, _ := NewStandardSignal("sig_1", sigTypInt8) - sig2, _ := NewStandardSignal("sig_2", sigTypInt8) + sig0, _ := NewStandardSignal("sig_0", size8Type) + sig1, _ := NewStandardSignal("sig_1", size8Type) + sig2, _ := NewStandardSignal("sig_2", size8Type) assert.NoError(msg.InsertSignal(sig0, 2)) assert.NoError(msg.InsertSignal(sig1, 18)) @@ -170,10 +177,10 @@ func Test_Message_ShiftSignalLeft(t *testing.T) { msg := NewMessage("message", 1, 2) - sigTypeInt4, err := newSignalType("int4", SignalTypeKindInteger, 4, true, -8, 7) + size4Type, err := NewIntegerSignalType("32_bits", 4, false) assert.NoError(err) - sig0, err := NewStandardSignal("signal_0", sigTypeInt4) + sig0, err := NewStandardSignal("signal_0", size4Type) assert.NoError(err) assert.NoError(msg.InsertSignal(sig0, 12)) @@ -182,13 +189,13 @@ func Test_Message_ShiftSignalLeft(t *testing.T) { assert.Equal(1, msg.ShiftSignalLeft(sig0.EntityID(), 1)) assert.Equal(11, msg.ShiftSignalLeft(sig0.EntityID(), 16)) - sig1, err := NewStandardSignal("signal_1", sigTypeInt4) + sig1, err := NewStandardSignal("signal_1", size4Type) assert.NoError(err) assert.NoError(msg.InsertSignal(sig1, 12)) assert.Equal(8, msg.ShiftSignalLeft(sig1.EntityID(), 16)) - sig2, err := NewStandardSignal("signal_2", sigTypeInt4) + sig2, err := NewStandardSignal("signal_2", size4Type) assert.NoError(err) assert.NoError(msg.InsertSignal(sig2, 12)) @@ -206,9 +213,10 @@ func Test_Message_ShiftSignalRight(t *testing.T) { msg := NewMessage("message", 1, 2) - sigTypeInt4, _ := newSignalType("int4", SignalTypeKindInteger, 4, true, -8, 7) + size4Type, err := NewIntegerSignalType("32_bits", 4, false) + assert.NoError(err) - sig0, err := NewStandardSignal("signal_0", sigTypeInt4) + sig0, err := NewStandardSignal("signal_0", size4Type) assert.NoError(err) assert.NoError(msg.InsertSignal(sig0, 0)) @@ -217,13 +225,13 @@ func Test_Message_ShiftSignalRight(t *testing.T) { assert.Equal(1, msg.ShiftSignalRight(sig0.EntityID(), 1)) assert.Equal(11, msg.ShiftSignalRight(sig0.EntityID(), 16)) - sig1, err := NewStandardSignal("signal_1", sigTypeInt4) + sig1, err := NewStandardSignal("signal_1", size4Type) assert.NoError(err) assert.NoError(msg.InsertSignal(sig1, 0)) assert.Equal(8, msg.ShiftSignalRight(sig1.EntityID(), 16)) - sig2, err := NewStandardSignal("signal_2", sigTypeInt4) + sig2, err := NewStandardSignal("signal_2", size4Type) assert.NoError(err) assert.NoError(msg.InsertSignal(sig2, 0)) diff --git a/network.go b/network.go index 508566b..51b9ee1 100644 --- a/network.go +++ b/network.go @@ -14,8 +14,6 @@ type Network struct { buses *set[EntityID, *Bus] busNames *set[string, EntityID] - - // templates *set[EntityID, Template] } // NewNetwork returns a new [Network] with the given name. @@ -25,8 +23,6 @@ func NewNetwork(name string) *Network { buses: newSet[EntityID, *Bus](), busNames: newSet[string, EntityID](), - - // templates: newSet[EntityID, Template](), } } diff --git a/node.go b/node.go index 597728e..713449d 100644 --- a/node.go +++ b/node.go @@ -21,7 +21,8 @@ type Node struct { interfaces []*NodeInterface intErrNum int - id NodeID + id NodeID + interfaceCount int } // NewNode creates a new [Node] with the given name, id and count of interfaces. @@ -30,9 +31,11 @@ func NewNode(name string, id NodeID, interfaceCount int) *Node { node := &Node{ attributeEntity: newAttributeEntity(name, AttributeRefKindNode), - intErrNum: -1, + interfaces: []*NodeInterface{}, + intErrNum: -1, - id: id, + id: id, + interfaceCount: interfaceCount, } node.interfaces = make([]*NodeInterface, interfaceCount) diff --git a/proto/acmelib/v1/bus.proto b/proto/acmelib/v1/bus.proto new file mode 100644 index 0000000..1037c00 --- /dev/null +++ b/proto/acmelib/v1/bus.proto @@ -0,0 +1,26 @@ +syntax = "proto3"; + +package acmelib.v1; + +import "acmelib/v1/entity.proto"; +import "acmelib/v1/node_interface.proto"; +import "acmelib/v1/canid_builder.proto"; + +enum BusType { + BUS_TYPE_UNSPECIFIED = 0; + BUS_TYPE_CAN_2A = 1; +} + +message Bus { + acmelib.v1.Entity entity = 1; + + repeated acmelib.v1.NodeInterface node_interfaces = 2; + + uint32 baudrate = 3; + BusType type = 4; + + oneof canid_builder { + acmelib.v1.CANIDBuilder embedded_canid_builder = 5; + string canid_builder_entity_id = 6; + } +} \ No newline at end of file diff --git a/proto/acmelib/v1/canid_builder.proto b/proto/acmelib/v1/canid_builder.proto new file mode 100644 index 0000000..f75c1c4 --- /dev/null +++ b/proto/acmelib/v1/canid_builder.proto @@ -0,0 +1,24 @@ +syntax = "proto3"; + +package acmelib.v1; + +import "acmelib/v1/entity.proto"; + +enum CANIDBuilderOpKind { + CANID_BUILDER_OP_KIND_UNSPECIFIED = 0; + CANID_BUILDER_OP_KIND_MESSAGE_PRIORITY = 1; + CANID_BUILDER_OP_KIND_MESSAGE_ID = 2; + CANID_BUILDER_OP_KIND_NODE_ID = 3; +} + +message CANIDBuilderOp { + CANIDBuilderOpKind kind = 1; + uint32 from = 2; + uint32 to = 3; +} + +message CANIDBuilder { + acmelib.v1.Entity entity = 1; + + repeated CANIDBuilderOp operations = 2; +} \ No newline at end of file diff --git a/proto/acmelib/v1/types.proto b/proto/acmelib/v1/entity.proto similarity index 91% rename from proto/acmelib/v1/types.proto rename to proto/acmelib/v1/entity.proto index bf2029f..5620d35 100644 --- a/proto/acmelib/v1/types.proto +++ b/proto/acmelib/v1/entity.proto @@ -4,7 +4,7 @@ package acmelib.v1; import "google/protobuf/timestamp.proto"; -message Network { +message Entity { string entity_id = 1; string name = 2; string desc = 3; diff --git a/proto/acmelib/v1/message.proto b/proto/acmelib/v1/message.proto new file mode 100644 index 0000000..5afbb8f --- /dev/null +++ b/proto/acmelib/v1/message.proto @@ -0,0 +1,52 @@ +syntax = "proto3"; + +package acmelib.v1; + +import "acmelib/v1/entity.proto"; +import "acmelib/v1/signal_payload.proto"; +import "acmelib/v1/signal.proto"; + +enum MessagePriority { + MESSAGE_PRIORITY_UNSPECIFIED = 0; + MESSAGE_PRIORITY_VERY_HIGH = 1; + MESSAGE_PRIORITY_HIGH = 2; + MESSAGE_PRIORITY_MEDIUM = 3; + MESSAGE_PRIORITY_LOW = 4; +} + +enum MessageSendType { + MESSAGE_SEND_TYPE_UNSPECIFIED = 0; + MESSAGE_SEND_TYPE_CYCLIC = 1; + MESSAGE_SEND_TYPE_CYCLIC_IF_ACTIVE = 2; + MESSAGE_SEND_TYPE_CYCLIC_AND_TRIGGERED = 3; + MESSAGE_SEND_TYPE_CYCLIC_IF_ACTIVE_AND_TRIGGERED = 4; +} + +enum MessageByteOrder { + MESSAGE_BYTE_ORDER_UNSPECIFIED = 0; + MESSAGE_BYTE_ORDER_LITTLE_ENDIAN = 1; + MESSAGE_BYTE_ORDER_BIG_ENDIAN = 2; +} + +message Message { + acmelib.v1.Entity entity = 1; + + repeated acmelib.v1.Signal signals = 2; + acmelib.v1.SignalPayload payload = 3; + + uint32 size_byte = 4; + + uint32 message_id = 5; + uint32 static_can_id = 6; + bool has_static_can_id = 7; + + MessagePriority priority = 8; + MessageByteOrder byte_order = 9; + + uint32 cycle_time = 10; + MessageSendType send_type = 11; + uint32 delay_time = 12; + uint32 start_delay_time = 13; + + repeated string receiver_ids = 14; +} \ No newline at end of file diff --git a/proto/acmelib/v1/network.proto b/proto/acmelib/v1/network.proto new file mode 100644 index 0000000..2c00bdd --- /dev/null +++ b/proto/acmelib/v1/network.proto @@ -0,0 +1,23 @@ +syntax = "proto3"; + +package acmelib.v1; + +import "acmelib/v1/entity.proto"; +import "acmelib/v1/bus.proto"; +import "acmelib/v1/canid_builder.proto"; +import "acmelib/v1/node.proto"; +import "acmelib/v1/signal_type.proto"; +import "acmelib/v1/signal_unit.proto"; +import "acmelib/v1/signal_enum.proto"; + +message Network { + acmelib.v1.Entity entity = 1; + + repeated acmelib.v1.Bus buses = 2; + + repeated acmelib.v1.CANIDBuilder canid_builders = 3; + repeated acmelib.v1.Node nodes = 4; + repeated acmelib.v1.SignalType signal_types = 5; + repeated acmelib.v1.SignalUnit signal_units = 6; + repeated acmelib.v1.SignalEnum signal_enums = 7; +} \ No newline at end of file diff --git a/proto/acmelib/v1/node.proto b/proto/acmelib/v1/node.proto new file mode 100644 index 0000000..be812ca --- /dev/null +++ b/proto/acmelib/v1/node.proto @@ -0,0 +1,12 @@ +syntax = "proto3"; + +package acmelib.v1; + +import "acmelib/v1/entity.proto"; + +message Node { + acmelib.v1.Entity entity = 1; + + uint32 node_id = 2; + uint32 interface_count = 3; +} \ No newline at end of file diff --git a/proto/acmelib/v1/node_interface.proto b/proto/acmelib/v1/node_interface.proto new file mode 100644 index 0000000..38da6f8 --- /dev/null +++ b/proto/acmelib/v1/node_interface.proto @@ -0,0 +1,20 @@ +syntax = "proto3"; + +package acmelib.v1; + +import "acmelib/v1/entity.proto"; +import "acmelib/v1/message.proto"; +import "acmelib/v1/node.proto"; + +message NodeInterface { + acmelib.v1.Entity entity = 1; + + repeated acmelib.v1.Message messages = 2; + + int32 number = 3; + + oneof node { + acmelib.v1.Node embedded_node = 4; + string node_entity_id = 5; + } +} \ No newline at end of file diff --git a/proto/acmelib/v1/signal.proto b/proto/acmelib/v1/signal.proto new file mode 100644 index 0000000..9879442 --- /dev/null +++ b/proto/acmelib/v1/signal.proto @@ -0,0 +1,71 @@ +syntax = "proto3"; + +package acmelib.v1; + +import "acmelib/v1/entity.proto"; +import "acmelib/v1/signal_type.proto"; +import "acmelib/v1/signal_unit.proto"; +import "acmelib/v1/signal_enum.proto"; +import "acmelib/v1/signal_payload.proto"; + +enum SignalKind { + SIGNAL_KIND_UNSPECIFIED = 0; + SIGNAL_KIND_STANDARD = 1; + SIGNAL_KIND_ENUM = 2; + SIGNAL_KIND_MULTIPLEXER = 3; +} + +enum SignalSendType { + SIGNAL_SEND_TYPE_UNSPECIFIED = 0; + SIGNAL_SEND_TYPE_CYCLIC = 1; + SIGNAL_SEND_TYPE_ON_WRITE = 2; + SIGNAL_SEND_TYPE_ON_WRITE_WITH_REPETITION = 3; + SIGNAL_SEND_TYPE_ON_CHANGE = 4; + SIGNAL_SEND_TYPE_ON_CHANGE_WITH_REPETITION = 5; + SIGNAL_SEND_TYPE_IF_ACTIVE = 6; + SIGNAL_SEND_TYPE_IF_ACTIVE_WITH_REPETITION = 7; +} + +message Signal { + acmelib.v1.Entity entity = 1; + + SignalKind kind = 2; + SignalSendType send_type = 3; + double start_value = 4; + + oneof signal { + StandardSignal standard = 5; + EnumSignal enum = 6; + MultiplexerSignal multiplexer = 7; + } +} + +message StandardSignal { + oneof type { + acmelib.v1.SignalType embedded_type = 1; + string type_entity_id = 2; + } + + oneof unit { + acmelib.v1.SignalUnit embedded_unit = 3; + string unit_entity_id = 4; + } +} + +message EnumSignal { + oneof enum{ + acmelib.v1.SignalEnum embedded_enum = 1; + string enum_entity_id = 2; + } +} + +message MultiplexerSignal { + repeated Signal signals = 1; + repeated string fixed_signal_entity_ids = 2; + + uint32 group_count = 3; + uint32 group_size = 4; + + repeated acmelib.v1.SignalPayload groups = 5; +} + diff --git a/proto/acmelib/v1/signal_enum.proto b/proto/acmelib/v1/signal_enum.proto new file mode 100644 index 0000000..5c6f2a4 --- /dev/null +++ b/proto/acmelib/v1/signal_enum.proto @@ -0,0 +1,18 @@ +syntax = "proto3"; + +package acmelib.v1; + +import "acmelib/v1/entity.proto"; + +message SignalEnum { + acmelib.v1.Entity entity = 1; + + repeated SignalEnumValue values = 2; + uint32 min_size = 3; +} + +message SignalEnumValue { + acmelib.v1.Entity entity = 1; + + uint32 index = 2; +} \ No newline at end of file diff --git a/proto/acmelib/v1/signal_payload.proto b/proto/acmelib/v1/signal_payload.proto new file mode 100644 index 0000000..d170e6e --- /dev/null +++ b/proto/acmelib/v1/signal_payload.proto @@ -0,0 +1,12 @@ +syntax = "proto3"; + +package acmelib.v1; + +message SignalPayloadRef { + string signal_entity_id = 1; + uint32 start_bit = 2; +} + +message SignalPayload { + repeated SignalPayloadRef refs = 1; +} \ No newline at end of file diff --git a/proto/acmelib/v1/signal_type.proto b/proto/acmelib/v1/signal_type.proto new file mode 100644 index 0000000..42a619e --- /dev/null +++ b/proto/acmelib/v1/signal_type.proto @@ -0,0 +1,25 @@ +syntax = "proto3"; + +package acmelib.v1; + +import "acmelib/v1/entity.proto"; + +enum SignalTypeKind { + SIGNAL_TYPE_KIND_UNSPECIFIED = 0; + SIGNAL_TYPE_KIND_CUSTOM = 1; + SIGNAL_TYPE_KIND_FLAG = 2; + SIGNAL_TYPE_KIND_INTEGER = 3; + SIGNAL_TYPE_KIND_DECIMAL = 4; +} + +message SignalType { + acmelib.v1.Entity entity = 1; + + SignalTypeKind kind = 2; + uint32 size = 3; + bool signed = 4; + double min = 5; + double max = 6; + double scale = 7; + double offset = 8; +} \ No newline at end of file diff --git a/proto/acmelib/v1/signal_unit.proto b/proto/acmelib/v1/signal_unit.proto new file mode 100644 index 0000000..be6faac --- /dev/null +++ b/proto/acmelib/v1/signal_unit.proto @@ -0,0 +1,20 @@ +syntax = "proto3"; + +package acmelib.v1; + +import "acmelib/v1/entity.proto"; + +enum SignalUnitKind { + SIGNAL_UNIT_KIND_UNSPECIFIED = 0; + SIGNAL_UNIT_KIND_CUSTOM = 1; + SIGNAL_UNIT_KIND_TEMPERATURE = 2; + SIGNAL_UNIT_KIND_ELECTRICAL = 3; + SIGNAL_UNIT_KIND_POWER = 4; +} + +message SignalUnit { + acmelib.v1.Entity entity = 1; + + SignalUnitKind kind = 2; + string symbol = 3; +} \ No newline at end of file diff --git a/proto/gen/go/acmelib/v1/bus.pb.go b/proto/gen/go/acmelib/v1/bus.pb.go new file mode 100644 index 0000000..fbcdee5 --- /dev/null +++ b/proto/gen/go/acmelib/v1/bus.pb.go @@ -0,0 +1,307 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.31.0 +// protoc (unknown) +// source: acmelib/v1/bus.proto + +package acmelibv1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type BusType int32 + +const ( + BusType_BUS_TYPE_UNSPECIFIED BusType = 0 + BusType_BUS_TYPE_CAN_2A BusType = 1 +) + +// Enum value maps for BusType. +var ( + BusType_name = map[int32]string{ + 0: "BUS_TYPE_UNSPECIFIED", + 1: "BUS_TYPE_CAN_2A", + } + BusType_value = map[string]int32{ + "BUS_TYPE_UNSPECIFIED": 0, + "BUS_TYPE_CAN_2A": 1, + } +) + +func (x BusType) Enum() *BusType { + p := new(BusType) + *p = x + return p +} + +func (x BusType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (BusType) Descriptor() protoreflect.EnumDescriptor { + return file_acmelib_v1_bus_proto_enumTypes[0].Descriptor() +} + +func (BusType) Type() protoreflect.EnumType { + return &file_acmelib_v1_bus_proto_enumTypes[0] +} + +func (x BusType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use BusType.Descriptor instead. +func (BusType) EnumDescriptor() ([]byte, []int) { + return file_acmelib_v1_bus_proto_rawDescGZIP(), []int{0} +} + +type Bus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Entity *Entity `protobuf:"bytes,1,opt,name=entity,proto3" json:"entity,omitempty"` + NodeInterfaces []*NodeInterface `protobuf:"bytes,2,rep,name=node_interfaces,json=nodeInterfaces,proto3" json:"node_interfaces,omitempty"` + Baudrate uint32 `protobuf:"varint,3,opt,name=baudrate,proto3" json:"baudrate,omitempty"` + Type BusType `protobuf:"varint,4,opt,name=type,proto3,enum=acmelib.v1.BusType" json:"type,omitempty"` + // Types that are assignable to CanidBuilder: + // + // *Bus_EmbeddedCanidBuilder + // *Bus_CanidBuilderEntityId + CanidBuilder isBus_CanidBuilder `protobuf_oneof:"canid_builder"` +} + +func (x *Bus) Reset() { + *x = Bus{} + if protoimpl.UnsafeEnabled { + mi := &file_acmelib_v1_bus_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Bus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Bus) ProtoMessage() {} + +func (x *Bus) ProtoReflect() protoreflect.Message { + mi := &file_acmelib_v1_bus_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Bus.ProtoReflect.Descriptor instead. +func (*Bus) Descriptor() ([]byte, []int) { + return file_acmelib_v1_bus_proto_rawDescGZIP(), []int{0} +} + +func (x *Bus) GetEntity() *Entity { + if x != nil { + return x.Entity + } + return nil +} + +func (x *Bus) GetNodeInterfaces() []*NodeInterface { + if x != nil { + return x.NodeInterfaces + } + return nil +} + +func (x *Bus) GetBaudrate() uint32 { + if x != nil { + return x.Baudrate + } + return 0 +} + +func (x *Bus) GetType() BusType { + if x != nil { + return x.Type + } + return BusType_BUS_TYPE_UNSPECIFIED +} + +func (m *Bus) GetCanidBuilder() isBus_CanidBuilder { + if m != nil { + return m.CanidBuilder + } + return nil +} + +func (x *Bus) GetEmbeddedCanidBuilder() *CANIDBuilder { + if x, ok := x.GetCanidBuilder().(*Bus_EmbeddedCanidBuilder); ok { + return x.EmbeddedCanidBuilder + } + return nil +} + +func (x *Bus) GetCanidBuilderEntityId() string { + if x, ok := x.GetCanidBuilder().(*Bus_CanidBuilderEntityId); ok { + return x.CanidBuilderEntityId + } + return "" +} + +type isBus_CanidBuilder interface { + isBus_CanidBuilder() +} + +type Bus_EmbeddedCanidBuilder struct { + EmbeddedCanidBuilder *CANIDBuilder `protobuf:"bytes,5,opt,name=embedded_canid_builder,json=embeddedCanidBuilder,proto3,oneof"` +} + +type Bus_CanidBuilderEntityId struct { + CanidBuilderEntityId string `protobuf:"bytes,6,opt,name=canid_builder_entity_id,json=canidBuilderEntityId,proto3,oneof"` +} + +func (*Bus_EmbeddedCanidBuilder) isBus_CanidBuilder() {} + +func (*Bus_CanidBuilderEntityId) isBus_CanidBuilder() {} + +var File_acmelib_v1_bus_proto protoreflect.FileDescriptor + +var file_acmelib_v1_bus_proto_rawDesc = []byte{ + 0x0a, 0x14, 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x75, 0x73, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2e, + 0x76, 0x31, 0x1a, 0x17, 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2f, 0x76, 0x31, 0x2f, 0x65, + 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x61, 0x63, 0x6d, + 0x65, 0x6c, 0x69, 0x62, 0x2f, 0x76, 0x31, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x6e, 0x74, + 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x61, 0x63, + 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x61, 0x6e, 0x69, 0x64, 0x5f, 0x62, + 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd6, 0x02, 0x0a, + 0x03, 0x42, 0x75, 0x73, 0x12, 0x2a, 0x0a, 0x06, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2e, 0x76, + 0x31, 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x06, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, + 0x12, 0x42, 0x0a, 0x0f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, + 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x61, 0x63, 0x6d, 0x65, + 0x6c, 0x69, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x72, + 0x66, 0x61, 0x63, 0x65, 0x52, 0x0e, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, + 0x61, 0x63, 0x65, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x61, 0x75, 0x64, 0x72, 0x61, 0x74, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x62, 0x61, 0x75, 0x64, 0x72, 0x61, 0x74, 0x65, + 0x12, 0x27, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, + 0x2e, 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, 0x54, + 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x50, 0x0a, 0x16, 0x65, 0x6d, 0x62, + 0x65, 0x64, 0x64, 0x65, 0x64, 0x5f, 0x63, 0x61, 0x6e, 0x69, 0x64, 0x5f, 0x62, 0x75, 0x69, 0x6c, + 0x64, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x61, 0x63, 0x6d, 0x65, + 0x6c, 0x69, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x41, 0x4e, 0x49, 0x44, 0x42, 0x75, 0x69, 0x6c, + 0x64, 0x65, 0x72, 0x48, 0x00, 0x52, 0x14, 0x65, 0x6d, 0x62, 0x65, 0x64, 0x64, 0x65, 0x64, 0x43, + 0x61, 0x6e, 0x69, 0x64, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x12, 0x37, 0x0a, 0x17, 0x63, + 0x61, 0x6e, 0x69, 0x64, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x5f, 0x65, 0x6e, 0x74, + 0x69, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x14, + 0x63, 0x61, 0x6e, 0x69, 0x64, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x69, + 0x74, 0x79, 0x49, 0x64, 0x42, 0x0f, 0x0a, 0x0d, 0x63, 0x61, 0x6e, 0x69, 0x64, 0x5f, 0x62, 0x75, + 0x69, 0x6c, 0x64, 0x65, 0x72, 0x2a, 0x38, 0x0a, 0x07, 0x42, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x18, 0x0a, 0x14, 0x42, 0x55, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, + 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x42, 0x55, + 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x43, 0x41, 0x4e, 0x5f, 0x32, 0x41, 0x10, 0x01, 0x42, + 0x79, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2e, 0x76, + 0x31, 0x42, 0x08, 0x42, 0x75, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x14, 0x61, + 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2f, 0x76, 0x31, 0x3b, 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, + 0x62, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x41, 0x58, 0x58, 0xaa, 0x02, 0x0a, 0x41, 0x63, 0x6d, 0x65, + 0x6c, 0x69, 0x62, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0a, 0x41, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, + 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x16, 0x41, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x5c, 0x56, 0x31, + 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0b, 0x41, + 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, +} + +var ( + file_acmelib_v1_bus_proto_rawDescOnce sync.Once + file_acmelib_v1_bus_proto_rawDescData = file_acmelib_v1_bus_proto_rawDesc +) + +func file_acmelib_v1_bus_proto_rawDescGZIP() []byte { + file_acmelib_v1_bus_proto_rawDescOnce.Do(func() { + file_acmelib_v1_bus_proto_rawDescData = protoimpl.X.CompressGZIP(file_acmelib_v1_bus_proto_rawDescData) + }) + return file_acmelib_v1_bus_proto_rawDescData +} + +var file_acmelib_v1_bus_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_acmelib_v1_bus_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_acmelib_v1_bus_proto_goTypes = []interface{}{ + (BusType)(0), // 0: acmelib.v1.BusType + (*Bus)(nil), // 1: acmelib.v1.Bus + (*Entity)(nil), // 2: acmelib.v1.Entity + (*NodeInterface)(nil), // 3: acmelib.v1.NodeInterface + (*CANIDBuilder)(nil), // 4: acmelib.v1.CANIDBuilder +} +var file_acmelib_v1_bus_proto_depIdxs = []int32{ + 2, // 0: acmelib.v1.Bus.entity:type_name -> acmelib.v1.Entity + 3, // 1: acmelib.v1.Bus.node_interfaces:type_name -> acmelib.v1.NodeInterface + 0, // 2: acmelib.v1.Bus.type:type_name -> acmelib.v1.BusType + 4, // 3: acmelib.v1.Bus.embedded_canid_builder:type_name -> acmelib.v1.CANIDBuilder + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_acmelib_v1_bus_proto_init() } +func file_acmelib_v1_bus_proto_init() { + if File_acmelib_v1_bus_proto != nil { + return + } + file_acmelib_v1_entity_proto_init() + file_acmelib_v1_node_interface_proto_init() + file_acmelib_v1_canid_builder_proto_init() + if !protoimpl.UnsafeEnabled { + file_acmelib_v1_bus_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Bus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_acmelib_v1_bus_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*Bus_EmbeddedCanidBuilder)(nil), + (*Bus_CanidBuilderEntityId)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_acmelib_v1_bus_proto_rawDesc, + NumEnums: 1, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_acmelib_v1_bus_proto_goTypes, + DependencyIndexes: file_acmelib_v1_bus_proto_depIdxs, + EnumInfos: file_acmelib_v1_bus_proto_enumTypes, + MessageInfos: file_acmelib_v1_bus_proto_msgTypes, + }.Build() + File_acmelib_v1_bus_proto = out.File + file_acmelib_v1_bus_proto_rawDesc = nil + file_acmelib_v1_bus_proto_goTypes = nil + file_acmelib_v1_bus_proto_depIdxs = nil +} diff --git a/proto/gen/go/acmelib/v1/canid_builder.pb.go b/proto/gen/go/acmelib/v1/canid_builder.pb.go new file mode 100644 index 0000000..42ff9f4 --- /dev/null +++ b/proto/gen/go/acmelib/v1/canid_builder.pb.go @@ -0,0 +1,319 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.31.0 +// protoc (unknown) +// source: acmelib/v1/canid_builder.proto + +package acmelibv1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type CANIDBuilderOpKind int32 + +const ( + CANIDBuilderOpKind_CANID_BUILDER_OP_KIND_UNSPECIFIED CANIDBuilderOpKind = 0 + CANIDBuilderOpKind_CANID_BUILDER_OP_KIND_MESSAGE_PRIORITY CANIDBuilderOpKind = 1 + CANIDBuilderOpKind_CANID_BUILDER_OP_KIND_MESSAGE_ID CANIDBuilderOpKind = 2 + CANIDBuilderOpKind_CANID_BUILDER_OP_KIND_NODE_ID CANIDBuilderOpKind = 3 +) + +// Enum value maps for CANIDBuilderOpKind. +var ( + CANIDBuilderOpKind_name = map[int32]string{ + 0: "CANID_BUILDER_OP_KIND_UNSPECIFIED", + 1: "CANID_BUILDER_OP_KIND_MESSAGE_PRIORITY", + 2: "CANID_BUILDER_OP_KIND_MESSAGE_ID", + 3: "CANID_BUILDER_OP_KIND_NODE_ID", + } + CANIDBuilderOpKind_value = map[string]int32{ + "CANID_BUILDER_OP_KIND_UNSPECIFIED": 0, + "CANID_BUILDER_OP_KIND_MESSAGE_PRIORITY": 1, + "CANID_BUILDER_OP_KIND_MESSAGE_ID": 2, + "CANID_BUILDER_OP_KIND_NODE_ID": 3, + } +) + +func (x CANIDBuilderOpKind) Enum() *CANIDBuilderOpKind { + p := new(CANIDBuilderOpKind) + *p = x + return p +} + +func (x CANIDBuilderOpKind) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (CANIDBuilderOpKind) Descriptor() protoreflect.EnumDescriptor { + return file_acmelib_v1_canid_builder_proto_enumTypes[0].Descriptor() +} + +func (CANIDBuilderOpKind) Type() protoreflect.EnumType { + return &file_acmelib_v1_canid_builder_proto_enumTypes[0] +} + +func (x CANIDBuilderOpKind) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use CANIDBuilderOpKind.Descriptor instead. +func (CANIDBuilderOpKind) EnumDescriptor() ([]byte, []int) { + return file_acmelib_v1_canid_builder_proto_rawDescGZIP(), []int{0} +} + +type CANIDBuilderOp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Kind CANIDBuilderOpKind `protobuf:"varint,1,opt,name=kind,proto3,enum=acmelib.v1.CANIDBuilderOpKind" json:"kind,omitempty"` + From uint32 `protobuf:"varint,2,opt,name=from,proto3" json:"from,omitempty"` + To uint32 `protobuf:"varint,3,opt,name=to,proto3" json:"to,omitempty"` +} + +func (x *CANIDBuilderOp) Reset() { + *x = CANIDBuilderOp{} + if protoimpl.UnsafeEnabled { + mi := &file_acmelib_v1_canid_builder_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CANIDBuilderOp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CANIDBuilderOp) ProtoMessage() {} + +func (x *CANIDBuilderOp) ProtoReflect() protoreflect.Message { + mi := &file_acmelib_v1_canid_builder_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CANIDBuilderOp.ProtoReflect.Descriptor instead. +func (*CANIDBuilderOp) Descriptor() ([]byte, []int) { + return file_acmelib_v1_canid_builder_proto_rawDescGZIP(), []int{0} +} + +func (x *CANIDBuilderOp) GetKind() CANIDBuilderOpKind { + if x != nil { + return x.Kind + } + return CANIDBuilderOpKind_CANID_BUILDER_OP_KIND_UNSPECIFIED +} + +func (x *CANIDBuilderOp) GetFrom() uint32 { + if x != nil { + return x.From + } + return 0 +} + +func (x *CANIDBuilderOp) GetTo() uint32 { + if x != nil { + return x.To + } + return 0 +} + +type CANIDBuilder struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Entity *Entity `protobuf:"bytes,1,opt,name=entity,proto3" json:"entity,omitempty"` + Operations []*CANIDBuilderOp `protobuf:"bytes,2,rep,name=operations,proto3" json:"operations,omitempty"` +} + +func (x *CANIDBuilder) Reset() { + *x = CANIDBuilder{} + if protoimpl.UnsafeEnabled { + mi := &file_acmelib_v1_canid_builder_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CANIDBuilder) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CANIDBuilder) ProtoMessage() {} + +func (x *CANIDBuilder) ProtoReflect() protoreflect.Message { + mi := &file_acmelib_v1_canid_builder_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CANIDBuilder.ProtoReflect.Descriptor instead. +func (*CANIDBuilder) Descriptor() ([]byte, []int) { + return file_acmelib_v1_canid_builder_proto_rawDescGZIP(), []int{1} +} + +func (x *CANIDBuilder) GetEntity() *Entity { + if x != nil { + return x.Entity + } + return nil +} + +func (x *CANIDBuilder) GetOperations() []*CANIDBuilderOp { + if x != nil { + return x.Operations + } + return nil +} + +var File_acmelib_v1_canid_builder_proto protoreflect.FileDescriptor + +var file_acmelib_v1_canid_builder_proto_rawDesc = []byte{ + 0x0a, 0x1e, 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x61, 0x6e, + 0x69, 0x64, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x0a, 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2e, 0x76, 0x31, 0x1a, 0x17, 0x61, 0x63, + 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x68, 0x0a, 0x0e, 0x43, 0x41, 0x4e, 0x49, 0x44, 0x42, 0x75, + 0x69, 0x6c, 0x64, 0x65, 0x72, 0x4f, 0x70, 0x12, 0x32, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2e, + 0x76, 0x31, 0x2e, 0x43, 0x41, 0x4e, 0x49, 0x44, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x4f, + 0x70, 0x4b, 0x69, 0x6e, 0x64, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x66, + 0x72, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x12, + 0x0e, 0x0a, 0x02, 0x74, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x02, 0x74, 0x6f, 0x22, + 0x76, 0x0a, 0x0c, 0x43, 0x41, 0x4e, 0x49, 0x44, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x12, + 0x2a, 0x0a, 0x06, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x12, 0x2e, 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x74, + 0x69, 0x74, 0x79, 0x52, 0x06, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x3a, 0x0a, 0x0a, 0x6f, + 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x41, 0x4e, + 0x49, 0x44, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x4f, 0x70, 0x52, 0x0a, 0x6f, 0x70, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2a, 0xb0, 0x01, 0x0a, 0x12, 0x43, 0x41, 0x4e, 0x49, + 0x44, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x4f, 0x70, 0x4b, 0x69, 0x6e, 0x64, 0x12, 0x25, + 0x0a, 0x21, 0x43, 0x41, 0x4e, 0x49, 0x44, 0x5f, 0x42, 0x55, 0x49, 0x4c, 0x44, 0x45, 0x52, 0x5f, + 0x4f, 0x50, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, + 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x2a, 0x0a, 0x26, 0x43, 0x41, 0x4e, 0x49, 0x44, 0x5f, 0x42, + 0x55, 0x49, 0x4c, 0x44, 0x45, 0x52, 0x5f, 0x4f, 0x50, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x4d, + 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x5f, 0x50, 0x52, 0x49, 0x4f, 0x52, 0x49, 0x54, 0x59, 0x10, + 0x01, 0x12, 0x24, 0x0a, 0x20, 0x43, 0x41, 0x4e, 0x49, 0x44, 0x5f, 0x42, 0x55, 0x49, 0x4c, 0x44, + 0x45, 0x52, 0x5f, 0x4f, 0x50, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, + 0x47, 0x45, 0x5f, 0x49, 0x44, 0x10, 0x02, 0x12, 0x21, 0x0a, 0x1d, 0x43, 0x41, 0x4e, 0x49, 0x44, + 0x5f, 0x42, 0x55, 0x49, 0x4c, 0x44, 0x45, 0x52, 0x5f, 0x4f, 0x50, 0x5f, 0x4b, 0x49, 0x4e, 0x44, + 0x5f, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x49, 0x44, 0x10, 0x03, 0x42, 0x82, 0x01, 0x0a, 0x0e, 0x63, + 0x6f, 0x6d, 0x2e, 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2e, 0x76, 0x31, 0x42, 0x11, 0x43, + 0x61, 0x6e, 0x69, 0x64, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x14, 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2f, 0x76, 0x31, 0x3b, 0x61, + 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x41, 0x58, 0x58, 0xaa, 0x02, + 0x0a, 0x41, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0a, 0x41, 0x63, + 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x16, 0x41, 0x63, 0x6d, 0x65, 0x6c, + 0x69, 0x62, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0xea, 0x02, 0x0b, 0x41, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x3a, 0x3a, 0x56, 0x31, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_acmelib_v1_canid_builder_proto_rawDescOnce sync.Once + file_acmelib_v1_canid_builder_proto_rawDescData = file_acmelib_v1_canid_builder_proto_rawDesc +) + +func file_acmelib_v1_canid_builder_proto_rawDescGZIP() []byte { + file_acmelib_v1_canid_builder_proto_rawDescOnce.Do(func() { + file_acmelib_v1_canid_builder_proto_rawDescData = protoimpl.X.CompressGZIP(file_acmelib_v1_canid_builder_proto_rawDescData) + }) + return file_acmelib_v1_canid_builder_proto_rawDescData +} + +var file_acmelib_v1_canid_builder_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_acmelib_v1_canid_builder_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_acmelib_v1_canid_builder_proto_goTypes = []interface{}{ + (CANIDBuilderOpKind)(0), // 0: acmelib.v1.CANIDBuilderOpKind + (*CANIDBuilderOp)(nil), // 1: acmelib.v1.CANIDBuilderOp + (*CANIDBuilder)(nil), // 2: acmelib.v1.CANIDBuilder + (*Entity)(nil), // 3: acmelib.v1.Entity +} +var file_acmelib_v1_canid_builder_proto_depIdxs = []int32{ + 0, // 0: acmelib.v1.CANIDBuilderOp.kind:type_name -> acmelib.v1.CANIDBuilderOpKind + 3, // 1: acmelib.v1.CANIDBuilder.entity:type_name -> acmelib.v1.Entity + 1, // 2: acmelib.v1.CANIDBuilder.operations:type_name -> acmelib.v1.CANIDBuilderOp + 3, // [3:3] is the sub-list for method output_type + 3, // [3:3] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name +} + +func init() { file_acmelib_v1_canid_builder_proto_init() } +func file_acmelib_v1_canid_builder_proto_init() { + if File_acmelib_v1_canid_builder_proto != nil { + return + } + file_acmelib_v1_entity_proto_init() + if !protoimpl.UnsafeEnabled { + file_acmelib_v1_canid_builder_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CANIDBuilderOp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_acmelib_v1_canid_builder_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CANIDBuilder); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_acmelib_v1_canid_builder_proto_rawDesc, + NumEnums: 1, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_acmelib_v1_canid_builder_proto_goTypes, + DependencyIndexes: file_acmelib_v1_canid_builder_proto_depIdxs, + EnumInfos: file_acmelib_v1_canid_builder_proto_enumTypes, + MessageInfos: file_acmelib_v1_canid_builder_proto_msgTypes, + }.Build() + File_acmelib_v1_canid_builder_proto = out.File + file_acmelib_v1_canid_builder_proto_rawDesc = nil + file_acmelib_v1_canid_builder_proto_goTypes = nil + file_acmelib_v1_canid_builder_proto_depIdxs = nil +} diff --git a/proto/gen/go/acmelib/v1/entity.pb.go b/proto/gen/go/acmelib/v1/entity.pb.go new file mode 100644 index 0000000..d8ba897 --- /dev/null +++ b/proto/gen/go/acmelib/v1/entity.pb.go @@ -0,0 +1,185 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.31.0 +// protoc (unknown) +// source: acmelib/v1/entity.proto + +package acmelibv1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type Entity struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + EntityId string `protobuf:"bytes,1,opt,name=entity_id,json=entityId,proto3" json:"entity_id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Desc string `protobuf:"bytes,3,opt,name=desc,proto3" json:"desc,omitempty"` + CreateTime *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` +} + +func (x *Entity) Reset() { + *x = Entity{} + if protoimpl.UnsafeEnabled { + mi := &file_acmelib_v1_entity_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Entity) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Entity) ProtoMessage() {} + +func (x *Entity) ProtoReflect() protoreflect.Message { + mi := &file_acmelib_v1_entity_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Entity.ProtoReflect.Descriptor instead. +func (*Entity) Descriptor() ([]byte, []int) { + return file_acmelib_v1_entity_proto_rawDescGZIP(), []int{0} +} + +func (x *Entity) GetEntityId() string { + if x != nil { + return x.EntityId + } + return "" +} + +func (x *Entity) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Entity) GetDesc() string { + if x != nil { + return x.Desc + } + return "" +} + +func (x *Entity) GetCreateTime() *timestamppb.Timestamp { + if x != nil { + return x.CreateTime + } + return nil +} + +var File_acmelib_v1_entity_proto protoreflect.FileDescriptor + +var file_acmelib_v1_entity_proto_rawDesc = []byte{ + 0x0a, 0x17, 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x6e, 0x74, + 0x69, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x61, 0x63, 0x6d, 0x65, 0x6c, + 0x69, 0x62, 0x2e, 0x76, 0x31, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8a, 0x01, 0x0a, 0x06, 0x45, 0x6e, 0x74, 0x69, 0x74, + 0x79, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x49, 0x64, 0x12, 0x12, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x65, 0x73, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x64, 0x65, 0x73, 0x63, 0x12, 0x3b, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, + 0x69, 0x6d, 0x65, 0x42, 0x7c, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x63, 0x6d, 0x65, 0x6c, + 0x69, 0x62, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x14, 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2f, 0x76, 0x31, + 0x3b, 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x41, 0x58, 0x58, + 0xaa, 0x02, 0x0a, 0x41, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0a, + 0x41, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x16, 0x41, 0x63, 0x6d, + 0x65, 0x6c, 0x69, 0x62, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0xea, 0x02, 0x0b, 0x41, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x3a, 0x3a, 0x56, + 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_acmelib_v1_entity_proto_rawDescOnce sync.Once + file_acmelib_v1_entity_proto_rawDescData = file_acmelib_v1_entity_proto_rawDesc +) + +func file_acmelib_v1_entity_proto_rawDescGZIP() []byte { + file_acmelib_v1_entity_proto_rawDescOnce.Do(func() { + file_acmelib_v1_entity_proto_rawDescData = protoimpl.X.CompressGZIP(file_acmelib_v1_entity_proto_rawDescData) + }) + return file_acmelib_v1_entity_proto_rawDescData +} + +var file_acmelib_v1_entity_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_acmelib_v1_entity_proto_goTypes = []interface{}{ + (*Entity)(nil), // 0: acmelib.v1.Entity + (*timestamppb.Timestamp)(nil), // 1: google.protobuf.Timestamp +} +var file_acmelib_v1_entity_proto_depIdxs = []int32{ + 1, // 0: acmelib.v1.Entity.create_time:type_name -> google.protobuf.Timestamp + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_acmelib_v1_entity_proto_init() } +func file_acmelib_v1_entity_proto_init() { + if File_acmelib_v1_entity_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_acmelib_v1_entity_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Entity); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_acmelib_v1_entity_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_acmelib_v1_entity_proto_goTypes, + DependencyIndexes: file_acmelib_v1_entity_proto_depIdxs, + MessageInfos: file_acmelib_v1_entity_proto_msgTypes, + }.Build() + File_acmelib_v1_entity_proto = out.File + file_acmelib_v1_entity_proto_rawDesc = nil + file_acmelib_v1_entity_proto_goTypes = nil + file_acmelib_v1_entity_proto_depIdxs = nil +} diff --git a/proto/gen/go/acmelib/v1/message.pb.go b/proto/gen/go/acmelib/v1/message.pb.go new file mode 100644 index 0000000..7258870 --- /dev/null +++ b/proto/gen/go/acmelib/v1/message.pb.go @@ -0,0 +1,503 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.31.0 +// protoc (unknown) +// source: acmelib/v1/message.proto + +package acmelibv1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type MessagePriority int32 + +const ( + MessagePriority_MESSAGE_PRIORITY_UNSPECIFIED MessagePriority = 0 + MessagePriority_MESSAGE_PRIORITY_VERY_HIGH MessagePriority = 1 + MessagePriority_MESSAGE_PRIORITY_HIGH MessagePriority = 2 + MessagePriority_MESSAGE_PRIORITY_MEDIUM MessagePriority = 3 + MessagePriority_MESSAGE_PRIORITY_LOW MessagePriority = 4 +) + +// Enum value maps for MessagePriority. +var ( + MessagePriority_name = map[int32]string{ + 0: "MESSAGE_PRIORITY_UNSPECIFIED", + 1: "MESSAGE_PRIORITY_VERY_HIGH", + 2: "MESSAGE_PRIORITY_HIGH", + 3: "MESSAGE_PRIORITY_MEDIUM", + 4: "MESSAGE_PRIORITY_LOW", + } + MessagePriority_value = map[string]int32{ + "MESSAGE_PRIORITY_UNSPECIFIED": 0, + "MESSAGE_PRIORITY_VERY_HIGH": 1, + "MESSAGE_PRIORITY_HIGH": 2, + "MESSAGE_PRIORITY_MEDIUM": 3, + "MESSAGE_PRIORITY_LOW": 4, + } +) + +func (x MessagePriority) Enum() *MessagePriority { + p := new(MessagePriority) + *p = x + return p +} + +func (x MessagePriority) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (MessagePriority) Descriptor() protoreflect.EnumDescriptor { + return file_acmelib_v1_message_proto_enumTypes[0].Descriptor() +} + +func (MessagePriority) Type() protoreflect.EnumType { + return &file_acmelib_v1_message_proto_enumTypes[0] +} + +func (x MessagePriority) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use MessagePriority.Descriptor instead. +func (MessagePriority) EnumDescriptor() ([]byte, []int) { + return file_acmelib_v1_message_proto_rawDescGZIP(), []int{0} +} + +type MessageSendType int32 + +const ( + MessageSendType_MESSAGE_SEND_TYPE_UNSPECIFIED MessageSendType = 0 + MessageSendType_MESSAGE_SEND_TYPE_CYCLIC MessageSendType = 1 + MessageSendType_MESSAGE_SEND_TYPE_CYCLIC_IF_ACTIVE MessageSendType = 2 + MessageSendType_MESSAGE_SEND_TYPE_CYCLIC_AND_TRIGGERED MessageSendType = 3 + MessageSendType_MESSAGE_SEND_TYPE_CYCLIC_IF_ACTIVE_AND_TRIGGERED MessageSendType = 4 +) + +// Enum value maps for MessageSendType. +var ( + MessageSendType_name = map[int32]string{ + 0: "MESSAGE_SEND_TYPE_UNSPECIFIED", + 1: "MESSAGE_SEND_TYPE_CYCLIC", + 2: "MESSAGE_SEND_TYPE_CYCLIC_IF_ACTIVE", + 3: "MESSAGE_SEND_TYPE_CYCLIC_AND_TRIGGERED", + 4: "MESSAGE_SEND_TYPE_CYCLIC_IF_ACTIVE_AND_TRIGGERED", + } + MessageSendType_value = map[string]int32{ + "MESSAGE_SEND_TYPE_UNSPECIFIED": 0, + "MESSAGE_SEND_TYPE_CYCLIC": 1, + "MESSAGE_SEND_TYPE_CYCLIC_IF_ACTIVE": 2, + "MESSAGE_SEND_TYPE_CYCLIC_AND_TRIGGERED": 3, + "MESSAGE_SEND_TYPE_CYCLIC_IF_ACTIVE_AND_TRIGGERED": 4, + } +) + +func (x MessageSendType) Enum() *MessageSendType { + p := new(MessageSendType) + *p = x + return p +} + +func (x MessageSendType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (MessageSendType) Descriptor() protoreflect.EnumDescriptor { + return file_acmelib_v1_message_proto_enumTypes[1].Descriptor() +} + +func (MessageSendType) Type() protoreflect.EnumType { + return &file_acmelib_v1_message_proto_enumTypes[1] +} + +func (x MessageSendType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use MessageSendType.Descriptor instead. +func (MessageSendType) EnumDescriptor() ([]byte, []int) { + return file_acmelib_v1_message_proto_rawDescGZIP(), []int{1} +} + +type MessageByteOrder int32 + +const ( + MessageByteOrder_MESSAGE_BYTE_ORDER_UNSPECIFIED MessageByteOrder = 0 + MessageByteOrder_MESSAGE_BYTE_ORDER_LITTLE_ENDIAN MessageByteOrder = 1 + MessageByteOrder_MESSAGE_BYTE_ORDER_BIG_ENDIAN MessageByteOrder = 2 +) + +// Enum value maps for MessageByteOrder. +var ( + MessageByteOrder_name = map[int32]string{ + 0: "MESSAGE_BYTE_ORDER_UNSPECIFIED", + 1: "MESSAGE_BYTE_ORDER_LITTLE_ENDIAN", + 2: "MESSAGE_BYTE_ORDER_BIG_ENDIAN", + } + MessageByteOrder_value = map[string]int32{ + "MESSAGE_BYTE_ORDER_UNSPECIFIED": 0, + "MESSAGE_BYTE_ORDER_LITTLE_ENDIAN": 1, + "MESSAGE_BYTE_ORDER_BIG_ENDIAN": 2, + } +) + +func (x MessageByteOrder) Enum() *MessageByteOrder { + p := new(MessageByteOrder) + *p = x + return p +} + +func (x MessageByteOrder) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (MessageByteOrder) Descriptor() protoreflect.EnumDescriptor { + return file_acmelib_v1_message_proto_enumTypes[2].Descriptor() +} + +func (MessageByteOrder) Type() protoreflect.EnumType { + return &file_acmelib_v1_message_proto_enumTypes[2] +} + +func (x MessageByteOrder) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use MessageByteOrder.Descriptor instead. +func (MessageByteOrder) EnumDescriptor() ([]byte, []int) { + return file_acmelib_v1_message_proto_rawDescGZIP(), []int{2} +} + +type Message struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Entity *Entity `protobuf:"bytes,1,opt,name=entity,proto3" json:"entity,omitempty"` + Signals []*Signal `protobuf:"bytes,2,rep,name=signals,proto3" json:"signals,omitempty"` + Payload *SignalPayload `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty"` + SizeByte uint32 `protobuf:"varint,4,opt,name=size_byte,json=sizeByte,proto3" json:"size_byte,omitempty"` + MessageId uint32 `protobuf:"varint,5,opt,name=message_id,json=messageId,proto3" json:"message_id,omitempty"` + StaticCanId uint32 `protobuf:"varint,6,opt,name=static_can_id,json=staticCanId,proto3" json:"static_can_id,omitempty"` + HasStaticCanId bool `protobuf:"varint,7,opt,name=has_static_can_id,json=hasStaticCanId,proto3" json:"has_static_can_id,omitempty"` + Priority MessagePriority `protobuf:"varint,8,opt,name=priority,proto3,enum=acmelib.v1.MessagePriority" json:"priority,omitempty"` + ByteOrder MessageByteOrder `protobuf:"varint,9,opt,name=byte_order,json=byteOrder,proto3,enum=acmelib.v1.MessageByteOrder" json:"byte_order,omitempty"` + CycleTime uint32 `protobuf:"varint,10,opt,name=cycle_time,json=cycleTime,proto3" json:"cycle_time,omitempty"` + SendType MessageSendType `protobuf:"varint,11,opt,name=send_type,json=sendType,proto3,enum=acmelib.v1.MessageSendType" json:"send_type,omitempty"` + DelayTime uint32 `protobuf:"varint,12,opt,name=delay_time,json=delayTime,proto3" json:"delay_time,omitempty"` + StartDelayTime uint32 `protobuf:"varint,13,opt,name=start_delay_time,json=startDelayTime,proto3" json:"start_delay_time,omitempty"` + ReceiverIds []string `protobuf:"bytes,14,rep,name=receiver_ids,json=receiverIds,proto3" json:"receiver_ids,omitempty"` +} + +func (x *Message) Reset() { + *x = Message{} + if protoimpl.UnsafeEnabled { + mi := &file_acmelib_v1_message_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Message) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Message) ProtoMessage() {} + +func (x *Message) ProtoReflect() protoreflect.Message { + mi := &file_acmelib_v1_message_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Message.ProtoReflect.Descriptor instead. +func (*Message) Descriptor() ([]byte, []int) { + return file_acmelib_v1_message_proto_rawDescGZIP(), []int{0} +} + +func (x *Message) GetEntity() *Entity { + if x != nil { + return x.Entity + } + return nil +} + +func (x *Message) GetSignals() []*Signal { + if x != nil { + return x.Signals + } + return nil +} + +func (x *Message) GetPayload() *SignalPayload { + if x != nil { + return x.Payload + } + return nil +} + +func (x *Message) GetSizeByte() uint32 { + if x != nil { + return x.SizeByte + } + return 0 +} + +func (x *Message) GetMessageId() uint32 { + if x != nil { + return x.MessageId + } + return 0 +} + +func (x *Message) GetStaticCanId() uint32 { + if x != nil { + return x.StaticCanId + } + return 0 +} + +func (x *Message) GetHasStaticCanId() bool { + if x != nil { + return x.HasStaticCanId + } + return false +} + +func (x *Message) GetPriority() MessagePriority { + if x != nil { + return x.Priority + } + return MessagePriority_MESSAGE_PRIORITY_UNSPECIFIED +} + +func (x *Message) GetByteOrder() MessageByteOrder { + if x != nil { + return x.ByteOrder + } + return MessageByteOrder_MESSAGE_BYTE_ORDER_UNSPECIFIED +} + +func (x *Message) GetCycleTime() uint32 { + if x != nil { + return x.CycleTime + } + return 0 +} + +func (x *Message) GetSendType() MessageSendType { + if x != nil { + return x.SendType + } + return MessageSendType_MESSAGE_SEND_TYPE_UNSPECIFIED +} + +func (x *Message) GetDelayTime() uint32 { + if x != nil { + return x.DelayTime + } + return 0 +} + +func (x *Message) GetStartDelayTime() uint32 { + if x != nil { + return x.StartDelayTime + } + return 0 +} + +func (x *Message) GetReceiverIds() []string { + if x != nil { + return x.ReceiverIds + } + return nil +} + +var File_acmelib_v1_message_proto protoreflect.FileDescriptor + +var file_acmelib_v1_message_proto_rawDesc = []byte{ + 0x0a, 0x18, 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x61, 0x63, 0x6d, 0x65, + 0x6c, 0x69, 0x62, 0x2e, 0x76, 0x31, 0x1a, 0x17, 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2f, + 0x76, 0x31, 0x2f, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x1f, 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x69, 0x67, 0x6e, + 0x61, 0x6c, 0x5f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x17, 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x69, 0x67, + 0x6e, 0x61, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xde, 0x04, 0x0a, 0x07, 0x4d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2e, + 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x06, 0x65, 0x6e, 0x74, 0x69, 0x74, + 0x79, 0x12, 0x2c, 0x0a, 0x07, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2e, 0x76, 0x31, 0x2e, + 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x52, 0x07, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x73, 0x12, + 0x33, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x19, 0x2e, 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x69, + 0x67, 0x6e, 0x61, 0x6c, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x07, 0x70, 0x61, 0x79, + 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x62, 0x79, 0x74, + 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x73, 0x69, 0x7a, 0x65, 0x42, 0x79, 0x74, + 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x64, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x49, 0x64, + 0x12, 0x22, 0x0a, 0x0d, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x5f, 0x63, 0x61, 0x6e, 0x5f, 0x69, + 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x43, + 0x61, 0x6e, 0x49, 0x64, 0x12, 0x29, 0x0a, 0x11, 0x68, 0x61, 0x73, 0x5f, 0x73, 0x74, 0x61, 0x74, + 0x69, 0x63, 0x5f, 0x63, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x0e, 0x68, 0x61, 0x73, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x43, 0x61, 0x6e, 0x49, 0x64, 0x12, + 0x37, 0x0a, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x1b, 0x2e, 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x4d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x52, 0x08, + 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x3b, 0x0a, 0x0a, 0x62, 0x79, 0x74, 0x65, + 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x61, + 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x42, 0x79, 0x74, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x09, 0x62, 0x79, 0x74, 0x65, + 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x5f, 0x74, + 0x69, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x63, 0x79, 0x63, 0x6c, 0x65, + 0x54, 0x69, 0x6d, 0x65, 0x12, 0x38, 0x0a, 0x09, 0x73, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x79, 0x70, + 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, + 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65, 0x6e, 0x64, + 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x73, 0x65, 0x6e, 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1d, + 0x0a, 0x0a, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0c, 0x20, 0x01, + 0x28, 0x0d, 0x52, 0x09, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x28, 0x0a, + 0x10, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x5f, 0x74, 0x69, 0x6d, + 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0e, 0x73, 0x74, 0x61, 0x72, 0x74, 0x44, 0x65, + 0x6c, 0x61, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x65, 0x63, 0x65, 0x69, + 0x76, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x72, + 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x49, 0x64, 0x73, 0x2a, 0xa5, 0x01, 0x0a, 0x0f, 0x4d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x20, + 0x0a, 0x1c, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x5f, 0x50, 0x52, 0x49, 0x4f, 0x52, 0x49, + 0x54, 0x59, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, + 0x12, 0x1e, 0x0a, 0x1a, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x5f, 0x50, 0x52, 0x49, 0x4f, + 0x52, 0x49, 0x54, 0x59, 0x5f, 0x56, 0x45, 0x52, 0x59, 0x5f, 0x48, 0x49, 0x47, 0x48, 0x10, 0x01, + 0x12, 0x19, 0x0a, 0x15, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x5f, 0x50, 0x52, 0x49, 0x4f, + 0x52, 0x49, 0x54, 0x59, 0x5f, 0x48, 0x49, 0x47, 0x48, 0x10, 0x02, 0x12, 0x1b, 0x0a, 0x17, 0x4d, + 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x5f, 0x50, 0x52, 0x49, 0x4f, 0x52, 0x49, 0x54, 0x59, 0x5f, + 0x4d, 0x45, 0x44, 0x49, 0x55, 0x4d, 0x10, 0x03, 0x12, 0x18, 0x0a, 0x14, 0x4d, 0x45, 0x53, 0x53, + 0x41, 0x47, 0x45, 0x5f, 0x50, 0x52, 0x49, 0x4f, 0x52, 0x49, 0x54, 0x59, 0x5f, 0x4c, 0x4f, 0x57, + 0x10, 0x04, 0x2a, 0xdc, 0x01, 0x0a, 0x0f, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65, + 0x6e, 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x21, 0x0a, 0x1d, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, + 0x45, 0x5f, 0x53, 0x45, 0x4e, 0x44, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, + 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1c, 0x0a, 0x18, 0x4d, 0x45, 0x53, + 0x53, 0x41, 0x47, 0x45, 0x5f, 0x53, 0x45, 0x4e, 0x44, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x43, + 0x59, 0x43, 0x4c, 0x49, 0x43, 0x10, 0x01, 0x12, 0x26, 0x0a, 0x22, 0x4d, 0x45, 0x53, 0x53, 0x41, + 0x47, 0x45, 0x5f, 0x53, 0x45, 0x4e, 0x44, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x43, 0x59, 0x43, + 0x4c, 0x49, 0x43, 0x5f, 0x49, 0x46, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, 0x02, 0x12, + 0x2a, 0x0a, 0x26, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x5f, 0x53, 0x45, 0x4e, 0x44, 0x5f, + 0x54, 0x59, 0x50, 0x45, 0x5f, 0x43, 0x59, 0x43, 0x4c, 0x49, 0x43, 0x5f, 0x41, 0x4e, 0x44, 0x5f, + 0x54, 0x52, 0x49, 0x47, 0x47, 0x45, 0x52, 0x45, 0x44, 0x10, 0x03, 0x12, 0x34, 0x0a, 0x30, 0x4d, + 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x5f, 0x53, 0x45, 0x4e, 0x44, 0x5f, 0x54, 0x59, 0x50, 0x45, + 0x5f, 0x43, 0x59, 0x43, 0x4c, 0x49, 0x43, 0x5f, 0x49, 0x46, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x56, + 0x45, 0x5f, 0x41, 0x4e, 0x44, 0x5f, 0x54, 0x52, 0x49, 0x47, 0x47, 0x45, 0x52, 0x45, 0x44, 0x10, + 0x04, 0x2a, 0x7f, 0x0a, 0x10, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x42, 0x79, 0x74, 0x65, + 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x22, 0x0a, 0x1e, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, + 0x5f, 0x42, 0x59, 0x54, 0x45, 0x5f, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x55, 0x4e, 0x53, 0x50, + 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x24, 0x0a, 0x20, 0x4d, 0x45, 0x53, + 0x53, 0x41, 0x47, 0x45, 0x5f, 0x42, 0x59, 0x54, 0x45, 0x5f, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, + 0x4c, 0x49, 0x54, 0x54, 0x4c, 0x45, 0x5f, 0x45, 0x4e, 0x44, 0x49, 0x41, 0x4e, 0x10, 0x01, 0x12, + 0x21, 0x0a, 0x1d, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x5f, 0x42, 0x59, 0x54, 0x45, 0x5f, + 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x42, 0x49, 0x47, 0x5f, 0x45, 0x4e, 0x44, 0x49, 0x41, 0x4e, + 0x10, 0x02, 0x42, 0x7d, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, + 0x62, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x14, 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2f, 0x76, 0x31, + 0x3b, 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x41, 0x58, 0x58, + 0xaa, 0x02, 0x0a, 0x41, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0a, + 0x41, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x16, 0x41, 0x63, 0x6d, + 0x65, 0x6c, 0x69, 0x62, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0xea, 0x02, 0x0b, 0x41, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x3a, 0x3a, 0x56, + 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_acmelib_v1_message_proto_rawDescOnce sync.Once + file_acmelib_v1_message_proto_rawDescData = file_acmelib_v1_message_proto_rawDesc +) + +func file_acmelib_v1_message_proto_rawDescGZIP() []byte { + file_acmelib_v1_message_proto_rawDescOnce.Do(func() { + file_acmelib_v1_message_proto_rawDescData = protoimpl.X.CompressGZIP(file_acmelib_v1_message_proto_rawDescData) + }) + return file_acmelib_v1_message_proto_rawDescData +} + +var file_acmelib_v1_message_proto_enumTypes = make([]protoimpl.EnumInfo, 3) +var file_acmelib_v1_message_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_acmelib_v1_message_proto_goTypes = []interface{}{ + (MessagePriority)(0), // 0: acmelib.v1.MessagePriority + (MessageSendType)(0), // 1: acmelib.v1.MessageSendType + (MessageByteOrder)(0), // 2: acmelib.v1.MessageByteOrder + (*Message)(nil), // 3: acmelib.v1.Message + (*Entity)(nil), // 4: acmelib.v1.Entity + (*Signal)(nil), // 5: acmelib.v1.Signal + (*SignalPayload)(nil), // 6: acmelib.v1.SignalPayload +} +var file_acmelib_v1_message_proto_depIdxs = []int32{ + 4, // 0: acmelib.v1.Message.entity:type_name -> acmelib.v1.Entity + 5, // 1: acmelib.v1.Message.signals:type_name -> acmelib.v1.Signal + 6, // 2: acmelib.v1.Message.payload:type_name -> acmelib.v1.SignalPayload + 0, // 3: acmelib.v1.Message.priority:type_name -> acmelib.v1.MessagePriority + 2, // 4: acmelib.v1.Message.byte_order:type_name -> acmelib.v1.MessageByteOrder + 1, // 5: acmelib.v1.Message.send_type:type_name -> acmelib.v1.MessageSendType + 6, // [6:6] is the sub-list for method output_type + 6, // [6:6] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name +} + +func init() { file_acmelib_v1_message_proto_init() } +func file_acmelib_v1_message_proto_init() { + if File_acmelib_v1_message_proto != nil { + return + } + file_acmelib_v1_entity_proto_init() + file_acmelib_v1_signal_payload_proto_init() + file_acmelib_v1_signal_proto_init() + if !protoimpl.UnsafeEnabled { + file_acmelib_v1_message_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Message); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_acmelib_v1_message_proto_rawDesc, + NumEnums: 3, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_acmelib_v1_message_proto_goTypes, + DependencyIndexes: file_acmelib_v1_message_proto_depIdxs, + EnumInfos: file_acmelib_v1_message_proto_enumTypes, + MessageInfos: file_acmelib_v1_message_proto_msgTypes, + }.Build() + File_acmelib_v1_message_proto = out.File + file_acmelib_v1_message_proto_rawDesc = nil + file_acmelib_v1_message_proto_goTypes = nil + file_acmelib_v1_message_proto_depIdxs = nil +} diff --git a/proto/gen/go/acmelib/v1/network.pb.go b/proto/gen/go/acmelib/v1/network.pb.go new file mode 100644 index 0000000..b4a7a16 --- /dev/null +++ b/proto/gen/go/acmelib/v1/network.pb.go @@ -0,0 +1,252 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.31.0 +// protoc (unknown) +// source: acmelib/v1/network.proto + +package acmelibv1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type Network struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Entity *Entity `protobuf:"bytes,1,opt,name=entity,proto3" json:"entity,omitempty"` + Buses []*Bus `protobuf:"bytes,2,rep,name=buses,proto3" json:"buses,omitempty"` + CanidBuilders []*CANIDBuilder `protobuf:"bytes,3,rep,name=canid_builders,json=canidBuilders,proto3" json:"canid_builders,omitempty"` + Nodes []*Node `protobuf:"bytes,4,rep,name=nodes,proto3" json:"nodes,omitempty"` + SignalTypes []*SignalType `protobuf:"bytes,5,rep,name=signal_types,json=signalTypes,proto3" json:"signal_types,omitempty"` + SignalUnits []*SignalUnit `protobuf:"bytes,6,rep,name=signal_units,json=signalUnits,proto3" json:"signal_units,omitempty"` + SignalEnums []*SignalEnum `protobuf:"bytes,7,rep,name=signal_enums,json=signalEnums,proto3" json:"signal_enums,omitempty"` +} + +func (x *Network) Reset() { + *x = Network{} + if protoimpl.UnsafeEnabled { + mi := &file_acmelib_v1_network_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Network) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Network) ProtoMessage() {} + +func (x *Network) ProtoReflect() protoreflect.Message { + mi := &file_acmelib_v1_network_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Network.ProtoReflect.Descriptor instead. +func (*Network) Descriptor() ([]byte, []int) { + return file_acmelib_v1_network_proto_rawDescGZIP(), []int{0} +} + +func (x *Network) GetEntity() *Entity { + if x != nil { + return x.Entity + } + return nil +} + +func (x *Network) GetBuses() []*Bus { + if x != nil { + return x.Buses + } + return nil +} + +func (x *Network) GetCanidBuilders() []*CANIDBuilder { + if x != nil { + return x.CanidBuilders + } + return nil +} + +func (x *Network) GetNodes() []*Node { + if x != nil { + return x.Nodes + } + return nil +} + +func (x *Network) GetSignalTypes() []*SignalType { + if x != nil { + return x.SignalTypes + } + return nil +} + +func (x *Network) GetSignalUnits() []*SignalUnit { + if x != nil { + return x.SignalUnits + } + return nil +} + +func (x *Network) GetSignalEnums() []*SignalEnum { + if x != nil { + return x.SignalEnums + } + return nil +} + +var File_acmelib_v1_network_proto protoreflect.FileDescriptor + +var file_acmelib_v1_network_proto_rawDesc = []byte{ + 0x0a, 0x18, 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2f, 0x76, 0x31, 0x2f, 0x6e, 0x65, 0x74, + 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x61, 0x63, 0x6d, 0x65, + 0x6c, 0x69, 0x62, 0x2e, 0x76, 0x31, 0x1a, 0x17, 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2f, + 0x76, 0x31, 0x2f, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x14, 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x75, 0x73, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2f, 0x76, + 0x31, 0x2f, 0x63, 0x61, 0x6e, 0x69, 0x64, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x15, 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2f, 0x76, + 0x31, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x61, 0x63, + 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x61, 0x63, 0x6d, 0x65, + 0x6c, 0x69, 0x62, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x5f, 0x75, 0x6e, + 0x69, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, + 0x62, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x5f, 0x65, 0x6e, 0x75, 0x6d, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf6, 0x02, 0x0a, 0x07, 0x4e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x12, 0x2a, 0x0a, 0x06, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2e, 0x76, 0x31, 0x2e, + 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x06, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x25, + 0x0a, 0x05, 0x62, 0x75, 0x73, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, + 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x73, 0x52, 0x05, + 0x62, 0x75, 0x73, 0x65, 0x73, 0x12, 0x3f, 0x0a, 0x0e, 0x63, 0x61, 0x6e, 0x69, 0x64, 0x5f, 0x62, + 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, + 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x41, 0x4e, 0x49, 0x44, + 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x52, 0x0d, 0x63, 0x61, 0x6e, 0x69, 0x64, 0x42, 0x75, + 0x69, 0x6c, 0x64, 0x65, 0x72, 0x73, 0x12, 0x26, 0x0a, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, + 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2e, + 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x39, + 0x0a, 0x0c, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x05, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2e, 0x76, + 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x73, 0x69, + 0x67, 0x6e, 0x61, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x39, 0x0a, 0x0c, 0x73, 0x69, 0x67, + 0x6e, 0x61, 0x6c, 0x5f, 0x75, 0x6e, 0x69, 0x74, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x16, 0x2e, 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x69, 0x67, + 0x6e, 0x61, 0x6c, 0x55, 0x6e, 0x69, 0x74, 0x52, 0x0b, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x55, + 0x6e, 0x69, 0x74, 0x73, 0x12, 0x39, 0x0a, 0x0c, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x5f, 0x65, + 0x6e, 0x75, 0x6d, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x61, 0x63, 0x6d, + 0x65, 0x6c, 0x69, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x45, 0x6e, + 0x75, 0x6d, 0x52, 0x0b, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x45, 0x6e, 0x75, 0x6d, 0x73, 0x42, + 0x7d, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2e, 0x76, + 0x31, 0x42, 0x0c, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x14, 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2f, 0x76, 0x31, 0x3b, 0x61, 0x63, + 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x41, 0x58, 0x58, 0xaa, 0x02, 0x0a, + 0x41, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0a, 0x41, 0x63, 0x6d, + 0x65, 0x6c, 0x69, 0x62, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x16, 0x41, 0x63, 0x6d, 0x65, 0x6c, 0x69, + 0x62, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0xea, 0x02, 0x0b, 0x41, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_acmelib_v1_network_proto_rawDescOnce sync.Once + file_acmelib_v1_network_proto_rawDescData = file_acmelib_v1_network_proto_rawDesc +) + +func file_acmelib_v1_network_proto_rawDescGZIP() []byte { + file_acmelib_v1_network_proto_rawDescOnce.Do(func() { + file_acmelib_v1_network_proto_rawDescData = protoimpl.X.CompressGZIP(file_acmelib_v1_network_proto_rawDescData) + }) + return file_acmelib_v1_network_proto_rawDescData +} + +var file_acmelib_v1_network_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_acmelib_v1_network_proto_goTypes = []interface{}{ + (*Network)(nil), // 0: acmelib.v1.Network + (*Entity)(nil), // 1: acmelib.v1.Entity + (*Bus)(nil), // 2: acmelib.v1.Bus + (*CANIDBuilder)(nil), // 3: acmelib.v1.CANIDBuilder + (*Node)(nil), // 4: acmelib.v1.Node + (*SignalType)(nil), // 5: acmelib.v1.SignalType + (*SignalUnit)(nil), // 6: acmelib.v1.SignalUnit + (*SignalEnum)(nil), // 7: acmelib.v1.SignalEnum +} +var file_acmelib_v1_network_proto_depIdxs = []int32{ + 1, // 0: acmelib.v1.Network.entity:type_name -> acmelib.v1.Entity + 2, // 1: acmelib.v1.Network.buses:type_name -> acmelib.v1.Bus + 3, // 2: acmelib.v1.Network.canid_builders:type_name -> acmelib.v1.CANIDBuilder + 4, // 3: acmelib.v1.Network.nodes:type_name -> acmelib.v1.Node + 5, // 4: acmelib.v1.Network.signal_types:type_name -> acmelib.v1.SignalType + 6, // 5: acmelib.v1.Network.signal_units:type_name -> acmelib.v1.SignalUnit + 7, // 6: acmelib.v1.Network.signal_enums:type_name -> acmelib.v1.SignalEnum + 7, // [7:7] is the sub-list for method output_type + 7, // [7:7] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name +} + +func init() { file_acmelib_v1_network_proto_init() } +func file_acmelib_v1_network_proto_init() { + if File_acmelib_v1_network_proto != nil { + return + } + file_acmelib_v1_entity_proto_init() + file_acmelib_v1_bus_proto_init() + file_acmelib_v1_canid_builder_proto_init() + file_acmelib_v1_node_proto_init() + file_acmelib_v1_signal_type_proto_init() + file_acmelib_v1_signal_unit_proto_init() + file_acmelib_v1_signal_enum_proto_init() + if !protoimpl.UnsafeEnabled { + file_acmelib_v1_network_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Network); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_acmelib_v1_network_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_acmelib_v1_network_proto_goTypes, + DependencyIndexes: file_acmelib_v1_network_proto_depIdxs, + MessageInfos: file_acmelib_v1_network_proto_msgTypes, + }.Build() + File_acmelib_v1_network_proto = out.File + file_acmelib_v1_network_proto_rawDesc = nil + file_acmelib_v1_network_proto_goTypes = nil + file_acmelib_v1_network_proto_depIdxs = nil +} diff --git a/proto/gen/go/acmelib/v1/node.pb.go b/proto/gen/go/acmelib/v1/node.pb.go new file mode 100644 index 0000000..582e7a8 --- /dev/null +++ b/proto/gen/go/acmelib/v1/node.pb.go @@ -0,0 +1,175 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.31.0 +// protoc (unknown) +// source: acmelib/v1/node.proto + +package acmelibv1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type Node struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Entity *Entity `protobuf:"bytes,1,opt,name=entity,proto3" json:"entity,omitempty"` + NodeId uint32 `protobuf:"varint,2,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"` + InterfaceCount uint32 `protobuf:"varint,3,opt,name=interface_count,json=interfaceCount,proto3" json:"interface_count,omitempty"` +} + +func (x *Node) Reset() { + *x = Node{} + if protoimpl.UnsafeEnabled { + mi := &file_acmelib_v1_node_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Node) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Node) ProtoMessage() {} + +func (x *Node) ProtoReflect() protoreflect.Message { + mi := &file_acmelib_v1_node_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Node.ProtoReflect.Descriptor instead. +func (*Node) Descriptor() ([]byte, []int) { + return file_acmelib_v1_node_proto_rawDescGZIP(), []int{0} +} + +func (x *Node) GetEntity() *Entity { + if x != nil { + return x.Entity + } + return nil +} + +func (x *Node) GetNodeId() uint32 { + if x != nil { + return x.NodeId + } + return 0 +} + +func (x *Node) GetInterfaceCount() uint32 { + if x != nil { + return x.InterfaceCount + } + return 0 +} + +var File_acmelib_v1_node_proto protoreflect.FileDescriptor + +var file_acmelib_v1_node_proto_rawDesc = []byte{ + 0x0a, 0x15, 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2f, 0x76, 0x31, 0x2f, 0x6e, 0x6f, 0x64, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, + 0x2e, 0x76, 0x31, 0x1a, 0x17, 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2f, 0x76, 0x31, 0x2f, + 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x74, 0x0a, 0x04, + 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2e, 0x76, + 0x31, 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x06, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, + 0x12, 0x17, 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0d, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x69, 0x6e, 0x74, + 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0d, 0x52, 0x0e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x75, + 0x6e, 0x74, 0x42, 0x7a, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, + 0x62, 0x2e, 0x76, 0x31, 0x42, 0x09, 0x4e, 0x6f, 0x64, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x14, 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2f, 0x76, 0x31, 0x3b, 0x61, 0x63, + 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x41, 0x58, 0x58, 0xaa, 0x02, 0x0a, + 0x41, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0a, 0x41, 0x63, 0x6d, + 0x65, 0x6c, 0x69, 0x62, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x16, 0x41, 0x63, 0x6d, 0x65, 0x6c, 0x69, + 0x62, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0xea, 0x02, 0x0b, 0x41, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_acmelib_v1_node_proto_rawDescOnce sync.Once + file_acmelib_v1_node_proto_rawDescData = file_acmelib_v1_node_proto_rawDesc +) + +func file_acmelib_v1_node_proto_rawDescGZIP() []byte { + file_acmelib_v1_node_proto_rawDescOnce.Do(func() { + file_acmelib_v1_node_proto_rawDescData = protoimpl.X.CompressGZIP(file_acmelib_v1_node_proto_rawDescData) + }) + return file_acmelib_v1_node_proto_rawDescData +} + +var file_acmelib_v1_node_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_acmelib_v1_node_proto_goTypes = []interface{}{ + (*Node)(nil), // 0: acmelib.v1.Node + (*Entity)(nil), // 1: acmelib.v1.Entity +} +var file_acmelib_v1_node_proto_depIdxs = []int32{ + 1, // 0: acmelib.v1.Node.entity:type_name -> acmelib.v1.Entity + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_acmelib_v1_node_proto_init() } +func file_acmelib_v1_node_proto_init() { + if File_acmelib_v1_node_proto != nil { + return + } + file_acmelib_v1_entity_proto_init() + if !protoimpl.UnsafeEnabled { + file_acmelib_v1_node_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Node); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_acmelib_v1_node_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_acmelib_v1_node_proto_goTypes, + DependencyIndexes: file_acmelib_v1_node_proto_depIdxs, + MessageInfos: file_acmelib_v1_node_proto_msgTypes, + }.Build() + File_acmelib_v1_node_proto = out.File + file_acmelib_v1_node_proto_rawDesc = nil + file_acmelib_v1_node_proto_goTypes = nil + file_acmelib_v1_node_proto_depIdxs = nil +} diff --git a/proto/gen/go/acmelib/v1/node_interface.pb.go b/proto/gen/go/acmelib/v1/node_interface.pb.go new file mode 100644 index 0000000..d5fcd6e --- /dev/null +++ b/proto/gen/go/acmelib/v1/node_interface.pb.go @@ -0,0 +1,239 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.31.0 +// protoc (unknown) +// source: acmelib/v1/node_interface.proto + +package acmelibv1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type NodeInterface struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Entity *Entity `protobuf:"bytes,1,opt,name=entity,proto3" json:"entity,omitempty"` + Messages []*Message `protobuf:"bytes,2,rep,name=messages,proto3" json:"messages,omitempty"` + Number int32 `protobuf:"varint,3,opt,name=number,proto3" json:"number,omitempty"` + // Types that are assignable to Node: + // + // *NodeInterface_EmbeddedNode + // *NodeInterface_NodeEntityId + Node isNodeInterface_Node `protobuf_oneof:"node"` +} + +func (x *NodeInterface) Reset() { + *x = NodeInterface{} + if protoimpl.UnsafeEnabled { + mi := &file_acmelib_v1_node_interface_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NodeInterface) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NodeInterface) ProtoMessage() {} + +func (x *NodeInterface) ProtoReflect() protoreflect.Message { + mi := &file_acmelib_v1_node_interface_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NodeInterface.ProtoReflect.Descriptor instead. +func (*NodeInterface) Descriptor() ([]byte, []int) { + return file_acmelib_v1_node_interface_proto_rawDescGZIP(), []int{0} +} + +func (x *NodeInterface) GetEntity() *Entity { + if x != nil { + return x.Entity + } + return nil +} + +func (x *NodeInterface) GetMessages() []*Message { + if x != nil { + return x.Messages + } + return nil +} + +func (x *NodeInterface) GetNumber() int32 { + if x != nil { + return x.Number + } + return 0 +} + +func (m *NodeInterface) GetNode() isNodeInterface_Node { + if m != nil { + return m.Node + } + return nil +} + +func (x *NodeInterface) GetEmbeddedNode() *Node { + if x, ok := x.GetNode().(*NodeInterface_EmbeddedNode); ok { + return x.EmbeddedNode + } + return nil +} + +func (x *NodeInterface) GetNodeEntityId() string { + if x, ok := x.GetNode().(*NodeInterface_NodeEntityId); ok { + return x.NodeEntityId + } + return "" +} + +type isNodeInterface_Node interface { + isNodeInterface_Node() +} + +type NodeInterface_EmbeddedNode struct { + EmbeddedNode *Node `protobuf:"bytes,4,opt,name=embedded_node,json=embeddedNode,proto3,oneof"` +} + +type NodeInterface_NodeEntityId struct { + NodeEntityId string `protobuf:"bytes,5,opt,name=node_entity_id,json=nodeEntityId,proto3,oneof"` +} + +func (*NodeInterface_EmbeddedNode) isNodeInterface_Node() {} + +func (*NodeInterface_NodeEntityId) isNodeInterface_Node() {} + +var File_acmelib_v1_node_interface_proto protoreflect.FileDescriptor + +var file_acmelib_v1_node_interface_proto_rawDesc = []byte{ + 0x0a, 0x1f, 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2f, 0x76, 0x31, 0x2f, 0x6e, 0x6f, 0x64, + 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x0a, 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2e, 0x76, 0x31, 0x1a, 0x17, 0x61, + 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2f, + 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x15, 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2f, 0x76, 0x31, 0x2f, 0x6e, 0x6f, 0x64, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xed, 0x01, 0x0a, 0x0d, 0x4e, 0x6f, 0x64, 0x65, + 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x65, 0x6e, 0x74, + 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x61, 0x63, 0x6d, 0x65, + 0x6c, 0x69, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x06, 0x65, + 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x2f, 0x0a, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, + 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x08, 0x6d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x37, + 0x0a, 0x0d, 0x65, 0x6d, 0x62, 0x65, 0x64, 0x64, 0x65, 0x64, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2e, + 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x48, 0x00, 0x52, 0x0c, 0x65, 0x6d, 0x62, 0x65, 0x64, + 0x64, 0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x6e, 0x6f, 0x64, 0x65, 0x5f, + 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, + 0x00, 0x52, 0x0c, 0x6e, 0x6f, 0x64, 0x65, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x49, 0x64, 0x42, + 0x06, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x42, 0x83, 0x01, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, + 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2e, 0x76, 0x31, 0x42, 0x12, 0x4e, 0x6f, 0x64, 0x65, + 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x14, 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2f, 0x76, 0x31, 0x3b, 0x61, 0x63, 0x6d, + 0x65, 0x6c, 0x69, 0x62, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x41, 0x58, 0x58, 0xaa, 0x02, 0x0a, 0x41, + 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0a, 0x41, 0x63, 0x6d, 0x65, + 0x6c, 0x69, 0x62, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x16, 0x41, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, + 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, + 0x02, 0x0b, 0x41, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_acmelib_v1_node_interface_proto_rawDescOnce sync.Once + file_acmelib_v1_node_interface_proto_rawDescData = file_acmelib_v1_node_interface_proto_rawDesc +) + +func file_acmelib_v1_node_interface_proto_rawDescGZIP() []byte { + file_acmelib_v1_node_interface_proto_rawDescOnce.Do(func() { + file_acmelib_v1_node_interface_proto_rawDescData = protoimpl.X.CompressGZIP(file_acmelib_v1_node_interface_proto_rawDescData) + }) + return file_acmelib_v1_node_interface_proto_rawDescData +} + +var file_acmelib_v1_node_interface_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_acmelib_v1_node_interface_proto_goTypes = []interface{}{ + (*NodeInterface)(nil), // 0: acmelib.v1.NodeInterface + (*Entity)(nil), // 1: acmelib.v1.Entity + (*Message)(nil), // 2: acmelib.v1.Message + (*Node)(nil), // 3: acmelib.v1.Node +} +var file_acmelib_v1_node_interface_proto_depIdxs = []int32{ + 1, // 0: acmelib.v1.NodeInterface.entity:type_name -> acmelib.v1.Entity + 2, // 1: acmelib.v1.NodeInterface.messages:type_name -> acmelib.v1.Message + 3, // 2: acmelib.v1.NodeInterface.embedded_node:type_name -> acmelib.v1.Node + 3, // [3:3] is the sub-list for method output_type + 3, // [3:3] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name +} + +func init() { file_acmelib_v1_node_interface_proto_init() } +func file_acmelib_v1_node_interface_proto_init() { + if File_acmelib_v1_node_interface_proto != nil { + return + } + file_acmelib_v1_entity_proto_init() + file_acmelib_v1_message_proto_init() + file_acmelib_v1_node_proto_init() + if !protoimpl.UnsafeEnabled { + file_acmelib_v1_node_interface_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NodeInterface); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_acmelib_v1_node_interface_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*NodeInterface_EmbeddedNode)(nil), + (*NodeInterface_NodeEntityId)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_acmelib_v1_node_interface_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_acmelib_v1_node_interface_proto_goTypes, + DependencyIndexes: file_acmelib_v1_node_interface_proto_depIdxs, + MessageInfos: file_acmelib_v1_node_interface_proto_msgTypes, + }.Build() + File_acmelib_v1_node_interface_proto = out.File + file_acmelib_v1_node_interface_proto_rawDesc = nil + file_acmelib_v1_node_interface_proto_goTypes = nil + file_acmelib_v1_node_interface_proto_depIdxs = nil +} diff --git a/proto/gen/go/acmelib/v1/signal.pb.go b/proto/gen/go/acmelib/v1/signal.pb.go new file mode 100644 index 0000000..98d983f --- /dev/null +++ b/proto/gen/go/acmelib/v1/signal.pb.go @@ -0,0 +1,803 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.31.0 +// protoc (unknown) +// source: acmelib/v1/signal.proto + +package acmelibv1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type SignalKind int32 + +const ( + SignalKind_SIGNAL_KIND_UNSPECIFIED SignalKind = 0 + SignalKind_SIGNAL_KIND_STANDARD SignalKind = 1 + SignalKind_SIGNAL_KIND_ENUM SignalKind = 2 + SignalKind_SIGNAL_KIND_MULTIPLEXER SignalKind = 3 +) + +// Enum value maps for SignalKind. +var ( + SignalKind_name = map[int32]string{ + 0: "SIGNAL_KIND_UNSPECIFIED", + 1: "SIGNAL_KIND_STANDARD", + 2: "SIGNAL_KIND_ENUM", + 3: "SIGNAL_KIND_MULTIPLEXER", + } + SignalKind_value = map[string]int32{ + "SIGNAL_KIND_UNSPECIFIED": 0, + "SIGNAL_KIND_STANDARD": 1, + "SIGNAL_KIND_ENUM": 2, + "SIGNAL_KIND_MULTIPLEXER": 3, + } +) + +func (x SignalKind) Enum() *SignalKind { + p := new(SignalKind) + *p = x + return p +} + +func (x SignalKind) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SignalKind) Descriptor() protoreflect.EnumDescriptor { + return file_acmelib_v1_signal_proto_enumTypes[0].Descriptor() +} + +func (SignalKind) Type() protoreflect.EnumType { + return &file_acmelib_v1_signal_proto_enumTypes[0] +} + +func (x SignalKind) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SignalKind.Descriptor instead. +func (SignalKind) EnumDescriptor() ([]byte, []int) { + return file_acmelib_v1_signal_proto_rawDescGZIP(), []int{0} +} + +type SignalSendType int32 + +const ( + SignalSendType_SIGNAL_SEND_TYPE_UNSPECIFIED SignalSendType = 0 + SignalSendType_SIGNAL_SEND_TYPE_CYCLIC SignalSendType = 1 + SignalSendType_SIGNAL_SEND_TYPE_ON_WRITE SignalSendType = 2 + SignalSendType_SIGNAL_SEND_TYPE_ON_WRITE_WITH_REPETITION SignalSendType = 3 + SignalSendType_SIGNAL_SEND_TYPE_ON_CHANGE SignalSendType = 4 + SignalSendType_SIGNAL_SEND_TYPE_ON_CHANGE_WITH_REPETITION SignalSendType = 5 + SignalSendType_SIGNAL_SEND_TYPE_IF_ACTIVE SignalSendType = 6 + SignalSendType_SIGNAL_SEND_TYPE_IF_ACTIVE_WITH_REPETITION SignalSendType = 7 +) + +// Enum value maps for SignalSendType. +var ( + SignalSendType_name = map[int32]string{ + 0: "SIGNAL_SEND_TYPE_UNSPECIFIED", + 1: "SIGNAL_SEND_TYPE_CYCLIC", + 2: "SIGNAL_SEND_TYPE_ON_WRITE", + 3: "SIGNAL_SEND_TYPE_ON_WRITE_WITH_REPETITION", + 4: "SIGNAL_SEND_TYPE_ON_CHANGE", + 5: "SIGNAL_SEND_TYPE_ON_CHANGE_WITH_REPETITION", + 6: "SIGNAL_SEND_TYPE_IF_ACTIVE", + 7: "SIGNAL_SEND_TYPE_IF_ACTIVE_WITH_REPETITION", + } + SignalSendType_value = map[string]int32{ + "SIGNAL_SEND_TYPE_UNSPECIFIED": 0, + "SIGNAL_SEND_TYPE_CYCLIC": 1, + "SIGNAL_SEND_TYPE_ON_WRITE": 2, + "SIGNAL_SEND_TYPE_ON_WRITE_WITH_REPETITION": 3, + "SIGNAL_SEND_TYPE_ON_CHANGE": 4, + "SIGNAL_SEND_TYPE_ON_CHANGE_WITH_REPETITION": 5, + "SIGNAL_SEND_TYPE_IF_ACTIVE": 6, + "SIGNAL_SEND_TYPE_IF_ACTIVE_WITH_REPETITION": 7, + } +) + +func (x SignalSendType) Enum() *SignalSendType { + p := new(SignalSendType) + *p = x + return p +} + +func (x SignalSendType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SignalSendType) Descriptor() protoreflect.EnumDescriptor { + return file_acmelib_v1_signal_proto_enumTypes[1].Descriptor() +} + +func (SignalSendType) Type() protoreflect.EnumType { + return &file_acmelib_v1_signal_proto_enumTypes[1] +} + +func (x SignalSendType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SignalSendType.Descriptor instead. +func (SignalSendType) EnumDescriptor() ([]byte, []int) { + return file_acmelib_v1_signal_proto_rawDescGZIP(), []int{1} +} + +type Signal struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Entity *Entity `protobuf:"bytes,1,opt,name=entity,proto3" json:"entity,omitempty"` + Kind SignalKind `protobuf:"varint,2,opt,name=kind,proto3,enum=acmelib.v1.SignalKind" json:"kind,omitempty"` + SendType SignalSendType `protobuf:"varint,3,opt,name=send_type,json=sendType,proto3,enum=acmelib.v1.SignalSendType" json:"send_type,omitempty"` + StartValue float64 `protobuf:"fixed64,4,opt,name=start_value,json=startValue,proto3" json:"start_value,omitempty"` + // Types that are assignable to Signal: + // + // *Signal_Standard + // *Signal_Enum + // *Signal_Multiplexer + Signal isSignal_Signal `protobuf_oneof:"signal"` +} + +func (x *Signal) Reset() { + *x = Signal{} + if protoimpl.UnsafeEnabled { + mi := &file_acmelib_v1_signal_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Signal) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Signal) ProtoMessage() {} + +func (x *Signal) ProtoReflect() protoreflect.Message { + mi := &file_acmelib_v1_signal_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Signal.ProtoReflect.Descriptor instead. +func (*Signal) Descriptor() ([]byte, []int) { + return file_acmelib_v1_signal_proto_rawDescGZIP(), []int{0} +} + +func (x *Signal) GetEntity() *Entity { + if x != nil { + return x.Entity + } + return nil +} + +func (x *Signal) GetKind() SignalKind { + if x != nil { + return x.Kind + } + return SignalKind_SIGNAL_KIND_UNSPECIFIED +} + +func (x *Signal) GetSendType() SignalSendType { + if x != nil { + return x.SendType + } + return SignalSendType_SIGNAL_SEND_TYPE_UNSPECIFIED +} + +func (x *Signal) GetStartValue() float64 { + if x != nil { + return x.StartValue + } + return 0 +} + +func (m *Signal) GetSignal() isSignal_Signal { + if m != nil { + return m.Signal + } + return nil +} + +func (x *Signal) GetStandard() *StandardSignal { + if x, ok := x.GetSignal().(*Signal_Standard); ok { + return x.Standard + } + return nil +} + +func (x *Signal) GetEnum() *EnumSignal { + if x, ok := x.GetSignal().(*Signal_Enum); ok { + return x.Enum + } + return nil +} + +func (x *Signal) GetMultiplexer() *MultiplexerSignal { + if x, ok := x.GetSignal().(*Signal_Multiplexer); ok { + return x.Multiplexer + } + return nil +} + +type isSignal_Signal interface { + isSignal_Signal() +} + +type Signal_Standard struct { + Standard *StandardSignal `protobuf:"bytes,5,opt,name=standard,proto3,oneof"` +} + +type Signal_Enum struct { + Enum *EnumSignal `protobuf:"bytes,6,opt,name=enum,proto3,oneof"` +} + +type Signal_Multiplexer struct { + Multiplexer *MultiplexerSignal `protobuf:"bytes,7,opt,name=multiplexer,proto3,oneof"` +} + +func (*Signal_Standard) isSignal_Signal() {} + +func (*Signal_Enum) isSignal_Signal() {} + +func (*Signal_Multiplexer) isSignal_Signal() {} + +type StandardSignal struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Type: + // + // *StandardSignal_EmbeddedType + // *StandardSignal_TypeEntityId + Type isStandardSignal_Type `protobuf_oneof:"type"` + // Types that are assignable to Unit: + // + // *StandardSignal_EmbeddedUnit + // *StandardSignal_UnitEntityId + Unit isStandardSignal_Unit `protobuf_oneof:"unit"` +} + +func (x *StandardSignal) Reset() { + *x = StandardSignal{} + if protoimpl.UnsafeEnabled { + mi := &file_acmelib_v1_signal_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StandardSignal) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StandardSignal) ProtoMessage() {} + +func (x *StandardSignal) ProtoReflect() protoreflect.Message { + mi := &file_acmelib_v1_signal_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StandardSignal.ProtoReflect.Descriptor instead. +func (*StandardSignal) Descriptor() ([]byte, []int) { + return file_acmelib_v1_signal_proto_rawDescGZIP(), []int{1} +} + +func (m *StandardSignal) GetType() isStandardSignal_Type { + if m != nil { + return m.Type + } + return nil +} + +func (x *StandardSignal) GetEmbeddedType() *SignalType { + if x, ok := x.GetType().(*StandardSignal_EmbeddedType); ok { + return x.EmbeddedType + } + return nil +} + +func (x *StandardSignal) GetTypeEntityId() string { + if x, ok := x.GetType().(*StandardSignal_TypeEntityId); ok { + return x.TypeEntityId + } + return "" +} + +func (m *StandardSignal) GetUnit() isStandardSignal_Unit { + if m != nil { + return m.Unit + } + return nil +} + +func (x *StandardSignal) GetEmbeddedUnit() *SignalUnit { + if x, ok := x.GetUnit().(*StandardSignal_EmbeddedUnit); ok { + return x.EmbeddedUnit + } + return nil +} + +func (x *StandardSignal) GetUnitEntityId() string { + if x, ok := x.GetUnit().(*StandardSignal_UnitEntityId); ok { + return x.UnitEntityId + } + return "" +} + +type isStandardSignal_Type interface { + isStandardSignal_Type() +} + +type StandardSignal_EmbeddedType struct { + EmbeddedType *SignalType `protobuf:"bytes,1,opt,name=embedded_type,json=embeddedType,proto3,oneof"` +} + +type StandardSignal_TypeEntityId struct { + TypeEntityId string `protobuf:"bytes,2,opt,name=type_entity_id,json=typeEntityId,proto3,oneof"` +} + +func (*StandardSignal_EmbeddedType) isStandardSignal_Type() {} + +func (*StandardSignal_TypeEntityId) isStandardSignal_Type() {} + +type isStandardSignal_Unit interface { + isStandardSignal_Unit() +} + +type StandardSignal_EmbeddedUnit struct { + EmbeddedUnit *SignalUnit `protobuf:"bytes,3,opt,name=embedded_unit,json=embeddedUnit,proto3,oneof"` +} + +type StandardSignal_UnitEntityId struct { + UnitEntityId string `protobuf:"bytes,4,opt,name=unit_entity_id,json=unitEntityId,proto3,oneof"` +} + +func (*StandardSignal_EmbeddedUnit) isStandardSignal_Unit() {} + +func (*StandardSignal_UnitEntityId) isStandardSignal_Unit() {} + +type EnumSignal struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Enum: + // + // *EnumSignal_EmbeddedEnum + // *EnumSignal_EnumEntityId + Enum isEnumSignal_Enum `protobuf_oneof:"enum"` +} + +func (x *EnumSignal) Reset() { + *x = EnumSignal{} + if protoimpl.UnsafeEnabled { + mi := &file_acmelib_v1_signal_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EnumSignal) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EnumSignal) ProtoMessage() {} + +func (x *EnumSignal) ProtoReflect() protoreflect.Message { + mi := &file_acmelib_v1_signal_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EnumSignal.ProtoReflect.Descriptor instead. +func (*EnumSignal) Descriptor() ([]byte, []int) { + return file_acmelib_v1_signal_proto_rawDescGZIP(), []int{2} +} + +func (m *EnumSignal) GetEnum() isEnumSignal_Enum { + if m != nil { + return m.Enum + } + return nil +} + +func (x *EnumSignal) GetEmbeddedEnum() *SignalEnum { + if x, ok := x.GetEnum().(*EnumSignal_EmbeddedEnum); ok { + return x.EmbeddedEnum + } + return nil +} + +func (x *EnumSignal) GetEnumEntityId() string { + if x, ok := x.GetEnum().(*EnumSignal_EnumEntityId); ok { + return x.EnumEntityId + } + return "" +} + +type isEnumSignal_Enum interface { + isEnumSignal_Enum() +} + +type EnumSignal_EmbeddedEnum struct { + EmbeddedEnum *SignalEnum `protobuf:"bytes,1,opt,name=embedded_enum,json=embeddedEnum,proto3,oneof"` +} + +type EnumSignal_EnumEntityId struct { + EnumEntityId string `protobuf:"bytes,2,opt,name=enum_entity_id,json=enumEntityId,proto3,oneof"` +} + +func (*EnumSignal_EmbeddedEnum) isEnumSignal_Enum() {} + +func (*EnumSignal_EnumEntityId) isEnumSignal_Enum() {} + +type MultiplexerSignal struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Signals []*Signal `protobuf:"bytes,1,rep,name=signals,proto3" json:"signals,omitempty"` + FixedSignalEntityIds []string `protobuf:"bytes,2,rep,name=fixed_signal_entity_ids,json=fixedSignalEntityIds,proto3" json:"fixed_signal_entity_ids,omitempty"` + GroupCount uint32 `protobuf:"varint,3,opt,name=group_count,json=groupCount,proto3" json:"group_count,omitempty"` + GroupSize uint32 `protobuf:"varint,4,opt,name=group_size,json=groupSize,proto3" json:"group_size,omitempty"` + Groups []*SignalPayload `protobuf:"bytes,5,rep,name=groups,proto3" json:"groups,omitempty"` +} + +func (x *MultiplexerSignal) Reset() { + *x = MultiplexerSignal{} + if protoimpl.UnsafeEnabled { + mi := &file_acmelib_v1_signal_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MultiplexerSignal) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MultiplexerSignal) ProtoMessage() {} + +func (x *MultiplexerSignal) ProtoReflect() protoreflect.Message { + mi := &file_acmelib_v1_signal_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MultiplexerSignal.ProtoReflect.Descriptor instead. +func (*MultiplexerSignal) Descriptor() ([]byte, []int) { + return file_acmelib_v1_signal_proto_rawDescGZIP(), []int{3} +} + +func (x *MultiplexerSignal) GetSignals() []*Signal { + if x != nil { + return x.Signals + } + return nil +} + +func (x *MultiplexerSignal) GetFixedSignalEntityIds() []string { + if x != nil { + return x.FixedSignalEntityIds + } + return nil +} + +func (x *MultiplexerSignal) GetGroupCount() uint32 { + if x != nil { + return x.GroupCount + } + return 0 +} + +func (x *MultiplexerSignal) GetGroupSize() uint32 { + if x != nil { + return x.GroupSize + } + return 0 +} + +func (x *MultiplexerSignal) GetGroups() []*SignalPayload { + if x != nil { + return x.Groups + } + return nil +} + +var File_acmelib_v1_signal_proto protoreflect.FileDescriptor + +var file_acmelib_v1_signal_proto_rawDesc = []byte{ + 0x0a, 0x17, 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x69, 0x67, + 0x6e, 0x61, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x61, 0x63, 0x6d, 0x65, 0x6c, + 0x69, 0x62, 0x2e, 0x76, 0x31, 0x1a, 0x17, 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2f, 0x76, + 0x31, 0x2f, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, + 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x69, 0x67, 0x6e, 0x61, + 0x6c, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x61, 0x63, + 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x5f, + 0x75, 0x6e, 0x69, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x61, 0x63, 0x6d, 0x65, + 0x6c, 0x69, 0x62, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x5f, 0x65, 0x6e, + 0x75, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, + 0x62, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x5f, 0x70, 0x61, 0x79, 0x6c, + 0x6f, 0x61, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xef, 0x02, 0x0a, 0x06, 0x53, 0x69, + 0x67, 0x6e, 0x61, 0x6c, 0x12, 0x2a, 0x0a, 0x06, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2e, 0x76, + 0x31, 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x06, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, + 0x12, 0x2a, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, + 0x2e, 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, + 0x61, 0x6c, 0x4b, 0x69, 0x6e, 0x64, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x37, 0x0a, 0x09, + 0x73, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x1a, 0x2e, 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x69, 0x67, + 0x6e, 0x61, 0x6c, 0x53, 0x65, 0x6e, 0x64, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x73, 0x65, 0x6e, + 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x72, + 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x38, 0x0a, 0x08, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x61, + 0x72, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x61, 0x63, 0x6d, 0x65, 0x6c, + 0x69, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x53, 0x69, + 0x67, 0x6e, 0x61, 0x6c, 0x48, 0x00, 0x52, 0x08, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, + 0x12, 0x2c, 0x0a, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, + 0x2e, 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x75, 0x6d, + 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x48, 0x00, 0x52, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x12, 0x41, + 0x0a, 0x0b, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x78, 0x65, 0x72, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2e, 0x76, 0x31, + 0x2e, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x78, 0x65, 0x72, 0x53, 0x69, 0x67, 0x6e, + 0x61, 0x6c, 0x48, 0x00, 0x52, 0x0b, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x78, 0x65, + 0x72, 0x42, 0x08, 0x0a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x22, 0xee, 0x01, 0x0a, 0x0e, + 0x53, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x12, 0x3d, + 0x0a, 0x0d, 0x65, 0x6d, 0x62, 0x65, 0x64, 0x64, 0x65, 0x64, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2e, + 0x76, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x48, 0x00, 0x52, + 0x0c, 0x65, 0x6d, 0x62, 0x65, 0x64, 0x64, 0x65, 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x26, 0x0a, + 0x0e, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0c, 0x74, 0x79, 0x70, 0x65, 0x45, 0x6e, 0x74, + 0x69, 0x74, 0x79, 0x49, 0x64, 0x12, 0x3d, 0x0a, 0x0d, 0x65, 0x6d, 0x62, 0x65, 0x64, 0x64, 0x65, + 0x64, 0x5f, 0x75, 0x6e, 0x69, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x61, + 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, + 0x55, 0x6e, 0x69, 0x74, 0x48, 0x01, 0x52, 0x0c, 0x65, 0x6d, 0x62, 0x65, 0x64, 0x64, 0x65, 0x64, + 0x55, 0x6e, 0x69, 0x74, 0x12, 0x26, 0x0a, 0x0e, 0x75, 0x6e, 0x69, 0x74, 0x5f, 0x65, 0x6e, 0x74, + 0x69, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x0c, + 0x75, 0x6e, 0x69, 0x74, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x49, 0x64, 0x42, 0x06, 0x0a, 0x04, + 0x74, 0x79, 0x70, 0x65, 0x42, 0x06, 0x0a, 0x04, 0x75, 0x6e, 0x69, 0x74, 0x22, 0x7b, 0x0a, 0x0a, + 0x45, 0x6e, 0x75, 0x6d, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x12, 0x3d, 0x0a, 0x0d, 0x65, 0x6d, + 0x62, 0x65, 0x64, 0x64, 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x16, 0x2e, 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x53, + 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x0c, 0x65, 0x6d, 0x62, + 0x65, 0x64, 0x64, 0x65, 0x64, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x26, 0x0a, 0x0e, 0x65, 0x6e, 0x75, + 0x6d, 0x5f, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x48, 0x00, 0x52, 0x0c, 0x65, 0x6e, 0x75, 0x6d, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x49, + 0x64, 0x42, 0x06, 0x0a, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x22, 0xeb, 0x01, 0x0a, 0x11, 0x4d, 0x75, + 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x78, 0x65, 0x72, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x12, + 0x2c, 0x0a, 0x07, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x12, 0x2e, 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x69, + 0x67, 0x6e, 0x61, 0x6c, 0x52, 0x07, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x73, 0x12, 0x35, 0x0a, + 0x17, 0x66, 0x69, 0x78, 0x65, 0x64, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x5f, 0x65, 0x6e, + 0x74, 0x69, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x14, + 0x66, 0x69, 0x78, 0x65, 0x64, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x45, 0x6e, 0x74, 0x69, 0x74, + 0x79, 0x49, 0x64, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x67, 0x72, 0x6f, 0x75, 0x70, + 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x73, + 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x67, 0x72, 0x6f, 0x75, 0x70, + 0x53, 0x69, 0x7a, 0x65, 0x12, 0x31, 0x0a, 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x18, 0x05, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2e, 0x76, + 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, + 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2a, 0x76, 0x0a, 0x0a, 0x53, 0x69, 0x67, 0x6e, 0x61, + 0x6c, 0x4b, 0x69, 0x6e, 0x64, 0x12, 0x1b, 0x0a, 0x17, 0x53, 0x49, 0x47, 0x4e, 0x41, 0x4c, 0x5f, + 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, + 0x10, 0x00, 0x12, 0x18, 0x0a, 0x14, 0x53, 0x49, 0x47, 0x4e, 0x41, 0x4c, 0x5f, 0x4b, 0x49, 0x4e, + 0x44, 0x5f, 0x53, 0x54, 0x41, 0x4e, 0x44, 0x41, 0x52, 0x44, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, + 0x53, 0x49, 0x47, 0x4e, 0x41, 0x4c, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x45, 0x4e, 0x55, 0x4d, + 0x10, 0x02, 0x12, 0x1b, 0x0a, 0x17, 0x53, 0x49, 0x47, 0x4e, 0x41, 0x4c, 0x5f, 0x4b, 0x49, 0x4e, + 0x44, 0x5f, 0x4d, 0x55, 0x4c, 0x54, 0x49, 0x50, 0x4c, 0x45, 0x58, 0x45, 0x52, 0x10, 0x03, 0x2a, + 0xbd, 0x02, 0x0a, 0x0e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x53, 0x65, 0x6e, 0x64, 0x54, 0x79, + 0x70, 0x65, 0x12, 0x20, 0x0a, 0x1c, 0x53, 0x49, 0x47, 0x4e, 0x41, 0x4c, 0x5f, 0x53, 0x45, 0x4e, + 0x44, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, + 0x45, 0x44, 0x10, 0x00, 0x12, 0x1b, 0x0a, 0x17, 0x53, 0x49, 0x47, 0x4e, 0x41, 0x4c, 0x5f, 0x53, + 0x45, 0x4e, 0x44, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x43, 0x59, 0x43, 0x4c, 0x49, 0x43, 0x10, + 0x01, 0x12, 0x1d, 0x0a, 0x19, 0x53, 0x49, 0x47, 0x4e, 0x41, 0x4c, 0x5f, 0x53, 0x45, 0x4e, 0x44, + 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4f, 0x4e, 0x5f, 0x57, 0x52, 0x49, 0x54, 0x45, 0x10, 0x02, + 0x12, 0x2d, 0x0a, 0x29, 0x53, 0x49, 0x47, 0x4e, 0x41, 0x4c, 0x5f, 0x53, 0x45, 0x4e, 0x44, 0x5f, + 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4f, 0x4e, 0x5f, 0x57, 0x52, 0x49, 0x54, 0x45, 0x5f, 0x57, 0x49, + 0x54, 0x48, 0x5f, 0x52, 0x45, 0x50, 0x45, 0x54, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x03, 0x12, + 0x1e, 0x0a, 0x1a, 0x53, 0x49, 0x47, 0x4e, 0x41, 0x4c, 0x5f, 0x53, 0x45, 0x4e, 0x44, 0x5f, 0x54, + 0x59, 0x50, 0x45, 0x5f, 0x4f, 0x4e, 0x5f, 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x10, 0x04, 0x12, + 0x2e, 0x0a, 0x2a, 0x53, 0x49, 0x47, 0x4e, 0x41, 0x4c, 0x5f, 0x53, 0x45, 0x4e, 0x44, 0x5f, 0x54, + 0x59, 0x50, 0x45, 0x5f, 0x4f, 0x4e, 0x5f, 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x5f, 0x57, 0x49, + 0x54, 0x48, 0x5f, 0x52, 0x45, 0x50, 0x45, 0x54, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x05, 0x12, + 0x1e, 0x0a, 0x1a, 0x53, 0x49, 0x47, 0x4e, 0x41, 0x4c, 0x5f, 0x53, 0x45, 0x4e, 0x44, 0x5f, 0x54, + 0x59, 0x50, 0x45, 0x5f, 0x49, 0x46, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, 0x06, 0x12, + 0x2e, 0x0a, 0x2a, 0x53, 0x49, 0x47, 0x4e, 0x41, 0x4c, 0x5f, 0x53, 0x45, 0x4e, 0x44, 0x5f, 0x54, + 0x59, 0x50, 0x45, 0x5f, 0x49, 0x46, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x5f, 0x57, 0x49, + 0x54, 0x48, 0x5f, 0x52, 0x45, 0x50, 0x45, 0x54, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x07, 0x42, + 0x7c, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2e, 0x76, + 0x31, 0x42, 0x0b, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x14, 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2f, 0x76, 0x31, 0x3b, 0x61, 0x63, 0x6d, + 0x65, 0x6c, 0x69, 0x62, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x41, 0x58, 0x58, 0xaa, 0x02, 0x0a, 0x41, + 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0a, 0x41, 0x63, 0x6d, 0x65, + 0x6c, 0x69, 0x62, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x16, 0x41, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, + 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, + 0x02, 0x0b, 0x41, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_acmelib_v1_signal_proto_rawDescOnce sync.Once + file_acmelib_v1_signal_proto_rawDescData = file_acmelib_v1_signal_proto_rawDesc +) + +func file_acmelib_v1_signal_proto_rawDescGZIP() []byte { + file_acmelib_v1_signal_proto_rawDescOnce.Do(func() { + file_acmelib_v1_signal_proto_rawDescData = protoimpl.X.CompressGZIP(file_acmelib_v1_signal_proto_rawDescData) + }) + return file_acmelib_v1_signal_proto_rawDescData +} + +var file_acmelib_v1_signal_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_acmelib_v1_signal_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_acmelib_v1_signal_proto_goTypes = []interface{}{ + (SignalKind)(0), // 0: acmelib.v1.SignalKind + (SignalSendType)(0), // 1: acmelib.v1.SignalSendType + (*Signal)(nil), // 2: acmelib.v1.Signal + (*StandardSignal)(nil), // 3: acmelib.v1.StandardSignal + (*EnumSignal)(nil), // 4: acmelib.v1.EnumSignal + (*MultiplexerSignal)(nil), // 5: acmelib.v1.MultiplexerSignal + (*Entity)(nil), // 6: acmelib.v1.Entity + (*SignalType)(nil), // 7: acmelib.v1.SignalType + (*SignalUnit)(nil), // 8: acmelib.v1.SignalUnit + (*SignalEnum)(nil), // 9: acmelib.v1.SignalEnum + (*SignalPayload)(nil), // 10: acmelib.v1.SignalPayload +} +var file_acmelib_v1_signal_proto_depIdxs = []int32{ + 6, // 0: acmelib.v1.Signal.entity:type_name -> acmelib.v1.Entity + 0, // 1: acmelib.v1.Signal.kind:type_name -> acmelib.v1.SignalKind + 1, // 2: acmelib.v1.Signal.send_type:type_name -> acmelib.v1.SignalSendType + 3, // 3: acmelib.v1.Signal.standard:type_name -> acmelib.v1.StandardSignal + 4, // 4: acmelib.v1.Signal.enum:type_name -> acmelib.v1.EnumSignal + 5, // 5: acmelib.v1.Signal.multiplexer:type_name -> acmelib.v1.MultiplexerSignal + 7, // 6: acmelib.v1.StandardSignal.embedded_type:type_name -> acmelib.v1.SignalType + 8, // 7: acmelib.v1.StandardSignal.embedded_unit:type_name -> acmelib.v1.SignalUnit + 9, // 8: acmelib.v1.EnumSignal.embedded_enum:type_name -> acmelib.v1.SignalEnum + 2, // 9: acmelib.v1.MultiplexerSignal.signals:type_name -> acmelib.v1.Signal + 10, // 10: acmelib.v1.MultiplexerSignal.groups:type_name -> acmelib.v1.SignalPayload + 11, // [11:11] is the sub-list for method output_type + 11, // [11:11] is the sub-list for method input_type + 11, // [11:11] is the sub-list for extension type_name + 11, // [11:11] is the sub-list for extension extendee + 0, // [0:11] is the sub-list for field type_name +} + +func init() { file_acmelib_v1_signal_proto_init() } +func file_acmelib_v1_signal_proto_init() { + if File_acmelib_v1_signal_proto != nil { + return + } + file_acmelib_v1_entity_proto_init() + file_acmelib_v1_signal_type_proto_init() + file_acmelib_v1_signal_unit_proto_init() + file_acmelib_v1_signal_enum_proto_init() + file_acmelib_v1_signal_payload_proto_init() + if !protoimpl.UnsafeEnabled { + file_acmelib_v1_signal_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Signal); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_acmelib_v1_signal_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StandardSignal); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_acmelib_v1_signal_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EnumSignal); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_acmelib_v1_signal_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MultiplexerSignal); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_acmelib_v1_signal_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*Signal_Standard)(nil), + (*Signal_Enum)(nil), + (*Signal_Multiplexer)(nil), + } + file_acmelib_v1_signal_proto_msgTypes[1].OneofWrappers = []interface{}{ + (*StandardSignal_EmbeddedType)(nil), + (*StandardSignal_TypeEntityId)(nil), + (*StandardSignal_EmbeddedUnit)(nil), + (*StandardSignal_UnitEntityId)(nil), + } + file_acmelib_v1_signal_proto_msgTypes[2].OneofWrappers = []interface{}{ + (*EnumSignal_EmbeddedEnum)(nil), + (*EnumSignal_EnumEntityId)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_acmelib_v1_signal_proto_rawDesc, + NumEnums: 2, + NumMessages: 4, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_acmelib_v1_signal_proto_goTypes, + DependencyIndexes: file_acmelib_v1_signal_proto_depIdxs, + EnumInfos: file_acmelib_v1_signal_proto_enumTypes, + MessageInfos: file_acmelib_v1_signal_proto_msgTypes, + }.Build() + File_acmelib_v1_signal_proto = out.File + file_acmelib_v1_signal_proto_rawDesc = nil + file_acmelib_v1_signal_proto_goTypes = nil + file_acmelib_v1_signal_proto_depIdxs = nil +} diff --git a/proto/gen/go/acmelib/v1/signal_enum.pb.go b/proto/gen/go/acmelib/v1/signal_enum.pb.go new file mode 100644 index 0000000..7508ad4 --- /dev/null +++ b/proto/gen/go/acmelib/v1/signal_enum.pb.go @@ -0,0 +1,252 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.31.0 +// protoc (unknown) +// source: acmelib/v1/signal_enum.proto + +package acmelibv1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type SignalEnum struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Entity *Entity `protobuf:"bytes,1,opt,name=entity,proto3" json:"entity,omitempty"` + Values []*SignalEnumValue `protobuf:"bytes,2,rep,name=values,proto3" json:"values,omitempty"` + MinSize uint32 `protobuf:"varint,3,opt,name=min_size,json=minSize,proto3" json:"min_size,omitempty"` +} + +func (x *SignalEnum) Reset() { + *x = SignalEnum{} + if protoimpl.UnsafeEnabled { + mi := &file_acmelib_v1_signal_enum_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SignalEnum) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SignalEnum) ProtoMessage() {} + +func (x *SignalEnum) ProtoReflect() protoreflect.Message { + mi := &file_acmelib_v1_signal_enum_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SignalEnum.ProtoReflect.Descriptor instead. +func (*SignalEnum) Descriptor() ([]byte, []int) { + return file_acmelib_v1_signal_enum_proto_rawDescGZIP(), []int{0} +} + +func (x *SignalEnum) GetEntity() *Entity { + if x != nil { + return x.Entity + } + return nil +} + +func (x *SignalEnum) GetValues() []*SignalEnumValue { + if x != nil { + return x.Values + } + return nil +} + +func (x *SignalEnum) GetMinSize() uint32 { + if x != nil { + return x.MinSize + } + return 0 +} + +type SignalEnumValue struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Entity *Entity `protobuf:"bytes,1,opt,name=entity,proto3" json:"entity,omitempty"` + Index uint32 `protobuf:"varint,2,opt,name=index,proto3" json:"index,omitempty"` +} + +func (x *SignalEnumValue) Reset() { + *x = SignalEnumValue{} + if protoimpl.UnsafeEnabled { + mi := &file_acmelib_v1_signal_enum_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SignalEnumValue) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SignalEnumValue) ProtoMessage() {} + +func (x *SignalEnumValue) ProtoReflect() protoreflect.Message { + mi := &file_acmelib_v1_signal_enum_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SignalEnumValue.ProtoReflect.Descriptor instead. +func (*SignalEnumValue) Descriptor() ([]byte, []int) { + return file_acmelib_v1_signal_enum_proto_rawDescGZIP(), []int{1} +} + +func (x *SignalEnumValue) GetEntity() *Entity { + if x != nil { + return x.Entity + } + return nil +} + +func (x *SignalEnumValue) GetIndex() uint32 { + if x != nil { + return x.Index + } + return 0 +} + +var File_acmelib_v1_signal_enum_proto protoreflect.FileDescriptor + +var file_acmelib_v1_signal_enum_proto_rawDesc = []byte{ + 0x0a, 0x1c, 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x69, 0x67, + 0x6e, 0x61, 0x6c, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, + 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2e, 0x76, 0x31, 0x1a, 0x17, 0x61, 0x63, 0x6d, 0x65, + 0x6c, 0x69, 0x62, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x22, 0x88, 0x01, 0x0a, 0x0a, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x45, 0x6e, + 0x75, 0x6d, 0x12, 0x2a, 0x0a, 0x06, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2e, 0x76, 0x31, 0x2e, + 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x06, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x33, + 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, + 0x2e, 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, + 0x61, 0x6c, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x6d, 0x69, 0x6e, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x6d, 0x69, 0x6e, 0x53, 0x69, 0x7a, 0x65, 0x22, 0x53, + 0x0a, 0x0f, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x12, 0x2e, 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x45, + 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x06, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x14, 0x0a, + 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x69, 0x6e, + 0x64, 0x65, 0x78, 0x42, 0x80, 0x01, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x63, 0x6d, 0x65, + 0x6c, 0x69, 0x62, 0x2e, 0x76, 0x31, 0x42, 0x0f, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x45, 0x6e, + 0x75, 0x6d, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x14, 0x61, 0x63, 0x6d, 0x65, 0x6c, + 0x69, 0x62, 0x2f, 0x76, 0x31, 0x3b, 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x76, 0x31, 0xa2, + 0x02, 0x03, 0x41, 0x58, 0x58, 0xaa, 0x02, 0x0a, 0x41, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2e, + 0x56, 0x31, 0xca, 0x02, 0x0a, 0x41, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x5c, 0x56, 0x31, 0xe2, + 0x02, 0x16, 0x41, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0b, 0x41, 0x63, 0x6d, 0x65, 0x6c, + 0x69, 0x62, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_acmelib_v1_signal_enum_proto_rawDescOnce sync.Once + file_acmelib_v1_signal_enum_proto_rawDescData = file_acmelib_v1_signal_enum_proto_rawDesc +) + +func file_acmelib_v1_signal_enum_proto_rawDescGZIP() []byte { + file_acmelib_v1_signal_enum_proto_rawDescOnce.Do(func() { + file_acmelib_v1_signal_enum_proto_rawDescData = protoimpl.X.CompressGZIP(file_acmelib_v1_signal_enum_proto_rawDescData) + }) + return file_acmelib_v1_signal_enum_proto_rawDescData +} + +var file_acmelib_v1_signal_enum_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_acmelib_v1_signal_enum_proto_goTypes = []interface{}{ + (*SignalEnum)(nil), // 0: acmelib.v1.SignalEnum + (*SignalEnumValue)(nil), // 1: acmelib.v1.SignalEnumValue + (*Entity)(nil), // 2: acmelib.v1.Entity +} +var file_acmelib_v1_signal_enum_proto_depIdxs = []int32{ + 2, // 0: acmelib.v1.SignalEnum.entity:type_name -> acmelib.v1.Entity + 1, // 1: acmelib.v1.SignalEnum.values:type_name -> acmelib.v1.SignalEnumValue + 2, // 2: acmelib.v1.SignalEnumValue.entity:type_name -> acmelib.v1.Entity + 3, // [3:3] is the sub-list for method output_type + 3, // [3:3] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name +} + +func init() { file_acmelib_v1_signal_enum_proto_init() } +func file_acmelib_v1_signal_enum_proto_init() { + if File_acmelib_v1_signal_enum_proto != nil { + return + } + file_acmelib_v1_entity_proto_init() + if !protoimpl.UnsafeEnabled { + file_acmelib_v1_signal_enum_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SignalEnum); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_acmelib_v1_signal_enum_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SignalEnumValue); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_acmelib_v1_signal_enum_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_acmelib_v1_signal_enum_proto_goTypes, + DependencyIndexes: file_acmelib_v1_signal_enum_proto_depIdxs, + MessageInfos: file_acmelib_v1_signal_enum_proto_msgTypes, + }.Build() + File_acmelib_v1_signal_enum_proto = out.File + file_acmelib_v1_signal_enum_proto_rawDesc = nil + file_acmelib_v1_signal_enum_proto_goTypes = nil + file_acmelib_v1_signal_enum_proto_depIdxs = nil +} diff --git a/proto/gen/go/acmelib/v1/signal_payload.pb.go b/proto/gen/go/acmelib/v1/signal_payload.pb.go new file mode 100644 index 0000000..8858c2e --- /dev/null +++ b/proto/gen/go/acmelib/v1/signal_payload.pb.go @@ -0,0 +1,227 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.31.0 +// protoc (unknown) +// source: acmelib/v1/signal_payload.proto + +package acmelibv1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type SignalPayloadRef struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SignalEntityId string `protobuf:"bytes,1,opt,name=signal_entity_id,json=signalEntityId,proto3" json:"signal_entity_id,omitempty"` + StartBit uint32 `protobuf:"varint,2,opt,name=start_bit,json=startBit,proto3" json:"start_bit,omitempty"` +} + +func (x *SignalPayloadRef) Reset() { + *x = SignalPayloadRef{} + if protoimpl.UnsafeEnabled { + mi := &file_acmelib_v1_signal_payload_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SignalPayloadRef) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SignalPayloadRef) ProtoMessage() {} + +func (x *SignalPayloadRef) ProtoReflect() protoreflect.Message { + mi := &file_acmelib_v1_signal_payload_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SignalPayloadRef.ProtoReflect.Descriptor instead. +func (*SignalPayloadRef) Descriptor() ([]byte, []int) { + return file_acmelib_v1_signal_payload_proto_rawDescGZIP(), []int{0} +} + +func (x *SignalPayloadRef) GetSignalEntityId() string { + if x != nil { + return x.SignalEntityId + } + return "" +} + +func (x *SignalPayloadRef) GetStartBit() uint32 { + if x != nil { + return x.StartBit + } + return 0 +} + +type SignalPayload struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Refs []*SignalPayloadRef `protobuf:"bytes,1,rep,name=refs,proto3" json:"refs,omitempty"` +} + +func (x *SignalPayload) Reset() { + *x = SignalPayload{} + if protoimpl.UnsafeEnabled { + mi := &file_acmelib_v1_signal_payload_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SignalPayload) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SignalPayload) ProtoMessage() {} + +func (x *SignalPayload) ProtoReflect() protoreflect.Message { + mi := &file_acmelib_v1_signal_payload_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SignalPayload.ProtoReflect.Descriptor instead. +func (*SignalPayload) Descriptor() ([]byte, []int) { + return file_acmelib_v1_signal_payload_proto_rawDescGZIP(), []int{1} +} + +func (x *SignalPayload) GetRefs() []*SignalPayloadRef { + if x != nil { + return x.Refs + } + return nil +} + +var File_acmelib_v1_signal_payload_proto protoreflect.FileDescriptor + +var file_acmelib_v1_signal_payload_proto_rawDesc = []byte{ + 0x0a, 0x1f, 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x69, 0x67, + 0x6e, 0x61, 0x6c, 0x5f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x0a, 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2e, 0x76, 0x31, 0x22, 0x59, 0x0a, + 0x10, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, + 0x66, 0x12, 0x28, 0x0a, 0x10, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x5f, 0x65, 0x6e, 0x74, 0x69, + 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x73, 0x69, 0x67, + 0x6e, 0x61, 0x6c, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x73, + 0x74, 0x61, 0x72, 0x74, 0x5f, 0x62, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, + 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x69, 0x74, 0x22, 0x41, 0x0a, 0x0d, 0x53, 0x69, 0x67, 0x6e, + 0x61, 0x6c, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x30, 0x0a, 0x04, 0x72, 0x65, 0x66, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, + 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x50, 0x61, 0x79, 0x6c, 0x6f, + 0x61, 0x64, 0x52, 0x65, 0x66, 0x52, 0x04, 0x72, 0x65, 0x66, 0x73, 0x42, 0x83, 0x01, 0x0a, 0x0e, + 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2e, 0x76, 0x31, 0x42, 0x12, + 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x14, 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2f, 0x76, 0x31, + 0x3b, 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x41, 0x58, 0x58, + 0xaa, 0x02, 0x0a, 0x41, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0a, + 0x41, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x16, 0x41, 0x63, 0x6d, + 0x65, 0x6c, 0x69, 0x62, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0xea, 0x02, 0x0b, 0x41, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x3a, 0x3a, 0x56, + 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_acmelib_v1_signal_payload_proto_rawDescOnce sync.Once + file_acmelib_v1_signal_payload_proto_rawDescData = file_acmelib_v1_signal_payload_proto_rawDesc +) + +func file_acmelib_v1_signal_payload_proto_rawDescGZIP() []byte { + file_acmelib_v1_signal_payload_proto_rawDescOnce.Do(func() { + file_acmelib_v1_signal_payload_proto_rawDescData = protoimpl.X.CompressGZIP(file_acmelib_v1_signal_payload_proto_rawDescData) + }) + return file_acmelib_v1_signal_payload_proto_rawDescData +} + +var file_acmelib_v1_signal_payload_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_acmelib_v1_signal_payload_proto_goTypes = []interface{}{ + (*SignalPayloadRef)(nil), // 0: acmelib.v1.SignalPayloadRef + (*SignalPayload)(nil), // 1: acmelib.v1.SignalPayload +} +var file_acmelib_v1_signal_payload_proto_depIdxs = []int32{ + 0, // 0: acmelib.v1.SignalPayload.refs:type_name -> acmelib.v1.SignalPayloadRef + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_acmelib_v1_signal_payload_proto_init() } +func file_acmelib_v1_signal_payload_proto_init() { + if File_acmelib_v1_signal_payload_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_acmelib_v1_signal_payload_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SignalPayloadRef); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_acmelib_v1_signal_payload_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SignalPayload); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_acmelib_v1_signal_payload_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_acmelib_v1_signal_payload_proto_goTypes, + DependencyIndexes: file_acmelib_v1_signal_payload_proto_depIdxs, + MessageInfos: file_acmelib_v1_signal_payload_proto_msgTypes, + }.Build() + File_acmelib_v1_signal_payload_proto = out.File + file_acmelib_v1_signal_payload_proto_rawDesc = nil + file_acmelib_v1_signal_payload_proto_goTypes = nil + file_acmelib_v1_signal_payload_proto_depIdxs = nil +} diff --git a/proto/gen/go/acmelib/v1/signal_type.pb.go b/proto/gen/go/acmelib/v1/signal_type.pb.go new file mode 100644 index 0000000..558105c --- /dev/null +++ b/proto/gen/go/acmelib/v1/signal_type.pb.go @@ -0,0 +1,156 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.31.0 +// protoc (unknown) +// source: acmelib/v1/signal_type.proto + +package acmelibv1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type SignalType struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Entity *Entity `protobuf:"bytes,1,opt,name=entity,proto3" json:"entity,omitempty"` +} + +func (x *SignalType) Reset() { + *x = SignalType{} + if protoimpl.UnsafeEnabled { + mi := &file_acmelib_v1_signal_type_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SignalType) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SignalType) ProtoMessage() {} + +func (x *SignalType) ProtoReflect() protoreflect.Message { + mi := &file_acmelib_v1_signal_type_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SignalType.ProtoReflect.Descriptor instead. +func (*SignalType) Descriptor() ([]byte, []int) { + return file_acmelib_v1_signal_type_proto_rawDescGZIP(), []int{0} +} + +func (x *SignalType) GetEntity() *Entity { + if x != nil { + return x.Entity + } + return nil +} + +var File_acmelib_v1_signal_type_proto protoreflect.FileDescriptor + +var file_acmelib_v1_signal_type_proto_rawDesc = []byte{ + 0x0a, 0x1c, 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x69, 0x67, + 0x6e, 0x61, 0x6c, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, + 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2e, 0x76, 0x31, 0x1a, 0x17, 0x61, 0x63, 0x6d, 0x65, + 0x6c, 0x69, 0x62, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x22, 0x38, 0x0a, 0x0a, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x12, 0x2e, 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x45, + 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x06, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x42, 0x80, 0x01, + 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2e, 0x76, 0x31, + 0x42, 0x0f, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x14, 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2f, 0x76, 0x31, 0x3b, + 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x41, 0x58, 0x58, 0xaa, + 0x02, 0x0a, 0x41, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0a, 0x41, + 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x16, 0x41, 0x63, 0x6d, 0x65, + 0x6c, 0x69, 0x62, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0xea, 0x02, 0x0b, 0x41, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x3a, 0x3a, 0x56, 0x31, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_acmelib_v1_signal_type_proto_rawDescOnce sync.Once + file_acmelib_v1_signal_type_proto_rawDescData = file_acmelib_v1_signal_type_proto_rawDesc +) + +func file_acmelib_v1_signal_type_proto_rawDescGZIP() []byte { + file_acmelib_v1_signal_type_proto_rawDescOnce.Do(func() { + file_acmelib_v1_signal_type_proto_rawDescData = protoimpl.X.CompressGZIP(file_acmelib_v1_signal_type_proto_rawDescData) + }) + return file_acmelib_v1_signal_type_proto_rawDescData +} + +var file_acmelib_v1_signal_type_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_acmelib_v1_signal_type_proto_goTypes = []interface{}{ + (*SignalType)(nil), // 0: acmelib.v1.SignalType + (*Entity)(nil), // 1: acmelib.v1.Entity +} +var file_acmelib_v1_signal_type_proto_depIdxs = []int32{ + 1, // 0: acmelib.v1.SignalType.entity:type_name -> acmelib.v1.Entity + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_acmelib_v1_signal_type_proto_init() } +func file_acmelib_v1_signal_type_proto_init() { + if File_acmelib_v1_signal_type_proto != nil { + return + } + file_acmelib_v1_entity_proto_init() + if !protoimpl.UnsafeEnabled { + file_acmelib_v1_signal_type_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SignalType); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_acmelib_v1_signal_type_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_acmelib_v1_signal_type_proto_goTypes, + DependencyIndexes: file_acmelib_v1_signal_type_proto_depIdxs, + MessageInfos: file_acmelib_v1_signal_type_proto_msgTypes, + }.Build() + File_acmelib_v1_signal_type_proto = out.File + file_acmelib_v1_signal_type_proto_rawDesc = nil + file_acmelib_v1_signal_type_proto_goTypes = nil + file_acmelib_v1_signal_type_proto_depIdxs = nil +} diff --git a/proto/gen/go/acmelib/v1/signal_unit.pb.go b/proto/gen/go/acmelib/v1/signal_unit.pb.go new file mode 100644 index 0000000..37aab94 --- /dev/null +++ b/proto/gen/go/acmelib/v1/signal_unit.pb.go @@ -0,0 +1,247 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.31.0 +// protoc (unknown) +// source: acmelib/v1/signal_unit.proto + +package acmelibv1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type SignalUnitKind int32 + +const ( + SignalUnitKind_SIGNAL_UNIT_KIND_UNSPECIFIED SignalUnitKind = 0 + SignalUnitKind_SIGNAL_UNIT_KIND_CUSTOM SignalUnitKind = 1 + SignalUnitKind_SIGNAL_UNIT_KIND_TEMPERATURE SignalUnitKind = 2 + SignalUnitKind_SIGNAL_UNIT_KIND_ELECTRICAL SignalUnitKind = 3 + SignalUnitKind_SIGNAL_UNIT_KIND_POWER SignalUnitKind = 4 +) + +// Enum value maps for SignalUnitKind. +var ( + SignalUnitKind_name = map[int32]string{ + 0: "SIGNAL_UNIT_KIND_UNSPECIFIED", + 1: "SIGNAL_UNIT_KIND_CUSTOM", + 2: "SIGNAL_UNIT_KIND_TEMPERATURE", + 3: "SIGNAL_UNIT_KIND_ELECTRICAL", + 4: "SIGNAL_UNIT_KIND_POWER", + } + SignalUnitKind_value = map[string]int32{ + "SIGNAL_UNIT_KIND_UNSPECIFIED": 0, + "SIGNAL_UNIT_KIND_CUSTOM": 1, + "SIGNAL_UNIT_KIND_TEMPERATURE": 2, + "SIGNAL_UNIT_KIND_ELECTRICAL": 3, + "SIGNAL_UNIT_KIND_POWER": 4, + } +) + +func (x SignalUnitKind) Enum() *SignalUnitKind { + p := new(SignalUnitKind) + *p = x + return p +} + +func (x SignalUnitKind) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SignalUnitKind) Descriptor() protoreflect.EnumDescriptor { + return file_acmelib_v1_signal_unit_proto_enumTypes[0].Descriptor() +} + +func (SignalUnitKind) Type() protoreflect.EnumType { + return &file_acmelib_v1_signal_unit_proto_enumTypes[0] +} + +func (x SignalUnitKind) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SignalUnitKind.Descriptor instead. +func (SignalUnitKind) EnumDescriptor() ([]byte, []int) { + return file_acmelib_v1_signal_unit_proto_rawDescGZIP(), []int{0} +} + +type SignalUnit struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Entity *Entity `protobuf:"bytes,1,opt,name=entity,proto3" json:"entity,omitempty"` + Kind SignalUnitKind `protobuf:"varint,2,opt,name=kind,proto3,enum=acmelib.v1.SignalUnitKind" json:"kind,omitempty"` + Symbol string `protobuf:"bytes,3,opt,name=symbol,proto3" json:"symbol,omitempty"` +} + +func (x *SignalUnit) Reset() { + *x = SignalUnit{} + if protoimpl.UnsafeEnabled { + mi := &file_acmelib_v1_signal_unit_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SignalUnit) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SignalUnit) ProtoMessage() {} + +func (x *SignalUnit) ProtoReflect() protoreflect.Message { + mi := &file_acmelib_v1_signal_unit_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SignalUnit.ProtoReflect.Descriptor instead. +func (*SignalUnit) Descriptor() ([]byte, []int) { + return file_acmelib_v1_signal_unit_proto_rawDescGZIP(), []int{0} +} + +func (x *SignalUnit) GetEntity() *Entity { + if x != nil { + return x.Entity + } + return nil +} + +func (x *SignalUnit) GetKind() SignalUnitKind { + if x != nil { + return x.Kind + } + return SignalUnitKind_SIGNAL_UNIT_KIND_UNSPECIFIED +} + +func (x *SignalUnit) GetSymbol() string { + if x != nil { + return x.Symbol + } + return "" +} + +var File_acmelib_v1_signal_unit_proto protoreflect.FileDescriptor + +var file_acmelib_v1_signal_unit_proto_rawDesc = []byte{ + 0x0a, 0x1c, 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x69, 0x67, + 0x6e, 0x61, 0x6c, 0x5f, 0x75, 0x6e, 0x69, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, + 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2e, 0x76, 0x31, 0x1a, 0x17, 0x61, 0x63, 0x6d, 0x65, + 0x6c, 0x69, 0x62, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x22, 0x80, 0x01, 0x0a, 0x0a, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x55, 0x6e, + 0x69, 0x74, 0x12, 0x2a, 0x0a, 0x06, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2e, 0x76, 0x31, 0x2e, + 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x06, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x2e, + 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x61, + 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, + 0x55, 0x6e, 0x69, 0x74, 0x4b, 0x69, 0x6e, 0x64, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x16, + 0x0a, 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x2a, 0xae, 0x01, 0x0a, 0x0e, 0x53, 0x69, 0x67, 0x6e, 0x61, + 0x6c, 0x55, 0x6e, 0x69, 0x74, 0x4b, 0x69, 0x6e, 0x64, 0x12, 0x20, 0x0a, 0x1c, 0x53, 0x49, 0x47, + 0x4e, 0x41, 0x4c, 0x5f, 0x55, 0x4e, 0x49, 0x54, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x55, 0x4e, + 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1b, 0x0a, 0x17, 0x53, + 0x49, 0x47, 0x4e, 0x41, 0x4c, 0x5f, 0x55, 0x4e, 0x49, 0x54, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, + 0x43, 0x55, 0x53, 0x54, 0x4f, 0x4d, 0x10, 0x01, 0x12, 0x20, 0x0a, 0x1c, 0x53, 0x49, 0x47, 0x4e, + 0x41, 0x4c, 0x5f, 0x55, 0x4e, 0x49, 0x54, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x54, 0x45, 0x4d, + 0x50, 0x45, 0x52, 0x41, 0x54, 0x55, 0x52, 0x45, 0x10, 0x02, 0x12, 0x1f, 0x0a, 0x1b, 0x53, 0x49, + 0x47, 0x4e, 0x41, 0x4c, 0x5f, 0x55, 0x4e, 0x49, 0x54, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x45, + 0x4c, 0x45, 0x43, 0x54, 0x52, 0x49, 0x43, 0x41, 0x4c, 0x10, 0x03, 0x12, 0x1a, 0x0a, 0x16, 0x53, + 0x49, 0x47, 0x4e, 0x41, 0x4c, 0x5f, 0x55, 0x4e, 0x49, 0x54, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, + 0x50, 0x4f, 0x57, 0x45, 0x52, 0x10, 0x04, 0x42, 0x80, 0x01, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, + 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2e, 0x76, 0x31, 0x42, 0x0f, 0x53, 0x69, 0x67, 0x6e, + 0x61, 0x6c, 0x55, 0x6e, 0x69, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x14, 0x61, + 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2f, 0x76, 0x31, 0x3b, 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, + 0x62, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x41, 0x58, 0x58, 0xaa, 0x02, 0x0a, 0x41, 0x63, 0x6d, 0x65, + 0x6c, 0x69, 0x62, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0a, 0x41, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, + 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x16, 0x41, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x5c, 0x56, 0x31, + 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0b, 0x41, + 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, +} + +var ( + file_acmelib_v1_signal_unit_proto_rawDescOnce sync.Once + file_acmelib_v1_signal_unit_proto_rawDescData = file_acmelib_v1_signal_unit_proto_rawDesc +) + +func file_acmelib_v1_signal_unit_proto_rawDescGZIP() []byte { + file_acmelib_v1_signal_unit_proto_rawDescOnce.Do(func() { + file_acmelib_v1_signal_unit_proto_rawDescData = protoimpl.X.CompressGZIP(file_acmelib_v1_signal_unit_proto_rawDescData) + }) + return file_acmelib_v1_signal_unit_proto_rawDescData +} + +var file_acmelib_v1_signal_unit_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_acmelib_v1_signal_unit_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_acmelib_v1_signal_unit_proto_goTypes = []interface{}{ + (SignalUnitKind)(0), // 0: acmelib.v1.SignalUnitKind + (*SignalUnit)(nil), // 1: acmelib.v1.SignalUnit + (*Entity)(nil), // 2: acmelib.v1.Entity +} +var file_acmelib_v1_signal_unit_proto_depIdxs = []int32{ + 2, // 0: acmelib.v1.SignalUnit.entity:type_name -> acmelib.v1.Entity + 0, // 1: acmelib.v1.SignalUnit.kind:type_name -> acmelib.v1.SignalUnitKind + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_acmelib_v1_signal_unit_proto_init() } +func file_acmelib_v1_signal_unit_proto_init() { + if File_acmelib_v1_signal_unit_proto != nil { + return + } + file_acmelib_v1_entity_proto_init() + if !protoimpl.UnsafeEnabled { + file_acmelib_v1_signal_unit_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SignalUnit); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_acmelib_v1_signal_unit_proto_rawDesc, + NumEnums: 1, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_acmelib_v1_signal_unit_proto_goTypes, + DependencyIndexes: file_acmelib_v1_signal_unit_proto_depIdxs, + EnumInfos: file_acmelib_v1_signal_unit_proto_enumTypes, + MessageInfos: file_acmelib_v1_signal_unit_proto_msgTypes, + }.Build() + File_acmelib_v1_signal_unit_proto = out.File + file_acmelib_v1_signal_unit_proto_rawDesc = nil + file_acmelib_v1_signal_unit_proto_goTypes = nil + file_acmelib_v1_signal_unit_proto_depIdxs = nil +} diff --git a/proto/gen/go/acmelib/v1/types.pb.go b/proto/gen/go/acmelib/v1/types.pb.go deleted file mode 100644 index 2398af8..0000000 --- a/proto/gen/go/acmelib/v1/types.pb.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.31.0 -// protoc (unknown) -// source: acmelib/v1/types.proto - -package acmelibv1 - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - timestamppb "google.golang.org/protobuf/types/known/timestamppb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type Network struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - EntityId string `protobuf:"bytes,1,opt,name=entity_id,json=entityId,proto3" json:"entity_id,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - Desc string `protobuf:"bytes,3,opt,name=desc,proto3" json:"desc,omitempty"` - CreateTime *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` -} - -func (x *Network) Reset() { - *x = Network{} - if protoimpl.UnsafeEnabled { - mi := &file_acmelib_v1_types_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Network) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Network) ProtoMessage() {} - -func (x *Network) ProtoReflect() protoreflect.Message { - mi := &file_acmelib_v1_types_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Network.ProtoReflect.Descriptor instead. -func (*Network) Descriptor() ([]byte, []int) { - return file_acmelib_v1_types_proto_rawDescGZIP(), []int{0} -} - -func (x *Network) GetEntityId() string { - if x != nil { - return x.EntityId - } - return "" -} - -func (x *Network) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Network) GetDesc() string { - if x != nil { - return x.Desc - } - return "" -} - -func (x *Network) GetCreateTime() *timestamppb.Timestamp { - if x != nil { - return x.CreateTime - } - return nil -} - -var File_acmelib_v1_types_proto protoreflect.FileDescriptor - -var file_acmelib_v1_types_proto_rawDesc = []byte{ - 0x0a, 0x16, 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x79, 0x70, - 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, - 0x62, 0x2e, 0x76, 0x31, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8b, 0x01, 0x0a, 0x07, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, - 0x6b, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x49, 0x64, 0x12, 0x12, - 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x65, 0x73, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x64, 0x65, 0x73, 0x63, 0x12, 0x3b, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, - 0x69, 0x6d, 0x65, 0x42, 0x7b, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x63, 0x6d, 0x65, 0x6c, - 0x69, 0x62, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x50, 0x01, 0x5a, 0x14, 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2f, 0x76, 0x31, 0x3b, - 0x61, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x41, 0x58, 0x58, 0xaa, - 0x02, 0x0a, 0x41, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0a, 0x41, - 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x16, 0x41, 0x63, 0x6d, 0x65, - 0x6c, 0x69, 0x62, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0xea, 0x02, 0x0b, 0x41, 0x63, 0x6d, 0x65, 0x6c, 0x69, 0x62, 0x3a, 0x3a, 0x56, 0x31, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_acmelib_v1_types_proto_rawDescOnce sync.Once - file_acmelib_v1_types_proto_rawDescData = file_acmelib_v1_types_proto_rawDesc -) - -func file_acmelib_v1_types_proto_rawDescGZIP() []byte { - file_acmelib_v1_types_proto_rawDescOnce.Do(func() { - file_acmelib_v1_types_proto_rawDescData = protoimpl.X.CompressGZIP(file_acmelib_v1_types_proto_rawDescData) - }) - return file_acmelib_v1_types_proto_rawDescData -} - -var file_acmelib_v1_types_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_acmelib_v1_types_proto_goTypes = []interface{}{ - (*Network)(nil), // 0: acmelib.v1.Network - (*timestamppb.Timestamp)(nil), // 1: google.protobuf.Timestamp -} -var file_acmelib_v1_types_proto_depIdxs = []int32{ - 1, // 0: acmelib.v1.Network.create_time:type_name -> google.protobuf.Timestamp - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_acmelib_v1_types_proto_init() } -func file_acmelib_v1_types_proto_init() { - if File_acmelib_v1_types_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_acmelib_v1_types_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Network); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_acmelib_v1_types_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_acmelib_v1_types_proto_goTypes, - DependencyIndexes: file_acmelib_v1_types_proto_depIdxs, - MessageInfos: file_acmelib_v1_types_proto_msgTypes, - }.Build() - File_acmelib_v1_types_proto = out.File - file_acmelib_v1_types_proto_rawDesc = nil - file_acmelib_v1_types_proto_goTypes = nil - file_acmelib_v1_types_proto_depIdxs = nil -} diff --git a/signal_enum.go b/signal_enum.go index 3365821..112d592 100644 --- a/signal_enum.go +++ b/signal_enum.go @@ -10,7 +10,7 @@ import ( // to a signal. type SignalEnum struct { *entity - *withTemplateRefs[*EnumSignal] + *withRefs[*EnumSignal] // refs *set[EntityID, *EnumSignal] parErrID EntityID @@ -26,8 +26,8 @@ type SignalEnum struct { // NewSignalEnum creates a new [SignalEnum] with the given name. func NewSignalEnum(name string) *SignalEnum { return &SignalEnum{ - entity: newEntity(name), - withTemplateRefs: newWithTemplateRefs[*EnumSignal](), + entity: newEntity(name), + withRefs: newWithRefs[*EnumSignal](), // refs: newSet[EntityID, *EnumSignal](), parErrID: "", diff --git a/signal_test.go b/signal_test.go index 4c92d98..12776b4 100644 --- a/signal_test.go +++ b/signal_test.go @@ -51,23 +51,11 @@ func Test_StandardSignal(t *testing.T) { assert.Error(err) assert.Equal(size8Type.EntityID(), sig.Type().EntityID()) - assert.Equal(size8Type.Min(), sig.Min()) - assert.Equal(size8Type.Max(), sig.Max()) - assert.Equal(float64(0), sig.Offset()) - assert.Equal(float64(1), sig.Scale()) assert.Equal(voltUnit.EntityID(), sig.Unit().EntityID()) sig.SetUnit(currUnit) assert.Equal(currUnit.EntityID(), sig.Unit().EntityID()) - assert.NoError(sig.SetPhysicalValues(-10, 10, 1, 2)) - assert.Equal(float64(-10), sig.Min()) - assert.Equal(float64(10), sig.Max()) - assert.Equal(float64(1), sig.Offset()) - assert.Equal(float64(2), sig.Scale()) - - assert.Error(sig.SetPhysicalValues(-10, 10, 1, 0)) - _, err = sig.ToStandard() assert.NoError(err) _, err = sig.ToEnum() diff --git a/signal_unit.go b/signal_unit.go index dd8b773..4e8723b 100644 --- a/signal_unit.go +++ b/signal_unit.go @@ -37,7 +37,7 @@ func (suk SignalUnitKind) String() string { // SignalUnit is an entity that defines the physical unit of a [Signal]. type SignalUnit struct { *entity - *withTemplateRefs[*StandardSignal] + *withRefs[*StandardSignal] kind SignalUnitKind symbol string @@ -47,8 +47,8 @@ type SignalUnit struct { // kind, and symbol. func NewSignalUnit(name string, kind SignalUnitKind, symbol string) *SignalUnit { return &SignalUnit{ - entity: newEntity(name), - withTemplateRefs: newWithTemplateRefs[*StandardSignal](), + entity: newEntity(name), + withRefs: newWithRefs[*StandardSignal](), kind: kind, symbol: symbol, diff --git a/template.go b/template.go deleted file mode 100644 index 4e1e3fe..0000000 --- a/template.go +++ /dev/null @@ -1,147 +0,0 @@ -package acmelib - -// type template[Ent any, Ref templateRef] struct { -// entity Ent -// refs *set[EntityID, Ref] -// } - -// func newTemplate[Ent any, Ref templateRef](e Ent) *template[Ent, Ref] { -// return &template[Ent, Ref]{ -// entity: e, - -// refs: newSet[EntityID, Ref](), -// } -// } - -// func (t *template[Ent, Ref]) addRef(ref Ref) { -// t.refs.add(ref.EntityID(), ref) -// } - -// func (t *template[Ent, Ref]) removeRef(refID EntityID) { -// t.refs.remove(refID) -// } - -// type SignalUnitTemplate = template[*SignalUnit, *StandardSignal] - -type templateRef interface { - EntityID() EntityID -} - -// type TemplateKind int - -// const ( -// TemplateKindCANIDBuilder TemplateKind = iota -// TemplateKindSignalType -// TemplateKindSignalUnit -// TemplateKindSignalEnum -// ) - -// func (tk TemplateKind) String() string { -// switch tk { -// case TemplateKindCANIDBuilder: -// return "can-id-builder" -// case TemplateKindSignalType: -// return "signal-type" -// case TemplateKindSignalUnit: -// return "signal-unit" -// case TemplateKindSignalEnum: -// return "signal-enum" -// default: -// return "unknown" -// } -// } - -// type Template interface { -// EntityID() EntityID -// Name() string -// Desc() string -// CreateTime() time.Time - -// setParentNetwork(parentNetwork *Network) -// ParentNetwork() *Network - -// TemplateKind() TemplateKind - -// ToCANIDBuilder() (*CANIDBuilder, error) -// ToSignalType() (*SignalType, error) -// ToSignalUnit() (*SignalUnit, error) -// ToSignalEnum() (*SignalEnum, error) -// } - -type withTemplateRefs[R templateRef] struct { - // parentNetwork *Network - - // tplKind TemplateKind - - refs *set[EntityID, R] -} - -func newWithTemplateRefs[R templateRef]() *withTemplateRefs[R] { - return &withTemplateRefs[R]{ - // parentNetwork: nil, - - // tplKind: tplKind, - - refs: newSet[EntityID, R](), - } -} - -// func (t *withTemplateRefs[R]) isTemplate() bool { -// return t.parentNetwork != nil -// } - -func (t *withTemplateRefs[R]) addRef(ref R) { - t.refs.add(ref.EntityID(), ref) -} - -func (t *withTemplateRefs[R]) removeRef(refID EntityID) { - t.refs.remove(refID) -} - -func (t *withTemplateRefs[R]) ReferenceCount() int { - return t.refs.size() -} - -func (t *withTemplateRefs[R]) References() []R { - return t.refs.getValues() -} - -// func (t *withTemplateRefs[R]) setParentNetwork(parentNetwork *Network) { -// t.parentNetwork = parentNetwork -// } - -// func (t *withTemplateRefs[R]) ParentNetwork() *Network { -// return t.parentNetwork -// } - -// func (t *withTemplateRefs[R]) TemplateKind() TemplateKind { -// return t.tplKind -// } - -// func (t *withTemplateRefs[R]) ToCANIDBuilder() (*CANIDBuilder, error) { -// return nil, &ConversionError{ -// From: t.tplKind.String(), -// To: TemplateKindCANIDBuilder.String(), -// } -// } - -// func (t *withTemplateRefs[R]) ToSignalType() (*SignalType, error) { -// return nil, &ConversionError{ -// From: t.tplKind.String(), -// To: TemplateKindSignalType.String(), -// } -// } - -// func (t *withTemplateRefs[R]) ToSignalUnit() (*SignalUnit, error) { -// return nil, &ConversionError{ -// From: t.tplKind.String(), -// To: TemplateKindSignalUnit.String(), -// } -// } - -// func (t *withTemplateRefs[R]) ToSignalEnum() (*SignalEnum, error) { -// return nil, &ConversionError{ -// From: t.tplKind.String(), -// To: TemplateKindSignalEnum.String(), -// } -// }