48 lines
861 B
Go
48 lines
861 B
Go
package repository
|
||
|
||
import "joylink.club/rtsssimulation/repository/model/proto"
|
||
|
||
type Psd struct {
|
||
Identity
|
||
platformId string
|
||
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
|
||
}
|
||
|
||
func (p *Psd) AsdGroups() []*AsdGroup {
|
||
return p.asdGroups
|
||
}
|
||
|
||
func (p *Psd) ComponentGroups() []*ElectronicComponentGroup {
|
||
return p.componentGroups
|
||
}
|
||
|
||
// 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
|
||
}
|