rts-sim-module/repository/station.go

40 lines
765 B
Go

package repository
import "joylink.club/rtsssimulation/repository/model/proto"
type Station struct {
Identity
code string
ibp *IBP
componentGroups []*ElectronicComponentGroup
deviceEcc []*proto.DeviceEcc
}
func NewStation(id, code string) *Station {
return &Station{
Identity: identity{id, proto.DeviceType_DeviceType_Station},
code: code,
ibp: NewIBP(),
}
}
func (s *Station) GetCode() string {
return s.code
}
func (s *Station) GetIbpEmp() *IBPRefMap {
return s.ibp.Emp
}
func (s *Station) GetIbpSpk() *IBPRefMap {
return s.ibp.Spk
}
func (s *Station) ComponentGroups() []*ElectronicComponentGroup {
return s.componentGroups
}
func (s *Station) DeviceEcc() []*proto.DeviceEcc {
return s.deviceEcc
}