blob: 3ec19a7a782c2075629363e68ca2f623003248aa [file] [log] [blame]
Wei-Yu Chen49950b92021-11-08 19:19:18 +08001"""
2Copyright 2020 The Magma Authors.
3
4This source code is licensed under the BSD-style license found in the
5LICENSE file in the root directory of this source tree.
6
7Unless required by applicable law or agreed to in writing, software
8distributed under the License is distributed on an "AS IS" BASIS,
9WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10See the License for the specific language governing permissions and
11limitations under the License.
12"""
13
14from state_machines.enb_acs import EnodebAcsStateMachine
15
16
17class StateMachinePointer:
18 """
19 This is a hack to deal with the possibility that the specified data model
20 doesn't match the eNB device enodebd ends up connecting to.
21
22 When the data model doesn't match, the state machine is replaced with one
23 that matches the data model.
24 """
25
26 def __init__(self, acs_state_machine: EnodebAcsStateMachine):
27 self._acs_state_machine = acs_state_machine
28
29 @property
30 def state_machine(self):
31 return self._acs_state_machine
32
33 @state_machine.setter
34 def state_machine(
35 self,
36 acs_state_machine: EnodebAcsStateMachine,
37 ) -> None:
38 self._acs_state_machine = acs_state_machine