Attributes returns a clone of the attributes of this state
()
| 73 | |
| 74 | // Attributes returns a clone of the attributes of this state |
| 75 | func (p *Entity) Attributes() []Attribute { |
| 76 | p.attr_mu.RLock() |
| 77 | defer p.attr_mu.RUnlock() |
| 78 | return slices.Clone(p.attributes) |
| 79 | } |
| 80 | |
| 81 | func (p *Entity) SetAttribute(id string, base float64) { |
| 82 | p.attr_mu.Lock() |