rts-sim-module/repository/psd.go

48 lines
861 B
Go
Raw Normal View History

package repository
import "joylink.club/rtsssimulation/repository/model/proto"
type Psd struct {
Identity
platformId string
2023-10-23 17:35:57 +08:00
asdGroups []*AsdGroup
componentGroups []*ElectronicComponentGroup
}
func newPsd(id string) *Psd {
return &Psd{
Identity: identity{id, proto.DeviceType_DeviceType_Psd},
}
}
func (p *Psd) PlatformId() string {
return p.platformId
}
2023-10-23 17:35:57 +08:00
func (p *Psd) AsdGroups() []*AsdGroup {
return p.asdGroups
}
func (p *Psd) ComponentGroups() []*ElectronicComponentGroup {
return p.componentGroups
}
2023-10-23 17:35:57 +08:00
// AsdGroup 滑动门编组
type AsdGroup struct {
group int //编组4/8编组
start int //编组起始的滑动门编号
end int //编组结束的滑动门编号
}
func (a *AsdGroup) Group() int {
return a.group
}
func (a *AsdGroup) Start() int {
return a.start
}
func (a *AsdGroup) End() int {
return a.end
}