Skip to content

Commit 30ca2f5

Browse files
committed
[core] Build TaskInternalError event
1 parent 8f5de79 commit 30ca2f5

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

common/event/deviceevent.go

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,14 @@ func NewDeviceEvent(origin DeviceEventOrigin, t pb.DeviceEventType) (de DeviceEv
8080
Origin: origin,
8181
},
8282
}
83+
case pb.DeviceEventType_TASK_INTERNAL_ERROR:
84+
de = &TaskInternalError{
85+
DeviceEventBase: DeviceEventBase{
86+
eventBase: *newDeviceEventBase("DeviceEvent", nil),
87+
Type: t,
88+
Origin: origin,
89+
},
90+
}
8391
case pb.DeviceEventType_NULL_DEVICE_EVENT:
8492
de = nil
8593
}
@@ -106,3 +114,11 @@ type BasicTaskTerminated struct {
106114
func (e *BasicTaskTerminated) GetName() string {
107115
return "BASIC_TASK_TERMINATED"
108116
}
117+
118+
type TaskInternalError struct {
119+
DeviceEventBase
120+
}
121+
122+
func (e *TaskInternalError) GetName() string {
123+
return "TASK_INTERNAL_ERROR"
124+
}

0 commit comments

Comments
 (0)