@@ -457,79 +457,6 @@ def get_cmd(self) -> list[str]:
457457 return cmdl
458458
459459
460- class OMCSessionZMQ :
461- """
462- This class is a compatibility layer for the new schema using OMCSession* classes.
463- """
464-
465- def __init__ (
466- self ,
467- timeout : float = 10.00 ,
468- omhome : Optional [str ] = None ,
469- omc_process : Optional [OMCSession ] = None ,
470- ) -> None :
471- """
472- Initialisation for OMCSessionZMQ
473- """
474- warnings .warn (message = "The class OMCSessionZMQ is depreciated and will be removed in future versions; "
475- "please use OMCProcess* classes instead!" ,
476- category = DeprecationWarning ,
477- stacklevel = 2 )
478-
479- if omc_process is None :
480- omc_process = OMCSessionLocal (omhome = omhome , timeout = timeout )
481- elif not isinstance (omc_process , OMCSession ):
482- raise OMCSessionException ("Invalid definition of the OMC process!" )
483- self .omc_process = omc_process
484-
485- def __del__ (self ):
486- del self .omc_process
487-
488- @staticmethod
489- def escape_str (value : str ) -> str :
490- """
491- Escape a string such that it can be used as string within OMC expressions, i.e. escape all double quotes.
492- """
493- return OMCSession .escape_str (value = value )
494-
495- def omcpath (self , * path ) -> OMCPath :
496- """
497- Create an OMCPath object based on the given path segments and the current OMC process definition.
498- """
499- return self .omc_process .omcpath (* path )
500-
501- def omcpath_tempdir (self , tempdir_base : Optional [OMCPath ] = None ) -> OMCPath :
502- """
503- Get a temporary directory using OMC. It is our own implementation as non-local usage relies on OMC to run all
504- filesystem related access.
505- """
506- return self .omc_process .omcpath_tempdir (tempdir_base = tempdir_base )
507-
508- def omc_run_data_update (self , omc_run_data : OMCSessionRunData ) -> OMCSessionRunData :
509- """
510- Modify data based on the selected OMCProcess implementation.
511-
512- Needs to be implemented in the subclasses.
513- """
514- return self .omc_process .omc_run_data_update (omc_run_data = omc_run_data )
515-
516- def run_model_executable (self , cmd_run_data : OMCSessionRunData ) -> int :
517- """
518- Run the command defined in cmd_run_data. This class is defined as static method such that there is no need to
519- keep instances of over classes around.
520- """
521- return self .omc_process .run_model_executable (cmd_run_data = cmd_run_data )
522-
523- def sendExpression (self , command : str , parsed : bool = True ) -> Any :
524- """
525- Send an expression to the OMC server and return the result.
526-
527- The complete error handling of the OMC result is done within this method using '"getMessagesStringInternal()'.
528- Caller should only check for OMCSessionException.
529- """
530- return self .omc_process .sendExpression (expr = command , parsed = parsed )
531-
532-
533460class PostInitCaller (type ):
534461 """
535462 Metaclass definition to define a new function __post_init__() which is called after all __init__() functions where
0 commit comments