平台侧发送和准备工作实现完成

This commit is contained in:
2025-12-07 18:05:21 +08:00
parent 35c19d0495
commit c8b32d542d
8 changed files with 52 additions and 49 deletions

View File

@@ -82,11 +82,6 @@ type OtaService interface {
// 返回创建的 OTA 任务 ID 和可能发生的错误。
StartUpgrade(ctx context.Context, areaControllerID uint32, firmwarePath string) (uint32, error)
// GetUpgradeProgress 用于查询指定 OTA 任务的进度。
// taskID: 要查询的 OTA 任务 ID。
// 返回 OTA 任务的已执行步骤数和总步骤数和当前阶段和可能发生的错误。
GetUpgradeProgress(ctx context.Context, taskID uint32) (executed, total uint32, CurrentStage models.OTATaskStatus, err error)
// StopUpgrade 用于请求停止一个正在进行的 OTA 升级任务。
// taskID: 要停止的 OTA 任务 ID。
// 注意:这只是一个尽力而为的操作。如果设备已开始下载或处理,可能无法立即中止。

View File

@@ -210,11 +210,6 @@ func (o *otaServiceImpl) StartUpgrade(ctx context.Context, areaControllerID uint
return task.ID, nil
}
func (o *otaServiceImpl) GetUpgradeProgress(ctx context.Context, taskID uint32) (executed, total uint32, CurrentStage models.OTATaskStatus, err error) {
//TODO implement me
panic("implement me")
}
func (o *otaServiceImpl) StopUpgrade(ctx context.Context, taskID uint32) error {
serviceCtx, logger := logs.Trace(ctx, o.ctx, "StopUpgrade")