2023-10-12 17:55:40 +08:00
|
|
|
|
package repository
|
|
|
|
|
|
|
|
|
|
import "joylink.club/rtsssimulation/repository/model/proto"
|
|
|
|
|
|
|
|
|
|
type Psd struct {
|
|
|
|
|
Identity
|
2023-10-19 17:09:47 +08:00
|
|
|
|
platformId string
|
2023-10-23 17:35:57 +08:00
|
|
|
|
asdGroups []*AsdGroup
|
2023-10-12 17:55:40 +08:00
|
|
|
|
componentGroups []*ElectronicComponentGroup
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func newPsd(id string) *Psd {
|
|
|
|
|
return &Psd{
|
|
|
|
|
Identity: identity{id, proto.DeviceType_DeviceType_Psd},
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2023-10-19 17:09:47 +08:00
|
|
|
|
func (p *Psd) PlatformId() string {
|
|
|
|
|
return p.platformId
|
|
|
|
|
}
|
|
|
|
|
|
2023-10-23 17:35:57 +08:00
|
|
|
|
func (p *Psd) AsdGroups() []*AsdGroup {
|
|
|
|
|
return p.asdGroups
|
|
|
|
|
}
|
|
|
|
|
|
2023-10-12 17:55:40 +08:00
|
|
|
|
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
|
|
|
|
|
}
|