@@ -29,15 +29,15 @@ class ALContext:
2929 - Context managers for creating and automatically ending AL actions
3030 """
3131
32- def __init__ (self , ctx : int , ull : ModuleType ) -> None :
32+ def __init__ (self , ctx : int , ll : ModuleType ) -> None :
3333 """Construct a new ALContext object
3434
3535 Args:
3636 ctx: Context identifier returned by the AL
37- ull : ``imas._ual_lowlevel `` python module that returned this context
37+ ll : ``imas._al_lowlevel `` python module that returned this context
3838 """
3939 self .ctx = ctx
40- self .ull = ull
40+ self .ll = ll
4141
4242 @contextmanager
4343 def global_action (self , path : str , rwmode : int ) -> Iterator ["ALContext" ]:
@@ -50,11 +50,11 @@ def global_action(self, path: str, rwmode: int) -> Iterator["ALContext"]:
5050 Yields:
5151 ctx: The created context.
5252 """
53- ctx = self ._begin_action (self .ull . ual_begin_global_action , path , rwmode )
53+ ctx = self ._begin_action (self .ll . al_begin_global_action , path , rwmode )
5454 try :
5555 yield ctx
5656 finally :
57- self .ull . ual_end_action (ctx .ctx )
57+ self .ll . al_end_action (ctx .ctx )
5858
5959 @contextmanager
6060 def slice_action (
@@ -79,7 +79,7 @@ def slice_action(
7979 f"{ interpolation_method } "
8080 )
8181 ctx = self ._begin_action (
82- self .ull . ual_begin_slice_action ,
82+ self .ll . al_begin_slice_action ,
8383 path ,
8484 rwmode ,
8585 time_requested ,
@@ -88,7 +88,7 @@ def slice_action(
8888 try :
8989 yield ctx
9090 finally :
91- self .ull . ual_end_action (ctx .ctx )
91+ self .ll . al_end_action (ctx .ctx )
9292
9393 @contextmanager
9494 def arraystruct_action (
@@ -107,12 +107,12 @@ def arraystruct_action(
107107 size: The size of the array of structures (only relevant when reading data)
108108 """
109109 ctx , size = self ._begin_action (
110- self .ull . ual_begin_arraystruct_action , path , timebase , size
110+ self .ll . al_begin_arraystruct_action , path , timebase , size
111111 )
112112 try :
113113 yield ctx , size
114114 finally :
115- self .ull . ual_end_action (ctx .ctx )
115+ self .ll . al_end_action (ctx .ctx )
116116
117117 def _begin_action (
118118 self , action : Callable , * args : Any
@@ -122,32 +122,32 @@ def _begin_action(
122122 if status != 0 :
123123 raise RuntimeError (f"Error calling { action .__name__ } : { status = } " )
124124 if rest :
125- return ALContext (ctx , self .ull ), * rest
126- return ALContext (ctx , self .ull )
125+ return ALContext (ctx , self .ll ), * rest
126+ return ALContext (ctx , self .ll )
127127
128128 def iterate_over_arraystruct (self , step : int ) -> None :
129- """Call ual_iterate_over_arraystruct with this context."""
130- status = self .ull . ual_iterate_over_arraystruct (self .ctx , step )
129+ """Call al_iterate_over_arraystruct with this context."""
130+ status = self .ll . al_iterate_over_arraystruct (self .ctx , step )
131131 if status != 0 :
132132 raise RuntimeError (f"Error iterating over arraystruct: { status = } " )
133133
134134 def read_data (self , path : str , timebasepath : str , datatype : int , dim : int ) -> Any :
135- """Call ual_read_data with this context."""
136- status , data = self .ull . ual_read_data (
135+ """Call al_read_data with this context."""
136+ status , data = self .ll . al_read_data (
137137 self .ctx , path , timebasepath , datatype , dim
138138 )
139139 if status != 0 :
140140 raise RuntimeError (f"Error reading data at { path !r} : { status = } " )
141141 return data
142142
143143 def delete_data (self , path : str ) -> None :
144- """Call ual_delete_data with this context."""
145- status = self .ull . ual_delete_data (self .ctx , path )
144+ """Call al_delete_data with this context."""
145+ status = self .ll . al_delete_data (self .ctx , path )
146146 if status != 0 :
147147 raise RuntimeError (f"Error deleting data at { path !r} : { status = } " )
148148
149149 def write_data (self , path : str , timebasepath : str , data : Any ) -> None :
150- """Call ual_write_data with this context."""
151- status = self .ull . ual_write_data (self .ctx , path , timebasepath , data )
150+ """Call al_write_data with this context."""
151+ status = self .ll . al_write_data (self .ctx , path , timebasepath , data )
152152 if status != 0 :
153153 raise RuntimeError (f"Error writing data at { path !r} : { status = } " )
0 commit comments