pychemstation.utils.hplc_param_types API documentation

# pychemstation.utils.hplc_param_types

View Source

      1from dataclasses import dataclass
      2from enum import Enum
      3from typing import Union, Any, Optional
      4
      5from pychemstation.generated import SolventElement, Signal
      6
      7
      8# Commands sent to the Chemstation Macro
      9# See https://www.agilent.com/cs/library/usermanuals/Public/MACROS.PDF
     10class Command(Enum):
     11    def __str__(self):
     12        return '%s' % self.value
     13
     14    RESET_COUNTER_CMD = "last_cmd_no = 0"
     15    GET_STATUS_CMD = "response$ = AcqStatus$"
     16    SLEEP_CMD = "Sleep {seconds}"
     17    STANDBY_CMD = "Standby"
     18    STOP_MACRO_CMD = "Stop"
     19    PREPRUN_CMD = "PrepRun"
     20    LAMP_ON_CMD = "LampAll ON"
     21    LAMP_OFF_CMD = "LampAll OFF"
     22    PUMP_ON_CMD = "PumpAll ON"
     23    PUMP_OFF_CMD = "PumpAll OFF"
     24    GET_METHOD_CMD = "response$ = _MethFile$"
     25    SWITCH_METHOD_CMD = 'LoadMethod "{method_dir}", "{method_name}.M"'
     26    START_METHOD_CMD = "StartMethod"
     27    RUN_METHOD_CMD = 'RunMethod "{data_dir}",, "{experiment_name}_{timestamp}"'
     28    STOP_METHOD_CMD = "StopMethod"
     29    UPDATE_METHOD_CMD = 'UpdateMethod'
     30    SWITCH_SEQUENCE_CMD = 'LoadSequence _SeqPath$, _SeqFile$'
     31    SAVE_SEQUENCE_CMD = 'SaveSequence _SeqPath$, _SeqFile$'
     32    GET_SEQUENCE_CMD = 'response$ = _SeqFile$'
     33    RUN_SEQUENCE_CMD = 'RunSequence'
     34
     35
     36class RegisterFlag(Enum):
     37    def __str__(self):
     38        return '%s' % self.value
     39
     40    # for table
     41    NUM_ROWS = "NumberOfRows"
     42
     43    # for Method
     44    SOLVENT_A_COMPOSITION = "PumpChannel_CompositionPercentage"
     45    SOLVENT_B_COMPOSITION = "PumpChannel2_CompositionPercentage"
     46    SOLVENT_C_COMPOSITION = "PumpChannel3_CompositionPercentage"
     47    SOLVENT_D_COMPOSITION = "PumpChannel4_CompositionPercentage"
     48    FLOW = "Flow"
     49    MAX_TIME = "StopTime_Time"
     50    COLUMN_OVEN_TEMP1 = "TemperatureControl_Temperature"
     51    COLUMN_OVEN_TEMP2 = "TemperatureControl2_Temperature"
     52    STOPTIME_MODE = "StopTime_Mode"
     53    POSTIME_MODE = "PostTime_Mode"
     54
     55    # for Method Timetable
     56    SOLVENT_COMPOSITION = "SolventComposition"
     57
     58    # for Sequence
     59    VIAL_LOCATION = "Vial"
     60    NAME = "SampleName"
     61    METHOD = "Method"
     62    INJ_VOL = "InjVolume"
     63    INJ_SOR = "InjectionSource"
     64    NUM_INJ = "InjVial"
     65    SAMPLE_TYPE = "SampleType"
     66    DATA_FILE = "DataFileName"
     67
     68
     69class TableOperation(Enum):
     70    def __str__(self):
     71        return '%s' % self.value
     72
     73    DELETE_TABLE = 'DelTab {register}, "{table_name}"'
     74    CREATE_TABLE = 'NewTab {register}, "{table_name}"'
     75    NEW_ROW = 'InsTabRow {register}, "{table_name}"'
     76    EDIT_ROW_VAL = 'SetTabVal "{register}", "{table_name}", {row}, "{col_name}", {val}'
     77    EDIT_ROW_TEXT = 'SetTabText "{register}", "{table_name}", {row}, "{col_name}", "{val}"'
     78    GET_ROW_VAL = 'TabVal ("{register}", "{table_name}", {row}, "{col_name}")'
     79    GET_ROW_TEXT = 'TabText ("{register}", "{table_name}", {row}, "{col_name}")'
     80    GET_OBJ_HDR_VAL = '{internal_val} = TabHdrVal({register}, "{table_name}", "{col_name}")'
     81    GET_OBJ_HDR_TEXT = ''
     82    UPDATE_OBJ_HDR_VAL = 'SetObjHdrVal {register}, {register_flag}, {val}'
     83    UPDATE_OBJ_HDR_TEXT = 'SetObjHdrText {register}, {register_flag}, {val}'
     84    NEW_COL_TEXT = 'NewColText {register}, "{table_name}", "{col_name}", "{val}"'
     85    NEW_COL_VAL = 'NewColVal {register}, "{table_name}", "{col_name}", {val}'
     86
     87
     88class PType(Enum):
     89    STR = "str"
     90    NUM = "num"
     91
     92
     93@dataclass
     94class Param:
     95    ptype: PType
     96    val: Union[float, int, str, Any]
     97    chemstation_key: Union[RegisterFlag, list[RegisterFlag]]
     98
     99
    100@dataclass
    101class HPLCMethodParams:
    102    organic_modifier: Param
    103    flow: Param
    104    temperature: Param
    105    inj_vol: Param
    106    equ_time: Param
    107    maximum_run_time: Param
    108
    109
    110@dataclass
    111class Entry:
    112    start_time: float
    113    organic_modifer: float
    114    flow: float
    115
    116
    117@dataclass
    118class SequenceEntry:
    119    vial_location: Optional[int] = None
    120    method: Optional[str] = None
    121    num_inj: Optional[int] = 1
    122    inj_vol: Optional[int] = 2
    123    inj_source: Optional[str] = "HipAls"
    124    sample_name: Optional[str] = None
    125    sample_type: Optional[int] = None
    126
    127
    128@dataclass
    129class SequenceTable:
    130    name: str
    131    rows: list[SequenceEntry]
    132
    133
    134@dataclass
    135class MethodTimetable:
    136    first_row: HPLCMethodParams
    137    subsequent_rows: list[Entry]
    138    dad_wavelengthes: Optional[list[Signal]] = None
    139    organic_modifier: Optional[SolventElement] = None
    140    modifier_a: Optional[SolventElement] = None
    141
    142
    143class HPLCRunningStatus(Enum):
    144    @classmethod
    145    def has_member_key(cls, key):
    146        return key in cls.__members__
    147
    148    INJECTING = "INJECTING"
    149    PREPARING = "PREPARING"
    150    RUN = "RUN"
    151    NOTREADY = "NOTREADY"
    152    POSTRUN = "POSTRUN"
    153    RAWDATA = "RAWDATA"
    154    INITIALIZING = "INITIALIZING"
    155    NOMODULE = "NOMODULE"
    156
    157
    158class HPLCAvailStatus(Enum):
    159    @classmethod
    160    def has_member_key(cls, key):
    161        return key in cls.__members__
    162
    163    PRERUN = "PRERUN"
    164    OFFLINE = "OFFLINE"
    165    STANDBY = "STANDBY"
    166
    167
    168class HPLCErrorStatus(Enum):
    169
    170    @classmethod
    171    def has_member_key(cls, key):
    172        return key in cls.__members__
    173
    174    ERROR = "ERROR"
    175    BREAK = "BREAK"
    176    NORESPONSE = "NORESPONSE"
    177    MALFORMED = "MALFORMED"
    178
    179
    180@dataclass
    181class Table:
    182    register: str
    183    name: str
    184
    185
    186class SampleType(Enum):
    187    SAMPLE = 1
    188    BLANK = 2
    189    CONTROL = 3
    190    CALIBRATION = 4
    191
    192class InjectionSource(Enum):
    193    AS_METHOD = "AsMethod"
    194    MANUAL = "Manual"
    195    HIP_ALS = "HipAls"
    196
    197def str_to_status(status: str) -> Union[HPLCAvailStatus, HPLCErrorStatus, HPLCRunningStatus]:
    198    if HPLCErrorStatus.has_member_key(status):
    199        return HPLCErrorStatus[status]
    200    if HPLCRunningStatus.has_member_key(status):
    201        return HPLCRunningStatus[status]
    202    if HPLCAvailStatus.has_member_key(status):
    203        return HPLCAvailStatus[status]
    204    raise KeyError(status)

class Command(enum.Enum): View Source

    11class Command(Enum):
    12    def __str__(self):
    13        return '%s' % self.value
    14
    15    RESET_COUNTER_CMD = "last_cmd_no = 0"
    16    GET_STATUS_CMD = "response$ = AcqStatus$"
    17    SLEEP_CMD = "Sleep {seconds}"
    18    STANDBY_CMD = "Standby"
    19    STOP_MACRO_CMD = "Stop"
    20    PREPRUN_CMD = "PrepRun"
    21    LAMP_ON_CMD = "LampAll ON"
    22    LAMP_OFF_CMD = "LampAll OFF"
    23    PUMP_ON_CMD = "PumpAll ON"
    24    PUMP_OFF_CMD = "PumpAll OFF"
    25    GET_METHOD_CMD = "response$ = _MethFile$"
    26    SWITCH_METHOD_CMD = 'LoadMethod "{method_dir}", "{method_name}.M"'
    27    START_METHOD_CMD = "StartMethod"
    28    RUN_METHOD_CMD = 'RunMethod "{data_dir}",, "{experiment_name}_{timestamp}"'
    29    STOP_METHOD_CMD = "StopMethod"
    30    UPDATE_METHOD_CMD = 'UpdateMethod'
    31    SWITCH_SEQUENCE_CMD = 'LoadSequence _SeqPath$, _SeqFile$'
    32    SAVE_SEQUENCE_CMD = 'SaveSequence _SeqPath$, _SeqFile$'
    33    GET_SEQUENCE_CMD = 'response$ = _SeqFile$'
    34    RUN_SEQUENCE_CMD = 'RunSequence'

RESET_COUNTER_CMD = <Command.RESET_COUNTER_CMD: 'last_cmd_no = 0'>
GET_STATUS_CMD = <Command.GET_STATUS_CMD: 'response$ = AcqStatus$'>
SLEEP_CMD = <Command.SLEEP_CMD: 'Sleep {seconds}'>
STANDBY_CMD = <Command.STANDBY_CMD: 'Standby'>
STOP_MACRO_CMD = <Command.STOP_MACRO_CMD: 'Stop'>
PREPRUN_CMD = <Command.PREPRUN_CMD: 'PrepRun'>
LAMP_ON_CMD = <Command.LAMP_ON_CMD: 'LampAll ON'>
LAMP_OFF_CMD = <Command.LAMP_OFF_CMD: 'LampAll OFF'>
PUMP_ON_CMD = <Command.PUMP_ON_CMD: 'PumpAll ON'>
PUMP_OFF_CMD = <Command.PUMP_OFF_CMD: 'PumpAll OFF'>
GET_METHOD_CMD = <Command.GET_METHOD_CMD: 'response$ = _MethFile$'>
SWITCH_METHOD_CMD = <Command.SWITCH_METHOD_CMD: 'LoadMethod "{method_dir}", "{method_name}.M"'>
START_METHOD_CMD = <Command.START_METHOD_CMD: 'StartMethod'>
RUN_METHOD_CMD = <Command.RUN_METHOD_CMD: 'RunMethod "{data_dir}",, "{experiment_name}_{timestamp}"'>
STOP_METHOD_CMD = <Command.STOP_METHOD_CMD: 'StopMethod'>
UPDATE_METHOD_CMD = <Command.UPDATE_METHOD_CMD: 'UpdateMethod'>
SWITCH_SEQUENCE_CMD = <Command.SWITCH_SEQUENCE_CMD: 'LoadSequence _SeqPath$, _SeqFile$'>
SAVE_SEQUENCE_CMD = <Command.SAVE_SEQUENCE_CMD: 'SaveSequence _SeqPath$, _SeqFile$'>
GET_SEQUENCE_CMD = <Command.GET_SEQUENCE_CMD: 'response$ = _SeqFile$'>
RUN_SEQUENCE_CMD = <Command.RUN_SEQUENCE_CMD: 'RunSequence'>
class RegisterFlag(enum.Enum): View Source

    37class RegisterFlag(Enum):
    38    def __str__(self):
    39        return '%s' % self.value
    40
    41    # for table
    42    NUM_ROWS = "NumberOfRows"
    43
    44    # for Method
    45    SOLVENT_A_COMPOSITION = "PumpChannel_CompositionPercentage"
    46    SOLVENT_B_COMPOSITION = "PumpChannel2_CompositionPercentage"
    47    SOLVENT_C_COMPOSITION = "PumpChannel3_CompositionPercentage"
    48    SOLVENT_D_COMPOSITION = "PumpChannel4_CompositionPercentage"
    49    FLOW = "Flow"
    50    MAX_TIME = "StopTime_Time"
    51    COLUMN_OVEN_TEMP1 = "TemperatureControl_Temperature"
    52    COLUMN_OVEN_TEMP2 = "TemperatureControl2_Temperature"
    53    STOPTIME_MODE = "StopTime_Mode"
    54    POSTIME_MODE = "PostTime_Mode"
    55
    56    # for Method Timetable
    57    SOLVENT_COMPOSITION = "SolventComposition"
    58
    59    # for Sequence
    60    VIAL_LOCATION = "Vial"
    61    NAME = "SampleName"
    62    METHOD = "Method"
    63    INJ_VOL = "InjVolume"
    64    INJ_SOR = "InjectionSource"
    65    NUM_INJ = "InjVial"
    66    SAMPLE_TYPE = "SampleType"
    67    DATA_FILE = "DataFileName"

NUM_ROWS = <RegisterFlag.NUM_ROWS: 'NumberOfRows'>
SOLVENT_A_COMPOSITION = <RegisterFlag.SOLVENT_A_COMPOSITION: 'PumpChannel_CompositionPercentage'>
SOLVENT_B_COMPOSITION = <RegisterFlag.SOLVENT_B_COMPOSITION: 'PumpChannel2_CompositionPercentage'>
SOLVENT_C_COMPOSITION = <RegisterFlag.SOLVENT_C_COMPOSITION: 'PumpChannel3_CompositionPercentage'>
SOLVENT_D_COMPOSITION = <RegisterFlag.SOLVENT_D_COMPOSITION: 'PumpChannel4_CompositionPercentage'>
FLOW = <RegisterFlag.FLOW: 'Flow'>
MAX_TIME = <RegisterFlag.MAX_TIME: 'StopTime_Time'>
COLUMN_OVEN_TEMP1 = <RegisterFlag.COLUMN_OVEN_TEMP1: 'TemperatureControl_Temperature'>
COLUMN_OVEN_TEMP2 = <RegisterFlag.COLUMN_OVEN_TEMP2: 'TemperatureControl2_Temperature'>
STOPTIME_MODE = <RegisterFlag.STOPTIME_MODE: 'StopTime_Mode'>
POSTIME_MODE = <RegisterFlag.POSTIME_MODE: 'PostTime_Mode'>
SOLVENT_COMPOSITION = <RegisterFlag.SOLVENT_COMPOSITION: 'SolventComposition'>
VIAL_LOCATION = <RegisterFlag.VIAL_LOCATION: 'Vial'>
NAME = <RegisterFlag.NAME: 'SampleName'>
METHOD = <RegisterFlag.METHOD: 'Method'>
INJ_VOL = <RegisterFlag.INJ_VOL: 'InjVolume'>
INJ_SOR = <RegisterFlag.INJ_SOR: 'InjectionSource'>
NUM_INJ = <RegisterFlag.NUM_INJ: 'InjVial'>
SAMPLE_TYPE = <RegisterFlag.SAMPLE_TYPE: 'SampleType'>
DATA_FILE = <RegisterFlag.DATA_FILE: 'DataFileName'>
class TableOperation(enum.Enum): View Source

    70class TableOperation(Enum):
    71    def __str__(self):
    72        return '%s' % self.value
    73
    74    DELETE_TABLE = 'DelTab {register}, "{table_name}"'
    75    CREATE_TABLE = 'NewTab {register}, "{table_name}"'
    76    NEW_ROW = 'InsTabRow {register}, "{table_name}"'
    77    EDIT_ROW_VAL = 'SetTabVal "{register}", "{table_name}", {row}, "{col_name}", {val}'
    78    EDIT_ROW_TEXT = 'SetTabText "{register}", "{table_name}", {row}, "{col_name}", "{val}"'
    79    GET_ROW_VAL = 'TabVal ("{register}", "{table_name}", {row}, "{col_name}")'
    80    GET_ROW_TEXT = 'TabText ("{register}", "{table_name}", {row}, "{col_name}")'
    81    GET_OBJ_HDR_VAL = '{internal_val} = TabHdrVal({register}, "{table_name}", "{col_name}")'
    82    GET_OBJ_HDR_TEXT = ''
    83    UPDATE_OBJ_HDR_VAL = 'SetObjHdrVal {register}, {register_flag}, {val}'
    84    UPDATE_OBJ_HDR_TEXT = 'SetObjHdrText {register}, {register_flag}, {val}'
    85    NEW_COL_TEXT = 'NewColText {register}, "{table_name}", "{col_name}", "{val}"'
    86    NEW_COL_VAL = 'NewColVal {register}, "{table_name}", "{col_name}", {val}'

DELETE_TABLE = <TableOperation.DELETE_TABLE: 'DelTab {register}, "{table_name}"'>
CREATE_TABLE = <TableOperation.CREATE_TABLE: 'NewTab {register}, "{table_name}"'>
NEW_ROW = <TableOperation.NEW_ROW: 'InsTabRow {register}, "{table_name}"'>
EDIT_ROW_VAL = <TableOperation.EDIT_ROW_VAL: 'SetTabVal "{register}", "{table_name}", {row}, "{col_name}", {val}'>
EDIT_ROW_TEXT = <TableOperation.EDIT_ROW_TEXT: 'SetTabText "{register}", "{table_name}", {row}, "{col_name}", "{val}"'>
GET_ROW_VAL = <TableOperation.GET_ROW_VAL: 'TabVal ("{register}", "{table_name}", {row}, "{col_name}")'>
GET_ROW_TEXT = <TableOperation.GET_ROW_TEXT: 'TabText ("{register}", "{table_name}", {row}, "{col_name}")'>
GET_OBJ_HDR_VAL = <TableOperation.GET_OBJ_HDR_VAL: '{internal_val} = TabHdrVal({register}, "{table_name}", "{col_name}")'>
GET_OBJ_HDR_TEXT = <TableOperation.GET_OBJ_HDR_TEXT: ''>
UPDATE_OBJ_HDR_VAL = <TableOperation.UPDATE_OBJ_HDR_VAL: 'SetObjHdrVal {register}, {register_flag}, {val}'>
UPDATE_OBJ_HDR_TEXT = <TableOperation.UPDATE_OBJ_HDR_TEXT: 'SetObjHdrText {register}, {register_flag}, {val}'>
NEW_COL_TEXT = <TableOperation.NEW_COL_TEXT: 'NewColText {register}, "{table_name}", "{col_name}", "{val}"'>
NEW_COL_VAL = <TableOperation.NEW_COL_VAL: 'NewColVal {register}, "{table_name}", "{col_name}", {val}'>
class PType(enum.Enum): View Source

    89class PType(Enum):
    90    STR = "str"
    91    NUM = "num"

STR = <PType.STR: 'str'>
NUM = <PType.NUM: 'num'>
@dataclass
class Param: View Source

    94@dataclass
    95class Param:
    96    ptype: PType
    97    val: Union[float, int, str, Any]
    98    chemstation_key: Union[RegisterFlag, list[RegisterFlag]]

Param( ptype: PType, val: Union[float, int, str, Any], chemstation_key: Union[RegisterFlag, list[RegisterFlag]])
ptype: PType
val: Union[float, int, str, Any]
chemstation_key: Union[RegisterFlag, list[RegisterFlag]]
@dataclass
class HPLCMethodParams: View Source

    101@dataclass
    102class HPLCMethodParams:
    103    organic_modifier: Param
    104    flow: Param
    105    temperature: Param
    106    inj_vol: Param
    107    equ_time: Param
    108    maximum_run_time: Param

HPLCMethodParams( organic_modifier: Param, flow: Param, temperature: Param, inj_vol: Param, equ_time: Param, maximum_run_time: Param)
organic_modifier: Param
flow: Param
temperature: Param
inj_vol: Param
equ_time: Param
maximum_run_time: Param
@dataclass
class Entry: View Source

    111@dataclass
    112class Entry:
    113    start_time: float
    114    organic_modifer: float
    115    flow: float

Entry(start_time: float, organic_modifer: float, flow: float)
start_time: float
organic_modifer: float
flow: float
@dataclass
class SequenceEntry: View Source

    118@dataclass
    119class SequenceEntry:
    120    vial_location: Optional[int] = None
    121    method: Optional[str] = None
    122    num_inj: Optional[int] = 1
    123    inj_vol: Optional[int] = 2
    124    inj_source: Optional[str] = "HipAls"
    125    sample_name: Optional[str] = None
    126    sample_type: Optional[int] = None

SequenceEntry( vial_location: Optional[int] = None, method: Optional[str] = None, num_inj: Optional[int] = 1, inj_vol: Optional[int] = 2, inj_source: Optional[str] = 'HipAls', sample_name: Optional[str] = None, sample_type: Optional[int] = None)
vial_location: Optional[int] = None
method: Optional[str] = None
num_inj: Optional[int] = 1
inj_vol: Optional[int] = 2
inj_source: Optional[str] = 'HipAls'
sample_name: Optional[str] = None
sample_type: Optional[int] = None
@dataclass
class SequenceTable: View Source

    129@dataclass
    130class SequenceTable:
    131    name: str
    132    rows: list[SequenceEntry]

SequenceTable( name: str, rows: list[SequenceEntry])
name: str
rows: list[SequenceEntry]
@dataclass
class MethodTimetable: View Source

    135@dataclass
    136class MethodTimetable:
    137    first_row: HPLCMethodParams
    138    subsequent_rows: list[Entry]
    139    dad_wavelengthes: Optional[list[Signal]] = None
    140    organic_modifier: Optional[SolventElement] = None
    141    modifier_a: Optional[SolventElement] = None

MethodTimetable( first_row: HPLCMethodParams, subsequent_rows: list[Entry], dad_wavelengthes: Optional[list[pychemstation.generated.Signal]] = None, organic_modifier: Optional[pychemstation.generated.SolventElement] = None, modifier_a: Optional[pychemstation.generated.SolventElement] = None)
first_row: HPLCMethodParams
subsequent_rows: list[Entry]
dad_wavelengthes: Optional[list[pychemstation.generated.Signal]] = None
organic_modifier: Optional[pychemstation.generated.SolventElement] = None
modifier_a: Optional[pychemstation.generated.SolventElement] = None
class HPLCRunningStatus(enum.Enum): View Source

    144class HPLCRunningStatus(Enum):
    145    @classmethod
    146    def has_member_key(cls, key):
    147        return key in cls.__members__
    148
    149    INJECTING = "INJECTING"
    150    PREPARING = "PREPARING"
    151    RUN = "RUN"
    152    NOTREADY = "NOTREADY"
    153    POSTRUN = "POSTRUN"
    154    RAWDATA = "RAWDATA"
    155    INITIALIZING = "INITIALIZING"
    156    NOMODULE = "NOMODULE"

@classmethod
def has_member_key(cls, key): View Source

    145    @classmethod
    146    def has_member_key(cls, key):
    147        return key in cls.__members__

INJECTING = <HPLCRunningStatus.INJECTING: 'INJECTING'>
PREPARING = <HPLCRunningStatus.PREPARING: 'PREPARING'>
RUN = <HPLCRunningStatus.RUN: 'RUN'>
NOTREADY = <HPLCRunningStatus.NOTREADY: 'NOTREADY'>
POSTRUN = <HPLCRunningStatus.POSTRUN: 'POSTRUN'>
RAWDATA = <HPLCRunningStatus.RAWDATA: 'RAWDATA'>
INITIALIZING = <HPLCRunningStatus.INITIALIZING: 'INITIALIZING'>
NOMODULE = <HPLCRunningStatus.NOMODULE: 'NOMODULE'>
class HPLCAvailStatus(enum.Enum): View Source

    159class HPLCAvailStatus(Enum):
    160    @classmethod
    161    def has_member_key(cls, key):
    162        return key in cls.__members__
    163
    164    PRERUN = "PRERUN"
    165    OFFLINE = "OFFLINE"
    166    STANDBY = "STANDBY"

@classmethod
def has_member_key(cls, key): View Source

    160    @classmethod
    161    def has_member_key(cls, key):
    162        return key in cls.__members__

PRERUN = <HPLCAvailStatus.PRERUN: 'PRERUN'>
OFFLINE = <HPLCAvailStatus.OFFLINE: 'OFFLINE'>
STANDBY = <HPLCAvailStatus.STANDBY: 'STANDBY'>
class HPLCErrorStatus(enum.Enum): View Source

    169class HPLCErrorStatus(Enum):
    170
    171    @classmethod
    172    def has_member_key(cls, key):
    173        return key in cls.__members__
    174
    175    ERROR = "ERROR"
    176    BREAK = "BREAK"
    177    NORESPONSE = "NORESPONSE"
    178    MALFORMED = "MALFORMED"

@classmethod
def has_member_key(cls, key): View Source

    171    @classmethod
    172    def has_member_key(cls, key):
    173        return key in cls.__members__

ERROR = <HPLCErrorStatus.ERROR: 'ERROR'>
BREAK = <HPLCErrorStatus.BREAK: 'BREAK'>
NORESPONSE = <HPLCErrorStatus.NORESPONSE: 'NORESPONSE'>
MALFORMED = <HPLCErrorStatus.MALFORMED: 'MALFORMED'>
@dataclass
class Table: View Source

    181@dataclass
    182class Table:
    183    register: str
    184    name: str

Table(register: str, name: str)
register: str
name: str
class SampleType(enum.Enum): View Source

    187class SampleType(Enum):
    188    SAMPLE = 1
    189    BLANK = 2
    190    CONTROL = 3
    191    CALIBRATION = 4

SAMPLE = <SampleType.SAMPLE: 1>
BLANK = <SampleType.BLANK: 2>
CONTROL = <SampleType.CONTROL: 3>
CALIBRATION = <SampleType.CALIBRATION: 4>
class InjectionSource(enum.Enum): View Source

    193class InjectionSource(Enum):
    194    AS_METHOD = "AsMethod"
    195    MANUAL = "Manual"
    196    HIP_ALS = "HipAls"

AS_METHOD = <InjectionSource.AS_METHOD: 'AsMethod'>
MANUAL = <InjectionSource.MANUAL: 'Manual'>
HIP_ALS = <InjectionSource.HIP_ALS: 'HipAls'>
def str_to_status( status: str) -> Union[HPLCAvailStatus, HPLCErrorStatus, HPLCRunningStatus]: View Source

    198def str_to_status(status: str) -> Union[HPLCAvailStatus, HPLCErrorStatus, HPLCRunningStatus]:
    199    if HPLCErrorStatus.has_member_key(status):
    200        return HPLCErrorStatus[status]
    201    if HPLCRunningStatus.has_member_key(status):
    202        return HPLCRunningStatus[status]
    203    if HPLCAvailStatus.has_member_key(status):
    204        return HPLCAvailStatus[status]
    205    raise KeyError(status)