2023-10-13 15:26:25 +08:00
|
|
|
package repository
|
|
|
|
|
|
|
|
import "joylink.club/rtsssimulation/repository/model/proto"
|
|
|
|
|
|
|
|
type Station struct {
|
|
|
|
Identity
|
2023-11-06 17:32:34 +08:00
|
|
|
code string
|
|
|
|
ibp *IBP
|
|
|
|
componentGroups []*ElectronicComponentGroup
|
2023-11-09 14:26:08 +08:00
|
|
|
deviceEcc []*proto.DeviceEcc
|
2023-10-13 15:26:25 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
func NewStation(id, code string) *Station {
|
|
|
|
return &Station{
|
|
|
|
Identity: identity{id, proto.DeviceType_DeviceType_Station},
|
|
|
|
code: code,
|
2023-10-17 15:05:13 +08:00
|
|
|
ibp: NewIBP(),
|
2023-10-13 15:26:25 +08:00
|
|
|
}
|
|
|
|
}
|
2023-10-17 15:05:13 +08:00
|
|
|
|
2023-10-31 14:42:42 +08:00
|
|
|
func (s *Station) GetCode() string {
|
|
|
|
return s.code
|
|
|
|
}
|
|
|
|
|
2023-10-17 15:05:13 +08:00
|
|
|
func (s *Station) GetIbpEmp() *IBPRefMap {
|
|
|
|
return s.ibp.Emp
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *Station) GetIbpSpk() *IBPRefMap {
|
|
|
|
return s.ibp.Spk
|
|
|
|
}
|
2023-11-06 17:32:34 +08:00
|
|
|
|
|
|
|
func (s *Station) ComponentGroups() []*ElectronicComponentGroup {
|
|
|
|
return s.componentGroups
|
|
|
|
}
|
2023-11-09 14:26:08 +08:00
|
|
|
|
|
|
|
func (s *Station) DeviceEcc() []*proto.DeviceEcc {
|
|
|
|
return s.deviceEcc
|
|
|
|
}
|