Wei-Yu Chen | ad55cb8 | 2022-02-15 20:07:01 +0800 | [diff] [blame] | 1 | # SPDX-FileCopyrightText: 2020 The Magma Authors. |
| 2 | # SPDX-FileCopyrightText: 2022 Open Networking Foundation <support@opennetworking.org> |
| 3 | # |
| 4 | # SPDX-License-Identifier: BSD-3-Clause |
Wei-Yu Chen | 49950b9 | 2021-11-08 19:19:18 +0800 | [diff] [blame] | 5 | |
| 6 | from state_machines.enb_acs import EnodebAcsStateMachine |
| 7 | |
| 8 | |
| 9 | class StateMachinePointer: |
| 10 | """ |
| 11 | This is a hack to deal with the possibility that the specified data model |
| 12 | doesn't match the eNB device enodebd ends up connecting to. |
| 13 | |
| 14 | When the data model doesn't match, the state machine is replaced with one |
| 15 | that matches the data model. |
| 16 | """ |
| 17 | |
| 18 | def __init__(self, acs_state_machine: EnodebAcsStateMachine): |
| 19 | self._acs_state_machine = acs_state_machine |
| 20 | |
| 21 | @property |
| 22 | def state_machine(self): |
| 23 | return self._acs_state_machine |
| 24 | |
| 25 | @state_machine.setter |
| 26 | def state_machine( |
| 27 | self, |
| 28 | acs_state_machine: EnodebAcsStateMachine, |
| 29 | ) -> None: |
| 30 | self._acs_state_machine = acs_state_machine |