from enum import Enum, auto

class PhysicalQuantities(Enum):
    ELECTRICAL_CURRENT = auto(), # Ampere (A)
    ELECTRICAL_CHARGE = auto(), # Coulomb (C)
    ELECTRICAL_ENERGY = auto(), # Kilo Watt Hour (kWh)
    ELECTRICAL_POWER = auto(), # Watt (W)
    ELECTRICAL_APPARENT_POWER = auto(), # Volt Ampere (VA)
    ELECTRICAL_REACTIVE_POWER = auto(), # Volt Ampere Reactive (VAR)
    POTENTIAL_DIFFERENCE = auto(), # Volt (V)
    POWER_FACTOR = auto(), # Cos(Phi) (Cos Phi)
    LENGTH = auto(), # Meter (m)
    DISTANCE = auto(), # meter (m)
    SPEED = auto(), # meter per second (m/s)
    ANGLE = auto(), # radian (rad)
    ANGULAR_VELOCITY = auto(), # radians per second (rad/s)
    VOLUME = auto(), # liter (L)
    VOLUMETRIC_FLOW = auto(), # liter per hour (L/h)
    MAGNETIC_FIELD = auto(), # Tesla (T)
    FREQUENCY = auto(), # Hertz (Hz)
    DATE = auto(), # days (d)
    TIME = auto(), # Second (s)
    GEOGRAPHICAL_COORDINATE = auto(), # degree (deg)
    TEMPERATURE = auto(), # Kelvin (K)
    PRESSURE = auto(), # Pascal (Pa)
    PRESSURE_RATE = auto(), # Pascal per hour (Pa/hr)
    CONCENTRATION = auto(), # parts per million (ppm)
    SIGNAL_STRENGTH = auto(), # decibel (dB)
    SIGNAL_TO_NOISE_RATIO = auto(), # decibel (dB)

class FieldTypes(Enum):
    NUMBER = auto(), # Number (Binary numbers are little endian. Number fields that use two or three bits use one special encoding, for the maximum value.  When present, this means that the field is not present. Number fields that use four bits or more use two special encodings. The maximum positive value means that the field is not present. The maximum positive value minus 1 means that the field has an error. For instance, a broken sensor. For signed numbers the maximum values are the maximum positive value and that minus 1, not the all-ones bit encoding which is the maximum negative value.)
    FLOAT = auto(), # 32 bit IEEE-754 floating point number ()
    DECIMAL = auto(), # A unsigned numeric value represented with 2 decimal digits per byte (Each byte represent 2 digits, so 1234 is represented by 2 bytes containing 0x12 and 0x34. A number with an odd number of digits will have 0 as the first digit in the first byte.)
    LOOKUP = auto(), # Number value where each value encodes for a distinct meaning (Each lookup has a LookupEnumeration defining what the possible values mean)
    INDIRECT_LOOKUP = auto(), # Number value where each value encodes for a distinct meaning but the meaning also depends on the value in another field (Each lookup has a LookupIndirectEnumeration defining what the possible values mean)
    BITLOOKUP = auto(), # Number value where each bit value encodes for a distinct meaning (Each LookupBit has a LookupBitEnumeration defining what the possible values mean. A bitfield can have any combination of bits set.)
    FIELDTYPE_LOOKUP = auto(), # Number value where each value encodes for a distinct meaning including a fieldtype of the next variable field (Each lookup has a LookupFieldTypeEnumeration defining what the possible values mean)
    TIME = auto(), # Time ()
    DATE = auto(), # Date (The date, in days since 1 January 1970.)
    STRING_FIX = auto(), # A fixed length string containing single byte codepoints. (The length of the string is determined by the PGN field definition. Trailing bytes have been observed as '@', ' ', 0x0 or 0xff.)
    STRING_LZ = auto(), # A varying length string containing single byte codepoints encoded with a length byte and terminating zero. (The length of the string is determined by a starting length byte. It also contains a terminating zero byte. The length byte includes the zero byte but not itself.)
    STRING_LAU = auto(), # A varying length string containing double or single byte codepoints encoded with a length byte and terminating zero. (The length of the string is determined by a starting length byte. The 2nd byte contains 0 for UNICODE or 1 for ASCII.)
    BINARY = auto(), # Binary field (Unspecified content consisting of any number of bits.)
    RESERVED = auto(), # Reserved field (All reserved bits shall be 1)
    SPARE = auto(), # Spare field (All spare bits shall be 0)
    MMSI = auto(), # MMSI (The MMSI is encoded as a 32 bit number, but is always printed as a 9 digit number and should be considered as a string. The first three or four digits are special, see the USCG link for a detailed explanation.)
    VARIABLE = auto(), # Variable (The definition of the field is that of the reference PGN and reference field, this is totally variable.)
    KEY_VALUE = auto(), # Key/value (The type definition of the field is defined by an earlier LookupFieldTypeEnumeration field. The length is defined by the preceding length field.)
    FIELD_INDEX = auto(), # Field Index (Index of the specified field in the PGN referenced.)