Node('leidenghs_test.test',
     'test leiden GHS driver',
     'tcp://5000',
     )

Mod('io',
    'frappy_psi.leidenghs.IO',
    'leiden GHS communication',
    uri='linse-521e-ts:3001',
    )

for valve in {'mix': 1,    # mixture compressor
            'bypass': 2,
            '15': 3,
            '16': 4,
            'gate18': 6,
            '4': 7,
            '5': 9,
            'reset': 10,
            '9': 12,
            '14': 13,
            '13': 15,
            'ledtest': 16,
            '12': 18,
            '10': 19,
            '11': 21,
            'A0': 22,
            '7': 24,
            'S3': 25,
            '6': 27,
            '17': 28,
            '8': 30,
            '1': 31,
            'S2': 33,
            '3': 34,
            '2': 36,
            '0': 37,
            'S1': 39,
            'A9': 40,
            'A8': 42,
            'A2': 43,
            'S5': 45,
            'A10': 46,
            'start': 48,
            'A5': 49,
            'A7': 51,
            'auto': 54,
            'A4': 55,
            'A6': 57,
            'S4': 58,
            'A3': 60,
            'He3': 61,    # condense He3
            'He4': 62,    # condense He4
            'circulation': 63,   # normal circulation
            'recovery': 64,
            }:
    name = 'n' + valve if valve.isdecimal() else valve
    Mod(name,
       'frappy_psi.leidenghs.Valve',
       f'test valve {valve}',
       io='io',
       key=valve,
    )

Mod('P1',
    'frappy_psi.leidenghs.Pressure',
    'test pressure P1',
    io='io',
    addr='P1',
    )

Mod('P2',
    'frappy_psi.leidenghs.Pressure',
    'test pressure P2',
    io='io',
    addr='P2',
    )

Mod('P6',
    'frappy_psi.leidenghs.PressureLimit',
    'test pressure with limits P6',
    io='io',
    addr='P6',
    offset=0,
    )
