iscs ecs 调整
This commit is contained in:
parent
dffafe98df
commit
08e4d2f8e2
@ -24,8 +24,8 @@ type SwitchThreePosition = uint8
|
||||
|
||||
const (
|
||||
StpOpened SwitchThreePosition = iota //开关分闸,线路断开,未与任何位置接通
|
||||
StpClosedPosition1 //开关合闸到位置1,与位置1线路导通
|
||||
StpClosedPosition2 //开关合闸到位置2,与位置2线路导通
|
||||
StpClosedWorking //隔离开关合闸
|
||||
StpClosedLanding //接地开关合闸
|
||||
)
|
||||
|
||||
/////////////////////////
|
||||
|
@ -37,8 +37,8 @@ type SwitchThreePositionOptEnum = uint8
|
||||
|
||||
const (
|
||||
StpOpened SwitchThreePositionOptEnum = iota //开关分闸,线路断开,未与任何位置接通
|
||||
StpClosedPosition1 //开关合闸到位置1,与位置1线路导通
|
||||
StpClosedPosition2 //开关合闸到位置2,与位置2线路导通
|
||||
StpClosedWorking //隔离开关合闸
|
||||
StpClosedLanding //接地开关合闸
|
||||
)
|
||||
|
||||
// ThreePositionSwitchOperate 三工位开关操作
|
||||
@ -54,10 +54,10 @@ func ThreePositionSwitchOperate(w ecs.World, deviceId string, opt SwitchThreePos
|
||||
switch opt {
|
||||
case StpOpened:
|
||||
return component.StpOpened, nil
|
||||
case StpClosedPosition1:
|
||||
return component.StpClosedPosition1, nil
|
||||
case StpClosedPosition2:
|
||||
return component.StpClosedPosition2, nil
|
||||
case StpClosedWorking:
|
||||
return component.StpClosedWorking, nil
|
||||
case StpClosedLanding:
|
||||
return component.StpClosedLanding, nil
|
||||
default:
|
||||
return component.StpOpened, fmt.Errorf("三工位开关操作[%d]不存在", opt)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user