rts-sim-module/repository/psd.go

48 lines
861 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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
}