# -*- coding: utf-8 -*-
#
# This file is part of the bliss project
#
# Copyright (c) 2015-2023 Beamline Control Unit, ESRF
# Distributed under the GNU LGPLv3. See LICENSE for more info.


"""
Galil DMC Controllers commands list:

list of tuples: (str, str, list of str):
  (<command_mnemonic>, <command name>, <list of models supporting the command>)

ex: MODEL_4000 and MODEL_30000 do not support 'VT' command.

"""


galil_all_commands = [
    ("AB", "Abort", ["MODEL_4000", "MODEL_30000"]),
    ("AC", "Acceleration", ["MODEL_4000", "MODEL_30000"]),
    ("AD", "After Distance", ["MODEL_4000", "MODEL_30000"]),
    ("AF", "Analog Feedback Select", ["MODEL_4000", "MODEL_30000"]),
    ("AG", "Amplifier Gain", ["MODEL_4000", "MODEL_30000"]),
    ("AI", "After Input", ["MODEL_4000", "MODEL_30000"]),
    ("AL", "Arm Latch", ["MODEL_4000", "MODEL_30000"]),
    ("AM", "After Move", ["MODEL_4000", "MODEL_30000"]),
    ("AO", "Analog Output", ["MODEL_4000", "MODEL_30000"]),
    ("AP", "After Absolute Position", ["MODEL_4000", "MODEL_30000"]),
    ("AQ", "Analog Input Configuration", ["MODEL_4000", "MODEL_30000"]),
    ("AR", "After Relative Distance", ["MODEL_4000", "MODEL_30000"]),
    ("AR", "After Relative Distance", ["MODEL_4000", "MODEL_30000"]),
    ("AS", "At Speed", ["MODEL_4000", "MODEL_30000"]),
    ("AT", "At Time", ["MODEL_4000", "MODEL_30000"]),
    ("AU", "Set amplifier current loop", ["MODEL_4000", "MODEL_30000"]),
    ("AV", "After Vector Distance", ["MODEL_4000", "MODEL_30000"]),
    ("BA", "Brushless Axis", ["MODEL_4000", "MODEL_30000"]),
    ("BB", "Brushless Phase Begins", ["MODEL_4000", "MODEL_30000"]),
    ("BC", "Brushless Calibration", ["MODEL_4000", "MODEL_30000"]),
    ("BD", "Brushless Degrees", ["MODEL_4000", "MODEL_30000"]),
    ("BG", "Begin", ["MODEL_4000", "MODEL_30000"]),
    ("BI", "Brushless Inputs", ["MODEL_4000", "MODEL_30000"]),
    ("BK", "Breakpoint", ["MODEL_4000", "MODEL_30000"]),
    ("BL", "Reverse Software Limit", ["MODEL_4000", "MODEL_30000"]),
    ("BM", "Brushless Modulo", ["MODEL_4000", "MODEL_30000"]),
    ("BN", "Burn", ["MODEL_4000", "MODEL_30000"]),
    ("BP", "Burn Program", ["MODEL_4000", "MODEL_30000"]),
    ("BR", "Brush Axis", ["MODEL_4000", "MODEL_30000"]),
    ("BT", "Begin PVT Motion", ["MODEL_4000", "MODEL_30000"]),
    ("BV", "Burn Variables and Array", ["MODEL_4000", "MODEL_30000"]),
    ("BW", "Brake Wait", ["MODEL_4000", "MODEL_30000"]),
    ("BX", "Sine Amp Initialization", ["MODEL_4000", "MODEL_30000"]),
    ("BZ", "Brushless Zero", ["MODEL_4000", "MODEL_30000"]),
    ("CB", "Clear Bit", ["MODEL_4000", "MODEL_30000"]),
    ("CD", "Contour Distance", ["MODEL_4000", "MODEL_30000"]),
    ("CE", "Configure Encoder", ["MODEL_4000", "MODEL_30000"]),
    ("CF", "Configure Unsolicited Messages Handle", ["MODEL_4000", "MODEL_30000"]),
    ("CI", "Configure Communication Interrupt", ["MODEL_4000", "MODEL_30000"]),
    ("CM", "Contour Mode", ["MODEL_4000", "MODEL_30000"]),
    ("CN", "Configure", ["MODEL_4000", "MODEL_30000"]),
    (
        "CP",
        "Dead band within which the motor is shut off (MO)",
        ["MODEL_4000", "MODEL_30000"],
    ),
    ("CR", "Circle", ["MODEL_4000", "MODEL_30000"]),
    ("CS", "Clear Sequence", ["MODEL_4000", "MODEL_30000"]),
    (
        "CW",
        "Copyright information and Data Adjustment bit on/off",
        ["MODEL_4000", "MODEL_30000"],
    ),
    ("DA", "Deallocate Variables and Arrays", ["MODEL_4000", "MODEL_30000"]),
    (
        "DB",
        "Range in which PID and antifriction bias are turned on (on band)",
        ["MODEL_4000", "MODEL_30000"],
    ),
    ("DC", "Deceleration", ["MODEL_4000", "MODEL_30000"]),
    ("DE", "Dual (Auxiliary) Encoder Position", ["MODEL_4000", "MODEL_30000"]),
    ("DF", "Dual Feedback (DV feedback swap)", ["MODEL_4000", "MODEL_30000"]),
    ("DH", "DHCP Client Enable", ["MODEL_4000", "MODEL_30000"]),
    ("DL", "Download", ["MODEL_4000", "MODEL_30000"]),
    ("DM", "Dimension Array", ["MODEL_4000", "MODEL_30000"]),
    ("DP", "Define Position", ["MODEL_4000", "MODEL_30000"]),
    ("DR", "Configures I O Data Record Update Rate", ["MODEL_4000", "MODEL_30000"]),
    (
        "DS",
        "Range in which PID and antifriction bias are turned off (off band)",
        ["MODEL_4000", "MODEL_30000"],
    ),
    ("DT", "Delta Time", ["MODEL_4000", "MODEL_30000"]),
    ("DV", "Dual Velocity (Dual Loop)", ["MODEL_4000", "MODEL_30000"]),
    ("EA", "Choose ECAM master", ["MODEL_4000", "MODEL_30000"]),
    ("EB", "Enable ECAM", ["MODEL_4000", "MODEL_30000"]),
    ("EC", "ECAM Counter", ["MODEL_4000", "MODEL_30000"]),
    ("ED", "Edit", ["MODEL_4000", "MODEL_30000"]),
    ("EG", "ECAM go (engage)", ["MODEL_4000", "MODEL_30000"]),
    ("EI", "Event Interrupts", ["MODEL_4000", "MODEL_30000"]),
    ("EM", "Ecam modulus", ["MODEL_4000", "MODEL_30000"]),
    ("EN", "End", ["MODEL_4000", "MODEL_30000"]),
    ("EO", "Echo", ["MODEL_4000", "MODEL_30000"]),
    ("EP", "Cam table master interval and phase shift", ["MODEL_4000", "MODEL_30000"]),
    ("EQ", "ECAM quit (disengage)", ["MODEL_4000", "MODEL_30000"]),
    ("ER", "Error Limit", ["MODEL_4000", "MODEL_30000"]),
    ("ES", "Ellipse Scale", ["MODEL_4000", "MODEL_30000"]),
    ("ET", "Electronic cam table", ["MODEL_4000", "MODEL_30000"]),
    ("EW", "ECAM Widen Segment", ["MODEL_4000", "MODEL_30000"]),
    ("EY", "ECAM Cycle Count", ["MODEL_4000", "MODEL_30000"]),
    ("FA", "Acceleration Feedforward", ["MODEL_4000", "MODEL_30000"]),
    ("FC", "Distance-selectable feedforward gain", ["MODEL_4000", "MODEL_30000"]),
    ("FE", "Find Edge", ["MODEL_4000", "MODEL_30000"]),
    ("FI", "Find Index", ["MODEL_4000", "MODEL_30000"]),
    ("FL", "Forward Software Limit", ["MODEL_4000", "MODEL_30000"]),
    (
        "FN",
        "Distance from end of move when FC is engaged",
        ["MODEL_4000", "MODEL_30000"],
    ),
    ("FV", "Velocity Feedforward", ["MODEL_4000", "MODEL_30000"]),
    ("GA", "Master Axis for Gearing", ["MODEL_4000", "MODEL_30000"]),
    ("GD", "Gear Distance", ["MODEL_4000", "MODEL_30000"]),
    ("GM", "Gantry mode", ["MODEL_4000", "MODEL_30000"]),
    ("GR", "Gear Ratio", ["MODEL_4000", "MODEL_30000"]),
    ("HM", "Home", ["MODEL_4000", "MODEL_30000"]),
    ("HS", "Handle Assignment Switch", ["MODEL_4000", "MODEL_30000"]),
    ("HV", "Homing Velocity", ["MODEL_4000", "MODEL_30000"]),
    ("HX", "Halt Execution", ["MODEL_4000", "MODEL_30000"]),
    ("IA", "IP Address", ["MODEL_4000", "MODEL_30000"]),
    ("ID", "Identify", ["MODEL_4000", "MODEL_30000"]),
    ("IF", "IF conditional statement", ["MODEL_4000", "MODEL_30000"]),
    ("IH", "Open IP Handle", ["MODEL_4000", "MODEL_30000"]),
    ("II", "Input Interrupt", ["MODEL_4000", "MODEL_30000"]),
    ("IK", "Block Ethernet ports", ["MODEL_4000", "MODEL_30000"]),
    ("IL", "Integrator Limit", ["MODEL_4000", "MODEL_30000"]),
    ("IP", "Increment Position", ["MODEL_4000", "MODEL_30000"]),
    (
        "IT",
        "Independent Time Constant - SmoothingJG Jog",
        ["MODEL_4000", "MODEL_30000"],
    ),
    ("JP", "Jump to Program Location", ["MODEL_4000", "MODEL_30000"]),
    ("JS", "Jump to Subroutine", ["MODEL_4000", "MODEL_30000"]),
    ("K1", "Proportional gain during motion", ["MODEL_4000", "MODEL_30000"]),
    ("K2", "Integrator gain during motion", ["MODEL_4000", "MODEL_30000"]),
    ("K3", "Derivative gain during motion", ["MODEL_4000", "MODEL_30000"]),
    ("KD", "Derivative Constant", ["MODEL_4000", "MODEL_30000"]),
    ("KI", "Integrator", ["MODEL_4000", "MODEL_30000"]),
    ("KP", "Proportional Constant", ["MODEL_4000", "MODEL_30000"]),
    ("KS", "Step Motor Smoothing", ["MODEL_4000", "MODEL_30000"]),
    ("LA", "List Arrays", ["MODEL_4000", "MODEL_30000"]),
    ("LC", "Low Current Stepper Mode", ["MODEL_4000", "MODEL_30000"]),
    ("LD", "Limit Disable", ["MODEL_4000", "MODEL_30000"]),
    ("LE", "Linear Interpolation End", ["MODEL_4000", "MODEL_30000"]),
    ("LI", "Linear Interpolation Distance", ["MODEL_4000", "MODEL_30000"]),
    ("LL", "List Labels", ["MODEL_4000", "MODEL_30000"]),
    ("LM", "Linear Interpolation Mode", ["MODEL_4000", "MODEL_30000"]),
    ("LS", "List", ["MODEL_4000", "MODEL_30000"]),
    ("LV", "List Variables", ["MODEL_4000", "MODEL_30000"]),
    ("LZ", "Omit leading zeros", ["MODEL_4000", "MODEL_30000"]),
    ("MB", "Modbus", ["MODEL_4000", "MODEL_30000"]),
    ("MC", "Motion Complete", ["MODEL_4000", "MODEL_30000"]),
    ("ME", "Modbus array write enable", ["MODEL_4000", "MODEL_30000"]),
    ("MF", "Forward Motion to Position", ["MODEL_4000", "MODEL_30000"]),
    ("MG", "Message", ["MODEL_4000", "MODEL_30000"]),
    ("MM", "Master Modulus", ["MODEL_4000", "MODEL_30000"]),
    ("MO", "Motor Off", ["MODEL_4000", "MODEL_30000"]),
    ("MR", "Reverse Motion to Position", ["MODEL_4000", "MODEL_30000"]),
    ("MT", "Motor Type", ["MODEL_4000", "MODEL_30000"]),
    ("MU", "Multicast Address", ["MODEL_4000", "MODEL_30000"]),
    ("MV", "Modbus Reversal", ["MODEL_4000", "MODEL_30000"]),
    ("MW", "Modbus Wait", ["MODEL_4000", "MODEL_30000"]),
    ("NB", "Notch Bandwidth", ["MODEL_4000", "MODEL_30000"]),
    ("NF", "Notch Frequency", ["MODEL_4000", "MODEL_30000"]),
    ("NO", "No Operation", ["MODEL_4000", "MODEL_30000"]),
    ("NZ", "Notch Zero", ["MODEL_4000", "MODEL_30000"]),
    ("OA", "Off on encoder failure", ["MODEL_4000", "MODEL_30000"]),
    ("OB", "Output Bit", ["MODEL_4000", "MODEL_30000"]),
    ("OC", "Output Compare", ["MODEL_4000", "MODEL_30000"]),
    ("OE", "Off-on-Error", ["MODEL_4000", "MODEL_30000"]),
    ("OF", "Offset", ["MODEL_4000", "MODEL_30000"]),
    ("OP", "Output Port", ["MODEL_4000", "MODEL_30000"]),
    ("OT", "Off on encoder failure time", ["MODEL_4000", "MODEL_30000"]),
    ("OV", "Off on encoder failure voltage", ["MODEL_4000", "MODEL_30000"]),
    ("PA", "Position Absolute", ["MODEL_4000", "MODEL_30000"]),
    ("PF", "Position Format", ["MODEL_4000", "MODEL_30000"]),
    ("PL", "Pole", ["MODEL_4000", "MODEL_30000"]),
    ("PR", "Position Relative", ["MODEL_4000", "MODEL_30000"]),
    ("PT", "Position Tracking", ["MODEL_4000", "MODEL_30000"]),
    ("PV", "PVT Data", ["MODEL_4000", "MODEL_30000"]),
    ("PW", "Password", ["MODEL_4000", "MODEL_30000"]),
    ("QD", "Download Array", ["MODEL_4000", "MODEL_30000"]),
    ("QH", "Query Hall State", ["MODEL_4000", "MODEL_30000"]),
    ("QQ", "Clear Sample Time Overflow", ["MODEL_4000", "MODEL_30000"]),
    ("QR", "I O Data Record", ["MODEL_4000", "MODEL_30000"]),
    ("QS", "Error Magnitude", ["MODEL_4000", "MODEL_30000"]),
    ("QU", "Upload Array", ["MODEL_4000", "MODEL_30000"]),
    ("QZ", "Return Data Record information", ["MODEL_4000", "MODEL_30000"]),
    ("RA", "Record Array", ["MODEL_4000", "MODEL_30000"]),
    ("RC", "Record", ["MODEL_4000", "MODEL_30000"]),
    ("RD", "Record Data", ["MODEL_4000", "MODEL_30000"]),
    ("RE", "Return from Error Routine", ["MODEL_4000", "MODEL_30000"]),
    ("RI", "Return from Interrupt Routine", ["MODEL_4000", "MODEL_30000"]),
    ("RL", "Report Latched Position", ["MODEL_4000", "MODEL_30000"]),
    ("RO", "Realtime Offset", ["MODEL_4000", "MODEL_30000"]),
    ("RP", "Reference Position", ["MODEL_4000", "MODEL_30000"]),
    ("RS", "Reset", ["MODEL_4000", "MODEL_30000"]),
    ("RT", "Real Time", ["MODEL_4000", "MODEL_30000"]),
    ("RY", "Real Year Calendar Function", ["MODEL_4000", "MODEL_30000"]),
    ("SA", "Send Command", ["MODEL_4000", "MODEL_30000"]),
    ("SB", "Set Bit", ["MODEL_4000", "MODEL_30000"]),
    ("SC", "Stop Code", ["MODEL_4000", "MODEL_30000"]),
    ("SD", "Limit Switch Deceleration", ["MODEL_4000", "MODEL_30000"]),
    ("SH", "Servo Here", ["MODEL_4000", "MODEL_30000"]),
    ("SI", "Configure the special Galil SSI feature", ["MODEL_4000", "MODEL_30000"]),
    ("SL", "Single Step", ["MODEL_4000", "MODEL_30000"]),
    ("SM", "Subnet Mask", ["MODEL_4000", "MODEL_30000"]),
    ("SP", "Speed", ["MODEL_4000", "MODEL_30000"]),
    ("SS", "Configure the special Galil BiSS feature", ["MODEL_4000", "MODEL_30000"]),
    ("ST", "Stop", ["MODEL_4000", "MODEL_30000"]),
    ("SY", "Serial encoder BiSS active level", ["MODEL_4000", "MODEL_30000"]),
    ("TA", "Tell amplifier error status", ["MODEL_4000", "MODEL_30000"]),
    ("TB", "Tell Status Byte", ["MODEL_4000", "MODEL_30000"]),
    ("TC", "Tell Error Code", ["MODEL_4000", "MODEL_30000"]),
    ("TD", "Tell Dual Encoder", ["MODEL_4000", "MODEL_30000"]),
    ("TE", "Tell Error", ["MODEL_4000", "MODEL_30000"]),
    ("TH", "Tell Ethernet Handle", ["MODEL_4000", "MODEL_30000"]),
    ("TI", "Tell Inputs", ["MODEL_4000", "MODEL_30000"]),
    ("TK", "Peak Torque Limit", ["MODEL_4000", "MODEL_30000"]),
    ("TL", "Torque Limit", ["MODEL_4000", "MODEL_30000"]),
    ("TM", "Update Time", ["MODEL_4000", "MODEL_30000"]),
    ("TP", "Tell Position", ["MODEL_4000", "MODEL_30000"]),
    ("TR", "Trace", ["MODEL_4000", "MODEL_30000"]),
    ("TS", "Tell Switches", ["MODEL_4000", "MODEL_30000"]),
    ("TT", "Tell Torque", ["MODEL_4000", "MODEL_30000"]),
    ("TV", "Tell Velocity", ["MODEL_4000", "MODEL_30000"]),
    ("TW", "Timeout for MC trippoint", ["MODEL_4000", "MODEL_30000"]),
    ("UI", "User Interrupt", ["MODEL_4000", "MODEL_30000"]),
    ("UL", "Upload", ["MODEL_4000", "MODEL_30000"]),
    ("VA", "Vector Acceleration", ["MODEL_4000", "MODEL_30000"]),
    ("VD", "Vector Deceleration", ["MODEL_4000", "MODEL_30000"]),
    ("VE", "Vector Sequence End", ["MODEL_4000", "MODEL_30000"]),
    ("VF", "Variable Format", ["MODEL_4000", "MODEL_30000"]),
    ("VM", "Vector Mode", ["MODEL_4000", "MODEL_30000"]),
    ("VP", "Vector Position", ["MODEL_4000", "MODEL_30000"]),
    ("VR", "Vector Speed Ratio", ["MODEL_4000", "MODEL_30000"]),
    ("VS", "Vector Speed", ["MODEL_4000", "MODEL_30000"]),
    ("VT", "Vector Smoothing", ["MODEL_2000"]),
    ("VV", "Vector Speed Variable", ["MODEL_4000", "MODEL_30000"]),
    ("WH", "Which Handle", ["MODEL_4000", "MODEL_30000"]),
    ("WT", "Wait", ["MODEL_4000", "MODEL_30000"]),
    ("XQ", "Execute Program", ["MODEL_4000", "MODEL_30000"]),
    ("YA", "Step Drive Resolution", ["MODEL_4000", "MODEL_30000"]),
    ("YB", "Step Motor Resolution", ["MODEL_4000", "MODEL_30000"]),
    ("YC", "Encoder Resolution", ["MODEL_4000", "MODEL_30000"]),
    ("YR", "Error Correction", ["MODEL_4000", "MODEL_30000"]),
    (
        "YS",
        "Stepper Position Maintenance Mode Enable, Status",
        ["MODEL_4000", "MODEL_30000"],
    ),
    ("ZA", "User Data Record Variables", ["MODEL_4000", "MODEL_30000"]),
    ("ZN", "Negative Antifriction Bias", ["MODEL_4000", "MODEL_30000"]),
    ("ZP", "Positive Antifriction Bias", ["MODEL_4000", "MODEL_30000"]),
    ("ZS", "Zero Subroutine Stack", ["MODEL_4000", "MODEL_30000"]),
    ("P1CD", "Serial port 1 code", ["MODEL_4000", "MODEL_30000"]),
    ("P1CH", "Serial port 1 character", ["MODEL_4000", "MODEL_30000"]),
    ("P1NM", "Serial port 1 number", ["MODEL_4000", "MODEL_30000"]),
    ("P1ST", "Serial port 1 string", ["MODEL_4000", "MODEL_30000"]),
    (
        "ELSE",
        "Else function for use with IF conditional statement",
        ["MODEL_4000", "MODEL_30000"],
    ),
    ("TIME", "Time Operand", ["MODEL_4000", "MODEL_30000"]),
    ("ENDIF", "End of IF conditional statement", ["MODEL_4000", "MODEL_30000"]),
    ("REM", "Remark", ["MODEL_4000", "MODEL_30000"]),
]
